@microsoft/teams-js 2.56.0 → 2.57.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}(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:()=>He,AppId:()=>fo,ChannelType:()=>vn,ChildAppWindow:()=>Xm,DialogDimension:()=>mn,EduType:()=>qe,EmailAddress:()=>lh,ErrorCode:()=>Ve,FileOpenPreference:()=>Le,FrameContexts:()=>fn,HostClientType:()=>ln,HostName:()=>dn,LiveShareHost:()=>Ty,NotificationTypes:()=>lu,ParentAppWindow:()=>Ym,RenderingSurfaces:()=>pn,SecondaryM365ContentIdName:()=>_e,TaskModuleDimension:()=>mn,TeamType:()=>gn,UUID:()=>Kn,UserAuthenticationState:()=>bl,UserSettingTypes:()=>fu,UserTeamRole:()=>hn,ValidatedSafeString:()=>lo,ViewerActionTypes:()=>du,activateChildProxyingCommunication:()=>Or,app:()=>i,appEntity:()=>z,appInitialization:()=>Fe,appInstallDialog:()=>ne,appPerformanceMetrics:()=>te,authentication:()=>ee,barCode:()=>oe,calendar:()=>he,call:()=>Re,chat:()=>ie,clipboard:()=>ae,contextualSearch:()=>b,conversations:()=>E,copilot:()=>R,dialog:()=>f,enablePrintCapability:()=>_C,executeDeepLink:()=>ty,externalAppAuthentication:()=>F,externalAppAuthenticationForCEA:()=>k,externalAppCardActions:()=>M,externalAppCardActionsForCEA:()=>x,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>U,files:()=>D,geoLocation:()=>ue,getAdaptiveCardSchemaVersion:()=>Qm,getContext:()=>BC,getCurrentFeatureFlagsState:()=>Mr,getMruTabInstances:()=>YC,getTabInstances:()=>XC,hostEntity:()=>Z,initialize:()=>HC,initializeWithFrameContext:()=>ry,liveShare:()=>Ne,location:()=>de,logs:()=>S,mail:()=>ve,marketplace:()=>Ue,media:()=>re,meeting:()=>pe,meetingRoom:()=>L,menus:()=>p,messageChannels:()=>H,monetization:()=>ge,mouseRelay:()=>De,navigateBack:()=>cy,navigateCrossDomain:()=>sy,navigateToTab:()=>ay,nestedAppAuth:()=>se,nestedAppAuthBridge:()=>_,notifications:()=>V,openFilePreview:()=>Cu,otherAppStateChange:()=>B,overwriteFeatureFlagsState:()=>Nr,pages:()=>y,people:()=>Ce,plugins:()=>j,print:()=>VC,profile:()=>ye,registerAppButtonClickHandler:()=>zC,registerAppButtonHoverEnterHandler:()=>qC,registerAppButtonHoverLeaveHandler:()=>$C,registerBackButtonHandler:()=>GC,registerBeforeUnloadHandler:()=>KC,registerChangeSettingsHandler:()=>ZC,registerCustomHandler:()=>vu,registerFocusEnterHandler:()=>QC,registerFullScreenHandler:()=>WC,registerOnLoadHandler:()=>JC,registerOnThemeChangeHandler:()=>jC,registerUserSettingsChangeHandler:()=>wu,remoteCamera:()=>W,returnFocus:()=>iy,search:()=>Se,secondaryBrowser:()=>le,sendCustomEvent:()=>mu,sendCustomMessage:()=>hu,setFeatureFlagsState:()=>xr,setFrameContext:()=>ny,settings:()=>Me,shareDeepLink:()=>ey,sharing:()=>Ee,shortcutRelay:()=>Ge,sidePanelInterfaces:()=>P,stageView:()=>Ie,store:()=>X,tasks:()=>xe,teams:()=>G,teamsCore:()=>we,thirdPartyCloudStorage:()=>ke,uploadCustomApp:()=>gu,version:()=>Pr,videoEffects:()=>J,videoEffectsEx:()=>K,visualMedia:()=>Te,webStorage:()=>Oe,widgetHosting:()=>Y});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>yo,getTelemetryPort:()=>wo,isSupported:()=>Co});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>To,getDataLayerPort:()=>Io,isSupported:()=>Po});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Oo,registerOnResumeHandler:()=>Ro});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>No,FailedReason:()=>xo,Messages:()=>Mo,_initialize:()=>_o,_uninitialize:()=>Vo,getContext:()=>Bo,getFrameContext:()=>Do,getImmediateParentOrigin:()=>Ho,initialize:()=>Lo,isInitialized:()=>Uo,lifecycle:()=>o,notifyAppLoaded:()=>jo,notifyExpectedFailure:()=>qo,notifyFailure:()=>zo,notifySuccess:()=>Wo,openLink:()=>Ko,registerHostToAppPerformanceMetricsHandler:()=>Jo,registerOnContextChangeHandler:()=>Go,registerOnThemeChangeHandler:()=>$o});var a={};n.r(a),n.d(a,{isSupported:()=>Xo,resize:()=>Zo});var s={};n.r(s),n.d(s,{isSupported:()=>ei,open:()=>Yo});var c={};n.r(c),n.d(c,{isSupported:()=>oi,registerOnMessageFromParent:()=>ri,sendMessageToDialog:()=>ni,sendMessageToParentFromDialog:()=>ti});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>ui,getDialogInfoFromUrlDialogInfo:()=>ci,isSupported:()=>si,open:()=>ii,parentCommunication:()=>c,submit:()=>ai});var l={};n.r(l),n.d(l,{isSupported:()=>Si,open:()=>yi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>Ei,open:()=>bi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ai,isSupported:()=>Ii,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ti,MenuItem:()=>Ri,MenuListType:()=>Oi,initialize:()=>Ui,isSupported:()=>ji,setNavBarMenu:()=>Hi,setUpViews:()=>Di,showActionMenu:()=>Vi});var g={};n.r(g),n.d(g,{initialize:()=>Wi,isSupported:()=>ta,registerChangeConfigHandler:()=>Zi,registerOnRemoveHandler:()=>Ji,registerOnRemoveHandlerHelper:()=>Ki,registerOnSaveHandler:()=>$i,registerOnSaveHandlerHelper:()=>Gi,setConfig:()=>qi,setValidityState:()=>zi});var h={};n.r(h),n.d(h,{isSupported:()=>xa,onClick:()=>Fa,onHoverEnter:()=>ka,onHoverLeave:()=>Ma});var m={};n.r(m),n.d(m,{_initialize:()=>Na,isSupported:()=>Ha,navigateBack:()=>Ua,registerBackButtonHandler:()=>Da,registerBackButtonHandlerHelper:()=>La});var v={};n.r(v),n.d(v,{isSupported:()=>Ba,navigateTo:()=>_a,navigateToDefaultPage:()=>Va});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ja,exitFullscreen:()=>Wa,isSupported:()=>za});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ga,getTabInstances:()=>$a,isSupported:()=>Ja,navigateToTab:()=>qa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ka,ReturnFocusType:()=>Qa,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ts,initializeWithFrameContext:()=>es,isSupported:()=>as,navigateCrossDomain:()=>ns,navigateToApp:()=>rs,registerFocusEnterHandler:()=>Xa,registerFullScreenHandler:()=>is,returnFocus:()=>Za,setCurrentFrame:()=>Ya,shareDeepLink:()=>os,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>uu,registerGetLogHandler:()=>cu});var b={};n.r(b),n.d(b,{closeContextualSearch:()=>bu,isSupported:()=>Iu,openContextualSearch:()=>Su,registerOnContextualSearchClosedHandler:()=>Au,registerOnContextualSearchOpenedHandler:()=>Eu});var E={};n.r(E),n.d(E,{closeConversation:()=>Ou,getChatMembers:()=>Ru,isSupported:()=>Fu,openConversation:()=>Tu});var A={};n.r(A),n.d(A,{isSupported:()=>Nu,sendCustomTelemetryData:()=>Uu});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Vu,isSupported:()=>_u});var P={};n.r(P),n.d(P,{ContentItemType:()=>ju,CopilotMode:()=>$u,MediaSelectionType:()=>Wu,SidePanelErrorCode:()=>Qu,SidePanelErrorImpl:()=>Zu,TeamsContextType:()=>Ju,TeamsDimensionName:()=>qu,TeamsSessionType:()=>zu,TranscriptState:()=>Gu,UserConsent:()=>Ku});var T={};n.r(T),n.d(T,{copilotSidePanelNotSupportedOnPlatformError:()=>il,getContent:()=>nl,isResponseAReportableError:()=>tl,isSupported:()=>el,preCheckUserConsent:()=>rl,registerUserActionContentSelect:()=>ol});var O={};n.r(O),n.d(O,{closeSidePanel:()=>pl,isSupported:()=>fl});var R={};n.r(R),n.d(R,{customTelemetry:()=>A,eligibility:()=>I,sidePanel:()=>T,view:()=>O});var F={};n.r(F),n.d(F,{ActionExecuteInvokeRequestType:()=>wl,ActionExecuteResponseHandler:()=>El,InvokeErrorCode:()=>Sl,InvokeResponseType:()=>yl,OriginalRequestType:()=>Cl,SerializableActionExecuteInvokeRequest:()=>ml,SerializableConnectorParameters:()=>xl,UserAuthenticationState:()=>bl,authenticateAndResendRequest:()=>Ol,authenticateWithConnector:()=>Nl,authenticateWithOauth2:()=>kl,authenticateWithPowerPlatformConnectorPlugins:()=>Ml,authenticateWithSSO:()=>Rl,authenticateWithSSOAndResendRequest:()=>Fl,disconnectConnector:()=>Ll,getUserAuthenticationStateForConnector:()=>Dl,isActionExecuteResponse:()=>vl,isInvokeError:()=>Al,isSupported:()=>Hl,validateActionExecuteInvokeRequest:()=>Pl});var k={};n.r(k),n.d(k,{authenticateAndResendRequest:()=>Wl,authenticateWithOauth:()=>jl,authenticateWithSSO:()=>Bl,authenticateWithSSOAndResendRequest:()=>zl,isSupported:()=>ql,validateInput:()=>$l});var M={};n.r(M),n.d(M,{ActionOpenUrlErrorCode:()=>Kl,ActionOpenUrlType:()=>Jl,isSupported:()=>Xl,processActionOpenUrl:()=>Zl,processActionSubmit:()=>Ql});var x={};n.r(x),n.d(x,{isSupported:()=>rd,processActionOpenUrl:()=>td,processActionSubmit:()=>nd});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>dd,isSupported:()=>ud,processActionOpenUrlDialog:()=>cd});var U={};n.r(U),n.d(U,{isSupported:()=>hd,processActionCommand:()=>gd});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>vd,CloudStorageProviderFileAction:()=>bd,CloudStorageProviderType:()=>wd,DocumentLibraryAccessType:()=>yd,FileDownloadStatus:()=>Sd,SpecialDocumentLibraryType:()=>Cd,addCloudStorageFolder:()=>Ad,addCloudStorageProvider:()=>Md,addCloudStorageProviderFile:()=>Nd,copyMoveFiles:()=>Rd,deleteCloudStorageFolder:()=>Id,deleteCloudStorageProviderFile:()=>Dd,downloadCloudStorageProviderFile:()=>Ld,getCloudStorageFolderContents:()=>Pd,getCloudStorageFolders:()=>Ed,getExternalProviders:()=>Od,getFileDownloads:()=>Fd,openCloudStorageFile:()=>Td,openDownloadFolder:()=>kd,registerCloudStorageProviderContentChangeHandler:()=>Vd,registerCloudStorageProviderListChangeHandler:()=>_d,removeCloudStorageProvider:()=>xd,renameCloudStorageProviderFile:()=>Ud,uploadCloudStorageProviderFile:()=>Hd});var L={};n.r(L),n.d(L,{getPairedMeetingRoomInfo:()=>Wd,isSupported:()=>Gd,registerMeetingRoomCapabilitiesUpdateHandler:()=>qd,registerMeetingRoomStatesUpdateHandler:()=>$d,sendCommandToPairedMeetingRoom:()=>zd});var H={};n.r(H),n.d(H,{dataLayer:()=>t,isSupported:()=>Jd,telemetry:()=>e});var _={};n.r(_),n.d(_,{initialize:()=>Yd,version:()=>Kd});var V={};n.r(V),n.d(V,{isSupported:()=>uf,showNotification:()=>cf});var B={};n.r(B),n.d(B,{isSupported:()=>gf,notifyInstallCompleted:()=>pf,registerAppInstallationHandler:()=>df,unregisterAppInstallationHandler:()=>ff});var j={};n.r(j),n.d(j,{isSupported:()=>vf,registerPluginMessage:()=>Cf,sendPluginMessage:()=>wf});var W={};n.r(W),n.d(W,{ControlCommand:()=>Af,ErrorReason:()=>If,SessionTerminatedReason:()=>Pf,getCapableParticipants:()=>Tf,isSupported:()=>Uf,registerOnCapableParticipantsChangeHandler:()=>kf,registerOnDeviceStateChangeHandler:()=>xf,registerOnErrorHandler:()=>Mf,registerOnSessionStatusChangeHandler:()=>Nf,requestControl:()=>Of,sendControlCommand:()=>Rf,terminateSession:()=>Ff});var z={};n.r(z),n.d(z,{isSupported:()=>Hf,selectAppEntity:()=>Lf});var q={};n.r(q),n.d(q,{getUserJoinedTeams:()=>Vf,isSupported:()=>Bf});var $={};n.r($),n.d($,{getConfigSetting:()=>zf,isSupported:()=>qf,joinedTeams:()=>q});var G={};n.r(G),n.d(G,{ChannelType:()=>Gf,fullTrust:()=>$,getTeamChannels:()=>Jf,isSupported:()=>Qf,refreshSiteUrl:()=>Kf});var J={};n.r(J),n.d(J,{EffectChangeType:()=>ap,EffectFailureReason:()=>sp,VideoFrameFormat:()=>ip,isSupported:()=>pp,notifySelectedVideoEffectChanged:()=>up,registerForVideoEffect:()=>lp,registerForVideoFrame:()=>cp});var K={};n.r(K),n.d(K,{ErrorLevel:()=>Lp,frameProcessingTimeoutInMs:()=>Up,isSupported:()=>qp,notifyFatalError:()=>Jp,notifySelectedVideoEffectChanged:()=>jp,registerForVideoEffect:()=>Wp,registerForVideoFrame:()=>Hp,updatePersonalizedEffects:()=>zp});var Q={};n.r(Q),n.d(Q,{addAndConfigure:()=>ng,getAll:()=>rg,isSupported:()=>sg,reconfigure:()=>og,remove:()=>ag,rename:()=>ig});var Z={};n.r(Z),n.d(Z,{AppTypes:()=>lg,isSupported:()=>dg,tab:()=>Q});var X={};n.r(X),n.d(X,{isSupported:()=>Sg,openAppDetail:()=>wg,openFullStore:()=>vg,openInContextStore:()=>Cg,openSpecificStore:()=>yg});var Y={};n.r(Y),n.d(Y,{callTool:()=>Og,contentSizeChanged:()=>xg,isSupported:()=>Tg,notifyIntrinsicHeight:()=>Mg,openExternal:()=>Ug,registerModalCloseHandler:()=>Dg,requestDisplayMode:()=>Fg,requestModal:()=>kg,sendFollowUpMessage:()=>Rg,setWidgetState:()=>Ng});var ee={};n.r(ee),n.d(ee,{DataResidency:()=>ah,authenticate:()=>Xg,getAuthToken:()=>eh,getUser:()=>nh,notifyFailure:()=>ih,notifySuccess:()=>oh,registerAuthenticationHandlers:()=>Zg});var te={};n.r(te),n.d(te,{isSupported:()=>sh,registerHostMemoryMetricsHandler:()=>ch});var ne={};n.r(ne),n.d(ne,{isSupported:()=>kh,openAppInstallDialog:()=>Fh});var re={};n.r(re),n.d(re,{CameraStartMode:()=>Dh,File:()=>Bh,FileFormat:()=>Nh,ImageOutputFormats:()=>Vh,ImageUriType:()=>_h,Media:()=>$h,MediaControllerEvent:()=>Uh,MediaType:()=>Hh,Source:()=>Lh,VideoController:()=>Jh,captureImage:()=>jh,hasPermission:()=>Wh,requestPermission:()=>zh,scanBarCode:()=>Zh,selectMedia:()=>Kh,viewImages:()=>Qh});var oe={};n.r(oe),n.d(oe,{hasPermission:()=>fm,isSupported:()=>gm,requestPermission:()=>pm,scanBarCode:()=>dm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>Cm,openChat:()=>mm,openGroupChat:()=>wm});var ae={};n.r(ae),n.d(ae,{isSupported:()=>Am,read:()=>Em,write:()=>bm});var se={};n.r(se),n.d(se,{addNAATrustedOrigins:()=>Dm,canParentManageNAATrustedOrigins:()=>km,deleteNAATrustedOrigins:()=>Lm,getParentOrigin:()=>Fm,isDeeplyNestedAuthSupported:()=>Mm,isNAAChannelRecommended:()=>Rm});var ce={};n.r(ce),n.d(ce,{chooseLocation:()=>jm,isSupported:()=>zm,showLocation:()=>Wm});var ue={};n.r(ue),n.d(ue,{getCurrentLocation:()=>$m,hasPermission:()=>Gm,isSupported:()=>Km,map:()=>ce,requestPermission:()=>Jm});var le={};n.r(le),n.d(le,{isSupported:()=>nv,open:()=>tv});var de={};n.r(de),n.d(de,{getLocation:()=>ov,isSupported:()=>av,showLocation:()=>iv});var fe={};n.r(fe),n.d(fe,{setOptions:()=>cv});var pe={};n.r(pe),n.d(pe,{CallType:()=>gv,EventActionSource:()=>mv,MeetingReactionType:()=>fv,MeetingType:()=>pv,SharingProtocol:()=>hv,appShareButton:()=>fe,getAppContentStageSharingCapabilities:()=>Tv,getAppContentStageSharingState:()=>Rv,getAuthenticationTokenForAnonymousUser:()=>Sv,getIncomingClientAudioState:()=>vv,getLiveStreamState:()=>bv,getMeetingDetails:()=>Cv,getMeetingDetailsVerbose:()=>yv,joinMeeting:()=>xv,registerLiveStreamChangedHandler:()=>Iv,registerMeetingReactionReceivedHandler:()=>Mv,registerRaiseHandStateChangedHandler:()=>kv,registerSpeakingStateChangeHandler:()=>Fv,requestAppAudioHandling:()=>Nv,requestStartLiveStreaming:()=>Ev,requestStopLiveStreaming:()=>Av,shareAppContentToStage:()=>Pv,stopSharingAppContentToStage:()=>Ov,toggleIncomingClientAudio:()=>wv,updateMicState:()=>Lv});var ge={};n.r(ge),n.d(ge,{isSupported:()=>jv,openPurchaseExperience:()=>Bv});var he={};n.r(he),n.d(he,{composeMeeting:()=>qv,isSupported:()=>$v,openCalendarItem:()=>zv});var me={};n.r(me),n.d(me,{composeMailWithHandoff:()=>Qv,isSupported:()=>Zv});var ve={};n.r(ve),n.d(ve,{ComposeMailType:()=>rw,composeMail:()=>tw,handoff:()=>me,isSupported:()=>nw,openMailItem:()=>ew});var we={};n.r(we),n.d(we,{enablePrintCapability:()=>iw,isSupported:()=>dw,print:()=>aw,registerBeforeUnloadHandler:()=>uw,registerBeforeUnloadHandlerHelper:()=>lw,registerOnLoadHandler:()=>sw,registerOnLoadHandlerHelper:()=>cw});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>mw,selectPeople:()=>gw});var ye={};n.r(ye),n.d(ye,{isSupported:()=>Sw,showProfile:()=>yw});var Se={};n.r(Se),n.d(Se,{closeSearch:()=>Rw,isSupported:()=>Ow,registerHandlers:()=>Pw,unregisterHandlers:()=>Tw});var be={};n.r(be),n.d(be,{getContent:()=>Mw,isSupported:()=>xw});var Ee={};n.r(Ee),n.d(Ee,{SharingAPIMessages:()=>Dw,history:()=>be,isSupported:()=>Ww,shareWebContent:()=>Lw});var Ae={};n.r(Ae),n.d(Ae,{close:()=>qw,isSupported:()=>$w});var Ie={};n.r(Ie),n.d(Ie,{StageViewOpenMode:()=>Jw,isSupported:()=>Qw,open:()=>Kw,self:()=>Ae});var Pe={};n.r(Pe),n.d(Pe,{captureImages:()=>eC,isSupported:()=>nC,retrieveImages:()=>tC});var Te={};n.r(Te),n.d(Te,{CameraRestriction:()=>sC,Source:()=>cC,hasPermission:()=>uC,image:()=>Pe,requestPermission:()=>lC});var Oe={};n.r(Oe),n.d(Oe,{isSupported:()=>vC,isWebStorageClearedOnUserLogOut:()=>hC});var Re={};n.r(Re),n.d(Re,{CallModalities:()=>CC,isSupported:()=>SC,startCall:()=>yC});var Fe={};n.r(Fe),n.d(Fe,{ExpectedFailureReason:()=>No,FailedReason:()=>xo,Messages:()=>Mo,notifyAppLoaded:()=>EC,notifyExpectedFailure:()=>PC,notifyFailure:()=>IC,notifySuccess:()=>AC});var ke={};n.r(ke),n.d(ke,{getDragAndDropFiles:()=>NC,isSupported:()=>DC});var Me={};n.r(Me),n.d(Me,{getSettings:()=>dy,registerOnRemoveHandler:()=>gy,registerOnSaveHandler:()=>py,setSettings:()=>fy,setValidityState:()=>ly});var xe={};n.r(xe),n.d(xe,{getDefaultSizeIfNotProvided:()=>by,startTask:()=>vy,submitTask:()=>Cy,updateTask:()=>wy});var Ne={};n.r(Ne),n.d(Ne,{ContainerState:()=>Iy,LiveShareHost:()=>Ty,UserMeetingRole:()=>Ay,isSupported:()=>Py});var Ue={};n.r(Ue),n.d(Ue,{CartStatus:()=>Wy,Intent:()=>jy,addOrUpdateCartItems:()=>qy,cartVersion:()=>By,getCart:()=>zy,isSupported:()=>Jy,removeCartItems:()=>$y,updateCartStatus:()=>Gy});var De={};n.r(De),n.d(De,{disableMouseRelayCapability:()=>oS,enableMouseRelayCapability:()=>rS,isSupported:()=>iS});var Le,He,_e,Ve,Be,je,We,ze,qe,$e,Ge={};function Je(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Ge),n.d(Ge,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>AS,enableShortcutRelayCapability:()=>bS,isSupported:()=>ES,resetIsShortcutRelayCapabilityEnabled:()=>SS,setOverridableShortcutHandler:()=>yS}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Le||(Le={})),function(e){e.M365Content="m365content"}(He||(He={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(_e||(_e={})),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"}(Ve||(Ve={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Be||(Be={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(je||(je={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(We||(We={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(ze||(ze={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(qe||(qe={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}($e||($e={}));const Ke=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 Qe="2.0.1",Ze="2.0.2",Xe="2.0.3",Ye="2.0.4",et="2.0.1",tt="1.9.0",nt="2.0.0",rt="1.7.0",ot="1.8.0",it="1.9.0",at=n.t(Ke,2).validOrigins,st=1500,ct=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ut="https",lt="teams.microsoft.com",dt="The library has not yet been initialized",ft="The runtime has not yet been initialized",pt="The runtime version is not supported",gt="The call was not properly started";var ht=n(933);const mt=wt,vt=2147483647;function wt(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 yt(e)}return Ct(e,t,n)}function Ct(e,t,n){if("string"==typeof e)return At(e,t);if(ArrayBuffer.isView(e))return kt(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(Pt(e,ArrayBuffer)||e&&Pt(e.buffer,ArrayBuffer))return Mt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Pt(e,SharedArrayBuffer)||e&&Pt(e.buffer,SharedArrayBuffer)))return Mt(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 wt.from(r,t,n);const o=Yt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return wt.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 yt(e){return St(e),bt(e<0?0:0|Et(e))}function St(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 bt(e){if(e>vt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,wt.prototype),t}function Et(e){if(e>=vt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+vt.toString(16)+" bytes");return 0|e}function At(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!wt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|It(e,t);let r=bt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function It(e,t){if(wt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Pt(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 Tt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ot(e).length;default:if(o)return r?-1:Tt(e).length;t=(""+t).toLowerCase(),o=!0}}function Pt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Tt(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 Ot(e){return ht.toByteArray(Ft(e))}wt.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}}(),wt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),wt.from=function(e,t,n){return Ct(e,t,n)},Object.setPrototypeOf(wt.prototype,Uint8Array.prototype),Object.setPrototypeOf(wt,Uint8Array),wt.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}},wt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==wt.prototype};const Rt=/[^+/0-9A-Za-z-_]/g;function Ft(e){if((e=(e=e.split("=")[0]).trim().replace(Rt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function kt(e){if(Pt(e,Uint8Array)){const t=new Uint8Array(e);return Mt(t.buffer,t.byteOffset,t.byteLength)}return xt(e)}function Mt(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,wt.prototype),r}function xt(e){const t=e.length<0?0:0|Et(e.length),n=bt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Nt(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 Lt(r)}function Ut(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 Ht(this,t,n);case"utf8":case"utf-8":return Nt(this,t,n);case"ascii":return _t(this,t,n);case"latin1":case"binary":return Vt(this,t,n);case"base64":return Bt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}wt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Nt(this,0,e):Ut.apply(this,arguments)};const Dt=4096;function Lt(e){const t=e.length;if(t<=Dt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Dt));return n}function Ht(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+=Xt[e[r]];return o}function _t(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 Vt(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 Bt(e,t,n){return 0===t&&n===e.length?ht.fromByteArray(e):ht.fromByteArray(e.slice(t,n))}function jt(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 Wt(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(Zt(r))return a;e[n+a]=r}return a}function zt(e,t,n,r){return Qt(Tt(t,e.length-n),e,n,r)}function qt(e,t,n,r){return Qt(Jt(t),e,n,r)}function $t(e,t,n,r){return Qt(Ot(t),e,n,r)}function Gt(e,t,n,r){return Qt(Kt(t,e.length-n),e,n,r)}function Jt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Kt(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function Qt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Zt(e){return e!=e}wt.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 Wt(this,e,t,n);case"utf8":case"utf-8":return zt(this,e,t,n);case"ascii":case"latin1":case"binary":return qt(this,e,t,n);case"base64":return $t(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Gt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Xt=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 Yt(e){if(wt.isBuffer(e)){const t=0|Et(e.length),n=bt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Zt(e.length)?bt(0):xt(e):"Buffer"===e.type&&Array.isArray(e.data)?xt(e.data):void 0}const en={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let tn;const nn=new Uint8Array(16);function rn(){if(!tn){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tn=crypto.getRandomValues.bind(crypto)}return tn(nn)}const on=[];for(let e=0;e<256;++e)on.push((e+256).toString(16).slice(1));function an(e,t=0){return(on[e[t+0]]+on[e[t+1]]+on[e[t+2]]+on[e[t+3]]+"-"+on[e[t+4]]+on[e[t+5]]+"-"+on[e[t+6]]+on[e[t+7]]+"-"+on[e[t+8]]+on[e[t+9]]+"-"+on[e[t+10]]+on[e[t+11]]+on[e[t+12]]+on[e[t+13]]+on[e[t+14]]+on[e[t+15]]).toLowerCase()}const sn=function(e,t,n){if(en.randomUUID&&!t&&!e)return en.randomUUID();const r=(e=e||{}).random??e.rng?.()??rn();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return an(r)},cn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const un=function(e){return"string"==typeof e&&cn.test(e)};var ln,dn,fn,pn,gn,hn,mn,vn;!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"}(ln||(ln={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(dn||(dn={})),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"}(fn||(fn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(pn||(pn={})),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"}(gn||(gn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(hn||(hn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(mn||(mn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(vn||(vn={}));const wn={errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM},Cn={majorVersion:1,minorVersion:5},yn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Sn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),bn=new Error("Invalid response: Received more images than the specified max limit in the response.");function En(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function An(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 In(){return sn()}function Pn(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Pn(e[t])}),Object.freeze(e)}function Tn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function On(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Rn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function Fn(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 kn(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 Mn(e){return!(An(`${e.majorVersion}.${e.minorVersion}`,`${Cn.majorVersion}.${Cn.minorVersion}`)>=0)}function xn(e){return"https:"===e.protocol}function Nn(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=mt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Un(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 Dn(){if(Ln())throw new Error("window object undefined at SSR check");return window}function Ln(){return"undefined"==typeof window}function Hn(e,t){if(Bn(e)||!jn(e)||!Wn(e))throw t||new Error("id is not valid.")}function _n(e,t){const n=e.toString().toLocaleLowerCase();if(Bn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!xn(e))throw t||new Error("Url should be a valid https url")}function Vn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Bn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function jn(e){return e.length<256&&e.length>4}function Wn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function zn(e){if(!e)throw new Error("id must not be empty");if(!1===un(e))throw new Error("id must be a valid UUID")}const qn=!!performance&&"now"in performance;function $n(){return qn?performance.now()+performance.timeOrigin:void 0}function Gn(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=>Gn(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=>Gn(e[n],t+1))}function Jn(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:ze.NotAdult})})})}class Kn{constructor(e=In()){this.uuid=e,zn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Qn(e){if(!(e instanceof Kn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Zn{}Zn.initializeCalled=!1,Zn.initializeCompleted=!1,Zn.additionalValidOrigins=[],Zn.initializePromise=void 0,Zn.isFramelessWindow=!1,Zn.frameContext=void 0,Zn.hostClientType=void 0,Zn.printCapabilityEnabled=!1,Zn.teamsJsInstanceId=(new Kn).toString();var Xn=n(815);const Yn=new Kn,er=Xn.debug.formatArgs;Xn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Yn.toString()}]`,er.call(this,e)};const tr=(0,Xn.debug)("teamsJs");function nr(e){return tr.extend(e)}function rr(e,t){return`${e}_${t}`}function or(e){return/^v\d+_[\w.]+$/.test(e)}var ir=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 ar=nr("runtime"),sr=4;function cr(e){return e.apiVersion===sr}const ur={apiVersion:-1,supports:{}};function lr(e){if(cr(e))return!0;throw-1===e.apiVersion?new Error(ft):new Error(pt)}let dr=ur;const fr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:yn,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:{}}}},pr=[ln.desktop,ln.web,ln.rigel,ln.surfaceHub,ln.teamsRoomsWindows,ln.teamsRoomsAndroid,ln.teamsPhones,ln.teamsDisplays],gr=[ln.android,ln.ios,ln.ipados,ln.visionOS],hr=[...pr,...gr];function mr(e){let t=e;if(t.apiVersion<sr&&vr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),cr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const vr=[{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=ir(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})}}}],wr="2.1.2",Cr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:pr}],"1.9.0":[{capability:{location:{}},hostClientTypes:hr}],"2.0.0":[{capability:{people:{}},hostClientTypes:hr},{capability:{sharing:{}},hostClientTypes:[ln.desktop,ln.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[ln.android,ln.desktop,ln.ios,ln.teamsRoomsAndroid,ln.teamsPhones,ln.teamsDisplays,ln.web]},{capability:{webStorage:{}},hostClientTypes:[ln.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[ln.android,ln.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[ln.android,ln.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[ln.android,ln.ios,ln.ipados,ln.visionOS]}],"2.1.2":[]},yr=ar.extend("generateBackCompatRuntimeConfig");function Sr(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]=Sr(e[r]||{},t[r]));return n}function br(e,t,n){yr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);yr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{An(e,t)>=0&&n[t].forEach(e=>{void 0!==Zn.hostClientType&&e.hostClientTypes.includes(Zn.hostClientType)&&(r=Sr(r,e.capability))})});const o={apiVersion:sr,hostVersionsInfo:yn,isLegacyTeams:!0,supports:r};return yr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Er=ar.extend("applyRuntimeConfig");function Ar(e){"string"==typeof e.apiVersion&&(Er("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Er("Fast-forwarding runtime %o",e);const t=mr(e);Er("Applying runtime %o",t),dr=Pn(t)}function Ir(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Pr="2.56.0",Tr={childProxyingCommunication:!1};function Or(){Tr.childProxyingCommunication=!0}function Rr(){return Tr.childProxyingCommunication}const Fr={disableEnforceOriginMatchForChildResponses:!1};let kr=Object.assign({},Fr);function Mr(){return kr}function xr(e){kr=e}function Nr(e){return xr(Object.assign(Object.assign({},kr),e)),Mr()}var Ur=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 Dr=e=>{const{uuid:t}=e,n=Ur(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Lr=e=>{const{uuidAsString:t}=e,n=Ur(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Kn(t):void 0})},Hr=e=>{const{uuidAsString:t}=e,n=Ur(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Kn(t):void 0})},_r=e=>{const{uuid:t}=e,n=Ur(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Vr(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 Br=nr("flushMessageQueue");function jr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Dr(o);Br("Flushing message %s from %s message queue via postMessage.",Vr(n),r),e.postMessage(n,t)}}}const Wr=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function zr(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 qr{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return Wr.test(e)}static create(e,t){const n=e.split("://");return new qr(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||zr(this.host,e.host))}}function $r(e){return qr.canUse(e)}function Gr(e,t){if(qr.canUse(e))return qr.create(e,t);t("No URL verifier available for pattern: %s",e)}const Jr=nr("internal"),Kr=Jr.extend("ensureInitializeCalled"),Qr=Jr.extend("ensureInitialized");function Zr(){if(!Zn.initializeCalled)throw Kr(dt),new Error(dt)}function Xr(e,...t){if(!Zn.initializeCompleted)throw Qr("%s. initializeCalled: %s",dt,Zn.initializeCalled.toString()),new Error(dt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Zn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Zn.frameContext}".`;throw Qr(e),new Error(e)}}return lr(e)}function Yr(e=Qe){const t=An(Zn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function eo(){return Zn.hostClientType==ln.android||Zn.hostClientType==ln.ios||Zn.hostClientType==ln.ipados||Zn.hostClientType==ln.visionOS}function to(e=Qe){if(!eo()){throw{errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM}}if(!Yr(e)){throw{errorCode:Ve.OLD_PLATFORM}}}function no(e){let t=Zn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&$r(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Zn.additionalValidOrigins=t}function ro(e){if(!so(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${io}-${ao}).`)}function oo(e){if(Bn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(co(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const io=4,ao=256;function so(e){return e.length<ao&&e.length>io}function co(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function uo(e){if(!(e instanceof fo))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class lo{constructor(e){this.idAsString=e,oo(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class fo extends lo{constructor(e){super(e),ro(e)}toJSON(){return{appIdAsString:this.toString()}}}function po(e){return null==e}var go=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 ho;const mo="v1",vo=nr("messageChannels.telemetry");function wo(){return go(this,void 0,void 0,function*(){if(ho)return vo("Returning telemetry port from cache"),ho;if(!Co())throw wn;return ho=yield kc(rr(mo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),ho})}function Co(){var e;return!(!Xr(dr)||!(null===(e=dr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function yo(){ho=void 0}var So=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};let bo;const Eo="v1",Ao=nr("messageChannels.dataLayer");function Io(){return So(this,void 0,void 0,function*(){if(bo)return Ao("Returning dataLayer port from cache"),bo;if(!Po())throw wn;return bo=yield kc(rr(Eo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),bo})}function Po(){var e;return!(!Xr(dr)||!(null===(e=dr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function To(){bo=void 0}function Oo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Xr(dr),Js(e)}function Ro(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Xr(dr),Ks(e)}const Fo="v2",ko=nr("app"),Mo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var xo,No;function Uo(){return Zn.initializeCompleted}function Do(){return Zn.frameContext}function Lo(e){return sa(rr(Fo,"app.initialize"),e)}function Ho(){var e,t;if(Ln())return null;const n=null!==(e=Cc.currentWindow)&&void 0!==e?e:window;if(n.parent===n)return null;const r=n.location.ancestorOrigins,o=null==r?void 0:r.item(0);if(o)return o;const i=null===(t=n.document)||void 0===t?void 0:t.referrer;if(!i)return null;try{const e=new URL(i).origin;return e===n.location.origin?null:e}catch(e){return null}}function _o(e){Cc.currentWindow=e}function Vo(){Zn.initializeCalled&&(Fs(),Zn.initializeCalled=!1,Zn.initializeCompleted=!1,Zn.initializePromise=void 0,Zn.additionalValidOrigins=[],Zn.frameContext=void 0,Zn.hostClientType=void 0,Zn.isFramelessWindow=!1,yo(),To(),bc())}function Bo(){return new Promise(e=>{Zr(),e(Ec(rr(Fo,"app.getContext"),"getContext"))}).then(e=>Qo(e))}function jo(){Zr(),ca(rr(Fo,"app.notifyAppLoaded"))}function Wo(){return da(rr(Fo,"app.notifySuccess"))}function zo(e){Zr(),la(rr(Fo,"app.notifyFailure"),e)}function qo(e){Zr(),ua(rr(Fo,"app.notifyExpectedFailure"),e)}function $o(e){ma(rr(Fo,"app.registerOnThemeChangeHandler"),e)}function Go(e){va(rr(Fo,"app.registerOnContextChangeHandler"),e)}function Jo(e){Bs(e)}function Ko(e){return wa(rr(Fo,"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:dn.teams,clientType:e.hostClientType?e.hostClientType:ln.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new fo(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Zn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Zo(e){fi(rr(li,"dialog.update.resize"),e)}function Xo(){return!(!Xr(dr)||!dr.supports.dialog)&&!!dr.supports.dialog.update}function Yo(e,t,n){gi(rr(li,"dialog.url.bot.open"),e,t,n)}function ei(){return Xr(dr)&&void 0!==(dr.supports.dialog&&dr.supports.dialog.url&&dr.supports.dialog.url.bot)}function ti(e){if(Xr(dr,fn.task),!oi())throw wn;Nc(rr(li,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function ni(e){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!oi())throw wn;Nc(rr(li,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function ri(e){if(Xr(dr,fn.task),!oi())throw wn;for(Ns("messageForChild"),xs(rr(li,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),wi.reverse();wi.length>0;){e(wi.pop())}}function oi(){var e,t;return Xr(dr)&&!!(null===(t=null===(e=dr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ii(e,t,n){pi(rr(li,"dialog.url.open"),e,t,n)}function ai(e,t){hi(rr(li,"dialog.url.submit"),e,t)}function si(){return Xr(dr)&&void 0!==(dr.supports.dialog&&dr.supports.dialog.url)}function ci(e){return{url:e.url,height:e.size?e.size.height:mn.Small,width:e.size?e.size.width:mn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ui(e){const t=ci(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(xo||(xo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(No||(No={})),ko("teamsjs instance is version %s, starting at %s UTC (%s local)",Pr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Ln())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?ko("teamsjs is being used from %s. %s",t,n):ko("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const li="v2",di="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 fi(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.task,fn.meetingStage),!Xo())throw wn;Nc(e,"tasks.updateTask",[t])}function pi(e,t,n,r){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!si())throw wn;r&&xs(rr(li,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Nc(e,"tasks.startTask",[ci(t)],(e,t)=>{null==n||n({err:e,result:t}),Ns("messageForParent")})}function gi(e,t,n,r){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!ei())throw wn;r&&xs(rr(li,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Nc(e,"tasks.startTask",[ui(t)],(e,t)=>{null==n||n({err:e,result:t}),Ns("messageForParent")})}function hi(e,t,n){if(Xr(dr,fn.content,fn.task),!si())throw wn;Zn.frameContext===fn.content&&console.warn(di),Nc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function mi(e){return{card:e.card,height:e.size?e.size.height:mn.Small,width:e.size?e.size.width:mn.Small,title:e.title}}function vi(e){const t=mi(e);return t.completionBotId=e.completionBotId,t}const wi=[];function Ci(e){Zn.frameContext&&(Zn.frameContext===fn.task?wi.push(e):Ns("messageForChild"))}function yi(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!Si())throw wn;const n=vi(e);Nc(rr(li,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Si(){const e=dr.hostVersionsInfo&&dr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Mn(dr.hostVersionsInfo.adaptiveCardSchemaVersion);return Xr(dr)&&void 0!==(e&&dr.supports.dialog&&dr.supports.dialog.card&&dr.supports.dialog.card.bot)}function bi(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!Ei())throw wn;const n=mi(e);Nc(rr(li,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ei(){const e=dr.hostVersionsInfo&&dr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Mn(dr.hostVersionsInfo.adaptiveCardSchemaVersion);return Xr(dr)&&void 0!==(e&&dr.supports.dialog&&dr.supports.dialog.card)}function Ai(){xs(rr(li,"dialog.registerMessageForChildHandler"),"messageForChild",Ci,!1)}function Ii(){return!(!Xr(dr)||!dr.supports.dialog)}const Pi="v2";var Ti,Oi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ti||(Ti={}));class Ri{constructor(){this.enabled=!0,this.selected=!1}}let Fi,ki,Mi,xi,Ni;function Ui(){xs(rr(Pi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",_i,!1),xs(rr(Pi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Bi,!1),xs(rr(Pi,"menus.registerSetModuleViewHandler"),"setModuleView",Li,!1)}function Di(e,t){if(Xr(dr),!ji())throw wn;Mi=t,Nc(rr(Pi,"menus.setUpViews"),"setUpViews",[e])}function Li(e){Mi&&Mi(e)||(Xr(dr),Nc(rr(Pi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Hi(e,t){if(Xr(dr),!ji())throw wn;Fi=t,Nc(rr(Pi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function _i(e){Fi&&Fi(e)||(Xr(dr),Nc(rr(Pi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Vi(e,t){if(Xr(dr),!ji())throw wn;ki=t,Nc(rr(Pi,"menus.showActionMenu"),"showActionMenu",[e])}function Bi(e){ki&&ki(e)||(Xr(dr),Nc(rr(Pi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ji(){return!(!Xr(dr)||!dr.supports.menus)}function Wi(){xs(rr(ss,"pages.config.registerSettingsSaveHandler"),"settings.save",Qi,!1),xs(rr(ss,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Yi,!1)}function zi(e){return ms(rr(ss,"pages.config.setValidityState"),e)}function qi(e){return ws(rr(ss,"pages.config.setConfig"),e)}function $i(e){Gi(rr(ss,"pages.config.registerOnSaveHandler"),e,()=>{if(!po(e)&&!ta())throw wn})}function Gi(e,t,n){!po(t)&&Xr(dr,fn.settings),n&&n(),xi=t,!po(t)&&Nc(e,"registerHandler",["save"])}function Ji(e){Ki(rr(ss,"pages.config.registerOnRemoveHandler"),e,()=>{if(!po(e)&&!ta())throw wn})}function Ki(e,t,n){!po(t)&&Xr(dr,fn.remove,fn.settings),n&&n(),Ni=t,!po(t)&&Nc(e,"registerHandler",["remove"])}function Qi(e){const t=new Xi(e);xi?xi(t):ec()?sc("settings.save",[e]):t.notifySuccess()}function Zi(e){Ds(rr(ss,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[fn.content],()=>{if(!ta())throw wn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Oi||(Oi={}));class Xi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Nc(rr(ss,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Nc(rr(ss,"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 Yi(){const e=new ea;Ni?Ni(e):ec()?sc("settings.remove",[]):e.notifySuccess()}class ea{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Nc(rr(ss,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Nc(rr(ss,"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 ta(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.config}class na{}class ra extends na{validate(e){return!0}deserialize(e){return e}}var oa=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 ia=6e4,aa=nr("app");function sa(e,t){if(Ln()){return aa.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Fn(()=>ha(e,t),ia,new Error("SDK initialization timed out."))}function ca(e){Nc(e,Mo.AppLoaded,[Pr])}function ua(e,t){Nc(e,Mo.ExpectedFailure,[t.reason,t.message])}function la(e,t){Nc(e,Mo.Failure,[t.reason,t.message,t.authHeader])}function da(e){return oa(this,void 0,void 0,function*(){if(Zn.initializeCompleted)return pa(e);if(!Zn.initializePromise)throw new Error(dt);return Zn.initializePromise.then(()=>pa(e))})}function fa(){var e;return Xr(dr)&&!!(null===(e=dr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function pa(e){return oa(this,void 0,void 0,function*(){return fa()?Rc(Mo.Success,[Pr],new ra,e).then(()=>({hasFinishedSuccessfully:!0})):(Nc(e,Mo.Success,[Pr]),{hasFinishedSuccessfully:"unknown"})})}const ga=aa.extend("initializeHelper");function ha(e,t){return new Promise(n=>{Zn.initializeCalled||(Zn.initializeCalled=!0,Rs(),Zn.initializePromise=Sc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Qe})=>{Zn.frameContext=e,Zn.hostClientType=t,Zn.clientSupportedSDKVersion=r;try{ga("Parsing %s",n);let e=JSON.parse(n);if(ga("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Jn(e),n&&Ar(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ga("Attempting to parse %s as an SDK version",n),isNaN(An(n,Qe))||(Zn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ga("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=Jn(e),Ar(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ar(br(Zn.clientSupportedSDKVersion,fr,Cr))}}Zn.initializeCompleted=!0}),Ui(),Wi(),Ai()),Array.isArray(t)&&no(t),void 0!==Zn.initializePromise?n(Zn.initializePromise):ga("GlobalVars.initializePromise is unexpectedly undefined")})}function ma(e,t){!po(t)&&Zr(),Ls(e,t)}function va(e,t){!po(t)&&Zr(),Hs(e,t)}function wa(e,t){return new Promise(n=>{Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),n(Ac(e,"executeDeepLink",t))})}var Ca=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 ya=[];const Sa=nr("validateOrigin");let ba;function Ea(){return Ca(this,void 0,void 0,function*(){ba||(yield Ia())})}function Aa(){return 0===ya.length}function Ia(e=!1){return Ca(this,void 0,void 0,function*(){if(!Aa()&&!e)return ya;if(ba)return ba;if(Ln())return ya=at,at;{Sa("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),st);return ba=fetch(ct,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return Sa("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Pa(JSON.stringify(e)))return ya=e.validOrigins,ya;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?Sa(`validOrigins fetch call to CDN failed due to Timeout of ${st} ms. Defaulting to fallback list`):Sa("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ya=at,ya)),ba}})}function Pa(e){let t;try{t=JSON.parse(e)}catch(e){return!1}if(!t||!Array.isArray(t.validOrigins))return!1;for(const e of t.validOrigins){if("string"!=typeof e)return!1;try{new URL("https://"+e)}catch(t){return Sa("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}}return!0}function Ta(e,t){let n;try{const t=Gr(e,Sa);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Oa(e,t){const n=t||Aa()?at:ya;return Ra(e,n)?Promise.resolve(!0):(Sa("Origin %s is not in the local valid origins list, fetching from CDN",e),Ia(t).then(t=>Ra(e,t)))}function Ra(e,t){for(const t of Zn.additionalValidOrigins)if(Ta(t,e))return!0;const n=e.host;return xn(e)?!!t.some(e=>zr(e,n))||(Sa("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Zn.additionalValidOrigins),!1):(Sa("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Fa(e){Ds(rr(ss,"pages.appButton.onClick"),"appButtonClick",e,[fn.content],()=>{if(!xa())throw wn})}function ka(e){Ds(rr(ss,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[fn.content],()=>{if(!xa())throw wn})}function Ma(e){Ds(rr(ss,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[fn.content],()=>{if(!xa())throw wn})}function xa(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.appButton}function Na(){As()}function Ua(){return us(rr(ss,"pages.backStack.navigateBack"))}function Da(e){La(rr(ss,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!po(e)&&!Ha())throw wn})}function La(e,t,n){!po(t)&&Xr(dr),n&&n(),Es(t),!po(t)&&Nc(e,"registerHandler",["backButton"])}function Ha(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.backStack}function _a(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!Ba())throw wn;t(Pc(rr(ss,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Va(){return new Promise(e=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!Ba())throw wn;e(Pc(rr(ss,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Ba(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.currentApp}function ja(){if(Xr(dr,fn.content),!za())throw wn;Nc(rr(ss,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Wa(){if(Xr(dr,fn.content),!za())throw wn;Nc(rr(ss,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function za(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.fullTrust}function qa(e){return ls(rr(ss,"pages.tabs.navigateToTab"),e)}function $a(e){return fs(rr(ss,"pages.tabs.getTabInstances"),e)}function Ga(e){return ps(rr(ss,"pages.tabs.getMruTabInstances"),e)}function Ja(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.tabs}var Ka,Qa;function Za(e){const t=rr(ss,"pages.returnFocus");if(Xr(dr),!as())throw wn;if(void 0===e&&Nc(t,"returnFocus",[!1]),"boolean"==typeof e)Nc(t,"returnFocus",[e]);else switch(e){case Qa.PreviousLandmark:case Qa.GoToActivityFeed:Nc(t,"returnFocus",[!1,e]);break;case Qa.NextLandmark:Nc(t,"returnFocus",[!0,e])}}function Xa(e){Ds(rr(ss,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!as())throw wn})}function Ya(e){hs(rr(ss,"pages.setCurrentFrame"),e)}function es(e,t,n){Ea(),sa(rr(ss,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Ya(e)}function ts(){return vs(rr(ss,"pages.getConfig."))}function ns(e){return cs(rr(ss,"pages.navigateCrossDomain"),e)}function rs(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!as())throw wn;const n=rr(ss,"pages.navigateToApp");if(dr.isLegacyTeams){t(Ac(n,"executeDeepLink",kn(Cs(e)?e:ys(e))))}else{t(Ac(n,"pages.navigateToApp",Cs(e)?Ss(e):e))}})}function os(e){return gs(rr(ss,"pages.shareDeepLink"),e)}function is(e){Ds(rr(ss,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!po(e)&&!as())throw wn})}function as(){return!(!Xr(dr)||!dr.supports.pages)}Ea(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ka||(Ka={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Qa||(Qa={}));const ss="v2";function cs(e,t){return new Promise(n=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.remove,fn.task,fn.stage,fn.meetingStage),!as())throw wn;n(Ic(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function us(e){return new Promise(t=>{if(Xr(dr),!Ha())throw wn;t(Ic(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ls(e,t){return new Promise(n=>{if(Xr(dr),!Ja())throw wn;n(Ic(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function ds(e,t){if(Xr(dr),!as())throw wn;Nc(e,"returnFocus",[t])}function fs(e,t){return new Promise(n=>{if(Xr(dr),!Ja())throw wn;n(Ec(e,"getTabInstances",t))})}function ps(e,t){return new Promise(n=>{if(Xr(dr),!Ja())throw wn;n(Ec(e,"getMruTabInstances",t))})}function gs(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!as())throw wn;Nc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function hs(e,t){if(Xr(dr,fn.content),!as())throw wn;Nc(e,"setFrameContext",[t])}function ms(e,t){if(Xr(dr,fn.settings,fn.remove),!ta())throw wn;Nc(e,"settings.setValidityState",[t])}function vs(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.settings,fn.remove,fn.sidePanel),!as())throw wn;t(Ec(e,"settings.getSettings"))})}function ws(e,t){return new Promise(n=>{if(Xr(dr,fn.content,fn.settings,fn.sidePanel),!ta())throw wn;n(Ac(e,"settings.setSettings",t))})}function Cs(e){return e.appId instanceof fo}function ys(e){return Object.assign(Object.assign({},e),{appId:new fo(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ss(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let bs;function Es(e){bs=e}function As(){xs(rr(ss,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Is,!1)}function Is(){bs&&bs()||(ec()?sc("backButtonPress",[]):Ua())}var Ps=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Ts=nr("handlers");class Os{static initializeHandlers(){Os.handlers.themeChange=_s,Os.handlers.contextChange=Vs,Os.handlers.load=zs,Os.handlers.beforeUnload=Gs,As()}static uninitializeHandlers(){Os.handlers={},Os.themeChangeHandler=null,Os.beforeUnloadHandler=null,Os.beforeSuspendOrTerminateHandler=null,Os.resumeHandler=null,Os.contextChangeHandler=null}}function Rs(){Os.initializeHandlers()}function Fs(){Os.uninitializeHandlers()}Os.handlers={},Os.themeChangeHandler=null,Os.loadHandler=null,Os.beforeUnloadHandler=null,Os.beforeSuspendOrTerminateHandler=null,Os.resumeHandler=null,Os.hostToAppPerformanceMetricsHandler=null,Os.contextChangeHandler=null;const ks=Ts.extend("callHandler");function Ms(e,t){const n=Os.handlers[e];if(n){ks("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return ec()?(sc(e,t),[!1,void 0]):(ks("Handler for action message %s not found.",e),[!1,void 0])}function xs(e,t,n,r=!0,o=[]){n?(Os.handlers[t]=n,r&&Nc(e,"registerHandler",[t,...o])):delete Os.handlers[t]}function Ns(e){delete Os.handlers[e]}function Us(e){return null!=Os.handlers[e]}function Ds(e,t,n,r,o){n&&Xr(dr,...r),o&&o(),xs(e,t,n)}function Ls(e,t){Os.themeChangeHandler=t,!po(t)&&Nc(e,"registerHandler",["themeChange"])}function Hs(e,t){Os.contextChangeHandler=t,!po(t)&&Nc(e,"registerHandler",["contextChange"])}function _s(e){Os.themeChangeHandler&&Os.themeChangeHandler(e),ec()&&sc("themeChange",[e])}function Vs(e){Os.contextChangeHandler&&Os.contextChangeHandler(e),ec()&&sc("contextChange",[e])}function Bs(e){Os.hostToAppPerformanceMetricsHandler=e}function js(e){Os.hostToAppPerformanceMetricsHandler&&Os.hostToAppPerformanceMetricsHandler(e)}function Ws(e,t){Os.loadHandler=t,!po(t)&&Nc(e,"registerHandler",["load"])}function zs(e){const t=qs(e);Os.resumeHandler?(Os.resumeHandler(t),ec()&&sc("load",[t])):Os.loadHandler&&(Os.loadHandler(e),ec()&&sc("load",[e]))}function qs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function $s(e,t){Os.beforeUnloadHandler=t,!po(t)&&Nc(e,"registerHandler",["beforeUnload"])}function Gs(){return Ps(this,void 0,void 0,function*(){const e=()=>{Nc(rr("v2","handleBeforeUnload"),"readyToUnload",[])};Os.beforeSuspendOrTerminateHandler?(yield Os.beforeSuspendOrTerminateHandler(),ec()?sc("beforeUnload"):e()):Os.beforeUnloadHandler&&Os.beforeUnloadHandler(e)||(ec()?sc("beforeUnload"):e())})}function Js(e){Os.beforeSuspendOrTerminateHandler=e,!po(e)&&Nc(rr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ks(e){Os.resumeHandler=e,!po(e)&&Nc(rr("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 Zs=nr("childProxyingCommunication");class Xs{}function Ys(){Xs.window=null,Xs.origin=null,Xs.messageQueue=[]}function ec(){return!!Rr()&&!!Xs.window}function tc(e,t){return!!Rr()&&(Xs.window&&!Xs.window.closed&&e!==Xs.window||(Xs.window=e,Xs.origin=t),Xs.window&&Xs.window.closed?(Xs.window=null,Xs.origin=null,!1):Xs.window===e)}function nc(e,t,n,r){return Qs(this,void 0,void 0,function*(){Xs.window===t&&(jr(Xs.window,Xs.origin,Xs.messageQueue,"child"),oc(e,n,r))})}Xs.messageQueue=[];const rc=Zs.extend("handleIncomingMessageFromChild");function oc(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Lr(e.data),[o,i]=Ms(r.func,r.args);if(o&&void 0!==i)return rc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Vr(r),r.func),void ac(r.id,r.uuid,Array.isArray(i)?i:[i]);rc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Vr(r),r.func),ic(r,t,n)}function ic(e,t,n){const r=t(rr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Xs.origin;n(r.uuid,(...t)=>{if(!Xs.window)return;if(!Mr().disableEnforceOriginMatchForChildResponses&&o!==Xs.origin)return void rc("Origin of child window has changed, not sending response back to child window");const n=t.pop();rc("Message from parent being relayed to child, id: %s",Vr(e)),ac(e.id,e.uuid,t,n)})}function ac(e,t,n,r){const o=Xs.window,i=cc(e,t,n,r),a=_r(i),s=Xs.origin;o&&s&&(rc("Sending message %s to %s via postMessage, args = %o",Vr(a),"child",a.args),o.postMessage(a,s))}function sc(e,t){const n=Xs.window,r=uc(e,t),o=Xs.origin;n&&o?n.postMessage(r,o):Xs.messageQueue.push(r)}function cc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function uc(e,t){return{func:e,args:t||[]}}class lc{static storeCallbackInformation(e,t){lc.callbackInformation.set(e,t)}static clearMessages(){lc.callbackInformation.clear()}static deleteMessageInformation(e){lc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?js({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=lc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(js({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),lc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}lc.callbackInformation=new Map;const dc=nr("nestedAppAuthUtils"),fc=dc.extend("tryPolyfillWithNestedAppAuthBridge"),pc="v2";function gc(e,t,n){var r;const o=fc;if(Zn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=mc(a,n);s&&(a.nestedAppAuthBridge=s)}const hc=dc.extend("createNestedAppAuthBridge");function mc(e,t){const n=hc;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=rr(pc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var vc=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const wc=nr("communication");class Cc{}class yc{}function Sc(e,t){if(yc.messageListener=e=>jc(e),Cc.currentWindow=Cc.currentWindow||Dn(),Cc.parentWindow=Cc.currentWindow.parent!==Cc.currentWindow.self?Cc.currentWindow.parent:Cc.currentWindow.opener,Cc.topWindow=Cc.currentWindow.top,(Cc.parentWindow||e)&&Cc.currentWindow.addEventListener("message",yc.messageListener,!1),!Cc.parentWindow){const e=Cc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Zn.isFramelessWindow=!0,e.onNativeMessage=Xc}try{return Cc.parentOrigin="*",Tc(t,"initialize",[Pr,sr,e]).then(([e,t,n,r])=>(gc(r,Cc.currentWindow,{onMessage:zc,sendPostMessage:Dc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{Cc.parentOrigin=null}}function bc(){Cc.currentWindow&&Cc.currentWindow.removeEventListener("message",yc.messageListener,!1),Cc.currentWindow=null,Cc.parentWindow=null,Cc.parentOrigin=null,yc.parentMessageQueue=[],yc.nextMessageId=0,yc.callbacks.clear(),yc.promiseCallbacks.clear(),yc.portCallbacks.clear(),yc.legacyMessageIdsToUuidMap={},lc.clearMessages(),Ys()}function Ec(e,t,...n){return Tc(e,t,n).then(([e])=>e)}function Ac(e,t,...n){return Tc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Ic(e,t,n,...r){return Tc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Pc(e,t,...n){return Tc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Tc(e,t,n=void 0){if(!or(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(xc(Vc(e,t,n).uuid))})}function Oc(e){return e.map(e=>Ir(e)?e.serialize():e)}function Rc(e,t,n,r,o){var i;return vc(this,void 0,void 0,function*(){const a=Oc(t),[s]=yield Tc(r,e,a);if(o&&o(s)||!o&&Je(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(`${Ve.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Fc(e,t,n,r){var o;return vc(this,void 0,void 0,function*(){const i=Oc(t),[a]=yield Tc(n,e,i);if(r&&r(a)||!r&&Je(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ve.INTERNAL_ERROR}, message: Invalid response from host`)})}function kc(e,t,n=void 0){if(!or(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 Mc(Vc(e,t,n).uuid)}function Mc(e){return new Promise((t,n)=>{yc.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 xc(e){return new Promise(t=>{yc.promiseCallbacks.set(e,t)})}function Nc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!or(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=Vc(e,t,o);r&&yc.callbacks.set(i.uuid,r)}yc.parentMessageQueue=[],yc.topMessageQueue=[],yc.nextMessageId=0,yc.callbacks=new Map,yc.promiseCallbacks=new Map,yc.portCallbacks=new Map,yc.legacyMessageIdsToUuidMap={};const Uc=wc.extend("sendNestedAuthRequestToTopWindow");function Dc(e,t){const n=Uc,r=Cc.topWindow,o=au(e,t);return n("Message %s information: %o",Vr(o),{actionName:o.func}),Hc(r,o)}const Lc=wc.extend("sendRequestToTargetWindowHelper");function Hc(e,t){const n=Lc,r=ru(e),o=Dr(t);if(Zn.isFramelessWindow)Cc.currentWindow&&Cc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Vr(o),r),Cc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=nu(e);e&&i?(n("Sending message %s to %s via postMessage",Vr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Vr(o),r),tu(e).push(t))}return t}const _c=wc.extend("sendMessageToParentHelper");function Vc(e,t,n,r,o){const i=_c,a=Cc.parentWindow,s=iu(e,t,n,r,o);return lc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Vr(s),{actionName:t,args:n}),Hc(a,s)}const Bc=wc.extend("processIncomingMessage");function jc(e){return vc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Bc("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 $c(t,n).then(r=>{r?(Gc(t,n),t!==Cc.parentWindow?tc(t,n)&&nc(e,t,Vc,(e,t)=>yc.callbacks.set(e,t)):Xc(e)):Bc("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 Wc=wc.extend("processAuthBridgeMessage");function zc(e,t){var n,r;const o=Wc;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?$c(c,u).then(e=>{e?(Cc.topWindow&&!Cc.topWindow.closed&&c!==Cc.topWindow||(Cc.topWindow=c,Cc.topOrigin=u),Cc.topWindow&&Cc.topWindow.closed&&(Cc.topWindow=null,Cc.topOrigin=null),jr(Cc.topWindow,Cc.topOrigin,yc.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")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const qc=wc.extend("verifyIncomingMessageOrigin");function $c(e,t){return vc(this,void 0,void 0,function*(){if(Cc.currentWindow&&e===Cc.currentWindow)return qc("Should not process message because it is coming from the current window"),!1;if(Cc.currentWindow&&Cc.currentWindow.location&&t&&t===Cc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return qc("Message has an invalid origin of %s",t),!1}const n=yield Oa(e);return n||qc("Message has an invalid origin of %s",t),n}})}function Gc(e,t){Zn.isFramelessWindow||Cc.parentWindow&&!Cc.parentWindow.closed&&e!==Cc.parentWindow||(Cc.parentWindow=e,Cc.parentOrigin=t),Cc.parentWindow&&Cc.parentWindow.closed&&(Cc.parentWindow=null,Cc.parentOrigin=null),jr(Cc.parentWindow,Cc.parentOrigin,yc.parentMessageQueue,"parent")}const Jc=wc.extend("handleIncomingMessageFromParent");function Kc(e){const t=Jc;if(!e.uuid)return yc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Qc(yc.callbacks,t);if(n)return n;const r=Qc(yc.promiseCallbacks,t);if(r)return r;const o=Qc(yc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Vr(e))}function Qc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Zc(e,t){const n=Qc(t,e.uuid);n&&t.delete(n),e.uuid?yc.legacyMessageIdsToUuidMap={}:delete yc.legacyMessageIdsToUuidMap[e.id]}function Xc(e){const t=Jc,n=$n();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Hr(r),i=Kc(o);if(i){const r=yc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),lc.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]),Yc(e)||(t("Removing registered callback for message %s",i.toString()),Zc(o,yc.callbacks)));const a=yc.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()),Zc(o,yc.promiseCallbacks));const s=yc.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()),Zc(o,yc.portCallbacks)}o.uuid&&(yc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;lc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Vr(r),r.func),Ms(r.func,r.args)}else t("Received an unknown message: %O",e)}function Yc(e){return!0===e.data.isPartialResponse}function eu(){return Cc.topWindow!==Cc.parentWindow}function tu(e){return e===Cc.topWindow&&eu()?yc.topMessageQueue:e===Cc.parentWindow?yc.parentMessageQueue:[]}function nu(e){return e===Cc.topWindow&&eu()?Cc.topOrigin:e===Cc.parentWindow?Cc.parentOrigin:null}function ru(e){return e===Cc.topWindow&&eu()?"top":e===Cc.parentWindow?"parent":null}function ou(e,t){let n;n=Cc.currentWindow.setInterval(()=>{0===tu(e).length&&(clearInterval(n),t())},100)}function iu(e,t,n,r,o){const i=yc.nextMessageId++,a=new Kn;yc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Zn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:$n(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function au(e,t){const n=yc.nextMessageId++,r=new Kn;return yc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:$n(),apiVersionTag:t,args:[],data:e}}const su="v1";function cu(e){if(!po(e)&&Xr(dr),!po(e)&&!uu())throw wn;e?xs(rr(su,"log.request"),"log.request",()=>{const t=e();Nc(rr(su,"log.receive"),"log.receive",[t])}):Ns("log.request")}function uu(){return!(!Xr(dr)||!dr.supports.logs)}var lu,du,fu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(lu||(lu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(du||(du={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(fu||(fu={}));const pu="v1";function gu(e,t){Xr(dr),Nc(rr(pu,"uploadCustomApp"),"uploadCustomApp",[e],t||En())}function hu(e,t,n){Xr(dr),Nc(rr(pu,"sendCustomMessage"),e,t,n)}function mu(e,t){if(Xr(dr),!ec())throw new Error("The child window has not yet been initialized or is not present");sc(e,t)}function vu(e,t){Xr(dr),xs(rr(pu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function wu(e,t){Xr(dr),xs(rr(pu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Cu(e){Xr(dr,fn.content,fn.sidePanel,fn.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,e.shareUrl,e.replyChainId];Nc(rr(pu,"openFilePreview"),"openFilePreview",t)}const yu="v1";function Su(e){if(Xr(dr,fn.content),!Iu())throw wn;return Fc("contextualSearch.openContextualSearch",[null==e?void 0:e.triggerSource],rr(yu,"contextualSearch.openContextualSearch"))}function bu(){if(Xr(dr,fn.content),!Iu())throw wn;return Fc("contextualSearch.closeContextualSearch",[],rr(yu,"contextualSearch.closeContextualSearch"))}function Eu(e){Ds(rr(yu,"contextualSearch.registerOpenContextualSearchHandler"),"contextualSearchOpened",e,[fn.content],()=>{if(!Iu())throw wn})}function Au(e){Ds(rr(yu,"contextualSearch.registerCloseContextualSearchHandler"),"contextualSearchClosed",e,[fn.content],()=>{if(!Iu())throw wn})}function Iu(){return Xr(dr)&&!!dr.supports.contextualSearch}const Pu="v1";function Tu(e){return new Promise(t=>{if(Xr(dr,fn.content),!Fu())throw wn;const n=Ac(rr(Pu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&xs(rr(Pu,"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&&xs(rr(Pu,"conversations.registerCloseConversationHandler"),"closeConversation",(t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})}),t(n)})}function Ou(){if(Xr(dr,fn.content),!Fu())throw wn;Nc(rr(Pu,"conversations.closeConversation"),"conversations.closeConversation"),Ns("startConversation"),Ns("closeConversation")}function Ru(){return new Promise(e=>{if(Xr(dr),!Fu())throw wn;e(Ec(rr(Pu,"conversations.getChatMember"),"getChatMembers"))})}function Fu(){return!(!Xr(dr)||!dr.supports.conversations)}var ku=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Mu="v2",xu=nr("copilot");function Nu(){var e;return Xr(dr)&&!!(null===(e=dr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Uu(e,t){var n;return void 0===t&&(t=null!==(n=$n())&&void 0!==n?n:Date.now()),ku(this,void 0,void 0,function*(){return Xr(dr),xu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Fc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],rr(Mu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Du=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 Lu="v2",Hu=nr("copilot");function _u(){var e,t;return Xr(dr)&&(!!(null===(e=dr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=dr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Vu(e){var t,n,r;return Du(this,void 0,void 0,function*(){if(Xr(dr),!_u())throw new Error(`Error code: ${wn.errorCode}, message: Not supported on platform`);if((null===(t=dr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Hu("Eligibility information is already available on runtime."),dr.hostVersionsInfo.appEligibilityInformation;Hu("Eligibility information is not available on runtime. Requesting from host.");const o=yield Ec(rr(Lu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Je(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(!Bu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=ze.NotAdult),o})}function Bu(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 ju,Wu,zu,qu,$u,Gu,Ju,Ku,Qu;!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"}(ju||(ju={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Wu||(Wu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(zu||(zu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(qu||(qu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}($u||($u={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Gu||(Gu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Ju||(Ju={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Ku||(Ku={})),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"}(Qu||(Qu={}));class Zu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Xu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Yu="v2";function el(){var e;return Xr(dr)&&!!(null===(e=dr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function tl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Qu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Je(e)}function nl(e){return Xu(this,void 0,void 0,function*(){Xr(dr);return Rc("copilot.sidePanel.getContent",e?[new cl(e)]:[],new al,rr(Yu,"copilot.sidePanel.getContent"),tl)})}function rl(e){return Xu(this,void 0,void 0,function*(){Xr(dr);return Rc("copilot.sidePanel.preCheckUserConsent",e?[new ul(e)]:[],new sl,rr(Yu,"copilot.sidePanel.preCheckUserConsent"),tl)})}function ol(e){Ds(rr(Yu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[fn.content],()=>{if(!el())throw il})}const il=new Zu(Qu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class al extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class sl extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class cl{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class ul{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var ll=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const dl="v2";function fl(){var e;return Xr(dr)&&!!(null===(e=dr.supports.copilot)||void 0===e?void 0:e.view)}function pl(){return ll(this,void 0,void 0,function*(){Xr(dr),yield Rc("copilot.view.closeSidePanel",[],new gl,rr(dl,"copilot.view.closeSidePanel"))})}class gl extends na{validate(e){return!0}deserialize(e){return e}}const hl="v2";class ml{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function vl(e){const t=e;return t.responseType===yl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const wl="Action.Execute";var Cl,yl,Sl,bl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Cl||(Cl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(yl||(yl={}));class El extends na{validate(e){return vl(e)}deserialize(e){return e}}function Al(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Sl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Il(e){e.requestType===Cl.ActionExecuteInvokeRequest?Pl(e):e.requestType===Cl.QueryMessageExtensionRequest&&Tl(e)}function Pl(e){if(e.type!==wl){throw{errorCode:Sl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${wl}"`}}if(!Gn(e.data)){throw{errorCode:Sl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Tl(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 Ol(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;const r=new fo(e);return Il(n),Tc(rr(hl,"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 Rl(e,t){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;const n=new fo(e);return Tc(rr(hl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function Fl(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;const r=new fo(e);return Il(n),Tc(rr(hl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function kl(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e,new Error("titleId is Invalid.")),Hn(t,new Error("oauthConfigId is Invalid.")),Tc(rr(hl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function Ml(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e,new Error("titleId is Invalid.")),t&&_n(t),Tc(rr(hl,"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"}(Sl||(Sl={}));class xl{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 Nl(e){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e.connectorId,new Error("connectorId is Invalid.")),Hn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Fc("externalAppAuthentication.authenticateWithConnector",[new xl(e)],rr(hl,"externalAppAuthentication.authenticateWithConnector"),Al)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(bl||(bl={}));class Ul extends na{validate(e){return"string"==typeof e&&e in bl}deserialize(e){return e}}function Dl(e){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e.connectorId,new Error("connectorId is Invalid.")),Hn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Rc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new xl(e)],new Ul,rr(hl,"externalAppAuthentication.getUserAuthenticationStateForConnector"),Al)}function Ll(e){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e.connectorId,new Error("connectorId is Invalid.")),Hn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Fc("externalAppAuthentication.disconnectConnector",[new xl(e)],rr(hl,"externalAppAuthentication.disconnectConnector"),Al)}function Hl(){return!(!Xr(dr)||!dr.supports.externalAppAuthentication)}var _l=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Vl="v2";function Bl(e,t,n){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Fc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],rr(Vl,"externalAppAuthenticationForCEA.authenticateWithSSO"),Al)})}function jl(e,t,n){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Fc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],rr(Vl,"externalAppAuthenticationForCEA.authenticateWithOauth"),Al)})}function Wl(e,t,n,r){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Pl(r),Rc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new ml(r),n.url.href,n.width,n.height,n.isExternal],new El,rr(Vl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Al)})}function zl(e,t,n,r){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Pl(r),Rc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new ml(r),n.authId,n.connectionName,n.claims,n.silent],new El,rr(Vl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Al)})}function ql(){return!(!Xr(dr)||!dr.supports.externalAppAuthenticationForCEA)}function $l(e,t){Hn(t,new Error("conversation id is not valid.")),uo(e)}const Gl="v2";var Jl,Kl;function Ql(e,t){if(Xr(dr,fn.content,fn.sidePanel),!Xl())throw wn;const n=new fo(e);return Tc(rr(Gl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Zl(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Xl())throw wn;const r=new fo(e);return Tc(rr(Gl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Xl(){return!(!Xr(dr)||!dr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Jl||(Jl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Kl||(Kl={}));var Yl=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 ed="v2";function td(e,t,n){return Yl(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!rd())throw wn;$l(e,t);const[r,o]=yield Tc(rr(ed,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function nd(e,t,n){return Yl(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!rd())throw wn;$l(e,t);const r=yield Ec(rr(ed,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function rd(){return!(!Xr(dr)||!dr.supports.externalAppCardActionsForCEA)}var od;function id(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(od).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(od||(od={}));var ad=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 sd="v2";function cd(e,t,n){return ad(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ud())throw wn;return ld(e,n),Fc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new dd(t),n],rr(sd,"externalAppCardActionsForDA.processActionOpenUrlDialog"),id)})}function ud(){return!(!Xr(dr)||!dr.supports.externalAppCardActionsForDA)}function ld(e,t){uo(e),Qn(t)}class dd{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var fd=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 pd="v2";function gd(e,t,n){return fd(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!hd())throw wn;const r=new fo(e),[o,i]=yield Tc(rr(pd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function hd(){return!(!Xr(dr)||!dr.supports.externalAppCommands)}const md="v1";var vd,wd,Cd,yd,Sd,bd;function Ed(e,t){if(Xr(dr,fn.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");Nc(rr(md,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ad(e,t){if(Xr(dr,fn.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");Nc(rr(md,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Id(e,t,n){if(Xr(dr,fn.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");Nc(rr(md,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Pd(e,t,n){if(Xr(dr,fn.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");Nc(rr(md,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Td(e,t,n){if(Xr(dr,fn.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");Nc(rr(md,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Od(e=!1,t){if(Xr(dr,fn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Nc(rr(md,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Rd(e,t,n,r,o=!1,i){if(Xr(dr,fn.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");Nc(rr(md,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Fd(e){if(Xr(dr,fn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Nc(rr(md,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function kd(e=void 0,t){if(Xr(dr,fn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Nc(rr(md,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Md(e){if(Xr(dr,fn.content),!e)throw Bd(Ve.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Nc(rr(md,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function xd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Bd(Ve.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Nc(rr(md,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Nd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Bd(Ve.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Nc(rr(md,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ud(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Bd(Ve.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Nc(rr(md,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Dd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bd(Ve.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Nc(rr(md,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Ld(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bd(Ve.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Nc(rr(md,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Hd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bd(Ve.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Bd(Ve.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Nc(rr(md,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function _d(e){if(Xr(dr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");xs(rr(md,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Vd(e){if(Xr(dr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");xs(rr(md,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Bd(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"}(vd||(vd={})),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"}(wd||(wd={})),function(e){e.ClassMaterials="classMaterials"}(Cd||(Cd={})),function(e){e.Readonly="readonly"}(yd||(yd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Sd||(Sd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(bd||(bd={}));const jd="v1";function Wd(){return new Promise(e=>{if(Xr(dr),!Gd())throw wn;e(Pc(rr(jd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function zd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Xr(dr),!Gd())throw wn;t(Pc(rr(jd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function qd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Xr(dr),!Gd())throw wn;xs(rr(jd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Xr(dr),e(t)})}function $d(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Xr(dr),!Gd())throw wn;xs(rr(jd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Xr(dr),e(t)})}function Gd(){return!(!Xr(dr)||!dr.supports.meetingRoom)}function Jd(){return!(!Xr(dr)||!dr.supports.messageChannels)}const Kd="1.0.1",Qd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void of("Invalid message format, ignoring. Message: %o",e);if(!tf(e.source,e.origin))return void of("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return af("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void of("Invalid response format, ignoring. Message: %o",e);t(r)}};let Zd=null,Xd=!1;function Yd(e,t,n=!1){if(Xd=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.`);Zd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void of("Nested App Auth Bridge is already present");const o=ef(r);o&&(r.nestedAppAuthBridge=o)}function ef(e){const t=new WeakMap,{onMessage:n}=Qd,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 of(`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=nf(t);if(e===e.top||!Zd)return void af("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Zd)}}catch(e){return void af("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 tf(e,t){if(t===Zd)try{return"https:"===new URL(t).protocol}catch(e){return af("Invalid message origin URL:",e),!1}return!1}function nf(e){const t=Date.now();return{id:rf(),uuid:sn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function rf(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function of(...e){Xd&&console.log(...e)}function af(...e){Xd&&console.error(...e)}const sf="v1";function cf(e){if(Xr(dr,fn.content),!uf())throw wn;Nc(rr(sf,"notifications.showNotification"),"notifications.showNotification",[e])}function uf(){return!(!Xr(dr)||!dr.supports.notifications)}const lf="v2";function df(e){if(!gf())throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());if(po(e))throw new Error(Ve.INVALID_ARGUMENTS.toString());xs(rr(lf,"otherApp.install"),"otherApp.install",e)}function ff(){if(!gf())throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());Nc(rr(lf,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ns("otherApp.install")}function pf(e){if(!gf())throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());return Fc("otherApp.notifyInstallCompleted",[e.toString()],rr(lf,"otherApp.notifyInstallCompleted"))}function gf(){return!(!Xr(dr)||!dr.supports.otherAppStateChange)}var hf=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const mf="v2";function vf(){return Xr(dr)&&!!dr.supports.plugins}function wf(e){return hf(this,void 0,void 0,function*(){if(Xr(dr),!e.func)throw new Error("func is required in PluginMessage.");return Fc("plugins.sendMessage",[new yf(e)],rr(mf,"plugins.sendMessage"))})}function Cf(e){Ds(rr(mf,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(Sf(t))},Object.values(fn),()=>{if(!vf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class yf{constructor(e){this.message=e}serialize(){return this.message}}function Sf(e){if(1===e.length&&bf(e[0]))return e[0];const[t,n,r]=e;return{func:"string"==typeof t?t:String(null!=t?t:""),args:n,correlationId:"string"==typeof r?r:void 0}}function bf(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const Ef="v1";var Af,If,Pf;function Tf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Of(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(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Rf(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(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Ff(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function kf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Mf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function xf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Nf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Uf(){return!(!Xr(dr)||!dr.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"}(Af||(Af={})),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"}(If||(If={})),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"}(Pf||(Pf={}));const Df="v1";function Lf(e,t,n,r){if(Xr(dr,fn.content),!Hf())throw wn;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");Nc(rr(Df,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Hf(){return!(!Xr(dr)||!dr.supports.appEntity)}const _f="v1";function Vf(e){return new Promise(t=>{if(Xr(dr),!Bf())throw wn;if((Zn.hostClientType===ln.android||Zn.hostClientType===ln.teamsRoomsAndroid||Zn.hostClientType===ln.teamsPhones||Zn.hostClientType===ln.teamsDisplays)&&!Yr(et)){const e={errorCode:Ve.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ec(rr(_f,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function Bf(){return!(!Xr(dr)||!dr.supports.teams)&&(!!dr.supports.teams.fullTrust&&!!dr.supports.teams.fullTrust.joinedTeams)}var jf=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 Wf="v1";function zf(e){return jf(this,void 0,void 0,function*(){if(Xr(dr),!qf())throw wn;return Rc("getConfigSetting",[e],new ra,rr(Wf,"teams.fullTrust.getConfigSetting"))})}function qf(){return!(!Xr(dr)||!dr.supports.teams)&&!!dr.supports.teams.fullTrust}const $f="v1";var Gf;function Jf(e,t){if(Xr(dr,fn.content),!Qf())throw wn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Nc(rr($f,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Kf(e,t){if(Xr(dr),!Qf())throw wn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Nc(rr($f,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Qf(){return!(!Xr(dr)||!dr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Gf||(Gf={}));class Zf{static setTimeout(e,t){const n=performance.now(),r=In();return Zf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Zf.setTimeoutCallbacks[e]}static setInterval(e,t){Zf.setTimeout(function n(){e(),Zf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Zf.setTimeoutCallbacks){const r=Zf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Zf.setTimeoutCallbacks[e].callback(),delete Zf.setTimeoutCallbacks[e]}}}Zf.setTimeoutCallbacks={};class Xf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Zf.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&&Zf.clearTimeout(this.timeoutId),this.timeoutId=Zf.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 Yf="v2";class ep{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Xf(ep.distributionBinSize,e=>this.reportPerformanceEvent(rr(Yf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Zf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(rr(Yf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},ep.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){Zf.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(rr(Yf,"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(rr(Yf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ep.distributionBinSize=1e3,ep.calculateFPSInterval=1e3;var tp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})},np=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 rp="v2",op=Ln()?void 0:new ep(Nc);var ip,ap,sp;function cp(e){if(Xr(dr,fn.sidePanel),!pp())throw wn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(xs(rr(rp,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==op?void 0:op.setFrameProcessTimeLimit(e.timeLimit),!1),wp())gp(e.videoFrameHandler,e.config);else{if(!yp())throw wn;mp(e.videoBufferHandler,e.config)}null==op||op.startMonitorSlowFrameProcessing()}function up(e,t){if(Xr(dr,fn.sidePanel),!pp())throw wn;Nc(rr(rp,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function lp(e){if(Xr(dr,fn.sidePanel),!pp())throw wn;xs(rr(rp,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Mp(e,op),!1),Nc(rr(rp,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function dp(e){Nc(rr(rp,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function fp(e){Nc(rr(rp,"videoEffects.notifyError"),"video.notifyError",[e])}function pp(){return Xr(dr)&&!!dr.supports.video&&(!!dr.supports.video.mediaStream||!!dr.supports.video.sharedFrame)}function gp(e,t){if(Xr(dr,fn.sidePanel),!pp()||!wp())throw wn;xs(rr(rp,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>tp(this,void 0,void 0,function*(){const{streamId:n}=t,r=hp(e,op);yield Ep(n,r,fp,op)}),!1),Nc(rr(rp,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function hp(e,t){return n=>tp(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 mp(e,t){if(Xr(dr,fn.sidePanel),!pp()||!yp())throw wn;xs(rr(rp,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==op||op.reportStartFrameProcessing(t.width,t.height),e(vp(t),()=>{null==op||op.reportFrameProcessed(),dp(n)},fp)}},!1),Nc(rr(rp,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function vp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=np(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function wp(){var e;return Xr(dr,fn.sidePanel)&&Cp()&&!!(null===(e=dr.supports.video)||void 0===e?void 0:e.mediaStream)}function Cp(){var e,t,n,r;return!(!(null===(t=null===(e=Dn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Dn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function yp(){var e;return Xr(dr,fn.sidePanel)&&!!(null===(e=dr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(ip||(ip={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(ap||(ap={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(sp||(sp={}));var Sp=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 bp="v2";function Ep(e,t,n,r){var o,i;return Sp(this,void 0,void 0,function*(){const a=Pp();!Ln()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Tp(yield Ip(e,n,r),new Op(n,t),a.writable)})}function Ap(e,t,n,r){var o,i;return Sp(this,void 0,void 0,function*(){const a=Pp();!Ln()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Tp(yield Ip(e,n,r),new kp(n,t),a.writable)})}function Ip(e,t,n){return Sp(this,void 0,void 0,function*(){if(Ln())throw wn;const r=Dn().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 Pp(){if(Ln())throw wn;const e=window.MediaStreamTrackGenerator;if(!e)throw wn;return new e({kind:"video"})}function Tp(e,t,n){new(0,Dn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Op{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Sp(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 Rp{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 Fp{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 kp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Sp(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=>Sp(this,void 0,void 0,function*(){if(Ln())throw wn;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 Rp(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 Fp(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}}}),xs(rr(bp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function Mp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Nc(rr(bp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in sp?e:sp.InitializationFailure;Nc(rr(bp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var xp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Np="v2",Up=2e3,Dp=Ln()?void 0:new ep(Nc);var Lp;function Hp(e){var t,n;if(!qp())throw wn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Xr(dr,fn.sidePanel)){if(xs(rr(Np,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Dp?void 0:Dp.setFrameProcessTimeLimit(e),!1),null===(t=dr.supports.video)||void 0===t?void 0:t.mediaStream)xs(rr(Np,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>xp(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Dp?Vp(e.videoFrameHandler,Dp):e.videoFrameHandler;r?yield Ap(n,o,Gp,Dp):yield Ep(n,o,Gp,Dp)}),!1),Nc(rr(Np,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=dr.supports.video)||void 0===n?void 0:n.sharedFrame))throw wn;xs(rr(Np,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Dp||Dp.reportStartFrameProcessing(t.width,t.height);const n=_p(),r=t.timestamp;e.videoBufferHandler(Bp(t),()=>{n(),null==Dp||Dp.reportFrameProcessed(),$p(r)},Gp)}},!1),Nc(rr(Np,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Dp||Dp.startMonitorSlowFrameProcessing()}}function _p(){const e=setTimeout(()=>{Gp(`Frame not processed in ${Up}ms`,Lp.Warn)},Up);return function(){clearTimeout(e)}}function Vp(e,t){return n=>xp(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=_p(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function Bp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function jp(e,t,n){if(Xr(dr,fn.sidePanel),!qp())throw wn;Nc(rr(Np,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Wp(e){if(Xr(dr,fn.sidePanel),!qp())throw wn;xs(rr(Np,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Mp(e,Dp),!1),Nc(rr(Np,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function zp(e){if(Xr(dr,fn.sidePanel),!pp())throw wn;Nc(rr(Np,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function qp(){return Xr(dr),pp()}function $p(e){Nc(rr(Np,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Gp(e,t=Lp.Warn){Nc(rr(Np,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Jp(e){if(Xr(dr),!pp())throw wn;Gp(e,Lp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Lp||(Lp={}));const Kp="v2";class Qp extends na{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Zp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Xp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Yp extends na{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class eg{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class tg extends na{validate(e){const t=new Yp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function ng(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(cg(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ve.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Rc("hostEntity.tab.addAndConfigure",[new Xp(e),t],new Yp,rr(Kp,"hostEntity.tab.addAndConfigure"))}function rg(e){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return cg(e.threadId),Rc("hostEntity.tab.getAll",[new Xp(e)],new tg,rr(Kp,"hostEntity.tab.getAll"))}function og(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(e),cg(t.threadId),Rc("hostEntity.tab.reconfigure",[new Zp(e),new Xp(t)],new Qp,rr(Kp,"hostEntity.tab.reconfigure"))}function ig(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(e),cg(t.threadId),Rc("hostEntity.tab.rename",[new Zp(e),new Xp(t)],new Qp,rr(Kp,"hostEntity.tab.rename"))}function ag(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return cg(t.threadId),ug(e),Rc("hostEntity.tab.remove",[new eg(e),new Xp(t)],new ra,rr(Kp,"hostEntity.tab.remove"))}function sg(){var e;return!!(Xr(dr)&&dg()&&(null===(e=dr.supports.hostEntity)||void 0===e?void 0:e.tab))}function cg(e){if(!e||0==e.length)throw new Error(`Error code: ${Ve.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function ug(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ve.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var lg;function dg(){return!(!Xr(dr)||!dr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(lg||(lg={}));var fg=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 pg="v2",gg="Invalid store dialog size",hg="No App Id present, but AppId needed to open AppDetail store",mg="No Collection Id present, but CollectionId needed to open a store specific to a collection";function vg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t}=null!=e?e:{};return Fc("store.openFullStore",[Eg(t)],rr(pg,"store.openFullStore"))})}function wg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t,appId:n}=e;if(!(n instanceof fo))throw new Error(hg);return Fc("store.openAppDetail",[Eg(t),n],rr(pg,"store.openAppDetail"))})}function Cg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Fc("store.openInContextStore",[Eg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],rr(pg,"store.openInContextStore"))})}function yg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(mg);return Fc("store.openSpecificStore",[Eg(t),n],rr(pg,"store.openSpecificStore"))})}function Sg(){return Xr(dr)&&!!dr.supports.store}function bg(){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!Sg())throw wn}function Eg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(gg);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(gg);return JSON.stringify(e)}var Ag=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 Ig="v1",Pg=nr("widgetHosting");function Tg(){return Xr(dr)&&!!dr.supports.widgetHosting}function Og(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Rc("widgetHosting.callTool",[new _g(e,t)],new Lg,rr(Ig,"widgetHosting.callTool"),Je)})}function Rg(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Fc("widgetHosting.sendFollowUpMessage",[new Vg(e,t)],rr(Ig,"widgetHosting.sendFollowUpMessage"))})}function Fg(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Fc("widgetHosting.requestDisplayMode",[new Bg(e,t)],rr(Ig,"widgetHosting.requestDisplayMode"))})}function kg(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Rc("widgetHosting.requestModal",[new qg(e,t)],new Hg,rr(Ig,"widgetHosting.requestModal"),Je)})}function Mg(e,t){Zr(),Pg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Fc("widgetHosting.notifyIntrinsicHeight",[new zg(e,t)],rr(Ig,"widgetHosting.notifyIntrinsicHeight"))}function xg(e,t,n){Zr(),Pg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Fc("widgetHosting.contentSizeChanged",[new $g(e,t,n)],rr(Ig,"widgetHosting.contentSizeChanged"))}function Ng(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Fc("widgetHosting.setWidgetState",[new Wg(e,t)],rr(Ig,"widgetHosting.setWidgetState"))})}function Ug(e,t){Zr(),Pg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Fc("widgetHosting.openExternal",[new jg(e,t)],rr(Ig,"widgetHosting.openExternal"))}function Dg(e){Ds(rr(Ig,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!Tg())throw new Error("Widget Hosting is not supported on this platform")})}class Lg extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Hg extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class _g{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Vg{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 jg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Wg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class zg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class qg{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 $g{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 Gg=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 Jg="v1",Kg="v2";let Qg;function Zg(e){Qg=e}function Xg(e){const t=void 0!==e,n=t?e:Qg;if(!n)throw new Error("No parameters are provided for authentication");Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.remove,fn.task,fn.stage,fn.meetingStage);return Yg(n.successCallback||n.failureCallback?rr(Jg,"authentication.authenticate"):rr(Kg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Qg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Qg=void 0)}})}function Yg(e,t){return Gg(this,void 0,void 0,function*(){const n=Vn(t.url);return _n(n),Tc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function eh(e){Zr();return th(e&&(e.successCallback||e.failureCallback)?rr(Jg,"authentication.getAuthToken"):rr(Kg,"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 th(e,t){return new Promise(n=>{n(Tc(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 nh(e){Zr();return rh(e&&(e.successCallback||e.failureCallback)?rr(Jg,"authentication.getUser"):rr(Kg,"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 rh(e){return new Promise(t=>{t(Tc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function oh(e,t){Xr(dr,fn.authentication);Nc(rr(t?Jg:Kg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),ou(Cc.parentWindow,()=>setTimeout(()=>Cc.currentWindow.close(),200))}function ih(e,t){Xr(dr,fn.authentication);Nc(rr(t?Jg:Kg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),ou(Cc.parentWindow,()=>setTimeout(()=>Cc.currentWindow.close(),200))}var ah;function sh(){return Xr(dr)&&!!dr.supports.appPerformanceMetrics}function ch(e){Xr(dr),xs(rr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function uh(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"}(ah||(ah={}));class lh{constructor(e){this.val=e,uh(e)}toString(){return this.val}}const dh="/l/app/",fh="/l/meeting/new",ph="attendees",gh="startTime",hh="endTime",mh="subject",vh="content",wh="/l/call/0/0",Ch="source",yh="withVideo",Sh="/l/chat/0/0",bh="users",Eh="topicName",Ah="message";function Ih(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${bh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Eh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Ah}=${encodeURIComponent(n)}`;return`${ut}://${lt}${Sh}?${r}${o}${i}`}function Ph(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${bh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${yh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Ch}=${encodeURIComponent(n)}`;return`${ut}://${lt}${wh}?${r}${o}${i}`}function Th(e,t,n,r,o){const i=void 0===e?"":`${ph}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${gh}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${hh}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${mh}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${vh}=${encodeURIComponent(o)}`;return`${ut}://${lt}${fh}?${i}${a}${s}${c}${u}`}function Oh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${ut}://${lt}${dh}${encodeURIComponent(e)}`}const Rh="v1";function Fh(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!kh())throw new Error("Not supported");const n=rr(Rh,"appInstallDialog.openAppInstallDialog");dr.isLegacyTeams?t(Ac(n,"executeDeepLink",Oh(e.appId))):(Nc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function kh(){return!(!Xr(dr)||!dr.supports.appInstallDialog)}const Mh="v1",xh=nr("media");var Nh,Uh,Dh,Lh,Hh,_h,Vh;!function(e){e.Base64="base64",e.ID="id"}(Nh||(Nh={}));class Bh{}function jh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Zn.isFramelessWindow){return void e({errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Yr(rt)){return void e({errorCode:Ve.OLD_PLATFORM},[])}Nc(rr(Mh,"media.captureImage"),"captureImage",e)}function Wh(){if(Xr(dr,fn.content,fn.task),!qh())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(Mh,"media.hasPermission"),"permissions.has",e))})}function zh(){if(Xr(dr,fn.content,fn.task),!qh())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(Mh,"media.requestPermission"),"permissions.request",e))})}function qh(){return!(!Xr(dr)||!dr.supports.permissions)}class $h 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(Xr(dr,fn.content,fn.task),!Yr(ot)){return void e({errorCode:Ve.OLD_PLATFORM},new Blob)}if(!am(this.mimeType,this.format,this.content)){return void e({errorCode:Ve.INVALID_ARGUMENTS},new Blob)}Yr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Nc(rr(Mh,"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=Yh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):xh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ve.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=In(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!po(e)&&Nc(rr(Mh,"media.getMedia"),"getMedia",r),xs(rr(Mh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ns("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),Ns("getMedia"+t)}else{const e=Yh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ve.INTERNAL_ERROR,message:"data received is null"},new Blob),Ns("getMedia"+t)}})}}class Gh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Xr(dr,fn.content,fn.task);try{to(Xe)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Nc(rr(Mh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Uh.StopRecording,e)}}class Jh extends Gh{getMediaType(){return Hh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Uh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Kh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(ot)){const e={errorCode:Ve.OLD_PLATFORM};return void t(e,[])}try{em(e)}catch(e){return void t(e,[])}if(!nm(e)){const e={errorCode:Ve.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Nc(rr(Mh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(tm(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 $h(e));t(n,s)})}function Qh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(ot)){return void t({errorCode:Ve.OLD_PLATFORM})}if(!sm(e)){return void t({errorCode:Ve.INVALID_ARGUMENTS})}const n=[e];Nc(rr(Mh,"media.viewImages"),"viewImages",n,t)}function Zh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Xr(dr,fn.content,fn.task),Zn.hostClientType===ln.desktop||Zn.hostClientType===ln.web||Zn.hostClientType===ln.rigel||Zn.hostClientType===ln.teamsRoomsWindows||Zn.hostClientType===ln.teamsRoomsAndroid||Zn.hostClientType===ln.teamsPhones||Zn.hostClientType===ln.teamsDisplays){return void e({errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Yr(it)){return void e({errorCode:Ve.OLD_PLATFORM},"")}if(!cm(t)){return void e({errorCode:Ve.INVALID_ARGUMENTS},"")}Nc(rr(Mh,"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 Yh(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 em(e){om(e)?to(Ze):im(e)?to(Xe):rm(e)&&to(Ye)}function tm(e){return!(e.mediaType!=Hh.Video||!e.videoProps||!e.videoProps.videoController)}function nm(e){return!(null==e||e.maxMediaCount>10)}function rm(e){var t;return!((null==e?void 0:e.mediaType)!=Hh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function om(e){return!(!e||e.mediaType!=Hh.VideoAndImage&&!e.videoAndImageProps)}function im(e){return!(!e||e.mediaType!=Hh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function am(e,t,n){return null!=e&&null!=t&&t==Nh.ID&&null!=n}function sm(e){return!(null==e||e.length<=0||e.length>10)}function cm(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function um(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"}(Uh||(Uh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Dh||(Dh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Lh||(Lh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Hh||(Hh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(_h||(_h={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Vh||(Vh={}));const lm="v2";function dm(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.task),!gm())throw wn;if(!cm(e))throw{errorCode:Ve.INVALID_ARGUMENTS};t(Pc(rr(lm,"barCode.scanBarCode"),"media.scanBarCode",e))})}function fm(){if(Xr(dr,fn.content,fn.task),!gm())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(lm,"barCode.hasPermission"),"permissions.has",e))})}function pm(){if(Xr(dr,fn.content,fn.task),!gm())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(lm,"barCode.requestPermission"),"permissions.request",e))})}function gm(){return!!(Xr(dr)&&dr.supports.barCode&&dr.supports.permissions)}const hm="v2";function mm(e){return vm(rr(hm,"chat.openChat"),e)}function vm(e,t){return new Promise(n=>{if(Xr(dr,fn.content,fn.task),!Cm())throw wn;if(dr.isLegacyTeams)n(Ac(e,"executeDeepLink",Ih([t.user],void 0,t.message)));else{n(Ac(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function wm(e){const t=rr(hm,"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(vm(t,r))}else{if(Xr(dr,fn.content,fn.task),!Cm())throw wn;if(dr.isLegacyTeams)n(Ac(t,"executeDeepLink",Ih(e.users,e.topic,e.message)));else{n(Ac(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function Cm(){return!(!Xr(dr)||!dr.supports.chat)}var ym=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";function bm(e){return ym(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.meetingStage,fn.task,fn.settings,fn.stage,fn.sidePanel),!Am())throw wn;if(!e.type||!Object.values($e).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values($e)}`);const t=yield Un(e),n={mimeType:e.type,content:t};return Pc(rr(Sm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function Em(){return ym(this,void 0,void 0,function*(){Xr(dr,fn.content,fn.meetingStage,fn.task,fn.settings,fn.stage,fn.sidePanel);const e=rr(Sm,"clipboard.read");if(!Am())throw wn;const t=yield Pc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Nn(e.mimeType,e.content)}return t})}function Am(){return Zn.isFramelessWindow?!(!Xr(dr)||!dr.supports.clipboard):!!(Xr(dr)&&navigator&&navigator.clipboard&&dr.supports.clipboard)}var Im=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 Pm="v2",Tm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Om;function Rm(){var e;return null!==(e=Xr(dr)&&(dr.isNAAChannelRecommended||Nm()))&&void 0!==e&&e}function Fm(){return Xr(dr),Cc.parentOrigin}function km(){var e;return null!==(e=Xr(dr)&&dr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Mm(){var e;return null!==(e=Xr(dr)&&(dr.isDeeplyNestedAuthSupported||xm()))&&void 0!==e&&e}function xm(){return!!(Xr(dr)&&Um()&&dr.isLegacyTeams&&Yr(wr))}function Nm(){return!!(Xr(dr)&&Um()&&dr.isLegacyTeams&&dr.supports.nestedAppAuth)}function Um(){return Zn.hostClientType===ln.android||Zn.hostClientType===ln.ios||Zn.hostClientType===ln.ipados||Zn.hostClientType===ln.visionOS}function Dm(e){return Im(this,void 0,void 0,function*(){if(!km())throw wn;const t=e.map(_m);return Hm(Om.ADD,t)})}function Lm(e){return Im(this,void 0,void 0,function*(){if(!km())throw wn;const t=e.map(_m);return Hm(Om.DELETE,t)})}function Hm(e,t){return Im(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 Rc("nestedAppAuth.manageNAATrustedOrigins",[new Vm(e,t)],Tm,rr(Pm,"nestedAppAuth.manageNAATrustedOrigins"))})}function _m(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"}(Om||(Om={}));class Vm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Bm="v2";function jm(){if(Xr(dr,fn.content,fn.task),!zm())throw wn;return Pc(rr(Bm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Wm(e){if(Xr(dr,fn.content,fn.task),!zm())throw wn;if(!e)throw{errorCode:Ve.INVALID_ARGUMENTS};return Pc(rr(Bm,"geoLocation.showLocation"),"location.showLocation",e)}function zm(){return!!(Xr(dr)&&dr.supports.geoLocation&&dr.supports.geoLocation.map&&dr.supports.permissions)}const qm="v2";function $m(){if(Xr(dr,fn.content,fn.task),!Km())throw wn;return Pc(rr(qm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Gm(){if(Xr(dr,fn.content,fn.task),!Km())throw wn;const e=Be.GeoLocation;return new Promise(t=>{t(Pc(rr(qm,"geoLocation.hasPermission"),"permissions.has",e))})}function Jm(){if(Xr(dr,fn.content,fn.task),!Km())throw wn;const e=Be.GeoLocation;return new Promise(t=>{t(Pc(rr(qm,"geoLocation.requestPermission"),"permissions.request",e))})}function Km(){return!!(Xr(dr)&&dr.supports.geoLocation&&dr.supports.permissions)}function Qm(){return dr.hostVersionsInfo?dr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Zm="v1";class Xm{postMessage(e,t){Xr(dr),Nc(rr(Zm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||En())}addEventListener(e,t){Xr(dr),"message"===e&&xs(rr(Zm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Ym{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Xr(dr,fn.task),Nc(rr(Zm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||En())}addEventListener(e,t){Xr(dr,fn.task),"message"===e&&xs(rr(Zm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ev="v2";function tv(e){if(Xr(dr,fn.content),!nv())throw wn;if(!e||!xn(e))throw{errorCode:Ve.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Pc(rr(ev,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function nv(){return!(!Xr(dr)||!dr.supports.secondaryBrowser)}const rv="v1";function ov(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(tt))throw{errorCode:Ve.OLD_PLATFORM};if(!e)throw{errorCode:Ve.INVALID_ARGUMENTS};if(!av())throw wn;Nc(rr(rv,"location.getLocation"),"location.getLocation",[e],t)}function iv(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(tt))throw{errorCode:Ve.OLD_PLATFORM};if(!e)throw{errorCode:Ve.INVALID_ARGUMENTS};if(!av())throw wn;Nc(rr(rv,"location.showLocation"),"location.showLocation",[e],t)}function av(){return!(!Xr(dr)||!dr.supports.location)}const sv="v1";function cv(e){Xr(dr,fn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Nc(rr(sv,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var uv=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const lv="v1";var dv,fv,pv,gv,hv,mv;function vv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function wv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Cv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage,fn.settings,fn.content),Nc(rr(lv,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function yv(){var e,t,n;return uv(this,void 0,void 0,function*(){let r;Xr(dr,fn.sidePanel,fn.meetingStage,fn.settings,fn.content);try{const e=!0;r=yield Pc(rr("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)==gv.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==gv.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function Sv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage,fn.task),Nc(rr(lv,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function bv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Xr(dr,fn.sidePanel),Nc(rr(lv,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Ev(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Xr(dr,fn.sidePanel),Nc(rr(lv,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Av(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Xr(dr,fn.sidePanel),Nc(rr(lv,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Iv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Xr(dr,fn.sidePanel),xs(rr(lv,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Pv(e,t,n={sharingProtocol:hv.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Tv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Ov(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Rv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Fv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),xs(rr(lv,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function kv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),xs(rr(lv,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Mv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),xs(rr(lv,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function xv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Xr(dr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||mv.Other};return Pc(rr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Nv(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");Xr(dr,fn.sidePanel,fn.meetingStage),e.isAppHandlingAudio?Uv(e,t):Dv(e,t)}function Uv(e,t){Nc(rr(lv,"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");xs(rr(lv,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>uv(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Hv(n,n.isMicMuted===t.isMicMuted?dv.HostInitiated:dv.AppDeclinedToChange)}catch(e){Hv(t,dv.AppFailedToChange)}}));xs(rr(lv,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function Dv(e,t){Nc(rr(lv,"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");Us("meeting.micStateChanged")&&Ns("meeting.micStateChanged"),Us("meeting.audioDeviceSelectionChanged")&&Ns("meeting.audioDeviceSelectionChanged"),t(n)})}function Lv(e){Hv(e,dv.AppInitiated)}function Hv(e,t){Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"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"}(dv||(dv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(fv||(fv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(pv||(pv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(gv||(gv={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(hv||(hv={})),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.M365CalendarMeetNow="m365_calendar_meet_now",e.Other="other"}(mv||(mv={}));const _v="v1",Vv="v2";function Bv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=rr(_v,"monetization.openPurchaseExperience")):(r=e,o=rr(Vv,"monetization.openPurchaseExperience"));return Xr(dr,fn.content),Rn(()=>new Promise(e=>{if(!jv())throw wn;e(Pc(o,"monetization.openPurchaseExperience",r))}),n)}function jv(){return!(!Xr(dr)||!dr.supports.monetization)}const Wv="v2";function zv(e){return new Promise(t=>{if(Xr(dr,fn.content),!$v())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Ac(rr(Wv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function qv(e){return new Promise(t=>{if(Xr(dr,fn.content),!$v())throw new Error("Not supported");const n=rr(Wv,"calendar.composeMeeting");dr.isLegacyTeams?t(Ac(n,"executeDeepLink",Th(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Ac(n,"calendar.composeMeeting",e))})}function $v(){return!(!Xr(dr)||!dr.supports.calendar)}const Gv="v2";function Jv(e){e&&0!==e.length&&e.forEach(e=>{uh(e)})}function Kv(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===rw.New&&(Jv(t.toRecipients),Jv(t.ccRecipients),Jv(t.bccRecipients))}function Qv(e){if(Xr(dr,fn.content),!Zv())throw new Error("Not supported");return Kv(e),Fc("mail.handoff.composeMail",[new Xv(e)],rr(Gv,"mail.handoff.composeMail"))}function Zv(){return!!(Xr(dr)&&dr.supports.mail&&dr.supports.mail.handoff)}class Xv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Yv="v2";function ew(e){return new Promise(t=>{if(Xr(dr,fn.content),!nw())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Ac(rr(Yv,"mail.openMailItem"),"mail.openMailItem",e))})}function tw(e){return new Promise(t=>{if(Xr(dr,fn.content),!nw())throw new Error("Not supported");t(Ac(rr(Yv,"mail.composeMail"),"mail.composeMail",e))})}function nw(){return!(!Xr(dr)||!dr.supports.mail)}var rw;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(rw||(rw={}));const ow="v2";function iw(){if(!Zn.printCapabilityEnabled){if(Xr(dr),!dw())throw wn;Zn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(aw(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function aw(){Dn().print()}function sw(e){cw(rr(ow,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!po(e)&&!dw())throw wn})}function cw(e,t,n){!po(t)&&Xr(dr),!po(t)&&n&&n(),Ws(e,t)}function uw(e){lw(rr(ow,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!po(e)&&!dw())throw wn})}function lw(e,t,n){!po(t)&&Xr(dr),!po(t)&&n&&n(),$s(e,t)}function dw(){return!(!Xr(dr)||!dr.supports.teamsCore)}const fw="v1",pw="v2";function gw(e,t){let n,r;Xr(dr,fn.content,fn.task,fn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=rr(fw,"people.selectPeople")):(r=e,o=rr(pw,"people.selectPeople")),Tn(hw,n,o,r)}function hw(e,t){return new Promise(n=>{if(!Yr(nt))throw{errorCode:Ve.OLD_PLATFORM};if(!um(t))throw{errorCode:Ve.INVALID_ARGUMENTS};if(!mw())throw wn;n(Pc(e,"people.selectPeople",t))})}function mw(){return!(!Xr(dr)||!dr.supports.people)}function vw(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?ww(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function ww(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 Cw="v2";function yw(e){return Xr(dr,fn.content),new Promise(t=>{const[n,r]=vw(e);if(!n)throw{errorCode:Ve.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(Pc(rr(Cw,"profile.showProfile"),"profile.showProfile",o))})}function Sw(){return!(!Xr(dr)||!dr.supports.profile)}const bw="v2",Ew="search.queryChange",Aw="search.queryClose",Iw="search.queryExecute";function Pw(e,t,n){if(Xr(dr,fn.content),!Ow())throw wn;xs(rr(bw,"search.registerOnClosedHandler"),Aw,e),xs(rr(bw,"search.registerOnExecutedHandler"),Iw,t),n&&xs(rr(bw,"search.registerOnChangeHandler"),Ew,n)}function Tw(){if(Xr(dr,fn.content),!Ow())throw wn;Nc(rr(bw,"search.unregisterHandlers"),"search.unregister"),Ns(Ew),Ns(Aw),Ns(Iw)}function Ow(){return!(!Xr(dr)||!dr.supports.search)}function Rw(){return new Promise(e=>{if(Xr(dr,fn.content),!Ow())throw new Error("Not supported");e(Ac(rr(bw,"search.closeSearch"),"search.closeSearch"))})}var Fw=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 kw="v2";function Mw(){return Fw(this,void 0,void 0,function*(){if(Xr(dr,fn.sidePanel,fn.meetingStage),!xw())throw wn;return yield Pc(rr(kw,"sharing.history.getContent"),"sharing.history.getContent")})}function xw(){var e;return Xr(dr)&&void 0!==(null===(e=dr.supports.sharing)||void 0===e?void 0:e.history)}const Nw="v1",Uw="v2",Dw={shareWebContent:"sharing.shareWebContent"};function Lw(e,t){try{_w(e),Vw(e),jw(e)}catch(e){return On(()=>Promise.reject(e),t)}Xr(dr,fn.content,fn.sidePanel,fn.task,fn.stage,fn.meetingStage);return On(Hw,t,rr(t?Nw:Uw,"sharing.shareWebContent"),e)}function Hw(e,t){return new Promise(n=>{if(!Ww())throw wn;n(Pc(e,Dw.shareWebContent,t))})}function _w(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ve.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Vw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Ve.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Ve.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Bw(e){if("URL"===e.type){if(!e.url)throw{errorCode:Ve.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if("FILE"!==e.type)throw{errorCode:Ve.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:Ve.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function jw(e){e.content.forEach(Bw)}function Ww(){return!(!Xr(dr)||!dr.supports.sharing)}const zw="v2";function qw(){return new Promise(e=>{if(Xr(dr,fn.content),!$w())throw wn;e(Pc(rr(zw,"stageView.self.close"),"stageView.self.close"))})}function $w(){var e;return Xr(dr)&&void 0!==(null===(e=dr.supports.stageView)||void 0===e?void 0:e.self)}const Gw="v2";var Jw;function Kw(e){return new Promise(t=>{if(Xr(dr,fn.content),!Qw())throw wn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Pc(rr(Gw,"stageView.open"),"stageView.open",e))})}function Qw(){return!(!Xr(dr)||!dr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Jw||(Jw={}));const Zw=10;var Xw=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 Yw="v2";function eC(e){return Xw(this,void 0,void 0,function*(){Xr(dr,fn.content,fn.task),rC(),oC(e);const t=yield Pc(rr(Yw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return iC(e.maxVisualMediaCount,t),t})}function tC(e){return Xw(this,void 0,void 0,function*(){Xr(dr,fn.content,fn.task),rC(),oC(e);const t=yield Pc(rr(Yw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return iC(e.maxVisualMediaCount,t),t})}function nC(){return!!(Xr(dr)&&dr.supports.visualMedia&&dr.supports.visualMedia.image&&dr.supports.permissions)}function rC(){if(!nC())throw wn}function oC(e){if(!e||e.maxVisualMediaCount>Zw||e.maxVisualMediaCount<1)throw Sn}function iC(e,t){if(t.length>e)throw bn}const aC="v2";var sC,cC;function uC(){if(Xr(dr,fn.content,fn.task),!nC())throw wn;const e=Be.Media;return Pc(rr(aC,"visualMedia.hasPermission"),"permissions.has",e)}function lC(){if(Xr(dr,fn.content,fn.task),!nC())throw wn;const e=Be.Media;return Pc(rr(aC,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(sC||(sC={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(cC||(cC={}));var dC=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 fC=null;function pC(){return dC(this,void 0,void 0,function*(){return null===fC&&(fC=(yield Bo()).app.host.name),fC})}var gC=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 hC(){return gC(this,void 0,void 0,function*(){if(Xr(dr),!vC())throw wn;return!(!dr.isLegacyTeams||Zn.hostClientType!==ln.android&&Zn.hostClientType!==ln.ios&&Zn.hostClientType!==ln.ipados&&Zn.hostClientType!==ln.visionOS||(yield mC())!==dn.teams)||(yield Ec(rr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function mC(){return gC(this,void 0,void 0,function*(){return pC()})}function vC(){return Xr(dr)&&void 0!==dr.supports.webStorage}const wC="v2";var CC;function yC(e){const t=rr(wC,"call.startCall");return new Promise(n=>{var r;if(Xr(dr,fn.content,fn.task),!SC())throw wn;if(!dr.isLegacyTeams)return Nc(t,"call.startCall",[e],n);n(Ec(t,"executeDeepLink",Ph(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(CC.Video),e.source)).then(e=>{if(!e)throw new Error(gt);return e}))})}function SC(){return!(!Xr(dr)||!dr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(CC||(CC={}));const bC="v1";function EC(){ca(rr(bC,"appInitialization.notifyAppLoaded"))}function AC(){Nc(rr(bC,"appInitialization.notifySuccess"),Mo.Success,[Pr])}function IC(e){la(rr(bC,"appInitialization.notifyFailure"),e)}function PC(e){ua(rr(bC,"appInitialization.notifyExpectedFailure"),e)}const TC=nr("thirdPartyCloudStorage"),OC="v2";class RC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let FC=[],kC=null,MC=!0,xC=null;function NC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Ve.INVALID_ARGUMENTS})}if(Xr(dr,fn.content,fn.task),!DC())throw wn;if(xC)throw xC=null,new Error("getDragAndDropFiles cannot be called twice");xC=t,MC=!0,Nc(rr(OC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],UC)}function UC(e){if(xC)if(e&&e.error)xC([],e.error),xC=null;else if(e&&e.fileChunk)try{MC||0!==e.fileChunk.chunkSequence||(TC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),MC=!0,xC([],{errorCode:Ve.INTERNAL_ERROR,message:"error occurred while receiving data"}),FC=[],xC=null);const t=Yh(e.fileChunk,e.fileType);if(t?(kC||(kC=new RC(e.fileType,[])),kC.assembleAttachment.push(t)):(TC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),xC?xC([],{errorCode:Ve.INTERNAL_ERROR,message:"error occurred while receiving data"}):xC=null,FC=[],xC=null,MC=!0),MC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&kC){const t=Xh(kC.assembleAttachment,kC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});FC.push(n)}e.isLastFile&&xC&&(xC(FC,e.error),FC=[],xC=null,MC=!0),kC=null}}catch(e){xC&&(xC([],{errorCode:Ve.INTERNAL_ERROR,message:e}),FC=[],xC=null,MC=!0)}else xC([],{errorCode:Ve.INTERNAL_ERROR,message:"data received is null"}),FC=[],xC=null,MC=!0}function DC(){return!(!Xr(dr)||!dr.supports.thirdPartyCloudStorage)}const LC="v1";function HC(e,t){sa(rr(LC,"initialize"),t).then(()=>{e&&e()})}function _C(){iw()}function VC(){aw()}function BC(e){Zr(),Nc(rr(LC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Zn.frameContext),e(t)})}function jC(e){ma(rr(LC,"registerOnThemeChangeHandlerHelper"),e)}function WC(e){Ds(rr(LC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function zC(e){Ds(rr(LC,"registerAppButtonClickHandler"),"appButtonClick",e,[fn.content])}function qC(e){Ds(rr(LC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[fn.content])}function $C(e){Ds(rr(LC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[fn.content])}function GC(e){La(rr(LC,"registerBackButtonHandler"),e)}function JC(e){cw(rr(LC,"registerOnLoadHandler"),e)}function KC(e){lw(rr(LC,"registerBeforeUnloadHandler"),e)}function QC(e){Ds(rr(LC,"registerFocusEnterHandler"),"focusEnter",e,[])}function ZC(e){Ds(rr(LC,"registerChangeSettingsHandler"),"changeSettings",e,[fn.content])}function XC(e,t){Xr(dr),fs(rr(LC,"getTabInstances"),t).then(t=>{e(t)})}function YC(e,t){Xr(dr),ps(rr(LC,"getMruTabInstances"),t).then(t=>{e(t)})}function ey(e){gs(rr(LC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function ty(e,t){Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage);const n=null!=t?t:En();wa(rr(LC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ny(e){hs(rr(LC,"setFrameContext"),e)}function ry(e,t,n){sa(rr(LC,"initializeWithFrameContext"),n).then(()=>t&&t()),hs(rr(LC,"setFrameContext"),e)}const oy="v1";function iy(e){ds(rr(oy,"navigation.returnFocus"),e)}function ay(e,t){Xr(dr);const n=null!=t?t:En();ls(rr(oy,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function sy(e,t){Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.remove,fn.task,fn.stage,fn.meetingStage);const n=null!=t?t:En();cs(rr(oy,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function cy(e){Xr(dr);const t=null!=e?e:En();us(rr(oy,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const uy="v1";function ly(e){ms(rr(uy,"settings.setValidityState"),e)}function dy(e){Xr(dr,fn.content,fn.settings,fn.remove,fn.sidePanel),vs(rr(uy,"settings.getSettings")).then(t=>{e(t)})}function fy(e,t){Xr(dr,fn.content,fn.settings,fn.sidePanel);const n=null!=t?t:En();ws(rr(uy,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function py(e){Gi(rr(uy,"settings.registerOnSaveHandler"),e)}function gy(e){Ki(rr(uy,"settings.registerOnRemoveHandler"),e)}var hy=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 my="v1";function vy(e,t){const n=rr(my,"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?(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),Nc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?gi(n,Sy(e),r):pi(n,yy(e),r),new Xm}function wy(e){e=by(e);const{width:t,height:n}=e,r=hy(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");fi(rr(my,"tasks.updateTask"),e)}function Cy(e,t){hi(rr(my,"tasks.submitTask"),e,t)}function yy(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:mn.Small,width:e.width?e.width:mn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Sy(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:mn.Small,width:e.width?e.width:mn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function by(e){return e.height=e.height?e.height:mn.Small,e.width=e.width?e.width:mn.Small,e}const Ey="v2";var Ay,Iy;function Py(){return!(!Xr(dr,fn.meetingStage,fn.sidePanel,fn.content)||!dr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Ay||(Ay={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Iy||(Iy={}));class Ty{getFluidTenantInfo(){return Oy(),new Promise(e=>{e(Pc(rr(Ey,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return Oy(),new Promise(e=>{e(Pc(rr(Ey,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return Oy(),new Promise(e=>{e(Pc(rr(Ey,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return Oy(),new Ty}}function Oy(){if(!Py())throw new Error("LiveShareHost Not supported")}var Ry=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 Fy(e){try{return e.cartItems=ky(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function ky(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=ky(e.accessories)),e})}const My=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=Ry(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=My(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function xy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Uy(t),Ny(t.accessories)}function Ny(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");Uy(t)}}}function Uy(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");Ly(e.price),Hy(e.quantity)}function Dy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===un(e))throw new Error("id must be a valid UUID")}}function Ly(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 Hy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function _y(e){if(!Object.values(Wy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Vy="v2",By={majorVersion:1,minorVersion:1};var jy,Wy;function zy(){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;return Pc(rr(Vy,"marketplace.getCart"),"marketplace.getCart",By).then(Fy)}function qy(e){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Dy(null==e?void 0:e.cartId),xy(null==e?void 0:e.cartItems),Pc(rr(Vy,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:My(e.cartItems),cartVersion:By})).then(Fy)}function $y(e){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;if(!e)throw new Error("removeCartItemsParams must be provided");if(Dy(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 Pc(rr(Vy,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:By})).then(Fy)}function Gy(e){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;if(!e)throw new Error("updateCartStatusParams must be provided");return Dy(null==e?void 0:e.cartId),_y(null==e?void 0:e.cartStatus),Pc(rr(Vy,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:By})).then(Fy)}function Jy(){return!(!Xr(dr)||!dr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(jy||(jy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Wy||(Wy={}));var Ky=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 Qy=3,Zy=4;class Xy{constructor(e){this.direction=e}serialize(){return{direction:this.direction}}}function Yy(e){return e===Qy?"back":e===Zy?"forward":void 0}function eS(e){void 0!==Yy(e.button)&&(e.preventDefault(),e.stopImmediatePropagation())}function tS(e){const t=Yy(e.button);t&&(e.preventDefault(),e.stopImmediatePropagation(),Fc("mouseRelay.navigateHistory",[new Xy(t)],rr("v2","mouseRelay.navigateHistory")))}let nS=!1;function rS(){return Ky(this,void 0,void 0,function*(){if(!iS())throw wn;nS||(document.addEventListener("mousedown",eS,{capture:!0}),document.addEventListener("mouseup",tS,{capture:!0}),document.addEventListener("auxclick",eS,{capture:!0})),nS=!0})}function oS(){if(!iS())throw wn;nS=!1,document.removeEventListener("mousedown",eS,{capture:!0}),document.removeEventListener("mouseup",tS,{capture:!0}),document.removeEventListener("auxclick",eS,{capture:!0})}function iS(){return!(!Xr(dr)||!dr.supports.mouseRelay)}var aS=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 sS{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 cS(e){return e.toLowerCase().split("+").sort().join("+")}function uS(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function lS(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()||!!e.key&&/^F\d+$/i.test(e.key)}function dS(e,t){if(lS(t)){const n=uS(t);if(e.has(n))return{matchedShortcut:n,isOverridable:mS.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function fS(e){vS.clear(),e.shortcuts.forEach(e=>{vS.add(cS(e))}),mS.clear(),e.overridableShortcuts.forEach(e=>{mS.add(cS(e))})}class pS extends na{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function gS(e){xs(rr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function hS(e){if(e.target.closest(`[${AS}]`))return;const{matchedShortcut:t,isOverridable:n}=dS(vS,e);if(!t)return;if(n&&wS){if(wS(e,{matchedShortcut:t}))return}Fc("shortcutRelay.forwardShortcutEvent",[new sS(e)],rr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const mS=new Set,vS=new Set;let wS,CS=!1;function yS(e){if(!ES())throw wn;const t=wS;return wS=e,t}function SS(){if(!ES())throw wn;CS=!1,vS.clear(),mS.clear(),wS=void 0,document.removeEventListener("keydown",hS,{capture:!0})}function bS(){return aS(this,void 0,void 0,function*(){if(!ES())throw wn;fS(yield Rc("shortcutRelay.getHostShortcuts",[],new pS,rr("v2","shortcutRelay.getHostShortcuts"))),CS||document.addEventListener("keydown",hS,{capture:!0}),CS=!0,gS(e=>{fS(e)})})}function ES(){return!(!Xr(dr)||!dr.supports.shortcutRelay)}const AS="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:()=>He,AppId:()=>fo,ChannelType:()=>vn,ChildAppWindow:()=>Xm,DialogDimension:()=>mn,EduType:()=>qe,EmailAddress:()=>lh,ErrorCode:()=>Ve,FileOpenPreference:()=>Le,FrameContexts:()=>fn,HostClientType:()=>ln,HostName:()=>dn,LiveShareHost:()=>Ty,NotificationTypes:()=>lu,ParentAppWindow:()=>Ym,RenderingSurfaces:()=>pn,SecondaryM365ContentIdName:()=>_e,TaskModuleDimension:()=>mn,TeamType:()=>gn,UUID:()=>Kn,UserAuthenticationState:()=>bl,UserSettingTypes:()=>fu,UserTeamRole:()=>hn,ValidatedSafeString:()=>lo,ViewerActionTypes:()=>du,activateChildProxyingCommunication:()=>Or,app:()=>i,appEntity:()=>z,appInitialization:()=>Fe,appInstallDialog:()=>ne,appPerformanceMetrics:()=>te,authentication:()=>ee,barCode:()=>oe,calendar:()=>he,call:()=>Re,chat:()=>ie,clipboard:()=>ae,contextualSearch:()=>b,conversations:()=>E,copilot:()=>R,dialog:()=>f,enablePrintCapability:()=>_C,executeDeepLink:()=>ty,externalAppAuthentication:()=>F,externalAppAuthenticationForCEA:()=>k,externalAppCardActions:()=>M,externalAppCardActionsForCEA:()=>x,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>U,files:()=>D,geoLocation:()=>ue,getAdaptiveCardSchemaVersion:()=>Qm,getContext:()=>BC,getCurrentFeatureFlagsState:()=>Mr,getMruTabInstances:()=>YC,getTabInstances:()=>XC,hostEntity:()=>Z,initialize:()=>HC,initializeWithFrameContext:()=>ry,liveShare:()=>Ne,location:()=>de,logs:()=>S,mail:()=>ve,marketplace:()=>Ue,media:()=>re,meeting:()=>pe,meetingRoom:()=>L,menus:()=>p,messageChannels:()=>H,monetization:()=>ge,mouseRelay:()=>De,navigateBack:()=>cy,navigateCrossDomain:()=>sy,navigateToTab:()=>ay,nestedAppAuth:()=>se,nestedAppAuthBridge:()=>_,notifications:()=>V,openFilePreview:()=>Cu,otherAppStateChange:()=>B,overwriteFeatureFlagsState:()=>Nr,pages:()=>y,people:()=>Ce,plugins:()=>j,print:()=>VC,profile:()=>ye,registerAppButtonClickHandler:()=>zC,registerAppButtonHoverEnterHandler:()=>qC,registerAppButtonHoverLeaveHandler:()=>$C,registerBackButtonHandler:()=>GC,registerBeforeUnloadHandler:()=>KC,registerChangeSettingsHandler:()=>ZC,registerCustomHandler:()=>vu,registerFocusEnterHandler:()=>QC,registerFullScreenHandler:()=>WC,registerOnLoadHandler:()=>JC,registerOnThemeChangeHandler:()=>jC,registerUserSettingsChangeHandler:()=>wu,remoteCamera:()=>W,returnFocus:()=>iy,search:()=>Se,secondaryBrowser:()=>le,sendCustomEvent:()=>mu,sendCustomMessage:()=>hu,setFeatureFlagsState:()=>xr,setFrameContext:()=>ny,settings:()=>Me,shareDeepLink:()=>ey,sharing:()=>Ee,shortcutRelay:()=>Ge,sidePanelInterfaces:()=>P,stageView:()=>Ie,store:()=>X,tasks:()=>xe,teams:()=>G,teamsCore:()=>we,thirdPartyCloudStorage:()=>ke,uploadCustomApp:()=>gu,version:()=>Pr,videoEffects:()=>J,videoEffectsEx:()=>K,visualMedia:()=>Te,webStorage:()=>Oe,widgetHosting:()=>Y});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>yo,getTelemetryPort:()=>wo,isSupported:()=>Co});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>To,getDataLayerPort:()=>Io,isSupported:()=>Po});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Oo,registerOnResumeHandler:()=>Ro});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>No,FailedReason:()=>xo,Messages:()=>Mo,_initialize:()=>_o,_uninitialize:()=>Vo,getContext:()=>Bo,getFrameContext:()=>Do,getImmediateParentOrigin:()=>Ho,initialize:()=>Lo,isInitialized:()=>Uo,lifecycle:()=>o,notifyAppLoaded:()=>jo,notifyExpectedFailure:()=>qo,notifyFailure:()=>zo,notifySuccess:()=>Wo,openLink:()=>Ko,registerHostToAppPerformanceMetricsHandler:()=>Jo,registerOnContextChangeHandler:()=>Go,registerOnThemeChangeHandler:()=>$o});var a={};n.r(a),n.d(a,{isSupported:()=>Xo,resize:()=>Zo});var s={};n.r(s),n.d(s,{isSupported:()=>ei,open:()=>Yo});var c={};n.r(c),n.d(c,{isSupported:()=>oi,registerOnMessageFromParent:()=>ri,sendMessageToDialog:()=>ni,sendMessageToParentFromDialog:()=>ti});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>ui,getDialogInfoFromUrlDialogInfo:()=>ci,isSupported:()=>si,open:()=>ii,parentCommunication:()=>c,submit:()=>ai});var l={};n.r(l),n.d(l,{isSupported:()=>Si,open:()=>yi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>Ei,open:()=>bi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ai,isSupported:()=>Ii,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ti,MenuItem:()=>Ri,MenuListType:()=>Oi,initialize:()=>Ui,isSupported:()=>ji,setNavBarMenu:()=>Hi,setUpViews:()=>Di,showActionMenu:()=>Vi});var g={};n.r(g),n.d(g,{initialize:()=>Wi,isSupported:()=>ta,registerChangeConfigHandler:()=>Zi,registerOnRemoveHandler:()=>Ji,registerOnRemoveHandlerHelper:()=>Ki,registerOnSaveHandler:()=>$i,registerOnSaveHandlerHelper:()=>Gi,setConfig:()=>qi,setValidityState:()=>zi});var h={};n.r(h),n.d(h,{isSupported:()=>xa,onClick:()=>Fa,onHoverEnter:()=>ka,onHoverLeave:()=>Ma});var m={};n.r(m),n.d(m,{_initialize:()=>Na,isSupported:()=>Ha,navigateBack:()=>Ua,registerBackButtonHandler:()=>Da,registerBackButtonHandlerHelper:()=>La});var v={};n.r(v),n.d(v,{isSupported:()=>Ba,navigateTo:()=>_a,navigateToDefaultPage:()=>Va});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ja,exitFullscreen:()=>Wa,isSupported:()=>za});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ga,getTabInstances:()=>$a,isSupported:()=>Ja,navigateToTab:()=>qa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ka,ReturnFocusType:()=>Qa,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ts,initializeWithFrameContext:()=>es,isSupported:()=>as,navigateCrossDomain:()=>ns,navigateToApp:()=>rs,registerFocusEnterHandler:()=>Xa,registerFullScreenHandler:()=>is,returnFocus:()=>Za,setCurrentFrame:()=>Ya,shareDeepLink:()=>os,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>uu,registerGetLogHandler:()=>cu});var b={};n.r(b),n.d(b,{closeContextualSearch:()=>bu,isSupported:()=>Iu,openContextualSearch:()=>Su,registerOnContextualSearchClosedHandler:()=>Au,registerOnContextualSearchOpenedHandler:()=>Eu});var E={};n.r(E),n.d(E,{closeConversation:()=>Ou,getChatMembers:()=>Ru,isSupported:()=>Fu,openConversation:()=>Tu});var A={};n.r(A),n.d(A,{isSupported:()=>Nu,sendCustomTelemetryData:()=>Uu});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Vu,isSupported:()=>_u});var P={};n.r(P),n.d(P,{ContentItemType:()=>ju,CopilotMode:()=>$u,MediaSelectionType:()=>Wu,SidePanelErrorCode:()=>Qu,SidePanelErrorImpl:()=>Zu,TeamsContextType:()=>Ju,TeamsDimensionName:()=>qu,TeamsSessionType:()=>zu,TranscriptState:()=>Gu,UserConsent:()=>Ku});var T={};n.r(T),n.d(T,{copilotSidePanelNotSupportedOnPlatformError:()=>il,getContent:()=>nl,isResponseAReportableError:()=>tl,isSupported:()=>el,preCheckUserConsent:()=>rl,registerUserActionContentSelect:()=>ol});var O={};n.r(O),n.d(O,{closeSidePanel:()=>pl,isSupported:()=>fl});var R={};n.r(R),n.d(R,{customTelemetry:()=>A,eligibility:()=>I,sidePanel:()=>T,view:()=>O});var F={};n.r(F),n.d(F,{ActionExecuteInvokeRequestType:()=>wl,ActionExecuteResponseHandler:()=>El,InvokeErrorCode:()=>Sl,InvokeResponseType:()=>yl,OriginalRequestType:()=>Cl,SerializableActionExecuteInvokeRequest:()=>ml,SerializableConnectorParameters:()=>xl,UserAuthenticationState:()=>bl,authenticateAndResendRequest:()=>Ol,authenticateWithConnector:()=>Nl,authenticateWithOauth2:()=>kl,authenticateWithPowerPlatformConnectorPlugins:()=>Ml,authenticateWithSSO:()=>Rl,authenticateWithSSOAndResendRequest:()=>Fl,disconnectConnector:()=>Ll,getUserAuthenticationStateForConnector:()=>Dl,isActionExecuteResponse:()=>vl,isInvokeError:()=>Al,isSupported:()=>Hl,validateActionExecuteInvokeRequest:()=>Pl});var k={};n.r(k),n.d(k,{authenticateAndResendRequest:()=>Wl,authenticateWithOauth:()=>jl,authenticateWithSSO:()=>Bl,authenticateWithSSOAndResendRequest:()=>zl,isSupported:()=>ql,validateInput:()=>$l});var M={};n.r(M),n.d(M,{ActionOpenUrlErrorCode:()=>Kl,ActionOpenUrlType:()=>Jl,isSupported:()=>Xl,processActionOpenUrl:()=>Zl,processActionSubmit:()=>Ql});var x={};n.r(x),n.d(x,{isSupported:()=>rd,processActionOpenUrl:()=>td,processActionSubmit:()=>nd});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>dd,isSupported:()=>ud,processActionOpenUrlDialog:()=>cd});var U={};n.r(U),n.d(U,{isSupported:()=>hd,processActionCommand:()=>gd});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>vd,CloudStorageProviderFileAction:()=>bd,CloudStorageProviderType:()=>wd,DocumentLibraryAccessType:()=>yd,FileDownloadStatus:()=>Sd,SpecialDocumentLibraryType:()=>Cd,addCloudStorageFolder:()=>Ad,addCloudStorageProvider:()=>Md,addCloudStorageProviderFile:()=>Nd,copyMoveFiles:()=>Rd,deleteCloudStorageFolder:()=>Id,deleteCloudStorageProviderFile:()=>Dd,downloadCloudStorageProviderFile:()=>Ld,getCloudStorageFolderContents:()=>Pd,getCloudStorageFolders:()=>Ed,getExternalProviders:()=>Od,getFileDownloads:()=>Fd,openCloudStorageFile:()=>Td,openDownloadFolder:()=>kd,registerCloudStorageProviderContentChangeHandler:()=>Vd,registerCloudStorageProviderListChangeHandler:()=>_d,removeCloudStorageProvider:()=>xd,renameCloudStorageProviderFile:()=>Ud,uploadCloudStorageProviderFile:()=>Hd});var L={};n.r(L),n.d(L,{getPairedMeetingRoomInfo:()=>Wd,isSupported:()=>Gd,registerMeetingRoomCapabilitiesUpdateHandler:()=>qd,registerMeetingRoomStatesUpdateHandler:()=>$d,sendCommandToPairedMeetingRoom:()=>zd});var H={};n.r(H),n.d(H,{dataLayer:()=>t,isSupported:()=>Jd,telemetry:()=>e});var _={};n.r(_),n.d(_,{initialize:()=>Yd,version:()=>Kd});var V={};n.r(V),n.d(V,{isSupported:()=>uf,showNotification:()=>cf});var B={};n.r(B),n.d(B,{isSupported:()=>gf,notifyInstallCompleted:()=>pf,registerAppInstallationHandler:()=>df,unregisterAppInstallationHandler:()=>ff});var j={};n.r(j),n.d(j,{isSupported:()=>vf,registerPluginMessage:()=>Cf,sendPluginMessage:()=>wf});var W={};n.r(W),n.d(W,{ControlCommand:()=>Af,ErrorReason:()=>If,SessionTerminatedReason:()=>Pf,getCapableParticipants:()=>Tf,isSupported:()=>Uf,registerOnCapableParticipantsChangeHandler:()=>kf,registerOnDeviceStateChangeHandler:()=>xf,registerOnErrorHandler:()=>Mf,registerOnSessionStatusChangeHandler:()=>Nf,requestControl:()=>Of,sendControlCommand:()=>Rf,terminateSession:()=>Ff});var z={};n.r(z),n.d(z,{isSupported:()=>Hf,selectAppEntity:()=>Lf});var q={};n.r(q),n.d(q,{getUserJoinedTeams:()=>Vf,isSupported:()=>Bf});var $={};n.r($),n.d($,{getConfigSetting:()=>zf,isSupported:()=>qf,joinedTeams:()=>q});var G={};n.r(G),n.d(G,{ChannelType:()=>Gf,fullTrust:()=>$,getTeamChannels:()=>Jf,isSupported:()=>Qf,refreshSiteUrl:()=>Kf});var J={};n.r(J),n.d(J,{EffectChangeType:()=>ap,EffectFailureReason:()=>sp,VideoFrameFormat:()=>ip,isSupported:()=>pp,notifySelectedVideoEffectChanged:()=>up,registerForVideoEffect:()=>lp,registerForVideoFrame:()=>cp});var K={};n.r(K),n.d(K,{ErrorLevel:()=>Lp,frameProcessingTimeoutInMs:()=>Up,isSupported:()=>qp,notifyFatalError:()=>Jp,notifySelectedVideoEffectChanged:()=>jp,registerForVideoEffect:()=>Wp,registerForVideoFrame:()=>Hp,updatePersonalizedEffects:()=>zp});var Q={};n.r(Q),n.d(Q,{addAndConfigure:()=>ng,getAll:()=>rg,isSupported:()=>sg,reconfigure:()=>og,remove:()=>ag,rename:()=>ig});var Z={};n.r(Z),n.d(Z,{AppTypes:()=>lg,isSupported:()=>dg,tab:()=>Q});var X={};n.r(X),n.d(X,{isSupported:()=>Sg,openAppDetail:()=>wg,openFullStore:()=>vg,openInContextStore:()=>Cg,openSpecificStore:()=>yg});var Y={};n.r(Y),n.d(Y,{callTool:()=>Og,contentSizeChanged:()=>xg,isSupported:()=>Tg,notifyIntrinsicHeight:()=>Mg,openExternal:()=>Ug,registerModalCloseHandler:()=>Dg,requestDisplayMode:()=>Fg,requestModal:()=>kg,sendFollowUpMessage:()=>Rg,setWidgetState:()=>Ng});var ee={};n.r(ee),n.d(ee,{DataResidency:()=>ah,authenticate:()=>Xg,getAuthToken:()=>eh,getUser:()=>nh,notifyFailure:()=>ih,notifySuccess:()=>oh,registerAuthenticationHandlers:()=>Zg});var te={};n.r(te),n.d(te,{isSupported:()=>sh,registerHostMemoryMetricsHandler:()=>ch});var ne={};n.r(ne),n.d(ne,{isSupported:()=>kh,openAppInstallDialog:()=>Fh});var re={};n.r(re),n.d(re,{CameraStartMode:()=>Dh,File:()=>Bh,FileFormat:()=>Nh,ImageOutputFormats:()=>Vh,ImageUriType:()=>_h,Media:()=>$h,MediaControllerEvent:()=>Uh,MediaType:()=>Hh,Source:()=>Lh,VideoController:()=>Jh,captureImage:()=>jh,hasPermission:()=>Wh,requestPermission:()=>zh,scanBarCode:()=>Zh,selectMedia:()=>Kh,viewImages:()=>Qh});var oe={};n.r(oe),n.d(oe,{hasPermission:()=>fm,isSupported:()=>gm,requestPermission:()=>pm,scanBarCode:()=>dm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>Cm,openChat:()=>mm,openGroupChat:()=>wm});var ae={};n.r(ae),n.d(ae,{isSupported:()=>Am,read:()=>Em,write:()=>bm});var se={};n.r(se),n.d(se,{addNAATrustedOrigins:()=>Dm,canParentManageNAATrustedOrigins:()=>km,deleteNAATrustedOrigins:()=>Lm,getParentOrigin:()=>Fm,isDeeplyNestedAuthSupported:()=>Mm,isNAAChannelRecommended:()=>Rm});var ce={};n.r(ce),n.d(ce,{chooseLocation:()=>jm,isSupported:()=>zm,showLocation:()=>Wm});var ue={};n.r(ue),n.d(ue,{getCurrentLocation:()=>$m,hasPermission:()=>Gm,isSupported:()=>Km,map:()=>ce,requestPermission:()=>Jm});var le={};n.r(le),n.d(le,{isSupported:()=>nv,open:()=>tv});var de={};n.r(de),n.d(de,{getLocation:()=>ov,isSupported:()=>av,showLocation:()=>iv});var fe={};n.r(fe),n.d(fe,{setOptions:()=>cv});var pe={};n.r(pe),n.d(pe,{CallType:()=>gv,EventActionSource:()=>mv,MeetingReactionType:()=>fv,MeetingType:()=>pv,SharingProtocol:()=>hv,appShareButton:()=>fe,getAppContentStageSharingCapabilities:()=>Tv,getAppContentStageSharingState:()=>Rv,getAuthenticationTokenForAnonymousUser:()=>Sv,getIncomingClientAudioState:()=>vv,getLiveStreamState:()=>bv,getMeetingDetails:()=>Cv,getMeetingDetailsVerbose:()=>yv,joinMeeting:()=>xv,registerLiveStreamChangedHandler:()=>Iv,registerMeetingReactionReceivedHandler:()=>Mv,registerRaiseHandStateChangedHandler:()=>kv,registerSpeakingStateChangeHandler:()=>Fv,requestAppAudioHandling:()=>Nv,requestStartLiveStreaming:()=>Ev,requestStopLiveStreaming:()=>Av,shareAppContentToStage:()=>Pv,stopSharingAppContentToStage:()=>Ov,toggleIncomingClientAudio:()=>wv,updateMicState:()=>Lv});var ge={};n.r(ge),n.d(ge,{isSupported:()=>jv,openPurchaseExperience:()=>Bv});var he={};n.r(he),n.d(he,{composeMeeting:()=>qv,isSupported:()=>$v,openCalendarItem:()=>zv});var me={};n.r(me),n.d(me,{composeMailWithHandoff:()=>Qv,isSupported:()=>Zv});var ve={};n.r(ve),n.d(ve,{ComposeMailType:()=>rw,composeMail:()=>tw,handoff:()=>me,isSupported:()=>nw,openMailItem:()=>ew});var we={};n.r(we),n.d(we,{enablePrintCapability:()=>iw,isSupported:()=>dw,print:()=>aw,registerBeforeUnloadHandler:()=>uw,registerBeforeUnloadHandlerHelper:()=>lw,registerOnLoadHandler:()=>sw,registerOnLoadHandlerHelper:()=>cw});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>mw,selectPeople:()=>gw});var ye={};n.r(ye),n.d(ye,{isSupported:()=>Sw,showProfile:()=>yw});var Se={};n.r(Se),n.d(Se,{closeSearch:()=>Rw,isSupported:()=>Ow,registerHandlers:()=>Pw,unregisterHandlers:()=>Tw});var be={};n.r(be),n.d(be,{getContent:()=>Mw,isSupported:()=>xw});var Ee={};n.r(Ee),n.d(Ee,{SharingAPIMessages:()=>Dw,history:()=>be,isSupported:()=>Ww,shareWebContent:()=>Lw});var Ae={};n.r(Ae),n.d(Ae,{close:()=>qw,isSupported:()=>$w});var Ie={};n.r(Ie),n.d(Ie,{StageViewOpenMode:()=>Jw,isSupported:()=>Qw,open:()=>Kw,self:()=>Ae});var Pe={};n.r(Pe),n.d(Pe,{captureImages:()=>eC,isSupported:()=>nC,retrieveImages:()=>tC});var Te={};n.r(Te),n.d(Te,{CameraRestriction:()=>sC,Source:()=>cC,hasPermission:()=>uC,image:()=>Pe,requestPermission:()=>lC});var Oe={};n.r(Oe),n.d(Oe,{isSupported:()=>vC,isWebStorageClearedOnUserLogOut:()=>hC});var Re={};n.r(Re),n.d(Re,{CallModalities:()=>CC,isSupported:()=>SC,startCall:()=>yC});var Fe={};n.r(Fe),n.d(Fe,{ExpectedFailureReason:()=>No,FailedReason:()=>xo,Messages:()=>Mo,notifyAppLoaded:()=>EC,notifyExpectedFailure:()=>PC,notifyFailure:()=>IC,notifySuccess:()=>AC});var ke={};n.r(ke),n.d(ke,{getDragAndDropFiles:()=>NC,isSupported:()=>DC});var Me={};n.r(Me),n.d(Me,{getSettings:()=>dy,registerOnRemoveHandler:()=>gy,registerOnSaveHandler:()=>py,setSettings:()=>fy,setValidityState:()=>ly});var xe={};n.r(xe),n.d(xe,{getDefaultSizeIfNotProvided:()=>by,startTask:()=>vy,submitTask:()=>Cy,updateTask:()=>wy});var Ne={};n.r(Ne),n.d(Ne,{ContainerState:()=>Iy,LiveShareHost:()=>Ty,UserMeetingRole:()=>Ay,isSupported:()=>Py});var Ue={};n.r(Ue),n.d(Ue,{CartStatus:()=>Wy,Intent:()=>jy,addOrUpdateCartItems:()=>qy,cartVersion:()=>By,getCart:()=>zy,isSupported:()=>Jy,removeCartItems:()=>$y,updateCartStatus:()=>Gy});var De={};n.r(De),n.d(De,{disableMouseRelayCapability:()=>oS,enableMouseRelayCapability:()=>rS,isSupported:()=>iS});var Le,He,_e,Ve,Be,je,We,ze,qe,$e,Ge={};function Je(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Ge),n.d(Ge,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>AS,enableShortcutRelayCapability:()=>bS,isSupported:()=>ES,resetIsShortcutRelayCapabilityEnabled:()=>SS,setOverridableShortcutHandler:()=>yS}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Le||(Le={})),function(e){e.M365Content="m365content"}(He||(He={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(_e||(_e={})),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"}(Ve||(Ve={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Be||(Be={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(je||(je={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(We||(We={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(ze||(ze={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(qe||(qe={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}($e||($e={}));const Ke=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","admin.microsoft.com","m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Qe="2.0.1",Ze="2.0.2",Xe="2.0.3",Ye="2.0.4",et="2.0.1",tt="1.9.0",nt="2.0.0",rt="1.7.0",ot="1.8.0",it="1.9.0",at=n.t(Ke,2).validOrigins,st=1500,ct=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ut="https",lt="teams.microsoft.com",dt="The library has not yet been initialized",ft="The runtime has not yet been initialized",pt="The runtime version is not supported",gt="The call was not properly started";var ht=n(933);const mt=wt,vt=2147483647;function wt(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 yt(e)}return Ct(e,t,n)}function Ct(e,t,n){if("string"==typeof e)return At(e,t);if(ArrayBuffer.isView(e))return kt(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(Pt(e,ArrayBuffer)||e&&Pt(e.buffer,ArrayBuffer))return Mt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Pt(e,SharedArrayBuffer)||e&&Pt(e.buffer,SharedArrayBuffer)))return Mt(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 wt.from(r,t,n);const o=Yt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return wt.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 yt(e){return St(e),bt(e<0?0:0|Et(e))}function St(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 bt(e){if(e>vt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,wt.prototype),t}function Et(e){if(e>=vt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+vt.toString(16)+" bytes");return 0|e}function At(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!wt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|It(e,t);let r=bt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function It(e,t){if(wt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Pt(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 Tt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ot(e).length;default:if(o)return r?-1:Tt(e).length;t=(""+t).toLowerCase(),o=!0}}function Pt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Tt(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 Ot(e){return ht.toByteArray(Ft(e))}wt.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}}(),wt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),wt.from=function(e,t,n){return Ct(e,t,n)},Object.setPrototypeOf(wt.prototype,Uint8Array.prototype),Object.setPrototypeOf(wt,Uint8Array),wt.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}},wt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==wt.prototype};const Rt=/[^+/0-9A-Za-z-_]/g;function Ft(e){if((e=(e=e.split("=")[0]).trim().replace(Rt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function kt(e){if(Pt(e,Uint8Array)){const t=new Uint8Array(e);return Mt(t.buffer,t.byteOffset,t.byteLength)}return xt(e)}function Mt(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,wt.prototype),r}function xt(e){const t=e.length<0?0:0|Et(e.length),n=bt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Nt(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 Lt(r)}function Ut(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 Ht(this,t,n);case"utf8":case"utf-8":return Nt(this,t,n);case"ascii":return _t(this,t,n);case"latin1":case"binary":return Vt(this,t,n);case"base64":return Bt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}wt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Nt(this,0,e):Ut.apply(this,arguments)};const Dt=4096;function Lt(e){const t=e.length;if(t<=Dt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Dt));return n}function Ht(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+=Xt[e[r]];return o}function _t(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 Vt(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 Bt(e,t,n){return 0===t&&n===e.length?ht.fromByteArray(e):ht.fromByteArray(e.slice(t,n))}function jt(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 Wt(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(Zt(r))return a;e[n+a]=r}return a}function zt(e,t,n,r){return Qt(Tt(t,e.length-n),e,n,r)}function qt(e,t,n,r){return Qt(Jt(t),e,n,r)}function $t(e,t,n,r){return Qt(Ot(t),e,n,r)}function Gt(e,t,n,r){return Qt(Kt(t,e.length-n),e,n,r)}function Jt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Kt(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function Qt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Zt(e){return e!=e}wt.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 Wt(this,e,t,n);case"utf8":case"utf-8":return zt(this,e,t,n);case"ascii":case"latin1":case"binary":return qt(this,e,t,n);case"base64":return $t(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Gt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Xt=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 Yt(e){if(wt.isBuffer(e)){const t=0|Et(e.length),n=bt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Zt(e.length)?bt(0):xt(e):"Buffer"===e.type&&Array.isArray(e.data)?xt(e.data):void 0}const en={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let tn;const nn=new Uint8Array(16);function rn(){if(!tn){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");tn=crypto.getRandomValues.bind(crypto)}return tn(nn)}const on=[];for(let e=0;e<256;++e)on.push((e+256).toString(16).slice(1));function an(e,t=0){return(on[e[t+0]]+on[e[t+1]]+on[e[t+2]]+on[e[t+3]]+"-"+on[e[t+4]]+on[e[t+5]]+"-"+on[e[t+6]]+on[e[t+7]]+"-"+on[e[t+8]]+on[e[t+9]]+"-"+on[e[t+10]]+on[e[t+11]]+on[e[t+12]]+on[e[t+13]]+on[e[t+14]]+on[e[t+15]]).toLowerCase()}const sn=function(e,t,n){if(en.randomUUID&&!t&&!e)return en.randomUUID();const r=(e=e||{}).random??e.rng?.()??rn();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return an(r)},cn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const un=function(e){return"string"==typeof e&&cn.test(e)};var ln,dn,fn,pn,gn,hn,mn,vn;!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"}(ln||(ln={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(dn||(dn={})),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"}(fn||(fn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(pn||(pn={})),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"}(gn||(gn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(hn||(hn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(mn||(mn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(vn||(vn={}));const wn={errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM},Cn={majorVersion:1,minorVersion:5},yn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Sn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),bn=new Error("Invalid response: Received more images than the specified max limit in the response.");function En(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function An(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 In(){return sn()}function Pn(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Pn(e[t])}),Object.freeze(e)}function Tn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function On(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Rn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function Fn(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 kn(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 Mn(e){return!(An(`${e.majorVersion}.${e.minorVersion}`,`${Cn.majorVersion}.${Cn.minorVersion}`)>=0)}function xn(e){return"https:"===e.protocol}function Nn(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=mt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Un(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 Dn(){if(Ln())throw new Error("window object undefined at SSR check");return window}function Ln(){return"undefined"==typeof window}function Hn(e,t){if(Bn(e)||!jn(e)||!Wn(e))throw t||new Error("id is not valid.")}function _n(e,t){const n=e.toString().toLocaleLowerCase();if(Bn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!xn(e))throw t||new Error("Url should be a valid https url")}function Vn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Bn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function jn(e){return e.length<256&&e.length>4}function Wn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function zn(e){if(!e)throw new Error("id must not be empty");if(!1===un(e))throw new Error("id must be a valid UUID")}const qn=!!performance&&"now"in performance;function $n(){return qn?performance.now()+performance.timeOrigin:void 0}function Gn(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=>Gn(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=>Gn(e[n],t+1))}function Jn(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:ze.NotAdult})})})}class Kn{constructor(e=In()){this.uuid=e,zn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Qn(e){if(!(e instanceof Kn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Zn{}Zn.initializeCalled=!1,Zn.initializeCompleted=!1,Zn.additionalValidOrigins=[],Zn.initializePromise=void 0,Zn.isFramelessWindow=!1,Zn.frameContext=void 0,Zn.hostClientType=void 0,Zn.printCapabilityEnabled=!1,Zn.teamsJsInstanceId=(new Kn).toString();var Xn=n(815);const Yn=new Kn,er=Xn.debug.formatArgs;Xn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Yn.toString()}]`,er.call(this,e)};const tr=(0,Xn.debug)("teamsJs");function nr(e){return tr.extend(e)}function rr(e,t){return`${e}_${t}`}function or(e){return/^v\d+_[\w.]+$/.test(e)}var ir=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 ar=nr("runtime"),sr=4;function cr(e){return e.apiVersion===sr}const ur={apiVersion:-1,supports:{}};function lr(e){if(cr(e))return!0;throw-1===e.apiVersion?new Error(ft):new Error(pt)}let dr=ur;const fr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:yn,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:{}}}},pr=[ln.desktop,ln.web,ln.rigel,ln.surfaceHub,ln.teamsRoomsWindows,ln.teamsRoomsAndroid,ln.teamsPhones,ln.teamsDisplays],gr=[ln.android,ln.ios,ln.ipados,ln.visionOS],hr=[...pr,...gr];function mr(e){let t=e;if(t.apiVersion<sr&&vr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),cr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const vr=[{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=ir(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})}}}],wr="2.1.2",Cr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:pr}],"1.9.0":[{capability:{location:{}},hostClientTypes:hr}],"2.0.0":[{capability:{people:{}},hostClientTypes:hr},{capability:{sharing:{}},hostClientTypes:[ln.desktop,ln.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[ln.android,ln.desktop,ln.ios,ln.teamsRoomsAndroid,ln.teamsPhones,ln.teamsDisplays,ln.web]},{capability:{webStorage:{}},hostClientTypes:[ln.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[ln.android,ln.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[ln.android,ln.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[ln.android,ln.ios,ln.ipados,ln.visionOS]}],"2.1.2":[]},yr=ar.extend("generateBackCompatRuntimeConfig");function Sr(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]=Sr(e[r]||{},t[r]));return n}function br(e,t,n){yr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);yr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{An(e,t)>=0&&n[t].forEach(e=>{void 0!==Zn.hostClientType&&e.hostClientTypes.includes(Zn.hostClientType)&&(r=Sr(r,e.capability))})});const o={apiVersion:sr,hostVersionsInfo:yn,isLegacyTeams:!0,supports:r};return yr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Er=ar.extend("applyRuntimeConfig");function Ar(e){"string"==typeof e.apiVersion&&(Er("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Er("Fast-forwarding runtime %o",e);const t=mr(e);Er("Applying runtime %o",t),dr=Pn(t)}function Ir(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Pr="2.57.0-beta.0",Tr={childProxyingCommunication:!1};function Or(){Tr.childProxyingCommunication=!0}function Rr(){return Tr.childProxyingCommunication}const Fr={disableEnforceOriginMatchForChildResponses:!1};let kr=Object.assign({},Fr);function Mr(){return kr}function xr(e){kr=e}function Nr(e){return xr(Object.assign(Object.assign({},kr),e)),Mr()}var Ur=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 Dr=e=>{const{uuid:t}=e,n=Ur(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Lr=e=>{const{uuidAsString:t}=e,n=Ur(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Kn(t):void 0})},Hr=e=>{const{uuidAsString:t}=e,n=Ur(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Kn(t):void 0})},_r=e=>{const{uuid:t}=e,n=Ur(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Vr(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 Br=nr("flushMessageQueue");function jr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Dr(o);Br("Flushing message %s from %s message queue via postMessage.",Vr(n),r),e.postMessage(n,t)}}}const Wr=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function zr(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 qr{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return Wr.test(e)}static create(e,t){const n=e.split("://");return new qr(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||zr(this.host,e.host))}}function $r(e){return qr.canUse(e)}function Gr(e,t){if(qr.canUse(e))return qr.create(e,t);t("No URL verifier available for pattern: %s",e)}const Jr=nr("internal"),Kr=Jr.extend("ensureInitializeCalled"),Qr=Jr.extend("ensureInitialized");function Zr(){if(!Zn.initializeCalled)throw Kr(dt),new Error(dt)}function Xr(e,...t){if(!Zn.initializeCompleted)throw Qr("%s. initializeCalled: %s",dt,Zn.initializeCalled.toString()),new Error(dt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Zn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Zn.frameContext}".`;throw Qr(e),new Error(e)}}return lr(e)}function Yr(e=Qe){const t=An(Zn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function eo(){return Zn.hostClientType==ln.android||Zn.hostClientType==ln.ios||Zn.hostClientType==ln.ipados||Zn.hostClientType==ln.visionOS}function to(e=Qe){if(!eo()){throw{errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM}}if(!Yr(e)){throw{errorCode:Ve.OLD_PLATFORM}}}function no(e){let t=Zn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&$r(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Zn.additionalValidOrigins=t}function ro(e){if(!so(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${io}-${ao}).`)}function oo(e){if(Bn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(co(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const io=4,ao=256;function so(e){return e.length<ao&&e.length>io}function co(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function uo(e){if(!(e instanceof fo))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class lo{constructor(e){this.idAsString=e,oo(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class fo extends lo{constructor(e){super(e),ro(e)}toJSON(){return{appIdAsString:this.toString()}}}function po(e){return null==e}var go=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 ho;const mo="v1",vo=nr("messageChannels.telemetry");function wo(){return go(this,void 0,void 0,function*(){if(ho)return vo("Returning telemetry port from cache"),ho;if(!Co())throw wn;return ho=yield kc(rr(mo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),ho})}function Co(){var e;return!(!Xr(dr)||!(null===(e=dr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function yo(){ho=void 0}var So=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};let bo;const Eo="v1",Ao=nr("messageChannels.dataLayer");function Io(){return So(this,void 0,void 0,function*(){if(bo)return Ao("Returning dataLayer port from cache"),bo;if(!Po())throw wn;return bo=yield kc(rr(Eo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),bo})}function Po(){var e;return!(!Xr(dr)||!(null===(e=dr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function To(){bo=void 0}function Oo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Xr(dr),Js(e)}function Ro(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Xr(dr),Ks(e)}const Fo="v2",ko=nr("app"),Mo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var xo,No;function Uo(){return Zn.initializeCompleted}function Do(){return Zn.frameContext}function Lo(e){return sa(rr(Fo,"app.initialize"),e)}function Ho(){var e,t;if(Ln())return null;const n=null!==(e=Cc.currentWindow)&&void 0!==e?e:window;if(n.parent===n)return null;const r=n.location.ancestorOrigins,o=null==r?void 0:r.item(0);if(o)return o;const i=null===(t=n.document)||void 0===t?void 0:t.referrer;if(!i)return null;try{const e=new URL(i).origin;return e===n.location.origin?null:e}catch(e){return null}}function _o(e){Cc.currentWindow=e}function Vo(){Zn.initializeCalled&&(Fs(),Zn.initializeCalled=!1,Zn.initializeCompleted=!1,Zn.initializePromise=void 0,Zn.additionalValidOrigins=[],Zn.frameContext=void 0,Zn.hostClientType=void 0,Zn.isFramelessWindow=!1,yo(),To(),bc())}function Bo(){return new Promise(e=>{Zr(),e(Ec(rr(Fo,"app.getContext"),"getContext"))}).then(e=>Qo(e))}function jo(){Zr(),ca(rr(Fo,"app.notifyAppLoaded"))}function Wo(){return da(rr(Fo,"app.notifySuccess"))}function zo(e){Zr(),la(rr(Fo,"app.notifyFailure"),e)}function qo(e){Zr(),ua(rr(Fo,"app.notifyExpectedFailure"),e)}function $o(e){ma(rr(Fo,"app.registerOnThemeChangeHandler"),e)}function Go(e){va(rr(Fo,"app.registerOnContextChangeHandler"),e)}function Jo(e){Bs(e)}function Ko(e){return wa(rr(Fo,"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:dn.teams,clientType:e.hostClientType?e.hostClientType:ln.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new fo(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Zn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Zo(e){fi(rr(li,"dialog.update.resize"),e)}function Xo(){return!(!Xr(dr)||!dr.supports.dialog)&&!!dr.supports.dialog.update}function Yo(e,t,n){gi(rr(li,"dialog.url.bot.open"),e,t,n)}function ei(){return Xr(dr)&&void 0!==(dr.supports.dialog&&dr.supports.dialog.url&&dr.supports.dialog.url.bot)}function ti(e){if(Xr(dr,fn.task),!oi())throw wn;Nc(rr(li,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function ni(e){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!oi())throw wn;Nc(rr(li,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function ri(e){if(Xr(dr,fn.task),!oi())throw wn;for(Ns("messageForChild"),xs(rr(li,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),wi.reverse();wi.length>0;){e(wi.pop())}}function oi(){var e,t;return Xr(dr)&&!!(null===(t=null===(e=dr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ii(e,t,n){pi(rr(li,"dialog.url.open"),e,t,n)}function ai(e,t){hi(rr(li,"dialog.url.submit"),e,t)}function si(){return Xr(dr)&&void 0!==(dr.supports.dialog&&dr.supports.dialog.url)}function ci(e){return{url:e.url,height:e.size?e.size.height:mn.Small,width:e.size?e.size.width:mn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ui(e){const t=ci(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(xo||(xo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(No||(No={})),ko("teamsjs instance is version %s, starting at %s UTC (%s local)",Pr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Ln())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?ko("teamsjs is being used from %s. %s",t,n):ko("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const li="v2",di="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 fi(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.task,fn.meetingStage),!Xo())throw wn;Nc(e,"tasks.updateTask",[t])}function pi(e,t,n,r){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!si())throw wn;r&&xs(rr(li,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Nc(e,"tasks.startTask",[ci(t)],(e,t)=>{null==n||n({err:e,result:t}),Ns("messageForParent")})}function gi(e,t,n,r){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!ei())throw wn;r&&xs(rr(li,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Nc(e,"tasks.startTask",[ui(t)],(e,t)=>{null==n||n({err:e,result:t}),Ns("messageForParent")})}function hi(e,t,n){if(Xr(dr,fn.content,fn.task),!si())throw wn;Zn.frameContext===fn.content&&console.warn(di),Nc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function mi(e){return{card:e.card,height:e.size?e.size.height:mn.Small,width:e.size?e.size.width:mn.Small,title:e.title}}function vi(e){const t=mi(e);return t.completionBotId=e.completionBotId,t}const wi=[];function Ci(e){Zn.frameContext&&(Zn.frameContext===fn.task?wi.push(e):Ns("messageForChild"))}function yi(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!Si())throw wn;const n=vi(e);Nc(rr(li,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Si(){const e=dr.hostVersionsInfo&&dr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Mn(dr.hostVersionsInfo.adaptiveCardSchemaVersion);return Xr(dr)&&void 0!==(e&&dr.supports.dialog&&dr.supports.dialog.card&&dr.supports.dialog.card.bot)}function bi(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!Ei())throw wn;const n=mi(e);Nc(rr(li,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ei(){const e=dr.hostVersionsInfo&&dr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Mn(dr.hostVersionsInfo.adaptiveCardSchemaVersion);return Xr(dr)&&void 0!==(e&&dr.supports.dialog&&dr.supports.dialog.card)}function Ai(){xs(rr(li,"dialog.registerMessageForChildHandler"),"messageForChild",Ci,!1)}function Ii(){return!(!Xr(dr)||!dr.supports.dialog)}const Pi="v2";var Ti,Oi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ti||(Ti={}));class Ri{constructor(){this.enabled=!0,this.selected=!1}}let Fi,ki,Mi,xi,Ni;function Ui(){xs(rr(Pi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",_i,!1),xs(rr(Pi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Bi,!1),xs(rr(Pi,"menus.registerSetModuleViewHandler"),"setModuleView",Li,!1)}function Di(e,t){if(Xr(dr),!ji())throw wn;Mi=t,Nc(rr(Pi,"menus.setUpViews"),"setUpViews",[e])}function Li(e){Mi&&Mi(e)||(Xr(dr),Nc(rr(Pi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Hi(e,t){if(Xr(dr),!ji())throw wn;Fi=t,Nc(rr(Pi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function _i(e){Fi&&Fi(e)||(Xr(dr),Nc(rr(Pi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Vi(e,t){if(Xr(dr),!ji())throw wn;ki=t,Nc(rr(Pi,"menus.showActionMenu"),"showActionMenu",[e])}function Bi(e){ki&&ki(e)||(Xr(dr),Nc(rr(Pi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ji(){return!(!Xr(dr)||!dr.supports.menus)}function Wi(){xs(rr(ss,"pages.config.registerSettingsSaveHandler"),"settings.save",Qi,!1),xs(rr(ss,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Yi,!1)}function zi(e){return ms(rr(ss,"pages.config.setValidityState"),e)}function qi(e){return ws(rr(ss,"pages.config.setConfig"),e)}function $i(e){Gi(rr(ss,"pages.config.registerOnSaveHandler"),e,()=>{if(!po(e)&&!ta())throw wn})}function Gi(e,t,n){!po(t)&&Xr(dr,fn.settings),n&&n(),xi=t,!po(t)&&Nc(e,"registerHandler",["save"])}function Ji(e){Ki(rr(ss,"pages.config.registerOnRemoveHandler"),e,()=>{if(!po(e)&&!ta())throw wn})}function Ki(e,t,n){!po(t)&&Xr(dr,fn.remove,fn.settings),n&&n(),Ni=t,!po(t)&&Nc(e,"registerHandler",["remove"])}function Qi(e){const t=new Xi(e);xi?xi(t):ec()?sc("settings.save",[e]):t.notifySuccess()}function Zi(e){Ds(rr(ss,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[fn.content],()=>{if(!ta())throw wn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Oi||(Oi={}));class Xi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Nc(rr(ss,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Nc(rr(ss,"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 Yi(){const e=new ea;Ni?Ni(e):ec()?sc("settings.remove",[]):e.notifySuccess()}class ea{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Nc(rr(ss,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Nc(rr(ss,"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 ta(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.config}class na{}class ra extends na{validate(e){return!0}deserialize(e){return e}}var oa=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 ia=6e4,aa=nr("app");function sa(e,t){if(Ln()){return aa.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Fn(()=>ha(e,t),ia,new Error("SDK initialization timed out."))}function ca(e){Nc(e,Mo.AppLoaded,[Pr])}function ua(e,t){Nc(e,Mo.ExpectedFailure,[t.reason,t.message])}function la(e,t){Nc(e,Mo.Failure,[t.reason,t.message,t.authHeader])}function da(e){return oa(this,void 0,void 0,function*(){if(Zn.initializeCompleted)return pa(e);if(!Zn.initializePromise)throw new Error(dt);return Zn.initializePromise.then(()=>pa(e))})}function fa(){var e;return Xr(dr)&&!!(null===(e=dr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function pa(e){return oa(this,void 0,void 0,function*(){return fa()?Rc(Mo.Success,[Pr],new ra,e).then(()=>({hasFinishedSuccessfully:!0})):(Nc(e,Mo.Success,[Pr]),{hasFinishedSuccessfully:"unknown"})})}const ga=aa.extend("initializeHelper");function ha(e,t){return new Promise(n=>{Zn.initializeCalled||(Zn.initializeCalled=!0,Rs(),Zn.initializePromise=Sc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Qe})=>{Zn.frameContext=e,Zn.hostClientType=t,Zn.clientSupportedSDKVersion=r;try{ga("Parsing %s",n);let e=JSON.parse(n);if(ga("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Jn(e),n&&Ar(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ga("Attempting to parse %s as an SDK version",n),isNaN(An(n,Qe))||(Zn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ga("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=Jn(e),Ar(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ar(br(Zn.clientSupportedSDKVersion,fr,Cr))}}Zn.initializeCompleted=!0}),Ui(),Wi(),Ai()),Array.isArray(t)&&no(t),void 0!==Zn.initializePromise?n(Zn.initializePromise):ga("GlobalVars.initializePromise is unexpectedly undefined")})}function ma(e,t){!po(t)&&Zr(),Ls(e,t)}function va(e,t){!po(t)&&Zr(),Hs(e,t)}function wa(e,t){return new Promise(n=>{Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),n(Ac(e,"executeDeepLink",t))})}var Ca=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 ya=[];const Sa=nr("validateOrigin");let ba;function Ea(){return Ca(this,void 0,void 0,function*(){ba||(yield Ia())})}function Aa(){return 0===ya.length}function Ia(e=!1){return Ca(this,void 0,void 0,function*(){if(!Aa()&&!e)return ya;if(ba)return ba;if(Ln())return ya=at,at;{Sa("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),st);return ba=fetch(ct,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return Sa("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Pa(JSON.stringify(e)))return ya=e.validOrigins,ya;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?Sa(`validOrigins fetch call to CDN failed due to Timeout of ${st} ms. Defaulting to fallback list`):Sa("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ya=at,ya)),ba}})}function Pa(e){let t;try{t=JSON.parse(e)}catch(e){return!1}if(!t||!Array.isArray(t.validOrigins))return!1;for(const e of t.validOrigins){if("string"!=typeof e)return!1;try{new URL("https://"+e)}catch(t){return Sa("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}}return!0}function Ta(e,t){let n;try{const t=Gr(e,Sa);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Oa(e,t){const n=t||Aa()?at:ya;return Ra(e,n)?Promise.resolve(!0):(Sa("Origin %s is not in the local valid origins list, fetching from CDN",e),Ia(t).then(t=>Ra(e,t)))}function Ra(e,t){for(const t of Zn.additionalValidOrigins)if(Ta(t,e))return!0;const n=e.host;return xn(e)?!!t.some(e=>zr(e,n))||(Sa("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Zn.additionalValidOrigins),!1):(Sa("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Fa(e){Ds(rr(ss,"pages.appButton.onClick"),"appButtonClick",e,[fn.content],()=>{if(!xa())throw wn})}function ka(e){Ds(rr(ss,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[fn.content],()=>{if(!xa())throw wn})}function Ma(e){Ds(rr(ss,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[fn.content],()=>{if(!xa())throw wn})}function xa(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.appButton}function Na(){As()}function Ua(){return us(rr(ss,"pages.backStack.navigateBack"))}function Da(e){La(rr(ss,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!po(e)&&!Ha())throw wn})}function La(e,t,n){!po(t)&&Xr(dr),n&&n(),Es(t),!po(t)&&Nc(e,"registerHandler",["backButton"])}function Ha(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.backStack}function _a(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!Ba())throw wn;t(Pc(rr(ss,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Va(){return new Promise(e=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!Ba())throw wn;e(Pc(rr(ss,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Ba(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.currentApp}function ja(){if(Xr(dr,fn.content),!za())throw wn;Nc(rr(ss,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Wa(){if(Xr(dr,fn.content),!za())throw wn;Nc(rr(ss,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function za(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.fullTrust}function qa(e){return ls(rr(ss,"pages.tabs.navigateToTab"),e)}function $a(e){return fs(rr(ss,"pages.tabs.getTabInstances"),e)}function Ga(e){return ps(rr(ss,"pages.tabs.getMruTabInstances"),e)}function Ja(){return!(!Xr(dr)||!dr.supports.pages)&&!!dr.supports.pages.tabs}var Ka,Qa;function Za(e){const t=rr(ss,"pages.returnFocus");if(Xr(dr),!as())throw wn;if(void 0===e&&Nc(t,"returnFocus",[!1]),"boolean"==typeof e)Nc(t,"returnFocus",[e]);else switch(e){case Qa.PreviousLandmark:case Qa.GoToActivityFeed:Nc(t,"returnFocus",[!1,e]);break;case Qa.NextLandmark:Nc(t,"returnFocus",[!0,e])}}function Xa(e){Ds(rr(ss,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!as())throw wn})}function Ya(e){hs(rr(ss,"pages.setCurrentFrame"),e)}function es(e,t,n){Ea(),sa(rr(ss,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Ya(e)}function ts(){return vs(rr(ss,"pages.getConfig."))}function ns(e){return cs(rr(ss,"pages.navigateCrossDomain"),e)}function rs(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!as())throw wn;const n=rr(ss,"pages.navigateToApp");if(dr.isLegacyTeams){t(Ac(n,"executeDeepLink",kn(Cs(e)?e:ys(e))))}else{t(Ac(n,"pages.navigateToApp",Cs(e)?Ss(e):e))}})}function os(e){return gs(rr(ss,"pages.shareDeepLink"),e)}function is(e){Ds(rr(ss,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!po(e)&&!as())throw wn})}function as(){return!(!Xr(dr)||!dr.supports.pages)}Ea(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ka||(Ka={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Qa||(Qa={}));const ss="v2";function cs(e,t){return new Promise(n=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.remove,fn.task,fn.stage,fn.meetingStage),!as())throw wn;n(Ic(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function us(e){return new Promise(t=>{if(Xr(dr),!Ha())throw wn;t(Ic(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ls(e,t){return new Promise(n=>{if(Xr(dr),!Ja())throw wn;n(Ic(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function ds(e,t){if(Xr(dr),!as())throw wn;Nc(e,"returnFocus",[t])}function fs(e,t){return new Promise(n=>{if(Xr(dr),!Ja())throw wn;n(Ec(e,"getTabInstances",t))})}function ps(e,t){return new Promise(n=>{if(Xr(dr),!Ja())throw wn;n(Ec(e,"getMruTabInstances",t))})}function gs(e,t){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!as())throw wn;Nc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function hs(e,t){if(Xr(dr,fn.content),!as())throw wn;Nc(e,"setFrameContext",[t])}function ms(e,t){if(Xr(dr,fn.settings,fn.remove),!ta())throw wn;Nc(e,"settings.setValidityState",[t])}function vs(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.settings,fn.remove,fn.sidePanel),!as())throw wn;t(Ec(e,"settings.getSettings"))})}function ws(e,t){return new Promise(n=>{if(Xr(dr,fn.content,fn.settings,fn.sidePanel),!ta())throw wn;n(Ac(e,"settings.setSettings",t))})}function Cs(e){return e.appId instanceof fo}function ys(e){return Object.assign(Object.assign({},e),{appId:new fo(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ss(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let bs;function Es(e){bs=e}function As(){xs(rr(ss,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Is,!1)}function Is(){bs&&bs()||(ec()?sc("backButtonPress",[]):Ua())}var Ps=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Ts=nr("handlers");class Os{static initializeHandlers(){Os.handlers.themeChange=_s,Os.handlers.contextChange=Vs,Os.handlers.load=zs,Os.handlers.beforeUnload=Gs,As()}static uninitializeHandlers(){Os.handlers={},Os.themeChangeHandler=null,Os.beforeUnloadHandler=null,Os.beforeSuspendOrTerminateHandler=null,Os.resumeHandler=null,Os.contextChangeHandler=null}}function Rs(){Os.initializeHandlers()}function Fs(){Os.uninitializeHandlers()}Os.handlers={},Os.themeChangeHandler=null,Os.loadHandler=null,Os.beforeUnloadHandler=null,Os.beforeSuspendOrTerminateHandler=null,Os.resumeHandler=null,Os.hostToAppPerformanceMetricsHandler=null,Os.contextChangeHandler=null;const ks=Ts.extend("callHandler");function Ms(e,t){const n=Os.handlers[e];if(n){ks("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return ec()?(sc(e,t),[!1,void 0]):(ks("Handler for action message %s not found.",e),[!1,void 0])}function xs(e,t,n,r=!0,o=[]){n?(Os.handlers[t]=n,r&&Nc(e,"registerHandler",[t,...o])):delete Os.handlers[t]}function Ns(e){delete Os.handlers[e]}function Us(e){return null!=Os.handlers[e]}function Ds(e,t,n,r,o){n&&Xr(dr,...r),o&&o(),xs(e,t,n)}function Ls(e,t){Os.themeChangeHandler=t,!po(t)&&Nc(e,"registerHandler",["themeChange"])}function Hs(e,t){Os.contextChangeHandler=t,!po(t)&&Nc(e,"registerHandler",["contextChange"])}function _s(e){Os.themeChangeHandler&&Os.themeChangeHandler(e),ec()&&sc("themeChange",[e])}function Vs(e){Os.contextChangeHandler&&Os.contextChangeHandler(e),ec()&&sc("contextChange",[e])}function Bs(e){Os.hostToAppPerformanceMetricsHandler=e}function js(e){Os.hostToAppPerformanceMetricsHandler&&Os.hostToAppPerformanceMetricsHandler(e)}function Ws(e,t){Os.loadHandler=t,!po(t)&&Nc(e,"registerHandler",["load"])}function zs(e){const t=qs(e);Os.resumeHandler?(Os.resumeHandler(t),ec()&&sc("load",[t])):Os.loadHandler&&(Os.loadHandler(e),ec()&&sc("load",[e]))}function qs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function $s(e,t){Os.beforeUnloadHandler=t,!po(t)&&Nc(e,"registerHandler",["beforeUnload"])}function Gs(){return Ps(this,void 0,void 0,function*(){const e=()=>{Nc(rr("v2","handleBeforeUnload"),"readyToUnload",[])};Os.beforeSuspendOrTerminateHandler?(yield Os.beforeSuspendOrTerminateHandler(),ec()?sc("beforeUnload"):e()):Os.beforeUnloadHandler&&Os.beforeUnloadHandler(e)||(ec()?sc("beforeUnload"):e())})}function Js(e){Os.beforeSuspendOrTerminateHandler=e,!po(e)&&Nc(rr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ks(e){Os.resumeHandler=e,!po(e)&&Nc(rr("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 Zs=nr("childProxyingCommunication");class Xs{}function Ys(){Xs.window=null,Xs.origin=null,Xs.messageQueue=[]}function ec(){return!!Rr()&&!!Xs.window}function tc(e,t){return!!Rr()&&(Xs.window&&!Xs.window.closed&&e!==Xs.window||(Xs.window=e,Xs.origin=t),Xs.window&&Xs.window.closed?(Xs.window=null,Xs.origin=null,!1):Xs.window===e)}function nc(e,t,n,r){return Qs(this,void 0,void 0,function*(){Xs.window===t&&(jr(Xs.window,Xs.origin,Xs.messageQueue,"child"),oc(e,n,r))})}Xs.messageQueue=[];const rc=Zs.extend("handleIncomingMessageFromChild");function oc(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Lr(e.data),[o,i]=Ms(r.func,r.args);if(o&&void 0!==i)return rc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Vr(r),r.func),void ac(r.id,r.uuid,Array.isArray(i)?i:[i]);rc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Vr(r),r.func),ic(r,t,n)}function ic(e,t,n){const r=t(rr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Xs.origin;n(r.uuid,(...t)=>{if(!Xs.window)return;if(!Mr().disableEnforceOriginMatchForChildResponses&&o!==Xs.origin)return void rc("Origin of child window has changed, not sending response back to child window");const n=t.pop();rc("Message from parent being relayed to child, id: %s",Vr(e)),ac(e.id,e.uuid,t,n)})}function ac(e,t,n,r){const o=Xs.window,i=cc(e,t,n,r),a=_r(i),s=Xs.origin;o&&s&&(rc("Sending message %s to %s via postMessage, args = %o",Vr(a),"child",a.args),o.postMessage(a,s))}function sc(e,t){const n=Xs.window,r=uc(e,t),o=Xs.origin;n&&o?n.postMessage(r,o):Xs.messageQueue.push(r)}function cc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function uc(e,t){return{func:e,args:t||[]}}class lc{static storeCallbackInformation(e,t){lc.callbackInformation.set(e,t)}static clearMessages(){lc.callbackInformation.clear()}static deleteMessageInformation(e){lc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?js({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=lc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(js({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),lc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}lc.callbackInformation=new Map;const dc=nr("nestedAppAuthUtils"),fc=dc.extend("tryPolyfillWithNestedAppAuthBridge"),pc="v2";function gc(e,t,n){var r;const o=fc;if(Zn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=mc(a,n);s&&(a.nestedAppAuthBridge=s)}const hc=dc.extend("createNestedAppAuthBridge");function mc(e,t){const n=hc;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=rr(pc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var vc=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const wc=nr("communication");class Cc{}class yc{}function Sc(e,t){if(yc.messageListener=e=>jc(e),Cc.currentWindow=Cc.currentWindow||Dn(),Cc.parentWindow=Cc.currentWindow.parent!==Cc.currentWindow.self?Cc.currentWindow.parent:Cc.currentWindow.opener,Cc.topWindow=Cc.currentWindow.top,(Cc.parentWindow||e)&&Cc.currentWindow.addEventListener("message",yc.messageListener,!1),!Cc.parentWindow){const e=Cc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Zn.isFramelessWindow=!0,e.onNativeMessage=Xc}try{return Cc.parentOrigin="*",Tc(t,"initialize",[Pr,sr,e]).then(([e,t,n,r])=>(gc(r,Cc.currentWindow,{onMessage:zc,sendPostMessage:Dc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{Cc.parentOrigin=null}}function bc(){Cc.currentWindow&&Cc.currentWindow.removeEventListener("message",yc.messageListener,!1),Cc.currentWindow=null,Cc.parentWindow=null,Cc.parentOrigin=null,yc.parentMessageQueue=[],yc.nextMessageId=0,yc.callbacks.clear(),yc.promiseCallbacks.clear(),yc.portCallbacks.clear(),yc.legacyMessageIdsToUuidMap={},lc.clearMessages(),Ys()}function Ec(e,t,...n){return Tc(e,t,n).then(([e])=>e)}function Ac(e,t,...n){return Tc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Ic(e,t,n,...r){return Tc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Pc(e,t,...n){return Tc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Tc(e,t,n=void 0){if(!or(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(xc(Vc(e,t,n).uuid))})}function Oc(e){return e.map(e=>Ir(e)?e.serialize():e)}function Rc(e,t,n,r,o){var i;return vc(this,void 0,void 0,function*(){const a=Oc(t),[s]=yield Tc(r,e,a);if(o&&o(s)||!o&&Je(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(`${Ve.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Fc(e,t,n,r){var o;return vc(this,void 0,void 0,function*(){const i=Oc(t),[a]=yield Tc(n,e,i);if(r&&r(a)||!r&&Je(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ve.INTERNAL_ERROR}, message: Invalid response from host`)})}function kc(e,t,n=void 0){if(!or(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 Mc(Vc(e,t,n).uuid)}function Mc(e){return new Promise((t,n)=>{yc.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 xc(e){return new Promise(t=>{yc.promiseCallbacks.set(e,t)})}function Nc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!or(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=Vc(e,t,o);r&&yc.callbacks.set(i.uuid,r)}yc.parentMessageQueue=[],yc.topMessageQueue=[],yc.nextMessageId=0,yc.callbacks=new Map,yc.promiseCallbacks=new Map,yc.portCallbacks=new Map,yc.legacyMessageIdsToUuidMap={};const Uc=wc.extend("sendNestedAuthRequestToTopWindow");function Dc(e,t){const n=Uc,r=Cc.topWindow,o=au(e,t);return n("Message %s information: %o",Vr(o),{actionName:o.func}),Hc(r,o)}const Lc=wc.extend("sendRequestToTargetWindowHelper");function Hc(e,t){const n=Lc,r=ru(e),o=Dr(t);if(Zn.isFramelessWindow)Cc.currentWindow&&Cc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Vr(o),r),Cc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=nu(e);e&&i?(n("Sending message %s to %s via postMessage",Vr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Vr(o),r),tu(e).push(t))}return t}const _c=wc.extend("sendMessageToParentHelper");function Vc(e,t,n,r,o){const i=_c,a=Cc.parentWindow,s=iu(e,t,n,r,o);return lc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Vr(s),{actionName:t,args:n}),Hc(a,s)}const Bc=wc.extend("processIncomingMessage");function jc(e){return vc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Bc("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 $c(t,n).then(r=>{r?(Gc(t,n),t!==Cc.parentWindow?tc(t,n)&&nc(e,t,Vc,(e,t)=>yc.callbacks.set(e,t)):Xc(e)):Bc("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 Wc=wc.extend("processAuthBridgeMessage");function zc(e,t){var n,r;const o=Wc;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?$c(c,u).then(e=>{e?(Cc.topWindow&&!Cc.topWindow.closed&&c!==Cc.topWindow||(Cc.topWindow=c,Cc.topOrigin=u),Cc.topWindow&&Cc.topWindow.closed&&(Cc.topWindow=null,Cc.topOrigin=null),jr(Cc.topWindow,Cc.topOrigin,yc.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")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const qc=wc.extend("verifyIncomingMessageOrigin");function $c(e,t){return vc(this,void 0,void 0,function*(){if(Cc.currentWindow&&e===Cc.currentWindow)return qc("Should not process message because it is coming from the current window"),!1;if(Cc.currentWindow&&Cc.currentWindow.location&&t&&t===Cc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return qc("Message has an invalid origin of %s",t),!1}const n=yield Oa(e);return n||qc("Message has an invalid origin of %s",t),n}})}function Gc(e,t){Zn.isFramelessWindow||Cc.parentWindow&&!Cc.parentWindow.closed&&e!==Cc.parentWindow||(Cc.parentWindow=e,Cc.parentOrigin=t),Cc.parentWindow&&Cc.parentWindow.closed&&(Cc.parentWindow=null,Cc.parentOrigin=null),jr(Cc.parentWindow,Cc.parentOrigin,yc.parentMessageQueue,"parent")}const Jc=wc.extend("handleIncomingMessageFromParent");function Kc(e){const t=Jc;if(!e.uuid)return yc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Qc(yc.callbacks,t);if(n)return n;const r=Qc(yc.promiseCallbacks,t);if(r)return r;const o=Qc(yc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Vr(e))}function Qc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Zc(e,t){const n=Qc(t,e.uuid);n&&t.delete(n),e.uuid?yc.legacyMessageIdsToUuidMap={}:delete yc.legacyMessageIdsToUuidMap[e.id]}function Xc(e){const t=Jc,n=$n();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Hr(r),i=Kc(o);if(i){const r=yc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),lc.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]),Yc(e)||(t("Removing registered callback for message %s",i.toString()),Zc(o,yc.callbacks)));const a=yc.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()),Zc(o,yc.promiseCallbacks));const s=yc.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()),Zc(o,yc.portCallbacks)}o.uuid&&(yc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;lc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Vr(r),r.func),Ms(r.func,r.args)}else t("Received an unknown message: %O",e)}function Yc(e){return!0===e.data.isPartialResponse}function eu(){return Cc.topWindow!==Cc.parentWindow}function tu(e){return e===Cc.topWindow&&eu()?yc.topMessageQueue:e===Cc.parentWindow?yc.parentMessageQueue:[]}function nu(e){return e===Cc.topWindow&&eu()?Cc.topOrigin:e===Cc.parentWindow?Cc.parentOrigin:null}function ru(e){return e===Cc.topWindow&&eu()?"top":e===Cc.parentWindow?"parent":null}function ou(e,t){let n;n=Cc.currentWindow.setInterval(()=>{0===tu(e).length&&(clearInterval(n),t())},100)}function iu(e,t,n,r,o){const i=yc.nextMessageId++,a=new Kn;yc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Zn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:$n(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function au(e,t){const n=yc.nextMessageId++,r=new Kn;return yc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:$n(),apiVersionTag:t,args:[],data:e}}const su="v1";function cu(e){if(!po(e)&&Xr(dr),!po(e)&&!uu())throw wn;e?xs(rr(su,"log.request"),"log.request",()=>{const t=e();Nc(rr(su,"log.receive"),"log.receive",[t])}):Ns("log.request")}function uu(){return!(!Xr(dr)||!dr.supports.logs)}var lu,du,fu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(lu||(lu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(du||(du={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(fu||(fu={}));const pu="v1";function gu(e,t){Xr(dr),Nc(rr(pu,"uploadCustomApp"),"uploadCustomApp",[e],t||En())}function hu(e,t,n){Xr(dr),Nc(rr(pu,"sendCustomMessage"),e,t,n)}function mu(e,t){if(Xr(dr),!ec())throw new Error("The child window has not yet been initialized or is not present");sc(e,t)}function vu(e,t){Xr(dr),xs(rr(pu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function wu(e,t){Xr(dr),xs(rr(pu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Cu(e){Xr(dr,fn.content,fn.sidePanel,fn.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,e.shareUrl,e.replyChainId];Nc(rr(pu,"openFilePreview"),"openFilePreview",t)}const yu="v1";function Su(e){if(Xr(dr,fn.content),!Iu())throw wn;return Fc("contextualSearch.openContextualSearch",[null==e?void 0:e.triggerSource],rr(yu,"contextualSearch.openContextualSearch"))}function bu(){if(Xr(dr,fn.content),!Iu())throw wn;return Fc("contextualSearch.closeContextualSearch",[],rr(yu,"contextualSearch.closeContextualSearch"))}function Eu(e){Ds(rr(yu,"contextualSearch.registerOpenContextualSearchHandler"),"contextualSearchOpened",e,[fn.content],()=>{if(!Iu())throw wn})}function Au(e){Ds(rr(yu,"contextualSearch.registerCloseContextualSearchHandler"),"contextualSearchClosed",e,[fn.content],()=>{if(!Iu())throw wn})}function Iu(){return Xr(dr)&&!!dr.supports.contextualSearch}const Pu="v1";function Tu(e){return new Promise(t=>{if(Xr(dr,fn.content),!Fu())throw wn;const n=Ac(rr(Pu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&xs(rr(Pu,"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&&xs(rr(Pu,"conversations.registerCloseConversationHandler"),"closeConversation",(t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})}),t(n)})}function Ou(){if(Xr(dr,fn.content),!Fu())throw wn;Nc(rr(Pu,"conversations.closeConversation"),"conversations.closeConversation"),Ns("startConversation"),Ns("closeConversation")}function Ru(){return new Promise(e=>{if(Xr(dr),!Fu())throw wn;e(Ec(rr(Pu,"conversations.getChatMember"),"getChatMembers"))})}function Fu(){return!(!Xr(dr)||!dr.supports.conversations)}var ku=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Mu="v2",xu=nr("copilot");function Nu(){var e;return Xr(dr)&&!!(null===(e=dr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Uu(e,t){var n;return void 0===t&&(t=null!==(n=$n())&&void 0!==n?n:Date.now()),ku(this,void 0,void 0,function*(){return Xr(dr),xu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Fc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],rr(Mu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Du=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 Lu="v2",Hu=nr("copilot");function _u(){var e,t;return Xr(dr)&&(!!(null===(e=dr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=dr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Vu(e){var t,n,r;return Du(this,void 0,void 0,function*(){if(Xr(dr),!_u())throw new Error(`Error code: ${wn.errorCode}, message: Not supported on platform`);if((null===(t=dr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Hu("Eligibility information is already available on runtime."),dr.hostVersionsInfo.appEligibilityInformation;Hu("Eligibility information is not available on runtime. Requesting from host.");const o=yield Ec(rr(Lu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Je(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(!Bu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=ze.NotAdult),o})}function Bu(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 ju,Wu,zu,qu,$u,Gu,Ju,Ku,Qu;!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"}(ju||(ju={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Wu||(Wu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(zu||(zu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(qu||(qu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}($u||($u={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Gu||(Gu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Ju||(Ju={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Ku||(Ku={})),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"}(Qu||(Qu={}));class Zu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Xu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Yu="v2";function el(){var e;return Xr(dr)&&!!(null===(e=dr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function tl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Qu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Je(e)}function nl(e){return Xu(this,void 0,void 0,function*(){Xr(dr);return Rc("copilot.sidePanel.getContent",e?[new cl(e)]:[],new al,rr(Yu,"copilot.sidePanel.getContent"),tl)})}function rl(e){return Xu(this,void 0,void 0,function*(){Xr(dr);return Rc("copilot.sidePanel.preCheckUserConsent",e?[new ul(e)]:[],new sl,rr(Yu,"copilot.sidePanel.preCheckUserConsent"),tl)})}function ol(e){Ds(rr(Yu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[fn.content],()=>{if(!el())throw il})}const il=new Zu(Qu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class al extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class sl extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class cl{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class ul{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var ll=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const dl="v2";function fl(){var e;return Xr(dr)&&!!(null===(e=dr.supports.copilot)||void 0===e?void 0:e.view)}function pl(){return ll(this,void 0,void 0,function*(){Xr(dr),yield Rc("copilot.view.closeSidePanel",[],new gl,rr(dl,"copilot.view.closeSidePanel"))})}class gl extends na{validate(e){return!0}deserialize(e){return e}}const hl="v2";class ml{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function vl(e){if("object"!=typeof e||null===e)return!1;const t=e;return t.responseType===yl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const wl="Action.Execute";var Cl,yl,Sl,bl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Cl||(Cl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(yl||(yl={}));class El extends na{validate(e){return vl(e)}deserialize(e){return e}}function Al(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Sl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Il(e){e.requestType===Cl.ActionExecuteInvokeRequest?Pl(e):e.requestType===Cl.QueryMessageExtensionRequest&&Tl(e)}function Pl(e){if(e.type!==wl){throw{errorCode:Sl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${wl}"`}}if(!Gn(e.data)){throw{errorCode:Sl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Tl(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 Ol(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;const r=new fo(e);return Il(n),Tc(rr(hl,"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 Rl(e,t){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;const n=new fo(e);return Tc(rr(hl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function Fl(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;const r=new fo(e);return Il(n),Tc(rr(hl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function kl(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e,new Error("titleId is Invalid.")),Hn(t,new Error("oauthConfigId is Invalid.")),Tc(rr(hl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function Ml(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e,new Error("titleId is Invalid.")),t&&_n(t),Tc(rr(hl,"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"}(Sl||(Sl={}));class xl{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 Nl(e){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e.connectorId,new Error("connectorId is Invalid.")),Hn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Fc("externalAppAuthentication.authenticateWithConnector",[new xl(e)],rr(hl,"externalAppAuthentication.authenticateWithConnector"),Al)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(bl||(bl={}));class Ul extends na{validate(e){return"string"==typeof e&&e in bl}deserialize(e){return e}}function Dl(e){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e.connectorId,new Error("connectorId is Invalid.")),Hn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Rc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new xl(e)],new Ul,rr(hl,"externalAppAuthentication.getUserAuthenticationStateForConnector"),Al)}function Ll(e){if(Xr(dr,fn.content,fn.sidePanel),!Hl())throw wn;return Hn(e.connectorId,new Error("connectorId is Invalid.")),Hn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Fc("externalAppAuthentication.disconnectConnector",[new xl(e)],rr(hl,"externalAppAuthentication.disconnectConnector"),Al)}function Hl(){return!(!Xr(dr)||!dr.supports.externalAppAuthentication)}var _l=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Vl="v2";function Bl(e,t,n){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Fc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],rr(Vl,"externalAppAuthenticationForCEA.authenticateWithSSO"),Al)})}function jl(e,t,n){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Fc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],rr(Vl,"externalAppAuthenticationForCEA.authenticateWithOauth"),Al)})}function Wl(e,t,n,r){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Pl(r),Rc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new ml(r),n.url.href,n.width,n.height,n.isExternal],new El,rr(Vl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Al)})}function zl(e,t,n,r){return _l(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ql())throw wn;return $l(e,t),Pl(r),Rc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new ml(r),n.authId,n.connectionName,n.claims,n.silent],new El,rr(Vl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Al)})}function ql(){return!(!Xr(dr)||!dr.supports.externalAppAuthenticationForCEA)}function $l(e,t){Hn(t,new Error("conversation id is not valid.")),uo(e)}const Gl="v2";var Jl,Kl;function Ql(e,t){if(Xr(dr,fn.content,fn.sidePanel),!Xl())throw wn;const n=new fo(e);return Tc(rr(Gl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Zl(e,t,n){if(Xr(dr,fn.content,fn.sidePanel),!Xl())throw wn;const r=new fo(e);return Tc(rr(Gl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Xl(){return!(!Xr(dr)||!dr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Jl||(Jl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Kl||(Kl={}));var Yl=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 ed="v2";function td(e,t,n){return Yl(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!rd())throw wn;$l(e,t);const[r,o]=yield Tc(rr(ed,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function nd(e,t,n){return Yl(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!rd())throw wn;$l(e,t);const r=yield Ec(rr(ed,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function rd(){return!(!Xr(dr)||!dr.supports.externalAppCardActionsForCEA)}var od;function id(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(od).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(od||(od={}));var ad=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 sd="v2";function cd(e,t,n){return ad(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!ud())throw wn;return ld(e,n),Fc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new dd(t),n],rr(sd,"externalAppCardActionsForDA.processActionOpenUrlDialog"),id)})}function ud(){return!(!Xr(dr)||!dr.supports.externalAppCardActionsForDA)}function ld(e,t){uo(e),Qn(t)}class dd{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var fd=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 pd="v2";function gd(e,t,n){return fd(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.sidePanel),!hd())throw wn;const r=new fo(e),[o,i]=yield Tc(rr(pd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function hd(){return!(!Xr(dr)||!dr.supports.externalAppCommands)}const md="v1";var vd,wd,Cd,yd,Sd,bd;function Ed(e,t){if(Xr(dr,fn.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");Nc(rr(md,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ad(e,t){if(Xr(dr,fn.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");Nc(rr(md,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Id(e,t,n){if(Xr(dr,fn.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");Nc(rr(md,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Pd(e,t,n){if(Xr(dr,fn.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");Nc(rr(md,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Td(e,t,n){if(Xr(dr,fn.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");Nc(rr(md,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Od(e=!1,t){if(Xr(dr,fn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Nc(rr(md,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Rd(e,t,n,r,o=!1,i){if(Xr(dr,fn.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");Nc(rr(md,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Fd(e){if(Xr(dr,fn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Nc(rr(md,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function kd(e=void 0,t){if(Xr(dr,fn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Nc(rr(md,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Md(e){if(Xr(dr,fn.content),!e)throw Bd(Ve.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Nc(rr(md,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function xd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Bd(Ve.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Nc(rr(md,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Nd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Bd(Ve.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Nc(rr(md,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ud(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Bd(Ve.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Nc(rr(md,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Dd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bd(Ve.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Nc(rr(md,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Ld(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bd(Ve.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Nc(rr(md,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Hd(e,t){if(Xr(dr,fn.content),!t)throw Bd(Ve.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bd(Ve.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Bd(Ve.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Nc(rr(md,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function _d(e){if(Xr(dr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");xs(rr(md,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Vd(e){if(Xr(dr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");xs(rr(md,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Bd(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"}(vd||(vd={})),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"}(wd||(wd={})),function(e){e.ClassMaterials="classMaterials"}(Cd||(Cd={})),function(e){e.Readonly="readonly"}(yd||(yd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Sd||(Sd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(bd||(bd={}));const jd="v1";function Wd(){return new Promise(e=>{if(Xr(dr),!Gd())throw wn;e(Pc(rr(jd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function zd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Xr(dr),!Gd())throw wn;t(Pc(rr(jd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function qd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Xr(dr),!Gd())throw wn;xs(rr(jd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Xr(dr),e(t)})}function $d(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Xr(dr),!Gd())throw wn;xs(rr(jd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Xr(dr),e(t)})}function Gd(){return!(!Xr(dr)||!dr.supports.meetingRoom)}function Jd(){return!(!Xr(dr)||!dr.supports.messageChannels)}const Kd="1.0.1",Qd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void of("Invalid message format, ignoring. Message: %o",e);if(!tf(e.source,e.origin))return void of("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return af("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void of("Invalid response format, ignoring. Message: %o",e);t(r)}};let Zd=null,Xd=!1;function Yd(e,t,n=!1){if(Xd=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.`);Zd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void of("Nested App Auth Bridge is already present");const o=ef(r);o&&(r.nestedAppAuthBridge=o)}function ef(e){const t=new WeakMap,{onMessage:n}=Qd,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 of(`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=nf(t);if(e===e.top||!Zd)return void af("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Zd)}}catch(e){return void af("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 tf(e,t){if(t===Zd)try{return"https:"===new URL(t).protocol}catch(e){return af("Invalid message origin URL:",e),!1}return!1}function nf(e){const t=Date.now();return{id:rf(),uuid:sn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function rf(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function of(...e){Xd&&console.log(...e)}function af(...e){Xd&&console.error(...e)}const sf="v1";function cf(e){if(Xr(dr,fn.content),!uf())throw wn;Nc(rr(sf,"notifications.showNotification"),"notifications.showNotification",[e])}function uf(){return!(!Xr(dr)||!dr.supports.notifications)}const lf="v2";function df(e){if(!gf())throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());if(po(e))throw new Error(Ve.INVALID_ARGUMENTS.toString());xs(rr(lf,"otherApp.install"),"otherApp.install",e)}function ff(){if(!gf())throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());Nc(rr(lf,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ns("otherApp.install")}function pf(e){if(!gf())throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());return Fc("otherApp.notifyInstallCompleted",[e.toString()],rr(lf,"otherApp.notifyInstallCompleted"))}function gf(){return!(!Xr(dr)||!dr.supports.otherAppStateChange)}var hf=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const mf="v2";function vf(){return Xr(dr)&&!!dr.supports.plugins}function wf(e){return hf(this,void 0,void 0,function*(){if(Xr(dr),!e.func)throw new Error("func is required in PluginMessage.");return Fc("plugins.sendMessage",[new yf(e)],rr(mf,"plugins.sendMessage"))})}function Cf(e){Ds(rr(mf,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(Sf(t))},Object.values(fn),()=>{if(!vf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class yf{constructor(e){this.message=e}serialize(){return this.message}}function Sf(e){if(1===e.length&&bf(e[0]))return e[0];const[t,n,r]=e;return{func:"string"==typeof t?t:String(null!=t?t:""),args:n,correlationId:"string"==typeof r?r:void 0}}function bf(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const Ef="v1";var Af,If,Pf;function Tf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Of(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(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Rf(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(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Ff(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;Nc(rr(Ef,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function kf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Mf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function xf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Nf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Xr(dr,fn.sidePanel),!Uf())throw wn;xs(rr(Ef,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Uf(){return!(!Xr(dr)||!dr.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"}(Af||(Af={})),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"}(If||(If={})),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"}(Pf||(Pf={}));const Df="v1";function Lf(e,t,n,r){if(Xr(dr,fn.content),!Hf())throw wn;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");Nc(rr(Df,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Hf(){return!(!Xr(dr)||!dr.supports.appEntity)}const _f="v1";function Vf(e){return new Promise(t=>{if(Xr(dr),!Bf())throw wn;if((Zn.hostClientType===ln.android||Zn.hostClientType===ln.teamsRoomsAndroid||Zn.hostClientType===ln.teamsPhones||Zn.hostClientType===ln.teamsDisplays)&&!Yr(et)){const e={errorCode:Ve.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ec(rr(_f,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function Bf(){return!(!Xr(dr)||!dr.supports.teams)&&(!!dr.supports.teams.fullTrust&&!!dr.supports.teams.fullTrust.joinedTeams)}var jf=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 Wf="v1";function zf(e){return jf(this,void 0,void 0,function*(){if(Xr(dr),!qf())throw wn;return Rc("getConfigSetting",[e],new ra,rr(Wf,"teams.fullTrust.getConfigSetting"))})}function qf(){return!(!Xr(dr)||!dr.supports.teams)&&!!dr.supports.teams.fullTrust}const $f="v1";var Gf;function Jf(e,t){if(Xr(dr,fn.content),!Qf())throw wn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Nc(rr($f,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Kf(e,t){if(Xr(dr),!Qf())throw wn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Nc(rr($f,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Qf(){return!(!Xr(dr)||!dr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Gf||(Gf={}));class Zf{static setTimeout(e,t){const n=performance.now(),r=In();return Zf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Zf.setTimeoutCallbacks[e]}static setInterval(e,t){Zf.setTimeout(function n(){e(),Zf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Zf.setTimeoutCallbacks){const r=Zf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Zf.setTimeoutCallbacks[e].callback(),delete Zf.setTimeoutCallbacks[e]}}}Zf.setTimeoutCallbacks={};class Xf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Zf.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&&Zf.clearTimeout(this.timeoutId),this.timeoutId=Zf.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 Yf="v2";class ep{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Xf(ep.distributionBinSize,e=>this.reportPerformanceEvent(rr(Yf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Zf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(rr(Yf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},ep.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){Zf.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(rr(Yf,"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(rr(Yf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ep.distributionBinSize=1e3,ep.calculateFPSInterval=1e3;var tp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})},np=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 rp="v2",op=Ln()?void 0:new ep(Nc);var ip,ap,sp;function cp(e){if(Xr(dr,fn.sidePanel),!pp())throw wn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(xs(rr(rp,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==op?void 0:op.setFrameProcessTimeLimit(e.timeLimit),!1),wp())gp(e.videoFrameHandler,e.config);else{if(!yp())throw wn;mp(e.videoBufferHandler,e.config)}null==op||op.startMonitorSlowFrameProcessing()}function up(e,t){if(Xr(dr,fn.sidePanel),!pp())throw wn;Nc(rr(rp,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function lp(e){if(Xr(dr,fn.sidePanel),!pp())throw wn;xs(rr(rp,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Mp(e,op),!1),Nc(rr(rp,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function dp(e){Nc(rr(rp,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function fp(e){Nc(rr(rp,"videoEffects.notifyError"),"video.notifyError",[e])}function pp(){return Xr(dr)&&!!dr.supports.video&&(!!dr.supports.video.mediaStream||!!dr.supports.video.sharedFrame)}function gp(e,t){if(Xr(dr,fn.sidePanel),!pp()||!wp())throw wn;xs(rr(rp,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>tp(this,void 0,void 0,function*(){const{streamId:n}=t,r=hp(e,op);yield Ep(n,r,fp,op)}),!1),Nc(rr(rp,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function hp(e,t){return n=>tp(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 mp(e,t){if(Xr(dr,fn.sidePanel),!pp()||!yp())throw wn;xs(rr(rp,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==op||op.reportStartFrameProcessing(t.width,t.height),e(vp(t),()=>{null==op||op.reportFrameProcessed(),dp(n)},fp)}},!1),Nc(rr(rp,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function vp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=np(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function wp(){var e;return Xr(dr,fn.sidePanel)&&Cp()&&!!(null===(e=dr.supports.video)||void 0===e?void 0:e.mediaStream)}function Cp(){var e,t,n,r;return!(!(null===(t=null===(e=Dn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Dn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function yp(){var e;return Xr(dr,fn.sidePanel)&&!!(null===(e=dr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(ip||(ip={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(ap||(ap={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(sp||(sp={}));var Sp=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 bp="v2";function Ep(e,t,n,r){var o,i;return Sp(this,void 0,void 0,function*(){const a=Pp();!Ln()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Tp(yield Ip(e,n,r),new Op(n,t),a.writable)})}function Ap(e,t,n,r){var o,i;return Sp(this,void 0,void 0,function*(){const a=Pp();!Ln()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Tp(yield Ip(e,n,r),new kp(n,t),a.writable)})}function Ip(e,t,n){return Sp(this,void 0,void 0,function*(){if(Ln())throw wn;const r=Dn().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 Pp(){if(Ln())throw wn;const e=window.MediaStreamTrackGenerator;if(!e)throw wn;return new e({kind:"video"})}function Tp(e,t,n){new(0,Dn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Op{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Sp(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 Rp{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 Fp{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 kp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Sp(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=>Sp(this,void 0,void 0,function*(){if(Ln())throw wn;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 Rp(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 Fp(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}}}),xs(rr(bp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function Mp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Nc(rr(bp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in sp?e:sp.InitializationFailure;Nc(rr(bp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var xp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Np="v2",Up=2e3,Dp=Ln()?void 0:new ep(Nc);var Lp;function Hp(e){var t,n;if(!qp())throw wn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Xr(dr,fn.sidePanel)){if(xs(rr(Np,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Dp?void 0:Dp.setFrameProcessTimeLimit(e),!1),null===(t=dr.supports.video)||void 0===t?void 0:t.mediaStream)xs(rr(Np,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>xp(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Dp?Vp(e.videoFrameHandler,Dp):e.videoFrameHandler;r?yield Ap(n,o,Gp,Dp):yield Ep(n,o,Gp,Dp)}),!1),Nc(rr(Np,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=dr.supports.video)||void 0===n?void 0:n.sharedFrame))throw wn;xs(rr(Np,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Dp||Dp.reportStartFrameProcessing(t.width,t.height);const n=_p(),r=t.timestamp;e.videoBufferHandler(Bp(t),()=>{n(),null==Dp||Dp.reportFrameProcessed(),$p(r)},Gp)}},!1),Nc(rr(Np,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Dp||Dp.startMonitorSlowFrameProcessing()}}function _p(){const e=setTimeout(()=>{Gp(`Frame not processed in ${Up}ms`,Lp.Warn)},Up);return function(){clearTimeout(e)}}function Vp(e,t){return n=>xp(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=_p(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function Bp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function jp(e,t,n){if(Xr(dr,fn.sidePanel),!qp())throw wn;Nc(rr(Np,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Wp(e){if(Xr(dr,fn.sidePanel),!qp())throw wn;xs(rr(Np,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Mp(e,Dp),!1),Nc(rr(Np,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function zp(e){if(Xr(dr,fn.sidePanel),!pp())throw wn;Nc(rr(Np,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function qp(){return Xr(dr),pp()}function $p(e){Nc(rr(Np,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Gp(e,t=Lp.Warn){Nc(rr(Np,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Jp(e){if(Xr(dr),!pp())throw wn;Gp(e,Lp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Lp||(Lp={}));const Kp="v2";class Qp extends na{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Zp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Xp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Yp extends na{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class eg{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class tg extends na{validate(e){const t=new Yp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function ng(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(cg(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ve.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Rc("hostEntity.tab.addAndConfigure",[new Xp(e),t],new Yp,rr(Kp,"hostEntity.tab.addAndConfigure"))}function rg(e){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return cg(e.threadId),Rc("hostEntity.tab.getAll",[new Xp(e)],new tg,rr(Kp,"hostEntity.tab.getAll"))}function og(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(e),cg(t.threadId),Rc("hostEntity.tab.reconfigure",[new Zp(e),new Xp(t)],new Qp,rr(Kp,"hostEntity.tab.reconfigure"))}function ig(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return ug(e),cg(t.threadId),Rc("hostEntity.tab.rename",[new Zp(e),new Xp(t)],new Qp,rr(Kp,"hostEntity.tab.rename"))}function ag(e,t){if(Xr(dr),!sg())throw new Error(`Error code: ${Ve.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return cg(t.threadId),ug(e),Rc("hostEntity.tab.remove",[new eg(e),new Xp(t)],new ra,rr(Kp,"hostEntity.tab.remove"))}function sg(){var e;return!!(Xr(dr)&&dg()&&(null===(e=dr.supports.hostEntity)||void 0===e?void 0:e.tab))}function cg(e){if(!e||0==e.length)throw new Error(`Error code: ${Ve.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function ug(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ve.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var lg;function dg(){return!(!Xr(dr)||!dr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(lg||(lg={}));var fg=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 pg="v2",gg="Invalid store dialog size",hg="No App Id present, but AppId needed to open AppDetail store",mg="No Collection Id present, but CollectionId needed to open a store specific to a collection";function vg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t}=null!=e?e:{};return Fc("store.openFullStore",[Eg(t)],rr(pg,"store.openFullStore"))})}function wg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t,appId:n}=e;if(!(n instanceof fo))throw new Error(hg);return Fc("store.openAppDetail",[Eg(t),n],rr(pg,"store.openAppDetail"))})}function Cg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Fc("store.openInContextStore",[Eg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],rr(pg,"store.openInContextStore"))})}function yg(e){return fg(this,void 0,void 0,function*(){bg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(mg);return Fc("store.openSpecificStore",[Eg(t),n],rr(pg,"store.openSpecificStore"))})}function Sg(){return Xr(dr)&&!!dr.supports.store}function bg(){if(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),!Sg())throw wn}function Eg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(gg);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(gg);return JSON.stringify(e)}var Ag=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 Ig="v1",Pg=nr("widgetHosting");function Tg(){return Xr(dr)&&!!dr.supports.widgetHosting}function Og(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Rc("widgetHosting.callTool",[new _g(e,t)],new Lg,rr(Ig,"widgetHosting.callTool"),Je)})}function Rg(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Fc("widgetHosting.sendFollowUpMessage",[new Vg(e,t)],rr(Ig,"widgetHosting.sendFollowUpMessage"))})}function Fg(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Fc("widgetHosting.requestDisplayMode",[new Bg(e,t)],rr(Ig,"widgetHosting.requestDisplayMode"))})}function kg(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Rc("widgetHosting.requestModal",[new qg(e,t)],new Hg,rr(Ig,"widgetHosting.requestModal"),Je)})}function Mg(e,t){Zr(),Pg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Fc("widgetHosting.notifyIntrinsicHeight",[new zg(e,t)],rr(Ig,"widgetHosting.notifyIntrinsicHeight"))}function xg(e,t,n){Zr(),Pg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Fc("widgetHosting.contentSizeChanged",[new $g(e,t,n)],rr(Ig,"widgetHosting.contentSizeChanged"))}function Ng(e,t){return Ag(this,void 0,void 0,function*(){return Zr(),Pg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Fc("widgetHosting.setWidgetState",[new Wg(e,t)],rr(Ig,"widgetHosting.setWidgetState"))})}function Ug(e,t){Zr(),Pg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Fc("widgetHosting.openExternal",[new jg(e,t)],rr(Ig,"widgetHosting.openExternal"))}function Dg(e){Ds(rr(Ig,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!Tg())throw new Error("Widget Hosting is not supported on this platform")})}class Lg extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Hg extends na{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class _g{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Vg{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 jg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Wg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class zg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class qg{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 $g{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 Gg=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 Jg="v1",Kg="v2";let Qg;function Zg(e){Qg=e}function Xg(e){const t=void 0!==e,n=t?e:Qg;if(!n)throw new Error("No parameters are provided for authentication");Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.remove,fn.task,fn.stage,fn.meetingStage);return Yg(n.successCallback||n.failureCallback?rr(Jg,"authentication.authenticate"):rr(Kg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Qg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Qg=void 0)}})}function Yg(e,t){return Gg(this,void 0,void 0,function*(){const n=Vn(t.url);return _n(n),Tc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function eh(e){Zr();return th(e&&(e.successCallback||e.failureCallback)?rr(Jg,"authentication.getAuthToken"):rr(Kg,"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 th(e,t){return new Promise(n=>{n(Tc(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 nh(e){Zr();return rh(e&&(e.successCallback||e.failureCallback)?rr(Jg,"authentication.getUser"):rr(Kg,"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 rh(e){return new Promise(t=>{t(Tc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function oh(e,t){Xr(dr,fn.authentication);Nc(rr(t?Jg:Kg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),ou(Cc.parentWindow,()=>setTimeout(()=>Cc.currentWindow.close(),200))}function ih(e,t){Xr(dr,fn.authentication);Nc(rr(t?Jg:Kg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),ou(Cc.parentWindow,()=>setTimeout(()=>Cc.currentWindow.close(),200))}var ah;function sh(){return Xr(dr)&&!!dr.supports.appPerformanceMetrics}function ch(e){Xr(dr),xs(rr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function uh(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"}(ah||(ah={}));class lh{constructor(e){this.val=e,uh(e)}toString(){return this.val}}const dh="/l/app/",fh="/l/meeting/new",ph="attendees",gh="startTime",hh="endTime",mh="subject",vh="content",wh="/l/call/0/0",Ch="source",yh="withVideo",Sh="/l/chat/0/0",bh="users",Eh="topicName",Ah="message";function Ih(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${bh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Eh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Ah}=${encodeURIComponent(n)}`;return`${ut}://${lt}${Sh}?${r}${o}${i}`}function Ph(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${bh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${yh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Ch}=${encodeURIComponent(n)}`;return`${ut}://${lt}${wh}?${r}${o}${i}`}function Th(e,t,n,r,o){const i=void 0===e?"":`${ph}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${gh}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${hh}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${mh}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${vh}=${encodeURIComponent(o)}`;return`${ut}://${lt}${fh}?${i}${a}${s}${c}${u}`}function Oh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${ut}://${lt}${dh}${encodeURIComponent(e)}`}const Rh="v1";function Fh(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage),!kh())throw new Error("Not supported");const n=rr(Rh,"appInstallDialog.openAppInstallDialog");dr.isLegacyTeams?t(Ac(n,"executeDeepLink",Oh(e.appId))):(Nc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function kh(){return!(!Xr(dr)||!dr.supports.appInstallDialog)}const Mh="v1",xh=nr("media");var Nh,Uh,Dh,Lh,Hh,_h,Vh;!function(e){e.Base64="base64",e.ID="id"}(Nh||(Nh={}));class Bh{}function jh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Zn.isFramelessWindow){return void e({errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Yr(rt)){return void e({errorCode:Ve.OLD_PLATFORM},[])}Nc(rr(Mh,"media.captureImage"),"captureImage",e)}function Wh(){if(Xr(dr,fn.content,fn.task),!qh())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(Mh,"media.hasPermission"),"permissions.has",e))})}function zh(){if(Xr(dr,fn.content,fn.task),!qh())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(Mh,"media.requestPermission"),"permissions.request",e))})}function qh(){return!(!Xr(dr)||!dr.supports.permissions)}class $h 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(Xr(dr,fn.content,fn.task),!Yr(ot)){return void e({errorCode:Ve.OLD_PLATFORM},new Blob)}if(!am(this.mimeType,this.format,this.content)){return void e({errorCode:Ve.INVALID_ARGUMENTS},new Blob)}Yr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Nc(rr(Mh,"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=Yh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):xh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ve.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=In(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!po(e)&&Nc(rr(Mh,"media.getMedia"),"getMedia",r),xs(rr(Mh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ns("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),Ns("getMedia"+t)}else{const e=Yh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ve.INTERNAL_ERROR,message:"data received is null"},new Blob),Ns("getMedia"+t)}})}}class Gh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Xr(dr,fn.content,fn.task);try{to(Xe)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Nc(rr(Mh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Uh.StopRecording,e)}}class Jh extends Gh{getMediaType(){return Hh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Uh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Kh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(ot)){const e={errorCode:Ve.OLD_PLATFORM};return void t(e,[])}try{em(e)}catch(e){return void t(e,[])}if(!nm(e)){const e={errorCode:Ve.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Nc(rr(Mh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(tm(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 $h(e));t(n,s)})}function Qh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(ot)){return void t({errorCode:Ve.OLD_PLATFORM})}if(!sm(e)){return void t({errorCode:Ve.INVALID_ARGUMENTS})}const n=[e];Nc(rr(Mh,"media.viewImages"),"viewImages",n,t)}function Zh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Xr(dr,fn.content,fn.task),Zn.hostClientType===ln.desktop||Zn.hostClientType===ln.web||Zn.hostClientType===ln.rigel||Zn.hostClientType===ln.teamsRoomsWindows||Zn.hostClientType===ln.teamsRoomsAndroid||Zn.hostClientType===ln.teamsPhones||Zn.hostClientType===ln.teamsDisplays){return void e({errorCode:Ve.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Yr(it)){return void e({errorCode:Ve.OLD_PLATFORM},"")}if(!cm(t)){return void e({errorCode:Ve.INVALID_ARGUMENTS},"")}Nc(rr(Mh,"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 Yh(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 em(e){om(e)?to(Ze):im(e)?to(Xe):rm(e)&&to(Ye)}function tm(e){return!(e.mediaType!=Hh.Video||!e.videoProps||!e.videoProps.videoController)}function nm(e){return!(null==e||e.maxMediaCount>10)}function rm(e){var t;return!((null==e?void 0:e.mediaType)!=Hh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function om(e){return!(!e||e.mediaType!=Hh.VideoAndImage&&!e.videoAndImageProps)}function im(e){return!(!e||e.mediaType!=Hh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function am(e,t,n){return null!=e&&null!=t&&t==Nh.ID&&null!=n}function sm(e){return!(null==e||e.length<=0||e.length>10)}function cm(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function um(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"}(Uh||(Uh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Dh||(Dh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Lh||(Lh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Hh||(Hh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(_h||(_h={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Vh||(Vh={}));const lm="v2";function dm(e){return new Promise(t=>{if(Xr(dr,fn.content,fn.task),!gm())throw wn;if(!cm(e))throw{errorCode:Ve.INVALID_ARGUMENTS};t(Pc(rr(lm,"barCode.scanBarCode"),"media.scanBarCode",e))})}function fm(){if(Xr(dr,fn.content,fn.task),!gm())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(lm,"barCode.hasPermission"),"permissions.has",e))})}function pm(){if(Xr(dr,fn.content,fn.task),!gm())throw wn;const e=Be.Media;return new Promise(t=>{t(Pc(rr(lm,"barCode.requestPermission"),"permissions.request",e))})}function gm(){return!!(Xr(dr)&&dr.supports.barCode&&dr.supports.permissions)}const hm="v2";function mm(e){return vm(rr(hm,"chat.openChat"),e)}function vm(e,t){return new Promise(n=>{if(Xr(dr,fn.content,fn.task),!Cm())throw wn;if(dr.isLegacyTeams)n(Ac(e,"executeDeepLink",Ih([t.user],void 0,t.message)));else{n(Ac(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function wm(e){const t=rr(hm,"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(vm(t,r))}else{if(Xr(dr,fn.content,fn.task),!Cm())throw wn;if(dr.isLegacyTeams)n(Ac(t,"executeDeepLink",Ih(e.users,e.topic,e.message)));else{n(Ac(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function Cm(){return!(!Xr(dr)||!dr.supports.chat)}var ym=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";function bm(e){return ym(this,void 0,void 0,function*(){if(Xr(dr,fn.content,fn.meetingStage,fn.task,fn.settings,fn.stage,fn.sidePanel),!Am())throw wn;if(!e.type||!Object.values($e).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values($e)}`);const t=yield Un(e),n={mimeType:e.type,content:t};return Pc(rr(Sm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function Em(){return ym(this,void 0,void 0,function*(){Xr(dr,fn.content,fn.meetingStage,fn.task,fn.settings,fn.stage,fn.sidePanel);const e=rr(Sm,"clipboard.read");if(!Am())throw wn;const t=yield Pc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Nn(e.mimeType,e.content)}return t})}function Am(){return Zn.isFramelessWindow?!(!Xr(dr)||!dr.supports.clipboard):!!(Xr(dr)&&navigator&&navigator.clipboard&&dr.supports.clipboard)}var Im=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 Pm="v2",Tm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Om;function Rm(){var e;return null!==(e=Xr(dr)&&(dr.isNAAChannelRecommended||Nm()))&&void 0!==e&&e}function Fm(){return Xr(dr),Cc.parentOrigin}function km(){var e;return null!==(e=Xr(dr)&&dr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Mm(){var e;return null!==(e=Xr(dr)&&(dr.isDeeplyNestedAuthSupported||xm()))&&void 0!==e&&e}function xm(){return!!(Xr(dr)&&Um()&&dr.isLegacyTeams&&Yr(wr))}function Nm(){return!!(Xr(dr)&&Um()&&dr.isLegacyTeams&&dr.supports.nestedAppAuth)}function Um(){return Zn.hostClientType===ln.android||Zn.hostClientType===ln.ios||Zn.hostClientType===ln.ipados||Zn.hostClientType===ln.visionOS}function Dm(e){return Im(this,void 0,void 0,function*(){if(!km())throw wn;const t=e.map(_m);return Hm(Om.ADD,t)})}function Lm(e){return Im(this,void 0,void 0,function*(){if(!km())throw wn;const t=e.map(_m);return Hm(Om.DELETE,t)})}function Hm(e,t){return Im(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 Rc("nestedAppAuth.manageNAATrustedOrigins",[new Vm(e,t)],Tm,rr(Pm,"nestedAppAuth.manageNAATrustedOrigins"))})}function _m(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"}(Om||(Om={}));class Vm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Bm="v2";function jm(){if(Xr(dr,fn.content,fn.task),!zm())throw wn;return Pc(rr(Bm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Wm(e){if(Xr(dr,fn.content,fn.task),!zm())throw wn;if(!e)throw{errorCode:Ve.INVALID_ARGUMENTS};return Pc(rr(Bm,"geoLocation.showLocation"),"location.showLocation",e)}function zm(){return!!(Xr(dr)&&dr.supports.geoLocation&&dr.supports.geoLocation.map&&dr.supports.permissions)}const qm="v2";function $m(){if(Xr(dr,fn.content,fn.task),!Km())throw wn;return Pc(rr(qm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Gm(){if(Xr(dr,fn.content,fn.task),!Km())throw wn;const e=Be.GeoLocation;return new Promise(t=>{t(Pc(rr(qm,"geoLocation.hasPermission"),"permissions.has",e))})}function Jm(){if(Xr(dr,fn.content,fn.task),!Km())throw wn;const e=Be.GeoLocation;return new Promise(t=>{t(Pc(rr(qm,"geoLocation.requestPermission"),"permissions.request",e))})}function Km(){return!!(Xr(dr)&&dr.supports.geoLocation&&dr.supports.permissions)}function Qm(){return dr.hostVersionsInfo?dr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Zm="v1";class Xm{postMessage(e,t){Xr(dr),Nc(rr(Zm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||En())}addEventListener(e,t){Xr(dr),"message"===e&&xs(rr(Zm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Ym{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Xr(dr,fn.task),Nc(rr(Zm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||En())}addEventListener(e,t){Xr(dr,fn.task),"message"===e&&xs(rr(Zm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ev="v2";function tv(e){if(Xr(dr,fn.content),!nv())throw wn;if(!e||!xn(e))throw{errorCode:Ve.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Pc(rr(ev,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function nv(){return!(!Xr(dr)||!dr.supports.secondaryBrowser)}const rv="v1";function ov(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(tt))throw{errorCode:Ve.OLD_PLATFORM};if(!e)throw{errorCode:Ve.INVALID_ARGUMENTS};if(!av())throw wn;Nc(rr(rv,"location.getLocation"),"location.getLocation",[e],t)}function iv(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Xr(dr,fn.content,fn.task),!Yr(tt))throw{errorCode:Ve.OLD_PLATFORM};if(!e)throw{errorCode:Ve.INVALID_ARGUMENTS};if(!av())throw wn;Nc(rr(rv,"location.showLocation"),"location.showLocation",[e],t)}function av(){return!(!Xr(dr)||!dr.supports.location)}const sv="v1";function cv(e){Xr(dr,fn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Nc(rr(sv,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var uv=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const lv="v1";var dv,fv,pv,gv,hv,mv;function vv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function wv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Cv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage,fn.settings,fn.content),Nc(rr(lv,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function yv(){var e,t,n;return uv(this,void 0,void 0,function*(){let r;Xr(dr,fn.sidePanel,fn.meetingStage,fn.settings,fn.content);try{const e=!0;r=yield Pc(rr("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)==gv.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==gv.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ve.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function Sv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage,fn.task),Nc(rr(lv,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function bv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Xr(dr,fn.sidePanel),Nc(rr(lv,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Ev(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Xr(dr,fn.sidePanel),Nc(rr(lv,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Av(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Xr(dr,fn.sidePanel),Nc(rr(lv,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Iv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Xr(dr,fn.sidePanel),xs(rr(lv,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Pv(e,t,n={sharingProtocol:hv.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Tv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Ov(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Rv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Fv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),xs(rr(lv,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function kv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),xs(rr(lv,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Mv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Xr(dr,fn.sidePanel,fn.meetingStage),xs(rr(lv,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function xv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Xr(dr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||mv.Other};return Pc(rr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Nv(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");Xr(dr,fn.sidePanel,fn.meetingStage),e.isAppHandlingAudio?Uv(e,t):Dv(e,t)}function Uv(e,t){Nc(rr(lv,"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");xs(rr(lv,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>uv(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Hv(n,n.isMicMuted===t.isMicMuted?dv.HostInitiated:dv.AppDeclinedToChange)}catch(e){Hv(t,dv.AppFailedToChange)}}));xs(rr(lv,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function Dv(e,t){Nc(rr(lv,"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");Us("meeting.micStateChanged")&&Ns("meeting.micStateChanged"),Us("meeting.audioDeviceSelectionChanged")&&Ns("meeting.audioDeviceSelectionChanged"),t(n)})}function Lv(e){Hv(e,dv.AppInitiated)}function Hv(e,t){Xr(dr,fn.sidePanel,fn.meetingStage),Nc(rr(lv,"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"}(dv||(dv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(fv||(fv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(pv||(pv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(gv||(gv={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(hv||(hv={})),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.M365CalendarMeetNow="m365_calendar_meet_now",e.Other="other"}(mv||(mv={}));const _v="v1",Vv="v2";function Bv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=rr(_v,"monetization.openPurchaseExperience")):(r=e,o=rr(Vv,"monetization.openPurchaseExperience"));return Xr(dr,fn.content),Rn(()=>new Promise(e=>{if(!jv())throw wn;e(Pc(o,"monetization.openPurchaseExperience",r))}),n)}function jv(){return!(!Xr(dr)||!dr.supports.monetization)}const Wv="v2";function zv(e){return new Promise(t=>{if(Xr(dr,fn.content),!$v())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Ac(rr(Wv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function qv(e){return new Promise(t=>{if(Xr(dr,fn.content),!$v())throw new Error("Not supported");const n=rr(Wv,"calendar.composeMeeting");dr.isLegacyTeams?t(Ac(n,"executeDeepLink",Th(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Ac(n,"calendar.composeMeeting",e))})}function $v(){return!(!Xr(dr)||!dr.supports.calendar)}const Gv="v2";function Jv(e){e&&0!==e.length&&e.forEach(e=>{uh(e)})}function Kv(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===rw.New&&(Jv(t.toRecipients),Jv(t.ccRecipients),Jv(t.bccRecipients))}function Qv(e){if(Xr(dr,fn.content),!Zv())throw new Error("Not supported");return Kv(e),Fc("mail.handoff.composeMail",[new Xv(e)],rr(Gv,"mail.handoff.composeMail"))}function Zv(){return!!(Xr(dr)&&dr.supports.mail&&dr.supports.mail.handoff)}class Xv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Yv="v2";function ew(e){return new Promise(t=>{if(Xr(dr,fn.content),!nw())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Ac(rr(Yv,"mail.openMailItem"),"mail.openMailItem",e))})}function tw(e){return new Promise(t=>{if(Xr(dr,fn.content),!nw())throw new Error("Not supported");t(Ac(rr(Yv,"mail.composeMail"),"mail.composeMail",e))})}function nw(){return!(!Xr(dr)||!dr.supports.mail)}var rw;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(rw||(rw={}));const ow="v2";function iw(){if(!Zn.printCapabilityEnabled){if(Xr(dr),!dw())throw wn;Zn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(aw(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function aw(){Dn().print()}function sw(e){cw(rr(ow,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!po(e)&&!dw())throw wn})}function cw(e,t,n){!po(t)&&Xr(dr),!po(t)&&n&&n(),Ws(e,t)}function uw(e){lw(rr(ow,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!po(e)&&!dw())throw wn})}function lw(e,t,n){!po(t)&&Xr(dr),!po(t)&&n&&n(),$s(e,t)}function dw(){return!(!Xr(dr)||!dr.supports.teamsCore)}const fw="v1",pw="v2";function gw(e,t){let n,r;Xr(dr,fn.content,fn.task,fn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=rr(fw,"people.selectPeople")):(r=e,o=rr(pw,"people.selectPeople")),Tn(hw,n,o,r)}function hw(e,t){return new Promise(n=>{if(!Yr(nt))throw{errorCode:Ve.OLD_PLATFORM};if(!um(t))throw{errorCode:Ve.INVALID_ARGUMENTS};if(!mw())throw wn;n(Pc(e,"people.selectPeople",t))})}function mw(){return!(!Xr(dr)||!dr.supports.people)}function vw(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?ww(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function ww(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 Cw="v2";function yw(e){return Xr(dr,fn.content),new Promise(t=>{const[n,r]=vw(e);if(!n)throw{errorCode:Ve.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(Pc(rr(Cw,"profile.showProfile"),"profile.showProfile",o))})}function Sw(){return!(!Xr(dr)||!dr.supports.profile)}const bw="v2",Ew="search.queryChange",Aw="search.queryClose",Iw="search.queryExecute";function Pw(e,t,n){if(Xr(dr,fn.content),!Ow())throw wn;xs(rr(bw,"search.registerOnClosedHandler"),Aw,e),xs(rr(bw,"search.registerOnExecutedHandler"),Iw,t),n&&xs(rr(bw,"search.registerOnChangeHandler"),Ew,n)}function Tw(){if(Xr(dr,fn.content),!Ow())throw wn;Nc(rr(bw,"search.unregisterHandlers"),"search.unregister"),Ns(Ew),Ns(Aw),Ns(Iw)}function Ow(){return!(!Xr(dr)||!dr.supports.search)}function Rw(){return new Promise(e=>{if(Xr(dr,fn.content),!Ow())throw new Error("Not supported");e(Ac(rr(bw,"search.closeSearch"),"search.closeSearch"))})}var Fw=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 kw="v2";function Mw(){return Fw(this,void 0,void 0,function*(){if(Xr(dr,fn.sidePanel,fn.meetingStage),!xw())throw wn;return yield Pc(rr(kw,"sharing.history.getContent"),"sharing.history.getContent")})}function xw(){var e;return Xr(dr)&&void 0!==(null===(e=dr.supports.sharing)||void 0===e?void 0:e.history)}const Nw="v1",Uw="v2",Dw={shareWebContent:"sharing.shareWebContent"};function Lw(e,t){try{_w(e),Vw(e),jw(e)}catch(e){return On(()=>Promise.reject(e),t)}Xr(dr,fn.content,fn.sidePanel,fn.task,fn.stage,fn.meetingStage);return On(Hw,t,rr(t?Nw:Uw,"sharing.shareWebContent"),e)}function Hw(e,t){return new Promise(n=>{if(!Ww())throw wn;n(Pc(e,Dw.shareWebContent,t))})}function _w(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ve.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Vw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Ve.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Ve.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Bw(e){if("URL"===e.type){if(!e.url)throw{errorCode:Ve.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if("FILE"!==e.type)throw{errorCode:Ve.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:Ve.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function jw(e){e.content.forEach(Bw)}function Ww(){return!(!Xr(dr)||!dr.supports.sharing)}const zw="v2";function qw(){return new Promise(e=>{if(Xr(dr,fn.content),!$w())throw wn;e(Pc(rr(zw,"stageView.self.close"),"stageView.self.close"))})}function $w(){var e;return Xr(dr)&&void 0!==(null===(e=dr.supports.stageView)||void 0===e?void 0:e.self)}const Gw="v2";var Jw;function Kw(e){return new Promise(t=>{if(Xr(dr,fn.content),!Qw())throw wn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Pc(rr(Gw,"stageView.open"),"stageView.open",e))})}function Qw(){return!(!Xr(dr)||!dr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Jw||(Jw={}));const Zw=10;var Xw=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 Yw="v2";function eC(e){return Xw(this,void 0,void 0,function*(){Xr(dr,fn.content,fn.task),rC(),oC(e);const t=yield Pc(rr(Yw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return iC(e.maxVisualMediaCount,t),t})}function tC(e){return Xw(this,void 0,void 0,function*(){Xr(dr,fn.content,fn.task),rC(),oC(e);const t=yield Pc(rr(Yw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return iC(e.maxVisualMediaCount,t),t})}function nC(){return!!(Xr(dr)&&dr.supports.visualMedia&&dr.supports.visualMedia.image&&dr.supports.permissions)}function rC(){if(!nC())throw wn}function oC(e){if(!e||e.maxVisualMediaCount>Zw||e.maxVisualMediaCount<1)throw Sn}function iC(e,t){if(t.length>e)throw bn}const aC="v2";var sC,cC;function uC(){if(Xr(dr,fn.content,fn.task),!nC())throw wn;const e=Be.Media;return Pc(rr(aC,"visualMedia.hasPermission"),"permissions.has",e)}function lC(){if(Xr(dr,fn.content,fn.task),!nC())throw wn;const e=Be.Media;return Pc(rr(aC,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(sC||(sC={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(cC||(cC={}));var dC=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 fC=null;function pC(){return dC(this,void 0,void 0,function*(){return null===fC&&(fC=(yield Bo()).app.host.name),fC})}var gC=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 hC(){return gC(this,void 0,void 0,function*(){if(Xr(dr),!vC())throw wn;return!(!dr.isLegacyTeams||Zn.hostClientType!==ln.android&&Zn.hostClientType!==ln.ios&&Zn.hostClientType!==ln.ipados&&Zn.hostClientType!==ln.visionOS||(yield mC())!==dn.teams)||(yield Ec(rr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function mC(){return gC(this,void 0,void 0,function*(){return pC()})}function vC(){return Xr(dr)&&void 0!==dr.supports.webStorage}const wC="v2";var CC;function yC(e){const t=rr(wC,"call.startCall");return new Promise(n=>{var r;if(Xr(dr,fn.content,fn.task),!SC())throw wn;if(!dr.isLegacyTeams)return Nc(t,"call.startCall",[e],n);n(Ec(t,"executeDeepLink",Ph(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(CC.Video),e.source)).then(e=>{if(!e)throw new Error(gt);return e}))})}function SC(){return!(!Xr(dr)||!dr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(CC||(CC={}));const bC="v1";function EC(){ca(rr(bC,"appInitialization.notifyAppLoaded"))}function AC(){Nc(rr(bC,"appInitialization.notifySuccess"),Mo.Success,[Pr])}function IC(e){la(rr(bC,"appInitialization.notifyFailure"),e)}function PC(e){ua(rr(bC,"appInitialization.notifyExpectedFailure"),e)}const TC=nr("thirdPartyCloudStorage"),OC="v2";class RC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let FC=[],kC=null,MC=!0,xC=null;function NC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Ve.INVALID_ARGUMENTS})}if(Xr(dr,fn.content,fn.task),!DC())throw wn;if(xC)throw xC=null,new Error("getDragAndDropFiles cannot be called twice");xC=t,MC=!0,Nc(rr(OC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],UC)}function UC(e){if(xC)if(e&&e.error)xC([],e.error),xC=null;else if(e&&e.fileChunk)try{MC||0!==e.fileChunk.chunkSequence||(TC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),MC=!0,xC([],{errorCode:Ve.INTERNAL_ERROR,message:"error occurred while receiving data"}),FC=[],xC=null);const t=Yh(e.fileChunk,e.fileType);if(t?(kC||(kC=new RC(e.fileType,[])),kC.assembleAttachment.push(t)):(TC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),xC?xC([],{errorCode:Ve.INTERNAL_ERROR,message:"error occurred while receiving data"}):xC=null,FC=[],xC=null,MC=!0),MC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&kC){const t=Xh(kC.assembleAttachment,kC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});FC.push(n)}e.isLastFile&&xC&&(xC(FC,e.error),FC=[],xC=null,MC=!0),kC=null}}catch(e){xC&&(xC([],{errorCode:Ve.INTERNAL_ERROR,message:e}),FC=[],xC=null,MC=!0)}else xC([],{errorCode:Ve.INTERNAL_ERROR,message:"data received is null"}),FC=[],xC=null,MC=!0}function DC(){return!(!Xr(dr)||!dr.supports.thirdPartyCloudStorage)}const LC="v1";function HC(e,t){sa(rr(LC,"initialize"),t).then(()=>{e&&e()})}function _C(){iw()}function VC(){aw()}function BC(e){Zr(),Nc(rr(LC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Zn.frameContext),e(t)})}function jC(e){ma(rr(LC,"registerOnThemeChangeHandlerHelper"),e)}function WC(e){Ds(rr(LC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function zC(e){Ds(rr(LC,"registerAppButtonClickHandler"),"appButtonClick",e,[fn.content])}function qC(e){Ds(rr(LC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[fn.content])}function $C(e){Ds(rr(LC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[fn.content])}function GC(e){La(rr(LC,"registerBackButtonHandler"),e)}function JC(e){cw(rr(LC,"registerOnLoadHandler"),e)}function KC(e){lw(rr(LC,"registerBeforeUnloadHandler"),e)}function QC(e){Ds(rr(LC,"registerFocusEnterHandler"),"focusEnter",e,[])}function ZC(e){Ds(rr(LC,"registerChangeSettingsHandler"),"changeSettings",e,[fn.content])}function XC(e,t){Xr(dr),fs(rr(LC,"getTabInstances"),t).then(t=>{e(t)})}function YC(e,t){Xr(dr),ps(rr(LC,"getMruTabInstances"),t).then(t=>{e(t)})}function ey(e){gs(rr(LC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function ty(e,t){Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.task,fn.stage,fn.meetingStage);const n=null!=t?t:En();wa(rr(LC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ny(e){hs(rr(LC,"setFrameContext"),e)}function ry(e,t,n){sa(rr(LC,"initializeWithFrameContext"),n).then(()=>t&&t()),hs(rr(LC,"setFrameContext"),e)}const oy="v1";function iy(e){ds(rr(oy,"navigation.returnFocus"),e)}function ay(e,t){Xr(dr);const n=null!=t?t:En();ls(rr(oy,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function sy(e,t){Xr(dr,fn.content,fn.sidePanel,fn.settings,fn.remove,fn.task,fn.stage,fn.meetingStage);const n=null!=t?t:En();cs(rr(oy,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function cy(e){Xr(dr);const t=null!=e?e:En();us(rr(oy,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const uy="v1";function ly(e){ms(rr(uy,"settings.setValidityState"),e)}function dy(e){Xr(dr,fn.content,fn.settings,fn.remove,fn.sidePanel),vs(rr(uy,"settings.getSettings")).then(t=>{e(t)})}function fy(e,t){Xr(dr,fn.content,fn.settings,fn.sidePanel);const n=null!=t?t:En();ws(rr(uy,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function py(e){Gi(rr(uy,"settings.registerOnSaveHandler"),e)}function gy(e){Ki(rr(uy,"settings.registerOnRemoveHandler"),e)}var hy=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 my="v1";function vy(e,t){const n=rr(my,"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?(Xr(dr,fn.content,fn.sidePanel,fn.meetingStage),Nc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?gi(n,Sy(e),r):pi(n,yy(e),r),new Xm}function wy(e){e=by(e);const{width:t,height:n}=e,r=hy(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");fi(rr(my,"tasks.updateTask"),e)}function Cy(e,t){hi(rr(my,"tasks.submitTask"),e,t)}function yy(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:mn.Small,width:e.width?e.width:mn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Sy(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:mn.Small,width:e.width?e.width:mn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function by(e){return e.height=e.height?e.height:mn.Small,e.width=e.width?e.width:mn.Small,e}const Ey="v2";var Ay,Iy;function Py(){return!(!Xr(dr,fn.meetingStage,fn.sidePanel,fn.content)||!dr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Ay||(Ay={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Iy||(Iy={}));class Ty{getFluidTenantInfo(){return Oy(),new Promise(e=>{e(Pc(rr(Ey,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return Oy(),new Promise(e=>{e(Pc(rr(Ey,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return Oy(),new Promise(e=>{e(Pc(rr(Ey,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return Oy(),new Promise(t=>{t(Pc(rr(Ey,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return Oy(),new Ty}}function Oy(){if(!Py())throw new Error("LiveShareHost Not supported")}var Ry=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 Fy(e){try{return e.cartItems=ky(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function ky(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=ky(e.accessories)),e})}const My=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=Ry(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=My(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function xy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Uy(t),Ny(t.accessories)}function Ny(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");Uy(t)}}}function Uy(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");Ly(e.price),Hy(e.quantity)}function Dy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===un(e))throw new Error("id must be a valid UUID")}}function Ly(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 Hy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function _y(e){if(!Object.values(Wy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Vy="v2",By={majorVersion:1,minorVersion:1};var jy,Wy;function zy(){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;return Pc(rr(Vy,"marketplace.getCart"),"marketplace.getCart",By).then(Fy)}function qy(e){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Dy(null==e?void 0:e.cartId),xy(null==e?void 0:e.cartItems),Pc(rr(Vy,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:My(e.cartItems),cartVersion:By})).then(Fy)}function $y(e){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;if(!e)throw new Error("removeCartItemsParams must be provided");if(Dy(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 Pc(rr(Vy,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:By})).then(Fy)}function Gy(e){if(Xr(dr,fn.content,fn.task),!Jy())throw wn;if(!e)throw new Error("updateCartStatusParams must be provided");return Dy(null==e?void 0:e.cartId),_y(null==e?void 0:e.cartStatus),Pc(rr(Vy,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:By})).then(Fy)}function Jy(){return!(!Xr(dr)||!dr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(jy||(jy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Wy||(Wy={}));var Ky=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 Qy=3,Zy=4;class Xy{constructor(e){this.direction=e}serialize(){return{direction:this.direction}}}function Yy(e){return e===Qy?"back":e===Zy?"forward":void 0}function eS(e){void 0!==Yy(e.button)&&(e.preventDefault(),e.stopImmediatePropagation())}function tS(e){const t=Yy(e.button);t&&(e.preventDefault(),e.stopImmediatePropagation(),Fc("mouseRelay.navigateHistory",[new Xy(t)],rr("v2","mouseRelay.navigateHistory")))}let nS=!1;function rS(){return Ky(this,void 0,void 0,function*(){if(!iS())throw wn;nS||(document.addEventListener("mousedown",eS,{capture:!0}),document.addEventListener("mouseup",tS,{capture:!0}),document.addEventListener("auxclick",eS,{capture:!0})),nS=!0})}function oS(){if(!iS())throw wn;nS=!1,document.removeEventListener("mousedown",eS,{capture:!0}),document.removeEventListener("mouseup",tS,{capture:!0}),document.removeEventListener("auxclick",eS,{capture:!0})}function iS(){return!(!Xr(dr)||!dr.supports.mouseRelay)}var aS=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 sS{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 cS(e){return e.toLowerCase().split("+").sort().join("+")}function uS(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function lS(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()||!!e.key&&/^F\d+$/i.test(e.key)}function dS(e,t){if(lS(t)){const n=uS(t);if(e.has(n))return{matchedShortcut:n,isOverridable:mS.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function fS(e){vS.clear(),e.shortcuts.forEach(e=>{vS.add(cS(e))}),mS.clear(),e.overridableShortcuts.forEach(e=>{mS.add(cS(e))})}class pS extends na{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function gS(e){xs(rr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function hS(e){if(e.target.closest(`[${AS}]`))return;const{matchedShortcut:t,isOverridable:n}=dS(vS,e);if(!t)return;if(n&&wS){if(wS(e,{matchedShortcut:t}))return}Fc("shortcutRelay.forwardShortcutEvent",[new sS(e)],rr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const mS=new Set,vS=new Set;let wS,CS=!1;function yS(e){if(!ES())throw wn;const t=wS;return wS=e,t}function SS(){if(!ES())throw wn;CS=!1,vS.clear(),mS.clear(),wS=void 0,document.removeEventListener("keydown",hS,{capture:!0})}function bS(){return aS(this,void 0,void 0,function*(){if(!ES())throw wn;fS(yield Rc("shortcutRelay.getHostShortcuts",[],new pS,rr("v2","shortcutRelay.getHostShortcuts"))),CS||document.addEventListener("keydown",hS,{capture:!0}),CS=!0,gS(e=>{fS(e)})})}function ES(){return!(!Xr(dr)||!dr.supports.shortcutRelay)}const AS="data-disable-shortcuts-forwarding"})(),r})());
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map