@microsoft/teams-js 2.47.1 → 2.48.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()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Ne,AppId:()=>to,ChannelType:()=>pn,ChildAppWindow:()=>Xh,DialogDimension:()=>fn,EduType:()=>Ve,EmailAddress:()=>lg,ErrorCode:()=>De,FileOpenPreference:()=>Me,FrameContexts:()=>cn,HostClientType:()=>an,HostName:()=>sn,LiveShareHost:()=>PC,NotificationTypes:()=>Kc,ParentAppWindow:()=>Yh,RenderingSurfaces:()=>un,SecondaryM365ContentIdName:()=>xe,TaskModuleDimension:()=>fn,TeamType:()=>ln,UUID:()=>$n,UserAuthenticationState:()=>tl,UserSettingTypes:()=>Zc,UserTeamRole:()=>dn,ValidatedSafeString:()=>eo,ViewerActionTypes:()=>Qc,activateChildProxyingCommunication:()=>Er,app:()=>i,appEntity:()=>j,appInitialization:()=>Pe,appInstallDialog:()=>X,authentication:()=>Z,barCode:()=>ee,calendar:()=>de,call:()=>Ie,chat:()=>te,clipboard:()=>ne,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>Hw,executeDeepLink:()=>eC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>x,files:()=>D,geoLocation:()=>ie,getAdaptiveCardSchemaVersion:()=>Qh,getContext:()=>Vw,getCurrentFeatureFlagsState:()=>Tr,getMruTabInstances:()=>Xw,getTabInstances:()=>Zw,hostEntity:()=>K,initialize:()=>Lw,initializeWithFrameContext:()=>nC,liveShare:()=>Fe,location:()=>se,logs:()=>S,mail:()=>pe,marketplace:()=>ke,media:()=>Y,meeting:()=>ue,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>le,navigateBack:()=>sC,navigateCrossDomain:()=>aC,navigateToTab:()=>iC,nestedAppAuth:()=>re,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>ou,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Rr,pages:()=>y,people:()=>he,print:()=>_w,profile:()=>me,registerAppButtonClickHandler:()=>Ww,registerAppButtonHoverEnterHandler:()=>zw,registerAppButtonHoverLeaveHandler:()=>$w,registerBackButtonHandler:()=>qw,registerBeforeUnloadHandler:()=>Jw,registerChangeSettingsHandler:()=>Qw,registerCustomHandler:()=>nu,registerFocusEnterHandler:()=>Kw,registerFullScreenHandler:()=>jw,registerOnLoadHandler:()=>Gw,registerOnThemeChangeHandler:()=>Bw,registerUserSettingsChangeHandler:()=>ru,remoteCamera:()=>B,returnFocus:()=>oC,search:()=>ve,secondaryBrowser:()=>ae,sendCustomEvent:()=>tu,sendCustomMessage:()=>eu,setFeatureFlagsState:()=>Or,setFrameContext:()=>tC,settings:()=>Oe,shareDeepLink:()=>Yw,sharing:()=>Ce,shortcutRelay:()=>je,sidePanelInterfaces:()=>I,stageView:()=>Se,store:()=>Q,tasks:()=>Re,teams:()=>$,teamsCore:()=>ge,thirdPartyCloudStorage:()=>Te,uploadCustomApp:()=>Yc,version:()=>br,videoEffects:()=>q,videoEffectsEx:()=>G,visualMedia:()=>Ae,webStorage:()=>Ee});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>uo,getTelemetryPort:()=>so,isSupported:()=>co});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>vo,getDataLayerPort:()=>ho,isSupported:()=>mo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>wo,registerOnResumeHandler:()=>Co});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Eo,FailedReason:()=>Ao,Messages:()=>bo,_initialize:()=>Oo,_uninitialize:()=>Ro,getContext:()=>Fo,getFrameContext:()=>Po,initialize:()=>To,isInitialized:()=>Io,lifecycle:()=>o,notifyAppLoaded:()=>ko,notifyExpectedFailure:()=>xo,notifyFailure:()=>No,notifySuccess:()=>Mo,openLink:()=>Lo,registerHostToAppPerformanceMetricsHandler:()=>Uo,registerOnThemeChangeHandler:()=>Do});var a={};n.r(a),n.d(a,{isSupported:()=>Vo,resize:()=>_o});var s={};n.r(s),n.d(s,{isSupported:()=>jo,open:()=>Bo});var c={};n.r(c),n.d(c,{isSupported:()=>qo,registerOnMessageFromParent:()=>$o,sendMessageToDialog:()=>zo,sendMessageToParentFromDialog:()=>Wo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Zo,getDialogInfoFromUrlDialogInfo:()=>Qo,isSupported:()=>Ko,open:()=>Go,parentCommunication:()=>c,submit:()=>Jo});var l={};n.r(l),n.d(l,{isSupported:()=>ui,open:()=>ci});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>di,open:()=>li});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>fi,isSupported:()=>pi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>hi,MenuItem:()=>vi,MenuListType:()=>mi,initialize:()=>Ai,isSupported:()=>Fi,setNavBarMenu:()=>Pi,setUpViews:()=>Ei,showActionMenu:()=>Oi});var g={};n.r(g),n.d(g,{initialize:()=>ki,isSupported:()=>Wi,registerChangeConfigHandler:()=>_i,registerOnRemoveHandler:()=>Ui,registerOnRemoveHandlerHelper:()=>Li,registerOnSaveHandler:()=>xi,registerOnSaveHandlerHelper:()=>Di,setConfig:()=>Ni,setValidityState:()=>Mi});var h={};n.r(h),n.d(h,{isSupported:()=>ya,onClick:()=>va,onHoverEnter:()=>wa,onHoverLeave:()=>Ca});var m={};n.r(m),n.d(m,{_initialize:()=>Sa,isSupported:()=>Ia,navigateBack:()=>ba,registerBackButtonHandler:()=>Aa,registerBackButtonHandlerHelper:()=>Ea});var v={};n.r(v),n.d(v,{isSupported:()=>Oa,navigateTo:()=>Pa,navigateToDefaultPage:()=>Ta});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ra,exitFullscreen:()=>Fa,isSupported:()=>ka});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>xa,getTabInstances:()=>Na,isSupported:()=>Da,navigateToTab:()=>Ma});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ua,ReturnFocusType:()=>La,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ja,initializeWithFrameContext:()=>Ba,isSupported:()=>Ga,navigateCrossDomain:()=>Wa,navigateToApp:()=>za,registerFocusEnterHandler:()=>_a,registerFullScreenHandler:()=>qa,returnFocus:()=>Ha,setCurrentFrame:()=>Va,shareDeepLink:()=>$a,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>Jc,registerGetLogHandler:()=>Gc});var b={};n.r(b),n.d(b,{closeConversation:()=>su,getChatMembers:()=>cu,isSupported:()=>uu,openConversation:()=>au});var A={};n.r(A),n.d(A,{isSupported:()=>pu,sendCustomTelemetryData:()=>gu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Cu,isSupported:()=>wu});var I={};n.r(I),n.d(I,{ContentItemType:()=>Su,CopilotMode:()=>Iu,MediaSelectionType:()=>bu,SidePanelErrorCode:()=>Ru,SidePanelErrorImpl:()=>Fu,TeamsContextType:()=>Tu,TeamsDimensionName:()=>Eu,TeamsSessionType:()=>Au,TranscriptState:()=>Pu,UserConsent:()=>Ou});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Hu,getContent:()=>Du,isResponseAReportableError:()=>xu,isSupported:()=>Nu,preCheckUserConsent:()=>Uu,registerUserActionContentSelect:()=>Lu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>qu,isSupported:()=>$u});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>Zu,ActionExecuteResponseHandler:()=>nl,InvokeErrorCode:()=>el,InvokeResponseType:()=>Yu,OriginalRequestType:()=>Xu,SerializableActionExecuteInvokeRequest:()=>Ku,SerializableConnectorParameters:()=>fl,UserAuthenticationState:()=>tl,authenticateAndResendRequest:()=>sl,authenticateWithConnector:()=>pl,authenticateWithOauth2:()=>ll,authenticateWithPowerPlatformConnectorPlugins:()=>dl,authenticateWithSSO:()=>cl,authenticateWithSSOAndResendRequest:()=>ul,disconnectConnector:()=>ml,getUserAuthenticationStateForConnector:()=>hl,isActionExecuteResponse:()=>Qu,isInvokeError:()=>rl,isSupported:()=>vl,validateActionExecuteInvokeRequest:()=>il});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>bl,authenticateWithOauth:()=>Sl,authenticateWithSSO:()=>yl,authenticateWithSSOAndResendRequest:()=>Al,isSupported:()=>El,validateInput:()=>Il});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Ol,ActionOpenUrlType:()=>Tl,isSupported:()=>kl,processActionOpenUrl:()=>Fl,processActionSubmit:()=>Rl});var M={};n.r(M),n.d(M,{isSupported:()=>Ul,processActionOpenUrl:()=>xl,processActionSubmit:()=>Dl});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>zl,isSupported:()=>jl,processActionOpenUrlDialog:()=>Bl});var x={};n.r(x),n.d(x,{isSupported:()=>Jl,processActionCommand:()=>Gl});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>Ql,CloudStorageProviderFileAction:()=>td,CloudStorageProviderType:()=>Zl,DocumentLibraryAccessType:()=>Yl,FileDownloadStatus:()=>ed,SpecialDocumentLibraryType:()=>Xl,addCloudStorageFolder:()=>rd,addCloudStorageProvider:()=>dd,addCloudStorageProviderFile:()=>pd,copyMoveFiles:()=>cd,deleteCloudStorageFolder:()=>od,deleteCloudStorageProviderFile:()=>hd,downloadCloudStorageProviderFile:()=>md,getCloudStorageFolderContents:()=>id,getCloudStorageFolders:()=>nd,getExternalProviders:()=>sd,getFileDownloads:()=>ud,openCloudStorageFile:()=>ad,openDownloadFolder:()=>ld,registerCloudStorageProviderContentChangeHandler:()=>Cd,registerCloudStorageProviderListChangeHandler:()=>wd,removeCloudStorageProvider:()=>fd,renameCloudStorageProviderFile:()=>gd,uploadCloudStorageProviderFile:()=>vd});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>bd,isSupported:()=>Pd,registerMeetingRoomCapabilitiesUpdateHandler:()=>Ed,registerMeetingRoomStatesUpdateHandler:()=>Id,sendCommandToPairedMeetingRoom:()=>Ad});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Td,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Md,version:()=>Od});var _={};n.r(_),n.d(_,{isSupported:()=>Bd,showNotification:()=>Vd});var V={};n.r(V),n.d(V,{isSupported:()=>qd,notifyInstallCompleted:()=>$d,registerAppInstallationHandler:()=>Wd,unregisterAppInstallationHandler:()=>zd});var B={};n.r(B),n.d(B,{ControlCommand:()=>Jd,ErrorReason:()=>Kd,SessionTerminatedReason:()=>Qd,getCapableParticipants:()=>Zd,isSupported:()=>af,registerOnCapableParticipantsChangeHandler:()=>tf,registerOnDeviceStateChangeHandler:()=>rf,registerOnErrorHandler:()=>nf,registerOnSessionStatusChangeHandler:()=>of,requestControl:()=>Xd,sendControlCommand:()=>Yd,terminateSession:()=>ef});var j={};n.r(j),n.d(j,{isSupported:()=>uf,selectAppEntity:()=>cf});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>df,isSupported:()=>ff});var z={};n.r(z),n.d(z,{getConfigSetting:()=>hf,isSupported:()=>mf,joinedTeams:()=>W});var $={};n.r($),n.d($,{ChannelType:()=>wf,fullTrust:()=>z,getTeamChannels:()=>Cf,isSupported:()=>Sf,refreshSiteUrl:()=>yf});var q={};n.r(q),n.d(q,{EffectChangeType:()=>kf,EffectFailureReason:()=>Mf,VideoFrameFormat:()=>Ff,isSupported:()=>Hf,notifySelectedVideoEffectChanged:()=>xf,registerForVideoEffect:()=>Df,registerForVideoFrame:()=>Nf});var G={};n.r(G),n.d(G,{ErrorLevel:()=>cp,frameProcessingTimeoutInMs:()=>ap,isSupported:()=>mp,notifyFatalError:()=>Cp,notifySelectedVideoEffectChanged:()=>pp,registerForVideoEffect:()=>gp,registerForVideoFrame:()=>up,updatePersonalizedEffects:()=>hp});var J={};n.r(J),n.d(J,{addAndConfigure:()=>Tp,getAll:()=>Op,isSupported:()=>Mp,reconfigure:()=>Rp,remove:()=>kp,rename:()=>Fp});var K={};n.r(K),n.d(K,{AppTypes:()=>Dp,isSupported:()=>Up,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>qp,openAppDetail:()=>Wp,openFullStore:()=>jp,openInContextStore:()=>zp,openSpecificStore:()=>$p});var Z={};n.r(Z),n.d(Z,{DataResidency:()=>cg,authenticate:()=>eg,getAuthToken:()=>ng,getUser:()=>og,notifyFailure:()=>sg,notifySuccess:()=>ag,registerAuthenticationHandlers:()=>Yp});var X={};n.r(X),n.d(X,{isSupported:()=>kg,openAppInstallDialog:()=>Fg});var Y={};n.r(Y),n.d(Y,{CameraStartMode:()=>Ug,File:()=>Bg,FileFormat:()=>xg,ImageOutputFormats:()=>Vg,ImageUriType:()=>_g,Media:()=>qg,MediaControllerEvent:()=>Dg,MediaType:()=>Hg,Source:()=>Lg,VideoController:()=>Jg,captureImage:()=>jg,hasPermission:()=>Wg,requestPermission:()=>zg,scanBarCode:()=>Zg,selectMedia:()=>Kg,viewImages:()=>Qg});var ee={};n.r(ee),n.d(ee,{hasPermission:()=>fh,isSupported:()=>gh,requestPermission:()=>ph,scanBarCode:()=>dh});var te={};n.r(te),n.d(te,{isSupported:()=>Ch,openChat:()=>mh,openGroupChat:()=>wh});var ne={};n.r(ne),n.d(ne,{isSupported:()=>Eh,read:()=>Ah,write:()=>bh});var re={};n.r(re),n.d(re,{addNAATrustedOrigins:()=>Uh,canParentManageNAATrustedOrigins:()=>kh,deleteNAATrustedOrigins:()=>Lh,getParentOrigin:()=>Fh,isDeeplyNestedAuthSupported:()=>Mh,isNAAChannelRecommended:()=>Rh});var oe={};n.r(oe),n.d(oe,{chooseLocation:()=>jh,isSupported:()=>zh,showLocation:()=>Wh});var ie={};n.r(ie),n.d(ie,{getCurrentLocation:()=>qh,hasPermission:()=>Gh,isSupported:()=>Kh,map:()=>oe,requestPermission:()=>Jh});var ae={};n.r(ae),n.d(ae,{isSupported:()=>nm,open:()=>tm});var se={};n.r(se),n.d(se,{getLocation:()=>om,isSupported:()=>am,showLocation:()=>im});var ce={};n.r(ce),n.d(ce,{setOptions:()=>cm});var ue={};n.r(ue),n.d(ue,{CallType:()=>gm,EventActionSource:()=>mm,MeetingReactionType:()=>fm,MeetingType:()=>pm,SharingProtocol:()=>hm,appShareButton:()=>ce,getAppContentStageSharingCapabilities:()=>Tm,getAppContentStageSharingState:()=>Rm,getAuthenticationTokenForAnonymousUser:()=>Sm,getIncomingClientAudioState:()=>vm,getLiveStreamState:()=>bm,getMeetingDetails:()=>Cm,getMeetingDetailsVerbose:()=>ym,joinMeeting:()=>Nm,registerLiveStreamChangedHandler:()=>Im,registerMeetingReactionReceivedHandler:()=>Mm,registerRaiseHandStateChangedHandler:()=>km,registerSpeakingStateChangeHandler:()=>Fm,requestAppAudioHandling:()=>xm,requestStartLiveStreaming:()=>Am,requestStopLiveStreaming:()=>Em,shareAppContentToStage:()=>Pm,stopSharingAppContentToStage:()=>Om,toggleIncomingClientAudio:()=>wm,updateMicState:()=>Lm});var le={};n.r(le),n.d(le,{isSupported:()=>jm,openPurchaseExperience:()=>Bm});var de={};n.r(de),n.d(de,{composeMeeting:()=>$m,isSupported:()=>qm,openCalendarItem:()=>zm});var fe={};n.r(fe),n.d(fe,{composeMailWithHandoff:()=>Qm,isSupported:()=>Zm});var pe={};n.r(pe),n.d(pe,{ComposeMailType:()=>rv,composeMail:()=>tv,handoff:()=>fe,isSupported:()=>nv,openMailItem:()=>ev});var ge={};n.r(ge),n.d(ge,{enablePrintCapability:()=>iv,isSupported:()=>dv,print:()=>av,registerBeforeUnloadHandler:()=>uv,registerBeforeUnloadHandlerHelper:()=>lv,registerOnLoadHandler:()=>sv,registerOnLoadHandlerHelper:()=>cv});var he={};n.r(he),n.d(he,{isSupported:()=>mv,selectPeople:()=>gv});var me={};n.r(me),n.d(me,{isSupported:()=>Sv,showProfile:()=>yv});var ve={};n.r(ve),n.d(ve,{closeSearch:()=>Rv,isSupported:()=>Ov,registerHandlers:()=>Pv,unregisterHandlers:()=>Tv});var we={};n.r(we),n.d(we,{getContent:()=>Mv,isSupported:()=>Nv});var Ce={};n.r(Ce),n.d(Ce,{SharingAPIMessages:()=>Uv,history:()=>we,isSupported:()=>jv,shareWebContent:()=>Lv});var ye={};n.r(ye),n.d(ye,{close:()=>zv,isSupported:()=>$v});var Se={};n.r(Se),n.d(Se,{StageViewOpenMode:()=>Gv,isSupported:()=>Kv,open:()=>Jv,self:()=>ye});var be={};n.r(be),n.d(be,{captureImages:()=>Yv,isSupported:()=>tw,retrieveImages:()=>ew});var Ae={};n.r(Ae),n.d(Ae,{CameraRestriction:()=>aw,Source:()=>sw,hasPermission:()=>cw,image:()=>be,requestPermission:()=>uw});var Ee={};n.r(Ee),n.d(Ee,{isSupported:()=>mw,isWebStorageClearedOnUserLogOut:()=>gw});var Ie={};n.r(Ie),n.d(Ie,{CallModalities:()=>ww,isSupported:()=>yw,startCall:()=>Cw});var Pe={};n.r(Pe),n.d(Pe,{ExpectedFailureReason:()=>Eo,FailedReason:()=>Ao,Messages:()=>bo,notifyAppLoaded:()=>bw,notifyExpectedFailure:()=>Iw,notifyFailure:()=>Ew,notifySuccess:()=>Aw});var Te={};n.r(Te),n.d(Te,{getDragAndDropFiles:()=>Nw,isSupported:()=>Dw});var Oe={};n.r(Oe),n.d(Oe,{getSettings:()=>lC,registerOnRemoveHandler:()=>pC,registerOnSaveHandler:()=>fC,setSettings:()=>dC,setValidityState:()=>uC});var Re={};n.r(Re),n.d(Re,{getDefaultSizeIfNotProvided:()=>SC,startTask:()=>mC,submitTask:()=>wC,updateTask:()=>vC});var Fe={};n.r(Fe),n.d(Fe,{ContainerState:()=>EC,LiveShareHost:()=>PC,UserMeetingRole:()=>AC,isSupported:()=>IC});var ke={};n.r(ke),n.d(ke,{CartStatus:()=>jC,Intent:()=>BC,addOrUpdateCartItems:()=>zC,cartVersion:()=>VC,getCart:()=>WC,isSupported:()=>GC,removeCartItems:()=>$C,updateCartStatus:()=>qC});var Me,Ne,xe,De,Ue,Le,He,_e,Ve,Be,je={};function We(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(je),n.d(je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>fy,enableShortcutRelayCapability:()=>ly,isSupported:()=>dy,resetIsShortcutRelayCapabilityEnabled:()=>uy,setOverridableShortcutHandler:()=>cy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Me||(Me={})),function(e){e.M365Content="m365content"}(Ne||(Ne={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(xe||(xe={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(De||(De={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Ue||(Ue={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Le||(Le={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(He||(He={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(_e||(_e={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ve||(Ve={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Be||(Be={}));const ze=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com"]}');const $e="2.0.1",qe="2.0.2",Ge="2.0.3",Je="2.0.4",Ke="2.0.1",Qe="1.9.0",Ze="2.0.0",Xe="1.7.0",Ye="1.8.0",et="1.9.0",tt=n.t(ze,2).validOrigins,nt=1500,rt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ot=/^https:\/\//,it="https",at="teams.microsoft.com",st="The library has not yet been initialized",ct="The runtime has not yet been initialized",ut="The runtime version is not supported",lt="The call was not properly started";var dt=n(933);const ft=gt,pt=2147483647;function gt(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return mt(e)}return ht(e,t,n)}function ht(e,t,n){if("string"==typeof e)return yt(e,t);if(ArrayBuffer.isView(e))return Tt(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(bt(e,ArrayBuffer)||e&&bt(e.buffer,ArrayBuffer))return Ot(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(bt(e,SharedArrayBuffer)||e&&bt(e.buffer,SharedArrayBuffer)))return Ot(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return gt.from(r,t,n);const o=Kt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return gt.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function mt(e){return vt(e),wt(e<0?0:0|Ct(e))}function vt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function wt(e){if(e>pt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,gt.prototype),t}function Ct(e){if(e>=pt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pt.toString(16)+" bytes");return 0|e}function yt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!gt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|St(e,t);let r=wt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function St(e,t){if(gt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||bt(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return At(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Et(e).length;default:if(o)return r?-1:At(e).length;t=(""+t).toLowerCase(),o=!0}}function bt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function At(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Et(e){return dt.toByteArray(Pt(e))}gt.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),gt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),gt.from=function(e,t,n){return ht(e,t,n)},Object.setPrototypeOf(gt.prototype,Uint8Array.prototype),Object.setPrototypeOf(gt,Uint8Array),gt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},gt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==gt.prototype};const It=/[^+/0-9A-Za-z-_]/g;function Pt(e){if((e=(e=e.split("=")[0]).trim().replace(It,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Tt(e){if(bt(e,Uint8Array)){const t=new Uint8Array(e);return Ot(t.buffer,t.byteOffset,t.byteLength)}return Rt(e)}function Ot(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,gt.prototype),r}function Rt(e){const t=e.length<0?0:0|Ct(e.length),n=wt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ft(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Nt(r)}function kt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return xt(this,t,n);case"utf8":case"utf-8":return Ft(this,t,n);case"ascii":return Dt(this,t,n);case"latin1":case"binary":return Ut(this,t,n);case"base64":return Lt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}gt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ft(this,0,e):kt.apply(this,arguments)};const Mt=4096;function Nt(e){const t=e.length;if(t<=Mt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Mt));return n}function xt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Jt[e[r]];return o}function Dt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Ut(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Lt(e,t,n){return 0===t&&n===e.length?dt.fromByteArray(e):dt.fromByteArray(e.slice(t,n))}function Ht(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function _t(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(Gt(r))return a;e[n+a]=r}return a}function Vt(e,t,n,r){return qt(At(t,e.length-n),e,n,r)}function Bt(e,t,n,r){return qt(zt(t),e,n,r)}function jt(e,t,n,r){return qt(Et(t),e,n,r)}function Wt(e,t,n,r){return qt($t(t,e.length-n),e,n,r)}function zt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $t(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function qt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Gt(e){return e!=e}gt.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return _t(this,e,t,n);case"utf8":case"utf-8":return Vt(this,e,t,n);case"ascii":case"latin1":case"binary":return Bt(this,e,t,n);case"base64":return jt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Jt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Kt(e){if(gt.isBuffer(e)){const t=0|Ct(e.length),n=wt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Gt(e.length)?wt(0):Rt(e):"Buffer"===e.type&&Array.isArray(e.data)?Rt(e.data):void 0}const Qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Zt;const Xt=new Uint8Array(16);function Yt(){if(!Zt&&(Zt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(Xt)}const en=[];for(let e=0;e<256;++e)en.push((e+256).toString(16).slice(1));function tn(e,t=0){return en[e[t+0]]+en[e[t+1]]+en[e[t+2]]+en[e[t+3]]+"-"+en[e[t+4]]+en[e[t+5]]+"-"+en[e[t+6]]+en[e[t+7]]+"-"+en[e[t+8]]+en[e[t+9]]+"-"+en[e[t+10]]+en[e[t+11]]+en[e[t+12]]+en[e[t+13]]+en[e[t+14]]+en[e[t+15]]}const nn=function(e,t,n){if(Qt.randomUUID&&!t&&!e)return Qt.randomUUID();const r=(e=e||{}).random||(e.rng||Yt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return tn(r)},rn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const on=function(e){return"string"==typeof e&&rn.test(e)};var an,sn,cn,un,ln,dn,fn,pn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(an||(an={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(sn||(sn={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(cn||(cn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(un||(un={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(ln||(ln={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(dn||(dn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(fn||(fn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(pn||(pn={}));const gn={errorCode:De.NOT_SUPPORTED_ON_PLATFORM},hn={majorVersion:1,minorVersion:5},mn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},vn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),wn=new Error("Invalid response: Received more images than the specified max limit in the response.");function Cn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function yn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function Sn(){return nn()}function bn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&bn(e[t])})),Object.freeze(e)}function An(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function En(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function In(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Pn(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function Tn(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function On(e){return!(yn(`${e.majorVersion}.${e.minorVersion}`,`${hn.majorVersion}.${hn.minorVersion}`)>=0)}function Rn(e){return"https:"===e.protocol}function Fn(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=ft.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function kn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function Mn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function xn(e,t){if(Ln(e)||!Hn(e)||!_n(e))throw t||new Error("id is not valid.")}function Dn(e,t){const n=e.toString().toLocaleLowerCase();if(Ln(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Rn(e))throw t||new Error("Url should be a valid https url")}function Un(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Ln(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Hn(e){return e.length<256&&e.length>4}function _n(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Vn(e){if(!e)throw new Error("id must not be empty");if(!1===on(e))throw new Error("id must be a valid UUID")}const Bn=!!performance&&"now"in performance;function jn(){return Bn?performance.now()+performance.timeOrigin:void 0}function Wn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>Wn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>Wn(e[n],t+1)))}function zn(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:_e.NotAdult})})})}class $n{constructor(e=Sn()){this.uuid=e,Vn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function qn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Gn{}Gn.initializeCalled=!1,Gn.initializeCompleted=!1,Gn.additionalValidOrigins=[],Gn.initializePromise=void 0,Gn.isFramelessWindow=!1,Gn.frameContext=void 0,Gn.hostClientType=void 0,Gn.printCapabilityEnabled=!1,Gn.teamsJsInstanceId=(new $n).toString();var Jn=n(815);const Kn=new $n,Qn=Jn.debug.formatArgs;Jn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Kn.toString()}]`,Qn.call(this,e)};const Zn=(0,Jn.debug)("teamsJs");function Xn(e){return Zn.extend(e)}function Yn(e,t){return`${e}_${t}`}function er(e){return/^v\d+_[\w.]+$/.test(e)}var tr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const nr=Xn("runtime"),rr=4;function or(e){return e.apiVersion===rr}const ir={apiVersion:-1,supports:{}};function ar(e){if(or(e))return!0;throw-1===e.apiVersion?new Error(ct):new Error(ut)}let sr=ir;const cr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:mn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},ur=[an.desktop,an.web,an.rigel,an.surfaceHub,an.teamsRoomsWindows,an.teamsRoomsAndroid,an.teamsPhones,an.teamsDisplays],lr=[an.android,an.ios,an.ipados,an.visionOS],dr=[...ur,...lr];function fr(e){let t=e;if(t.apiVersion<rr&&pr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),or(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const pr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=tr(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],gr="2.1.2",hr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ur}],"1.9.0":[{capability:{location:{}},hostClientTypes:dr}],"2.0.0":[{capability:{people:{}},hostClientTypes:dr},{capability:{sharing:{}},hostClientTypes:[an.desktop,an.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[an.android,an.desktop,an.ios,an.teamsRoomsAndroid,an.teamsPhones,an.teamsDisplays,an.web]},{capability:{webStorage:{}},hostClientTypes:[an.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[an.android,an.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[an.android,an.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[an.android,an.ios,an.ipados,an.visionOS]}],"2.1.2":[]},mr=nr.extend("generateBackCompatRuntimeConfig");function vr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=vr(e[r]||{},t[r]));return n}function wr(e,t,n){mr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);mr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{yn(e,t)>=0&&n[t].forEach((e=>{void 0!==Gn.hostClientType&&e.hostClientTypes.includes(Gn.hostClientType)&&(r=vr(r,e.capability))}))}));const o={apiVersion:rr,hostVersionsInfo:mn,isLegacyTeams:!0,supports:r};return mr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Cr=nr.extend("applyRuntimeConfig");function yr(e){"string"==typeof e.apiVersion&&(Cr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Cr("Fast-forwarding runtime %o",e);const t=fr(e);Cr("Applying runtime %o",t),sr=bn(t)}function Sr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const br="2.47.1",Ar={childProxyingCommunication:!1};function Er(){Ar.childProxyingCommunication=!0}function Ir(){return Ar.childProxyingCommunication}let Pr={disableEnforceOriginMatchForChildResponses:!1};function Tr(){return Pr}function Or(e){Pr=e}function Rr(e){return Or(Object.assign(Object.assign({},Pr),e)),Tr()}var Fr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const kr=e=>{const{uuid:t}=e,n=Fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Mr=e=>{const{uuidAsString:t}=e,n=Fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=Fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},xr=e=>{const{uuid:t}=e,n=Fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Dr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Ur=Xn("flushMessageQueue");function Lr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=kr(o);Ur("Flushing message %s from %s message queue via postMessage.",Dr(n),r),e.postMessage(n,t)}}}const Hr=Xn("internal"),_r=Hr.extend("ensureInitializeCalled"),Vr=Hr.extend("ensureInitialized");function Br(){if(!Gn.initializeCalled)throw _r(st),new Error(st)}function jr(e,...t){if(!Gn.initializeCompleted)throw Vr("%s. initializeCalled: %s",st,Gn.initializeCalled.toString()),new Error(st);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Gn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Gn.frameContext}".`)}return ar(e)}function Wr(e=$e){const t=yn(Gn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function zr(){return Gn.hostClientType==an.android||Gn.hostClientType==an.ios||Gn.hostClientType==an.ipados||Gn.hostClientType==an.visionOS}function $r(e=$e){if(!zr()){throw{errorCode:De.NOT_SUPPORTED_ON_PLATFORM}}if(!Wr(e)){throw{errorCode:De.OLD_PLATFORM}}}function qr(e){let t=Gn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&ot.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Gn.additionalValidOrigins=t}function Gr(e){if(!Zr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Kr}-${Qr}).`)}function Jr(e){if(Ln(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Xr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Kr=4,Qr=256;function Zr(e){return e.length<Qr&&e.length>Kr}function Xr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Yr(e){if(!(e instanceof to))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class eo{constructor(e){this.idAsString=e,Jr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class to extends eo{constructor(e){super(e),Gr(e)}toJSON(){return{appIdAsString:this.toString()}}}function no(e){return null==e}var ro=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let oo;const io="v1",ao=Xn("messageChannels.telemetry");function so(){return ro(this,void 0,void 0,(function*(){if(oo)return ao("Returning telemetry port from cache"),oo;if(!co())throw gn;return oo=yield mc(Yn(io,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),oo}))}function co(){var e;return!(!jr(sr)||!(null===(e=sr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function uo(){oo=void 0}var lo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let fo;const po="v1",go=Xn("messageChannels.dataLayer");function ho(){return lo(this,void 0,void 0,(function*(){if(fo)return go("Returning dataLayer port from cache"),fo;if(!mo())throw gn;return fo=yield mc(Yn(po,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),fo}))}function mo(){var e;return!(!jr(sr)||!(null===(e=sr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function vo(){fo=void 0}function wo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");jr(sr),Ns(e)}function Co(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");jr(sr),xs(e)}const yo="v2",So=Xn("app"),bo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Ao,Eo;function Io(){return Gn.initializeCompleted}function Po(){return Gn.frameContext}function To(e){return Ki(Yn(yo,"app.initialize"),e)}function Oo(e){oc.currentWindow=e}function Ro(){Gn.initializeCalled&&(vs(),Gn.initializeCalled=!1,Gn.initializeCompleted=!1,Gn.initializePromise=void 0,Gn.additionalValidOrigins=[],Gn.frameContext=void 0,Gn.hostClientType=void 0,Gn.isFramelessWindow=!1,uo(),vo(),sc())}function Fo(){return new Promise((e=>{Br(),e(cc(Yn(yo,"app.getContext"),"getContext"))})).then((e=>Ho(e)))}function ko(){Br(),Qi(Yn(yo,"app.notifyAppLoaded"))}function Mo(){return Yi(Yn(yo,"app.notifySuccess"))}function No(e){Br(),Xi(Yn(yo,"app.notifyFailure"),e)}function xo(e){Br(),Zi(Yn(yo,"app.notifyExpectedFailure"),e)}function Do(e){oa(Yn(yo,"app.registerOnThemeChangeHandler"),e)}function Uo(e){Ps(e)}function Lo(e){return ia(Yn(yo,"app.openLink"),e)}function Ho(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:sn.teams,clientType:e.hostClientType?e.hostClientType:an.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new to(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Gn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function _o(e){ei(Yn(Xo,"dialog.update.resize"),e)}function Vo(){return!(!jr(sr)||!sr.supports.dialog)&&!!sr.supports.dialog.update}function Bo(e,t,n){ni(Yn(Xo,"dialog.url.bot.open"),e,t,n)}function jo(){return jr(sr)&&void 0!==(sr.supports.dialog&&sr.supports.dialog.url&&sr.supports.dialog.url.bot)}function Wo(e){if(jr(sr,cn.task),!qo())throw gn;Cc(Yn(Xo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function zo(e){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!qo())throw gn;Cc(Yn(Xo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function $o(e){if(jr(sr,cn.task),!qo())throw gn;for(Ss("messageForChild"),ys(Yn(Xo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ai.reverse();ai.length>0;){e(ai.pop())}}function qo(){var e,t;return jr(sr)&&!!(null===(t=null===(e=sr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Go(e,t,n){ti(Yn(Xo,"dialog.url.open"),e,t,n)}function Jo(e,t){ri(Yn(Xo,"dialog.url.submit"),e,t)}function Ko(){return jr(sr)&&void 0!==(sr.supports.dialog&&sr.supports.dialog.url)}function Qo(e){return{url:e.url,height:e.size?e.size.height:fn.Small,width:e.size?e.size.width:fn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Zo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Ao||(Ao={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Eo||(Eo={})),So("teamsjs instance is version %s, starting at %s UTC (%s local)",br,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Nn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?So("teamsjs is being used from %s. %s",t,n):So("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Xo="v2",Yo="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function ei(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.task,cn.meetingStage),!Vo())throw gn;Cc(e,"tasks.updateTask",[t])}function ti(e,t,n,r){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Ko())throw gn;r&&ys(Yn(Xo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Cc(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ss("messageForParent")}))}function ni(e,t,n,r){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!jo())throw gn;r&&ys(Yn(Xo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Cc(e,"tasks.startTask",[Zo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ss("messageForParent")}))}function ri(e,t,n){if(jr(sr,cn.content,cn.task),!Ko())throw gn;Gn.frameContext===cn.content&&console.warn(Yo),Cc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function oi(e){return{card:e.card,height:e.size?e.size.height:fn.Small,width:e.size?e.size.width:fn.Small,title:e.title}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}const ai=[];function si(e){Gn.frameContext&&(Gn.frameContext===cn.task?ai.push(e):Ss("messageForChild"))}function ci(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!ui())throw gn;const n=ii(e);Cc(Yn(Xo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ui(){const e=sr.hostVersionsInfo&&sr.hostVersionsInfo.adaptiveCardSchemaVersion&&!On(sr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(sr)&&void 0!==(e&&sr.supports.dialog&&sr.supports.dialog.card&&sr.supports.dialog.card.bot)}function li(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!di())throw gn;const n=oi(e);Cc(Yn(Xo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=sr.hostVersionsInfo&&sr.hostVersionsInfo.adaptiveCardSchemaVersion&&!On(sr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(sr)&&void 0!==(e&&sr.supports.dialog&&sr.supports.dialog.card)}function fi(){ys(Yn(Xo,"dialog.registerMessageForChildHandler"),"messageForChild",si,!1)}function pi(){return!(!jr(sr)||!sr.supports.dialog)}const gi="v2";var hi,mi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(hi||(hi={}));class vi{constructor(){this.enabled=!0,this.selected=!1}}let wi,Ci,yi,Si,bi;function Ai(){ys(Yn(gi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ti,!1),ys(Yn(gi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ri,!1),ys(Yn(gi,"menus.registerSetModuleViewHandler"),"setModuleView",Ii,!1)}function Ei(e,t){if(jr(sr),!Fi())throw gn;yi=t,Cc(Yn(gi,"menus.setUpViews"),"setUpViews",[e])}function Ii(e){yi&&yi(e)||(jr(sr),Cc(Yn(gi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Pi(e,t){if(jr(sr),!Fi())throw gn;wi=t,Cc(Yn(gi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ti(e){wi&&wi(e)||(jr(sr),Cc(Yn(gi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Oi(e,t){if(jr(sr),!Fi())throw gn;Ci=t,Cc(Yn(gi,"menus.showActionMenu"),"showActionMenu",[e])}function Ri(e){Ci&&Ci(e)||(jr(sr),Cc(Yn(gi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Fi(){return!(!jr(sr)||!sr.supports.menus)}function ki(){ys(Yn(Ja,"pages.config.registerSettingsSaveHandler"),"settings.save",Hi,!1),ys(Yn(Ja,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Bi,!1)}function Mi(e){return rs(Yn(Ja,"pages.config.setValidityState"),e)}function Ni(e){return is(Yn(Ja,"pages.config.setConfig"),e)}function xi(e){Di(Yn(Ja,"pages.config.registerOnSaveHandler"),e,(()=>{if(!no(e)&&!Wi())throw gn}))}function Di(e,t,n){!no(t)&&jr(sr,cn.settings),n&&n(),Si=t,!no(t)&&Cc(e,"registerHandler",["save"])}function Ui(e){Li(Yn(Ja,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!no(e)&&!Wi())throw gn}))}function Li(e,t,n){!no(t)&&jr(sr,cn.remove,cn.settings),n&&n(),bi=t,!no(t)&&Cc(e,"registerHandler",["remove"])}function Hi(e){const t=new Vi(e);Si?Si(t):_s()?qs("settings.save",[e]):t.notifySuccess()}function _i(e){As(Yn(Ja,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[cn.content],(()=>{if(!Wi())throw gn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(mi||(mi={}));class Vi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Cc(Yn(Ja,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Cc(Yn(Ja,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Bi(){const e=new ji;bi?bi(e):_s()?qs("settings.remove",[]):e.notifySuccess()}class ji{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Cc(Yn(Ja,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Cc(Yn(Ja,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function Wi(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.config}class zi{}class $i extends zi{validate(e){return!0}deserialize(e){return e}}var qi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gi=6e4,Ji=Xn("app");function Ki(e,t){if(Nn()){return Ji.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Pn((()=>ra(e,t)),Gi,new Error("SDK initialization timed out."))}function Qi(e){Cc(e,bo.AppLoaded,[br])}function Zi(e,t){Cc(e,bo.ExpectedFailure,[t.reason,t.message])}function Xi(e,t){Cc(e,bo.Failure,[t.reason,t.message])}function Yi(e){return qi(this,void 0,void 0,(function*(){if(Gn.initializeCompleted)return ta(e);if(!Gn.initializePromise)throw new Error(st);return Gn.initializePromise.then((()=>ta(e)))}))}function ea(){var e;return jr(sr)&&!!(null===(e=sr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ta(e){return qi(this,void 0,void 0,(function*(){return ea()?gc(bo.Success,[br],new $i,e).then((()=>({hasFinishedSuccessfully:!0}))):(Cc(e,bo.Success,[br]),{hasFinishedSuccessfully:"unknown"})}))}const na=Ji.extend("initializeHelper");function ra(e,t){return new Promise((n=>{Gn.initializeCalled||(Gn.initializeCalled=!0,ms(),Gn.initializePromise=ac(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=$e})=>{Gn.frameContext=e,Gn.hostClientType=t,Gn.clientSupportedSDKVersion=r;try{na("Parsing %s",n);let e=JSON.parse(n);if(na("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=zn(e),n&&yr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{na("Attempting to parse %s as an SDK version",n),isNaN(yn(n,$e))||(Gn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(na("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=zn(e),yr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;yr(wr(Gn.clientSupportedSDKVersion,cr,hr))}}Gn.initializeCompleted=!0})),Ai(),ki(),fi()),Array.isArray(t)&&qr(t),void 0!==Gn.initializePromise?n(Gn.initializePromise):na("GlobalVars.initializePromise is unexpectedly undefined")}))}function oa(e,t){!no(t)&&Br(),Es(e,t)}function ia(e,t){return new Promise((n=>{jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),n(uc(e,"executeDeepLink",t))}))}var aa=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let sa=[];const ca=Xn("validateOrigin");let ua;function la(){return aa(this,void 0,void 0,(function*(){ua||(yield fa())}))}function da(){return 0===sa.length}function fa(e=!1){return aa(this,void 0,void 0,(function*(){if(!da()&&!e)return sa;if(ua)return ua;if(Nn())return sa=tt,tt;{ca("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),nt);return ua=fetch(rt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ca("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(pa(JSON.stringify(e)))return sa=e.validOrigins,sa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ca(`validOrigins fetch call to CDN failed due to Timeout of ${nt} ms. Defaulting to fallback list`):ca("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),sa=tt,sa))),ua}}))}function pa(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return ca("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ga(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function ha(e,t){const n=t||da()?tt:sa;return ma(e,n)?Promise.resolve(!0):(ca("Origin %s is not in the local valid origins list, fetching from CDN",e),fa(t).then((t=>ma(e,t))))}function ma(e,t){if(!Rn(e))return ca("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>ga(e,n))))return!0;for(const e of Gn.additionalValidOrigins){if(ga("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ca("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Gn.additionalValidOrigins),!1}function va(e){As(Yn(Ja,"pages.appButton.onClick"),"appButtonClick",e,[cn.content],(()=>{if(!ya())throw gn}))}function wa(e){As(Yn(Ja,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[cn.content],(()=>{if(!ya())throw gn}))}function Ca(e){As(Yn(Ja,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[cn.content],(()=>{if(!ya())throw gn}))}function ya(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.appButton}function Sa(){ds()}function ba(){return Qa(Yn(Ja,"pages.backStack.navigateBack"))}function Aa(e){Ea(Yn(Ja,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!no(e)&&!Ia())throw gn}))}function Ea(e,t,n){!no(t)&&jr(sr),n&&n(),ls(t),!no(t)&&Cc(e,"registerHandler",["backButton"])}function Ia(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.backStack}function Pa(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Oa())throw gn;t(dc(Yn(Ja,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Ta(){return new Promise((e=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Oa())throw gn;e(dc(Yn(Ja,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Oa(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.currentApp}function Ra(){if(jr(sr,cn.content),!ka())throw gn;Cc(Yn(Ja,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Fa(){if(jr(sr,cn.content),!ka())throw gn;Cc(Yn(Ja,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ka(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.fullTrust}function Ma(e){return Za(Yn(Ja,"pages.tabs.navigateToTab"),e)}function Na(e){return Ya(Yn(Ja,"pages.tabs.getTabInstances"),e)}function xa(e){return es(Yn(Ja,"pages.tabs.getMruTabInstances"),e)}function Da(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.tabs}var Ua,La;function Ha(e){const t=Yn(Ja,"pages.returnFocus");if(jr(sr),!Ga())throw gn;if(void 0===e&&Cc(t,"returnFocus",[!1]),"boolean"==typeof e)Cc(t,"returnFocus",[e]);else switch(e){case La.PreviousLandmark:case La.GoToActivityFeed:Cc(t,"returnFocus",[!1,e]);break;case La.NextLandmark:Cc(t,"returnFocus",[!0,e])}}function _a(e){As(Yn(Ja,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ga())throw gn}))}function Va(e){ns(Yn(Ja,"pages.setCurrentFrame"),e)}function Ba(e,t,n){la(),Ki(Yn(Ja,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Va(e)}function ja(){return os(Yn(Ja,"pages.getConfig."))}function Wa(e){return Ka(Yn(Ja,"pages.navigateCrossDomain"),e)}function za(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Ga())throw gn;const n=Yn(Ja,"pages.navigateToApp");if(sr.isLegacyTeams){t(uc(n,"executeDeepLink",Tn(as(e)?e:ss(e))))}else{t(uc(n,"pages.navigateToApp",as(e)?cs(e):e))}}))}function $a(e){return ts(Yn(Ja,"pages.shareDeepLink"),e)}function qa(e){As(Yn(Ja,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!no(e)&&!Ga())throw gn}))}function Ga(){return!(!jr(sr)||!sr.supports.pages)}la(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ua||(Ua={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(La||(La={}));const Ja="v2";function Ka(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage),!Ga())throw gn;n(lc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Qa(e){return new Promise((t=>{if(jr(sr),!Ia())throw gn;t(lc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Za(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(lc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Xa(e,t){if(jr(sr),!Ga())throw gn;Cc(e,"returnFocus",[t])}function Ya(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(cc(e,"getTabInstances",t))}))}function es(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(cc(e,"getMruTabInstances",t))}))}function ts(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Ga())throw gn;Cc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ns(e,t){if(jr(sr,cn.content),!Ga())throw gn;Cc(e,"setFrameContext",[t])}function rs(e,t){if(jr(sr,cn.settings,cn.remove),!Wi())throw gn;Cc(e,"settings.setValidityState",[t])}function os(e){return new Promise((t=>{if(jr(sr,cn.content,cn.settings,cn.remove,cn.sidePanel),!Ga())throw gn;t(cc(e,"settings.getSettings"))}))}function is(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.settings,cn.sidePanel),!Wi())throw gn;n(uc(e,"settings.setSettings",t))}))}function as(e){return e.appId instanceof to}function ss(e){return Object.assign(Object.assign({},e),{appId:new to(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function cs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let us;function ls(e){us=e}function ds(){ys(Yn(Ja,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",fs,!1)}function fs(){us&&us()||(_s()?qs("backButtonPress",[]):ba())}var ps=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const gs=Xn("handlers");class hs{static initializeHandlers(){hs.handlers.themeChange=Is,hs.handlers.load=Rs,hs.handlers.beforeUnload=Ms,ds()}static uninitializeHandlers(){hs.handlers={},hs.themeChangeHandler=null,hs.loadHandler=null,hs.beforeUnloadHandler=null,hs.beforeSuspendOrTerminateHandler=null,hs.resumeHandler=null}}function ms(){hs.initializeHandlers()}function vs(){hs.uninitializeHandlers()}hs.handlers={},hs.themeChangeHandler=null,hs.loadHandler=null,hs.beforeUnloadHandler=null,hs.beforeSuspendOrTerminateHandler=null,hs.resumeHandler=null,hs.hostToAppPerformanceMetricsHandler=null;const ws=gs.extend("callHandler");function Cs(e,t){const n=hs.handlers[e];if(n){ws("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return _s()?(qs(e,t),[!1,void 0]):(ws("Handler for action message %s not found.",e),[!1,void 0])}function ys(e,t,n,r=!0,o=[]){n?(hs.handlers[t]=n,r&&Cc(e,"registerHandler",[t,...o])):delete hs.handlers[t]}function Ss(e){delete hs.handlers[e]}function bs(e){return null!=hs.handlers[e]}function As(e,t,n,r,o){n&&jr(sr,...r),o&&o(),ys(e,t,n)}function Es(e,t){hs.themeChangeHandler=t,!no(t)&&Cc(e,"registerHandler",["themeChange"])}function Is(e){hs.themeChangeHandler&&hs.themeChangeHandler(e),_s()&&qs("themeChange",[e])}function Ps(e){hs.hostToAppPerformanceMetricsHandler=e}function Ts(e){hs.hostToAppPerformanceMetricsHandler&&hs.hostToAppPerformanceMetricsHandler(e)}function Os(e,t){hs.loadHandler=t,!no(t)&&Cc(e,"registerHandler",["load"])}function Rs(e){const t=Fs(e);hs.resumeHandler?(hs.resumeHandler(t),_s()&&qs("load",[t])):hs.loadHandler&&(hs.loadHandler(e),_s()&&qs("load",[e]))}function Fs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function ks(e,t){hs.beforeUnloadHandler=t,!no(t)&&Cc(e,"registerHandler",["beforeUnload"])}function Ms(){return ps(this,void 0,void 0,(function*(){const e=()=>{Cc(Yn("v2","handleBeforeUnload"),"readyToUnload",[])};hs.beforeSuspendOrTerminateHandler?(yield hs.beforeSuspendOrTerminateHandler(),_s()?qs("beforeUnload"):e()):hs.beforeUnloadHandler&&hs.beforeUnloadHandler(e)||(_s()?qs("beforeUnload"):e())}))}function Ns(e){hs.beforeSuspendOrTerminateHandler=e,!no(e)&&Cc(Yn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function xs(e){hs.resumeHandler=e,!no(e)&&Cc(Yn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ds=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Us=Xn("childProxyingCommunication");class Ls{}function Hs(){Ls.window=null,Ls.origin=null,Ls.messageQueue=[]}function _s(){return!!Ir()&&!!Ls.window}function Vs(e,t){return!!Ir()&&(Ls.window&&!Ls.window.closed&&e!==Ls.window||(Ls.window=e,Ls.origin=t),Ls.window&&Ls.window.closed?(Ls.window=null,Ls.origin=null,!1):Ls.window===e)}function Bs(e,t,n,r){return Ds(this,void 0,void 0,(function*(){Ls.window===t&&(Lr(Ls.window,Ls.origin,Ls.messageQueue,"child"),Ws(e,n,r))}))}Ls.messageQueue=[];const js=Us.extend("handleIncomingMessageFromChild");function Ws(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Mr(e.data),[o,i]=Cs(r.func,r.args);if(o&&void 0!==i)return js("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Dr(r),r.func),void $s(r.id,r.uuid,Array.isArray(i)?i:[i]);js("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Dr(r),r.func),zs(r,t,n)}function zs(e,t,n){const r=t(Yn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ls.origin;n(r.uuid,((...t)=>{if(!Ls.window)return;if(!Tr().disableEnforceOriginMatchForChildResponses&&o!==Ls.origin)return void js("Origin of child window has changed, not sending response back to child window");const n=t.pop();js("Message from parent being relayed to child, id: %s",Dr(e)),$s(e.id,e.uuid,t,n)}))}function $s(e,t,n,r){const o=Ls.window,i=Gs(e,t,n,r),a=xr(i),s=Ls.origin;o&&s&&(js("Sending message %s to %s via postMessage, args = %o",Dr(a),"child",a.args),o.postMessage(a,s))}function qs(e,t){const n=Ls.window,r=Js(e,t),o=Ls.origin;n&&o?n.postMessage(r,o):Ls.messageQueue.push(r)}function Gs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Js(e,t){return{func:e,args:t||[]}}class Ks{static storeCallbackInformation(e,t){Ks.callbackInformation.set(e,t)}static clearMessages(){Ks.callbackInformation.clear()}static deleteMessageInformation(e){Ks.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ts({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=Ks.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ts({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ks.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ks.callbackInformation=new Map;const Qs=Xn("nestedAppAuthUtils"),Zs=Qs.extend("tryPolyfillWithNestedAppAuthBridge"),Xs="v2";function Ys(e,t,n){var r;const o=Zs;if(Gn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=tc(a,n);s&&(a.nestedAppAuthBridge=s)}const ec=Qs.extend("createNestedAppAuthBridge");function tc(e,t){const n=ec;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Yn(Xs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var nc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const rc=Xn("communication");class oc{}class ic{}function ac(e,t){if(ic.messageListener=e=>Tc(e),oc.currentWindow=oc.currentWindow||Mn(),oc.parentWindow=oc.currentWindow.parent!==oc.currentWindow.self?oc.currentWindow.parent:oc.currentWindow.opener,oc.topWindow=oc.currentWindow.top,(oc.parentWindow||e)&&oc.currentWindow.addEventListener("message",ic.messageListener,!1),!oc.parentWindow){const e=oc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Gn.isFramelessWindow=!0,e.onNativeMessage=Lc}try{return oc.parentOrigin="*",fc(t,"initialize",[br,rr,e]).then((([e,t,n,r])=>(Ys(r,oc.currentWindow,{onMessage:Rc,sendPostMessage:Sc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{oc.parentOrigin=null}}function sc(){oc.currentWindow&&oc.currentWindow.removeEventListener("message",ic.messageListener,!1),oc.currentWindow=null,oc.parentWindow=null,oc.parentOrigin=null,ic.parentMessageQueue=[],ic.nextMessageId=0,ic.callbacks.clear(),ic.promiseCallbacks.clear(),ic.portCallbacks.clear(),ic.legacyMessageIdsToUuidMap={},Ks.clearMessages(),Hs()}function cc(e,t,...n){return fc(e,t,n).then((([e])=>e))}function uc(e,t,...n){return fc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function lc(e,t,n,...r){return fc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function dc(e,t,...n){return fc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function fc(e,t,n=void 0){if(!er(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(wc(Ic(e,t,n).uuid))}))}function pc(e){return e.map((e=>Sr(e)?e.serialize():e))}function gc(e,t,n,r,o){var i;return nc(this,void 0,void 0,(function*(){const a=pc(t),[s]=yield fc(r,e,a);if(o&&o(s)||!o&&We(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${De.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function hc(e,t,n,r){var o;return nc(this,void 0,void 0,(function*(){const i=pc(t),[a]=yield fc(n,e,i);if(r&&r(a)||!r&&We(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${De.INTERNAL_ERROR}, message: Invalid response from host`)}))}function mc(e,t,n=void 0){if(!er(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return vc(Ic(e,t,n).uuid)}function vc(e){return new Promise(((t,n)=>{ic.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function wc(e){return new Promise((t=>{ic.promiseCallbacks.set(e,t)}))}function Cc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!er(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Ic(e,t,o);r&&ic.callbacks.set(i.uuid,r)}ic.parentMessageQueue=[],ic.topMessageQueue=[],ic.nextMessageId=0,ic.callbacks=new Map,ic.promiseCallbacks=new Map,ic.portCallbacks=new Map,ic.legacyMessageIdsToUuidMap={};const yc=rc.extend("sendNestedAuthRequestToTopWindow");function Sc(e,t){const n=yc,r=oc.topWindow,o=$c(e,t);return n("Message %s information: %o",Dr(o),{actionName:o.func}),Ac(r,o)}const bc=rc.extend("sendRequestToTargetWindowHelper");function Ac(e,t){const n=bc,r=jc(e),o=kr(t);if(Gn.isFramelessWindow)oc.currentWindow&&oc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Dr(o),r),oc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Bc(e);e&&i?(n("Sending message %s to %s via postMessage",Dr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Dr(o),r),Vc(e).push(t))}return t}const Ec=rc.extend("sendMessageToParentHelper");function Ic(e,t,n,r,o){const i=Ec,a=oc.parentWindow,s=zc(e,t,n,r,o);return Ks.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Dr(s),{actionName:t,args:n}),Ac(a,s)}const Pc=rc.extend("processIncomingMessage");function Tc(e){return nc(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Pc("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return kc(t,n).then((r=>{r?(Mc(t,n),t!==oc.parentWindow?Vs(t,n)&&Bs(e,t,Ic,((e,t)=>ic.callbacks.set(e,t))):Lc(e)):Pc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Oc=rc.extend("processAuthBridgeMessage");function Rc(e,t){var n,r;const o=Oc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?kc(c,u)?(oc.topWindow&&!oc.topWindow.closed&&c!==oc.topWindow||(oc.topWindow=c,oc.topOrigin=u),oc.topWindow&&oc.topWindow.closed&&(oc.topWindow=null,oc.topOrigin=null),Lr(oc.topWindow,oc.topOrigin,ic.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Fc=rc.extend("shouldProcessIncomingMessage");function kc(e,t){return nc(this,void 0,void 0,(function*(){if(oc.currentWindow&&e===oc.currentWindow)return Fc("Should not process message because it is coming from the current window"),!1;if(oc.currentWindow&&oc.currentWindow.location&&t&&t===oc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Fc("Message has an invalid origin of %s",t),!1}const n=yield ha(e);return n||Fc("Message has an invalid origin of %s",t),n}}))}function Mc(e,t){Gn.isFramelessWindow||oc.parentWindow&&!oc.parentWindow.closed&&e!==oc.parentWindow||(oc.parentWindow=e,oc.parentOrigin=t),oc.parentWindow&&oc.parentWindow.closed&&(oc.parentWindow=null,oc.parentOrigin=null),Lr(oc.parentWindow,oc.parentOrigin,ic.parentMessageQueue,"parent")}const Nc=rc.extend("handleIncomingMessageFromParent");function xc(e){const t=Nc;if(!e.uuid)return ic.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Dc(ic.callbacks,t);if(n)return n;const r=Dc(ic.promiseCallbacks,t);if(r)return r;const o=Dc(ic.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Dr(e))}function Dc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Uc(e,t){const n=Dc(t,e.uuid);n&&t.delete(n),e.uuid?ic.legacyMessageIdsToUuidMap={}:delete ic.legacyMessageIdsToUuidMap[e.id]}function Lc(e){const t=Nc,n=jn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=xc(o);if(i){const r=ic.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ks.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),Hc(e)||(t("Removing registered callback for message %s",i.toString()),Uc(o,ic.callbacks)));const a=ic.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),Uc(o,ic.promiseCallbacks));const s=ic.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),Uc(o,ic.portCallbacks)}o.uuid&&(ic.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ks.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Dr(r),r.func),Cs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Hc(e){return!0===e.data.isPartialResponse}function _c(){return oc.topWindow!==oc.parentWindow}function Vc(e){return e===oc.topWindow&&_c()?ic.topMessageQueue:e===oc.parentWindow?ic.parentMessageQueue:[]}function Bc(e){return e===oc.topWindow&&_c()?oc.topOrigin:e===oc.parentWindow?oc.parentOrigin:null}function jc(e){return e===oc.topWindow&&_c()?"top":e===oc.parentWindow?"parent":null}function Wc(e,t){let n;n=oc.currentWindow.setInterval((()=>{0===Vc(e).length&&(clearInterval(n),t())}),100)}function zc(e,t,n,r,o){const i=ic.nextMessageId++,a=new $n;ic.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Gn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:jn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function $c(e,t){const n=ic.nextMessageId++,r=new $n;return ic.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:jn(),apiVersionTag:t,args:[],data:e}}const qc="v1";function Gc(e){if(!no(e)&&jr(sr),!no(e)&&!Jc())throw gn;e?ys(Yn(qc,"log.request"),"log.request",(()=>{const t=e();Cc(Yn(qc,"log.receive"),"log.receive",[t])})):Ss("log.request")}function Jc(){return!(!jr(sr)||!sr.supports.logs)}var Kc,Qc,Zc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Kc||(Kc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Qc||(Qc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Zc||(Zc={}));const Xc="v1";function Yc(e,t){jr(sr),Cc(Yn(Xc,"uploadCustomApp"),"uploadCustomApp",[e],t||Cn())}function eu(e,t,n){jr(sr),Cc(Yn(Xc,"sendCustomMessage"),e,t,n)}function tu(e,t){if(jr(sr),!_s())throw new Error("The child window has not yet been initialized or is not present");qs(e,t)}function nu(e,t){jr(sr),ys(Yn(Xc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function ru(e,t){jr(sr),ys(Yn(Xc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function ou(e){jr(sr,cn.content,cn.sidePanel,cn.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Cc(Yn(Xc,"openFilePreview"),"openFilePreview",t)}const iu="v1";function au(e){return new Promise((t=>{if(jr(sr,cn.content),!uu())throw gn;const n=uc(Yn(iu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ys(Yn(iu,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&ys(Yn(iu,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function su(){if(jr(sr,cn.content),!uu())throw gn;Cc(Yn(iu,"conversations.closeConversation"),"conversations.closeConversation"),Ss("startConversation"),Ss("closeConversation")}function cu(){return new Promise((e=>{if(jr(sr),!uu())throw gn;e(cc(Yn(iu,"conversations.getChatMember"),"getChatMembers"))}))}function uu(){return!(!jr(sr)||!sr.supports.conversations)}var lu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const du="v2",fu=Xn("copilot");function pu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function gu(e,t){var n;return void 0===t&&(t=null!==(n=jn())&&void 0!==n?n:Date.now()),lu(this,void 0,void 0,(function*(){return jr(sr),fu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),hc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Yn(du,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var hu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mu="v2",vu=Xn("copilot");function wu(){var e,t;return jr(sr)&&(!!(null===(e=sr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=sr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Cu(e){var t,n,r;return hu(this,void 0,void 0,(function*(){if(jr(sr),!wu())throw new Error(`Error code: ${gn.errorCode}, message: Not supported on platform`);if((null===(t=sr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return vu("Eligibility information is already available on runtime."),sr.hostVersionsInfo.appEligibilityInformation;vu("Eligibility information is not available on runtime. Requesting from host.");const o=yield cc(Yn(mu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(We(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!yu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=_e.NotAdult),o}))}function yu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var Su,bu,Au,Eu,Iu,Pu,Tu,Ou,Ru;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Su||(Su={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(bu||(bu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Au||(Au={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Eu||(Eu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Iu||(Iu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Pu||(Pu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Tu||(Tu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Ou||(Ou={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Ru||(Ru={}));class Fu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var ku=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Mu="v2";function Nu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function xu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ru).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||We(e)}function Du(e){return ku(this,void 0,void 0,(function*(){jr(sr);return gc("copilot.sidePanel.getContent",e?[new Bu(e)]:[],new _u,Yn(Mu,"copilot.sidePanel.getContent"),xu)}))}function Uu(e){return ku(this,void 0,void 0,(function*(){jr(sr);return gc("copilot.sidePanel.preCheckUserConsent",e?[new ju(e)]:[],new Vu,Yn(Mu,"copilot.sidePanel.preCheckUserConsent"),xu)}))}function Lu(e){As(Yn(Mu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[cn.content],(()=>{if(!Nu())throw Hu}))}const Hu=new Fu(Ru.NotSupportedOnPlatform,"This API is not supported on the current platform.");class _u extends zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Vu extends zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Bu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class ju{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var Wu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const zu="v2";function $u(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.view)}function qu(){return Wu(this,void 0,void 0,(function*(){jr(sr),yield gc("copilot.view.closeSidePanel",[],new Gu,Yn(zu,"copilot.view.closeSidePanel"))}))}class Gu extends zi{validate(e){return!0}deserialize(e){return e}}const Ju="v2";class Ku{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Qu(e){const t=e;return t.responseType===Yu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Zu="Action.Execute";var Xu,Yu,el,tl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Xu||(Xu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Yu||(Yu={}));class nl extends zi{validate(e){return Qu(e)}deserialize(e){return e}}function rl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(el).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function ol(e){e.requestType===Xu.ActionExecuteInvokeRequest?il(e):e.requestType===Xu.QueryMessageExtensionRequest&&al(e)}function il(e){if(e.type!==Zu){throw{errorCode:el.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Zu}"`}}if(!Wn(e.data)){throw{errorCode:el.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function al(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 sl(e,t,n){if(jr(sr,cn.content),!vl())throw gn;const r=new to(e);return ol(n),fc(Yn(Ju,"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 cl(e,t){if(jr(sr,cn.content),!vl())throw gn;const n=new to(e);return fc(Yn(Ju,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function ul(e,t,n){if(jr(sr,cn.content),!vl())throw gn;const r=new to(e);return ol(n),fc(Yn(Ju,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function ll(e,t,n){if(jr(sr,cn.content),!vl())throw gn;return xn(e,new Error("titleId is Invalid.")),xn(t,new Error("oauthConfigId is Invalid.")),fc(Yn(Ju,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function dl(e,t,n){if(jr(sr,cn.content),!vl())throw gn;return xn(e,new Error("titleId is Invalid.")),t&&Dn(t),fc(Yn(Ju,"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"}(el||(el={}));class fl{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 pl(e){if(jr(sr,cn.content),!vl())throw gn;return xn(e.connectorId,new Error("connectorId is Invalid.")),xn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),hc("externalAppAuthentication.authenticateWithConnector",[new fl(e)],Yn(Ju,"externalAppAuthentication.authenticateWithConnector"),rl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(tl||(tl={}));class gl extends zi{validate(e){return"string"==typeof e&&e in tl}deserialize(e){return e}}function hl(e){if(jr(sr,cn.content),!vl())throw gn;return xn(e.connectorId,new Error("connectorId is Invalid.")),xn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),gc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new fl(e)],new gl,Yn(Ju,"externalAppAuthentication.getUserAuthenticationStateForConnector"),rl)}function ml(e){if(jr(sr,cn.content),!vl())throw gn;return xn(e.connectorId,new Error("connectorId is Invalid.")),xn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),hc("externalAppAuthentication.disconnectConnector",[new fl(e)],Yn(Ju,"externalAppAuthentication.disconnectConnector"),rl)}function vl(){return!(!jr(sr)||!sr.supports.externalAppAuthentication)}var wl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Cl="v2";function yl(e,t,n){return wl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!El())throw gn;return Il(e,t),hc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Yn(Cl,"externalAppAuthenticationForCEA.authenticateWithSSO"),rl)}))}function Sl(e,t,n){return wl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!El())throw gn;return Il(e,t),hc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Yn(Cl,"externalAppAuthenticationForCEA.authenticateWithOauth"),rl)}))}function bl(e,t,n,r){return wl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!El())throw gn;return Il(e,t),il(r),gc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Ku(r),n.url.href,n.width,n.height,n.isExternal],new nl,Yn(Cl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),rl)}))}function Al(e,t,n,r){return wl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!El())throw gn;return Il(e,t),il(r),gc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Ku(r),n.authId,n.connectionName,n.claims,n.silent],new nl,Yn(Cl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),rl)}))}function El(){return!(!jr(sr)||!sr.supports.externalAppAuthenticationForCEA)}function Il(e,t){xn(t,new Error("conversation id is not valid.")),Yr(e)}const Pl="v2";var Tl,Ol;function Rl(e,t){if(jr(sr,cn.content),!kl())throw gn;const n=new to(e);return fc(Yn(Pl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Fl(e,t,n){if(jr(sr,cn.content),!kl())throw gn;const r=new to(e);return fc(Yn(Pl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function kl(){return!(!jr(sr)||!sr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Tl||(Tl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Ol||(Ol={}));var Ml=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Nl="v2";function xl(e,t,n){return Ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Ul())throw gn;Il(e,t);const[r,o]=yield fc(Yn(Nl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Dl(e,t,n){return Ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Ul())throw gn;Il(e,t);const r=yield cc(Yn(Nl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Ul(){return!(!jr(sr)||!sr.supports.externalAppCardActionsForCEA)}var Ll;function Hl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ll).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Ll||(Ll={}));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(jr(sr,cn.content),!jl())throw gn;return Wl(e,n),hc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new zl(t),n],Yn(Vl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Hl)}))}function jl(){return!(!jr(sr)||!sr.supports.externalAppCardActionsForDA)}function Wl(e,t){Yr(e),qn(t)}class zl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}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 ql="v2";function Gl(e,t,n){return $l(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Jl())throw gn;const r=new to(e),[o,i]=yield fc(Yn(ql,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Jl(){return!(!jr(sr)||!sr.supports.externalAppCommands)}const Kl="v1";var Ql,Zl,Xl,Yl,ed,td;function nd(e,t){if(jr(sr,cn.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Cc(Yn(Kl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function rd(e,t){if(jr(sr,cn.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Cc(Yn(Kl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function od(e,t,n){if(jr(sr,cn.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Cc(Yn(Kl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function id(e,t,n){if(jr(sr,cn.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Cc(Yn(Kl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function ad(e,t,n){if(jr(sr,cn.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Cc(Yn(Kl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function sd(e=!1,t){if(jr(sr,cn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Cc(Yn(Kl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function cd(e,t,n,r,o=!1,i){if(jr(sr,cn.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Cc(Yn(Kl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function ud(e){if(jr(sr,cn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Cc(Yn(Kl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function ld(e=void 0,t){if(jr(sr,cn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Cc(Yn(Kl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function dd(e){if(jr(sr,cn.content),!e)throw yd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Cc(Yn(Kl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function fd(e,t){if(jr(sr,cn.content),!t)throw yd(De.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw yd(De.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Cc(Yn(Kl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function pd(e,t){if(jr(sr,cn.content),!t)throw yd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw yd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Cc(Yn(Kl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function gd(e,t){if(jr(sr,cn.content),!t)throw yd(De.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw yd(De.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Cc(Yn(Kl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function hd(e,t){if(jr(sr,cn.content),!t)throw yd(De.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw yd(De.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Cc(Yn(Kl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function md(e,t){if(jr(sr,cn.content),!t)throw yd(De.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw yd(De.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Cc(Yn(Kl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function vd(e,t){if(jr(sr,cn.content),!t)throw yd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw yd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw yd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Cc(Yn(Kl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function wd(e){if(jr(sr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ys(Yn(Kl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Cd(e){if(jr(sr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ys(Yn(Kl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function yd(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"}(Ql||(Ql={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(Zl||(Zl={})),function(e){e.ClassMaterials="classMaterials"}(Xl||(Xl={})),function(e){e.Readonly="readonly"}(Yl||(Yl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(ed||(ed={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(td||(td={}));const Sd="v1";function bd(){return new Promise((e=>{if(jr(sr),!Pd())throw gn;e(dc(Yn(Sd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Ad(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(jr(sr),!Pd())throw gn;t(dc(Yn(Sd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Ed(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(jr(sr),!Pd())throw gn;ys(Yn(Sd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{jr(sr),e(t)}))}function Id(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(jr(sr),!Pd())throw gn;ys(Yn(Sd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{jr(sr),e(t)}))}function Pd(){return!(!jr(sr)||!sr.supports.meetingRoom)}function Td(){return!(!jr(sr)||!sr.supports.messageChannels)}const Od="1.0.1",Rd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Ld("Invalid message format, ignoring. Message: %o",e);if(!xd(e.source,e.origin))return void Ld("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Hd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Ld("Invalid response format, ignoring. Message: %o",e);t(r)}};let Fd=null,kd=!1;function Md(e,t,n=!1){if(kd=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.`);Fd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Ld("Nested App Auth Bridge is already present");const o=Nd(r);o&&(r.nestedAppAuthBridge=o)}function Nd(e){const t=new WeakMap,{onMessage:n}=Rd,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 Ld(`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=Dd(t);if(e===e.top||!Fd)return void Hd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Fd)}}catch(e){return void Hd("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function xd(e,t){if(t===Fd)try{return"https:"===new URL(t).protocol}catch(e){return Hd("Invalid message origin URL:",e),!1}return!1}function Dd(e){const t=Date.now();return{id:Ud(),uuid:nn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Ud(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Ld(...e){kd&&console.log(...e)}function Hd(...e){kd&&console.error(...e)}const _d="v1";function Vd(e){if(jr(sr,cn.content),!Bd())throw gn;Cc(Yn(_d,"notifications.showNotification"),"notifications.showNotification",[e])}function Bd(){return!(!jr(sr)||!sr.supports.notifications)}const jd="v2";function Wd(e){if(!qd())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());if(no(e))throw new Error(De.INVALID_ARGUMENTS.toString());ys(Yn(jd,"otherApp.install"),"otherApp.install",e)}function zd(){if(!qd())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());Cc(Yn(jd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ss("otherApp.install")}function $d(e){if(!qd())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());return hc("otherApp.notifyInstallCompleted",[e.toString()],Yn(jd,"otherApp.notifyInstallCompleted"))}function qd(){return!(!jr(sr)||!sr.supports.otherAppStateChange)}const Gd="v1";var Jd,Kd,Qd;function Zd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;Cc(Yn(Gd,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Xd(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;Cc(Yn(Gd,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Yd(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;Cc(Yn(Gd,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function ef(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;Cc(Yn(Gd,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function tf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;ys(Yn(Gd,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function nf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;ys(Yn(Gd,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function rf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;ys(Yn(Gd,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function of(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!af())throw gn;ys(Yn(Gd,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function af(){return!(!jr(sr)||!sr.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(Jd||(Jd={})),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"}(Kd||(Kd={})),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"}(Qd||(Qd={}));const sf="v1";function cf(e,t,n,r){if(jr(sr,cn.content),!uf())throw gn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Cc(Yn(sf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function uf(){return!(!jr(sr)||!sr.supports.appEntity)}const lf="v1";function df(e){return new Promise((t=>{if(jr(sr),!ff())throw gn;if((Gn.hostClientType===an.android||Gn.hostClientType===an.teamsRoomsAndroid||Gn.hostClientType===an.teamsPhones||Gn.hostClientType===an.teamsDisplays)&&!Wr(Ke)){const e={errorCode:De.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(cc(Yn(lf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function ff(){return!(!jr(sr)||!sr.supports.teams)&&(!!sr.supports.teams.fullTrust&&!!sr.supports.teams.fullTrust.joinedTeams)}var pf=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 gf="v1";function hf(e){return pf(this,void 0,void 0,(function*(){if(jr(sr),!mf())throw gn;return gc("getConfigSetting",[e],new $i,Yn(gf,"teams.fullTrust.getConfigSetting"))}))}function mf(){return!(!jr(sr)||!sr.supports.teams)&&!!sr.supports.teams.fullTrust}const vf="v1";var wf;function Cf(e,t){if(jr(sr,cn.content),!Sf())throw gn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Cc(Yn(vf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function yf(e,t){if(jr(sr),!Sf())throw gn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Cc(Yn(vf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Sf(){return!(!jr(sr)||!sr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(wf||(wf={}));class bf{static setTimeout(e,t){const n=performance.now(),r=Sn();return bf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete bf.setTimeoutCallbacks[e]}static setInterval(e,t){bf.setTimeout((function n(){e(),bf.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in bf.setTimeoutCallbacks){const r=bf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){bf.setTimeoutCallbacks[e].callback(),delete bf.setTimeoutCallbacks[e]}}}bf.setTimeoutCallbacks={};class Af{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){bf.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&&bf.clearTimeout(this.timeoutId),this.timeoutId=bf.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(Af.maxSessionTimeoutInMs,2*t.timeoutInMs):Af.initialSessionTimeoutInMs}}Af.initialSessionTimeoutInMs=1e3,Af.maxSessionTimeoutInMs=3e4;const Ef="v2";class If{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Af(If.distributionBinSize,(e=>this.reportPerformanceEvent(Yn(Ef,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){bf.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Yn(Ef,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),If.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){bf.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Yn(Ef,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Yn(Ef,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}If.distributionBinSize=1e3,If.calculateFPSInterval=1e3;var Pf=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())}))},Tf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Of="v2",Rf=Nn()?void 0:new If(Cc);var Ff,kf,Mf;function Nf(e){if(jr(sr,cn.sidePanel),!Hf())throw gn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ys(Yn(Of,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Rf?void 0:Rf.setFrameProcessTimeLimit(e.timeLimit)),!1),Wf())_f(e.videoFrameHandler,e.config);else{if(!$f())throw gn;Bf(e.videoBufferHandler,e.config)}null==Rf||Rf.startMonitorSlowFrameProcessing()}function xf(e,t){if(jr(sr,cn.sidePanel),!Hf())throw gn;Cc(Yn(Of,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Df(e){if(jr(sr,cn.sidePanel),!Hf())throw gn;ys(Yn(Of,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",rp(e,Rf),!1),Cc(Yn(Of,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Uf(e){Cc(Yn(Of,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Lf(e){Cc(Yn(Of,"videoEffects.notifyError"),"video.notifyError",[e])}function Hf(){return jr(sr)&&!!sr.supports.video&&(!!sr.supports.video.mediaStream||!!sr.supports.video.sharedFrame)}function _f(e,t){if(jr(sr,cn.sidePanel),!Hf()||!Wf())throw gn;ys(Yn(Of,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Pf(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Vf(e,Rf);yield Jf(n,r,Lf,Rf)}))),!1),Cc(Yn(Of,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Vf(e,t){return n=>Pf(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 Bf(e,t){if(jr(sr,cn.sidePanel),!Hf()||!$f())throw gn;ys(Yn(Of,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Rf||Rf.reportStartFrameProcessing(t.width,t.height),e(jf(t),(()=>{null==Rf||Rf.reportFrameProcessed(),Uf(n)}),Lf)}}),!1),Cc(Yn(Of,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function jf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Tf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Wf(){var e;return jr(sr,cn.sidePanel)&&zf()&&!!(null===(e=sr.supports.video)||void 0===e?void 0:e.mediaStream)}function zf(){var e,t,n,r;return!(!(null===(t=null===(e=Mn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Mn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function $f(){var e;return jr(sr,cn.sidePanel)&&!!(null===(e=sr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Ff||(Ff={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(kf||(kf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Mf||(Mf={}));var qf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gf="v2";function Jf(e,t,n,r){var o,i;return qf(this,void 0,void 0,(function*(){const a=Zf();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Xf(yield Qf(e,n,r),new Yf(n,t),a.writable)}))}function Kf(e,t,n,r){var o,i;return qf(this,void 0,void 0,(function*(){const a=Zf();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Xf(yield Qf(e,n,r),new np(n,t),a.writable)}))}function Qf(e,t,n){return qf(this,void 0,void 0,(function*(){if(Nn())throw gn;const r=Mn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Zf(){if(Nn())throw gn;const e=window.MediaStreamTrackGenerator;if(!e)throw gn;return new e({kind:"video"})}function Xf(e,t,n){new(0,Mn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Yf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>qf(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 ep{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 tp{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 np{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>qf(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=>qf(this,void 0,void 0,(function*(){if(Nn())throw gn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new ep(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 tp(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),ys(Yn(Gf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function rp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Cc(Yn(Gf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Mf?e:Mf.InitializationFailure;Cc(Yn(Gf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var op=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ip="v2",ap=2e3,sp=Nn()?void 0:new If(Cc);var cp;function up(e){var t,n;if(!mp())throw gn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(jr(sr,cn.sidePanel)){if(ys(Yn(ip,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==sp?void 0:sp.setFrameProcessTimeLimit(e)),!1),null===(t=sr.supports.video)||void 0===t?void 0:t.mediaStream)ys(Yn(ip,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>op(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=sp?dp(e.videoFrameHandler,sp):e.videoFrameHandler;r?yield Kf(n,o,wp,sp):yield Jf(n,o,wp,sp)}))),!1),Cc(Yn(ip,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=sr.supports.video)||void 0===n?void 0:n.sharedFrame))throw gn;ys(Yn(ip,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==sp||sp.reportStartFrameProcessing(t.width,t.height);const n=lp(),r=t.timestamp;e.videoBufferHandler(fp(t),(()=>{n(),null==sp||sp.reportFrameProcessed(),vp(r)}),wp)}}),!1),Cc(Yn(ip,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==sp||sp.startMonitorSlowFrameProcessing()}}function lp(){const e=setTimeout((()=>{wp(`Frame not processed in ${ap}ms`,cp.Warn)}),ap);return function(){clearTimeout(e)}}function dp(e,t){return n=>op(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=lp(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function fp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function pp(e,t,n){if(jr(sr,cn.sidePanel),!mp())throw gn;Cc(Yn(ip,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function gp(e){if(jr(sr,cn.sidePanel),!mp())throw gn;ys(Yn(ip,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",rp(e,sp),!1),Cc(Yn(ip,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function hp(e){if(jr(sr,cn.sidePanel),!Hf())throw gn;Cc(Yn(ip,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function mp(){return jr(sr),Hf()}function vp(e){Cc(Yn(ip,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function wp(e,t=cp.Warn){Cc(Yn(ip,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Cp(e){if(jr(sr),!Hf())throw gn;wp(e,cp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(cp||(cp={}));const yp="v2";class Sp extends zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class bp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Ap{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Ep extends zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Ip{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Pp extends zi{validate(e){const t=new Ep;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Tp(e,t){if(jr(sr),!Mp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Np(e.threadId),t&&0===t.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return gc("hostEntity.tab.addAndConfigure",[new Ap(e),t],new Ep,Yn(yp,"hostEntity.tab.addAndConfigure"))}function Op(e){if(jr(sr),!Mp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Np(e.threadId),gc("hostEntity.tab.getAll",[new Ap(e)],new Pp,Yn(yp,"hostEntity.tab.getAll"))}function Rp(e,t){if(jr(sr),!Mp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return xp(e),Np(t.threadId),gc("hostEntity.tab.reconfigure",[new bp(e),new Ap(t)],new Sp,Yn(yp,"hostEntity.tab.reconfigure"))}function Fp(e,t){if(jr(sr),!Mp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return xp(e),Np(t.threadId),gc("hostEntity.tab.rename",[new bp(e),new Ap(t)],new Sp,Yn(yp,"hostEntity.tab.rename"))}function kp(e,t){if(jr(sr),!Mp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Np(t.threadId),xp(e),gc("hostEntity.tab.remove",[new Ip(e),new Ap(t)],new $i,Yn(yp,"hostEntity.tab.remove"))}function Mp(){var e;return!!(jr(sr)&&Up()&&(null===(e=sr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Np(e){if(!e||0==e.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function xp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Dp;function Up(){return!(!jr(sr)||!sr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Dp||(Dp={}));var Lp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Hp="v2",_p="Invalid store dialog size",Vp="No App Id present, but AppId needed to open AppDetail store",Bp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function jp(e){return Lp(this,void 0,void 0,(function*(){Gp();const{size:t}=null!=e?e:{};return hc("store.openFullStore",[Jp(t)],Yn(Hp,"store.openFullStore"))}))}function Wp(e){return Lp(this,void 0,void 0,(function*(){Gp();const{size:t,appId:n}=e;if(!(n instanceof to))throw new Error(Vp);return hc("store.openAppDetail",[Jp(t),n],Yn(Hp,"store.openAppDetail"))}))}function zp(e){return Lp(this,void 0,void 0,(function*(){Gp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return hc("store.openInContextStore",[Jp(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Yn(Hp,"store.openInContextStore"))}))}function $p(e){return Lp(this,void 0,void 0,(function*(){Gp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Bp);return hc("store.openSpecificStore",[Jp(t),n],Yn(Hp,"store.openSpecificStore"))}))}function qp(){return jr(sr)&&!!sr.supports.store}function Gp(){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!qp())throw gn}function Jp(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(_p);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(_p);return JSON.stringify(e)}var Kp=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 Qp="v1",Zp="v2";let Xp;function Yp(e){Xp=e}function eg(e){const t=void 0!==e,n=t?e:Xp;if(!n)throw new Error("No parameters are provided for authentication");jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage);return tg(n.successCallback||n.failureCallback?Yn(Qp,"authentication.authenticate"):Yn(Zp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Xp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Xp=void 0)}}))}function tg(e,t){return Kp(this,void 0,void 0,(function*(){const n=Un(t.url);return Dn(n),fc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function ng(e){Br();return rg(e&&(e.successCallback||e.failureCallback)?Yn(Qp,"authentication.getAuthToken"):Yn(Zp,"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 rg(e,t){return new Promise((n=>{n(fc(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function og(e){Br();return ig(e&&(e.successCallback||e.failureCallback)?Yn(Qp,"authentication.getUser"):Yn(Zp,"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 ig(e){return new Promise((t=>{t(fc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function ag(e,t){jr(sr,cn.authentication);Cc(Yn(t?Qp:Zp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Wc(oc.parentWindow,(()=>setTimeout((()=>oc.currentWindow.close()),200)))}function sg(e,t){jr(sr,cn.authentication);Cc(Yn(t?Qp:Zp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Wc(oc.parentWindow,(()=>setTimeout((()=>oc.currentWindow.close()),200)))}var cg;function ug(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"}(cg||(cg={}));class lg{constructor(e){this.val=e,ug(e)}toString(){return this.val}}const dg="/l/app/",fg="/l/meeting/new",pg="attendees",gg="startTime",hg="endTime",mg="subject",vg="content",wg="/l/call/0/0",Cg="source",yg="withVideo",Sg="/l/chat/0/0",bg="users",Ag="topicName",Eg="message";function Ig(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${bg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Ag}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Eg}=${encodeURIComponent(n)}`;return`${it}://${at}${Sg}?${r}${o}${i}`}function Pg(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${bg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${yg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Cg}=${encodeURIComponent(n)}`;return`${it}://${at}${wg}?${r}${o}${i}`}function Tg(e,t,n,r,o){const i=void 0===e?"":`${pg}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${gg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${hg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${mg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${vg}=${encodeURIComponent(o)}`;return`${it}://${at}${fg}?${i}${a}${s}${c}${u}`}function Og(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${it}://${at}${dg}${encodeURIComponent(e)}`}const Rg="v1";function Fg(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!kg())throw new Error("Not supported");const n=Yn(Rg,"appInstallDialog.openAppInstallDialog");sr.isLegacyTeams?t(uc(n,"executeDeepLink",Og(e.appId))):(Cc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function kg(){return!(!jr(sr)||!sr.supports.appInstallDialog)}const Mg="v1",Ng=Xn("media");var xg,Dg,Ug,Lg,Hg,_g,Vg;!function(e){e.Base64="base64",e.ID="id"}(xg||(xg={}));class Bg{}function jg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(jr(sr,cn.content,cn.task),Gn.isFramelessWindow)if(Wr(Xe))Cc(Yn(Mg,"media.captureImage"),"captureImage",e);else{e({errorCode:De.OLD_PLATFORM},[])}else{e({errorCode:De.NOT_SUPPORTED_ON_PLATFORM},[])}}function Wg(){if(jr(sr,cn.content,cn.task),!$g())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(Mg,"media.hasPermission"),"permissions.has",e))}))}function zg(){if(jr(sr,cn.content,cn.task),!$g())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(Mg,"media.requestPermission"),"permissions.request",e))}))}function $g(){return!(!jr(sr)||!sr.supports.permissions)}class qg extends Bg{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(jr(sr,cn.content,cn.task),Wr(Ye))if(ah(this.mimeType,this.format,this.content))Wr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:De.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:De.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Cc(Yn(Mg,"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=Xg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Yg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Ng(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:De.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Sn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!no(e)&&Cc(Yn(Mg,"media.getMedia"),"getMedia",r),ys(Yn(Mg,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ss("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Xg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Ss("getMedia"+t)}else{const e=Yg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:De.INTERNAL_ERROR,message:"data received is null"},new Blob),Ss("getMedia"+t)}}))}}class Gg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){jr(sr,cn.content,cn.task);try{$r(Ge)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Cc(Yn(Mg,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Dg.StopRecording,e)}}class Jg extends Gg{getMediaType(){return Hg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Dg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Kg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Ye)){const e={errorCode:De.OLD_PLATFORM};return void t(e,[])}try{eh(e)}catch(e){return void t(e,[])}if(!nh(e)){const e={errorCode:De.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Cc(Yn(Mg,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(th(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 qg(e));t(n,s)}))}function Qg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Ye)){return void t({errorCode:De.OLD_PLATFORM})}if(!sh(e)){return void t({errorCode:De.INVALID_ARGUMENTS})}const n=[e];Cc(Yn(Mg,"media.viewImages"),"viewImages",n,t)}function Zg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(jr(sr,cn.content,cn.task),Gn.hostClientType!==an.desktop&&Gn.hostClientType!==an.web&&Gn.hostClientType!==an.rigel&&Gn.hostClientType!==an.teamsRoomsWindows&&Gn.hostClientType!==an.teamsRoomsAndroid&&Gn.hostClientType!==an.teamsPhones&&Gn.hostClientType!==an.teamsDisplays)if(Wr(et))if(ch(t))Cc(Yn(Mg,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:De.INVALID_ARGUMENTS},"")}else{e({errorCode:De.OLD_PLATFORM},"")}else{e({errorCode:De.NOT_SUPPORTED_ON_PLATFORM},"")}}function Xg(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 Yg(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 eh(e){oh(e)?$r(qe):ih(e)?$r(Ge):rh(e)&&$r(Je)}function th(e){return!(e.mediaType!=Hg.Video||!e.videoProps||!e.videoProps.videoController)}function nh(e){return!(null==e||e.maxMediaCount>10)}function rh(e){var t;return!((null==e?void 0:e.mediaType)!=Hg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function oh(e){return!(!e||e.mediaType!=Hg.VideoAndImage&&!e.videoAndImageProps)}function ih(e){return!(!e||e.mediaType!=Hg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function ah(e,t,n){return null!=e&&null!=t&&t==xg.ID&&null!=n}function sh(e){return!(null==e||e.length<=0||e.length>10)}function ch(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function uh(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"}(Dg||(Dg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Ug||(Ug={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Lg||(Lg={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Hg||(Hg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(_g||(_g={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Vg||(Vg={}));const lh="v2";function dh(e){return new Promise((t=>{if(jr(sr,cn.content,cn.task),!gh())throw gn;if(!ch(e))throw{errorCode:De.INVALID_ARGUMENTS};t(dc(Yn(lh,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function fh(){if(jr(sr,cn.content,cn.task),!gh())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(lh,"barCode.hasPermission"),"permissions.has",e))}))}function ph(){if(jr(sr,cn.content,cn.task),!gh())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(lh,"barCode.requestPermission"),"permissions.request",e))}))}function gh(){return!!(jr(sr)&&sr.supports.barCode&&sr.supports.permissions)}const hh="v2";function mh(e){return vh(Yn(hh,"chat.openChat"),e)}function vh(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.task),!Ch())throw gn;if(sr.isLegacyTeams)n(uc(e,"executeDeepLink",Ig([t.user],void 0,t.message)));else{n(uc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function wh(e){const t=Yn(hh,"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(vh(t,r))}else{if(jr(sr,cn.content,cn.task),!Ch())throw gn;if(sr.isLegacyTeams)n(uc(t,"executeDeepLink",Ig(e.users,e.topic,e.message)));else{n(uc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Ch(){return!(!jr(sr)||!sr.supports.chat)}var yh=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 Sh="v2";function bh(e){return yh(this,void 0,void 0,(function*(){if(jr(sr,cn.content,cn.meetingStage,cn.task,cn.settings,cn.stage,cn.sidePanel),!Eh())throw gn;if(!e.type||!Object.values(Be).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Be)}`);const t=yield kn(e),n={mimeType:e.type,content:t};return dc(Yn(Sh,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Ah(){return yh(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.meetingStage,cn.task,cn.settings,cn.stage,cn.sidePanel);const e=Yn(Sh,"clipboard.read");if(!Eh())throw gn;const t=yield dc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Fn(e.mimeType,e.content)}return t}))}function Eh(){return Gn.isFramelessWindow?!(!jr(sr)||!sr.supports.clipboard):!!(jr(sr)&&navigator&&navigator.clipboard&&sr.supports.clipboard)}var Ih=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ph="v2",Th={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Oh;function Rh(){var e;return null!==(e=jr(sr)&&(sr.isNAAChannelRecommended||xh()))&&void 0!==e&&e}function Fh(){return jr(sr),oc.parentOrigin}function kh(){var e;return null!==(e=jr(sr)&&sr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Mh(){var e;return null!==(e=jr(sr)&&(sr.isDeeplyNestedAuthSupported||Nh()))&&void 0!==e&&e}function Nh(){return!!(jr(sr)&&Dh()&&sr.isLegacyTeams&&Wr(gr))}function xh(){return!!(jr(sr)&&Dh()&&sr.isLegacyTeams&&sr.supports.nestedAppAuth)}function Dh(){return Gn.hostClientType===an.android||Gn.hostClientType===an.ios||Gn.hostClientType===an.ipados||Gn.hostClientType===an.visionOS}function Uh(e){return Ih(this,void 0,void 0,(function*(){if(!kh())throw gn;const t=e.map(_h);return Hh(Oh.ADD,t)}))}function Lh(e){return Ih(this,void 0,void 0,(function*(){if(!kh())throw gn;const t=e.map(_h);return Hh(Oh.DELETE,t)}))}function Hh(e,t){return Ih(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return gc("nestedAppAuth.manageNAATrustedOrigins",[new Vh(e,t)],Th,Yn(Ph,"nestedAppAuth.manageNAATrustedOrigins"))}))}function _h(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"}(Oh||(Oh={}));class Vh{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Bh="v2";function jh(){if(jr(sr,cn.content,cn.task),!zh())throw gn;return dc(Yn(Bh,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Wh(e){if(jr(sr,cn.content,cn.task),!zh())throw gn;if(!e)throw{errorCode:De.INVALID_ARGUMENTS};return dc(Yn(Bh,"geoLocation.showLocation"),"location.showLocation",e)}function zh(){return!!(jr(sr)&&sr.supports.geoLocation&&sr.supports.geoLocation.map&&sr.supports.permissions)}const $h="v2";function qh(){if(jr(sr,cn.content,cn.task),!Kh())throw gn;return dc(Yn($h,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Gh(){if(jr(sr,cn.content,cn.task),!Kh())throw gn;const e=Ue.GeoLocation;return new Promise((t=>{t(dc(Yn($h,"geoLocation.hasPermission"),"permissions.has",e))}))}function Jh(){if(jr(sr,cn.content,cn.task),!Kh())throw gn;const e=Ue.GeoLocation;return new Promise((t=>{t(dc(Yn($h,"geoLocation.requestPermission"),"permissions.request",e))}))}function Kh(){return!!(jr(sr)&&sr.supports.geoLocation&&sr.supports.permissions)}function Qh(){return sr.hostVersionsInfo?sr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Zh="v1";class Xh{postMessage(e,t){jr(sr),Cc(Yn(Zh,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Cn())}addEventListener(e,t){jr(sr),"message"===e&&ys(Yn(Zh,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Yh{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){jr(sr,cn.task),Cc(Yn(Zh,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Cn())}addEventListener(e,t){jr(sr,cn.task),"message"===e&&ys(Yn(Zh,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const em="v2";function tm(e){if(jr(sr,cn.content),!nm())throw gn;if(!e||!Rn(e))throw{errorCode:De.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return dc(Yn(em,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function nm(){return!(!jr(sr)||!sr.supports.secondaryBrowser)}const rm="v1";function om(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Qe))throw{errorCode:De.OLD_PLATFORM};if(!e)throw{errorCode:De.INVALID_ARGUMENTS};if(!am())throw gn;Cc(Yn(rm,"location.getLocation"),"location.getLocation",[e],t)}function im(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Qe))throw{errorCode:De.OLD_PLATFORM};if(!e)throw{errorCode:De.INVALID_ARGUMENTS};if(!am())throw gn;Cc(Yn(rm,"location.showLocation"),"location.showLocation",[e],t)}function am(){return!(!jr(sr)||!sr.supports.location)}const sm="v1";function cm(e){jr(sr,cn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Cc(Yn(sm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var um=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 lm="v1";var dm,fm,pm,gm,hm,mm;function vm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function wm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Cm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage,cn.settings,cn.content),Cc(Yn(lm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function ym(){var e,t,n;return um(this,void 0,void 0,(function*(){let r;jr(sr,cn.sidePanel,cn.meetingStage,cn.settings,cn.content);try{const e=!0;r=yield dc(Yn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==gm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==gm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Sm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage,cn.task),Cc(Yn(lm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function bm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(lm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Am(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(lm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Em(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(lm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Im(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");jr(sr,cn.sidePanel),ys(Yn(lm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Pm(e,t,n={sharingProtocol:hm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Tm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Om(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Rm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Fm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(lm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function km(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(lm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Mm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(lm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Nm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));jr(sr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||mm.Other};return dc(Yn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function xm(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),e.isAppHandlingAudio?Dm(e,t):Um(e,t)}function Dm(e,t){Cc(Yn(lm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ys(Yn(lm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>um(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Hm(n,n.isMicMuted===t.isMicMuted?dm.HostInitiated:dm.AppDeclinedToChange)}catch(e){Hm(t,dm.AppFailedToChange)}}))));ys(Yn(lm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Um(e,t){Cc(Yn(lm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");bs("meeting.micStateChanged")&&Ss("meeting.micStateChanged"),bs("meeting.audioDeviceSelectionChanged")&&Ss("meeting.audioDeviceSelectionChanged"),t(n)}))}function Lm(e){Hm(e,dm.AppInitiated)}function Hm(e,t){jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(lm,"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"}(dm||(dm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(fm||(fm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(pm||(pm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(gm||(gm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(hm||(hm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(mm||(mm={}));const _m="v1",Vm="v2";function Bm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Yn(_m,"monetization.openPurchaseExperience")):(r=e,o=Yn(Vm,"monetization.openPurchaseExperience"));return jr(sr,cn.content),In((()=>new Promise((e=>{if(!jm())throw gn;e(dc(o,"monetization.openPurchaseExperience",r))}))),n)}function jm(){return!(!jr(sr)||!sr.supports.monetization)}const Wm="v2";function zm(e){return new Promise((t=>{if(jr(sr,cn.content),!qm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(uc(Yn(Wm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function $m(e){return new Promise((t=>{if(jr(sr,cn.content),!qm())throw new Error("Not supported");const n=Yn(Wm,"calendar.composeMeeting");sr.isLegacyTeams?t(uc(n,"executeDeepLink",Tg(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(uc(n,"calendar.composeMeeting",e))}))}function qm(){return!(!jr(sr)||!sr.supports.calendar)}const Gm="v2";function Jm(e){e&&0!==e.length&&e.forEach((e=>{ug(e)}))}function Km(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===rv.New&&(Jm(t.toRecipients),Jm(t.ccRecipients),Jm(t.bccRecipients))}function Qm(e){if(jr(sr,cn.content),!Zm())throw new Error("Not supported");return Km(e),hc("mail.handoff.composeMail",[new Xm(e)],Yn(Gm,"mail.handoff.composeMail"))}function Zm(){return!!(jr(sr)&&sr.supports.mail&&sr.supports.mail.handoff)}class Xm{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Ym="v2";function ev(e){return new Promise((t=>{if(jr(sr,cn.content),!nv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(uc(Yn(Ym,"mail.openMailItem"),"mail.openMailItem",e))}))}function tv(e){return new Promise((t=>{if(jr(sr,cn.content),!nv())throw new Error("Not supported");t(uc(Yn(Ym,"mail.composeMail"),"mail.composeMail",e))}))}function nv(){return!(!jr(sr)||!sr.supports.mail)}var rv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(rv||(rv={}));const ov="v2";function iv(){if(!Gn.printCapabilityEnabled){if(jr(sr),!dv())throw gn;Gn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(av(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function av(){Mn().print()}function sv(e){cv(Yn(ov,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!no(e)&&!dv())throw gn}))}function cv(e,t,n){!no(t)&&jr(sr),!no(t)&&n&&n(),Os(e,t)}function uv(e){lv(Yn(ov,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!no(e)&&!dv())throw gn}))}function lv(e,t,n){!no(t)&&jr(sr),!no(t)&&n&&n(),ks(e,t)}function dv(){return!(!jr(sr)||!sr.supports.teamsCore)}const fv="v1",pv="v2";function gv(e,t){let n,r;jr(sr,cn.content,cn.task,cn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Yn(fv,"people.selectPeople")):(r=e,o=Yn(pv,"people.selectPeople")),An(hv,n,o,r)}function hv(e,t){return new Promise((n=>{if(!Wr(Ze))throw{errorCode:De.OLD_PLATFORM};if(!uh(t))throw{errorCode:De.INVALID_ARGUMENTS};if(!mv())throw gn;n(dc(e,"people.selectPeople",t))}))}function mv(){return!(!jr(sr)||!sr.supports.people)}function vv(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?wv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function wv(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 Cv="v2";function yv(e){return jr(sr,cn.content),new Promise((t=>{const[n,r]=vv(e);if(!n)throw{errorCode:De.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(dc(Yn(Cv,"profile.showProfile"),"profile.showProfile",o))}))}function Sv(){return!(!jr(sr)||!sr.supports.profile)}const bv="v2",Av="search.queryChange",Ev="search.queryClose",Iv="search.queryExecute";function Pv(e,t,n){if(jr(sr,cn.content),!Ov())throw gn;ys(Yn(bv,"search.registerOnClosedHandler"),Ev,e),ys(Yn(bv,"search.registerOnExecutedHandler"),Iv,t),n&&ys(Yn(bv,"search.registerOnChangeHandler"),Av,n)}function Tv(){if(jr(sr,cn.content),!Ov())throw gn;Cc(Yn(bv,"search.unregisterHandlers"),"search.unregister"),Ss(Av),Ss(Ev),Ss(Iv)}function Ov(){return!(!jr(sr)||!sr.supports.search)}function Rv(){return new Promise((e=>{if(jr(sr,cn.content),!Ov())throw new Error("Not supported");e(uc(Yn(bv,"search.closeSearch"),"search.closeSearch"))}))}var Fv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const kv="v2";function Mv(){return Fv(this,void 0,void 0,(function*(){if(jr(sr,cn.sidePanel,cn.meetingStage),!Nv())throw gn;return yield dc(Yn(kv,"sharing.history.getContent"),"sharing.history.getContent")}))}function Nv(){var e;return jr(sr)&&void 0!==(null===(e=sr.supports.sharing)||void 0===e?void 0:e.history)}const xv="v1",Dv="v2",Uv={shareWebContent:"sharing.shareWebContent"};function Lv(e,t){try{_v(e),Vv(e),Bv(e)}catch(e){return En((()=>Promise.reject(e)),t)}jr(sr,cn.content,cn.sidePanel,cn.task,cn.stage,cn.meetingStage);return En(Hv,t,Yn(t?xv:Dv,"sharing.shareWebContent"),e)}function Hv(e,t){return new Promise((n=>{if(!jv())throw gn;n(dc(e,Uv.shareWebContent,t))}))}function _v(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:De.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Vv(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Bv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:De.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function jv(){return!(!jr(sr)||!sr.supports.sharing)}const Wv="v2";function zv(){return new Promise((e=>{if(jr(sr,cn.content),!$v())throw gn;e(dc(Yn(Wv,"stageView.self.close"),"stageView.self.close"))}))}function $v(){var e;return jr(sr)&&void 0!==(null===(e=sr.supports.stageView)||void 0===e?void 0:e.self)}const qv="v2";var Gv;function Jv(e){return new Promise((t=>{if(jr(sr,cn.content),!Kv())throw gn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(dc(Yn(qv,"stageView.open"),"stageView.open",e))}))}function Kv(){return!(!jr(sr)||!sr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Gv||(Gv={}));const Qv=10;var Zv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Xv="v2";function Yv(e){return Zv(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.task),nw(),rw(e);const t=yield dc(Yn(Xv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return ow(e.maxVisualMediaCount,t),t}))}function ew(e){return Zv(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.task),nw(),rw(e);const t=yield dc(Yn(Xv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return ow(e.maxVisualMediaCount,t),t}))}function tw(){return!!(jr(sr)&&sr.supports.visualMedia&&sr.supports.visualMedia.image&&sr.supports.permissions)}function nw(){if(!tw())throw gn}function rw(e){if(!e||e.maxVisualMediaCount>Qv||e.maxVisualMediaCount<1)throw vn}function ow(e,t){if(t.length>e)throw wn}const iw="v2";var aw,sw;function cw(){if(jr(sr,cn.content,cn.task),!tw())throw gn;const e=Ue.Media;return dc(Yn(iw,"visualMedia.hasPermission"),"permissions.has",e)}function uw(){if(jr(sr,cn.content,cn.task),!tw())throw gn;const e=Ue.Media;return dc(Yn(iw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(aw||(aw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(sw||(sw={}));var lw=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let dw=null;function fw(){return lw(this,void 0,void 0,(function*(){return null===dw&&(dw=(yield Fo()).app.host.name),dw}))}var pw=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 gw(){return pw(this,void 0,void 0,(function*(){if(jr(sr),!mw())throw gn;return!(!sr.isLegacyTeams||Gn.hostClientType!==an.android&&Gn.hostClientType!==an.ios&&Gn.hostClientType!==an.ipados&&Gn.hostClientType!==an.visionOS||(yield hw())!==sn.teams)||(yield cc(Yn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function hw(){return pw(this,void 0,void 0,(function*(){return fw()}))}function mw(){return jr(sr)&&void 0!==sr.supports.webStorage}const vw="v2";var ww;function Cw(e){const t=Yn(vw,"call.startCall");return new Promise((n=>{var r;if(jr(sr,cn.content,cn.task),!yw())throw gn;if(!sr.isLegacyTeams)return Cc(t,"call.startCall",[e],n);n(cc(t,"executeDeepLink",Pg(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(ww.Video),e.source)).then((e=>{if(!e)throw new Error(lt);return e})))}))}function yw(){return!(!jr(sr)||!sr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(ww||(ww={}));const Sw="v1";function bw(){Qi(Yn(Sw,"appInitialization.notifyAppLoaded"))}function Aw(){Cc(Yn(Sw,"appInitialization.notifySuccess"),bo.Success,[br])}function Ew(e){Xi(Yn(Sw,"appInitialization.notifyFailure"),e)}function Iw(e){Zi(Yn(Sw,"appInitialization.notifyExpectedFailure"),e)}const Pw=Xn("thirdPartyCloudStorage"),Tw="v2";class Ow{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Rw=[],Fw=null,kw=!0,Mw=null;function Nw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(jr(sr,cn.content,cn.task),!Dw())throw gn;if(Mw)throw Mw=null,new Error("getDragAndDropFiles cannot be called twice");Mw=t,kw=!0,Cc(Yn(Tw,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],xw)}else{t([],{errorCode:De.INVALID_ARGUMENTS})}}function xw(e){if(Mw)if(e&&e.error)Mw([],e.error),Mw=null;else if(e&&e.fileChunk)try{kw||0!==e.fileChunk.chunkSequence||(Pw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),kw=!0,Mw([],{errorCode:De.INTERNAL_ERROR,message:"error occurred while receiving data"}),Rw=[],Mw=null);const t=Yg(e.fileChunk,e.fileType);if(t?(Fw||(Fw=new Ow(e.fileType,[])),Fw.assembleAttachment.push(t)):(Pw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Mw?Mw([],{errorCode:De.INTERNAL_ERROR,message:"error occurred while receiving data"}):Mw=null,Rw=[],Mw=null,kw=!0),kw=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Fw){const t=Xg(Fw.assembleAttachment,Fw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Rw.push(n)}e.isLastFile&&Mw&&(Mw(Rw,e.error),Rw=[],Mw=null,kw=!0),Fw=null}}catch(e){Mw&&(Mw([],{errorCode:De.INTERNAL_ERROR,message:e}),Rw=[],Mw=null,kw=!0)}else Mw([],{errorCode:De.INTERNAL_ERROR,message:"data received is null"}),Rw=[],Mw=null,kw=!0}function Dw(){return!(!jr(sr)||!sr.supports.thirdPartyCloudStorage)}const Uw="v1";function Lw(e,t){Ki(Yn(Uw,"initialize"),t).then((()=>{e&&e()}))}function Hw(){iv()}function _w(){av()}function Vw(e){Br(),Cc(Yn(Uw,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Gn.frameContext),e(t)}))}function Bw(e){oa(Yn(Uw,"registerOnThemeChangeHandlerHelper"),e)}function jw(e){As(Yn(Uw,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Ww(e){As(Yn(Uw,"registerAppButtonClickHandler"),"appButtonClick",e,[cn.content])}function zw(e){As(Yn(Uw,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[cn.content])}function $w(e){As(Yn(Uw,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[cn.content])}function qw(e){Ea(Yn(Uw,"registerBackButtonHandler"),e)}function Gw(e){cv(Yn(Uw,"registerOnLoadHandler"),e)}function Jw(e){lv(Yn(Uw,"registerBeforeUnloadHandler"),e)}function Kw(e){As(Yn(Uw,"registerFocusEnterHandler"),"focusEnter",e,[])}function Qw(e){As(Yn(Uw,"registerChangeSettingsHandler"),"changeSettings",e,[cn.content])}function Zw(e,t){jr(sr),Ya(Yn(Uw,"getTabInstances"),t).then((t=>{e(t)}))}function Xw(e,t){jr(sr),es(Yn(Uw,"getMruTabInstances"),t).then((t=>{e(t)}))}function Yw(e){ts(Yn(Uw,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function eC(e,t){jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage);const n=null!=t?t:Cn();ia(Yn(Uw,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function tC(e){ns(Yn(Uw,"setFrameContext"),e)}function nC(e,t,n){Ki(Yn(Uw,"initializeWithFrameContext"),n).then((()=>t&&t())),ns(Yn(Uw,"setFrameContext"),e)}const rC="v1";function oC(e){Xa(Yn(rC,"navigation.returnFocus"),e)}function iC(e,t){jr(sr);const n=null!=t?t:Cn();Za(Yn(rC,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function aC(e,t){jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage);const n=null!=t?t:Cn();Ka(Yn(rC,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function sC(e){jr(sr);const t=null!=e?e:Cn();Qa(Yn(rC,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const cC="v1";function uC(e){rs(Yn(cC,"settings.setValidityState"),e)}function lC(e){jr(sr,cn.content,cn.settings,cn.remove,cn.sidePanel),os(Yn(cC,"settings.getSettings")).then((t=>{e(t)}))}function dC(e,t){jr(sr,cn.content,cn.settings,cn.sidePanel);const n=null!=t?t:Cn();is(Yn(cC,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function fC(e){Di(Yn(cC,"settings.registerOnSaveHandler"),e)}function pC(e){Li(Yn(cC,"settings.registerOnRemoveHandler"),e)}var gC=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 hC="v1";function mC(e,t){const n=Yn(hC,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),Cc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ni(n,yC(e),r):ti(n,CC(e),r),new Xh}function vC(e){e=SC(e);const{width:t,height:n}=e,r=gC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ei(Yn(hC,"tasks.updateTask"),e)}function wC(e,t){ri(Yn(hC,"tasks.submitTask"),e,t)}function CC(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:fn.Small,width:e.width?e.width:fn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function yC(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:fn.Small,width:e.width?e.width:fn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function SC(e){return e.height=e.height?e.height:fn.Small,e.width=e.width?e.width:fn.Small,e}const bC="v2";var AC,EC;function IC(){return!(!jr(sr,cn.meetingStage,cn.sidePanel,cn.content)||!sr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(AC||(AC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(EC||(EC={}));class PC{getFluidTenantInfo(){return TC(),new Promise((e=>{e(dc(Yn(bC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return TC(),new Promise((t=>{t(dc(Yn(bC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return TC(),new Promise((e=>{e(dc(Yn(bC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return TC(),new Promise((t=>{t(dc(Yn(bC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return TC(),new Promise((e=>{e(dc(Yn(bC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return TC(),new Promise((t=>{t(dc(Yn(bC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return TC(),new Promise((t=>{t(dc(Yn(bC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return TC(),new Promise((t=>{t(dc(Yn(bC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return TC(),new PC}}function TC(){if(!IC())throw new Error("LiveShareHost Not supported")}var OC=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 RC(e){try{return e.cartItems=FC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function FC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=FC(e.accessories)),e}))}const kC=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=OC(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=kC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function MC(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)xC(t),NC(t.accessories)}function NC(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");xC(t)}}}function xC(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");UC(e.price),LC(e.quantity)}function DC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===on(e))throw new Error("id must be a valid UUID")}}function UC(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 LC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function HC(e){if(!Object.values(jC).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const _C="v2",VC={majorVersion:1,minorVersion:1};var BC,jC;function WC(){if(jr(sr,cn.content,cn.task),!GC())throw gn;return dc(Yn(_C,"marketplace.getCart"),"marketplace.getCart",VC).then(RC)}function zC(e){if(jr(sr,cn.content,cn.task),!GC())throw gn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return DC(null==e?void 0:e.cartId),MC(null==e?void 0:e.cartItems),dc(Yn(_C,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:kC(e.cartItems),cartVersion:VC})).then(RC)}function $C(e){if(jr(sr,cn.content,cn.task),!GC())throw gn;if(!e)throw new Error("removeCartItemsParams must be provided");if(DC(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return dc(Yn(_C,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:VC})).then(RC)}function qC(e){if(jr(sr,cn.content,cn.task),!GC())throw gn;if(!e)throw new Error("updateCartStatusParams must be provided");return DC(null==e?void 0:e.cartId),HC(null==e?void 0:e.cartStatus),dc(Yn(_C,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:VC})).then(RC)}function GC(){return!(!jr(sr)||!sr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(BC||(BC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(jC||(jC={}));var JC=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 KC{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 QC(e){return e.toLowerCase().split("+").sort().join("+")}function ZC(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function XC(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function YC(e,t){if(XC(t)){const n=ZC(t);if(e.has(n))return{matchedShortcut:n,isOverridable:oy.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function ey(e){iy.clear(),e.shortcuts.forEach((e=>{iy.add(QC(e))})),oy.clear(),e.overridableShortcuts.forEach((e=>{oy.add(QC(e))}))}class ty extends zi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function ny(e){ys(Yn("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function ry(e){if(e.target.closest(`[${fy}]`))return;const{matchedShortcut:t,isOverridable:n}=YC(iy,e);if(!t)return;if(n&&ay){if(ay(e,{matchedShortcut:t}))return}hc("shortcutRelay.forwardShortcutEvent",[new KC(e)],Yn("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const oy=new Set,iy=new Set;let ay,sy=!1;function cy(e){if(!dy())throw gn;const t=ay;return ay=e,t}function uy(){if(!dy())throw gn;sy=!1,iy.clear(),oy.clear(),ay=void 0,document.removeEventListener("keydown",ry,{capture:!0})}function ly(){return JC(this,void 0,void 0,(function*(){if(!dy())throw gn;ey(yield gc("shortcutRelay.getHostShortcuts",[],new ty,Yn("v2","shortcutRelay.getHostShortcuts"))),sy||document.addEventListener("keydown",ry,{capture:!0}),sy=!0,ny((e=>{ey(e)}))}))}function dy(){return!(!jr(sr)||!sr.supports.shortcutRelay)}const fy="data-disable-shortcuts-forwarding"})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Ne,AppId:()=>no,ChannelType:()=>gn,ChildAppWindow:()=>Im,DialogDimension:()=>pn,EduType:()=>Be,EmailAddress:()=>Lg,ErrorCode:()=>Ue,FileOpenPreference:()=>xe,FrameContexts:()=>un,HostClientType:()=>sn,HostName:()=>cn,LiveShareHost:()=>YC,NotificationTypes:()=>Yc,ParentAppWindow:()=>Pm,RenderingSurfaces:()=>ln,SecondaryM365ContentIdName:()=>De,TaskModuleDimension:()=>pn,TeamType:()=>dn,UUID:()=>$n,UserAuthenticationState:()=>il,UserSettingTypes:()=>tu,UserTeamRole:()=>fn,ValidatedSafeString:()=>to,ViewerActionTypes:()=>eu,activateChildProxyingCommunication:()=>Ir,app:()=>i,appEntity:()=>W,appInitialization:()=>Te,appInstallDialog:()=>Y,authentication:()=>X,barCode:()=>te,calendar:()=>fe,call:()=>Pe,chat:()=>ne,clipboard:()=>re,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>dC,executeDeepLink:()=>TC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>D,geoLocation:()=>ae,getAdaptiveCardSchemaVersion:()=>Am,getContext:()=>pC,getCurrentFeatureFlagsState:()=>Or,getMruTabInstances:()=>IC,getTabInstances:()=>EC,hostEntity:()=>K,initialize:()=>lC,initializeWithFrameContext:()=>RC,liveShare:()=>ke,location:()=>ce,logs:()=>S,mail:()=>ge,marketplace:()=>Me,media:()=>ee,meeting:()=>le,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>de,navigateBack:()=>NC,navigateCrossDomain:()=>xC,navigateToTab:()=>MC,nestedAppAuth:()=>oe,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>cu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Fr,pages:()=>y,people:()=>me,print:()=>fC,profile:()=>ve,registerAppButtonClickHandler:()=>mC,registerAppButtonHoverEnterHandler:()=>vC,registerAppButtonHoverLeaveHandler:()=>wC,registerBackButtonHandler:()=>CC,registerBeforeUnloadHandler:()=>SC,registerChangeSettingsHandler:()=>AC,registerCustomHandler:()=>au,registerFocusEnterHandler:()=>bC,registerFullScreenHandler:()=>hC,registerOnLoadHandler:()=>yC,registerOnThemeChangeHandler:()=>gC,registerUserSettingsChangeHandler:()=>su,remoteCamera:()=>B,returnFocus:()=>kC,search:()=>we,secondaryBrowser:()=>se,sendCustomEvent:()=>iu,sendCustomMessage:()=>ou,setFeatureFlagsState:()=>Rr,setFrameContext:()=>OC,settings:()=>Re,shareDeepLink:()=>PC,sharing:()=>ye,shortcutRelay:()=>je,sidePanelInterfaces:()=>I,stageView:()=>be,store:()=>Q,tasks:()=>Fe,teams:()=>q,teamsCore:()=>he,thirdPartyCloudStorage:()=>Oe,uploadCustomApp:()=>ru,version:()=>Ar,videoEffects:()=>$,videoEffectsEx:()=>G,visualMedia:()=>Ee,webStorage:()=>Ie,widgetHosting:()=>Z});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>lo,getTelemetryPort:()=>co,isSupported:()=>uo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>wo,getDataLayerPort:()=>mo,isSupported:()=>vo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Co,registerOnResumeHandler:()=>yo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Io,FailedReason:()=>Eo,Messages:()=>Ao,_initialize:()=>Ro,_uninitialize:()=>Fo,getContext:()=>ko,getFrameContext:()=>To,initialize:()=>Oo,isInitialized:()=>Po,lifecycle:()=>o,notifyAppLoaded:()=>Mo,notifyExpectedFailure:()=>Do,notifyFailure:()=>No,notifySuccess:()=>xo,openLink:()=>_o,registerHostToAppPerformanceMetricsHandler:()=>Ho,registerOnContextChangeHandler:()=>Lo,registerOnThemeChangeHandler:()=>Uo});var a={};n.r(a),n.d(a,{isSupported:()=>Wo,resize:()=>Bo});var s={};n.r(s),n.d(s,{isSupported:()=>zo,open:()=>jo});var c={};n.r(c),n.d(c,{isSupported:()=>Jo,registerOnMessageFromParent:()=>Go,sendMessageToDialog:()=>$o,sendMessageToParentFromDialog:()=>qo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Yo,getDialogInfoFromUrlDialogInfo:()=>Xo,isSupported:()=>Zo,open:()=>Ko,parentCommunication:()=>c,submit:()=>Qo});var l={};n.r(l),n.d(l,{isSupported:()=>di,open:()=>li});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>pi,open:()=>fi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>gi,isSupported:()=>hi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>vi,MenuItem:()=>Ci,MenuListType:()=>wi,initialize:()=>Ii,isSupported:()=>Mi,setNavBarMenu:()=>Oi,setUpViews:()=>Pi,showActionMenu:()=>Fi});var g={};n.r(g),n.d(g,{initialize:()=>xi,isSupported:()=>qi,registerChangeConfigHandler:()=>Bi,registerOnRemoveHandler:()=>Hi,registerOnRemoveHandlerHelper:()=>_i,registerOnSaveHandler:()=>Ui,registerOnSaveHandlerHelper:()=>Li,setConfig:()=>Di,setValidityState:()=>Ni});var h={};n.r(h),n.d(h,{isSupported:()=>Aa,onClick:()=>ya,onHoverEnter:()=>Sa,onHoverLeave:()=>ba});var m={};n.r(m),n.d(m,{_initialize:()=>Ea,isSupported:()=>Oa,navigateBack:()=>Ia,registerBackButtonHandler:()=>Pa,registerBackButtonHandlerHelper:()=>Ta});var v={};n.r(v),n.d(v,{isSupported:()=>ka,navigateTo:()=>Ra,navigateToDefaultPage:()=>Fa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ma,exitFullscreen:()=>xa,isSupported:()=>Na});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>La,getTabInstances:()=>Ua,isSupported:()=>Ha,navigateToTab:()=>Da});var y={};n.r(y),n.d(y,{EnterFocusType:()=>_a,ReturnFocusType:()=>Va,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>qa,initializeWithFrameContext:()=>za,isSupported:()=>Qa,navigateCrossDomain:()=>$a,navigateToApp:()=>Ga,registerFocusEnterHandler:()=>Wa,registerFullScreenHandler:()=>Ka,returnFocus:()=>Ba,setCurrentFrame:()=>ja,shareDeepLink:()=>Ja,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>Xc,registerGetLogHandler:()=>Zc});var b={};n.r(b),n.d(b,{closeConversation:()=>du,getChatMembers:()=>fu,isSupported:()=>pu,openConversation:()=>lu});var A={};n.r(A),n.d(A,{isSupported:()=>vu,sendCustomTelemetryData:()=>wu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Au,isSupported:()=>bu});var I={};n.r(I),n.d(I,{ContentItemType:()=>Iu,CopilotMode:()=>Ru,MediaSelectionType:()=>Pu,SidePanelErrorCode:()=>xu,SidePanelErrorImpl:()=>Nu,TeamsContextType:()=>ku,TeamsDimensionName:()=>Ou,TeamsSessionType:()=>Tu,TranscriptState:()=>Fu,UserConsent:()=>Mu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Wu,getContent:()=>_u,isResponseAReportableError:()=>Hu,isSupported:()=>Lu,preCheckUserConsent:()=>Vu,registerUserActionContentSelect:()=>Bu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>Qu,isSupported:()=>Ku});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>tl,ActionExecuteResponseHandler:()=>al,InvokeErrorCode:()=>ol,InvokeResponseType:()=>rl,OriginalRequestType:()=>nl,SerializableActionExecuteInvokeRequest:()=>Yu,SerializableConnectorParameters:()=>ml,UserAuthenticationState:()=>il,authenticateAndResendRequest:()=>dl,authenticateWithConnector:()=>vl,authenticateWithOauth2:()=>gl,authenticateWithPowerPlatformConnectorPlugins:()=>hl,authenticateWithSSO:()=>fl,authenticateWithSSOAndResendRequest:()=>pl,disconnectConnector:()=>yl,getUserAuthenticationStateForConnector:()=>Cl,isActionExecuteResponse:()=>el,isInvokeError:()=>sl,isSupported:()=>Sl,validateActionExecuteInvokeRequest:()=>ul});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Pl,authenticateWithOauth:()=>Il,authenticateWithSSO:()=>El,authenticateWithSSOAndResendRequest:()=>Tl,isSupported:()=>Ol,validateInput:()=>Rl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Ml,ActionOpenUrlType:()=>kl,isSupported:()=>Dl,processActionOpenUrl:()=>Nl,processActionSubmit:()=>xl});var M={};n.r(M),n.d(M,{isSupported:()=>Vl,processActionOpenUrl:()=>Hl,processActionSubmit:()=>_l});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>Jl,isSupported:()=>$l,processActionOpenUrlDialog:()=>ql});var N={};n.r(N),n.d(N,{isSupported:()=>Xl,processActionCommand:()=>Zl});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>ed,CloudStorageProviderFileAction:()=>id,CloudStorageProviderType:()=>td,DocumentLibraryAccessType:()=>rd,FileDownloadStatus:()=>od,SpecialDocumentLibraryType:()=>nd,addCloudStorageFolder:()=>sd,addCloudStorageProvider:()=>hd,addCloudStorageProviderFile:()=>vd,copyMoveFiles:()=>fd,deleteCloudStorageFolder:()=>cd,deleteCloudStorageProviderFile:()=>Cd,downloadCloudStorageProviderFile:()=>yd,getCloudStorageFolderContents:()=>ud,getCloudStorageFolders:()=>ad,getExternalProviders:()=>dd,getFileDownloads:()=>pd,openCloudStorageFile:()=>ld,openDownloadFolder:()=>gd,registerCloudStorageProviderContentChangeHandler:()=>Ad,registerCloudStorageProviderListChangeHandler:()=>bd,removeCloudStorageProvider:()=>md,renameCloudStorageProviderFile:()=>wd,uploadCloudStorageProviderFile:()=>Sd});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>Pd,isSupported:()=>Fd,registerMeetingRoomCapabilitiesUpdateHandler:()=>Od,registerMeetingRoomStatesUpdateHandler:()=>Rd,sendCommandToPairedMeetingRoom:()=>Td});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>kd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Ud,version:()=>Md});var _={};n.r(_),n.d(_,{isSupported:()=>qd,showNotification:()=>zd});var V={};n.r(V),n.d(V,{isSupported:()=>Qd,notifyInstallCompleted:()=>Kd,registerAppInstallationHandler:()=>Gd,unregisterAppInstallationHandler:()=>Jd});var B={};n.r(B),n.d(B,{ControlCommand:()=>Xd,ErrorReason:()=>Yd,SessionTerminatedReason:()=>ef,getCapableParticipants:()=>tf,isSupported:()=>lf,registerOnCapableParticipantsChangeHandler:()=>af,registerOnDeviceStateChangeHandler:()=>cf,registerOnErrorHandler:()=>sf,registerOnSessionStatusChangeHandler:()=>uf,requestControl:()=>nf,sendControlCommand:()=>rf,terminateSession:()=>of});var W={};n.r(W),n.d(W,{isSupported:()=>pf,selectAppEntity:()=>ff});var j={};n.r(j),n.d(j,{getUserJoinedTeams:()=>hf,isSupported:()=>mf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>Cf,isSupported:()=>yf,joinedTeams:()=>j});var q={};n.r(q),n.d(q,{ChannelType:()=>bf,fullTrust:()=>z,getTeamChannels:()=>Af,isSupported:()=>If,refreshSiteUrl:()=>Ef});var $={};n.r($),n.d($,{EffectChangeType:()=>Df,EffectFailureReason:()=>Uf,VideoFrameFormat:()=>Nf,isSupported:()=>Wf,notifySelectedVideoEffectChanged:()=>Hf,registerForVideoEffect:()=>_f,registerForVideoFrame:()=>Lf});var G={};n.r(G),n.d(G,{ErrorLevel:()=>fp,frameProcessingTimeoutInMs:()=>lp,isSupported:()=>yp,notifyFatalError:()=>Ap,notifySelectedVideoEffectChanged:()=>vp,registerForVideoEffect:()=>wp,registerForVideoFrame:()=>pp,updatePersonalizedEffects:()=>Cp});var J={};n.r(J),n.d(J,{addAndConfigure:()=>kp,getAll:()=>Mp,isSupported:()=>Up,reconfigure:()=>xp,remove:()=>Dp,rename:()=>Np});var K={};n.r(K),n.d(K,{AppTypes:()=>_p,isSupported:()=>Vp,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Qp,openAppDetail:()=>Gp,openFullStore:()=>$p,openInContextStore:()=>Jp,openSpecificStore:()=>Kp});var Z={};n.r(Z),n.d(Z,{callTool:()=>rg,contentSizeChanged:()=>cg,isSupported:()=>ng,notifyIntrinsicHeight:()=>sg,openExternal:()=>lg,registerModalCloseHandler:()=>dg,requestDisplayMode:()=>ig,requestModal:()=>ag,sendFollowUpMessage:()=>og,setWidgetState:()=>ug});var X={};n.r(X),n.d(X,{DataResidency:()=>Dg,authenticate:()=>Tg,getAuthToken:()=>Rg,getUser:()=>kg,notifyFailure:()=>Ng,notifySuccess:()=>xg,registerAuthenticationHandlers:()=>Pg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>oh,openAppInstallDialog:()=>rh});var ee={};n.r(ee),n.d(ee,{CameraStartMode:()=>uh,File:()=>gh,FileFormat:()=>sh,ImageOutputFormats:()=>ph,ImageUriType:()=>fh,Media:()=>Ch,MediaControllerEvent:()=>ch,MediaType:()=>dh,Source:()=>lh,VideoController:()=>Sh,captureImage:()=>hh,hasPermission:()=>mh,requestPermission:()=>vh,scanBarCode:()=>Eh,selectMedia:()=>bh,viewImages:()=>Ah});var te={};n.r(te),n.d(te,{hasPermission:()=>_h,isSupported:()=>Bh,requestPermission:()=>Vh,scanBarCode:()=>Hh});var ne={};n.r(ne),n.d(ne,{isSupported:()=>$h,openChat:()=>jh,openGroupChat:()=>qh});var re={};n.r(re),n.d(re,{isSupported:()=>Zh,read:()=>Qh,write:()=>Kh});var oe={};n.r(oe),n.d(oe,{addNAATrustedOrigins:()=>um,canParentManageNAATrustedOrigins:()=>om,deleteNAATrustedOrigins:()=>lm,getParentOrigin:()=>rm,isDeeplyNestedAuthSupported:()=>im,isNAAChannelRecommended:()=>nm});var ie={};n.r(ie),n.d(ie,{chooseLocation:()=>hm,isSupported:()=>vm,showLocation:()=>mm});var ae={};n.r(ae),n.d(ae,{getCurrentLocation:()=>Cm,hasPermission:()=>ym,isSupported:()=>bm,map:()=>ie,requestPermission:()=>Sm});var se={};n.r(se),n.d(se,{isSupported:()=>Rm,open:()=>Om});var ce={};n.r(ce),n.d(ce,{getLocation:()=>km,isSupported:()=>xm,showLocation:()=>Mm});var ue={};n.r(ue),n.d(ue,{setOptions:()=>Dm});var le={};n.r(le),n.d(le,{CallType:()=>Bm,EventActionSource:()=>jm,MeetingReactionType:()=>_m,MeetingType:()=>Vm,SharingProtocol:()=>Wm,appShareButton:()=>ue,getAppContentStageSharingCapabilities:()=>ev,getAppContentStageSharingState:()=>nv,getAuthenticationTokenForAnonymousUser:()=>Jm,getIncomingClientAudioState:()=>zm,getLiveStreamState:()=>Km,getMeetingDetails:()=>$m,getMeetingDetailsVerbose:()=>Gm,joinMeeting:()=>av,registerLiveStreamChangedHandler:()=>Xm,registerMeetingReactionReceivedHandler:()=>iv,registerRaiseHandStateChangedHandler:()=>ov,registerSpeakingStateChangeHandler:()=>rv,requestAppAudioHandling:()=>sv,requestStartLiveStreaming:()=>Qm,requestStopLiveStreaming:()=>Zm,shareAppContentToStage:()=>Ym,stopSharingAppContentToStage:()=>tv,toggleIncomingClientAudio:()=>qm,updateMicState:()=>lv});var de={};n.r(de),n.d(de,{isSupported:()=>hv,openPurchaseExperience:()=>gv});var fe={};n.r(fe),n.d(fe,{composeMeeting:()=>wv,isSupported:()=>Cv,openCalendarItem:()=>vv});var pe={};n.r(pe),n.d(pe,{composeMailWithHandoff:()=>Av,isSupported:()=>Ev});var ge={};n.r(ge),n.d(ge,{ComposeMailType:()=>Fv,composeMail:()=>Ov,handoff:()=>pe,isSupported:()=>Rv,openMailItem:()=>Tv});var he={};n.r(he),n.d(he,{enablePrintCapability:()=>Mv,isSupported:()=>Hv,print:()=>xv,registerBeforeUnloadHandler:()=>Uv,registerBeforeUnloadHandlerHelper:()=>Lv,registerOnLoadHandler:()=>Nv,registerOnLoadHandlerHelper:()=>Dv});var me={};n.r(me),n.d(me,{isSupported:()=>jv,selectPeople:()=>Bv});var ve={};n.r(ve),n.d(ve,{isSupported:()=>Jv,showProfile:()=>Gv});var we={};n.r(we),n.d(we,{closeSearch:()=>nw,isSupported:()=>tw,registerHandlers:()=>Yv,unregisterHandlers:()=>ew});var Ce={};n.r(Ce),n.d(Ce,{getContent:()=>iw,isSupported:()=>aw});var ye={};n.r(ye),n.d(ye,{SharingAPIMessages:()=>uw,history:()=>Ce,isSupported:()=>hw,shareWebContent:()=>lw});var Se={};n.r(Se),n.d(Se,{close:()=>vw,isSupported:()=>ww});var be={};n.r(be),n.d(be,{StageViewOpenMode:()=>yw,isSupported:()=>bw,open:()=>Sw,self:()=>Se});var Ae={};n.r(Ae),n.d(Ae,{captureImages:()=>Pw,isSupported:()=>Ow,retrieveImages:()=>Tw});var Ee={};n.r(Ee),n.d(Ee,{CameraRestriction:()=>xw,Source:()=>Nw,hasPermission:()=>Dw,image:()=>Ae,requestPermission:()=>Uw});var Ie={};n.r(Ie),n.d(Ie,{isSupported:()=>jw,isWebStorageClearedOnUserLogOut:()=>Bw});var Pe={};n.r(Pe),n.d(Pe,{CallModalities:()=>qw,isSupported:()=>Gw,startCall:()=>$w});var Te={};n.r(Te),n.d(Te,{ExpectedFailureReason:()=>Io,FailedReason:()=>Eo,Messages:()=>Ao,notifyAppLoaded:()=>Kw,notifyExpectedFailure:()=>Xw,notifyFailure:()=>Zw,notifySuccess:()=>Qw});var Oe={};n.r(Oe),n.d(Oe,{getDragAndDropFiles:()=>aC,isSupported:()=>cC});var Re={};n.r(Re),n.d(Re,{getSettings:()=>LC,registerOnRemoveHandler:()=>VC,registerOnSaveHandler:()=>_C,setSettings:()=>HC,setValidityState:()=>UC});var Fe={};n.r(Fe),n.d(Fe,{getDefaultSizeIfNotProvided:()=>JC,startTask:()=>jC,submitTask:()=>qC,updateTask:()=>zC});var ke={};n.r(ke),n.d(ke,{ContainerState:()=>ZC,LiveShareHost:()=>YC,UserMeetingRole:()=>QC,isSupported:()=>XC});var Me={};n.r(Me),n.d(Me,{CartStatus:()=>hy,Intent:()=>gy,addOrUpdateCartItems:()=>vy,cartVersion:()=>py,getCart:()=>my,isSupported:()=>yy,removeCartItems:()=>wy,updateCartStatus:()=>Cy});var xe,Ne,De,Ue,Le,He,_e,Ve,Be,We,je={};function ze(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(je),n.d(je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>_y,enableShortcutRelayCapability:()=>Ly,isSupported:()=>Hy,resetIsShortcutRelayCapabilityEnabled:()=>Uy,setOverridableShortcutHandler:()=>Dy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(xe||(xe={})),function(e){e.M365Content="m365content"}(Ne||(Ne={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(De||(De={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Ue||(Ue={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Le||(Le={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(He||(He={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(_e||(_e={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(Ve||(Ve={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Be||(Be={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(We||(We={}));const qe=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.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"]}');const $e="2.0.1",Ge="2.0.2",Je="2.0.3",Ke="2.0.4",Qe="2.0.1",Ze="1.9.0",Xe="2.0.0",Ye="1.7.0",et="1.8.0",tt="1.9.0",nt=n.t(qe,2).validOrigins,rt=1500,ot=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),it=/^https:\/\//,at="https",st="teams.microsoft.com",ct="The library has not yet been initialized",ut="The runtime has not yet been initialized",lt="The runtime version is not supported",dt="The call was not properly started";var ft=n(933);const pt=ht,gt=2147483647;function ht(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return vt(e)}return mt(e,t,n)}function mt(e,t,n){if("string"==typeof e)return St(e,t);if(ArrayBuffer.isView(e))return Ot(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(At(e,ArrayBuffer)||e&&At(e.buffer,ArrayBuffer))return Rt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(At(e,SharedArrayBuffer)||e&&At(e.buffer,SharedArrayBuffer)))return Rt(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return ht.from(r,t,n);const o=Qt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ht.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function vt(e){return wt(e),Ct(e<0?0:0|yt(e))}function wt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ct(e){if(e>gt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ht.prototype),t}function yt(e){if(e>=gt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gt.toString(16)+" bytes");return 0|e}function St(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ht.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|bt(e,t);let r=Ct(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function bt(e,t){if(ht.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||At(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return It(e).length;default:if(o)return r?-1:Et(e).length;t=(""+t).toLowerCase(),o=!0}}function At(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Et(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function It(e){return ft.toByteArray(Tt(e))}ht.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),ht.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ht.from=function(e,t,n){return mt(e,t,n)},Object.setPrototypeOf(ht.prototype,Uint8Array.prototype),Object.setPrototypeOf(ht,Uint8Array),ht.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ht.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ht.prototype};const Pt=/[^+/0-9A-Za-z-_]/g;function Tt(e){if((e=(e=e.split("=")[0]).trim().replace(Pt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ot(e){if(At(e,Uint8Array)){const t=new Uint8Array(e);return Rt(t.buffer,t.byteOffset,t.byteLength)}return Ft(e)}function Rt(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,ht.prototype),r}function Ft(e){const t=e.length<0?0:0|yt(e.length),n=Ct(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function kt(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Nt(r)}function Mt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Dt(this,t,n);case"utf8":case"utf-8":return kt(this,t,n);case"ascii":return Ut(this,t,n);case"latin1":case"binary":return Lt(this,t,n);case"base64":return Ht(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ht.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?kt(this,0,e):Mt.apply(this,arguments)};const xt=4096;function Nt(e){const t=e.length;if(t<=xt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=xt));return n}function Dt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Kt[e[r]];return o}function Ut(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Lt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Ht(e,t,n){return 0===t&&n===e.length?ft.fromByteArray(e):ft.fromByteArray(e.slice(t,n))}function _t(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Vt(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(Jt(r))return a;e[n+a]=r}return a}function Bt(e,t,n,r){return Gt(Et(t,e.length-n),e,n,r)}function Wt(e,t,n,r){return Gt(qt(t),e,n,r)}function jt(e,t,n,r){return Gt(It(t),e,n,r)}function zt(e,t,n,r){return Gt($t(t,e.length-n),e,n,r)}function qt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $t(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function Gt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Jt(e){return e!=e}ht.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Vt(this,e,t,n);case"utf8":case"utf-8":return Bt(this,e,t,n);case"ascii":case"latin1":case"binary":return Wt(this,e,t,n);case"base64":return jt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Kt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Qt(e){if(ht.isBuffer(e)){const t=0|yt(e.length),n=Ct(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Jt(e.length)?Ct(0):Ft(e):"Buffer"===e.type&&Array.isArray(e.data)?Ft(e.data):void 0}const Zt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xt;const Yt=new Uint8Array(16);function en(){if(!Xt&&(Xt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xt(Yt)}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function nn(e,t=0){return tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]}const rn=function(e,t,n){if(Zt.randomUUID&&!t&&!e)return Zt.randomUUID();const r=(e=e||{}).random||(e.rng||en)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return nn(r)},on=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const an=function(e){return"string"==typeof e&&on.test(e)};var sn,cn,un,ln,dn,fn,pn,gn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(sn||(sn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(cn||(cn={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(un||(un={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(ln||(ln={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(dn||(dn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(fn||(fn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(pn||(pn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(gn||(gn={}));const hn={errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},mn={majorVersion:1,minorVersion:5},vn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},wn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Cn=new Error("Invalid response: Received more images than the specified max limit in the response.");function yn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Sn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function bn(){return rn()}function An(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&An(e[t])})),Object.freeze(e)}function En(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function In(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Pn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Tn(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function On(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Rn(e){return!(Sn(`${e.majorVersion}.${e.minorVersion}`,`${mn.majorVersion}.${mn.minorVersion}`)>=0)}function Fn(e){return"https:"===e.protocol}function kn(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=pt.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Mn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function xn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function Dn(e,t){if(Hn(e)||!_n(e)||!Vn(e))throw t||new Error("id is not valid.")}function Un(e,t){const n=e.toString().toLocaleLowerCase();if(Hn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Fn(e))throw t||new Error("Url should be a valid https url")}function Ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Hn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function _n(e){return e.length<256&&e.length>4}function Vn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Bn(e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}const Wn=!!performance&&"now"in performance;function jn(){return Wn?performance.now()+performance.timeOrigin:void 0}function zn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>zn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>zn(e[n],t+1)))}function qn(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:Ve.NotAdult})})})}class $n{constructor(e=bn()){this.uuid=e,Bn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Gn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Jn{}Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.additionalValidOrigins=[],Jn.initializePromise=void 0,Jn.isFramelessWindow=!1,Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.printCapabilityEnabled=!1,Jn.teamsJsInstanceId=(new $n).toString();var Kn=n(815);const Qn=new $n,Zn=Kn.debug.formatArgs;Kn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Qn.toString()}]`,Zn.call(this,e)};const Xn=(0,Kn.debug)("teamsJs");function Yn(e){return Xn.extend(e)}function er(e,t){return`${e}_${t}`}function tr(e){return/^v\d+_[\w.]+$/.test(e)}var nr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const rr=Yn("runtime"),or=4;function ir(e){return e.apiVersion===or}const ar={apiVersion:-1,supports:{}};function sr(e){if(ir(e))return!0;throw-1===e.apiVersion?new Error(ut):new Error(lt)}let cr=ar;const ur={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:vn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},lr=[sn.desktop,sn.web,sn.rigel,sn.surfaceHub,sn.teamsRoomsWindows,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays],dr=[sn.android,sn.ios,sn.ipados,sn.visionOS],fr=[...lr,...dr];function pr(e){let t=e;if(t.apiVersion<or&&gr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),ir(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const gr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=nr(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],hr="2.1.2",mr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:lr}],"1.9.0":[{capability:{location:{}},hostClientTypes:fr}],"2.0.0":[{capability:{people:{}},hostClientTypes:fr},{capability:{sharing:{}},hostClientTypes:[sn.desktop,sn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[sn.android,sn.desktop,sn.ios,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays,sn.web]},{capability:{webStorage:{}},hostClientTypes:[sn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[sn.android,sn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[sn.android,sn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[sn.android,sn.ios,sn.ipados,sn.visionOS]}],"2.1.2":[]},vr=rr.extend("generateBackCompatRuntimeConfig");function wr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=wr(e[r]||{},t[r]));return n}function Cr(e,t,n){vr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);vr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Sn(e,t)>=0&&n[t].forEach((e=>{void 0!==Jn.hostClientType&&e.hostClientTypes.includes(Jn.hostClientType)&&(r=wr(r,e.capability))}))}));const o={apiVersion:or,hostVersionsInfo:vn,isLegacyTeams:!0,supports:r};return vr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const yr=rr.extend("applyRuntimeConfig");function Sr(e){"string"==typeof e.apiVersion&&(yr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),yr("Fast-forwarding runtime %o",e);const t=pr(e);yr("Applying runtime %o",t),cr=An(t)}function br(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Ar="2.48.0-beta.0",Er={childProxyingCommunication:!1};function Ir(){Er.childProxyingCommunication=!0}function Pr(){return Er.childProxyingCommunication}let Tr={disableEnforceOriginMatchForChildResponses:!1};function Or(){return Tr}function Rr(e){Tr=e}function Fr(e){return Rr(Object.assign(Object.assign({},Tr),e)),Or()}var kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Mr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},xr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Dr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Ur(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Lr=Yn("flushMessageQueue");function Hr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Mr(o);Lr("Flushing message %s from %s message queue via postMessage.",Ur(n),r),e.postMessage(n,t)}}}const _r=Yn("internal"),Vr=_r.extend("ensureInitializeCalled"),Br=_r.extend("ensureInitialized");function Wr(){if(!Jn.initializeCalled)throw Vr(ct),new Error(ct)}function jr(e,...t){if(!Jn.initializeCompleted)throw Br("%s. initializeCalled: %s",ct,Jn.initializeCalled.toString()),new Error(ct);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Jn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Jn.frameContext}".`)}return sr(e)}function zr(e=$e){const t=Sn(Jn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function qr(){return Jn.hostClientType==sn.android||Jn.hostClientType==sn.ios||Jn.hostClientType==sn.ipados||Jn.hostClientType==sn.visionOS}function $r(e=$e){if(!qr()){throw{errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM}}if(!zr(e)){throw{errorCode:Ue.OLD_PLATFORM}}}function Gr(e){let t=Jn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&it.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Jn.additionalValidOrigins=t}function Jr(e){if(!Xr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Qr}-${Zr}).`)}function Kr(e){if(Hn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Yr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Qr=4,Zr=256;function Xr(e){return e.length<Zr&&e.length>Qr}function Yr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function eo(e){if(!(e instanceof no))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class to{constructor(e){this.idAsString=e,Kr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class no extends to{constructor(e){super(e),Jr(e)}toJSON(){return{appIdAsString:this.toString()}}}function ro(e){return null==e}var oo=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 io;const ao="v1",so=Yn("messageChannels.telemetry");function co(){return oo(this,void 0,void 0,(function*(){if(io)return so("Returning telemetry port from cache"),io;if(!uo())throw hn;return io=yield yc(er(ao,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),io}))}function uo(){var e;return!(!jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function lo(){io=void 0}var fo=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 po;const go="v1",ho=Yn("messageChannels.dataLayer");function mo(){return fo(this,void 0,void 0,(function*(){if(po)return ho("Returning dataLayer port from cache"),po;if(!vo())throw hn;return po=yield yc(er(go,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),po}))}function vo(){var e;return!(!jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function wo(){po=void 0}function Co(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");jr(cr),Ls(e)}function yo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");jr(cr),Hs(e)}const So="v2",bo=Yn("app"),Ao={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Eo,Io;function Po(){return Jn.initializeCompleted}function To(){return Jn.frameContext}function Oo(e){return Zi(er(So,"app.initialize"),e)}function Ro(e){cc.currentWindow=e}function Fo(){Jn.initializeCalled&&(ys(),Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.initializePromise=void 0,Jn.additionalValidOrigins=[],Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.isFramelessWindow=!1,lo(),wo(),dc())}function ko(){return new Promise((e=>{Wr(),e(fc(er(So,"app.getContext"),"getContext"))})).then((e=>Vo(e)))}function Mo(){Wr(),Xi(er(So,"app.notifyAppLoaded"))}function xo(){return ta(er(So,"app.notifySuccess"))}function No(e){Wr(),ea(er(So,"app.notifyFailure"),e)}function Do(e){Wr(),Yi(er(So,"app.notifyExpectedFailure"),e)}function Uo(e){aa(er(So,"app.registerOnThemeChangeHandler"),e)}function Lo(e){sa(er(So,"app.registerOnContextChangeHandler"),e)}function Ho(e){Fs(e)}function _o(e){return ca(er(So,"app.openLink"),e)}function Vo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:cn.teams,clientType:e.hostClientType?e.hostClientType:sn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new no(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Jn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Bo(e){ni(er(ei,"dialog.update.resize"),e)}function Wo(){return!(!jr(cr)||!cr.supports.dialog)&&!!cr.supports.dialog.update}function jo(e,t,n){oi(er(ei,"dialog.url.bot.open"),e,t,n)}function zo(){return jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url&&cr.supports.dialog.url.bot)}function qo(e){if(jr(cr,un.task),!Jo())throw hn;Ac(er(ei,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function $o(e){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Jo())throw hn;Ac(er(ei,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Go(e){if(jr(cr,un.task),!Jo())throw hn;for(Es("messageForChild"),As(er(ei,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ci.reverse();ci.length>0;){e(ci.pop())}}function Jo(){var e,t;return jr(cr)&&!!(null===(t=null===(e=cr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Ko(e,t,n){ri(er(ei,"dialog.url.open"),e,t,n)}function Qo(e,t){ii(er(ei,"dialog.url.submit"),e,t)}function Zo(){return jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url)}function Xo(e){return{url:e.url,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Yo(e){const t=Xo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Eo||(Eo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Io||(Io={})),bo("teamsjs instance is version %s, starting at %s UTC (%s local)",Ar,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Nn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?bo("teamsjs is being used from %s. %s",t,n):bo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ei="v2",ti="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 ni(e,t){if(jr(cr,un.content,un.sidePanel,un.task,un.meetingStage),!Wo())throw hn;Ac(e,"tasks.updateTask",[t])}function ri(e,t,n,r){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Zo())throw hn;r&&As(er(ei,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Ac(e,"tasks.startTask",[Xo(t)],((e,t)=>{null==n||n({err:e,result:t}),Es("messageForParent")}))}function oi(e,t,n,r){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!zo())throw hn;r&&As(er(ei,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Ac(e,"tasks.startTask",[Yo(t)],((e,t)=>{null==n||n({err:e,result:t}),Es("messageForParent")}))}function ii(e,t,n){if(jr(cr,un.content,un.task),!Zo())throw hn;Jn.frameContext===un.content&&console.warn(ti),Ac(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ai(e){return{card:e.card,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title}}function si(e){const t=ai(e);return t.completionBotId=e.completionBotId,t}const ci=[];function ui(e){Jn.frameContext&&(Jn.frameContext===un.task?ci.push(e):Es("messageForChild"))}function li(e,t){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!di())throw hn;const n=si(e);Ac(er(ei,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card&&cr.supports.dialog.card.bot)}function fi(e,t){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!pi())throw hn;const n=ai(e);Ac(er(ei,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function pi(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card)}function gi(){As(er(ei,"dialog.registerMessageForChildHandler"),"messageForChild",ui,!1)}function hi(){return!(!jr(cr)||!cr.supports.dialog)}const mi="v2";var vi,wi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(vi||(vi={}));class Ci{constructor(){this.enabled=!0,this.selected=!1}}let yi,Si,bi,Ai,Ei;function Ii(){As(er(mi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ri,!1),As(er(mi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ki,!1),As(er(mi,"menus.registerSetModuleViewHandler"),"setModuleView",Ti,!1)}function Pi(e,t){if(jr(cr),!Mi())throw hn;bi=t,Ac(er(mi,"menus.setUpViews"),"setUpViews",[e])}function Ti(e){bi&&bi(e)||(jr(cr),Ac(er(mi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Oi(e,t){if(jr(cr),!Mi())throw hn;yi=t,Ac(er(mi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ri(e){yi&&yi(e)||(jr(cr),Ac(er(mi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Fi(e,t){if(jr(cr),!Mi())throw hn;Si=t,Ac(er(mi,"menus.showActionMenu"),"showActionMenu",[e])}function ki(e){Si&&Si(e)||(jr(cr),Ac(er(mi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Mi(){return!(!jr(cr)||!cr.supports.menus)}function xi(){As(er(Za,"pages.config.registerSettingsSaveHandler"),"settings.save",Vi,!1),As(er(Za,"pages.config.registerSettingsRemoveHandler"),"settings.remove",ji,!1)}function Ni(e){return as(er(Za,"pages.config.setValidityState"),e)}function Di(e){return cs(er(Za,"pages.config.setConfig"),e)}function Ui(e){Li(er(Za,"pages.config.registerOnSaveHandler"),e,(()=>{if(!ro(e)&&!qi())throw hn}))}function Li(e,t,n){!ro(t)&&jr(cr,un.settings),n&&n(),Ai=t,!ro(t)&&Ac(e,"registerHandler",["save"])}function Hi(e){_i(er(Za,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!ro(e)&&!qi())throw hn}))}function _i(e,t,n){!ro(t)&&jr(cr,un.remove,un.settings),n&&n(),Ei=t,!ro(t)&&Ac(e,"registerHandler",["remove"])}function Vi(e){const t=new Wi(e);Ai?Ai(t):js()?Qs("settings.save",[e]):t.notifySuccess()}function Bi(e){Ps(er(Za,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[un.content],(()=>{if(!qi())throw hn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(wi||(wi={}));class Wi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Ac(er(Za,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ac(er(Za,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function ji(){const e=new zi;Ei?Ei(e):js()?Qs("settings.remove",[]):e.notifySuccess()}class zi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Ac(er(Za,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ac(er(Za,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function qi(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.config}class $i{}class Gi extends $i{validate(e){return!0}deserialize(e){return e}}var Ji=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ki=6e4,Qi=Yn("app");function Zi(e,t){if(Nn()){return Qi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Tn((()=>ia(e,t)),Ki,new Error("SDK initialization timed out."))}function Xi(e){Ac(e,Ao.AppLoaded,[Ar])}function Yi(e,t){Ac(e,Ao.ExpectedFailure,[t.reason,t.message])}function ea(e,t){Ac(e,Ao.Failure,[t.reason,t.message])}function ta(e){return Ji(this,void 0,void 0,(function*(){if(Jn.initializeCompleted)return ra(e);if(!Jn.initializePromise)throw new Error(ct);return Jn.initializePromise.then((()=>ra(e)))}))}function na(){var e;return jr(cr)&&!!(null===(e=cr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ra(e){return Ji(this,void 0,void 0,(function*(){return na()?wc(Ao.Success,[Ar],new Gi,e).then((()=>({hasFinishedSuccessfully:!0}))):(Ac(e,Ao.Success,[Ar]),{hasFinishedSuccessfully:"unknown"})}))}const oa=Qi.extend("initializeHelper");function ia(e,t){return new Promise((n=>{Jn.initializeCalled||(Jn.initializeCalled=!0,Cs(),Jn.initializePromise=lc(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=$e})=>{Jn.frameContext=e,Jn.hostClientType=t,Jn.clientSupportedSDKVersion=r;try{oa("Parsing %s",n);let e=JSON.parse(n);if(oa("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=qn(e),n&&Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{oa("Attempting to parse %s as an SDK version",n),isNaN(Sn(n,$e))||(Jn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(oa("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=qn(e),Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Sr(Cr(Jn.clientSupportedSDKVersion,ur,mr))}}Jn.initializeCompleted=!0})),Ii(),xi(),gi()),Array.isArray(t)&&Gr(t),void 0!==Jn.initializePromise?n(Jn.initializePromise):oa("GlobalVars.initializePromise is unexpectedly undefined")}))}function aa(e,t){!ro(t)&&Wr(),Ts(e,t)}function sa(e,t){!ro(t)&&Wr(),Os(e,t)}function ca(e,t){return new Promise((n=>{jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),n(pc(e,"executeDeepLink",t))}))}var ua=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 la=[];const da=Yn("validateOrigin");let fa;function pa(){return ua(this,void 0,void 0,(function*(){fa||(yield ha())}))}function ga(){return 0===la.length}function ha(e=!1){return ua(this,void 0,void 0,(function*(){if(!ga()&&!e)return la;if(fa)return fa;if(Nn())return la=nt,nt;{da("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),rt);return fa=fetch(ot,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return da("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(ma(JSON.stringify(e)))return la=e.validOrigins,la;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?da(`validOrigins fetch call to CDN failed due to Timeout of ${rt} ms. Defaulting to fallback list`):da("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),la=nt,la))),fa}}))}function ma(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return da("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function va(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function wa(e,t){const n=t||ga()?nt:la;return Ca(e,n)?Promise.resolve(!0):(da("Origin %s is not in the local valid origins list, fetching from CDN",e),ha(t).then((t=>Ca(e,t))))}function Ca(e,t){if(!Fn(e))return da("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>va(e,n))))return!0;for(const e of Jn.additionalValidOrigins){if(va("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return da("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Jn.additionalValidOrigins),!1}function ya(e){Ps(er(Za,"pages.appButton.onClick"),"appButtonClick",e,[un.content],(()=>{if(!Aa())throw hn}))}function Sa(e){Ps(er(Za,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[un.content],(()=>{if(!Aa())throw hn}))}function ba(e){Ps(er(Za,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[un.content],(()=>{if(!Aa())throw hn}))}function Aa(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.appButton}function Ea(){gs()}function Ia(){return Ya(er(Za,"pages.backStack.navigateBack"))}function Pa(e){Ta(er(Za,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!ro(e)&&!Oa())throw hn}))}function Ta(e,t,n){!ro(t)&&jr(cr),n&&n(),ps(t),!ro(t)&&Ac(e,"registerHandler",["backButton"])}function Oa(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.backStack}function Ra(e){return new Promise((t=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ka())throw hn;t(hc(er(Za,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Fa(){return new Promise((e=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ka())throw hn;e(hc(er(Za,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function ka(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.currentApp}function Ma(){if(jr(cr,un.content),!Na())throw hn;Ac(er(Za,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function xa(){if(jr(cr,un.content),!Na())throw hn;Ac(er(Za,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Na(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.fullTrust}function Da(e){return es(er(Za,"pages.tabs.navigateToTab"),e)}function Ua(e){return ns(er(Za,"pages.tabs.getTabInstances"),e)}function La(e){return rs(er(Za,"pages.tabs.getMruTabInstances"),e)}function Ha(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.tabs}var _a,Va;function Ba(e){const t=er(Za,"pages.returnFocus");if(jr(cr),!Qa())throw hn;if(void 0===e&&Ac(t,"returnFocus",[!1]),"boolean"==typeof e)Ac(t,"returnFocus",[e]);else switch(e){case Va.PreviousLandmark:case Va.GoToActivityFeed:Ac(t,"returnFocus",[!1,e]);break;case Va.NextLandmark:Ac(t,"returnFocus",[!0,e])}}function Wa(e){Ps(er(Za,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Qa())throw hn}))}function ja(e){is(er(Za,"pages.setCurrentFrame"),e)}function za(e,t,n){pa(),Zi(er(Za,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),ja(e)}function qa(){return ss(er(Za,"pages.getConfig."))}function $a(e){return Xa(er(Za,"pages.navigateCrossDomain"),e)}function Ga(e){return new Promise((t=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!Qa())throw hn;const n=er(Za,"pages.navigateToApp");if(cr.isLegacyTeams){t(pc(n,"executeDeepLink",On(us(e)?e:ls(e))))}else{t(pc(n,"pages.navigateToApp",us(e)?ds(e):e))}}))}function Ja(e){return os(er(Za,"pages.shareDeepLink"),e)}function Ka(e){Ps(er(Za,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!ro(e)&&!Qa())throw hn}))}function Qa(){return!(!jr(cr)||!cr.supports.pages)}pa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(_a||(_a={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Va||(Va={}));const Za="v2";function Xa(e,t){return new Promise((n=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage),!Qa())throw hn;n(gc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ya(e){return new Promise((t=>{if(jr(cr),!Oa())throw hn;t(gc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function es(e,t){return new Promise((n=>{if(jr(cr),!Ha())throw hn;n(gc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function ts(e,t){if(jr(cr),!Qa())throw hn;Ac(e,"returnFocus",[t])}function ns(e,t){return new Promise((n=>{if(jr(cr),!Ha())throw hn;n(fc(e,"getTabInstances",t))}))}function rs(e,t){return new Promise((n=>{if(jr(cr),!Ha())throw hn;n(fc(e,"getMruTabInstances",t))}))}function os(e,t){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Qa())throw hn;Ac(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function is(e,t){if(jr(cr,un.content),!Qa())throw hn;Ac(e,"setFrameContext",[t])}function as(e,t){if(jr(cr,un.settings,un.remove),!qi())throw hn;Ac(e,"settings.setValidityState",[t])}function ss(e){return new Promise((t=>{if(jr(cr,un.content,un.settings,un.remove,un.sidePanel),!Qa())throw hn;t(fc(e,"settings.getSettings"))}))}function cs(e,t){return new Promise((n=>{if(jr(cr,un.content,un.settings,un.sidePanel),!qi())throw hn;n(pc(e,"settings.setSettings",t))}))}function us(e){return e.appId instanceof no}function ls(e){return Object.assign(Object.assign({},e),{appId:new no(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ds(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let fs;function ps(e){fs=e}function gs(){As(er(Za,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",hs,!1)}function hs(){fs&&fs()||(js()?Qs("backButtonPress",[]):Ia())}var ms=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const vs=Yn("handlers");class ws{static initializeHandlers(){ws.handlers.themeChange=Rs,ws.handlers.load=xs,ws.handlers.beforeUnload=Us,gs()}static uninitializeHandlers(){ws.handlers={},ws.themeChangeHandler=null,ws.beforeUnloadHandler=null,ws.beforeSuspendOrTerminateHandler=null,ws.resumeHandler=null,ws.contextChangeHandler=null}}function Cs(){ws.initializeHandlers()}function ys(){ws.uninitializeHandlers()}ws.handlers={},ws.themeChangeHandler=null,ws.loadHandler=null,ws.beforeUnloadHandler=null,ws.beforeSuspendOrTerminateHandler=null,ws.resumeHandler=null,ws.hostToAppPerformanceMetricsHandler=null,ws.contextChangeHandler=null;const Ss=vs.extend("callHandler");function bs(e,t){const n=ws.handlers[e];if(n){Ss("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return js()?(Qs(e,t),[!1,void 0]):(Ss("Handler for action message %s not found.",e),[!1,void 0])}function As(e,t,n,r=!0,o=[]){n?(ws.handlers[t]=n,r&&Ac(e,"registerHandler",[t,...o])):delete ws.handlers[t]}function Es(e){delete ws.handlers[e]}function Is(e){return null!=ws.handlers[e]}function Ps(e,t,n,r,o){n&&jr(cr,...r),o&&o(),As(e,t,n)}function Ts(e,t){ws.themeChangeHandler=t,!ro(t)&&Ac(e,"registerHandler",["themeChange"])}function Os(e,t){ws.contextChangeHandler=t,!ro(t)&&Ac(e,"registerHandler",["contextChange"])}function Rs(e){ws.themeChangeHandler&&ws.themeChangeHandler(e),js()&&Qs("themeChange",[e])}function Fs(e){ws.hostToAppPerformanceMetricsHandler=e}function ks(e){ws.hostToAppPerformanceMetricsHandler&&ws.hostToAppPerformanceMetricsHandler(e)}function Ms(e,t){ws.loadHandler=t,!ro(t)&&Ac(e,"registerHandler",["load"])}function xs(e){const t=Ns(e);ws.resumeHandler?(ws.resumeHandler(t),js()&&Qs("load",[t])):ws.loadHandler&&(ws.loadHandler(e),js()&&Qs("load",[e]))}function Ns(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ds(e,t){ws.beforeUnloadHandler=t,!ro(t)&&Ac(e,"registerHandler",["beforeUnload"])}function Us(){return ms(this,void 0,void 0,(function*(){const e=()=>{Ac(er("v2","handleBeforeUnload"),"readyToUnload",[])};ws.beforeSuspendOrTerminateHandler?(yield ws.beforeSuspendOrTerminateHandler(),js()?Qs("beforeUnload"):e()):ws.beforeUnloadHandler&&ws.beforeUnloadHandler(e)||(js()?Qs("beforeUnload"):e())}))}function Ls(e){ws.beforeSuspendOrTerminateHandler=e,!ro(e)&&Ac(er("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Hs(e){ws.resumeHandler=e,!ro(e)&&Ac(er("v2","registerOnResumeHandler"),"registerHandler",["load"])}var _s=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 Vs=Yn("childProxyingCommunication");class Bs{}function Ws(){Bs.window=null,Bs.origin=null,Bs.messageQueue=[]}function js(){return!!Pr()&&!!Bs.window}function zs(e,t){return!!Pr()&&(Bs.window&&!Bs.window.closed&&e!==Bs.window||(Bs.window=e,Bs.origin=t),Bs.window&&Bs.window.closed?(Bs.window=null,Bs.origin=null,!1):Bs.window===e)}function qs(e,t,n,r){return _s(this,void 0,void 0,(function*(){Bs.window===t&&(Hr(Bs.window,Bs.origin,Bs.messageQueue,"child"),Gs(e,n,r))}))}Bs.messageQueue=[];const $s=Vs.extend("handleIncomingMessageFromChild");function Gs(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=xr(e.data),[o,i]=bs(r.func,r.args);if(o&&void 0!==i)return $s("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Ur(r),r.func),void Ks(r.id,r.uuid,Array.isArray(i)?i:[i]);$s("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Ur(r),r.func),Js(r,t,n)}function Js(e,t,n){const r=t(er("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Bs.origin;n(r.uuid,((...t)=>{if(!Bs.window)return;if(!Or().disableEnforceOriginMatchForChildResponses&&o!==Bs.origin)return void $s("Origin of child window has changed, not sending response back to child window");const n=t.pop();$s("Message from parent being relayed to child, id: %s",Ur(e)),Ks(e.id,e.uuid,t,n)}))}function Ks(e,t,n,r){const o=Bs.window,i=Zs(e,t,n,r),a=Dr(i),s=Bs.origin;o&&s&&($s("Sending message %s to %s via postMessage, args = %o",Ur(a),"child",a.args),o.postMessage(a,s))}function Qs(e,t){const n=Bs.window,r=Xs(e,t),o=Bs.origin;n&&o?n.postMessage(r,o):Bs.messageQueue.push(r)}function Zs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Xs(e,t){return{func:e,args:t||[]}}class Ys{static storeCallbackInformation(e,t){Ys.callbackInformation.set(e,t)}static clearMessages(){Ys.callbackInformation.clear()}static deleteMessageInformation(e){Ys.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?ks({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=Ys.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(ks({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ys.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ys.callbackInformation=new Map;const ec=Yn("nestedAppAuthUtils"),tc=ec.extend("tryPolyfillWithNestedAppAuthBridge"),nc="v2";function rc(e,t,n){var r;const o=tc;if(Jn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=ic(a,n);s&&(a.nestedAppAuthBridge=s)}const oc=ec.extend("createNestedAppAuthBridge");function ic(e,t){const n=oc;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=er(nc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var ac=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 sc=Yn("communication");class cc{}class uc{}function lc(e,t){if(uc.messageListener=e=>kc(e),cc.currentWindow=cc.currentWindow||xn(),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",uc.messageListener,!1),!cc.parentWindow){const e=cc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Jn.isFramelessWindow=!0,e.onNativeMessage=Bc}try{return cc.parentOrigin="*",mc(t,"initialize",[Ar,or,e]).then((([e,t,n,r])=>(rc(r,cc.currentWindow,{onMessage:xc,sendPostMessage:Ic}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{cc.parentOrigin=null}}function dc(){cc.currentWindow&&cc.currentWindow.removeEventListener("message",uc.messageListener,!1),cc.currentWindow=null,cc.parentWindow=null,cc.parentOrigin=null,uc.parentMessageQueue=[],uc.nextMessageId=0,uc.callbacks.clear(),uc.promiseCallbacks.clear(),uc.portCallbacks.clear(),uc.legacyMessageIdsToUuidMap={},Ys.clearMessages(),Ws()}function fc(e,t,...n){return mc(e,t,n).then((([e])=>e))}function pc(e,t,...n){return mc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function gc(e,t,n,...r){return mc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function hc(e,t,...n){return mc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function mc(e,t,n=void 0){if(!tr(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(bc(Rc(e,t,n).uuid))}))}function vc(e){return e.map((e=>br(e)?e.serialize():e))}function wc(e,t,n,r,o){var i;return ac(this,void 0,void 0,(function*(){const a=vc(t),[s]=yield mc(r,e,a);if(o&&o(s)||!o&&ze(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(`${Ue.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Cc(e,t,n,r){var o;return ac(this,void 0,void 0,(function*(){const i=vc(t),[a]=yield mc(n,e,i);if(r&&r(a)||!r&&ze(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host`)}))}function yc(e,t,n=void 0){if(!tr(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return Sc(Rc(e,t,n).uuid)}function Sc(e){return new Promise(((t,n)=>{uc.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 bc(e){return new Promise((t=>{uc.promiseCallbacks.set(e,t)}))}function Ac(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!tr(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Rc(e,t,o);r&&uc.callbacks.set(i.uuid,r)}uc.parentMessageQueue=[],uc.topMessageQueue=[],uc.nextMessageId=0,uc.callbacks=new Map,uc.promiseCallbacks=new Map,uc.portCallbacks=new Map,uc.legacyMessageIdsToUuidMap={};const Ec=sc.extend("sendNestedAuthRequestToTopWindow");function Ic(e,t){const n=Ec,r=cc.topWindow,o=Kc(e,t);return n("Message %s information: %o",Ur(o),{actionName:o.func}),Tc(r,o)}const Pc=sc.extend("sendRequestToTargetWindowHelper");function Tc(e,t){const n=Pc,r=$c(e),o=Mr(t);if(Jn.isFramelessWindow)cc.currentWindow&&cc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Ur(o),r),cc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=qc(e);e&&i?(n("Sending message %s to %s via postMessage",Ur(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Ur(o),r),zc(e).push(t))}return t}const Oc=sc.extend("sendMessageToParentHelper");function Rc(e,t,n,r,o){const i=Oc,a=cc.parentWindow,s=Jc(e,t,n,r,o);return Ys.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Ur(s),{actionName:t,args:n}),Tc(a,s)}const Fc=sc.extend("processIncomingMessage");function kc(e){return ac(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Fc("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 Dc(t,n).then((r=>{r?(Uc(t,n),t!==cc.parentWindow?zs(t,n)&&qs(e,t,Rc,((e,t)=>uc.callbacks.set(e,t))):Bc(e)):Fc("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 Mc=sc.extend("processAuthBridgeMessage");function xc(e,t){var n,r;const o=Mc;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?Dc(c,u)?(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),Hr(cc.topWindow,cc.topOrigin,uc.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Nc=sc.extend("shouldProcessIncomingMessage");function Dc(e,t){return ac(this,void 0,void 0,(function*(){if(cc.currentWindow&&e===cc.currentWindow)return Nc("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 Nc("Message has an invalid origin of %s",t),!1}const n=yield wa(e);return n||Nc("Message has an invalid origin of %s",t),n}}))}function Uc(e,t){Jn.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),Hr(cc.parentWindow,cc.parentOrigin,uc.parentMessageQueue,"parent")}const Lc=sc.extend("handleIncomingMessageFromParent");function Hc(e){const t=Lc;if(!e.uuid)return uc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=_c(uc.callbacks,t);if(n)return n;const r=_c(uc.promiseCallbacks,t);if(r)return r;const o=_c(uc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Ur(e))}function _c(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Vc(e,t){const n=_c(t,e.uuid);n&&t.delete(n),e.uuid?uc.legacyMessageIdsToUuidMap={}:delete uc.legacyMessageIdsToUuidMap[e.id]}function Bc(e){const t=Lc,n=jn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=Hc(o);if(i){const r=uc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ys.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]),Wc(e)||(t("Removing registered callback for message %s",i.toString()),Vc(o,uc.callbacks)));const a=uc.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()),Vc(o,uc.promiseCallbacks));const s=uc.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()),Vc(o,uc.portCallbacks)}o.uuid&&(uc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ys.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Ur(r),r.func),bs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Wc(e){return!0===e.data.isPartialResponse}function jc(){return cc.topWindow!==cc.parentWindow}function zc(e){return e===cc.topWindow&&jc()?uc.topMessageQueue:e===cc.parentWindow?uc.parentMessageQueue:[]}function qc(e){return e===cc.topWindow&&jc()?cc.topOrigin:e===cc.parentWindow?cc.parentOrigin:null}function $c(e){return e===cc.topWindow&&jc()?"top":e===cc.parentWindow?"parent":null}function Gc(e,t){let n;n=cc.currentWindow.setInterval((()=>{0===zc(e).length&&(clearInterval(n),t())}),100)}function Jc(e,t,n,r,o){const i=uc.nextMessageId++,a=new $n;uc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Jn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:jn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Kc(e,t){const n=uc.nextMessageId++,r=new $n;return uc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:jn(),apiVersionTag:t,args:[],data:e}}const Qc="v1";function Zc(e){if(!ro(e)&&jr(cr),!ro(e)&&!Xc())throw hn;e?As(er(Qc,"log.request"),"log.request",(()=>{const t=e();Ac(er(Qc,"log.receive"),"log.receive",[t])})):Es("log.request")}function Xc(){return!(!jr(cr)||!cr.supports.logs)}var Yc,eu,tu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Yc||(Yc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(eu||(eu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(tu||(tu={}));const nu="v1";function ru(e,t){jr(cr),Ac(er(nu,"uploadCustomApp"),"uploadCustomApp",[e],t||yn())}function ou(e,t,n){jr(cr),Ac(er(nu,"sendCustomMessage"),e,t,n)}function iu(e,t){if(jr(cr),!js())throw new Error("The child window has not yet been initialized or is not present");Qs(e,t)}function au(e,t){jr(cr),As(er(nu,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function su(e,t){jr(cr),As(er(nu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function cu(e){jr(cr,un.content,un.sidePanel,un.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Ac(er(nu,"openFilePreview"),"openFilePreview",t)}const uu="v1";function lu(e){return new Promise((t=>{if(jr(cr,un.content),!pu())throw hn;const n=pc(er(uu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&As(er(uu,"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&&As(er(uu,"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 du(){if(jr(cr,un.content),!pu())throw hn;Ac(er(uu,"conversations.closeConversation"),"conversations.closeConversation"),Es("startConversation"),Es("closeConversation")}function fu(){return new Promise((e=>{if(jr(cr),!pu())throw hn;e(fc(er(uu,"conversations.getChatMember"),"getChatMembers"))}))}function pu(){return!(!jr(cr)||!cr.supports.conversations)}var gu=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 hu="v2",mu=Yn("copilot");function vu(){var e;return jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function wu(e,t){var n;return void 0===t&&(t=null!==(n=jn())&&void 0!==n?n:Date.now()),gu(this,void 0,void 0,(function*(){return jr(cr),mu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Cc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],er(hu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var Cu=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",Su=Yn("copilot");function bu(){var e,t;return jr(cr)&&(!!(null===(e=cr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=cr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Au(e){var t,n,r;return Cu(this,void 0,void 0,(function*(){if(jr(cr),!bu())throw new Error(`Error code: ${hn.errorCode}, message: Not supported on platform`);if((null===(t=cr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Su("Eligibility information is already available on runtime."),cr.hostVersionsInfo.appEligibilityInformation;Su("Eligibility information is not available on runtime. Requesting from host.");const o=yield fc(er(yu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(ze(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(!Eu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=Ve.NotAdult),o}))}function Eu(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 Iu,Pu,Tu,Ou,Ru,Fu,ku,Mu,xu;!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"}(Iu||(Iu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Pu||(Pu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Tu||(Tu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Ou||(Ou={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Ru||(Ru={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Fu||(Fu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(ku||(ku={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Mu||(Mu={})),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"}(xu||(xu={}));class Nu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}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 Uu="v2";function Lu(){var e;return jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function Hu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(xu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||ze(e)}function _u(e){return Du(this,void 0,void 0,(function*(){jr(cr);return wc("copilot.sidePanel.getContent",e?[new qu(e)]:[],new ju,er(Uu,"copilot.sidePanel.getContent"),Hu)}))}function Vu(e){return Du(this,void 0,void 0,(function*(){jr(cr);return wc("copilot.sidePanel.preCheckUserConsent",e?[new $u(e)]:[],new zu,er(Uu,"copilot.sidePanel.preCheckUserConsent"),Hu)}))}function Bu(e){Ps(er(Uu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[un.content],(()=>{if(!Lu())throw Wu}))}const Wu=new Nu(xu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class ju extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class zu extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class qu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class $u{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var Gu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ju="v2";function Ku(){var e;return jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.view)}function Qu(){return Gu(this,void 0,void 0,(function*(){jr(cr),yield wc("copilot.view.closeSidePanel",[],new Zu,er(Ju,"copilot.view.closeSidePanel"))}))}class Zu extends $i{validate(e){return!0}deserialize(e){return e}}const Xu="v2";class Yu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function el(e){const t=e;return t.responseType===rl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const tl="Action.Execute";var nl,rl,ol,il;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(nl||(nl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(rl||(rl={}));class al extends $i{validate(e){return el(e)}deserialize(e){return e}}function sl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ol).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function cl(e){e.requestType===nl.ActionExecuteInvokeRequest?ul(e):e.requestType===nl.QueryMessageExtensionRequest&&ll(e)}function ul(e){if(e.type!==tl){throw{errorCode:ol.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${tl}"`}}if(!zn(e.data)){throw{errorCode:ol.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function ll(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 dl(e,t,n){if(jr(cr,un.content),!Sl())throw hn;const r=new no(e);return cl(n),mc(er(Xu,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function fl(e,t){if(jr(cr,un.content),!Sl())throw hn;const n=new no(e);return mc(er(Xu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function pl(e,t,n){if(jr(cr,un.content),!Sl())throw hn;const r=new no(e);return cl(n),mc(er(Xu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function gl(e,t,n){if(jr(cr,un.content),!Sl())throw hn;return Dn(e,new Error("titleId is Invalid.")),Dn(t,new Error("oauthConfigId is Invalid.")),mc(er(Xu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function hl(e,t,n){if(jr(cr,un.content),!Sl())throw hn;return Dn(e,new Error("titleId is Invalid.")),t&&Un(t),mc(er(Xu,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(ol||(ol={}));class ml{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 vl(e){if(jr(cr,un.content),!Sl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Cc("externalAppAuthentication.authenticateWithConnector",[new ml(e)],er(Xu,"externalAppAuthentication.authenticateWithConnector"),sl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(il||(il={}));class wl extends $i{validate(e){return"string"==typeof e&&e in il}deserialize(e){return e}}function Cl(e){if(jr(cr,un.content),!Sl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),wc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new ml(e)],new wl,er(Xu,"externalAppAuthentication.getUserAuthenticationStateForConnector"),sl)}function yl(e){if(jr(cr,un.content),!Sl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Cc("externalAppAuthentication.disconnectConnector",[new ml(e)],er(Xu,"externalAppAuthentication.disconnectConnector"),sl)}function Sl(){return!(!jr(cr)||!cr.supports.externalAppAuthentication)}var bl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Al="v2";function El(e,t,n){return bl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Ol())throw hn;return Rl(e,t),Cc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],er(Al,"externalAppAuthenticationForCEA.authenticateWithSSO"),sl)}))}function Il(e,t,n){return bl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Ol())throw hn;return Rl(e,t),Cc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],er(Al,"externalAppAuthenticationForCEA.authenticateWithOauth"),sl)}))}function Pl(e,t,n,r){return bl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Ol())throw hn;return Rl(e,t),ul(r),wc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Yu(r),n.url.href,n.width,n.height,n.isExternal],new al,er(Al,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),sl)}))}function Tl(e,t,n,r){return bl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Ol())throw hn;return Rl(e,t),ul(r),wc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Yu(r),n.authId,n.connectionName,n.claims,n.silent],new al,er(Al,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),sl)}))}function Ol(){return!(!jr(cr)||!cr.supports.externalAppAuthenticationForCEA)}function Rl(e,t){Dn(t,new Error("conversation id is not valid.")),eo(e)}const Fl="v2";var kl,Ml;function xl(e,t){if(jr(cr,un.content),!Dl())throw hn;const n=new no(e);return mc(er(Fl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Nl(e,t,n){if(jr(cr,un.content),!Dl())throw hn;const r=new no(e);return mc(er(Fl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Dl(){return!(!jr(cr)||!cr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(kl||(kl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Ml||(Ml={}));var Ul=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 Ll="v2";function Hl(e,t,n){return Ul(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Vl())throw hn;Rl(e,t);const[r,o]=yield mc(er(Ll,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function _l(e,t,n){return Ul(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Vl())throw hn;Rl(e,t);const r=yield fc(er(Ll,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Vl(){return!(!jr(cr)||!cr.supports.externalAppCardActionsForCEA)}var Bl;function Wl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Bl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Bl||(Bl={}));var jl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const zl="v2";function ql(e,t,n){return jl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!$l())throw hn;return Gl(e,n),Cc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Jl(t),n],er(zl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Wl)}))}function $l(){return!(!jr(cr)||!cr.supports.externalAppCardActionsForDA)}function Gl(e,t){eo(e),Gn(t)}class Jl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Kl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ql="v2";function Zl(e,t,n){return Kl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Xl())throw hn;const r=new no(e),[o,i]=yield mc(er(Ql,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Xl(){return!(!jr(cr)||!cr.supports.externalAppCommands)}const Yl="v1";var ed,td,nd,rd,od,id;function ad(e,t){if(jr(cr,un.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Ac(er(Yl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function sd(e,t){if(jr(cr,un.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Ac(er(Yl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function cd(e,t,n){if(jr(cr,un.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Ac(er(Yl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function ud(e,t,n){if(jr(cr,un.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Ac(er(Yl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function ld(e,t,n){if(jr(cr,un.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Ac(er(Yl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function dd(e=!1,t){if(jr(cr,un.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ac(er(Yl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function fd(e,t,n,r,o=!1,i){if(jr(cr,un.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Ac(er(Yl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function pd(e){if(jr(cr,un.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ac(er(Yl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function gd(e=void 0,t){if(jr(cr,un.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ac(er(Yl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function hd(e){if(jr(cr,un.content),!e)throw Ed(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ac(er(Yl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function md(e,t){if(jr(cr,un.content),!t)throw Ed(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Ed(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Ac(er(Yl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function vd(e,t){if(jr(cr,un.content),!t)throw Ed(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Ed(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ac(er(Yl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function wd(e,t){if(jr(cr,un.content),!t)throw Ed(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Ed(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ac(er(Yl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Cd(e,t){if(jr(cr,un.content),!t)throw Ed(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Ed(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ac(er(Yl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function yd(e,t){if(jr(cr,un.content),!t)throw Ed(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Ed(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ac(er(Yl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Sd(e,t){if(jr(cr,un.content),!t)throw Ed(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Ed(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Ed(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Ac(er(Yl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function bd(e){if(jr(cr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");As(er(Yl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Ad(e){if(jr(cr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");As(er(Yl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Ed(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(ed||(ed={})),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"}(td||(td={})),function(e){e.ClassMaterials="classMaterials"}(nd||(nd={})),function(e){e.Readonly="readonly"}(rd||(rd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(od||(od={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(id||(id={}));const Id="v1";function Pd(){return new Promise((e=>{if(jr(cr),!Fd())throw hn;e(hc(er(Id,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Td(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(jr(cr),!Fd())throw hn;t(hc(er(Id,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Od(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(jr(cr),!Fd())throw hn;As(er(Id,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{jr(cr),e(t)}))}function Rd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(jr(cr),!Fd())throw hn;As(er(Id,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{jr(cr),e(t)}))}function Fd(){return!(!jr(cr)||!cr.supports.meetingRoom)}function kd(){return!(!jr(cr)||!cr.supports.messageChannels)}const Md="1.0.1",xd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Bd("Invalid message format, ignoring. Message: %o",e);if(!Hd(e.source,e.origin))return void Bd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Wd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Bd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Nd=null,Dd=!1;function Ud(e,t,n=!1){if(Dd=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);Nd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Bd("Nested App Auth Bridge is already present");const o=Ld(r);o&&(r.nestedAppAuthBridge=o)}function Ld(e){const t=new WeakMap,{onMessage:n}=xd,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 Bd(`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=_d(t);if(e===e.top||!Nd)return void Wd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Nd)}}catch(e){return void Wd("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function Hd(e,t){if(t===Nd)try{return"https:"===new URL(t).protocol}catch(e){return Wd("Invalid message origin URL:",e),!1}return!1}function _d(e){const t=Date.now();return{id:Vd(),uuid:rn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Vd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Bd(...e){Dd&&console.log(...e)}function Wd(...e){Dd&&console.error(...e)}const jd="v1";function zd(e){if(jr(cr,un.content),!qd())throw hn;Ac(er(jd,"notifications.showNotification"),"notifications.showNotification",[e])}function qd(){return!(!jr(cr)||!cr.supports.notifications)}const $d="v2";function Gd(e){if(!Qd())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());if(ro(e))throw new Error(Ue.INVALID_ARGUMENTS.toString());As(er($d,"otherApp.install"),"otherApp.install",e)}function Jd(){if(!Qd())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());Ac(er($d,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Es("otherApp.install")}function Kd(e){if(!Qd())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());return Cc("otherApp.notifyInstallCompleted",[e.toString()],er($d,"otherApp.notifyInstallCompleted"))}function Qd(){return!(!jr(cr)||!cr.supports.otherAppStateChange)}const Zd="v1";var Xd,Yd,ef;function tf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;Ac(er(Zd,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function nf(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;Ac(er(Zd,"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(jr(cr,un.sidePanel),!lf())throw hn;Ac(er(Zd,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function of(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;Ac(er(Zd,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function af(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;As(er(Zd,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function sf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;As(er(Zd,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function cf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;As(er(Zd,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function uf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!lf())throw hn;As(er(Zd,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function lf(){return!(!jr(cr)||!cr.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(Xd||(Xd={})),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"}(Yd||(Yd={})),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"}(ef||(ef={}));const df="v1";function ff(e,t,n,r){if(jr(cr,un.content),!pf())throw hn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Ac(er(df,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function pf(){return!(!jr(cr)||!cr.supports.appEntity)}const gf="v1";function hf(e){return new Promise((t=>{if(jr(cr),!mf())throw hn;if((Jn.hostClientType===sn.android||Jn.hostClientType===sn.teamsRoomsAndroid||Jn.hostClientType===sn.teamsPhones||Jn.hostClientType===sn.teamsDisplays)&&!zr(Qe)){const e={errorCode:Ue.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(fc(er(gf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function mf(){return!(!jr(cr)||!cr.supports.teams)&&(!!cr.supports.teams.fullTrust&&!!cr.supports.teams.fullTrust.joinedTeams)}var vf=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 Cf(e){return vf(this,void 0,void 0,(function*(){if(jr(cr),!yf())throw hn;return wc("getConfigSetting",[e],new Gi,er(wf,"teams.fullTrust.getConfigSetting"))}))}function yf(){return!(!jr(cr)||!cr.supports.teams)&&!!cr.supports.teams.fullTrust}const Sf="v1";var bf;function Af(e,t){if(jr(cr,un.content),!If())throw hn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ac(er(Sf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Ef(e,t){if(jr(cr),!If())throw hn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ac(er(Sf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function If(){return!(!jr(cr)||!cr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(bf||(bf={}));class Pf{static setTimeout(e,t){const n=performance.now(),r=bn();return Pf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Pf.setTimeoutCallbacks[e]}static setInterval(e,t){Pf.setTimeout((function n(){e(),Pf.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Pf.setTimeoutCallbacks){const r=Pf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Pf.setTimeoutCallbacks[e].callback(),delete Pf.setTimeoutCallbacks[e]}}}Pf.setTimeoutCallbacks={};class Tf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Pf.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&&Pf.clearTimeout(this.timeoutId),this.timeoutId=Pf.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(Tf.maxSessionTimeoutInMs,2*t.timeoutInMs):Tf.initialSessionTimeoutInMs}}Tf.initialSessionTimeoutInMs=1e3,Tf.maxSessionTimeoutInMs=3e4;const Of="v2";class Rf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Tf(Rf.distributionBinSize,(e=>this.reportPerformanceEvent(er(Of,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Pf.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(er(Of,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Rf.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){Pf.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(er(Of,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(er(Of,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Rf.distributionBinSize=1e3,Rf.calculateFPSInterval=1e3;var Ff=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())}))},kf=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 Mf="v2",xf=Nn()?void 0:new Rf(Ac);var Nf,Df,Uf;function Lf(e){if(jr(cr,un.sidePanel),!Wf())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(As(er(Mf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==xf?void 0:xf.setFrameProcessTimeLimit(e.timeLimit)),!1),Gf())jf(e.videoFrameHandler,e.config);else{if(!Kf())throw hn;qf(e.videoBufferHandler,e.config)}null==xf||xf.startMonitorSlowFrameProcessing()}function Hf(e,t){if(jr(cr,un.sidePanel),!Wf())throw hn;Ac(er(Mf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function _f(e){if(jr(cr,un.sidePanel),!Wf())throw hn;As(er(Mf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",sp(e,xf),!1),Ac(er(Mf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Vf(e){Ac(er(Mf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Bf(e){Ac(er(Mf,"videoEffects.notifyError"),"video.notifyError",[e])}function Wf(){return jr(cr)&&!!cr.supports.video&&(!!cr.supports.video.mediaStream||!!cr.supports.video.sharedFrame)}function jf(e,t){if(jr(cr,un.sidePanel),!Wf()||!Gf())throw hn;As(er(Mf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Ff(this,void 0,void 0,(function*(){const{streamId:n}=t,r=zf(e,xf);yield Xf(n,r,Bf,xf)}))),!1),Ac(er(Mf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function zf(e,t){return n=>Ff(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 qf(e,t){if(jr(cr,un.sidePanel),!Wf()||!Kf())throw hn;As(er(Mf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==xf||xf.reportStartFrameProcessing(t.width,t.height),e($f(t),(()=>{null==xf||xf.reportFrameProcessed(),Vf(n)}),Bf)}}),!1),Ac(er(Mf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function $f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=kf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Gf(){var e;return jr(cr,un.sidePanel)&&Jf()&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.mediaStream)}function Jf(){var e,t,n,r;return!(!(null===(t=null===(e=xn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=xn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Kf(){var e;return jr(cr,un.sidePanel)&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Nf||(Nf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Df||(Df={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Uf||(Uf={}));var Qf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Zf="v2";function Xf(e,t,n,r){var o,i;return Qf(this,void 0,void 0,(function*(){const a=tp();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),np(yield ep(e,n,r),new rp(n,t),a.writable)}))}function Yf(e,t,n,r){var o,i;return Qf(this,void 0,void 0,(function*(){const a=tp();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),np(yield ep(e,n,r),new ap(n,t),a.writable)}))}function ep(e,t,n){return Qf(this,void 0,void 0,(function*(){if(Nn())throw hn;const r=xn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function tp(){if(Nn())throw hn;const e=window.MediaStreamTrackGenerator;if(!e)throw hn;return new e({kind:"video"})}function np(e,t,n){new(0,xn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class rp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Qf(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 op{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 ip{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 ap{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Qf(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=>Qf(this,void 0,void 0,(function*(){if(Nn())throw hn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new op(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 ip(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}}})),As(er(Zf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function sp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Ac(er(Zf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Uf?e:Uf.InitializationFailure;Ac(er(Zf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var cp=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 up="v2",lp=2e3,dp=Nn()?void 0:new Rf(Ac);var fp;function pp(e){var t,n;if(!yp())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(jr(cr,un.sidePanel)){if(As(er(up,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==dp?void 0:dp.setFrameProcessTimeLimit(e)),!1),null===(t=cr.supports.video)||void 0===t?void 0:t.mediaStream)As(er(up,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>cp(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=dp?hp(e.videoFrameHandler,dp):e.videoFrameHandler;r?yield Yf(n,o,bp,dp):yield Xf(n,o,bp,dp)}))),!1),Ac(er(up,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=cr.supports.video)||void 0===n?void 0:n.sharedFrame))throw hn;As(er(up,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==dp||dp.reportStartFrameProcessing(t.width,t.height);const n=gp(),r=t.timestamp;e.videoBufferHandler(mp(t),(()=>{n(),null==dp||dp.reportFrameProcessed(),Sp(r)}),bp)}}),!1),Ac(er(up,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==dp||dp.startMonitorSlowFrameProcessing()}}function gp(){const e=setTimeout((()=>{bp(`Frame not processed in ${lp}ms`,fp.Warn)}),lp);return function(){clearTimeout(e)}}function hp(e,t){return n=>cp(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=gp(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function mp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function vp(e,t,n){if(jr(cr,un.sidePanel),!yp())throw hn;Ac(er(up,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function wp(e){if(jr(cr,un.sidePanel),!yp())throw hn;As(er(up,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",sp(e,dp),!1),Ac(er(up,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Cp(e){if(jr(cr,un.sidePanel),!Wf())throw hn;Ac(er(up,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function yp(){return jr(cr),Wf()}function Sp(e){Ac(er(up,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function bp(e,t=fp.Warn){Ac(er(up,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Ap(e){if(jr(cr),!Wf())throw hn;bp(e,fp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(fp||(fp={}));const Ep="v2";class Ip extends $i{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Pp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Tp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Op extends $i{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Rp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Fp extends $i{validate(e){const t=new Op;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function kp(e,t){if(jr(cr),!Up())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Lp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return wc("hostEntity.tab.addAndConfigure",[new Tp(e),t],new Op,er(Ep,"hostEntity.tab.addAndConfigure"))}function Mp(e){if(jr(cr),!Up())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Lp(e.threadId),wc("hostEntity.tab.getAll",[new Tp(e)],new Fp,er(Ep,"hostEntity.tab.getAll"))}function xp(e,t){if(jr(cr),!Up())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Hp(e),Lp(t.threadId),wc("hostEntity.tab.reconfigure",[new Pp(e),new Tp(t)],new Ip,er(Ep,"hostEntity.tab.reconfigure"))}function Np(e,t){if(jr(cr),!Up())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Hp(e),Lp(t.threadId),wc("hostEntity.tab.rename",[new Pp(e),new Tp(t)],new Ip,er(Ep,"hostEntity.tab.rename"))}function Dp(e,t){if(jr(cr),!Up())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Lp(t.threadId),Hp(e),wc("hostEntity.tab.remove",[new Rp(e),new Tp(t)],new Gi,er(Ep,"hostEntity.tab.remove"))}function Up(){var e;return!!(jr(cr)&&Vp()&&(null===(e=cr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Lp(e){if(!e||0==e.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Hp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var _p;function Vp(){return!(!jr(cr)||!cr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(_p||(_p={}));var Bp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Wp="v2",jp="Invalid store dialog size",zp="No App Id present, but AppId needed to open AppDetail store",qp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function $p(e){return Bp(this,void 0,void 0,(function*(){Zp();const{size:t}=null!=e?e:{};return Cc("store.openFullStore",[Xp(t)],er(Wp,"store.openFullStore"))}))}function Gp(e){return Bp(this,void 0,void 0,(function*(){Zp();const{size:t,appId:n}=e;if(!(n instanceof no))throw new Error(zp);return Cc("store.openAppDetail",[Xp(t),n],er(Wp,"store.openAppDetail"))}))}function Jp(e){return Bp(this,void 0,void 0,(function*(){Zp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Cc("store.openInContextStore",[Xp(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],er(Wp,"store.openInContextStore"))}))}function Kp(e){return Bp(this,void 0,void 0,(function*(){Zp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(qp);return Cc("store.openSpecificStore",[Xp(t),n],er(Wp,"store.openSpecificStore"))}))}function Qp(){return jr(cr)&&!!cr.supports.store}function Zp(){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Qp())throw hn}function Xp(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(jp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(jp);return JSON.stringify(e)}var Yp=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 eg="v1",tg=Yn("widgetHosting");function ng(){return jr(cr)&&!!cr.supports.widgetHosting}function rg(e,t){return Yp(this,void 0,void 0,(function*(){return Wr(),tg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),wc("widgetHosting.callTool",[new gg(e,t)],new fg,er(eg,"widgetHosting.callTool"),ze)}))}function og(e,t){return Yp(this,void 0,void 0,(function*(){return Wr(),tg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Cc("widgetHosting.sendFollowUpMessage",[new hg(e,t)],er(eg,"widgetHosting.sendFollowUpMessage"))}))}function ig(e,t){return Yp(this,void 0,void 0,(function*(){return Wr(),tg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Cc("widgetHosting.requestDisplayMode",[new mg(e,t)],er(eg,"widgetHosting.requestDisplayMode"))}))}function ag(e,t){return Yp(this,void 0,void 0,(function*(){return Wr(),tg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),wc("widgetHosting.requestModal",[new yg(e,t)],new pg,er(eg,"widgetHosting.requestModal"),ze)}))}function sg(e,t){Wr(),tg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Cc("widgetHosting.notifyIntrinsicHeight",[new Cg(e,t)],er(eg,"widgetHosting.notifyIntrinsicHeight"))}function cg(e,t,n){Wr(),tg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Cc("widgetHosting.contentSizeChanged",[new Sg(e,t,n)],er(eg,"widgetHosting.contentSizeChanged"))}function ug(e,t){return Yp(this,void 0,void 0,(function*(){return Wr(),tg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Cc("widgetHosting.setWidgetState",[new wg(e,t)],er(eg,"widgetHosting.setWidgetState"))}))}function lg(e,t){Wr(),tg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Cc("widgetHosting.openExternal",[new vg(e,t)],er(eg,"widgetHosting.openExternal"))}function dg(e){Ps(er(eg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],(()=>{if(!ng())throw new Error("Widget Hosting is not supported on this platform")}))}class fg extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class pg extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class gg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class hg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class mg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class vg{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 Cg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class yg{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 Sg{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 bg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ag="v1",Eg="v2";let Ig;function Pg(e){Ig=e}function Tg(e){const t=void 0!==e,n=t?e:Ig;if(!n)throw new Error("No parameters are provided for authentication");jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);return Og(n.successCallback||n.failureCallback?er(Ag,"authentication.authenticate"):er(Eg,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Ig=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Ig=void 0)}}))}function Og(e,t){return bg(this,void 0,void 0,(function*(){const n=Ln(t.url);return Un(n),mc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Rg(e){Wr();return Fg(e&&(e.successCallback||e.failureCallback)?er(Ag,"authentication.getAuthToken"):er(Eg,"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 Fg(e,t){return new Promise((n=>{n(mc(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 kg(e){Wr();return Mg(e&&(e.successCallback||e.failureCallback)?er(Ag,"authentication.getUser"):er(Eg,"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 Mg(e){return new Promise((t=>{t(mc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function xg(e,t){jr(cr,un.authentication);Ac(er(t?Ag:Eg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Gc(cc.parentWindow,(()=>setTimeout((()=>cc.currentWindow.close()),200)))}function Ng(e,t){jr(cr,un.authentication);Ac(er(t?Ag:Eg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Gc(cc.parentWindow,(()=>setTimeout((()=>cc.currentWindow.close()),200)))}var Dg;function Ug(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"}(Dg||(Dg={}));class Lg{constructor(e){this.val=e,Ug(e)}toString(){return this.val}}const Hg="/l/app/",_g="/l/meeting/new",Vg="attendees",Bg="startTime",Wg="endTime",jg="subject",zg="content",qg="/l/call/0/0",$g="source",Gg="withVideo",Jg="/l/chat/0/0",Kg="users",Qg="topicName",Zg="message";function Xg(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Kg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Qg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Zg}=${encodeURIComponent(n)}`;return`${at}://${st}${Jg}?${r}${o}${i}`}function Yg(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Kg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Gg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${$g}=${encodeURIComponent(n)}`;return`${at}://${st}${qg}?${r}${o}${i}`}function eh(e,t,n,r,o){const i=void 0===e?"":`${Vg}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Bg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Wg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${jg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${zg}=${encodeURIComponent(o)}`;return`${at}://${st}${_g}?${i}${a}${s}${c}${u}`}function th(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${at}://${st}${Hg}${encodeURIComponent(e)}`}const nh="v1";function rh(e){return new Promise((t=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!oh())throw new Error("Not supported");const n=er(nh,"appInstallDialog.openAppInstallDialog");cr.isLegacyTeams?t(pc(n,"executeDeepLink",th(e.appId))):(Ac(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function oh(){return!(!jr(cr)||!cr.supports.appInstallDialog)}const ih="v1",ah=Yn("media");var sh,ch,uh,lh,dh,fh,ph;!function(e){e.Base64="base64",e.ID="id"}(sh||(sh={}));class gh{}function hh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(jr(cr,un.content,un.task),Jn.isFramelessWindow)if(zr(Ye))Ac(er(ih,"media.captureImage"),"captureImage",e);else{e({errorCode:Ue.OLD_PLATFORM},[])}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},[])}}function mh(){if(jr(cr,un.content,un.task),!wh())throw hn;const e=Le.Media;return new Promise((t=>{t(hc(er(ih,"media.hasPermission"),"permissions.has",e))}))}function vh(){if(jr(cr,un.content,un.task),!wh())throw hn;const e=Le.Media;return new Promise((t=>{t(hc(er(ih,"media.requestPermission"),"permissions.request",e))}))}function wh(){return!(!jr(cr)||!cr.supports.permissions)}class Ch extends gh{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(jr(cr,un.content,un.task),zr(et))if(xh(this.mimeType,this.format,this.content))zr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ue.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ue.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Ac(er(ih,"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=Ih(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Ph(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):ah(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=bn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!ro(e)&&Ac(er(ih,"media.getMedia"),"getMedia",r),As(er(ih,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Es("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Ih(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Es("getMedia"+t)}else{const e=Ph(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob),Es("getMedia"+t)}}))}}class yh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){jr(cr,un.content,un.task);try{$r(Je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Ac(er(ih,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(ch.StopRecording,e)}}class Sh extends yh{getMediaType(){return dh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case ch.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function bh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(et)){const e={errorCode:Ue.OLD_PLATFORM};return void t(e,[])}try{Th(e)}catch(e){return void t(e,[])}if(!Rh(e)){const e={errorCode:Ue.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Ac(er(ih,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Oh(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 Ch(e));t(n,s)}))}function Ah(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(et)){return void t({errorCode:Ue.OLD_PLATFORM})}if(!Nh(e)){return void t({errorCode:Ue.INVALID_ARGUMENTS})}const n=[e];Ac(er(ih,"media.viewImages"),"viewImages",n,t)}function Eh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(jr(cr,un.content,un.task),Jn.hostClientType!==sn.desktop&&Jn.hostClientType!==sn.web&&Jn.hostClientType!==sn.rigel&&Jn.hostClientType!==sn.teamsRoomsWindows&&Jn.hostClientType!==sn.teamsRoomsAndroid&&Jn.hostClientType!==sn.teamsPhones&&Jn.hostClientType!==sn.teamsDisplays)if(zr(tt))if(Dh(t))Ac(er(ih,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ue.INVALID_ARGUMENTS},"")}else{e({errorCode:Ue.OLD_PLATFORM},"")}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},"")}}function Ih(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 Ph(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 Th(e){kh(e)?$r(Ge):Mh(e)?$r(Je):Fh(e)&&$r(Ke)}function Oh(e){return!(e.mediaType!=dh.Video||!e.videoProps||!e.videoProps.videoController)}function Rh(e){return!(null==e||e.maxMediaCount>10)}function Fh(e){var t;return!((null==e?void 0:e.mediaType)!=dh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function kh(e){return!(!e||e.mediaType!=dh.VideoAndImage&&!e.videoAndImageProps)}function Mh(e){return!(!e||e.mediaType!=dh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function xh(e,t,n){return null!=e&&null!=t&&t==sh.ID&&null!=n}function Nh(e){return!(null==e||e.length<=0||e.length>10)}function Dh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Uh(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"}(ch||(ch={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(uh||(uh={})),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"}(dh||(dh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(fh||(fh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(ph||(ph={}));const Lh="v2";function Hh(e){return new Promise((t=>{if(jr(cr,un.content,un.task),!Bh())throw hn;if(!Dh(e))throw{errorCode:Ue.INVALID_ARGUMENTS};t(hc(er(Lh,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function _h(){if(jr(cr,un.content,un.task),!Bh())throw hn;const e=Le.Media;return new Promise((t=>{t(hc(er(Lh,"barCode.hasPermission"),"permissions.has",e))}))}function Vh(){if(jr(cr,un.content,un.task),!Bh())throw hn;const e=Le.Media;return new Promise((t=>{t(hc(er(Lh,"barCode.requestPermission"),"permissions.request",e))}))}function Bh(){return!!(jr(cr)&&cr.supports.barCode&&cr.supports.permissions)}const Wh="v2";function jh(e){return zh(er(Wh,"chat.openChat"),e)}function zh(e,t){return new Promise((n=>{if(jr(cr,un.content,un.task),!$h())throw hn;if(cr.isLegacyTeams)n(pc(e,"executeDeepLink",Xg([t.user],void 0,t.message)));else{n(pc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function qh(e){const t=er(Wh,"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(zh(t,r))}else{if(jr(cr,un.content,un.task),!$h())throw hn;if(cr.isLegacyTeams)n(pc(t,"executeDeepLink",Xg(e.users,e.topic,e.message)));else{n(pc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function $h(){return!(!jr(cr)||!cr.supports.chat)}var Gh=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 Jh="v2";function Kh(e){return Gh(this,void 0,void 0,(function*(){if(jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel),!Zh())throw hn;if(!e.type||!Object.values(We).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(We)}`);const t=yield Mn(e),n={mimeType:e.type,content:t};return hc(er(Jh,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Qh(){return Gh(this,void 0,void 0,(function*(){jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel);const e=er(Jh,"clipboard.read");if(!Zh())throw hn;const t=yield hc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return kn(e.mimeType,e.content)}return t}))}function Zh(){return Jn.isFramelessWindow?!(!jr(cr)||!cr.supports.clipboard):!!(jr(cr)&&navigator&&navigator.clipboard&&cr.supports.clipboard)}var Xh=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 Yh="v2",em={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var tm;function nm(){var e;return null!==(e=jr(cr)&&(cr.isNAAChannelRecommended||sm()))&&void 0!==e&&e}function rm(){return jr(cr),cc.parentOrigin}function om(){var e;return null!==(e=jr(cr)&&cr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function im(){var e;return null!==(e=jr(cr)&&(cr.isDeeplyNestedAuthSupported||am()))&&void 0!==e&&e}function am(){return!!(jr(cr)&&cm()&&cr.isLegacyTeams&&zr(hr))}function sm(){return!!(jr(cr)&&cm()&&cr.isLegacyTeams&&cr.supports.nestedAppAuth)}function cm(){return Jn.hostClientType===sn.android||Jn.hostClientType===sn.ios||Jn.hostClientType===sn.ipados||Jn.hostClientType===sn.visionOS}function um(e){return Xh(this,void 0,void 0,(function*(){if(!om())throw hn;const t=e.map(fm);return dm(tm.ADD,t)}))}function lm(e){return Xh(this,void 0,void 0,(function*(){if(!om())throw hn;const t=e.map(fm);return dm(tm.DELETE,t)}))}function dm(e,t){return Xh(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 wc("nestedAppAuth.manageNAATrustedOrigins",[new pm(e,t)],em,er(Yh,"nestedAppAuth.manageNAATrustedOrigins"))}))}function fm(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"}(tm||(tm={}));class pm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const gm="v2";function hm(){if(jr(cr,un.content,un.task),!vm())throw hn;return hc(er(gm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function mm(e){if(jr(cr,un.content,un.task),!vm())throw hn;if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};return hc(er(gm,"geoLocation.showLocation"),"location.showLocation",e)}function vm(){return!!(jr(cr)&&cr.supports.geoLocation&&cr.supports.geoLocation.map&&cr.supports.permissions)}const wm="v2";function Cm(){if(jr(cr,un.content,un.task),!bm())throw hn;return hc(er(wm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function ym(){if(jr(cr,un.content,un.task),!bm())throw hn;const e=Le.GeoLocation;return new Promise((t=>{t(hc(er(wm,"geoLocation.hasPermission"),"permissions.has",e))}))}function Sm(){if(jr(cr,un.content,un.task),!bm())throw hn;const e=Le.GeoLocation;return new Promise((t=>{t(hc(er(wm,"geoLocation.requestPermission"),"permissions.request",e))}))}function bm(){return!!(jr(cr)&&cr.supports.geoLocation&&cr.supports.permissions)}function Am(){return cr.hostVersionsInfo?cr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Em="v1";class Im{postMessage(e,t){jr(cr),Ac(er(Em,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||yn())}addEventListener(e,t){jr(cr),"message"===e&&As(er(Em,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Pm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){jr(cr,un.task),Ac(er(Em,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||yn())}addEventListener(e,t){jr(cr,un.task),"message"===e&&As(er(Em,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Tm="v2";function Om(e){if(jr(cr,un.content),!Rm())throw hn;if(!e||!Fn(e))throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return hc(er(Tm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Rm(){return!(!jr(cr)||!cr.supports.secondaryBrowser)}const Fm="v1";function km(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(Ze))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!xm())throw hn;Ac(er(Fm,"location.getLocation"),"location.getLocation",[e],t)}function Mm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(Ze))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!xm())throw hn;Ac(er(Fm,"location.showLocation"),"location.showLocation",[e],t)}function xm(){return!(!jr(cr)||!cr.supports.location)}const Nm="v1";function Dm(e){jr(cr,un.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ac(er(Nm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Um=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 Lm="v1";var Hm,_m,Vm,Bm,Wm,jm;function zm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function qm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function $m(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content),Ac(er(Lm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Gm(){var e,t,n;return Um(this,void 0,void 0,(function*(){let r;jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content);try{const e=!0;r=yield hc(er("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Bm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Bm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Jm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage,un.task),Ac(er(Lm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Km(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");jr(cr,un.sidePanel),Ac(er(Lm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Qm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");jr(cr,un.sidePanel),Ac(er(Lm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Zm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");jr(cr,un.sidePanel),Ac(er(Lm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Xm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");jr(cr,un.sidePanel),As(er(Lm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Ym(e,t,n={sharingProtocol:Wm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function ev(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function tv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function nv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function rv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),As(er(Lm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function ov(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),As(er(Lm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function iv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),As(er(Lm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function av(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));jr(cr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||jm.Other};return hc(er("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function sv(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),e.isAppHandlingAudio?cv(e,t):uv(e,t)}function cv(e,t){Ac(er(Lm,"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");As(er(Lm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Um(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);dv(n,n.isMicMuted===t.isMicMuted?Hm.HostInitiated:Hm.AppDeclinedToChange)}catch(e){dv(t,Hm.AppFailedToChange)}}))));As(er(Lm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function uv(e,t){Ac(er(Lm,"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");Is("meeting.micStateChanged")&&Es("meeting.micStateChanged"),Is("meeting.audioDeviceSelectionChanged")&&Es("meeting.audioDeviceSelectionChanged"),t(n)}))}function lv(e){dv(e,Hm.AppInitiated)}function dv(e,t){jr(cr,un.sidePanel,un.meetingStage),Ac(er(Lm,"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"}(Hm||(Hm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(_m||(_m={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Vm||(Vm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Bm||(Bm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Wm||(Wm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(jm||(jm={}));const fv="v1",pv="v2";function gv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=er(fv,"monetization.openPurchaseExperience")):(r=e,o=er(pv,"monetization.openPurchaseExperience"));return jr(cr,un.content),Pn((()=>new Promise((e=>{if(!hv())throw hn;e(hc(o,"monetization.openPurchaseExperience",r))}))),n)}function hv(){return!(!jr(cr)||!cr.supports.monetization)}const mv="v2";function vv(e){return new Promise((t=>{if(jr(cr,un.content),!Cv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(pc(er(mv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function wv(e){return new Promise((t=>{if(jr(cr,un.content),!Cv())throw new Error("Not supported");const n=er(mv,"calendar.composeMeeting");cr.isLegacyTeams?t(pc(n,"executeDeepLink",eh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(pc(n,"calendar.composeMeeting",e))}))}function Cv(){return!(!jr(cr)||!cr.supports.calendar)}const yv="v2";function Sv(e){e&&0!==e.length&&e.forEach((e=>{Ug(e)}))}function bv(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===Fv.New&&(Sv(t.toRecipients),Sv(t.ccRecipients),Sv(t.bccRecipients))}function Av(e){if(jr(cr,un.content),!Ev())throw new Error("Not supported");return bv(e),Cc("mail.handoff.composeMail",[new Iv(e)],er(yv,"mail.handoff.composeMail"))}function Ev(){return!!(jr(cr)&&cr.supports.mail&&cr.supports.mail.handoff)}class Iv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Pv="v2";function Tv(e){return new Promise((t=>{if(jr(cr,un.content),!Rv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(pc(er(Pv,"mail.openMailItem"),"mail.openMailItem",e))}))}function Ov(e){return new Promise((t=>{if(jr(cr,un.content),!Rv())throw new Error("Not supported");t(pc(er(Pv,"mail.composeMail"),"mail.composeMail",e))}))}function Rv(){return!(!jr(cr)||!cr.supports.mail)}var Fv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Fv||(Fv={}));const kv="v2";function Mv(){if(!Jn.printCapabilityEnabled){if(jr(cr),!Hv())throw hn;Jn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(xv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function xv(){xn().print()}function Nv(e){Dv(er(kv,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!ro(e)&&!Hv())throw hn}))}function Dv(e,t,n){!ro(t)&&jr(cr),!ro(t)&&n&&n(),Ms(e,t)}function Uv(e){Lv(er(kv,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!ro(e)&&!Hv())throw hn}))}function Lv(e,t,n){!ro(t)&&jr(cr),!ro(t)&&n&&n(),Ds(e,t)}function Hv(){return!(!jr(cr)||!cr.supports.teamsCore)}const _v="v1",Vv="v2";function Bv(e,t){let n,r;jr(cr,un.content,un.task,un.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=er(_v,"people.selectPeople")):(r=e,o=er(Vv,"people.selectPeople")),En(Wv,n,o,r)}function Wv(e,t){return new Promise((n=>{if(!zr(Xe))throw{errorCode:Ue.OLD_PLATFORM};if(!Uh(t))throw{errorCode:Ue.INVALID_ARGUMENTS};if(!jv())throw hn;n(hc(e,"people.selectPeople",t))}))}function jv(){return!(!jr(cr)||!cr.supports.people)}function zv(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?qv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function qv(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 $v="v2";function Gv(e){return jr(cr,un.content),new Promise((t=>{const[n,r]=zv(e);if(!n)throw{errorCode:Ue.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(hc(er($v,"profile.showProfile"),"profile.showProfile",o))}))}function Jv(){return!(!jr(cr)||!cr.supports.profile)}const Kv="v2",Qv="search.queryChange",Zv="search.queryClose",Xv="search.queryExecute";function Yv(e,t,n){if(jr(cr,un.content),!tw())throw hn;As(er(Kv,"search.registerOnClosedHandler"),Zv,e),As(er(Kv,"search.registerOnExecutedHandler"),Xv,t),n&&As(er(Kv,"search.registerOnChangeHandler"),Qv,n)}function ew(){if(jr(cr,un.content),!tw())throw hn;Ac(er(Kv,"search.unregisterHandlers"),"search.unregister"),Es(Qv),Es(Zv),Es(Xv)}function tw(){return!(!jr(cr)||!cr.supports.search)}function nw(){return new Promise((e=>{if(jr(cr,un.content),!tw())throw new Error("Not supported");e(pc(er(Kv,"search.closeSearch"),"search.closeSearch"))}))}var rw=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 ow="v2";function iw(){return rw(this,void 0,void 0,(function*(){if(jr(cr,un.sidePanel,un.meetingStage),!aw())throw hn;return yield hc(er(ow,"sharing.history.getContent"),"sharing.history.getContent")}))}function aw(){var e;return jr(cr)&&void 0!==(null===(e=cr.supports.sharing)||void 0===e?void 0:e.history)}const sw="v1",cw="v2",uw={shareWebContent:"sharing.shareWebContent"};function lw(e,t){try{fw(e),pw(e),gw(e)}catch(e){return In((()=>Promise.reject(e)),t)}jr(cr,un.content,un.sidePanel,un.task,un.stage,un.meetingStage);return In(dw,t,er(t?sw:cw,"sharing.shareWebContent"),e)}function dw(e,t){return new Promise((n=>{if(!hw())throw hn;n(hc(e,uw.shareWebContent,t))}))}function fw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function pw(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function gw(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function hw(){return!(!jr(cr)||!cr.supports.sharing)}const mw="v2";function vw(){return new Promise((e=>{if(jr(cr,un.content),!ww())throw hn;e(hc(er(mw,"stageView.self.close"),"stageView.self.close"))}))}function ww(){var e;return jr(cr)&&void 0!==(null===(e=cr.supports.stageView)||void 0===e?void 0:e.self)}const Cw="v2";var yw;function Sw(e){return new Promise((t=>{if(jr(cr,un.content),!bw())throw hn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(hc(er(Cw,"stageView.open"),"stageView.open",e))}))}function bw(){return!(!jr(cr)||!cr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(yw||(yw={}));const Aw=10;var Ew=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 Iw="v2";function Pw(e){return Ew(this,void 0,void 0,(function*(){jr(cr,un.content,un.task),Rw(),Fw(e);const t=yield hc(er(Iw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return kw(e.maxVisualMediaCount,t),t}))}function Tw(e){return Ew(this,void 0,void 0,(function*(){jr(cr,un.content,un.task),Rw(),Fw(e);const t=yield hc(er(Iw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return kw(e.maxVisualMediaCount,t),t}))}function Ow(){return!!(jr(cr)&&cr.supports.visualMedia&&cr.supports.visualMedia.image&&cr.supports.permissions)}function Rw(){if(!Ow())throw hn}function Fw(e){if(!e||e.maxVisualMediaCount>Aw||e.maxVisualMediaCount<1)throw wn}function kw(e,t){if(t.length>e)throw Cn}const Mw="v2";var xw,Nw;function Dw(){if(jr(cr,un.content,un.task),!Ow())throw hn;const e=Le.Media;return hc(er(Mw,"visualMedia.hasPermission"),"permissions.has",e)}function Uw(){if(jr(cr,un.content,un.task),!Ow())throw hn;const e=Le.Media;return hc(er(Mw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(xw||(xw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Nw||(Nw={}));var Lw=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Hw=null;function _w(){return Lw(this,void 0,void 0,(function*(){return null===Hw&&(Hw=(yield ko()).app.host.name),Hw}))}var Vw=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 Bw(){return Vw(this,void 0,void 0,(function*(){if(jr(cr),!jw())throw hn;return!(!cr.isLegacyTeams||Jn.hostClientType!==sn.android&&Jn.hostClientType!==sn.ios&&Jn.hostClientType!==sn.ipados&&Jn.hostClientType!==sn.visionOS||(yield Ww())!==cn.teams)||(yield fc(er("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Ww(){return Vw(this,void 0,void 0,(function*(){return _w()}))}function jw(){return jr(cr)&&void 0!==cr.supports.webStorage}const zw="v2";var qw;function $w(e){const t=er(zw,"call.startCall");return new Promise((n=>{var r;if(jr(cr,un.content,un.task),!Gw())throw hn;if(!cr.isLegacyTeams)return Ac(t,"call.startCall",[e],n);n(fc(t,"executeDeepLink",Yg(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(qw.Video),e.source)).then((e=>{if(!e)throw new Error(dt);return e})))}))}function Gw(){return!(!jr(cr)||!cr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(qw||(qw={}));const Jw="v1";function Kw(){Xi(er(Jw,"appInitialization.notifyAppLoaded"))}function Qw(){Ac(er(Jw,"appInitialization.notifySuccess"),Ao.Success,[Ar])}function Zw(e){ea(er(Jw,"appInitialization.notifyFailure"),e)}function Xw(e){Yi(er(Jw,"appInitialization.notifyExpectedFailure"),e)}const Yw=Yn("thirdPartyCloudStorage"),eC="v2";class tC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let nC=[],rC=null,oC=!0,iC=null;function aC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(jr(cr,un.content,un.task),!cC())throw hn;if(iC)throw iC=null,new Error("getDragAndDropFiles cannot be called twice");iC=t,oC=!0,Ac(er(eC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],sC)}else{t([],{errorCode:Ue.INVALID_ARGUMENTS})}}function sC(e){if(iC)if(e&&e.error)iC([],e.error),iC=null;else if(e&&e.fileChunk)try{oC||0!==e.fileChunk.chunkSequence||(Yw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),oC=!0,iC([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}),nC=[],iC=null);const t=Ph(e.fileChunk,e.fileType);if(t?(rC||(rC=new tC(e.fileType,[])),rC.assembleAttachment.push(t)):(Yw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),iC?iC([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}):iC=null,nC=[],iC=null,oC=!0),oC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&rC){const t=Ih(rC.assembleAttachment,rC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});nC.push(n)}e.isLastFile&&iC&&(iC(nC,e.error),nC=[],iC=null,oC=!0),rC=null}}catch(e){iC&&(iC([],{errorCode:Ue.INTERNAL_ERROR,message:e}),nC=[],iC=null,oC=!0)}else iC([],{errorCode:Ue.INTERNAL_ERROR,message:"data received is null"}),nC=[],iC=null,oC=!0}function cC(){return!(!jr(cr)||!cr.supports.thirdPartyCloudStorage)}const uC="v1";function lC(e,t){Zi(er(uC,"initialize"),t).then((()=>{e&&e()}))}function dC(){Mv()}function fC(){xv()}function pC(e){Wr(),Ac(er(uC,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Jn.frameContext),e(t)}))}function gC(e){aa(er(uC,"registerOnThemeChangeHandlerHelper"),e)}function hC(e){Ps(er(uC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function mC(e){Ps(er(uC,"registerAppButtonClickHandler"),"appButtonClick",e,[un.content])}function vC(e){Ps(er(uC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[un.content])}function wC(e){Ps(er(uC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[un.content])}function CC(e){Ta(er(uC,"registerBackButtonHandler"),e)}function yC(e){Dv(er(uC,"registerOnLoadHandler"),e)}function SC(e){Lv(er(uC,"registerBeforeUnloadHandler"),e)}function bC(e){Ps(er(uC,"registerFocusEnterHandler"),"focusEnter",e,[])}function AC(e){Ps(er(uC,"registerChangeSettingsHandler"),"changeSettings",e,[un.content])}function EC(e,t){jr(cr),ns(er(uC,"getTabInstances"),t).then((t=>{e(t)}))}function IC(e,t){jr(cr),rs(er(uC,"getMruTabInstances"),t).then((t=>{e(t)}))}function PC(e){os(er(uC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function TC(e,t){jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();ca(er(uC,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function OC(e){is(er(uC,"setFrameContext"),e)}function RC(e,t,n){Zi(er(uC,"initializeWithFrameContext"),n).then((()=>t&&t())),is(er(uC,"setFrameContext"),e)}const FC="v1";function kC(e){ts(er(FC,"navigation.returnFocus"),e)}function MC(e,t){jr(cr);const n=null!=t?t:yn();es(er(FC,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function xC(e,t){jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();Xa(er(FC,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function NC(e){jr(cr);const t=null!=e?e:yn();Ya(er(FC,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const DC="v1";function UC(e){as(er(DC,"settings.setValidityState"),e)}function LC(e){jr(cr,un.content,un.settings,un.remove,un.sidePanel),ss(er(DC,"settings.getSettings")).then((t=>{e(t)}))}function HC(e,t){jr(cr,un.content,un.settings,un.sidePanel);const n=null!=t?t:yn();cs(er(DC,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function _C(e){Li(er(DC,"settings.registerOnSaveHandler"),e)}function VC(e){_i(er(DC,"settings.registerOnRemoveHandler"),e)}var BC=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 WC="v1";function jC(e,t){const n=er(WC,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(jr(cr,un.content,un.sidePanel,un.meetingStage),Ac(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?oi(n,GC(e),r):ri(n,$C(e),r),new Im}function zC(e){e=JC(e);const{width:t,height:n}=e,r=BC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ni(er(WC,"tasks.updateTask"),e)}function qC(e,t){ii(er(WC,"tasks.submitTask"),e,t)}function $C(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function GC(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function JC(e){return e.height=e.height?e.height:pn.Small,e.width=e.width?e.width:pn.Small,e}const KC="v2";var QC,ZC;function XC(){return!(!jr(cr,un.meetingStage,un.sidePanel,un.content)||!cr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(QC||(QC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(ZC||(ZC={}));class YC{getFluidTenantInfo(){return ey(),new Promise((e=>{e(hc(er(KC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return ey(),new Promise((t=>{t(hc(er(KC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return ey(),new Promise((e=>{e(hc(er(KC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return ey(),new Promise((t=>{t(hc(er(KC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return ey(),new Promise((e=>{e(hc(er(KC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return ey(),new Promise((t=>{t(hc(er(KC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return ey(),new Promise((t=>{t(hc(er(KC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return ey(),new Promise((t=>{t(hc(er(KC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return ey(),new YC}}function ey(){if(!XC())throw new Error("LiveShareHost Not supported")}var ty=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 ny(e){try{return e.cartItems=ry(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function ry(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=ry(e.accessories)),e}))}const oy=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=ty(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=oy(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function iy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)sy(t),ay(t.accessories)}function ay(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");sy(t)}}}function sy(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");uy(e.price),ly(e.quantity)}function cy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}}function uy(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 ly(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function dy(e){if(!Object.values(hy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const fy="v2",py={majorVersion:1,minorVersion:1};var gy,hy;function my(){if(jr(cr,un.content,un.task),!yy())throw hn;return hc(er(fy,"marketplace.getCart"),"marketplace.getCart",py).then(ny)}function vy(e){if(jr(cr,un.content,un.task),!yy())throw hn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return cy(null==e?void 0:e.cartId),iy(null==e?void 0:e.cartItems),hc(er(fy,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:oy(e.cartItems),cartVersion:py})).then(ny)}function wy(e){if(jr(cr,un.content,un.task),!yy())throw hn;if(!e)throw new Error("removeCartItemsParams must be provided");if(cy(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 hc(er(fy,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:py})).then(ny)}function Cy(e){if(jr(cr,un.content,un.task),!yy())throw hn;if(!e)throw new Error("updateCartStatusParams must be provided");return cy(null==e?void 0:e.cartId),dy(null==e?void 0:e.cartStatus),hc(er(fy,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:py})).then(ny)}function yy(){return!(!jr(cr)||!cr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(gy||(gy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(hy||(hy={}));var Sy=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 by{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 Ay(e){return e.toLowerCase().split("+").sort().join("+")}function Ey(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function Iy(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Py(e,t){if(Iy(t)){const n=Ey(t);if(e.has(n))return{matchedShortcut:n,isOverridable:ky.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function Ty(e){My.clear(),e.shortcuts.forEach((e=>{My.add(Ay(e))})),ky.clear(),e.overridableShortcuts.forEach((e=>{ky.add(Ay(e))}))}class Oy extends $i{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function Ry(e){As(er("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function Fy(e){if(e.target.closest(`[${_y}]`))return;const{matchedShortcut:t,isOverridable:n}=Py(My,e);if(!t)return;if(n&&xy){if(xy(e,{matchedShortcut:t}))return}Cc("shortcutRelay.forwardShortcutEvent",[new by(e)],er("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const ky=new Set,My=new Set;let xy,Ny=!1;function Dy(e){if(!Hy())throw hn;const t=xy;return xy=e,t}function Uy(){if(!Hy())throw hn;Ny=!1,My.clear(),ky.clear(),xy=void 0,document.removeEventListener("keydown",Fy,{capture:!0})}function Ly(){return Sy(this,void 0,void 0,(function*(){if(!Hy())throw hn;Ty(yield wc("shortcutRelay.getHostShortcuts",[],new Oy,er("v2","shortcutRelay.getHostShortcuts"))),Ny||document.addEventListener("keydown",Fy,{capture:!0}),Ny=!0,Ry((e=>{Ty(e)}))}))}function Hy(){return!(!jr(cr)||!cr.supports.shortcutRelay)}const _y="data-disable-shortcuts-forwarding"})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map