@microsoft/teams-js 2.36.0 → 2.37.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:()=>Re,AppId:()=>Jr,ChannelType:()=>cn,ChildAppWindow:()=>sm,DialogDimension:()=>sn,EduType:()=>Le,EmailAddress:()=>yp,ErrorCode:()=>ke,FileOpenPreference:()=>Oe,FrameContexts:()=>rn,HostClientType:()=>tn,HostName:()=>nn,LiveShareHost:()=>Dw,NotificationTypes:()=>Vc,ParentAppWindow:()=>cm,SecondaryM365ContentIdName:()=>Fe,TaskModuleDimension:()=>sn,TeamType:()=>on,UUID:()=>Vn,UserSettingTypes:()=>Bc,UserTeamRole:()=>an,ValidatedSafeString:()=>Gr,ViewerActionTypes:()=>_c,activateChildProxyingCommunication:()=>vr,app:()=>i,appEntity:()=>V,appInitialization:()=>Ee,appInstallDialog:()=>K,authentication:()=>J,barCode:()=>Z,calendar:()=>ce,call:()=>Se,chat:()=>X,clipboard:()=>Y,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Gv,executeDeepLink:()=>uw,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCardActionsForDA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ne,getAdaptiveCardSchemaVersion:()=>im,getContext:()=>Kv,getCurrentFeatureFlagsState:()=>yr,getMruTabInstances:()=>sw,getTabInstances:()=>aw,hostEntity:()=>q,initialize:()=>qv,initializeWithFrameContext:()=>dw,liveShare:()=>Pe,location:()=>oe,logs:()=>b,mail:()=>le,marketplace:()=>He,media:()=>Q,meeting:()=>ae,meetingRoom:()=>N,menus:()=>p,messageChannels:()=>x,monetization:()=>se,navigateBack:()=>hw,navigateCrossDomain:()=>mw,navigateToTab:()=>gw,nestedAppAuth:()=>ee,nestedAppAuthBridge:()=>D,notifications:()=>L,openFilePreview:()=>Jc,otherAppStateChange:()=>U,overwriteFeatureFlagsState:()=>Sr,pages:()=>y,people:()=>fe,print:()=>Jv,profile:()=>pe,registerAppButtonClickHandler:()=>Xv,registerAppButtonHoverEnterHandler:()=>Yv,registerAppButtonHoverLeaveHandler:()=>ew,registerBackButtonHandler:()=>tw,registerBeforeUnloadHandler:()=>rw,registerChangeSettingsHandler:()=>iw,registerCustomHandler:()=>qc,registerFocusEnterHandler:()=>ow,registerFullScreenHandler:()=>Zv,registerOnLoadHandler:()=>nw,registerOnThemeChangeHandler:()=>Qv,registerUserSettingsChangeHandler:()=>Gc,remoteCamera:()=>H,returnFocus:()=>pw,search:()=>ge,secondaryBrowser:()=>re,sendCustomEvent:()=>$c,sendCustomMessage:()=>zc,setFeatureFlagsState:()=>br,setFrameContext:()=>lw,settings:()=>Ie,shareDeepLink:()=>cw,sharing:()=>he,stageView:()=>we,store:()=>G,tasks:()=>Te,teams:()=>W,teamsCore:()=>de,thirdPartyCloudStorage:()=>Ae,uploadCustomApp:()=>jc,version:()=>mr,videoEffects:()=>j,videoEffectsEx:()=>z,visualMedia:()=>ye,webStorage:()=>be});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>no,getTelemetryPort:()=>eo,isSupported:()=>to});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>uo,getDataLayerPort:()=>so,isSupported:()=>co});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>lo,registerOnResumeHandler:()=>fo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>vo,FailedReason:()=>ho,Messages:()=>mo,_initialize:()=>bo,_uninitialize:()=>So,getContext:()=>Eo,getFrameContext:()=>Co,initialize:()=>yo,isInitialized:()=>wo,lifecycle:()=>o,notifyAppLoaded:()=>Ao,notifyExpectedFailure:()=>Po,notifyFailure:()=>To,notifySuccess:()=>Io,openLink:()=>Fo,registerHostToAppPerformanceMetricsHandler:()=>Ro,registerOnThemeChangeHandler:()=>Oo});var a={};n.r(a),n.d(a,{isSupported:()=>No,resize:()=>Mo});var s={};n.r(s),n.d(s,{isSupported:()=>Do,open:()=>xo});var c={};n.r(c),n.d(c,{isSupported:()=>Vo,registerOnMessageFromParent:()=>Ho,sendMessageToDialog:()=>Uo,sendMessageToParentFromDialog:()=>Lo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>zo,getDialogInfoFromUrlDialogInfo:()=>jo,isSupported:()=>Wo,open:()=>_o,parentCommunication:()=>c,submit:()=>Bo});var l={};n.r(l),n.d(l,{isSupported:()=>ti,open:()=>ei});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ri,open:()=>ni});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>oi,isSupported:()=>ii,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>si,MenuItem:()=>ui,MenuListType:()=>ci,initialize:()=>mi,isSupported:()=>Si,setNavBarMenu:()=>wi,setUpViews:()=>hi,showActionMenu:()=>yi});var g={};n.r(g),n.d(g,{initialize:()=>Ei,isSupported:()=>Di,registerChangeConfigHandler:()=>ki,registerOnRemoveHandler:()=>Oi,registerOnRemoveHandlerHelper:()=>Ri,registerOnSaveHandler:()=>Ti,registerOnSaveHandlerHelper:()=>Pi,setConfig:()=>Ii,setValidityState:()=>Ai});var m={};n.r(m),n.d(m,{isSupported:()=>la,onClick:()=>sa,onHoverEnter:()=>ca,onHoverLeave:()=>ua});var h={};n.r(h),n.d(h,{_initialize:()=>da,isSupported:()=>ma,navigateBack:()=>fa,registerBackButtonHandler:()=>pa,registerBackButtonHandlerHelper:()=>ga});var v={};n.r(v),n.d(v,{isSupported:()=>wa,navigateTo:()=>ha,navigateToDefaultPage:()=>va});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ca,exitFullscreen:()=>ya,isSupported:()=>ba});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Aa,getTabInstances:()=>Ea,isSupported:()=>Ia,navigateToTab:()=>Sa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ta,ReturnFocusType:()=>Pa,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Ma,initializeWithFrameContext:()=>ka,isSupported:()=>Ua,navigateCrossDomain:()=>Na,navigateToApp:()=>xa,registerFocusEnterHandler:()=>Ra,registerFullScreenHandler:()=>La,returnFocus:()=>Oa,setCurrentFrame:()=>Fa,shareDeepLink:()=>Da,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>Hc,registerGetLogHandler:()=>Uc});var S={};n.r(S),n.d(S,{closeConversation:()=>Zc,getChatMembers:()=>Xc,isSupported:()=>Yc,openConversation:()=>Qc});var E={};n.r(E),n.d(E,{isSupported:()=>ru,sendCustomTelemetryData:()=>ou});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>uu,isSupported:()=>cu});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>gu,ActionExecuteResponseHandler:()=>wu,InvokeErrorCode:()=>vu,InvokeResponseType:()=>hu,OriginalRequestType:()=>mu,SerializableActionExecuteInvokeRequest:()=>fu,authenticateAndResendRequest:()=>Eu,authenticateWithOauth2:()=>Tu,authenticateWithPowerPlatformConnectorPlugins:()=>Pu,authenticateWithSSO:()=>Au,authenticateWithSSOAndResendRequest:()=>Iu,isActionExecuteResponse:()=>pu,isInvokeError:()=>Cu,isSupported:()=>Ou,validateActionExecuteInvokeRequest:()=>bu});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Nu,authenticateWithOauth:()=>Mu,authenticateWithSSO:()=>ku,authenticateWithSSOAndResendRequest:()=>xu,isSupported:()=>Du,validateInput:()=>Lu});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Vu,ActionOpenUrlType:()=>Hu,isSupported:()=>Wu,processActionOpenUrl:()=>Bu,processActionSubmit:()=>_u});var R={};n.r(R),n.d(R,{isSupported:()=>Gu,processActionOpenUrl:()=>$u,processActionSubmit:()=>qu});var F={};n.r(F),n.d(F,{SerializableActionOpenUrlDialogInfo:()=>tl,isSupported:()=>Yu,processActionOpenUrlDialog:()=>Xu});var k={};n.r(k),n.d(k,{isSupported:()=>il,processActionCommand:()=>ol});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>sl,CloudStorageProviderFileAction:()=>fl,CloudStorageProviderType:()=>cl,DocumentLibraryAccessType:()=>ll,FileDownloadStatus:()=>dl,SpecialDocumentLibraryType:()=>ul,addCloudStorageFolder:()=>gl,addCloudStorageProvider:()=>Sl,addCloudStorageProviderFile:()=>Al,copyMoveFiles:()=>Cl,deleteCloudStorageFolder:()=>ml,deleteCloudStorageProviderFile:()=>Tl,downloadCloudStorageProviderFile:()=>Pl,getCloudStorageFolderContents:()=>hl,getCloudStorageFolders:()=>pl,getExternalProviders:()=>wl,getFileDownloads:()=>yl,openCloudStorageFile:()=>vl,openDownloadFolder:()=>bl,registerCloudStorageProviderContentChangeHandler:()=>Fl,registerCloudStorageProviderListChangeHandler:()=>Rl,removeCloudStorageProvider:()=>El,renameCloudStorageProviderFile:()=>Il,uploadCloudStorageProviderFile:()=>Ol});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>Nl,isSupported:()=>Ul,registerMeetingRoomCapabilitiesUpdateHandler:()=>Dl,registerMeetingRoomStatesUpdateHandler:()=>Ll,sendCommandToPairedMeetingRoom:()=>xl});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>Hl,telemetry:()=>e});var D={};n.r(D),n.d(D,{initialize:()=>jl,version:()=>Vl});var L={};n.r(L),n.d(L,{isSupported:()=>Xl,showNotification:()=>Zl});var U={};n.r(U),n.d(U,{isSupported:()=>rd,notifyInstallCompleted:()=>nd,registerAppInstallationHandler:()=>ed,unregisterAppInstallationHandler:()=>td});var H={};n.r(H),n.d(H,{ControlCommand:()=>id,ErrorReason:()=>ad,SessionTerminatedReason:()=>sd,getCapableParticipants:()=>cd,isSupported:()=>hd,registerOnCapableParticipantsChangeHandler:()=>fd,registerOnDeviceStateChangeHandler:()=>gd,registerOnErrorHandler:()=>pd,registerOnSessionStatusChangeHandler:()=>md,requestControl:()=>ud,sendControlCommand:()=>ld,terminateSession:()=>dd});var V={};n.r(V),n.d(V,{isSupported:()=>Cd,selectAppEntity:()=>wd});var _={};n.r(_),n.d(_,{getUserJoinedTeams:()=>bd,isSupported:()=>Sd});var B={};n.r(B),n.d(B,{getConfigSetting:()=>Ad,isSupported:()=>Id,joinedTeams:()=>_});var W={};n.r(W),n.d(W,{ChannelType:()=>Pd,fullTrust:()=>B,getTeamChannels:()=>Od,isSupported:()=>Fd,refreshSiteUrl:()=>Rd});var j={};n.r(j),n.d(j,{EffectChangeType:()=>_d,EffectFailureReason:()=>Bd,VideoFrameFormat:()=>Vd,isSupported:()=>Gd,notifySelectedVideoEffectChanged:()=>jd,registerForVideoEffect:()=>zd,registerForVideoFrame:()=>Wd});var z={};n.r(z),n.d(z,{ErrorLevel:()=>wf,frameProcessingTimeoutInMs:()=>hf,isSupported:()=>Tf,notifyFatalError:()=>Rf,notifySelectedVideoEffectChanged:()=>Ef,registerForVideoEffect:()=>Af,registerForVideoFrame:()=>Cf,updatePersonalizedEffects:()=>If});var $={};n.r($),n.d($,{addAndConfigure:()=>Uf,getAll:()=>Hf,isSupported:()=>Wf,reconfigure:()=>Vf,remove:()=>Bf,rename:()=>_f});var q={};n.r(q),n.d(q,{AppTypes:()=>$f,isSupported:()=>qf,tab:()=>$});var G={};n.r(G),n.d(G,{isSupported:()=>np,openAppDetail:()=>Yf,openFullStore:()=>Xf,openInContextStore:()=>ep,openSpecificStore:()=>tp});var J={};n.r(J),n.d(J,{DataResidency:()=>wp,authenticate:()=>lp,getAuthToken:()=>fp,getUser:()=>gp,notifyFailure:()=>vp,notifySuccess:()=>hp,registerAuthenticationHandlers:()=>up});var K={};n.r(K),n.d(K,{isSupported:()=>Bp,openAppInstallDialog:()=>_p});var Q={};n.r(Q),n.d(Q,{CameraStartMode:()=>qp,File:()=>Zp,FileFormat:()=>zp,ImageOutputFormats:()=>Qp,ImageUriType:()=>Kp,Media:()=>ng,MediaControllerEvent:()=>$p,MediaType:()=>Jp,Source:()=>Gp,VideoController:()=>og,captureImage:()=>Xp,hasPermission:()=>Yp,requestPermission:()=>eg,scanBarCode:()=>sg,selectMedia:()=>ig,viewImages:()=>ag});var Z={};n.r(Z),n.d(Z,{hasPermission:()=>Sg,isSupported:()=>Ag,requestPermission:()=>Eg,scanBarCode:()=>bg});var X={};n.r(X),n.d(X,{isSupported:()=>Rg,openChat:()=>Tg,openGroupChat:()=>Og});var Y={};n.r(Y),n.d(Y,{isSupported:()=>xg,read:()=>Ng,write:()=>Mg});var ee={};n.r(ee),n.d(ee,{addNAATrustedOrigins:()=>$g,canParentManageNAATrustedOrigins:()=>Bg,deleteNAATrustedOrigins:()=>qg,getParentOrigin:()=>_g,isDeeplyNestedAuthSupported:()=>Wg,isNAAChannelRecommended:()=>Vg});var te={};n.r(te),n.d(te,{chooseLocation:()=>Zg,isSupported:()=>Yg,showLocation:()=>Xg});var ne={};n.r(ne),n.d(ne,{getCurrentLocation:()=>tm,hasPermission:()=>nm,isSupported:()=>om,map:()=>te,requestPermission:()=>rm});var re={};n.r(re),n.d(re,{isSupported:()=>dm,open:()=>lm});var oe={};n.r(oe),n.d(oe,{getLocation:()=>pm,isSupported:()=>mm,showLocation:()=>gm});var ie={};n.r(ie),n.d(ie,{setOptions:()=>vm});var ae={};n.r(ae),n.d(ae,{CallType:()=>Em,EventActionSource:()=>Im,MeetingReactionType:()=>bm,MeetingType:()=>Sm,SharingProtocol:()=>Am,appShareButton:()=>ie,getAppContentStageSharingCapabilities:()=>Lm,getAppContentStageSharingState:()=>Hm,getAuthenticationTokenForAnonymousUser:()=>Fm,getIncomingClientAudioState:()=>Tm,getLiveStreamState:()=>km,getMeetingDetails:()=>Om,getMeetingDetailsVerbose:()=>Rm,joinMeeting:()=>Wm,registerLiveStreamChangedHandler:()=>xm,registerMeetingReactionReceivedHandler:()=>Bm,registerRaiseHandStateChangedHandler:()=>_m,registerSpeakingStateChangeHandler:()=>Vm,requestAppAudioHandling:()=>jm,requestStartLiveStreaming:()=>Mm,requestStopLiveStreaming:()=>Nm,shareAppContentToStage:()=>Dm,stopSharingAppContentToStage:()=>Um,toggleIncomingClientAudio:()=>Pm,updateMicState:()=>qm});var se={};n.r(se),n.d(se,{isSupported:()=>Zm,openPurchaseExperience:()=>Qm});var ce={};n.r(ce),n.d(ce,{composeMeeting:()=>eh,isSupported:()=>th,openCalendarItem:()=>Ym});var ue={};n.r(ue),n.d(ue,{composeMailWithHandoff:()=>ih,isSupported:()=>ah});var le={};n.r(le),n.d(le,{ComposeMailType:()=>fh,composeMail:()=>lh,handoff:()=>ue,isSupported:()=>dh,openMailItem:()=>uh});var de={};n.r(de),n.d(de,{enablePrintCapability:()=>gh,isSupported:()=>yh,print:()=>mh,registerBeforeUnloadHandler:()=>wh,registerBeforeUnloadHandlerHelper:()=>Ch,registerOnLoadHandler:()=>hh,registerOnLoadHandlerHelper:()=>vh});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Ih,selectPeople:()=>Eh});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Fh,showProfile:()=>Rh});var ge={};n.r(ge),n.d(ge,{closeSearch:()=>Hh,isSupported:()=>Uh,registerHandlers:()=>Dh,unregisterHandlers:()=>Lh});var me={};n.r(me),n.d(me,{getContent:()=>Bh,isSupported:()=>Wh});var he={};n.r(he),n.d(he,{SharingAPIMessages:()=>$h,history:()=>me,isSupported:()=>Zh,shareWebContent:()=>qh});var ve={};n.r(ve),n.d(ve,{close:()=>Yh,isSupported:()=>ev});var we={};n.r(we),n.d(we,{StageViewOpenMode:()=>nv,isSupported:()=>ov,open:()=>rv,self:()=>ve});var Ce={};n.r(Ce),n.d(Ce,{captureImages:()=>cv,isSupported:()=>lv,retrieveImages:()=>uv});var ye={};n.r(ye),n.d(ye,{CameraRestriction:()=>mv,Source:()=>hv,hasPermission:()=>vv,image:()=>Ce,requestPermission:()=>wv});var be={};n.r(be),n.d(be,{isSupported:()=>Iv,isWebStorageClearedOnUserLogOut:()=>Ev});var Se={};n.r(Se),n.d(Se,{CallModalities:()=>Pv,isSupported:()=>Rv,startCall:()=>Ov});var Ee={};n.r(Ee),n.d(Ee,{ExpectedFailureReason:()=>vo,FailedReason:()=>ho,Messages:()=>mo,notifyAppLoaded:()=>kv,notifyExpectedFailure:()=>xv,notifyFailure:()=>Nv,notifySuccess:()=>Mv});var Ae={};n.r(Ae),n.d(Ae,{getDragAndDropFiles:()=>Wv,isSupported:()=>zv});var Ie={};n.r(Ie),n.d(Ie,{getSettings:()=>Cw,registerOnRemoveHandler:()=>Sw,registerOnSaveHandler:()=>bw,setSettings:()=>yw,setValidityState:()=>ww});var Te={};n.r(Te),n.d(Te,{getDefaultSizeIfNotProvided:()=>Fw,startTask:()=>Iw,submitTask:()=>Pw,updateTask:()=>Tw});var Pe={};n.r(Pe),n.d(Pe,{ContainerState:()=>Nw,LiveShareHost:()=>Dw,UserMeetingRole:()=>Mw,isSupported:()=>xw});var Oe,Re,Fe,ke,Me,Ne,xe,De,Le,Ue,He={};function Ve(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(He),n.d(He,{CartStatus:()=>Zw,Intent:()=>Qw,addOrUpdateCartItems:()=>Yw,cartVersion:()=>Kw,getCart:()=>Xw,isSupported:()=>nC,removeCartItems:()=>eC,updateCartStatus:()=>tC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Oe||(Oe={})),function(e){e.M365Content="m365content"}(Re||(Re={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Fe||(Fe={})),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"}(ke||(ke={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Me||(Me={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ne||(Ne={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(xe||(xe={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(De||(De={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Le||(Le={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ue||(Ue={}));const _e=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const Be="2.0.1",We="2.0.2",je="2.0.3",ze="2.0.4",$e="2.0.1",qe="1.9.0",Ge="2.0.0",Je="1.7.0",Ke="1.8.0",Qe="1.9.0",Ze=n.t(_e,2).validOrigins,Xe=1500,Ye=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),et=/^https:\/\//,tt="https",nt="teams.microsoft.com",rt="The library has not yet been initialized",ot="The runtime has not yet been initialized",it="The runtime version is not supported",at="The call was not properly started";var st=n(933);const ct=lt,ut=2147483647;function lt(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 ft(e)}return dt(e,t,n)}function dt(e,t,n){if("string"==typeof e)return ht(e,t);if(ArrayBuffer.isView(e))return Et(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(wt(e,ArrayBuffer)||e&&wt(e.buffer,ArrayBuffer))return At(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(wt(e,SharedArrayBuffer)||e&&wt(e.buffer,SharedArrayBuffer)))return At(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 lt.from(r,t,n);const o=$t(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return lt.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 ft(e){return pt(e),gt(e<0?0:0|mt(e))}function pt(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 gt(e){if(e>ut)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,lt.prototype),t}function mt(e){if(e>=ut)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ut.toString(16)+" bytes");return 0|e}function ht(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!lt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|vt(e,t);let r=gt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function vt(e,t){if(lt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wt(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 Ct(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return yt(e).length;default:if(o)return r?-1:Ct(e).length;t=(""+t).toLowerCase(),o=!0}}function wt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ct(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 yt(e){return st.toByteArray(St(e))}lt.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}}(),lt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),lt.from=function(e,t,n){return dt(e,t,n)},Object.setPrototypeOf(lt.prototype,Uint8Array.prototype),Object.setPrototypeOf(lt,Uint8Array),lt.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}},lt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==lt.prototype};const bt=/[^+/0-9A-Za-z-_]/g;function St(e){if((e=(e=e.split("=")[0]).trim().replace(bt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Et(e){if(wt(e,Uint8Array)){const t=new Uint8Array(e);return At(t.buffer,t.byteOffset,t.byteLength)}return It(e)}function At(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,lt.prototype),r}function It(e){const t=e.length<0?0:0|mt(e.length),n=gt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Tt(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 Rt(r)}function Pt(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 Ft(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return kt(this,t,n);case"latin1":case"binary":return Mt(this,t,n);case"base64":return Nt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}lt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Tt(this,0,e):Pt.apply(this,arguments)};const Ot=4096;function Rt(e){const t=e.length;if(t<=Ot)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ot));return n}function Ft(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+=zt[e[r]];return o}function kt(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 Mt(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 Nt(e,t,n){return 0===t&&n===e.length?st.fromByteArray(e):st.fromByteArray(e.slice(t,n))}function xt(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 Dt(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 Lt(e,t,n,r){return Wt(Ct(t,e.length-n),e,n,r)}function Ut(e,t,n,r){return Wt(_t(t),e,n,r)}function Ht(e,t,n,r){return Wt(yt(t),e,n,r)}function Vt(e,t,n,r){return Wt(Bt(t,e.length-n),e,n,r)}function _t(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Bt(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 Wt(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}lt.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 Dt(this,e,t,n);case"utf8":case"utf-8":return Lt(this,e,t,n);case"ascii":case"latin1":case"binary":return Ut(this,e,t,n);case"base64":return Ht(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const zt=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 $t(e){if(lt.isBuffer(e)){const t=0|mt(e.length),n=gt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||jt(e.length)?gt(0):It(e):"Buffer"===e.type&&Array.isArray(e.data)?It(e.data):void 0}const qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Jt=new Uint8Array(16);function Kt(){if(!Gt&&(Gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gt(Jt)}const Qt=[];for(let e=0;e<256;++e)Qt.push((e+256).toString(16).slice(1));function Zt(e,t=0){return Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]}const Xt=function(e,t,n){if(qt.randomUUID&&!t&&!e)return qt.randomUUID();const r=(e=e||{}).random||(e.rng||Kt)();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 Zt(r)},Yt=/^(?:[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 en=function(e){return"string"==typeof e&&Yt.test(e)};var tn,nn,rn,on,an,sn,cn;!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"}(tn||(tn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(nn||(nn={})),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"}(rn||(rn={})),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"}(on||(on={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(an||(an={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(sn||(sn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(cn||(cn={}));const un={errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},ln={majorVersion:1,minorVersion:5},dn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},fn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),pn=new Error("Invalid response: Received more images than the specified max limit in the response.");function gn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function mn(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 hn(){return Xt()}function vn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&vn(e[t])})),Object.freeze(e)}function wn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Cn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function yn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function bn(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 Sn(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 En(e){return!(mn(`${e.majorVersion}.${e.minorVersion}`,`${ln.majorVersion}.${ln.minorVersion}`)>=0)}function An(e){return"https:"===e.protocol}function In(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=ct.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Tn(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 Pn(){if(On())throw new Error("window object undefined at SSR check");return window}function On(){return"undefined"==typeof window}function Rn(e,t){if(Mn(e)||!Nn(e)||!xn(e))throw t||new Error("id is not valid.")}function Fn(e,t){const n=e.toString().toLocaleLowerCase();if(Mn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!An(e))throw t||new Error("Url should be a valid https url")}function kn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Mn(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 Nn(e){return e.length<256&&e.length>4}function xn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Dn(e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}const Ln=!!performance&&"now"in performance;function Un(){return Ln?performance.now()+performance.timeOrigin:void 0}function Hn(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=>Hn(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=>Hn(e[n],t+1)))}class Vn{constructor(e=hn()){this.uuid=e,Dn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function _n(e){if(!(e instanceof Vn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Bn{}Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.additionalValidOrigins=[],Bn.initializePromise=void 0,Bn.isFramelessWindow=!1,Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.printCapabilityEnabled=!1,Bn.teamsJsInstanceId=(new Vn).toString();var Wn=n(815);const jn=new Vn,zn=Wn.debug.formatArgs;Wn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${jn.toString()}]`,zn.call(this,e)};const $n=(0,Wn.debug)("teamsJs");function qn(e){return $n.extend(e)}function Gn(e,t){return`${e}_${t}`}function Jn(e){return/^v\d+_[\w.]+$/.test(e)}var Kn=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 Qn=qn("runtime"),Zn=4;function Xn(e){return e.apiVersion===Zn}const Yn={apiVersion:-1,supports:{}};function er(e){if(Xn(e))return!0;throw-1===e.apiVersion?new Error(ot):new Error(it)}let tr=Yn;const nr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:dn,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:{}}}},rr=[tn.desktop,tn.web,tn.rigel,tn.surfaceHub,tn.teamsRoomsWindows,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays],or=[tn.android,tn.ios,tn.ipados,tn.visionOS],ir=[...rr,...or];function ar(e){let t=e;if(t.apiVersion<Zn&&sr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Xn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const sr=[{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=Kn(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})}}}],cr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:rr}],"1.9.0":[{capability:{location:{}},hostClientTypes:ir}],"2.0.0":[{capability:{people:{}},hostClientTypes:ir},{capability:{sharing:{}},hostClientTypes:[tn.desktop,tn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[tn.android,tn.desktop,tn.ios,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays,tn.web]},{capability:{webStorage:{}},hostClientTypes:[tn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[tn.android,tn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[tn.android,tn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[tn.android,tn.ios,tn.ipados,tn.visionOS]}]},ur=Qn.extend("generateBackCompatRuntimeConfig");function lr(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]=lr(e[r]||{},t[r]));return n}function dr(e,t,n){ur("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ur("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{mn(e,t)>=0&&n[t].forEach((e=>{void 0!==Bn.hostClientType&&e.hostClientTypes.includes(Bn.hostClientType)&&(r=lr(r,e.capability))}))}));const o={apiVersion:Zn,hostVersionsInfo:dn,isLegacyTeams:!0,supports:r};return ur("Runtime config after updating based on highestSupportedVersion: %o",o),o}const fr=Qn.extend("applyRuntimeConfig");function pr(e){"string"==typeof e.apiVersion&&(fr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),fr("Fast-forwarding runtime %o",e);const t=ar(e);fr("Applying runtime %o",t),tr=vn(t)}function gr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const mr="2.36.0",hr={childProxyingCommunication:!1};function vr(){hr.childProxyingCommunication=!0}function wr(){return hr.childProxyingCommunication}let Cr={disableEnforceOriginMatchForChildResponses:!1};function yr(){return Cr}function br(e){Cr=e}function Sr(e){return br(Object.assign(Object.assign({},Cr),e)),yr()}var Er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Ar=e=>{const{uuid:t}=e,n=Er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ir=e=>{const{uuidAsString:t}=e,n=Er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},Tr=e=>{const{uuidAsString:t}=e,n=Er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},Pr=e=>{const{uuid:t}=e,n=Er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Or(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 Rr=qn("flushMessageQueue");function Fr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Ar(o);Rr("Flushing message %s from %s message queue via postMessage.",Or(n),r),e.postMessage(n,t)}}}const kr=qn("internal"),Mr=kr.extend("ensureInitializeCalled"),Nr=kr.extend("ensureInitialized");function xr(){if(!Bn.initializeCalled)throw Mr(rt),new Error(rt)}function Dr(e,...t){if(!Bn.initializeCompleted)throw Nr("%s. initializeCalled: %s",rt,Bn.initializeCalled.toString()),new Error(rt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Bn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Bn.frameContext}".`)}return er(e)}function Lr(e=Be){const t=mn(Bn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Ur(){return Bn.hostClientType==tn.android||Bn.hostClientType==tn.ios||Bn.hostClientType==tn.ipados||Bn.hostClientType==tn.visionOS}function Hr(e=Be){if(!Ur()){throw{errorCode:ke.NOT_SUPPORTED_ON_PLATFORM}}if(!Lr(e)){throw{errorCode:ke.OLD_PLATFORM}}}function Vr(e){let t=Bn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&et.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Bn.additionalValidOrigins=t}function _r(e){if(!zr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Wr}-${jr}).`)}function Br(e){if(Mn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if($r(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Wr=4,jr=256;function zr(e){return e.length<jr&&e.length>Wr}function $r(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function qr(e){if(!(e instanceof Jr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Gr{constructor(e){this.idAsString=e,Br(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Jr extends Gr{constructor(e){super(e),_r(e)}toJSON(){return{appIdAsString:this.toString()}}}function Kr(e){return null==e}var Qr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Zr;const Xr="v1",Yr=qn("messageChannels.telemetry");function eo(){return Qr(this,void 0,void 0,(function*(){if(Zr)return Yr("Returning telemetry port from cache"),Zr;if(!to())throw un;return Zr=yield ac(Gn(Xr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Zr}))}function to(){var e;return!(!Dr(tr)||!(null===(e=tr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function no(){Zr=void 0}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=qn("messageChannels.dataLayer");function so(){return ro(this,void 0,void 0,(function*(){if(oo)return ao("Returning dataLayer port from cache"),oo;if(!co())throw un;return oo=yield ac(Gn(io,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),oo}))}function co(){var e;return!(!Dr(tr)||!(null===(e=tr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function uo(){oo=void 0}function lo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Dr(tr),Es(e)}function fo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Dr(tr),As(e)}const po="v2",go=qn("app"),mo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ho,vo;function wo(){return Bn.initializeCompleted}function Co(){return Bn.frameContext}function yo(e){return Bi(Gn(po,"app.initialize"),e)}function bo(e){Js.currentWindow=e}function So(){Bn.initializeCalled&&(ss(),Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.initializePromise=void 0,Bn.additionalValidOrigins=[],Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.isFramelessWindow=!1,no(),uo(),Zs())}function Eo(){return new Promise((e=>{xr(),e(Xs(Gn(po,"app.getContext"),"getContext"))})).then((e=>ko(e)))}function Ao(){xr(),Wi(Gn(po,"app.notifyAppLoaded"))}function Io(){return $i(Gn(po,"app.notifySuccess"))}function To(e){xr(),zi(Gn(po,"app.notifyFailure"),e)}function Po(e){xr(),ji(Gn(po,"app.notifyExpectedFailure"),e)}function Oo(e){Qi(Gn(po,"app.registerOnThemeChangeHandler"),e)}function Ro(e){hs(e)}function Fo(e){return Zi(Gn(po,"app.openLink"),e)}function ko(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:nn.teams,clientType:e.hostClientType?e.hostClientType:tn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Jr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Bn.frameContext,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 Mo(e){qo(Gn($o,"dialog.update.resize"),e)}function No(){return!(!Dr(tr)||!tr.supports.dialog)&&!!tr.supports.dialog.update}function xo(e,t,n){Jo(Gn($o,"dialog.url.bot.open"),e,t,n)}function Do(){return Dr(tr)&&void 0!==(tr.supports.dialog&&tr.supports.dialog.url&&tr.supports.dialog.url.bot)}function Lo(e){if(Dr(tr,rn.task),!Vo())throw un;uc(Gn($o,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Uo(e){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Vo())throw un;uc(Gn($o,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Ho(e){if(Dr(tr,rn.task),!Vo())throw un;for(ds("messageForChild"),ls(Gn($o,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Xo.reverse();Xo.length>0;){e(Xo.pop())}}function Vo(){var e,t;return Dr(tr)&&!!(null===(t=null===(e=tr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function _o(e,t,n){Go(Gn($o,"dialog.url.open"),e,t,n)}function Bo(e,t){Ko(Gn($o,"dialog.url.submit"),e,t)}function Wo(){return Dr(tr)&&void 0!==(tr.supports.dialog&&tr.supports.dialog.url)}function jo(e){return{url:e.url,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function zo(e){const t=jo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ho||(ho={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(vo||(vo={})),go("teamsjs instance is version %s, starting at %s UTC (%s local)",mr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(On())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?go("teamsjs is being used from %s. %s",t,n):go("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const $o="v2";function qo(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.task,rn.meetingStage),!No())throw un;uc(e,"tasks.updateTask",[t])}function Go(e,t,n,r){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Wo())throw un;r&&ls(Gn($o,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);uc(e,"tasks.startTask",[jo(t)],((e,t)=>{null==n||n({err:e,result:t}),ds("messageForParent")}))}function Jo(e,t,n,r){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Do())throw un;r&&ls(Gn($o,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);uc(e,"tasks.startTask",[zo(t)],((e,t)=>{null==n||n({err:e,result:t}),ds("messageForParent")}))}function Ko(e,t,n){if(Dr(tr,rn.task),!Wo())throw un;uc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Qo(e){return{card:e.card,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title}}function Zo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}const Xo=[];function Yo(e){Bn.frameContext&&(Bn.frameContext===rn.task?Xo.push(e):ds("messageForChild"))}function ei(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!ti())throw un;const n=Zo(e);uc(Gn($o,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ti(){const e=tr.hostVersionsInfo&&tr.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(tr.hostVersionsInfo.adaptiveCardSchemaVersion);return Dr(tr)&&void 0!==(e&&tr.supports.dialog&&tr.supports.dialog.card&&tr.supports.dialog.card.bot)}function ni(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!ri())throw un;const n=Qo(e);uc(Gn($o,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ri(){const e=tr.hostVersionsInfo&&tr.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(tr.hostVersionsInfo.adaptiveCardSchemaVersion);return Dr(tr)&&void 0!==(e&&tr.supports.dialog&&tr.supports.dialog.card)}function oi(){ls(Gn($o,"dialog.registerMessageForChildHandler"),"messageForChild",Yo,!1)}function ii(){return!(!Dr(tr)||!tr.supports.dialog)}const ai="v2";var si,ci;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(si||(si={}));class ui{constructor(){this.enabled=!0,this.selected=!1}}let li,di,fi,pi,gi;function mi(){ls(Gn(ai,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ci,!1),ls(Gn(ai,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",bi,!1),ls(Gn(ai,"menus.registerSetModuleViewHandler"),"setModuleView",vi,!1)}function hi(e,t){if(Dr(tr),!Si())throw un;fi=t,uc(Gn(ai,"menus.setUpViews"),"setUpViews",[e])}function vi(e){fi&&fi(e)||(Dr(tr),uc(Gn(ai,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function wi(e,t){if(Dr(tr),!Si())throw un;li=t,uc(Gn(ai,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ci(e){li&&li(e)||(Dr(tr),uc(Gn(ai,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function yi(e,t){if(Dr(tr),!Si())throw un;di=t,uc(Gn(ai,"menus.showActionMenu"),"showActionMenu",[e])}function bi(e){di&&di(e)||(Dr(tr),uc(Gn(ai,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Si(){return!(!Dr(tr)||!tr.supports.menus)}function Ei(){ls(Gn(Ha,"pages.config.registerSettingsSaveHandler"),"settings.save",Fi,!1),ls(Gn(Ha,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Ni,!1)}function Ai(e){return Ga(Gn(Ha,"pages.config.setValidityState"),e)}function Ii(e){return Ka(Gn(Ha,"pages.config.setConfig"),e)}function Ti(e){Pi(Gn(Ha,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Kr(e)&&!Di())throw un}))}function Pi(e,t,n){!Kr(t)&&Dr(tr,rn.settings),n&&n(),pi=t,!Kr(t)&&uc(e,"registerHandler",["save"])}function Oi(e){Ri(Gn(Ha,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Kr(e)&&!Di())throw un}))}function Ri(e,t,n){!Kr(t)&&Dr(tr,rn.remove,rn.settings),n&&n(),gi=t,!Kr(t)&&uc(e,"registerHandler",["remove"])}function Fi(e){const t=new Mi(e);pi?pi(t):Rs()?Ls("settings.save",[e]):t.notifySuccess()}function ki(e){ps(Gn(Ha,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[rn.content],(()=>{if(!Di())throw un}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(ci||(ci={}));class Mi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),uc(Gn(Ha,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),uc(Gn(Ha,"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 Ni(){const e=new xi;gi?gi(e):Rs()?Ls("settings.remove",[]):e.notifySuccess()}class xi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),uc(Gn(Ha,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),uc(Gn(Ha,"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 Di(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.config}class Li{}class Ui extends Li{validate(e){return!0}deserialize(e){return e}}var Hi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Vi=6e4,_i=qn("app");function Bi(e,t){if(On()){return _i.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return bn((()=>Ki(e,t)),Vi,new Error("SDK initialization timed out."))}function Wi(e){uc(e,mo.AppLoaded,[mr])}function ji(e,t){uc(e,mo.ExpectedFailure,[t.reason,t.message])}function zi(e,t){uc(e,mo.Failure,[t.reason,t.message])}function $i(e){return Hi(this,void 0,void 0,(function*(){if(Bn.initializeCompleted)return Gi(e);if(!Bn.initializePromise)throw new Error(rt);return Bn.initializePromise.then((()=>Gi(e)))}))}function qi(){var e;return Dr(tr)&&!!(null===(e=tr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Gi(e){return Hi(this,void 0,void 0,(function*(){return qi()?oc(mo.Success,[mr],new Ui,e).then((()=>({hasFinishedSuccessfully:!0}))):(uc(e,mo.Success,[mr]),{hasFinishedSuccessfully:"unknown"})}))}const Ji=_i.extend("initializeHelper");function Ki(e,t){return new Promise((n=>{Bn.initializeCalled||(Bn.initializeCalled=!0,as(),Bn.initializePromise=Qs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Be})=>{Bn.frameContext=e,Bn.hostClientType=t,Bn.clientSupportedSDKVersion=r;try{Ji("Parsing %s",n);const e=JSON.parse(n);if(Ji("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&pr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Ji("Attempting to parse %s as an SDK version",n),isNaN(mn(n,Be))||(Bn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Ji("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");pr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;pr(dr(Bn.clientSupportedSDKVersion,nr,cr))}}Bn.initializeCompleted=!0})),mi(),Ei(),oi()),Array.isArray(t)&&Vr(t),void 0!==Bn.initializePromise?n(Bn.initializePromise):Ji("GlobalVars.initializePromise is unexpectedly undefined")}))}function Qi(e,t){!Kr(t)&&xr(),gs(e,t)}function Zi(e,t){return new Promise((n=>{Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),n(Ys(e,"executeDeepLink",t))}))}var Xi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Yi=[];const ea=qn("validateOrigin");function ta(){return Xi(this,void 0,void 0,(function*(){yield ra()}))}function na(){return 0===Yi.length}function ra(e=!1){return Xi(this,void 0,void 0,(function*(){if(!na()&&!e)return Yi;if(On())return Yi=Ze,Ze;{ea("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Xe);return fetch(Ye,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ea("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(oa(JSON.stringify(e)))return Yi=e.validOrigins,Yi;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ea(`validOrigins fetch call to CDN failed due to Timeout of ${Xe} ms. Defaulting to fallback list`):ea("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Yi=Ze,Yi)))}}))}function oa(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 ea("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ia(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 aa(e,t){return ra(t).then((t=>{if(!An(e))return ea("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=>ia(e,n))))return!0;for(const e of Bn.additionalValidOrigins){if(ia("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ea("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,Bn.additionalValidOrigins),!1}))}function sa(e){ps(Gn(Ha,"pages.appButton.onClick"),"appButtonClick",e,[rn.content],(()=>{if(!la())throw un}))}function ca(e){ps(Gn(Ha,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[rn.content],(()=>{if(!la())throw un}))}function ua(e){ps(Gn(Ha,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[rn.content],(()=>{if(!la())throw un}))}function la(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.appButton}function da(){ts()}function fa(){return _a(Gn(Ha,"pages.backStack.navigateBack"))}function pa(e){ga(Gn(Ha,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Kr(e)&&!ma())throw un}))}function ga(e,t,n){!Kr(t)&&Dr(tr),n&&n(),es(t),!Kr(t)&&uc(e,"registerHandler",["backButton"])}function ma(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.backStack}function ha(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!wa())throw un;t(tc(Gn(Ha,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function va(){return new Promise((e=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!wa())throw un;e(tc(Gn(Ha,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function wa(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.currentApp}function Ca(){if(Dr(tr,rn.content),!ba())throw un;uc(Gn(Ha,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ya(){if(Dr(tr,rn.content),!ba())throw un;uc(Gn(Ha,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ba(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.fullTrust}function Sa(e){return Ba(Gn(Ha,"pages.tabs.navigateToTab"),e)}function Ea(e){return ja(Gn(Ha,"pages.tabs.getTabInstances"),e)}function Aa(e){return za(Gn(Ha,"pages.tabs.getMruTabInstances"),e)}function Ia(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.tabs}var Ta,Pa;function Oa(e){const t=Gn(Ha,"pages.returnFocus");if(Dr(tr),!Ua())throw un;if(void 0===e&&uc(t,"returnFocus",[!1]),"boolean"==typeof e)uc(t,"returnFocus",[e]);else switch(e){case Pa.PreviousLandmark:case Pa.GoToActivityFeed:uc(t,"returnFocus",[!1,e]);break;case Pa.NextLandmark:uc(t,"returnFocus",[!0,e])}}function Ra(e){ps(Gn(Ha,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ua())throw un}))}function Fa(e){qa(Gn(Ha,"pages.setCurrentFrame"),e)}function ka(e,t,n){ta(),Bi(Gn(Ha,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Fa(e)}function Ma(){return Ja(Gn(Ha,"pages.getConfig."))}function Na(e){return Va(Gn(Ha,"pages.navigateCrossDomain"),e)}function xa(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Ua())throw un;const n=Gn(Ha,"pages.navigateToApp");if(tr.isLegacyTeams){t(Ys(n,"executeDeepLink",Sn(Qa(e)?e:Za(e))))}else{t(Ys(n,"pages.navigateToApp",Qa(e)?Xa(e):e))}}))}function Da(e){return $a(Gn(Ha,"pages.shareDeepLink"),e)}function La(e){ps(Gn(Ha,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Kr(e)&&!Ua())throw un}))}function Ua(){return!(!Dr(tr)||!tr.supports.pages)}ta(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ta||(Ta={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Pa||(Pa={}));const Ha="v2";function Va(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage),!Ua())throw un;n(ec(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function _a(e){return new Promise((t=>{if(Dr(tr),!ma())throw un;t(ec(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Ba(e,t){return new Promise((n=>{if(Dr(tr),!Ia())throw un;n(ec(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Wa(e,t){if(Dr(tr),!Ua())throw un;uc(e,"returnFocus",[t])}function ja(e,t){return new Promise((n=>{if(Dr(tr),!Ia())throw un;n(Xs(e,"getTabInstances",t))}))}function za(e,t){return new Promise((n=>{if(Dr(tr),!Ia())throw un;n(Xs(e,"getMruTabInstances",t))}))}function $a(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Ua())throw un;uc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function qa(e,t){if(Dr(tr,rn.content),!Ua())throw un;uc(e,"setFrameContext",[t])}function Ga(e,t){if(Dr(tr,rn.settings,rn.remove),!Di())throw un;uc(e,"settings.setValidityState",[t])}function Ja(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.settings,rn.remove,rn.sidePanel),!Ua())throw un;t(Xs(e,"settings.getSettings"))}))}function Ka(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.settings,rn.sidePanel),!Di())throw un;n(Ys(e,"settings.setSettings",t))}))}function Qa(e){return e.appId instanceof Jr}function Za(e){return Object.assign(Object.assign({},e),{appId:new Jr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Xa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ya;function es(e){Ya=e}function ts(){ls(Gn(Ha,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ns,!1)}function ns(){Ya&&Ya()||(Rs()?Ls("backButtonPress",[]):fa())}var rs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 os=qn("handlers");class is{static initializeHandlers(){is.handlers.themeChange=ms,is.handlers.load=Cs,is.handlers.beforeUnload=Ss,ts()}static uninitializeHandlers(){is.handlers={},is.themeChangeHandler=null,is.loadHandler=null,is.beforeUnloadHandler=null,is.beforeSuspendOrTerminateHandler=null,is.resumeHandler=null}}function as(){is.initializeHandlers()}function ss(){is.uninitializeHandlers()}is.handlers={},is.themeChangeHandler=null,is.loadHandler=null,is.beforeUnloadHandler=null,is.beforeSuspendOrTerminateHandler=null,is.resumeHandler=null,is.hostToAppPerformanceMetricsHandler=null;const cs=os.extend("callHandler");function us(e,t){const n=is.handlers[e];if(n){cs("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Rs()?(Ls(e,t),[!1,void 0]):(cs("Handler for action message %s not found.",e),[!1,void 0])}function ls(e,t,n,r=!0,o=[]){n?(is.handlers[t]=n,r&&uc(e,"registerHandler",[t,...o])):delete is.handlers[t]}function ds(e){delete is.handlers[e]}function fs(e){return null!=is.handlers[e]}function ps(e,t,n,r,o){n&&Dr(tr,...r),o&&o(),ls(e,t,n)}function gs(e,t){is.themeChangeHandler=t,!Kr(t)&&uc(e,"registerHandler",["themeChange"])}function ms(e){is.themeChangeHandler&&is.themeChangeHandler(e),Rs()&&Ls("themeChange",[e])}function hs(e){is.hostToAppPerformanceMetricsHandler=e}function vs(e){is.hostToAppPerformanceMetricsHandler&&is.hostToAppPerformanceMetricsHandler(e)}function ws(e,t){is.loadHandler=t,!Kr(t)&&uc(e,"registerHandler",["load"])}function Cs(e){const t=ys(e);is.resumeHandler?(is.resumeHandler(t),Rs()&&Ls("load",[t])):is.loadHandler&&(is.loadHandler(e),Rs()&&Ls("load",[e]))}function ys(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function bs(e,t){is.beforeUnloadHandler=t,!Kr(t)&&uc(e,"registerHandler",["beforeUnload"])}function Ss(){return rs(this,void 0,void 0,(function*(){const e=()=>{uc(Gn("v2","handleBeforeUnload"),"readyToUnload",[])};is.beforeSuspendOrTerminateHandler?(yield is.beforeSuspendOrTerminateHandler(),Rs()?Ls("beforeUnload"):e()):is.beforeUnloadHandler&&is.beforeUnloadHandler(e)||(Rs()?Ls("beforeUnload"):e())}))}function Es(e){is.beforeSuspendOrTerminateHandler=e,!Kr(e)&&uc(Gn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function As(e){is.resumeHandler=e,!Kr(e)&&uc(Gn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Is=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ts=qn("childProxyingCommunication");class Ps{}function Os(){Ps.window=null,Ps.origin=null,Ps.messageQueue=[]}function Rs(){return!!wr()&&!!Ps.window}function Fs(e,t){return!!wr()&&(Ps.window&&!Ps.window.closed&&e!==Ps.window||(Ps.window=e,Ps.origin=t),Ps.window&&Ps.window.closed?(Ps.window=null,Ps.origin=null,!1):Ps.window===e)}function ks(e,t,n,r){return Is(this,void 0,void 0,(function*(){Ps.window===t&&(Fr(Ps.window,Ps.origin,Ps.messageQueue,"child"),Ns(e,n,r))}))}Ps.messageQueue=[];const Ms=Ts.extend("handleIncomingMessageFromChild");function Ns(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Ir(e.data),[o,i]=us(r.func,r.args);if(o&&void 0!==i)return Ms("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Or(r),r.func),void Ds(r.id,r.uuid,Array.isArray(i)?i:[i]);Ms("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Or(r),r.func),xs(r,t,n)}function xs(e,t,n){const r=t(Gn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ps.origin;n(r.uuid,((...t)=>{if(!Ps.window)return;if(!yr().disableEnforceOriginMatchForChildResponses&&o!==Ps.origin)return void Ms("Origin of child window has changed, not sending response back to child window");const n=t.pop();Ms("Message from parent being relayed to child, id: %s",Or(e)),Ds(e.id,e.uuid,t,n)}))}function Ds(e,t,n,r){const o=Ps.window,i=Us(e,t,n,r),a=Pr(i),s=Ps.origin;o&&s&&(Ms("Sending message %s to %s via postMessage, args = %o",Or(a),"child",a.args),o.postMessage(a,s))}function Ls(e,t){const n=Ps.window,r=Hs(e,t),o=Ps.origin;n&&o?n.postMessage(r,o):Ps.messageQueue.push(r)}function Us(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Hs(e,t){return{func:e,args:t||[]}}class Vs{static storeCallbackInformation(e,t){Vs.callbackInformation.set(e,t)}static clearMessages(){Vs.callbackInformation.clear()}static deleteMessageInformation(e){Vs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?vs({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=Vs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(vs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Vs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Vs.callbackInformation=new Map;const _s=qn("nestedAppAuthUtils"),Bs=_s.extend("tryPolyfillWithNestedAppAuthBridge"),Ws="v2";function js(e,t,n){var r;const o=Bs;if(Bn.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=$s(a,n);s&&(a.nestedAppAuthBridge=s)}const zs=_s.extend("createNestedAppAuthBridge");function $s(e,t){const n=zs;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Gn(Ws,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var qs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gs=qn("communication");class Js{}class Ks{}function Qs(e,t){if(Ks.messageListener=e=>vc(e),Js.currentWindow=Js.currentWindow||Pn(),Js.parentWindow=Js.currentWindow.parent!==Js.currentWindow.self?Js.currentWindow.parent:Js.currentWindow.opener,Js.topWindow=Js.currentWindow.top,(Js.parentWindow||e)&&Js.currentWindow.addEventListener("message",Ks.messageListener,!1),!Js.parentWindow){const e=Js.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Bn.isFramelessWindow=!0,e.onNativeMessage=Pc}try{return Js.parentOrigin="*",nc(t,"initialize",[mr,Zn,e]).then((([e,t,n,r])=>(js(r,Js.currentWindow,{onMessage:Cc,sendPostMessage:dc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Js.parentOrigin=null}}function Zs(){Js.currentWindow&&Js.currentWindow.removeEventListener("message",Ks.messageListener,!1),Js.currentWindow=null,Js.parentWindow=null,Js.parentOrigin=null,Ks.parentMessageQueue=[],Ks.nextMessageId=0,Ks.callbacks.clear(),Ks.promiseCallbacks.clear(),Ks.portCallbacks.clear(),Ks.legacyMessageIdsToUuidMap={},Vs.clearMessages(),Os()}function Xs(e,t,...n){return nc(e,t,n).then((([e])=>e))}function Ys(e,t,...n){return nc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function ec(e,t,n,...r){return nc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function tc(e,t,...n){return nc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function nc(e,t,n=void 0){if(!Jn(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(cc(mc(e,t,n).uuid))}))}function rc(e){return e.map((e=>gr(e)?e.serialize():e))}function oc(e,t,n,r,o){var i;return qs(this,void 0,void 0,(function*(){const a=rc(t),[s]=yield nc(r,e,a);if(o&&o(s)||!o&&Ve(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(`${ke.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function ic(e,t,n,r){var o;return qs(this,void 0,void 0,(function*(){const i=rc(t),[a]=yield nc(n,e,i);if(r&&r(a)||!r&&Ve(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${ke.INTERNAL_ERROR}, message: Invalid response from host`)}))}function ac(e,t,n=void 0){if(!Jn(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(mc(e,t,n).uuid)}function sc(e){return new Promise(((t,n)=>{Ks.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 cc(e){return new Promise((t=>{Ks.promiseCallbacks.set(e,t)}))}function uc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Jn(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=mc(e,t,o);r&&Ks.callbacks.set(i.uuid,r)}Ks.parentMessageQueue=[],Ks.topMessageQueue=[],Ks.nextMessageId=0,Ks.callbacks=new Map,Ks.promiseCallbacks=new Map,Ks.portCallbacks=new Map,Ks.legacyMessageIdsToUuidMap={};const lc=Gs.extend("sendNestedAuthRequestToTopWindow");function dc(e,t){const n=lc,r=Js.topWindow,o=Dc(e,t);return n("Message %s information: %o",Or(o),{actionName:o.func}),pc(r,o)}const fc=Gs.extend("sendRequestToTargetWindowHelper");function pc(e,t){const n=fc,r=Mc(e),o=Ar(t);if(Bn.isFramelessWindow)Js.currentWindow&&Js.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Or(o),r),Js.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=kc(e);e&&i?(n("Sending message %s to %s via postMessage",Or(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Or(o),r),Fc(e).push(t))}return t}const gc=Gs.extend("sendMessageToParentHelper");function mc(e,t,n,r,o){const i=gc,a=Js.parentWindow,s=xc(e,t,n,r,o);return Vs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Or(s),{actionName:t,args:n}),pc(a,s)}const hc=Gs.extend("processIncomingMessage");function vc(e){return qs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void hc("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return bc(t,n).then((r=>{r?(Sc(t,n),t!==Js.parentWindow?Fs(t,n)&&ks(e,t,mc,((e,t)=>Ks.callbacks.set(e,t))):Pc(e)):hc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const wc=Gs.extend("processAuthBridgeMessage");function Cc(e,t){var n,r;const o=wc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?bc(c,u)?(Js.topWindow&&!Js.topWindow.closed&&c!==Js.topWindow||(Js.topWindow=c,Js.topOrigin=u),Js.topWindow&&Js.topWindow.closed&&(Js.topWindow=null,Js.topOrigin=null),Fr(Js.topWindow,Js.topOrigin,Ks.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 yc=Gs.extend("shouldProcessIncomingMessage");function bc(e,t){return qs(this,void 0,void 0,(function*(){if(Js.currentWindow&&e===Js.currentWindow)return yc("Should not process message because it is coming from the current window"),!1;if(Js.currentWindow&&Js.currentWindow.location&&t&&t===Js.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return yc("Message has an invalid origin of %s",t),!1}const n=yield aa(e);return n||yc("Message has an invalid origin of %s",t),n}}))}function Sc(e,t){Bn.isFramelessWindow||Js.parentWindow&&!Js.parentWindow.closed&&e!==Js.parentWindow||(Js.parentWindow=e,Js.parentOrigin=t),Js.parentWindow&&Js.parentWindow.closed&&(Js.parentWindow=null,Js.parentOrigin=null),Fr(Js.parentWindow,Js.parentOrigin,Ks.parentMessageQueue,"parent")}const Ec=Gs.extend("handleIncomingMessageFromParent");function Ac(e){const t=Ec;if(!e.uuid)return Ks.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Ic(Ks.callbacks,t);if(n)return n;const r=Ic(Ks.promiseCallbacks,t);if(r)return r;const o=Ic(Ks.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Or(e))}function Ic(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Tc(e,t){const n=Ic(t,e.uuid);n&&t.delete(n),e.uuid?Ks.legacyMessageIdsToUuidMap={}:delete Ks.legacyMessageIdsToUuidMap[e.id]}function Pc(e){const t=Ec,n=Un();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Tr(r),i=Ac(o);if(i){const r=Ks.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Vs.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]),Oc(e)||(t("Removing registered callback for message %s",i.toString()),Tc(o,Ks.callbacks)));const a=Ks.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()),Tc(o,Ks.promiseCallbacks));const s=Ks.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()),Tc(o,Ks.portCallbacks)}o.uuid&&(Ks.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Vs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Or(r),r.func),us(r.func,r.args)}else t("Received an unknown message: %O",e)}function Oc(e){return!0===e.data.isPartialResponse}function Rc(){return Js.topWindow!==Js.parentWindow}function Fc(e){return e===Js.topWindow&&Rc()?Ks.topMessageQueue:e===Js.parentWindow?Ks.parentMessageQueue:[]}function kc(e){return e===Js.topWindow&&Rc()?Js.topOrigin:e===Js.parentWindow?Js.parentOrigin:null}function Mc(e){return e===Js.topWindow&&Rc()?"top":e===Js.parentWindow?"parent":null}function Nc(e,t){let n;n=Js.currentWindow.setInterval((()=>{0===Fc(e).length&&(clearInterval(n),t())}),100)}function xc(e,t,n,r,o){const i=Ks.nextMessageId++,a=new Vn;Ks.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Bn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Un(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Dc(e,t){const n=Ks.nextMessageId++,r=new Vn;return Ks.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Un(),apiVersionTag:t,args:[],data:e}}const Lc="v1";function Uc(e){if(!Kr(e)&&Dr(tr),!Kr(e)&&!Hc())throw un;e?ls(Gn(Lc,"log.request"),"log.request",(()=>{const t=e();uc(Gn(Lc,"log.receive"),"log.receive",[t])})):ds("log.request")}function Hc(){return!(!Dr(tr)||!tr.supports.logs)}var Vc,_c,Bc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Vc||(Vc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(_c||(_c={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Bc||(Bc={}));const Wc="v1";function jc(e,t){Dr(tr),uc(Gn(Wc,"uploadCustomApp"),"uploadCustomApp",[e],t||gn())}function zc(e,t,n){Dr(tr),uc(Gn(Wc,"sendCustomMessage"),e,t,n)}function $c(e,t){if(Dr(tr),!Rs())throw new Error("The child window has not yet been initialized or is not present");Ls(e,t)}function qc(e,t){Dr(tr),ls(Gn(Wc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Gc(e,t){Dr(tr),ls(Gn(Wc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Jc(e){Dr(tr,rn.content,rn.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];uc(Gn(Wc,"openFilePreview"),"openFilePreview",t)}const Kc="v1";function Qc(e){return new Promise((t=>{if(Dr(tr,rn.content),!Yc())throw un;const n=Ys(Gn(Kc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ls(Gn(Kc,"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&&ls(Gn(Kc,"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 Zc(){if(Dr(tr,rn.content),!Yc())throw un;uc(Gn(Kc,"conversations.closeConversation"),"conversations.closeConversation"),ds("startConversation"),ds("closeConversation")}function Xc(){return new Promise((e=>{if(Dr(tr),!Yc())throw un;e(Xs(Gn(Kc,"conversations.getChatMember"),"getChatMembers"))}))}function Yc(){return!(!Dr(tr)||!tr.supports.conversations)}var eu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const tu="v2",nu=qn("copilot");function ru(){var e;return Dr(tr)&&!!(null===(e=tr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function ou(e,t){var n;return void 0===t&&(t=null!==(n=Un())&&void 0!==n?n:Date.now()),eu(this,void 0,void 0,(function*(){return Dr(tr),nu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),ic("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Gn(tu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var iu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const au="v2",su=qn("copilot");function cu(){var e,t;return Dr(tr)&&(!!(null===(e=tr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=tr.supports.copilot)||void 0===t?void 0:t.eligibility))}function uu(){var e,t;return iu(this,void 0,void 0,(function*(){if(Dr(tr),!cu())throw new Error(`Error code: ${un.errorCode}, message: Not supported on platform`);if(null===(e=tr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return su("Eligibility information is already available on runtime."),tr.hostVersionsInfo.appEligibilityInformation;su("Eligibility information is not available on runtime. Requesting from host.");const n=yield Xs(Gn(au,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Ve(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!lu(n))throw new Error("Error deserializing eligibility information");return n}))}function lu(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)}const du="v2";class fu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function pu(e){const t=e;return t.responseType===hu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const gu="Action.Execute";var mu,hu,vu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(mu||(mu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(hu||(hu={}));class wu extends Li{validate(e){return pu(e)}deserialize(e){return e}}function Cu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(vu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function yu(e){e.requestType===mu.ActionExecuteInvokeRequest?bu(e):e.requestType===mu.QueryMessageExtensionRequest&&Su(e)}function bu(e){if(e.type!==gu){throw{errorCode:vu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${gu}"`}}if(!Hn(e.data)){throw{errorCode:vu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Su(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 Eu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;const r=new Jr(e);return yu(n),nc(Gn(du,"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 Au(e,t){if(Dr(tr,rn.content),!Ou())throw un;const n=new Jr(e);return nc(Gn(du,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Iu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;const r=new Jr(e);return yu(n),nc(Gn(du,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Tu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;return Rn(e,new Error("titleId is Invalid.")),Rn(t,new Error("oauthConfigId is Invalid.")),nc(Gn(du,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Pu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;return Rn(e,new Error("titleId is Invalid.")),t&&Fn(t),nc(Gn(du,"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 Ou(){return!(!Dr(tr)||!tr.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(vu||(vu={}));var Ru=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Fu="v2";function ku(e,t,n){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),ic("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Gn(Fu,"externalAppAuthenticationForCEA.authenticateWithSSO"),Cu)}))}function Mu(e,t,n){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),ic("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Gn(Fu,"externalAppAuthenticationForCEA.authenticateWithOauth"),Cu)}))}function Nu(e,t,n,r){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),bu(r),oc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new fu(r),n.url.href,n.width,n.height,n.isExternal],new wu,Gn(Fu,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Cu)}))}function xu(e,t,n,r){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),bu(r),oc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new fu(r),n.authId,n.connectionName,n.claims,n.silent],new wu,Gn(Fu,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Cu)}))}function Du(){return!(!Dr(tr)||!tr.supports.externalAppAuthenticationForCEA)}function Lu(e,t){Rn(t,new Error("conversation id is not valid.")),qr(e)}const Uu="v2";var Hu,Vu;function _u(e,t){if(Dr(tr,rn.content),!Wu())throw un;const n=new Jr(e);return nc(Gn(Uu,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Bu(e,t,n){if(Dr(tr,rn.content),!Wu())throw un;const r=new Jr(e);return nc(Gn(Uu,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Wu(){return!(!Dr(tr)||!tr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Hu||(Hu={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Vu||(Vu={}));var ju=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const zu="v2";function $u(e,t,n){return ju(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Gu())throw un;Lu(e,t);const[r,o]=yield nc(Gn(zu,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function qu(e,t,n){return ju(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Gu())throw un;Lu(e,t);const r=yield Xs(Gn(zu,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Gu(){return!(!Dr(tr)||!tr.supports.externalAppCardActionsForCEA)}var Ju;function Ku(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ju).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Ju||(Ju={}));var Qu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Zu="v2";function Xu(e,t,n){return Qu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Yu())throw un;return el(e,n),ic("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new tl(t),n],Gn(Zu,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Ku)}))}function Yu(){return!(!Dr(tr)||!tr.supports.externalAppCardActionsForDA)}function el(e,t){qr(e),_n(t)}class tl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var nl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const rl="v2";function ol(e,t,n){return nl(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!il())throw un;const r=new Jr(e),[o,i]=yield nc(Gn(rl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function il(){return!(!Dr(tr)||!tr.supports.externalAppCommands)}const al="v1";var sl,cl,ul,ll,dl,fl;function pl(e,t){if(Dr(tr,rn.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");uc(Gn(al,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function gl(e,t){if(Dr(tr,rn.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");uc(Gn(al,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function ml(e,t,n){if(Dr(tr,rn.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");uc(Gn(al,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function hl(e,t,n){if(Dr(tr,rn.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");uc(Gn(al,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function vl(e,t,n){if(Dr(tr,rn.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");uc(Gn(al,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function wl(e=!1,t){if(Dr(tr,rn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");uc(Gn(al,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Cl(e,t,n,r,o=!1,i){if(Dr(tr,rn.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");uc(Gn(al,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function yl(e){if(Dr(tr,rn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");uc(Gn(al,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function bl(e=void 0,t){if(Dr(tr,rn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");uc(Gn(al,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Sl(e){if(Dr(tr,rn.content),!e)throw kl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");uc(Gn(al,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function El(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw kl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");uc(Gn(al,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Al(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");uc(Gn(al,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Il(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");uc(Gn(al,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Tl(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");uc(Gn(al,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Pl(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");uc(Gn(al,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Ol(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw kl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");uc(Gn(al,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Rl(e){if(Dr(tr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ls(Gn(al,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Fl(e){if(Dr(tr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ls(Gn(al,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function kl(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"}(sl||(sl={})),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"}(cl||(cl={})),function(e){e.ClassMaterials="classMaterials"}(ul||(ul={})),function(e){e.Readonly="readonly"}(ll||(ll={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(dl||(dl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(fl||(fl={}));const Ml="v1";function Nl(){return new Promise((e=>{if(Dr(tr),!Ul())throw un;e(tc(Gn(Ml,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function xl(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Dr(tr),!Ul())throw un;t(tc(Gn(Ml,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Dl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Dr(tr),!Ul())throw un;ls(Gn(Ml,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Dr(tr),e(t)}))}function Ll(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Dr(tr),!Ul())throw un;ls(Gn(Ml,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Dr(tr),e(t)}))}function Ul(){return!(!Dr(tr)||!tr.supports.meetingRoom)}function Hl(){return!(!Dr(tr)||!tr.supports.messageChannels)}const Vl="1.0.0",_l={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Jl("Invalid message format, ignoring. Message: %o",e);if(!$l(e.source,e.origin))return void Jl("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Kl("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Jl("Invalid response format, ignoring. Message: %o",e);t(r)}};let Bl=null,Wl=!1;function jl(e,t,n=!1){if(Wl=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.`);Bl=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Jl("Nested App Auth Bridge is already present");const o=zl(r);o&&(r.nestedAppAuthBridge=o)}function zl(e){const t=new WeakMap,{onMessage:n}=_l,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 Jl(`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=ql(t);if(e===e.top||!Bl)return void Kl("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Bl)}}catch(e){return void Kl("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 $l(e,t){if(e&&e!==window.top)return Jl("Should not process message because it is not coming from the top window"),!1;if(t===Bl)try{return"https:"===new URL(t).protocol}catch(e){return Kl("Invalid message origin URL:",e),!1}return!1}function ql(e){const t=Date.now();return{id:Gl(),uuid:Xt(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Gl(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Jl(...e){Wl&&console.log(...e)}function Kl(...e){Wl&&console.error(...e)}const Ql="v1";function Zl(e){if(Dr(tr,rn.content),!Xl())throw un;uc(Gn(Ql,"notifications.showNotification"),"notifications.showNotification",[e])}function Xl(){return!(!Dr(tr)||!tr.supports.notifications)}const Yl="v2";function ed(e){if(!rd())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());if(Kr(e))throw new Error(ke.INVALID_ARGUMENTS.toString());ls(Gn(Yl,"otherApp.install"),"otherApp.install",e)}function td(){if(!rd())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());uc(Gn(Yl,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ds("otherApp.install")}function nd(e){if(!rd())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return ic("otherApp.notifyInstallCompleted",[e.toString()],Gn(Yl,"otherApp.notifyInstallCompleted"))}function rd(){return!(!Dr(tr)||!tr.supports.otherAppStateChange)}const od="v1";var id,ad,sd;function cd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function ud(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(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function ld(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(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function dd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function fd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function pd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function gd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function md(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function hd(){return!(!Dr(tr)||!tr.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"}(id||(id={})),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"}(ad||(ad={})),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"}(sd||(sd={}));const vd="v1";function wd(e,t,n,r){if(Dr(tr,rn.content),!Cd())throw un;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");uc(Gn(vd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Cd(){return!(!Dr(tr)||!tr.supports.appEntity)}const yd="v1";function bd(e){return new Promise((t=>{if(Dr(tr),!Sd())throw un;if((Bn.hostClientType===tn.android||Bn.hostClientType===tn.teamsRoomsAndroid||Bn.hostClientType===tn.teamsPhones||Bn.hostClientType===tn.teamsDisplays)&&!Lr($e)){const e={errorCode:ke.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Xs(Gn(yd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Sd(){return!(!Dr(tr)||!tr.supports.teams)&&(!!tr.supports.teams.fullTrust&&!!tr.supports.teams.fullTrust.joinedTeams)}const Ed="v1";function Ad(e){return new Promise((t=>{if(Dr(tr),!Id())throw un;t(Xs(Gn(Ed,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Id(){return!(!Dr(tr)||!tr.supports.teams)&&!!tr.supports.teams.fullTrust}const Td="v1";var Pd;function Od(e,t){if(Dr(tr,rn.content),!Fd())throw un;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");uc(Gn(Td,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Rd(e,t){if(Dr(tr),!Fd())throw un;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");uc(Gn(Td,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Fd(){return!(!Dr(tr)||!tr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Pd||(Pd={}));class kd{static setTimeout(e,t){const n=performance.now(),r=hn();return kd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete kd.setTimeoutCallbacks[e]}static setInterval(e,t){kd.setTimeout((function n(){e(),kd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in kd.setTimeoutCallbacks){const r=kd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){kd.setTimeoutCallbacks[e].callback(),delete kd.setTimeoutCallbacks[e]}}}kd.setTimeoutCallbacks={};class Md{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){kd.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&&kd.clearTimeout(this.timeoutId),this.timeoutId=kd.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(Md.maxSessionTimeoutInMs,2*t.timeoutInMs):Md.initialSessionTimeoutInMs}}Md.initialSessionTimeoutInMs=1e3,Md.maxSessionTimeoutInMs=3e4;const Nd="v2";class xd{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Md(xd.distributionBinSize,(e=>this.reportPerformanceEvent(Gn(Nd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){kd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Gn(Nd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),xd.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){kd.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(Gn(Nd,"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(Gn(Nd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}xd.distributionBinSize=1e3,xd.calculateFPSInterval=1e3;var Dd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ld=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 Ud="v2",Hd=On()?void 0:new xd(uc);var Vd,_d,Bd;function Wd(e){if(Dr(tr,rn.sidePanel),!Gd())throw un;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ls(Gn(Ud,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Hd?void 0:Hd.setFrameProcessTimeLimit(e.timeLimit)),!1),Xd())Jd(e.videoFrameHandler,e.config);else{if(!ef())throw un;Qd(e.videoBufferHandler,e.config)}null==Hd||Hd.startMonitorSlowFrameProcessing()}function jd(e,t){if(Dr(tr,rn.sidePanel),!Gd())throw un;uc(Gn(Ud,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function zd(e){if(Dr(tr,rn.sidePanel),!Gd())throw un;ls(Gn(Ud,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",pf(e,Hd),!1),uc(Gn(Ud,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function $d(e){uc(Gn(Ud,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function qd(e){uc(Gn(Ud,"videoEffects.notifyError"),"video.notifyError",[e])}function Gd(){return Dr(tr)&&!!tr.supports.video&&(!!tr.supports.video.mediaStream||!!tr.supports.video.sharedFrame)}function Jd(e,t){if(Dr(tr,rn.sidePanel),!Gd()||!Xd())throw un;ls(Gn(Ud,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Dd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Kd(e,Hd);yield rf(n,r,qd,Hd)}))),!1),uc(Gn(Ud,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Kd(e,t){return n=>Dd(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 Qd(e,t){if(Dr(tr,rn.sidePanel),!Gd()||!ef())throw un;ls(Gn(Ud,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Hd||Hd.reportStartFrameProcessing(t.width,t.height),e(Zd(t),(()=>{null==Hd||Hd.reportFrameProcessed(),$d(n)}),qd)}}),!1),uc(Gn(Ud,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Zd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Ld(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Xd(){var e;return Dr(tr,rn.sidePanel)&&Yd()&&!!(null===(e=tr.supports.video)||void 0===e?void 0:e.mediaStream)}function Yd(){var e,t,n,r;return!(!(null===(t=null===(e=Pn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Pn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function ef(){var e;return Dr(tr,rn.sidePanel)&&!!(null===(e=tr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Vd||(Vd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(_d||(_d={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Bd||(Bd={}));var tf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 nf="v2";function rf(e,t,n,r){var o,i;return tf(this,void 0,void 0,(function*(){const a=sf();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cf(yield af(e,n,r),new uf(n,t),a.writable)}))}function of(e,t,n,r){var o,i;return tf(this,void 0,void 0,(function*(){const a=sf();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cf(yield af(e,n,r),new ff(n,t),a.writable)}))}function af(e,t,n){return tf(this,void 0,void 0,(function*(){if(On())throw un;const r=Pn().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 sf(){if(On())throw un;const e=window.MediaStreamTrackGenerator;if(!e)throw un;return new e({kind:"video"})}function cf(e,t,n){new(0,Pn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class uf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>tf(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 lf{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 df{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 ff{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>tf(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=>tf(this,void 0,void 0,(function*(){if(On())throw un;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 lf(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 df(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}}})),ls(Gn(nf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function pf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),uc(Gn(nf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Bd?e:Bd.InitializationFailure;uc(Gn(nf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var gf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mf="v2",hf=2e3,vf=On()?void 0:new xd(uc);var wf;function Cf(e){var t,n;if(!Tf())throw un;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Dr(tr,rn.sidePanel)){if(ls(Gn(mf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==vf?void 0:vf.setFrameProcessTimeLimit(e)),!1),null===(t=tr.supports.video)||void 0===t?void 0:t.mediaStream)ls(Gn(mf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>gf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=vf?bf(e.videoFrameHandler,vf):e.videoFrameHandler;r?yield of(n,o,Of,vf):yield rf(n,o,Of,vf)}))),!1),uc(Gn(mf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=tr.supports.video)||void 0===n?void 0:n.sharedFrame))throw un;ls(Gn(mf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==vf||vf.reportStartFrameProcessing(t.width,t.height);const n=yf(),r=t.timestamp;e.videoBufferHandler(Sf(t),(()=>{n(),null==vf||vf.reportFrameProcessed(),Pf(r)}),Of)}}),!1),uc(Gn(mf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==vf||vf.startMonitorSlowFrameProcessing()}}function yf(){const e=setTimeout((()=>{Of(`Frame not processed in ${hf}ms`,wf.Warn)}),hf);return function(){clearTimeout(e)}}function bf(e,t){return n=>gf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Sf(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ef(e,t,n){if(Dr(tr,rn.sidePanel),!Tf())throw un;uc(Gn(mf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Af(e){if(Dr(tr,rn.sidePanel),!Tf())throw un;ls(Gn(mf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",pf(e,vf),!1),uc(Gn(mf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function If(e){if(Dr(tr,rn.sidePanel),!Gd())throw un;uc(Gn(mf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Tf(){return Dr(tr),Gd()}function Pf(e){uc(Gn(mf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Of(e,t=wf.Warn){uc(Gn(mf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Rf(e){if(Dr(tr),!Gd())throw un;Of(e,wf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(wf||(wf={}));const Ff="v2";class kf extends Li{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Mf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Nf{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class xf extends Li{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Df{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Lf extends Li{validate(e){const t=new xf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Uf(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(jf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return oc("hostEntity.tab.addAndConfigure",[new Nf(e),t],new xf,Gn(Ff,"hostEntity.tab.addAndConfigure"))}function Hf(e){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return jf(e.threadId),oc("hostEntity.tab.getAll",[new Nf(e)],new Lf,Gn(Ff,"hostEntity.tab.getAll"))}function Vf(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zf(e),jf(t.threadId),oc("hostEntity.tab.reconfigure",[new Mf(e),new Nf(t)],new kf,Gn(Ff,"hostEntity.tab.reconfigure"))}function _f(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zf(e),jf(t.threadId),oc("hostEntity.tab.rename",[new Mf(e),new Nf(t)],new kf,Gn(Ff,"hostEntity.tab.rename"))}function Bf(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return jf(t.threadId),zf(e),oc("hostEntity.tab.remove",[new Df(e),new Nf(t)],new Ui,Gn(Ff,"hostEntity.tab.remove"))}function Wf(){var e;return!!(Dr(tr)&&qf()&&(null===(e=tr.supports.hostEntity)||void 0===e?void 0:e.tab))}function jf(e){if(!e||0==e.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function zf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var $f;function qf(){return!(!Dr(tr)||!tr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}($f||($f={}));var Gf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Jf="v2",Kf="Invalid store dialog size",Qf="No App Id present, but AppId needed to open AppDetail store",Zf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Xf(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t}=null!=e?e:{};return ic("store.openFullStore",[op(t)],Gn(Jf,"store.openFullStore"))}))}function Yf(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t,appId:n}=e;if(!(n instanceof Jr))throw new Error(Qf);return ic("store.openAppDetail",[op(t),n],Gn(Jf,"store.openAppDetail"))}))}function ep(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return ic("store.openInContextStore",[op(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Gn(Jf,"store.openInContextStore"))}))}function tp(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Zf);return ic("store.openSpecificStore",[op(t),n],Gn(Jf,"store.openSpecificStore"))}))}function np(){return Dr(tr)&&!!tr.supports.store}function rp(){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!np())throw un}function op(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Kf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Kf);return JSON.stringify(e)}var ip=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 ap="v1",sp="v2";let cp;function up(e){cp=e}function lp(e){const t=void 0!==e,n=t?e:cp;if(!n)throw new Error("No parameters are provided for authentication");Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);return dp(n.successCallback||n.failureCallback?Gn(ap,"authentication.authenticate"):Gn(sp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(cp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(cp=void 0)}}))}function dp(e,t){return ip(this,void 0,void 0,(function*(){const n=kn(t.url);return Fn(n),nc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function fp(e){xr();return pp(e&&(e.successCallback||e.failureCallback)?Gn(ap,"authentication.getAuthToken"):Gn(sp,"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 pp(e,t){return new Promise((n=>{n(nc(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 gp(e){xr();return mp(e&&(e.successCallback||e.failureCallback)?Gn(ap,"authentication.getUser"):Gn(sp,"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 mp(e){return new Promise((t=>{t(nc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function hp(e,t){Dr(tr,rn.authentication);uc(Gn(t?ap:sp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Nc(Js.parentWindow,(()=>setTimeout((()=>Js.currentWindow.close()),200)))}function vp(e,t){Dr(tr,rn.authentication);uc(Gn(t?ap:sp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Nc(Js.parentWindow,(()=>setTimeout((()=>Js.currentWindow.close()),200)))}var wp;function Cp(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"}(wp||(wp={}));class yp{constructor(e){this.val=e,Cp(e)}toString(){return this.val}}const bp="/l/app/",Sp="/l/meeting/new",Ep="attendees",Ap="startTime",Ip="endTime",Tp="subject",Pp="content",Op="/l/call/0/0",Rp="source",Fp="withVideo",kp="/l/chat/0/0",Mp="users",Np="topicName",xp="message";function Dp(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Mp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Np}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${xp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${kp}?${r}${o}${i}`}function Lp(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Mp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Fp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Rp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Op}?${r}${o}${i}`}function Up(e,t,n,r,o){const i=void 0===e?"":`${Ep}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Ap}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Ip}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Tp}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Pp}=${encodeURIComponent(o)}`;return`${tt}://${nt}${Sp}?${i}${a}${s}${c}${u}`}function Hp(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${tt}://${nt}${bp}${encodeURIComponent(e)}`}const Vp="v1";function _p(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Bp())throw new Error("Not supported");const n=Gn(Vp,"appInstallDialog.openAppInstallDialog");tr.isLegacyTeams?t(Ys(n,"executeDeepLink",Hp(e.appId))):(uc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Bp(){return!(!Dr(tr)||!tr.supports.appInstallDialog)}const Wp="v1",jp=qn("media");var zp,$p,qp,Gp,Jp,Kp,Qp;!function(e){e.Base64="base64",e.ID="id"}(zp||(zp={}));class Zp{}function Xp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Dr(tr,rn.content,rn.task),Bn.isFramelessWindow)if(Lr(Je))uc(Gn(Wp,"media.captureImage"),"captureImage",e);else{e({errorCode:ke.OLD_PLATFORM},[])}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},[])}}function Yp(){if(Dr(tr,rn.content,rn.task),!tg())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(Wp,"media.hasPermission"),"permissions.has",e))}))}function eg(){if(Dr(tr,rn.content,rn.task),!tg())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(Wp,"media.requestPermission"),"permissions.request",e))}))}function tg(){return!(!Dr(tr)||!tr.supports.permissions)}class ng extends Zp{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(Dr(tr,rn.content,rn.task),Lr(Ke))if(hg(this.mimeType,this.format,this.content))Lr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:ke.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:ke.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];uc(Gn(Wp,"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=cg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=ug(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):jp(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=hn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Kr(e)&&uc(Gn(Wp,"media.getMedia"),"getMedia",r),ls(Gn(Wp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ds("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=cg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ds("getMedia"+t)}else{const e=ug(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob),ds("getMedia"+t)}}))}}class rg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Dr(tr,rn.content,rn.task);try{Hr(je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};uc(Gn(Wp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost($p.StopRecording,e)}}class og extends rg{getMediaType(){return Jp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case $p.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function ig(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(Ke)){const e={errorCode:ke.OLD_PLATFORM};return void t(e,[])}try{lg(e)}catch(e){return void t(e,[])}if(!fg(e)){const e={errorCode:ke.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];uc(Gn(Wp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(dg(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 ng(e));t(n,s)}))}function ag(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(Ke)){return void t({errorCode:ke.OLD_PLATFORM})}if(!vg(e)){return void t({errorCode:ke.INVALID_ARGUMENTS})}const n=[e];uc(Gn(Wp,"media.viewImages"),"viewImages",n,t)}function sg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Dr(tr,rn.content,rn.task),Bn.hostClientType!==tn.desktop&&Bn.hostClientType!==tn.web&&Bn.hostClientType!==tn.rigel&&Bn.hostClientType!==tn.teamsRoomsWindows&&Bn.hostClientType!==tn.teamsRoomsAndroid&&Bn.hostClientType!==tn.teamsPhones&&Bn.hostClientType!==tn.teamsDisplays)if(Lr(Qe))if(wg(t))uc(Gn(Wp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:ke.INVALID_ARGUMENTS},"")}else{e({errorCode:ke.OLD_PLATFORM},"")}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},"")}}function cg(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 ug(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 lg(e){gg(e)?Hr(We):mg(e)?Hr(je):pg(e)&&Hr(ze)}function dg(e){return!(e.mediaType!=Jp.Video||!e.videoProps||!e.videoProps.videoController)}function fg(e){return!(null==e||e.maxMediaCount>10)}function pg(e){var t;return!((null==e?void 0:e.mediaType)!=Jp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function gg(e){return!(!e||e.mediaType!=Jp.VideoAndImage&&!e.videoAndImageProps)}function mg(e){return!(!e||e.mediaType!=Jp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function hg(e,t,n){return null!=e&&null!=t&&t==zp.ID&&null!=n}function vg(e){return!(null==e||e.length<=0||e.length>10)}function wg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Cg(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"}($p||($p={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(qp||(qp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Gp||(Gp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Jp||(Jp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Kp||(Kp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Qp||(Qp={}));const yg="v2";function bg(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.task),!Ag())throw un;if(!wg(e))throw{errorCode:ke.INVALID_ARGUMENTS};t(tc(Gn(yg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Sg(){if(Dr(tr,rn.content,rn.task),!Ag())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(yg,"barCode.hasPermission"),"permissions.has",e))}))}function Eg(){if(Dr(tr,rn.content,rn.task),!Ag())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(yg,"barCode.requestPermission"),"permissions.request",e))}))}function Ag(){return!!(Dr(tr)&&tr.supports.barCode&&tr.supports.permissions)}const Ig="v2";function Tg(e){return Pg(Gn(Ig,"chat.openChat"),e)}function Pg(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.task),!Rg())throw un;if(tr.isLegacyTeams)n(Ys(e,"executeDeepLink",Dp([t.user],void 0,t.message)));else{n(Ys(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Og(e){const t=Gn(Ig,"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(Pg(t,r))}else{if(Dr(tr,rn.content,rn.task),!Rg())throw un;if(tr.isLegacyTeams)n(Ys(t,"executeDeepLink",Dp(e.users,e.topic,e.message)));else{n(Ys(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Rg(){return!(!Dr(tr)||!tr.supports.chat)}var Fg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const kg="v2";function Mg(e){return Fg(this,void 0,void 0,(function*(){if(Dr(tr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel),!xg())throw un;if(!e.type||!Object.values(Ue).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ue)}`);const t=yield Tn(e),n={mimeType:e.type,content:t};return tc(Gn(kg,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Ng(){return Fg(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel);const e=Gn(kg,"clipboard.read");if(!xg())throw un;const t=yield tc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return In(e.mimeType,e.content)}return t}))}function xg(){return Bn.isFramelessWindow?!(!Dr(tr)||!tr.supports.clipboard):!!(Dr(tr)&&navigator&&navigator.clipboard&&tr.supports.clipboard)}var Dg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Lg="v2",Ug={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Hg;function Vg(){var e;return null!==(e=Dr(tr)&&(tr.isNAAChannelRecommended||jg()))&&void 0!==e&&e}function _g(){return Dr(tr),Js.parentOrigin}function Bg(){var e;return null!==(e=Dr(tr)&&tr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Wg(){var e;return null!==(e=Dr(tr)&&tr.isDeeplyNestedAuthSupported)&&void 0!==e&&e}function jg(){return!!(Dr(tr)&&zg()&&tr.isLegacyTeams&&tr.supports.nestedAppAuth)}function zg(){return Bn.hostClientType===tn.android||Bn.hostClientType===tn.ios||Bn.hostClientType===tn.ipados||Bn.hostClientType===tn.visionOS}function $g(e){return Dg(this,void 0,void 0,(function*(){if(!Bg())throw un;const t=e.map(Jg);return Gg(Hg.ADD,t)}))}function qg(e){return Dg(this,void 0,void 0,(function*(){if(!Bg())throw un;const t=e.map(Jg);return Gg(Hg.DELETE,t)}))}function Gg(e,t){return Dg(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 oc("nestedAppAuth.manageNAATrustedOrigins",[new Kg(e,t)],Ug,Gn(Lg,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Jg(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"}(Hg||(Hg={}));class Kg{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Qg="v2";function Zg(){if(Dr(tr,rn.content,rn.task),!Yg())throw un;return tc(Gn(Qg,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Xg(e){if(Dr(tr,rn.content,rn.task),!Yg())throw un;if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};return tc(Gn(Qg,"geoLocation.showLocation"),"location.showLocation",e)}function Yg(){return!!(Dr(tr)&&tr.supports.geoLocation&&tr.supports.geoLocation.map&&tr.supports.permissions)}const em="v2";function tm(){if(Dr(tr,rn.content,rn.task),!om())throw un;return tc(Gn(em,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function nm(){if(Dr(tr,rn.content,rn.task),!om())throw un;const e=Me.GeoLocation;return new Promise((t=>{t(tc(Gn(em,"geoLocation.hasPermission"),"permissions.has",e))}))}function rm(){if(Dr(tr,rn.content,rn.task),!om())throw un;const e=Me.GeoLocation;return new Promise((t=>{t(tc(Gn(em,"geoLocation.requestPermission"),"permissions.request",e))}))}function om(){return!!(Dr(tr)&&tr.supports.geoLocation&&tr.supports.permissions)}function im(){return tr.hostVersionsInfo?tr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const am="v1";class sm{postMessage(e,t){Dr(tr),uc(Gn(am,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||gn())}addEventListener(e,t){Dr(tr),"message"===e&&ls(Gn(am,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class cm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Dr(tr,rn.task),uc(Gn(am,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||gn())}addEventListener(e,t){Dr(tr,rn.task),"message"===e&&ls(Gn(am,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const um="v2";function lm(e){if(Dr(tr,rn.content),!dm())throw un;if(!e||!An(e))throw{errorCode:ke.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return tc(Gn(um,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function dm(){return!(!Dr(tr)||!tr.supports.secondaryBrowser)}const fm="v1";function pm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!mm())throw un;uc(Gn(fm,"location.getLocation"),"location.getLocation",[e],t)}function gm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!mm())throw un;uc(Gn(fm,"location.showLocation"),"location.showLocation",[e],t)}function mm(){return!(!Dr(tr)||!tr.supports.location)}const hm="v1";function vm(e){Dr(tr,rn.sidePanel),e.contentUrl&&new URL(e.contentUrl),uc(Gn(hm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var wm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Cm="v1";var ym,bm,Sm,Em,Am,Im;function Tm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Pm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Om(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content),uc(Gn(Cm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Rm(){var e,t,n;return wm(this,void 0,void 0,(function*(){let r;Dr(tr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content);try{const e=!0;r=yield tc(Gn("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)==Em.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Em.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Fm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage,rn.task),uc(Gn(Cm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function km(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Dr(tr,rn.sidePanel),uc(Gn(Cm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Mm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Dr(tr,rn.sidePanel),uc(Gn(Cm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Nm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Dr(tr,rn.sidePanel),uc(Gn(Cm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function xm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Dr(tr,rn.sidePanel),ls(Gn(Cm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Dm(e,t,n={sharingProtocol:Am.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Lm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Um(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Hm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Vm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ls(Gn(Cm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function _m(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ls(Gn(Cm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Bm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ls(Gn(Cm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Wm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Dr(tr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Im.Other};return tc(Gn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function jm(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");Dr(tr,rn.sidePanel,rn.meetingStage),e.isAppHandlingAudio?zm(e,t):$m(e,t)}function zm(e,t){uc(Gn(Cm,"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");ls(Gn(Cm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>wm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Gm(n,n.isMicMuted===t.isMicMuted?ym.HostInitiated:ym.AppDeclinedToChange)}catch(e){Gm(t,ym.AppFailedToChange)}}))));ls(Gn(Cm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function $m(e,t){uc(Gn(Cm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");fs("meeting.micStateChanged")&&ds("meeting.micStateChanged"),fs("meeting.audioDeviceSelectionChanged")&&ds("meeting.audioDeviceSelectionChanged"),t(n)}))}function qm(e){Gm(e,ym.AppInitiated)}function Gm(e,t){Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"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"}(ym||(ym={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(bm||(bm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Sm||(Sm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Em||(Em={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Am||(Am={})),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"}(Im||(Im={}));const Jm="v1",Km="v2";function Qm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Gn(Jm,"monetization.openPurchaseExperience")):(r=e,o=Gn(Km,"monetization.openPurchaseExperience"));return Dr(tr,rn.content),yn((()=>new Promise((e=>{if(!Zm())throw un;e(tc(o,"monetization.openPurchaseExperience",r))}))),n)}function Zm(){return!(!Dr(tr)||!tr.supports.monetization)}const Xm="v2";function Ym(e){return new Promise((t=>{if(Dr(tr,rn.content),!th())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Ys(Gn(Xm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function eh(e){return new Promise((t=>{if(Dr(tr,rn.content),!th())throw new Error("Not supported");const n=Gn(Xm,"calendar.composeMeeting");tr.isLegacyTeams?t(Ys(n,"executeDeepLink",Up(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Ys(n,"calendar.composeMeeting",e))}))}function th(){return!(!Dr(tr)||!tr.supports.calendar)}const nh="v2";function rh(e){e&&0!==e.length&&e.forEach((e=>{Cp(e)}))}function oh(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===fh.New&&(rh(t.toRecipients),rh(t.ccRecipients),rh(t.bccRecipients))}function ih(e){if(Dr(tr,rn.content),!ah())throw new Error("Not supported");return oh(e),ic("mail.handoff.composeMail",[new sh(e)],Gn(nh,"mail.handoff.composeMail"))}function ah(){return!!(Dr(tr)&&tr.supports.mail&&tr.supports.mail.handoff)}class sh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const ch="v2";function uh(e){return new Promise((t=>{if(Dr(tr,rn.content),!dh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Ys(Gn(ch,"mail.openMailItem"),"mail.openMailItem",e))}))}function lh(e){return new Promise((t=>{if(Dr(tr,rn.content),!dh())throw new Error("Not supported");t(Ys(Gn(ch,"mail.composeMail"),"mail.composeMail",e))}))}function dh(){return!(!Dr(tr)||!tr.supports.mail)}var fh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(fh||(fh={}));const ph="v2";function gh(){if(!Bn.printCapabilityEnabled){if(Dr(tr),!yh())throw un;Bn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(mh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function mh(){Pn().print()}function hh(e){vh(Gn(ph,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Kr(e)&&!yh())throw un}))}function vh(e,t,n){!Kr(t)&&Dr(tr),!Kr(t)&&n&&n(),ws(e,t)}function wh(e){Ch(Gn(ph,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Kr(e)&&!yh())throw un}))}function Ch(e,t,n){!Kr(t)&&Dr(tr),!Kr(t)&&n&&n(),bs(e,t)}function yh(){return!(!Dr(tr)||!tr.supports.teamsCore)}const bh="v1",Sh="v2";function Eh(e,t){let n,r;Dr(tr,rn.content,rn.task,rn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Gn(bh,"people.selectPeople")):(r=e,o=Gn(Sh,"people.selectPeople")),wn(Ah,n,o,r)}function Ah(e,t){return new Promise((n=>{if(!Lr(Ge))throw{errorCode:ke.OLD_PLATFORM};if(!Cg(t))throw{errorCode:ke.INVALID_ARGUMENTS};if(!Ih())throw un;n(tc(e,"people.selectPeople",t))}))}function Ih(){return!(!Dr(tr)||!tr.supports.people)}function Th(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?Ph(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Ph(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 Oh="v2";function Rh(e){return Dr(tr,rn.content),new Promise((t=>{const[n,r]=Th(e);if(!n)throw{errorCode:ke.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(tc(Gn(Oh,"profile.showProfile"),"profile.showProfile",o))}))}function Fh(){return!(!Dr(tr)||!tr.supports.profile)}const kh="v2",Mh="search.queryChange",Nh="search.queryClose",xh="search.queryExecute";function Dh(e,t,n){if(Dr(tr,rn.content),!Uh())throw un;ls(Gn(kh,"search.registerOnClosedHandler"),Nh,e),ls(Gn(kh,"search.registerOnExecutedHandler"),xh,t),n&&ls(Gn(kh,"search.registerOnChangeHandler"),Mh,n)}function Lh(){if(Dr(tr,rn.content),!Uh())throw un;uc(Gn(kh,"search.unregisterHandlers"),"search.unregister"),ds(Mh),ds(Nh),ds(xh)}function Uh(){return!(!Dr(tr)||!tr.supports.search)}function Hh(){return new Promise((e=>{if(Dr(tr,rn.content),!Uh())throw new Error("Not supported");e(Ys(Gn(kh,"search.closeSearch"),"search.closeSearch"))}))}var Vh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const _h="v2";function Bh(){return Vh(this,void 0,void 0,(function*(){if(Dr(tr,rn.sidePanel,rn.meetingStage),!Wh())throw un;return yield tc(Gn(_h,"sharing.history.getContent"),"sharing.history.getContent")}))}function Wh(){var e;return Dr(tr)&&void 0!==(null===(e=tr.supports.sharing)||void 0===e?void 0:e.history)}const jh="v1",zh="v2",$h={shareWebContent:"sharing.shareWebContent"};function qh(e,t){try{Jh(e),Kh(e),Qh(e)}catch(e){return Cn((()=>Promise.reject(e)),t)}Dr(tr,rn.content,rn.sidePanel,rn.task,rn.stage,rn.meetingStage);return Cn(Gh,t,Gn(t?jh:zh,"sharing.shareWebContent"),e)}function Gh(e,t){return new Promise((n=>{if(!Zh())throw un;n(tc(e,$h.shareWebContent,t))}))}function Jh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:ke.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Kh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Qh(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Zh(){return!(!Dr(tr)||!tr.supports.sharing)}const Xh="v2";function Yh(){return new Promise((e=>{if(Dr(tr,rn.content),!ev())throw un;e(tc(Gn(Xh,"stageView.self.close"),"stageView.self.close"))}))}function ev(){var e;return Dr(tr)&&void 0!==(null===(e=tr.supports.stageView)||void 0===e?void 0:e.self)}const tv="v2";var nv;function rv(e){return new Promise((t=>{if(Dr(tr,rn.content),!ov())throw un;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(tc(Gn(tv,"stageView.open"),"stageView.open",e))}))}function ov(){return!(!Dr(tr)||!tr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(nv||(nv={}));const iv=10;var av=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 sv="v2";function cv(e){return av(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.task),dv(),fv(e);const t=yield tc(Gn(sv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return pv(e.maxVisualMediaCount,t),t}))}function uv(e){return av(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.task),dv(),fv(e);const t=yield tc(Gn(sv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return pv(e.maxVisualMediaCount,t),t}))}function lv(){return!!(Dr(tr)&&tr.supports.visualMedia&&tr.supports.visualMedia.image&&tr.supports.permissions)}function dv(){if(!lv())throw un}function fv(e){if(!e||e.maxVisualMediaCount>iv||e.maxVisualMediaCount<1)throw fn}function pv(e,t){if(t.length>e)throw pn}const gv="v2";var mv,hv;function vv(){if(Dr(tr,rn.content,rn.task),!lv())throw un;const e=Me.Media;return tc(Gn(gv,"visualMedia.hasPermission"),"permissions.has",e)}function wv(){if(Dr(tr,rn.content,rn.task),!lv())throw un;const e=Me.Media;return tc(Gn(gv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(mv||(mv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(hv||(hv={}));var Cv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 yv=null;function bv(){return Cv(this,void 0,void 0,(function*(){return null===yv&&(yv=(yield Eo()).app.host.name),yv}))}var Sv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function Ev(){return Sv(this,void 0,void 0,(function*(){if(Dr(tr),!Iv())throw un;return!(!tr.isLegacyTeams||Bn.hostClientType!==tn.android&&Bn.hostClientType!==tn.ios&&Bn.hostClientType!==tn.ipados&&Bn.hostClientType!==tn.visionOS||(yield Av())!==nn.teams)||(yield Xs(Gn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Av(){return Sv(this,void 0,void 0,(function*(){return bv()}))}function Iv(){return Dr(tr)&&void 0!==tr.supports.webStorage}const Tv="v2";var Pv;function Ov(e){const t=Gn(Tv,"call.startCall");return new Promise((n=>{var r;if(Dr(tr,rn.content,rn.task),!Rv())throw un;if(!tr.isLegacyTeams)return uc(t,"call.startCall",[e],n);n(Xs(t,"executeDeepLink",Lp(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Pv.Video),e.source)).then((e=>{if(!e)throw new Error(at);return e})))}))}function Rv(){return!(!Dr(tr)||!tr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Pv||(Pv={}));const Fv="v1";function kv(){Wi(Gn(Fv,"appInitialization.notifyAppLoaded"))}function Mv(){uc(Gn(Fv,"appInitialization.notifySuccess"),mo.Success,[mr])}function Nv(e){zi(Gn(Fv,"appInitialization.notifyFailure"),e)}function xv(e){ji(Gn(Fv,"appInitialization.notifyExpectedFailure"),e)}const Dv=qn("thirdPartyCloudStorage"),Lv="v2";class Uv{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Hv=[],Vv=null,_v=!0,Bv=null;function Wv(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Dr(tr,rn.content,rn.task),!zv())throw un;if(Bv)throw Bv=null,new Error("getDragAndDropFiles cannot be called twice");Bv=t,_v=!0,uc(Gn(Lv,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],jv)}else{t([],{errorCode:ke.INVALID_ARGUMENTS})}}function jv(e){if(Bv)if(e&&e.error)Bv([],e.error),Bv=null;else if(e&&e.fileChunk)try{_v||0!==e.fileChunk.chunkSequence||(Dv("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),_v=!0,Bv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}),Hv=[],Bv=null);const t=ug(e.fileChunk,e.fileType);if(t?(Vv||(Vv=new Uv(e.fileType,[])),Vv.assembleAttachment.push(t)):(Dv(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Bv?Bv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}):Bv=null,Hv=[],Bv=null,_v=!0),_v=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Vv){const t=cg(Vv.assembleAttachment,Vv.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Hv.push(n)}e.isLastFile&&Bv&&(Bv(Hv,e.error),Hv=[],Bv=null,_v=!0),Vv=null}}catch(e){Bv&&(Bv([],{errorCode:ke.INTERNAL_ERROR,message:e}),Hv=[],Bv=null,_v=!0)}else Bv([],{errorCode:ke.INTERNAL_ERROR,message:"data received is null"}),Hv=[],Bv=null,_v=!0}function zv(){return!(!Dr(tr)||!tr.supports.thirdPartyCloudStorage)}const $v="v1";function qv(e,t){Bi(Gn($v,"initialize"),t).then((()=>{e&&e()}))}function Gv(){gh()}function Jv(){mh()}function Kv(e){xr(),uc(Gn($v,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Bn.frameContext),e(t)}))}function Qv(e){Qi(Gn($v,"registerOnThemeChangeHandlerHelper"),e)}function Zv(e){ps(Gn($v,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Xv(e){ps(Gn($v,"registerAppButtonClickHandler"),"appButtonClick",e,[rn.content])}function Yv(e){ps(Gn($v,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[rn.content])}function ew(e){ps(Gn($v,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[rn.content])}function tw(e){ga(Gn($v,"registerBackButtonHandler"),e)}function nw(e){vh(Gn($v,"registerOnLoadHandler"),e)}function rw(e){Ch(Gn($v,"registerBeforeUnloadHandler"),e)}function ow(e){ps(Gn($v,"registerFocusEnterHandler"),"focusEnter",e,[])}function iw(e){ps(Gn($v,"registerChangeSettingsHandler"),"changeSettings",e,[rn.content])}function aw(e,t){Dr(tr),ja(Gn($v,"getTabInstances"),t).then((t=>{e(t)}))}function sw(e,t){Dr(tr),za(Gn($v,"getMruTabInstances"),t).then((t=>{e(t)}))}function cw(e){$a(Gn($v,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function uw(e,t){Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Zi(Gn($v,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function lw(e){qa(Gn($v,"setFrameContext"),e)}function dw(e,t,n){Bi(Gn($v,"initializeWithFrameContext"),n).then((()=>t&&t())),qa(Gn($v,"setFrameContext"),e)}const fw="v1";function pw(e){Wa(Gn(fw,"navigation.returnFocus"),e)}function gw(e,t){Dr(tr);const n=null!=t?t:gn();Ba(Gn(fw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function mw(e,t){Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Va(Gn(fw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function hw(e){Dr(tr);const t=null!=e?e:gn();_a(Gn(fw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const vw="v1";function ww(e){Ga(Gn(vw,"settings.setValidityState"),e)}function Cw(e){Dr(tr,rn.content,rn.settings,rn.remove,rn.sidePanel),Ja(Gn(vw,"settings.getSettings")).then((t=>{e(t)}))}function yw(e,t){Dr(tr,rn.content,rn.settings,rn.sidePanel);const n=null!=t?t:gn();Ka(Gn(vw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function bw(e){Pi(Gn(vw,"settings.registerOnSaveHandler"),e)}function Sw(e){Ri(Gn(vw,"settings.registerOnRemoveHandler"),e)}var Ew=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 Aw="v1";function Iw(e,t){const n=Gn(Aw,"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?(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),uc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Jo(n,Rw(e),r):Go(n,Ow(e),r),new sm}function Tw(e){e=Fw(e);const{width:t,height:n}=e,r=Ew(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");qo(Gn(Aw,"tasks.updateTask"),e)}function Pw(e,t){Ko(Gn(Aw,"tasks.submitTask"),e,t)}function Ow(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Rw(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Fw(e){return e.height=e.height?e.height:sn.Small,e.width=e.width?e.width:sn.Small,e}const kw="v2";var Mw,Nw;function xw(){return!(!Dr(tr,rn.meetingStage,rn.sidePanel,rn.content)||!tr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Mw||(Mw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Nw||(Nw={}));class Dw{getFluidTenantInfo(){return Lw(),new Promise((e=>{e(tc(Gn(kw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Lw(),new Promise((e=>{e(tc(Gn(kw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Lw(),new Promise((e=>{e(tc(Gn(kw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Lw(),new Dw}}function Lw(){if(!xw())throw new Error("LiveShareHost Not supported")}var Uw=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 Hw(e){try{return e.cartItems=Vw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Vw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Vw(e.accessories)),e}))}const _w=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Uw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=_w(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Bw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)jw(t),Ww(t.accessories)}function Ww(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");jw(t)}}}function jw(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");$w(e.price),qw(e.quantity)}function zw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}}function $w(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 qw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Gw(e){if(!Object.values(Zw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Jw="v2",Kw={majorVersion:1,minorVersion:1};var Qw,Zw;function Xw(){if(Dr(tr,rn.content,rn.task),!nC())throw un;return tc(Gn(Jw,"marketplace.getCart"),"marketplace.getCart",Kw).then(Hw)}function Yw(e){if(Dr(tr,rn.content,rn.task),!nC())throw un;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return zw(null==e?void 0:e.cartId),Bw(null==e?void 0:e.cartItems),tc(Gn(Jw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:_w(e.cartItems),cartVersion:Kw})).then(Hw)}function eC(e){if(Dr(tr,rn.content,rn.task),!nC())throw un;if(!e)throw new Error("removeCartItemsParams must be provided");if(zw(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 tc(Gn(Jw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Kw})).then(Hw)}function tC(e){if(Dr(tr,rn.content,rn.task),!nC())throw un;if(!e)throw new Error("updateCartStatusParams must be provided");return zw(null==e?void 0:e.cartId),Gw(null==e?void 0:e.cartStatus),tc(Gn(Jw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Kw})).then(Hw)}function nC(){return!(!Dr(tr)||!tr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Qw||(Qw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Zw||(Zw={}))})(),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:()=>Re,AppId:()=>Jr,ChannelType:()=>cn,ChildAppWindow:()=>sm,DialogDimension:()=>sn,EduType:()=>Le,EmailAddress:()=>yp,ErrorCode:()=>ke,FileOpenPreference:()=>Oe,FrameContexts:()=>rn,HostClientType:()=>tn,HostName:()=>nn,LiveShareHost:()=>Dw,NotificationTypes:()=>Vc,ParentAppWindow:()=>cm,SecondaryM365ContentIdName:()=>Fe,TaskModuleDimension:()=>sn,TeamType:()=>on,UUID:()=>Vn,UserSettingTypes:()=>Bc,UserTeamRole:()=>an,ValidatedSafeString:()=>Gr,ViewerActionTypes:()=>_c,activateChildProxyingCommunication:()=>vr,app:()=>i,appEntity:()=>V,appInitialization:()=>Ee,appInstallDialog:()=>K,authentication:()=>J,barCode:()=>Z,calendar:()=>ce,call:()=>Se,chat:()=>X,clipboard:()=>Y,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Gv,executeDeepLink:()=>uw,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCardActionsForDA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ne,getAdaptiveCardSchemaVersion:()=>im,getContext:()=>Kv,getCurrentFeatureFlagsState:()=>yr,getMruTabInstances:()=>sw,getTabInstances:()=>aw,hostEntity:()=>q,initialize:()=>qv,initializeWithFrameContext:()=>dw,liveShare:()=>Pe,location:()=>oe,logs:()=>b,mail:()=>le,marketplace:()=>He,media:()=>Q,meeting:()=>ae,meetingRoom:()=>N,menus:()=>p,messageChannels:()=>x,monetization:()=>se,navigateBack:()=>hw,navigateCrossDomain:()=>mw,navigateToTab:()=>gw,nestedAppAuth:()=>ee,nestedAppAuthBridge:()=>D,notifications:()=>L,openFilePreview:()=>Jc,otherAppStateChange:()=>U,overwriteFeatureFlagsState:()=>Sr,pages:()=>y,people:()=>fe,print:()=>Jv,profile:()=>pe,registerAppButtonClickHandler:()=>Xv,registerAppButtonHoverEnterHandler:()=>Yv,registerAppButtonHoverLeaveHandler:()=>ew,registerBackButtonHandler:()=>tw,registerBeforeUnloadHandler:()=>rw,registerChangeSettingsHandler:()=>iw,registerCustomHandler:()=>qc,registerFocusEnterHandler:()=>ow,registerFullScreenHandler:()=>Zv,registerOnLoadHandler:()=>nw,registerOnThemeChangeHandler:()=>Qv,registerUserSettingsChangeHandler:()=>Gc,remoteCamera:()=>H,returnFocus:()=>pw,search:()=>ge,secondaryBrowser:()=>re,sendCustomEvent:()=>$c,sendCustomMessage:()=>zc,setFeatureFlagsState:()=>br,setFrameContext:()=>lw,settings:()=>Ie,shareDeepLink:()=>cw,sharing:()=>he,stageView:()=>we,store:()=>G,tasks:()=>Te,teams:()=>W,teamsCore:()=>de,thirdPartyCloudStorage:()=>Ae,uploadCustomApp:()=>jc,version:()=>mr,videoEffects:()=>j,videoEffectsEx:()=>z,visualMedia:()=>ye,webStorage:()=>be});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>no,getTelemetryPort:()=>eo,isSupported:()=>to});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>uo,getDataLayerPort:()=>so,isSupported:()=>co});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>lo,registerOnResumeHandler:()=>fo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>vo,FailedReason:()=>ho,Messages:()=>mo,_initialize:()=>bo,_uninitialize:()=>So,getContext:()=>Eo,getFrameContext:()=>Co,initialize:()=>yo,isInitialized:()=>wo,lifecycle:()=>o,notifyAppLoaded:()=>Ao,notifyExpectedFailure:()=>Po,notifyFailure:()=>To,notifySuccess:()=>Io,openLink:()=>Fo,registerHostToAppPerformanceMetricsHandler:()=>Ro,registerOnThemeChangeHandler:()=>Oo});var a={};n.r(a),n.d(a,{isSupported:()=>No,resize:()=>Mo});var s={};n.r(s),n.d(s,{isSupported:()=>Do,open:()=>xo});var c={};n.r(c),n.d(c,{isSupported:()=>Vo,registerOnMessageFromParent:()=>Ho,sendMessageToDialog:()=>Uo,sendMessageToParentFromDialog:()=>Lo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>zo,getDialogInfoFromUrlDialogInfo:()=>jo,isSupported:()=>Wo,open:()=>_o,parentCommunication:()=>c,submit:()=>Bo});var l={};n.r(l),n.d(l,{isSupported:()=>ti,open:()=>ei});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ri,open:()=>ni});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>oi,isSupported:()=>ii,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>si,MenuItem:()=>ui,MenuListType:()=>ci,initialize:()=>mi,isSupported:()=>Si,setNavBarMenu:()=>wi,setUpViews:()=>hi,showActionMenu:()=>yi});var g={};n.r(g),n.d(g,{initialize:()=>Ei,isSupported:()=>Di,registerChangeConfigHandler:()=>ki,registerOnRemoveHandler:()=>Oi,registerOnRemoveHandlerHelper:()=>Ri,registerOnSaveHandler:()=>Ti,registerOnSaveHandlerHelper:()=>Pi,setConfig:()=>Ii,setValidityState:()=>Ai});var m={};n.r(m),n.d(m,{isSupported:()=>la,onClick:()=>sa,onHoverEnter:()=>ca,onHoverLeave:()=>ua});var h={};n.r(h),n.d(h,{_initialize:()=>da,isSupported:()=>ma,navigateBack:()=>fa,registerBackButtonHandler:()=>pa,registerBackButtonHandlerHelper:()=>ga});var v={};n.r(v),n.d(v,{isSupported:()=>wa,navigateTo:()=>ha,navigateToDefaultPage:()=>va});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ca,exitFullscreen:()=>ya,isSupported:()=>ba});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Aa,getTabInstances:()=>Ea,isSupported:()=>Ia,navigateToTab:()=>Sa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ta,ReturnFocusType:()=>Pa,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Ma,initializeWithFrameContext:()=>ka,isSupported:()=>Ua,navigateCrossDomain:()=>Na,navigateToApp:()=>xa,registerFocusEnterHandler:()=>Ra,registerFullScreenHandler:()=>La,returnFocus:()=>Oa,setCurrentFrame:()=>Fa,shareDeepLink:()=>Da,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>Hc,registerGetLogHandler:()=>Uc});var S={};n.r(S),n.d(S,{closeConversation:()=>Zc,getChatMembers:()=>Xc,isSupported:()=>Yc,openConversation:()=>Qc});var E={};n.r(E),n.d(E,{isSupported:()=>ru,sendCustomTelemetryData:()=>ou});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>uu,isSupported:()=>cu});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>gu,ActionExecuteResponseHandler:()=>wu,InvokeErrorCode:()=>vu,InvokeResponseType:()=>hu,OriginalRequestType:()=>mu,SerializableActionExecuteInvokeRequest:()=>fu,authenticateAndResendRequest:()=>Eu,authenticateWithOauth2:()=>Tu,authenticateWithPowerPlatformConnectorPlugins:()=>Pu,authenticateWithSSO:()=>Au,authenticateWithSSOAndResendRequest:()=>Iu,isActionExecuteResponse:()=>pu,isInvokeError:()=>Cu,isSupported:()=>Ou,validateActionExecuteInvokeRequest:()=>bu});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Nu,authenticateWithOauth:()=>Mu,authenticateWithSSO:()=>ku,authenticateWithSSOAndResendRequest:()=>xu,isSupported:()=>Du,validateInput:()=>Lu});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Vu,ActionOpenUrlType:()=>Hu,isSupported:()=>Wu,processActionOpenUrl:()=>Bu,processActionSubmit:()=>_u});var R={};n.r(R),n.d(R,{isSupported:()=>Gu,processActionOpenUrl:()=>$u,processActionSubmit:()=>qu});var F={};n.r(F),n.d(F,{SerializableActionOpenUrlDialogInfo:()=>tl,isSupported:()=>Yu,processActionOpenUrlDialog:()=>Xu});var k={};n.r(k),n.d(k,{isSupported:()=>il,processActionCommand:()=>ol});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>sl,CloudStorageProviderFileAction:()=>fl,CloudStorageProviderType:()=>cl,DocumentLibraryAccessType:()=>ll,FileDownloadStatus:()=>dl,SpecialDocumentLibraryType:()=>ul,addCloudStorageFolder:()=>gl,addCloudStorageProvider:()=>Sl,addCloudStorageProviderFile:()=>Al,copyMoveFiles:()=>Cl,deleteCloudStorageFolder:()=>ml,deleteCloudStorageProviderFile:()=>Tl,downloadCloudStorageProviderFile:()=>Pl,getCloudStorageFolderContents:()=>hl,getCloudStorageFolders:()=>pl,getExternalProviders:()=>wl,getFileDownloads:()=>yl,openCloudStorageFile:()=>vl,openDownloadFolder:()=>bl,registerCloudStorageProviderContentChangeHandler:()=>Fl,registerCloudStorageProviderListChangeHandler:()=>Rl,removeCloudStorageProvider:()=>El,renameCloudStorageProviderFile:()=>Il,uploadCloudStorageProviderFile:()=>Ol});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>Nl,isSupported:()=>Ul,registerMeetingRoomCapabilitiesUpdateHandler:()=>Dl,registerMeetingRoomStatesUpdateHandler:()=>Ll,sendCommandToPairedMeetingRoom:()=>xl});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>Hl,telemetry:()=>e});var D={};n.r(D),n.d(D,{initialize:()=>jl,version:()=>Vl});var L={};n.r(L),n.d(L,{isSupported:()=>Xl,showNotification:()=>Zl});var U={};n.r(U),n.d(U,{isSupported:()=>rd,notifyInstallCompleted:()=>nd,registerAppInstallationHandler:()=>ed,unregisterAppInstallationHandler:()=>td});var H={};n.r(H),n.d(H,{ControlCommand:()=>id,ErrorReason:()=>ad,SessionTerminatedReason:()=>sd,getCapableParticipants:()=>cd,isSupported:()=>hd,registerOnCapableParticipantsChangeHandler:()=>fd,registerOnDeviceStateChangeHandler:()=>gd,registerOnErrorHandler:()=>pd,registerOnSessionStatusChangeHandler:()=>md,requestControl:()=>ud,sendControlCommand:()=>ld,terminateSession:()=>dd});var V={};n.r(V),n.d(V,{isSupported:()=>Cd,selectAppEntity:()=>wd});var _={};n.r(_),n.d(_,{getUserJoinedTeams:()=>bd,isSupported:()=>Sd});var B={};n.r(B),n.d(B,{getConfigSetting:()=>Ad,isSupported:()=>Id,joinedTeams:()=>_});var W={};n.r(W),n.d(W,{ChannelType:()=>Pd,fullTrust:()=>B,getTeamChannels:()=>Od,isSupported:()=>Fd,refreshSiteUrl:()=>Rd});var j={};n.r(j),n.d(j,{EffectChangeType:()=>_d,EffectFailureReason:()=>Bd,VideoFrameFormat:()=>Vd,isSupported:()=>Gd,notifySelectedVideoEffectChanged:()=>jd,registerForVideoEffect:()=>zd,registerForVideoFrame:()=>Wd});var z={};n.r(z),n.d(z,{ErrorLevel:()=>wf,frameProcessingTimeoutInMs:()=>hf,isSupported:()=>Tf,notifyFatalError:()=>Rf,notifySelectedVideoEffectChanged:()=>Ef,registerForVideoEffect:()=>Af,registerForVideoFrame:()=>Cf,updatePersonalizedEffects:()=>If});var $={};n.r($),n.d($,{addAndConfigure:()=>Uf,getAll:()=>Hf,isSupported:()=>Wf,reconfigure:()=>Vf,remove:()=>Bf,rename:()=>_f});var q={};n.r(q),n.d(q,{AppTypes:()=>$f,isSupported:()=>qf,tab:()=>$});var G={};n.r(G),n.d(G,{isSupported:()=>np,openAppDetail:()=>Yf,openFullStore:()=>Xf,openInContextStore:()=>ep,openSpecificStore:()=>tp});var J={};n.r(J),n.d(J,{DataResidency:()=>wp,authenticate:()=>lp,getAuthToken:()=>fp,getUser:()=>gp,notifyFailure:()=>vp,notifySuccess:()=>hp,registerAuthenticationHandlers:()=>up});var K={};n.r(K),n.d(K,{isSupported:()=>Bp,openAppInstallDialog:()=>_p});var Q={};n.r(Q),n.d(Q,{CameraStartMode:()=>qp,File:()=>Zp,FileFormat:()=>zp,ImageOutputFormats:()=>Qp,ImageUriType:()=>Kp,Media:()=>ng,MediaControllerEvent:()=>$p,MediaType:()=>Jp,Source:()=>Gp,VideoController:()=>og,captureImage:()=>Xp,hasPermission:()=>Yp,requestPermission:()=>eg,scanBarCode:()=>sg,selectMedia:()=>ig,viewImages:()=>ag});var Z={};n.r(Z),n.d(Z,{hasPermission:()=>Sg,isSupported:()=>Ag,requestPermission:()=>Eg,scanBarCode:()=>bg});var X={};n.r(X),n.d(X,{isSupported:()=>Rg,openChat:()=>Tg,openGroupChat:()=>Og});var Y={};n.r(Y),n.d(Y,{isSupported:()=>xg,read:()=>Ng,write:()=>Mg});var ee={};n.r(ee),n.d(ee,{addNAATrustedOrigins:()=>$g,canParentManageNAATrustedOrigins:()=>Bg,deleteNAATrustedOrigins:()=>qg,getParentOrigin:()=>_g,isDeeplyNestedAuthSupported:()=>Wg,isNAAChannelRecommended:()=>Vg});var te={};n.r(te),n.d(te,{chooseLocation:()=>Zg,isSupported:()=>Yg,showLocation:()=>Xg});var ne={};n.r(ne),n.d(ne,{getCurrentLocation:()=>tm,hasPermission:()=>nm,isSupported:()=>om,map:()=>te,requestPermission:()=>rm});var re={};n.r(re),n.d(re,{isSupported:()=>dm,open:()=>lm});var oe={};n.r(oe),n.d(oe,{getLocation:()=>pm,isSupported:()=>mm,showLocation:()=>gm});var ie={};n.r(ie),n.d(ie,{setOptions:()=>vm});var ae={};n.r(ae),n.d(ae,{CallType:()=>Em,EventActionSource:()=>Im,MeetingReactionType:()=>bm,MeetingType:()=>Sm,SharingProtocol:()=>Am,appShareButton:()=>ie,getAppContentStageSharingCapabilities:()=>Lm,getAppContentStageSharingState:()=>Hm,getAuthenticationTokenForAnonymousUser:()=>Fm,getIncomingClientAudioState:()=>Tm,getLiveStreamState:()=>km,getMeetingDetails:()=>Om,getMeetingDetailsVerbose:()=>Rm,joinMeeting:()=>Wm,registerLiveStreamChangedHandler:()=>xm,registerMeetingReactionReceivedHandler:()=>Bm,registerRaiseHandStateChangedHandler:()=>_m,registerSpeakingStateChangeHandler:()=>Vm,requestAppAudioHandling:()=>jm,requestStartLiveStreaming:()=>Mm,requestStopLiveStreaming:()=>Nm,shareAppContentToStage:()=>Dm,stopSharingAppContentToStage:()=>Um,toggleIncomingClientAudio:()=>Pm,updateMicState:()=>qm});var se={};n.r(se),n.d(se,{isSupported:()=>Zm,openPurchaseExperience:()=>Qm});var ce={};n.r(ce),n.d(ce,{composeMeeting:()=>eh,isSupported:()=>th,openCalendarItem:()=>Ym});var ue={};n.r(ue),n.d(ue,{composeMailWithHandoff:()=>ih,isSupported:()=>ah});var le={};n.r(le),n.d(le,{ComposeMailType:()=>fh,composeMail:()=>lh,handoff:()=>ue,isSupported:()=>dh,openMailItem:()=>uh});var de={};n.r(de),n.d(de,{enablePrintCapability:()=>gh,isSupported:()=>yh,print:()=>mh,registerBeforeUnloadHandler:()=>wh,registerBeforeUnloadHandlerHelper:()=>Ch,registerOnLoadHandler:()=>hh,registerOnLoadHandlerHelper:()=>vh});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Ih,selectPeople:()=>Eh});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Fh,showProfile:()=>Rh});var ge={};n.r(ge),n.d(ge,{closeSearch:()=>Hh,isSupported:()=>Uh,registerHandlers:()=>Dh,unregisterHandlers:()=>Lh});var me={};n.r(me),n.d(me,{getContent:()=>Bh,isSupported:()=>Wh});var he={};n.r(he),n.d(he,{SharingAPIMessages:()=>$h,history:()=>me,isSupported:()=>Zh,shareWebContent:()=>qh});var ve={};n.r(ve),n.d(ve,{close:()=>Yh,isSupported:()=>ev});var we={};n.r(we),n.d(we,{StageViewOpenMode:()=>nv,isSupported:()=>ov,open:()=>rv,self:()=>ve});var Ce={};n.r(Ce),n.d(Ce,{captureImages:()=>cv,isSupported:()=>lv,retrieveImages:()=>uv});var ye={};n.r(ye),n.d(ye,{CameraRestriction:()=>mv,Source:()=>hv,hasPermission:()=>vv,image:()=>Ce,requestPermission:()=>wv});var be={};n.r(be),n.d(be,{isSupported:()=>Iv,isWebStorageClearedOnUserLogOut:()=>Ev});var Se={};n.r(Se),n.d(Se,{CallModalities:()=>Pv,isSupported:()=>Rv,startCall:()=>Ov});var Ee={};n.r(Ee),n.d(Ee,{ExpectedFailureReason:()=>vo,FailedReason:()=>ho,Messages:()=>mo,notifyAppLoaded:()=>kv,notifyExpectedFailure:()=>xv,notifyFailure:()=>Nv,notifySuccess:()=>Mv});var Ae={};n.r(Ae),n.d(Ae,{getDragAndDropFiles:()=>Wv,isSupported:()=>zv});var Ie={};n.r(Ie),n.d(Ie,{getSettings:()=>Cw,registerOnRemoveHandler:()=>Sw,registerOnSaveHandler:()=>bw,setSettings:()=>yw,setValidityState:()=>ww});var Te={};n.r(Te),n.d(Te,{getDefaultSizeIfNotProvided:()=>Fw,startTask:()=>Iw,submitTask:()=>Pw,updateTask:()=>Tw});var Pe={};n.r(Pe),n.d(Pe,{ContainerState:()=>Nw,LiveShareHost:()=>Dw,UserMeetingRole:()=>Mw,isSupported:()=>xw});var Oe,Re,Fe,ke,Me,Ne,xe,De,Le,Ue,He={};function Ve(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(He),n.d(He,{CartStatus:()=>Zw,Intent:()=>Qw,addOrUpdateCartItems:()=>Yw,cartVersion:()=>Kw,getCart:()=>Xw,isSupported:()=>nC,removeCartItems:()=>eC,updateCartStatus:()=>tC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Oe||(Oe={})),function(e){e.M365Content="m365content"}(Re||(Re={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Fe||(Fe={})),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"}(ke||(ke={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Me||(Me={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ne||(Ne={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(xe||(xe={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(De||(De={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Le||(Le={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ue||(Ue={}));const _e=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const Be="2.0.1",We="2.0.2",je="2.0.3",ze="2.0.4",$e="2.0.1",qe="1.9.0",Ge="2.0.0",Je="1.7.0",Ke="1.8.0",Qe="1.9.0",Ze=n.t(_e,2).validOrigins,Xe=1500,Ye=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),et=/^https:\/\//,tt="https",nt="teams.microsoft.com",rt="The library has not yet been initialized",ot="The runtime has not yet been initialized",it="The runtime version is not supported",at="The call was not properly started";var st=n(933);const ct=lt,ut=2147483647;function lt(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 ft(e)}return dt(e,t,n)}function dt(e,t,n){if("string"==typeof e)return ht(e,t);if(ArrayBuffer.isView(e))return Et(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(wt(e,ArrayBuffer)||e&&wt(e.buffer,ArrayBuffer))return At(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(wt(e,SharedArrayBuffer)||e&&wt(e.buffer,SharedArrayBuffer)))return At(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 lt.from(r,t,n);const o=$t(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return lt.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 ft(e){return pt(e),gt(e<0?0:0|mt(e))}function pt(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 gt(e){if(e>ut)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,lt.prototype),t}function mt(e){if(e>=ut)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ut.toString(16)+" bytes");return 0|e}function ht(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!lt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|vt(e,t);let r=gt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function vt(e,t){if(lt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wt(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 Ct(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return yt(e).length;default:if(o)return r?-1:Ct(e).length;t=(""+t).toLowerCase(),o=!0}}function wt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ct(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 yt(e){return st.toByteArray(St(e))}lt.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}}(),lt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),lt.from=function(e,t,n){return dt(e,t,n)},Object.setPrototypeOf(lt.prototype,Uint8Array.prototype),Object.setPrototypeOf(lt,Uint8Array),lt.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}},lt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==lt.prototype};const bt=/[^+/0-9A-Za-z-_]/g;function St(e){if((e=(e=e.split("=")[0]).trim().replace(bt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Et(e){if(wt(e,Uint8Array)){const t=new Uint8Array(e);return At(t.buffer,t.byteOffset,t.byteLength)}return It(e)}function At(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,lt.prototype),r}function It(e){const t=e.length<0?0:0|mt(e.length),n=gt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Tt(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 Rt(r)}function Pt(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 Ft(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return kt(this,t,n);case"latin1":case"binary":return Mt(this,t,n);case"base64":return Nt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}lt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Tt(this,0,e):Pt.apply(this,arguments)};const Ot=4096;function Rt(e){const t=e.length;if(t<=Ot)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ot));return n}function Ft(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+=zt[e[r]];return o}function kt(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 Mt(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 Nt(e,t,n){return 0===t&&n===e.length?st.fromByteArray(e):st.fromByteArray(e.slice(t,n))}function xt(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 Dt(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 Lt(e,t,n,r){return Wt(Ct(t,e.length-n),e,n,r)}function Ut(e,t,n,r){return Wt(_t(t),e,n,r)}function Ht(e,t,n,r){return Wt(yt(t),e,n,r)}function Vt(e,t,n,r){return Wt(Bt(t,e.length-n),e,n,r)}function _t(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Bt(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 Wt(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}lt.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 Dt(this,e,t,n);case"utf8":case"utf-8":return Lt(this,e,t,n);case"ascii":case"latin1":case"binary":return Ut(this,e,t,n);case"base64":return Ht(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const zt=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 $t(e){if(lt.isBuffer(e)){const t=0|mt(e.length),n=gt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||jt(e.length)?gt(0):It(e):"Buffer"===e.type&&Array.isArray(e.data)?It(e.data):void 0}const qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Jt=new Uint8Array(16);function Kt(){if(!Gt&&(Gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gt(Jt)}const Qt=[];for(let e=0;e<256;++e)Qt.push((e+256).toString(16).slice(1));function Zt(e,t=0){return Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]}const Xt=function(e,t,n){if(qt.randomUUID&&!t&&!e)return qt.randomUUID();const r=(e=e||{}).random||(e.rng||Kt)();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 Zt(r)},Yt=/^(?:[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 en=function(e){return"string"==typeof e&&Yt.test(e)};var tn,nn,rn,on,an,sn,cn;!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"}(tn||(tn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(nn||(nn={})),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"}(rn||(rn={})),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"}(on||(on={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(an||(an={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(sn||(sn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(cn||(cn={}));const un={errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},ln={majorVersion:1,minorVersion:5},dn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},fn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),pn=new Error("Invalid response: Received more images than the specified max limit in the response.");function gn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function mn(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 hn(){return Xt()}function vn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&vn(e[t])})),Object.freeze(e)}function wn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Cn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function yn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function bn(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 Sn(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 En(e){return!(mn(`${e.majorVersion}.${e.minorVersion}`,`${ln.majorVersion}.${ln.minorVersion}`)>=0)}function An(e){return"https:"===e.protocol}function In(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=ct.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Tn(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 Pn(){if(On())throw new Error("window object undefined at SSR check");return window}function On(){return"undefined"==typeof window}function Rn(e,t){if(Mn(e)||!Nn(e)||!xn(e))throw t||new Error("id is not valid.")}function Fn(e,t){const n=e.toString().toLocaleLowerCase();if(Mn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!An(e))throw t||new Error("Url should be a valid https url")}function kn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Mn(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 Nn(e){return e.length<256&&e.length>4}function xn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Dn(e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}const Ln=!!performance&&"now"in performance;function Un(){return Ln?performance.now()+performance.timeOrigin:void 0}function Hn(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=>Hn(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=>Hn(e[n],t+1)))}class Vn{constructor(e=hn()){this.uuid=e,Dn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function _n(e){if(!(e instanceof Vn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Bn{}Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.additionalValidOrigins=[],Bn.initializePromise=void 0,Bn.isFramelessWindow=!1,Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.printCapabilityEnabled=!1,Bn.teamsJsInstanceId=(new Vn).toString();var Wn=n(815);const jn=new Vn,zn=Wn.debug.formatArgs;Wn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${jn.toString()}]`,zn.call(this,e)};const $n=(0,Wn.debug)("teamsJs");function qn(e){return $n.extend(e)}function Gn(e,t){return`${e}_${t}`}function Jn(e){return/^v\d+_[\w.]+$/.test(e)}var Kn=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 Qn=qn("runtime"),Zn=4;function Xn(e){return e.apiVersion===Zn}const Yn={apiVersion:-1,supports:{}};function er(e){if(Xn(e))return!0;throw-1===e.apiVersion?new Error(ot):new Error(it)}let tr=Yn;const nr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:dn,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:{}}}},rr=[tn.desktop,tn.web,tn.rigel,tn.surfaceHub,tn.teamsRoomsWindows,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays],or=[tn.android,tn.ios,tn.ipados,tn.visionOS],ir=[...rr,...or];function ar(e){let t=e;if(t.apiVersion<Zn&&sr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Xn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const sr=[{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=Kn(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})}}}],cr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:rr}],"1.9.0":[{capability:{location:{}},hostClientTypes:ir}],"2.0.0":[{capability:{people:{}},hostClientTypes:ir},{capability:{sharing:{}},hostClientTypes:[tn.desktop,tn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[tn.android,tn.desktop,tn.ios,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays,tn.web]},{capability:{webStorage:{}},hostClientTypes:[tn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[tn.android,tn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[tn.android,tn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[tn.android,tn.ios,tn.ipados,tn.visionOS]}]},ur=Qn.extend("generateBackCompatRuntimeConfig");function lr(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]=lr(e[r]||{},t[r]));return n}function dr(e,t,n){ur("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ur("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{mn(e,t)>=0&&n[t].forEach((e=>{void 0!==Bn.hostClientType&&e.hostClientTypes.includes(Bn.hostClientType)&&(r=lr(r,e.capability))}))}));const o={apiVersion:Zn,hostVersionsInfo:dn,isLegacyTeams:!0,supports:r};return ur("Runtime config after updating based on highestSupportedVersion: %o",o),o}const fr=Qn.extend("applyRuntimeConfig");function pr(e){"string"==typeof e.apiVersion&&(fr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),fr("Fast-forwarding runtime %o",e);const t=ar(e);fr("Applying runtime %o",t),tr=vn(t)}function gr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const mr="2.37.0",hr={childProxyingCommunication:!1};function vr(){hr.childProxyingCommunication=!0}function wr(){return hr.childProxyingCommunication}let Cr={disableEnforceOriginMatchForChildResponses:!1};function yr(){return Cr}function br(e){Cr=e}function Sr(e){return br(Object.assign(Object.assign({},Cr),e)),yr()}var Er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Ar=e=>{const{uuid:t}=e,n=Er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ir=e=>{const{uuidAsString:t}=e,n=Er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},Tr=e=>{const{uuidAsString:t}=e,n=Er(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Vn(t):void 0})},Pr=e=>{const{uuid:t}=e,n=Er(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Or(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 Rr=qn("flushMessageQueue");function Fr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Ar(o);Rr("Flushing message %s from %s message queue via postMessage.",Or(n),r),e.postMessage(n,t)}}}const kr=qn("internal"),Mr=kr.extend("ensureInitializeCalled"),Nr=kr.extend("ensureInitialized");function xr(){if(!Bn.initializeCalled)throw Mr(rt),new Error(rt)}function Dr(e,...t){if(!Bn.initializeCompleted)throw Nr("%s. initializeCalled: %s",rt,Bn.initializeCalled.toString()),new Error(rt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Bn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Bn.frameContext}".`)}return er(e)}function Lr(e=Be){const t=mn(Bn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Ur(){return Bn.hostClientType==tn.android||Bn.hostClientType==tn.ios||Bn.hostClientType==tn.ipados||Bn.hostClientType==tn.visionOS}function Hr(e=Be){if(!Ur()){throw{errorCode:ke.NOT_SUPPORTED_ON_PLATFORM}}if(!Lr(e)){throw{errorCode:ke.OLD_PLATFORM}}}function Vr(e){let t=Bn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&et.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Bn.additionalValidOrigins=t}function _r(e){if(!zr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Wr}-${jr}).`)}function Br(e){if(Mn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if($r(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Wr=4,jr=256;function zr(e){return e.length<jr&&e.length>Wr}function $r(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function qr(e){if(!(e instanceof Jr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Gr{constructor(e){this.idAsString=e,Br(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Jr extends Gr{constructor(e){super(e),_r(e)}toJSON(){return{appIdAsString:this.toString()}}}function Kr(e){return null==e}var Qr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Zr;const Xr="v1",Yr=qn("messageChannels.telemetry");function eo(){return Qr(this,void 0,void 0,(function*(){if(Zr)return Yr("Returning telemetry port from cache"),Zr;if(!to())throw un;return Zr=yield ac(Gn(Xr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Zr}))}function to(){var e;return!(!Dr(tr)||!(null===(e=tr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function no(){Zr=void 0}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=qn("messageChannels.dataLayer");function so(){return ro(this,void 0,void 0,(function*(){if(oo)return ao("Returning dataLayer port from cache"),oo;if(!co())throw un;return oo=yield ac(Gn(io,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),oo}))}function co(){var e;return!(!Dr(tr)||!(null===(e=tr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function uo(){oo=void 0}function lo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Dr(tr),Es(e)}function fo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Dr(tr),As(e)}const po="v2",go=qn("app"),mo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ho,vo;function wo(){return Bn.initializeCompleted}function Co(){return Bn.frameContext}function yo(e){return Bi(Gn(po,"app.initialize"),e)}function bo(e){Js.currentWindow=e}function So(){Bn.initializeCalled&&(ss(),Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.initializePromise=void 0,Bn.additionalValidOrigins=[],Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.isFramelessWindow=!1,no(),uo(),Zs())}function Eo(){return new Promise((e=>{xr(),e(Xs(Gn(po,"app.getContext"),"getContext"))})).then((e=>ko(e)))}function Ao(){xr(),Wi(Gn(po,"app.notifyAppLoaded"))}function Io(){return $i(Gn(po,"app.notifySuccess"))}function To(e){xr(),zi(Gn(po,"app.notifyFailure"),e)}function Po(e){xr(),ji(Gn(po,"app.notifyExpectedFailure"),e)}function Oo(e){Qi(Gn(po,"app.registerOnThemeChangeHandler"),e)}function Ro(e){hs(e)}function Fo(e){return Zi(Gn(po,"app.openLink"),e)}function ko(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:nn.teams,clientType:e.hostClientType?e.hostClientType:tn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Jr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Bn.frameContext,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 Mo(e){qo(Gn($o,"dialog.update.resize"),e)}function No(){return!(!Dr(tr)||!tr.supports.dialog)&&!!tr.supports.dialog.update}function xo(e,t,n){Jo(Gn($o,"dialog.url.bot.open"),e,t,n)}function Do(){return Dr(tr)&&void 0!==(tr.supports.dialog&&tr.supports.dialog.url&&tr.supports.dialog.url.bot)}function Lo(e){if(Dr(tr,rn.task),!Vo())throw un;uc(Gn($o,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Uo(e){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Vo())throw un;uc(Gn($o,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Ho(e){if(Dr(tr,rn.task),!Vo())throw un;for(ds("messageForChild"),ls(Gn($o,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Xo.reverse();Xo.length>0;){e(Xo.pop())}}function Vo(){var e,t;return Dr(tr)&&!!(null===(t=null===(e=tr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function _o(e,t,n){Go(Gn($o,"dialog.url.open"),e,t,n)}function Bo(e,t){Ko(Gn($o,"dialog.url.submit"),e,t)}function Wo(){return Dr(tr)&&void 0!==(tr.supports.dialog&&tr.supports.dialog.url)}function jo(e){return{url:e.url,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function zo(e){const t=jo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ho||(ho={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(vo||(vo={})),go("teamsjs instance is version %s, starting at %s UTC (%s local)",mr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(On())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?go("teamsjs is being used from %s. %s",t,n):go("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const $o="v2";function qo(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.task,rn.meetingStage),!No())throw un;uc(e,"tasks.updateTask",[t])}function Go(e,t,n,r){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Wo())throw un;r&&ls(Gn($o,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);uc(e,"tasks.startTask",[jo(t)],((e,t)=>{null==n||n({err:e,result:t}),ds("messageForParent")}))}function Jo(e,t,n,r){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Do())throw un;r&&ls(Gn($o,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);uc(e,"tasks.startTask",[zo(t)],((e,t)=>{null==n||n({err:e,result:t}),ds("messageForParent")}))}function Ko(e,t,n){if(Dr(tr,rn.task),!Wo())throw un;uc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Qo(e){return{card:e.card,height:e.size?e.size.height:sn.Small,width:e.size?e.size.width:sn.Small,title:e.title}}function Zo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}const Xo=[];function Yo(e){Bn.frameContext&&(Bn.frameContext===rn.task?Xo.push(e):ds("messageForChild"))}function ei(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!ti())throw un;const n=Zo(e);uc(Gn($o,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ti(){const e=tr.hostVersionsInfo&&tr.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(tr.hostVersionsInfo.adaptiveCardSchemaVersion);return Dr(tr)&&void 0!==(e&&tr.supports.dialog&&tr.supports.dialog.card&&tr.supports.dialog.card.bot)}function ni(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!ri())throw un;const n=Qo(e);uc(Gn($o,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ri(){const e=tr.hostVersionsInfo&&tr.hostVersionsInfo.adaptiveCardSchemaVersion&&!En(tr.hostVersionsInfo.adaptiveCardSchemaVersion);return Dr(tr)&&void 0!==(e&&tr.supports.dialog&&tr.supports.dialog.card)}function oi(){ls(Gn($o,"dialog.registerMessageForChildHandler"),"messageForChild",Yo,!1)}function ii(){return!(!Dr(tr)||!tr.supports.dialog)}const ai="v2";var si,ci;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(si||(si={}));class ui{constructor(){this.enabled=!0,this.selected=!1}}let li,di,fi,pi,gi;function mi(){ls(Gn(ai,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ci,!1),ls(Gn(ai,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",bi,!1),ls(Gn(ai,"menus.registerSetModuleViewHandler"),"setModuleView",vi,!1)}function hi(e,t){if(Dr(tr),!Si())throw un;fi=t,uc(Gn(ai,"menus.setUpViews"),"setUpViews",[e])}function vi(e){fi&&fi(e)||(Dr(tr),uc(Gn(ai,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function wi(e,t){if(Dr(tr),!Si())throw un;li=t,uc(Gn(ai,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ci(e){li&&li(e)||(Dr(tr),uc(Gn(ai,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function yi(e,t){if(Dr(tr),!Si())throw un;di=t,uc(Gn(ai,"menus.showActionMenu"),"showActionMenu",[e])}function bi(e){di&&di(e)||(Dr(tr),uc(Gn(ai,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Si(){return!(!Dr(tr)||!tr.supports.menus)}function Ei(){ls(Gn(Ha,"pages.config.registerSettingsSaveHandler"),"settings.save",Fi,!1),ls(Gn(Ha,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Ni,!1)}function Ai(e){return Ga(Gn(Ha,"pages.config.setValidityState"),e)}function Ii(e){return Ka(Gn(Ha,"pages.config.setConfig"),e)}function Ti(e){Pi(Gn(Ha,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Kr(e)&&!Di())throw un}))}function Pi(e,t,n){!Kr(t)&&Dr(tr,rn.settings),n&&n(),pi=t,!Kr(t)&&uc(e,"registerHandler",["save"])}function Oi(e){Ri(Gn(Ha,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Kr(e)&&!Di())throw un}))}function Ri(e,t,n){!Kr(t)&&Dr(tr,rn.remove,rn.settings),n&&n(),gi=t,!Kr(t)&&uc(e,"registerHandler",["remove"])}function Fi(e){const t=new Mi(e);pi?pi(t):Rs()?Ls("settings.save",[e]):t.notifySuccess()}function ki(e){ps(Gn(Ha,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[rn.content],(()=>{if(!Di())throw un}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(ci||(ci={}));class Mi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),uc(Gn(Ha,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),uc(Gn(Ha,"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 Ni(){const e=new xi;gi?gi(e):Rs()?Ls("settings.remove",[]):e.notifySuccess()}class xi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),uc(Gn(Ha,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),uc(Gn(Ha,"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 Di(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.config}class Li{}class Ui extends Li{validate(e){return!0}deserialize(e){return e}}var Hi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Vi=6e4,_i=qn("app");function Bi(e,t){if(On()){return _i.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return bn((()=>Ki(e,t)),Vi,new Error("SDK initialization timed out."))}function Wi(e){uc(e,mo.AppLoaded,[mr])}function ji(e,t){uc(e,mo.ExpectedFailure,[t.reason,t.message])}function zi(e,t){uc(e,mo.Failure,[t.reason,t.message])}function $i(e){return Hi(this,void 0,void 0,(function*(){if(Bn.initializeCompleted)return Gi(e);if(!Bn.initializePromise)throw new Error(rt);return Bn.initializePromise.then((()=>Gi(e)))}))}function qi(){var e;return Dr(tr)&&!!(null===(e=tr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Gi(e){return Hi(this,void 0,void 0,(function*(){return qi()?oc(mo.Success,[mr],new Ui,e).then((()=>({hasFinishedSuccessfully:!0}))):(uc(e,mo.Success,[mr]),{hasFinishedSuccessfully:"unknown"})}))}const Ji=_i.extend("initializeHelper");function Ki(e,t){return new Promise((n=>{Bn.initializeCalled||(Bn.initializeCalled=!0,as(),Bn.initializePromise=Qs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Be})=>{Bn.frameContext=e,Bn.hostClientType=t,Bn.clientSupportedSDKVersion=r;try{Ji("Parsing %s",n);const e=JSON.parse(n);if(Ji("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&pr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Ji("Attempting to parse %s as an SDK version",n),isNaN(mn(n,Be))||(Bn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Ji("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");pr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;pr(dr(Bn.clientSupportedSDKVersion,nr,cr))}}Bn.initializeCompleted=!0})),mi(),Ei(),oi()),Array.isArray(t)&&Vr(t),void 0!==Bn.initializePromise?n(Bn.initializePromise):Ji("GlobalVars.initializePromise is unexpectedly undefined")}))}function Qi(e,t){!Kr(t)&&xr(),gs(e,t)}function Zi(e,t){return new Promise((n=>{Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),n(Ys(e,"executeDeepLink",t))}))}var Xi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Yi=[];const ea=qn("validateOrigin");function ta(){return Xi(this,void 0,void 0,(function*(){yield ra()}))}function na(){return 0===Yi.length}function ra(e=!1){return Xi(this,void 0,void 0,(function*(){if(!na()&&!e)return Yi;if(On())return Yi=Ze,Ze;{ea("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Xe);return fetch(Ye,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ea("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(oa(JSON.stringify(e)))return Yi=e.validOrigins,Yi;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ea(`validOrigins fetch call to CDN failed due to Timeout of ${Xe} ms. Defaulting to fallback list`):ea("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Yi=Ze,Yi)))}}))}function oa(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 ea("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ia(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 aa(e,t){return ra(t).then((t=>{if(!An(e))return ea("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=>ia(e,n))))return!0;for(const e of Bn.additionalValidOrigins){if(ia("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ea("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,Bn.additionalValidOrigins),!1}))}function sa(e){ps(Gn(Ha,"pages.appButton.onClick"),"appButtonClick",e,[rn.content],(()=>{if(!la())throw un}))}function ca(e){ps(Gn(Ha,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[rn.content],(()=>{if(!la())throw un}))}function ua(e){ps(Gn(Ha,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[rn.content],(()=>{if(!la())throw un}))}function la(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.appButton}function da(){ts()}function fa(){return _a(Gn(Ha,"pages.backStack.navigateBack"))}function pa(e){ga(Gn(Ha,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Kr(e)&&!ma())throw un}))}function ga(e,t,n){!Kr(t)&&Dr(tr),n&&n(),es(t),!Kr(t)&&uc(e,"registerHandler",["backButton"])}function ma(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.backStack}function ha(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!wa())throw un;t(tc(Gn(Ha,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function va(){return new Promise((e=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!wa())throw un;e(tc(Gn(Ha,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function wa(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.currentApp}function Ca(){if(Dr(tr,rn.content),!ba())throw un;uc(Gn(Ha,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ya(){if(Dr(tr,rn.content),!ba())throw un;uc(Gn(Ha,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ba(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.fullTrust}function Sa(e){return Ba(Gn(Ha,"pages.tabs.navigateToTab"),e)}function Ea(e){return ja(Gn(Ha,"pages.tabs.getTabInstances"),e)}function Aa(e){return za(Gn(Ha,"pages.tabs.getMruTabInstances"),e)}function Ia(){return!(!Dr(tr)||!tr.supports.pages)&&!!tr.supports.pages.tabs}var Ta,Pa;function Oa(e){const t=Gn(Ha,"pages.returnFocus");if(Dr(tr),!Ua())throw un;if(void 0===e&&uc(t,"returnFocus",[!1]),"boolean"==typeof e)uc(t,"returnFocus",[e]);else switch(e){case Pa.PreviousLandmark:case Pa.GoToActivityFeed:uc(t,"returnFocus",[!1,e]);break;case Pa.NextLandmark:uc(t,"returnFocus",[!0,e])}}function Ra(e){ps(Gn(Ha,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ua())throw un}))}function Fa(e){qa(Gn(Ha,"pages.setCurrentFrame"),e)}function ka(e,t,n){ta(),Bi(Gn(Ha,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Fa(e)}function Ma(){return Ja(Gn(Ha,"pages.getConfig."))}function Na(e){return Va(Gn(Ha,"pages.navigateCrossDomain"),e)}function xa(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Ua())throw un;const n=Gn(Ha,"pages.navigateToApp");if(tr.isLegacyTeams){t(Ys(n,"executeDeepLink",Sn(Qa(e)?e:Za(e))))}else{t(Ys(n,"pages.navigateToApp",Qa(e)?Xa(e):e))}}))}function Da(e){return $a(Gn(Ha,"pages.shareDeepLink"),e)}function La(e){ps(Gn(Ha,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Kr(e)&&!Ua())throw un}))}function Ua(){return!(!Dr(tr)||!tr.supports.pages)}ta(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ta||(Ta={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Pa||(Pa={}));const Ha="v2";function Va(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage),!Ua())throw un;n(ec(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function _a(e){return new Promise((t=>{if(Dr(tr),!ma())throw un;t(ec(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Ba(e,t){return new Promise((n=>{if(Dr(tr),!Ia())throw un;n(ec(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Wa(e,t){if(Dr(tr),!Ua())throw un;uc(e,"returnFocus",[t])}function ja(e,t){return new Promise((n=>{if(Dr(tr),!Ia())throw un;n(Xs(e,"getTabInstances",t))}))}function za(e,t){return new Promise((n=>{if(Dr(tr),!Ia())throw un;n(Xs(e,"getMruTabInstances",t))}))}function $a(e,t){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!Ua())throw un;uc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function qa(e,t){if(Dr(tr,rn.content),!Ua())throw un;uc(e,"setFrameContext",[t])}function Ga(e,t){if(Dr(tr,rn.settings,rn.remove),!Di())throw un;uc(e,"settings.setValidityState",[t])}function Ja(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.settings,rn.remove,rn.sidePanel),!Ua())throw un;t(Xs(e,"settings.getSettings"))}))}function Ka(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.settings,rn.sidePanel),!Di())throw un;n(Ys(e,"settings.setSettings",t))}))}function Qa(e){return e.appId instanceof Jr}function Za(e){return Object.assign(Object.assign({},e),{appId:new Jr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Xa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ya;function es(e){Ya=e}function ts(){ls(Gn(Ha,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ns,!1)}function ns(){Ya&&Ya()||(Rs()?Ls("backButtonPress",[]):fa())}var rs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 os=qn("handlers");class is{static initializeHandlers(){is.handlers.themeChange=ms,is.handlers.load=Cs,is.handlers.beforeUnload=Ss,ts()}static uninitializeHandlers(){is.handlers={},is.themeChangeHandler=null,is.loadHandler=null,is.beforeUnloadHandler=null,is.beforeSuspendOrTerminateHandler=null,is.resumeHandler=null}}function as(){is.initializeHandlers()}function ss(){is.uninitializeHandlers()}is.handlers={},is.themeChangeHandler=null,is.loadHandler=null,is.beforeUnloadHandler=null,is.beforeSuspendOrTerminateHandler=null,is.resumeHandler=null,is.hostToAppPerformanceMetricsHandler=null;const cs=os.extend("callHandler");function us(e,t){const n=is.handlers[e];if(n){cs("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Rs()?(Ls(e,t),[!1,void 0]):(cs("Handler for action message %s not found.",e),[!1,void 0])}function ls(e,t,n,r=!0,o=[]){n?(is.handlers[t]=n,r&&uc(e,"registerHandler",[t,...o])):delete is.handlers[t]}function ds(e){delete is.handlers[e]}function fs(e){return null!=is.handlers[e]}function ps(e,t,n,r,o){n&&Dr(tr,...r),o&&o(),ls(e,t,n)}function gs(e,t){is.themeChangeHandler=t,!Kr(t)&&uc(e,"registerHandler",["themeChange"])}function ms(e){is.themeChangeHandler&&is.themeChangeHandler(e),Rs()&&Ls("themeChange",[e])}function hs(e){is.hostToAppPerformanceMetricsHandler=e}function vs(e){is.hostToAppPerformanceMetricsHandler&&is.hostToAppPerformanceMetricsHandler(e)}function ws(e,t){is.loadHandler=t,!Kr(t)&&uc(e,"registerHandler",["load"])}function Cs(e){const t=ys(e);is.resumeHandler?(is.resumeHandler(t),Rs()&&Ls("load",[t])):is.loadHandler&&(is.loadHandler(e),Rs()&&Ls("load",[e]))}function ys(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function bs(e,t){is.beforeUnloadHandler=t,!Kr(t)&&uc(e,"registerHandler",["beforeUnload"])}function Ss(){return rs(this,void 0,void 0,(function*(){const e=()=>{uc(Gn("v2","handleBeforeUnload"),"readyToUnload",[])};is.beforeSuspendOrTerminateHandler?(yield is.beforeSuspendOrTerminateHandler(),Rs()?Ls("beforeUnload"):e()):is.beforeUnloadHandler&&is.beforeUnloadHandler(e)||(Rs()?Ls("beforeUnload"):e())}))}function Es(e){is.beforeSuspendOrTerminateHandler=e,!Kr(e)&&uc(Gn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function As(e){is.resumeHandler=e,!Kr(e)&&uc(Gn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Is=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ts=qn("childProxyingCommunication");class Ps{}function Os(){Ps.window=null,Ps.origin=null,Ps.messageQueue=[]}function Rs(){return!!wr()&&!!Ps.window}function Fs(e,t){return!!wr()&&(Ps.window&&!Ps.window.closed&&e!==Ps.window||(Ps.window=e,Ps.origin=t),Ps.window&&Ps.window.closed?(Ps.window=null,Ps.origin=null,!1):Ps.window===e)}function ks(e,t,n,r){return Is(this,void 0,void 0,(function*(){Ps.window===t&&(Fr(Ps.window,Ps.origin,Ps.messageQueue,"child"),Ns(e,n,r))}))}Ps.messageQueue=[];const Ms=Ts.extend("handleIncomingMessageFromChild");function Ns(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Ir(e.data),[o,i]=us(r.func,r.args);if(o&&void 0!==i)return Ms("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Or(r),r.func),void Ds(r.id,r.uuid,Array.isArray(i)?i:[i]);Ms("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Or(r),r.func),xs(r,t,n)}function xs(e,t,n){const r=t(Gn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ps.origin;n(r.uuid,((...t)=>{if(!Ps.window)return;if(!yr().disableEnforceOriginMatchForChildResponses&&o!==Ps.origin)return void Ms("Origin of child window has changed, not sending response back to child window");const n=t.pop();Ms("Message from parent being relayed to child, id: %s",Or(e)),Ds(e.id,e.uuid,t,n)}))}function Ds(e,t,n,r){const o=Ps.window,i=Us(e,t,n,r),a=Pr(i),s=Ps.origin;o&&s&&(Ms("Sending message %s to %s via postMessage, args = %o",Or(a),"child",a.args),o.postMessage(a,s))}function Ls(e,t){const n=Ps.window,r=Hs(e,t),o=Ps.origin;n&&o?n.postMessage(r,o):Ps.messageQueue.push(r)}function Us(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Hs(e,t){return{func:e,args:t||[]}}class Vs{static storeCallbackInformation(e,t){Vs.callbackInformation.set(e,t)}static clearMessages(){Vs.callbackInformation.clear()}static deleteMessageInformation(e){Vs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?vs({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=Vs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(vs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Vs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Vs.callbackInformation=new Map;const _s=qn("nestedAppAuthUtils"),Bs=_s.extend("tryPolyfillWithNestedAppAuthBridge"),Ws="v2";function js(e,t,n){var r;const o=Bs;if(Bn.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=$s(a,n);s&&(a.nestedAppAuthBridge=s)}const zs=_s.extend("createNestedAppAuthBridge");function $s(e,t){const n=zs;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Gn(Ws,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var qs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gs=qn("communication");class Js{}class Ks{}function Qs(e,t){if(Ks.messageListener=e=>vc(e),Js.currentWindow=Js.currentWindow||Pn(),Js.parentWindow=Js.currentWindow.parent!==Js.currentWindow.self?Js.currentWindow.parent:Js.currentWindow.opener,Js.topWindow=Js.currentWindow.top,(Js.parentWindow||e)&&Js.currentWindow.addEventListener("message",Ks.messageListener,!1),!Js.parentWindow){const e=Js.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Bn.isFramelessWindow=!0,e.onNativeMessage=Pc}try{return Js.parentOrigin="*",nc(t,"initialize",[mr,Zn,e]).then((([e,t,n,r])=>(js(r,Js.currentWindow,{onMessage:Cc,sendPostMessage:dc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Js.parentOrigin=null}}function Zs(){Js.currentWindow&&Js.currentWindow.removeEventListener("message",Ks.messageListener,!1),Js.currentWindow=null,Js.parentWindow=null,Js.parentOrigin=null,Ks.parentMessageQueue=[],Ks.nextMessageId=0,Ks.callbacks.clear(),Ks.promiseCallbacks.clear(),Ks.portCallbacks.clear(),Ks.legacyMessageIdsToUuidMap={},Vs.clearMessages(),Os()}function Xs(e,t,...n){return nc(e,t,n).then((([e])=>e))}function Ys(e,t,...n){return nc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function ec(e,t,n,...r){return nc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function tc(e,t,...n){return nc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function nc(e,t,n=void 0){if(!Jn(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(cc(mc(e,t,n).uuid))}))}function rc(e){return e.map((e=>gr(e)?e.serialize():e))}function oc(e,t,n,r,o){var i;return qs(this,void 0,void 0,(function*(){const a=rc(t),[s]=yield nc(r,e,a);if(o&&o(s)||!o&&Ve(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(`${ke.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function ic(e,t,n,r){var o;return qs(this,void 0,void 0,(function*(){const i=rc(t),[a]=yield nc(n,e,i);if(r&&r(a)||!r&&Ve(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${ke.INTERNAL_ERROR}, message: Invalid response from host`)}))}function ac(e,t,n=void 0){if(!Jn(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(mc(e,t,n).uuid)}function sc(e){return new Promise(((t,n)=>{Ks.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 cc(e){return new Promise((t=>{Ks.promiseCallbacks.set(e,t)}))}function uc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Jn(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=mc(e,t,o);r&&Ks.callbacks.set(i.uuid,r)}Ks.parentMessageQueue=[],Ks.topMessageQueue=[],Ks.nextMessageId=0,Ks.callbacks=new Map,Ks.promiseCallbacks=new Map,Ks.portCallbacks=new Map,Ks.legacyMessageIdsToUuidMap={};const lc=Gs.extend("sendNestedAuthRequestToTopWindow");function dc(e,t){const n=lc,r=Js.topWindow,o=Dc(e,t);return n("Message %s information: %o",Or(o),{actionName:o.func}),pc(r,o)}const fc=Gs.extend("sendRequestToTargetWindowHelper");function pc(e,t){const n=fc,r=Mc(e),o=Ar(t);if(Bn.isFramelessWindow)Js.currentWindow&&Js.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Or(o),r),Js.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=kc(e);e&&i?(n("Sending message %s to %s via postMessage",Or(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Or(o),r),Fc(e).push(t))}return t}const gc=Gs.extend("sendMessageToParentHelper");function mc(e,t,n,r,o){const i=gc,a=Js.parentWindow,s=xc(e,t,n,r,o);return Vs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Or(s),{actionName:t,args:n}),pc(a,s)}const hc=Gs.extend("processIncomingMessage");function vc(e){return qs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void hc("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return bc(t,n).then((r=>{r?(Sc(t,n),t!==Js.parentWindow?Fs(t,n)&&ks(e,t,mc,((e,t)=>Ks.callbacks.set(e,t))):Pc(e)):hc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const wc=Gs.extend("processAuthBridgeMessage");function Cc(e,t){var n,r;const o=wc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?bc(c,u)?(Js.topWindow&&!Js.topWindow.closed&&c!==Js.topWindow||(Js.topWindow=c,Js.topOrigin=u),Js.topWindow&&Js.topWindow.closed&&(Js.topWindow=null,Js.topOrigin=null),Fr(Js.topWindow,Js.topOrigin,Ks.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 yc=Gs.extend("shouldProcessIncomingMessage");function bc(e,t){return qs(this,void 0,void 0,(function*(){if(Js.currentWindow&&e===Js.currentWindow)return yc("Should not process message because it is coming from the current window"),!1;if(Js.currentWindow&&Js.currentWindow.location&&t&&t===Js.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return yc("Message has an invalid origin of %s",t),!1}const n=yield aa(e);return n||yc("Message has an invalid origin of %s",t),n}}))}function Sc(e,t){Bn.isFramelessWindow||Js.parentWindow&&!Js.parentWindow.closed&&e!==Js.parentWindow||(Js.parentWindow=e,Js.parentOrigin=t),Js.parentWindow&&Js.parentWindow.closed&&(Js.parentWindow=null,Js.parentOrigin=null),Fr(Js.parentWindow,Js.parentOrigin,Ks.parentMessageQueue,"parent")}const Ec=Gs.extend("handleIncomingMessageFromParent");function Ac(e){const t=Ec;if(!e.uuid)return Ks.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Ic(Ks.callbacks,t);if(n)return n;const r=Ic(Ks.promiseCallbacks,t);if(r)return r;const o=Ic(Ks.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Or(e))}function Ic(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Tc(e,t){const n=Ic(t,e.uuid);n&&t.delete(n),e.uuid?Ks.legacyMessageIdsToUuidMap={}:delete Ks.legacyMessageIdsToUuidMap[e.id]}function Pc(e){const t=Ec,n=Un();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Tr(r),i=Ac(o);if(i){const r=Ks.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Vs.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]),Oc(e)||(t("Removing registered callback for message %s",i.toString()),Tc(o,Ks.callbacks)));const a=Ks.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()),Tc(o,Ks.promiseCallbacks));const s=Ks.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()),Tc(o,Ks.portCallbacks)}o.uuid&&(Ks.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Vs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Or(r),r.func),us(r.func,r.args)}else t("Received an unknown message: %O",e)}function Oc(e){return!0===e.data.isPartialResponse}function Rc(){return Js.topWindow!==Js.parentWindow}function Fc(e){return e===Js.topWindow&&Rc()?Ks.topMessageQueue:e===Js.parentWindow?Ks.parentMessageQueue:[]}function kc(e){return e===Js.topWindow&&Rc()?Js.topOrigin:e===Js.parentWindow?Js.parentOrigin:null}function Mc(e){return e===Js.topWindow&&Rc()?"top":e===Js.parentWindow?"parent":null}function Nc(e,t){let n;n=Js.currentWindow.setInterval((()=>{0===Fc(e).length&&(clearInterval(n),t())}),100)}function xc(e,t,n,r,o){const i=Ks.nextMessageId++,a=new Vn;Ks.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Bn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Un(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Dc(e,t){const n=Ks.nextMessageId++,r=new Vn;return Ks.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Un(),apiVersionTag:t,args:[],data:e}}const Lc="v1";function Uc(e){if(!Kr(e)&&Dr(tr),!Kr(e)&&!Hc())throw un;e?ls(Gn(Lc,"log.request"),"log.request",(()=>{const t=e();uc(Gn(Lc,"log.receive"),"log.receive",[t])})):ds("log.request")}function Hc(){return!(!Dr(tr)||!tr.supports.logs)}var Vc,_c,Bc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Vc||(Vc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(_c||(_c={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Bc||(Bc={}));const Wc="v1";function jc(e,t){Dr(tr),uc(Gn(Wc,"uploadCustomApp"),"uploadCustomApp",[e],t||gn())}function zc(e,t,n){Dr(tr),uc(Gn(Wc,"sendCustomMessage"),e,t,n)}function $c(e,t){if(Dr(tr),!Rs())throw new Error("The child window has not yet been initialized or is not present");Ls(e,t)}function qc(e,t){Dr(tr),ls(Gn(Wc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Gc(e,t){Dr(tr),ls(Gn(Wc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Jc(e){Dr(tr,rn.content,rn.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];uc(Gn(Wc,"openFilePreview"),"openFilePreview",t)}const Kc="v1";function Qc(e){return new Promise((t=>{if(Dr(tr,rn.content),!Yc())throw un;const n=Ys(Gn(Kc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ls(Gn(Kc,"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&&ls(Gn(Kc,"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 Zc(){if(Dr(tr,rn.content),!Yc())throw un;uc(Gn(Kc,"conversations.closeConversation"),"conversations.closeConversation"),ds("startConversation"),ds("closeConversation")}function Xc(){return new Promise((e=>{if(Dr(tr),!Yc())throw un;e(Xs(Gn(Kc,"conversations.getChatMember"),"getChatMembers"))}))}function Yc(){return!(!Dr(tr)||!tr.supports.conversations)}var eu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const tu="v2",nu=qn("copilot");function ru(){var e;return Dr(tr)&&!!(null===(e=tr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function ou(e,t){var n;return void 0===t&&(t=null!==(n=Un())&&void 0!==n?n:Date.now()),eu(this,void 0,void 0,(function*(){return Dr(tr),nu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),ic("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Gn(tu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var iu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const au="v2",su=qn("copilot");function cu(){var e,t;return Dr(tr)&&(!!(null===(e=tr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=tr.supports.copilot)||void 0===t?void 0:t.eligibility))}function uu(e){var t,n;return iu(this,void 0,void 0,(function*(){if(Dr(tr),!cu())throw new Error(`Error code: ${un.errorCode}, message: Not supported on platform`);if((null===(t=tr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return su("Eligibility information is already available on runtime."),tr.hostVersionsInfo.appEligibilityInformation;su("Eligibility information is not available on runtime. Requesting from host.");const r=yield Xs(Gn(au,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ve(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!lu(r))throw new Error("Error deserializing eligibility information");return r}))}function lu(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)}const du="v2";class fu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function pu(e){const t=e;return t.responseType===hu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const gu="Action.Execute";var mu,hu,vu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(mu||(mu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(hu||(hu={}));class wu extends Li{validate(e){return pu(e)}deserialize(e){return e}}function Cu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(vu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function yu(e){e.requestType===mu.ActionExecuteInvokeRequest?bu(e):e.requestType===mu.QueryMessageExtensionRequest&&Su(e)}function bu(e){if(e.type!==gu){throw{errorCode:vu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${gu}"`}}if(!Hn(e.data)){throw{errorCode:vu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Su(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 Eu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;const r=new Jr(e);return yu(n),nc(Gn(du,"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 Au(e,t){if(Dr(tr,rn.content),!Ou())throw un;const n=new Jr(e);return nc(Gn(du,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Iu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;const r=new Jr(e);return yu(n),nc(Gn(du,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Tu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;return Rn(e,new Error("titleId is Invalid.")),Rn(t,new Error("oauthConfigId is Invalid.")),nc(Gn(du,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Pu(e,t,n){if(Dr(tr,rn.content),!Ou())throw un;return Rn(e,new Error("titleId is Invalid.")),t&&Fn(t),nc(Gn(du,"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 Ou(){return!(!Dr(tr)||!tr.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(vu||(vu={}));var Ru=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Fu="v2";function ku(e,t,n){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),ic("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Gn(Fu,"externalAppAuthenticationForCEA.authenticateWithSSO"),Cu)}))}function Mu(e,t,n){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),ic("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Gn(Fu,"externalAppAuthenticationForCEA.authenticateWithOauth"),Cu)}))}function Nu(e,t,n,r){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),bu(r),oc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new fu(r),n.url.href,n.width,n.height,n.isExternal],new wu,Gn(Fu,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Cu)}))}function xu(e,t,n,r){return Ru(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Du())throw un;return Lu(e,t),bu(r),oc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new fu(r),n.authId,n.connectionName,n.claims,n.silent],new wu,Gn(Fu,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Cu)}))}function Du(){return!(!Dr(tr)||!tr.supports.externalAppAuthenticationForCEA)}function Lu(e,t){Rn(t,new Error("conversation id is not valid.")),qr(e)}const Uu="v2";var Hu,Vu;function _u(e,t){if(Dr(tr,rn.content),!Wu())throw un;const n=new Jr(e);return nc(Gn(Uu,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Bu(e,t,n){if(Dr(tr,rn.content),!Wu())throw un;const r=new Jr(e);return nc(Gn(Uu,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Wu(){return!(!Dr(tr)||!tr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Hu||(Hu={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Vu||(Vu={}));var ju=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const zu="v2";function $u(e,t,n){return ju(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Gu())throw un;Lu(e,t);const[r,o]=yield nc(Gn(zu,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function qu(e,t,n){return ju(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Gu())throw un;Lu(e,t);const r=yield Xs(Gn(zu,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Gu(){return!(!Dr(tr)||!tr.supports.externalAppCardActionsForCEA)}var Ju;function Ku(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ju).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Ju||(Ju={}));var Qu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Zu="v2";function Xu(e,t,n){return Qu(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!Yu())throw un;return el(e,n),ic("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new tl(t),n],Gn(Zu,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Ku)}))}function Yu(){return!(!Dr(tr)||!tr.supports.externalAppCardActionsForDA)}function el(e,t){qr(e),_n(t)}class tl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var nl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const rl="v2";function ol(e,t,n){return nl(this,void 0,void 0,(function*(){if(Dr(tr,rn.content),!il())throw un;const r=new Jr(e),[o,i]=yield nc(Gn(rl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function il(){return!(!Dr(tr)||!tr.supports.externalAppCommands)}const al="v1";var sl,cl,ul,ll,dl,fl;function pl(e,t){if(Dr(tr,rn.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");uc(Gn(al,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function gl(e,t){if(Dr(tr,rn.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");uc(Gn(al,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function ml(e,t,n){if(Dr(tr,rn.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");uc(Gn(al,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function hl(e,t,n){if(Dr(tr,rn.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");uc(Gn(al,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function vl(e,t,n){if(Dr(tr,rn.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");uc(Gn(al,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function wl(e=!1,t){if(Dr(tr,rn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");uc(Gn(al,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Cl(e,t,n,r,o=!1,i){if(Dr(tr,rn.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");uc(Gn(al,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function yl(e){if(Dr(tr,rn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");uc(Gn(al,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function bl(e=void 0,t){if(Dr(tr,rn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");uc(Gn(al,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Sl(e){if(Dr(tr,rn.content),!e)throw kl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");uc(Gn(al,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function El(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw kl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");uc(Gn(al,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Al(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");uc(Gn(al,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Il(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");uc(Gn(al,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Tl(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");uc(Gn(al,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Pl(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");uc(Gn(al,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Ol(e,t){if(Dr(tr,rn.content),!t)throw kl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw kl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");uc(Gn(al,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Rl(e){if(Dr(tr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ls(Gn(al,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Fl(e){if(Dr(tr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ls(Gn(al,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function kl(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"}(sl||(sl={})),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"}(cl||(cl={})),function(e){e.ClassMaterials="classMaterials"}(ul||(ul={})),function(e){e.Readonly="readonly"}(ll||(ll={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(dl||(dl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(fl||(fl={}));const Ml="v1";function Nl(){return new Promise((e=>{if(Dr(tr),!Ul())throw un;e(tc(Gn(Ml,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function xl(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Dr(tr),!Ul())throw un;t(tc(Gn(Ml,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Dl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Dr(tr),!Ul())throw un;ls(Gn(Ml,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Dr(tr),e(t)}))}function Ll(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Dr(tr),!Ul())throw un;ls(Gn(Ml,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Dr(tr),e(t)}))}function Ul(){return!(!Dr(tr)||!tr.supports.meetingRoom)}function Hl(){return!(!Dr(tr)||!tr.supports.messageChannels)}const Vl="1.0.0",_l={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Jl("Invalid message format, ignoring. Message: %o",e);if(!$l(e.source,e.origin))return void Jl("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Kl("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Jl("Invalid response format, ignoring. Message: %o",e);t(r)}};let Bl=null,Wl=!1;function jl(e,t,n=!1){if(Wl=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.`);Bl=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Jl("Nested App Auth Bridge is already present");const o=zl(r);o&&(r.nestedAppAuthBridge=o)}function zl(e){const t=new WeakMap,{onMessage:n}=_l,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 Jl(`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=ql(t);if(e===e.top||!Bl)return void Kl("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Bl)}}catch(e){return void Kl("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 $l(e,t){if(e&&e!==window.top)return Jl("Should not process message because it is not coming from the top window"),!1;if(t===Bl)try{return"https:"===new URL(t).protocol}catch(e){return Kl("Invalid message origin URL:",e),!1}return!1}function ql(e){const t=Date.now();return{id:Gl(),uuid:Xt(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Gl(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Jl(...e){Wl&&console.log(...e)}function Kl(...e){Wl&&console.error(...e)}const Ql="v1";function Zl(e){if(Dr(tr,rn.content),!Xl())throw un;uc(Gn(Ql,"notifications.showNotification"),"notifications.showNotification",[e])}function Xl(){return!(!Dr(tr)||!tr.supports.notifications)}const Yl="v2";function ed(e){if(!rd())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());if(Kr(e))throw new Error(ke.INVALID_ARGUMENTS.toString());ls(Gn(Yl,"otherApp.install"),"otherApp.install",e)}function td(){if(!rd())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());uc(Gn(Yl,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ds("otherApp.install")}function nd(e){if(!rd())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return ic("otherApp.notifyInstallCompleted",[e.toString()],Gn(Yl,"otherApp.notifyInstallCompleted"))}function rd(){return!(!Dr(tr)||!tr.supports.otherAppStateChange)}const od="v1";var id,ad,sd;function cd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function ud(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(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function ld(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(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function dd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;uc(Gn(od,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function fd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function pd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function gd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function md(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Dr(tr,rn.sidePanel),!hd())throw un;ls(Gn(od,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function hd(){return!(!Dr(tr)||!tr.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"}(id||(id={})),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"}(ad||(ad={})),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"}(sd||(sd={}));const vd="v1";function wd(e,t,n,r){if(Dr(tr,rn.content),!Cd())throw un;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");uc(Gn(vd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Cd(){return!(!Dr(tr)||!tr.supports.appEntity)}const yd="v1";function bd(e){return new Promise((t=>{if(Dr(tr),!Sd())throw un;if((Bn.hostClientType===tn.android||Bn.hostClientType===tn.teamsRoomsAndroid||Bn.hostClientType===tn.teamsPhones||Bn.hostClientType===tn.teamsDisplays)&&!Lr($e)){const e={errorCode:ke.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Xs(Gn(yd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Sd(){return!(!Dr(tr)||!tr.supports.teams)&&(!!tr.supports.teams.fullTrust&&!!tr.supports.teams.fullTrust.joinedTeams)}const Ed="v1";function Ad(e){return new Promise((t=>{if(Dr(tr),!Id())throw un;t(Xs(Gn(Ed,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Id(){return!(!Dr(tr)||!tr.supports.teams)&&!!tr.supports.teams.fullTrust}const Td="v1";var Pd;function Od(e,t){if(Dr(tr,rn.content),!Fd())throw un;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");uc(Gn(Td,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Rd(e,t){if(Dr(tr),!Fd())throw un;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");uc(Gn(Td,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Fd(){return!(!Dr(tr)||!tr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Pd||(Pd={}));class kd{static setTimeout(e,t){const n=performance.now(),r=hn();return kd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete kd.setTimeoutCallbacks[e]}static setInterval(e,t){kd.setTimeout((function n(){e(),kd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in kd.setTimeoutCallbacks){const r=kd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){kd.setTimeoutCallbacks[e].callback(),delete kd.setTimeoutCallbacks[e]}}}kd.setTimeoutCallbacks={};class Md{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){kd.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&&kd.clearTimeout(this.timeoutId),this.timeoutId=kd.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(Md.maxSessionTimeoutInMs,2*t.timeoutInMs):Md.initialSessionTimeoutInMs}}Md.initialSessionTimeoutInMs=1e3,Md.maxSessionTimeoutInMs=3e4;const Nd="v2";class xd{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Md(xd.distributionBinSize,(e=>this.reportPerformanceEvent(Gn(Nd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){kd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Gn(Nd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),xd.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){kd.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(Gn(Nd,"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(Gn(Nd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}xd.distributionBinSize=1e3,xd.calculateFPSInterval=1e3;var Dd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Ld=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 Ud="v2",Hd=On()?void 0:new xd(uc);var Vd,_d,Bd;function Wd(e){if(Dr(tr,rn.sidePanel),!Gd())throw un;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ls(Gn(Ud,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Hd?void 0:Hd.setFrameProcessTimeLimit(e.timeLimit)),!1),Xd())Jd(e.videoFrameHandler,e.config);else{if(!ef())throw un;Qd(e.videoBufferHandler,e.config)}null==Hd||Hd.startMonitorSlowFrameProcessing()}function jd(e,t){if(Dr(tr,rn.sidePanel),!Gd())throw un;uc(Gn(Ud,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function zd(e){if(Dr(tr,rn.sidePanel),!Gd())throw un;ls(Gn(Ud,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",pf(e,Hd),!1),uc(Gn(Ud,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function $d(e){uc(Gn(Ud,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function qd(e){uc(Gn(Ud,"videoEffects.notifyError"),"video.notifyError",[e])}function Gd(){return Dr(tr)&&!!tr.supports.video&&(!!tr.supports.video.mediaStream||!!tr.supports.video.sharedFrame)}function Jd(e,t){if(Dr(tr,rn.sidePanel),!Gd()||!Xd())throw un;ls(Gn(Ud,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Dd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Kd(e,Hd);yield rf(n,r,qd,Hd)}))),!1),uc(Gn(Ud,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Kd(e,t){return n=>Dd(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 Qd(e,t){if(Dr(tr,rn.sidePanel),!Gd()||!ef())throw un;ls(Gn(Ud,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Hd||Hd.reportStartFrameProcessing(t.width,t.height),e(Zd(t),(()=>{null==Hd||Hd.reportFrameProcessed(),$d(n)}),qd)}}),!1),uc(Gn(Ud,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Zd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Ld(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Xd(){var e;return Dr(tr,rn.sidePanel)&&Yd()&&!!(null===(e=tr.supports.video)||void 0===e?void 0:e.mediaStream)}function Yd(){var e,t,n,r;return!(!(null===(t=null===(e=Pn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Pn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function ef(){var e;return Dr(tr,rn.sidePanel)&&!!(null===(e=tr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Vd||(Vd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(_d||(_d={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Bd||(Bd={}));var tf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 nf="v2";function rf(e,t,n,r){var o,i;return tf(this,void 0,void 0,(function*(){const a=sf();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cf(yield af(e,n,r),new uf(n,t),a.writable)}))}function of(e,t,n,r){var o,i;return tf(this,void 0,void 0,(function*(){const a=sf();!On()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cf(yield af(e,n,r),new ff(n,t),a.writable)}))}function af(e,t,n){return tf(this,void 0,void 0,(function*(){if(On())throw un;const r=Pn().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 sf(){if(On())throw un;const e=window.MediaStreamTrackGenerator;if(!e)throw un;return new e({kind:"video"})}function cf(e,t,n){new(0,Pn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class uf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>tf(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 lf{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 df{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 ff{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>tf(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=>tf(this,void 0,void 0,(function*(){if(On())throw un;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 lf(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 df(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}}})),ls(Gn(nf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function pf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),uc(Gn(nf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Bd?e:Bd.InitializationFailure;uc(Gn(nf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var gf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mf="v2",hf=2e3,vf=On()?void 0:new xd(uc);var wf;function Cf(e){var t,n;if(!Tf())throw un;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Dr(tr,rn.sidePanel)){if(ls(Gn(mf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==vf?void 0:vf.setFrameProcessTimeLimit(e)),!1),null===(t=tr.supports.video)||void 0===t?void 0:t.mediaStream)ls(Gn(mf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>gf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=vf?bf(e.videoFrameHandler,vf):e.videoFrameHandler;r?yield of(n,o,Of,vf):yield rf(n,o,Of,vf)}))),!1),uc(Gn(mf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=tr.supports.video)||void 0===n?void 0:n.sharedFrame))throw un;ls(Gn(mf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==vf||vf.reportStartFrameProcessing(t.width,t.height);const n=yf(),r=t.timestamp;e.videoBufferHandler(Sf(t),(()=>{n(),null==vf||vf.reportFrameProcessed(),Pf(r)}),Of)}}),!1),uc(Gn(mf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==vf||vf.startMonitorSlowFrameProcessing()}}function yf(){const e=setTimeout((()=>{Of(`Frame not processed in ${hf}ms`,wf.Warn)}),hf);return function(){clearTimeout(e)}}function bf(e,t){return n=>gf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Sf(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ef(e,t,n){if(Dr(tr,rn.sidePanel),!Tf())throw un;uc(Gn(mf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Af(e){if(Dr(tr,rn.sidePanel),!Tf())throw un;ls(Gn(mf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",pf(e,vf),!1),uc(Gn(mf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function If(e){if(Dr(tr,rn.sidePanel),!Gd())throw un;uc(Gn(mf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Tf(){return Dr(tr),Gd()}function Pf(e){uc(Gn(mf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Of(e,t=wf.Warn){uc(Gn(mf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Rf(e){if(Dr(tr),!Gd())throw un;Of(e,wf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(wf||(wf={}));const Ff="v2";class kf extends Li{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Mf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Nf{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class xf extends Li{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Df{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Lf extends Li{validate(e){const t=new xf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Uf(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(jf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return oc("hostEntity.tab.addAndConfigure",[new Nf(e),t],new xf,Gn(Ff,"hostEntity.tab.addAndConfigure"))}function Hf(e){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return jf(e.threadId),oc("hostEntity.tab.getAll",[new Nf(e)],new Lf,Gn(Ff,"hostEntity.tab.getAll"))}function Vf(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zf(e),jf(t.threadId),oc("hostEntity.tab.reconfigure",[new Mf(e),new Nf(t)],new kf,Gn(Ff,"hostEntity.tab.reconfigure"))}function _f(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zf(e),jf(t.threadId),oc("hostEntity.tab.rename",[new Mf(e),new Nf(t)],new kf,Gn(Ff,"hostEntity.tab.rename"))}function Bf(e,t){if(Dr(tr),!Wf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return jf(t.threadId),zf(e),oc("hostEntity.tab.remove",[new Df(e),new Nf(t)],new Ui,Gn(Ff,"hostEntity.tab.remove"))}function Wf(){var e;return!!(Dr(tr)&&qf()&&(null===(e=tr.supports.hostEntity)||void 0===e?void 0:e.tab))}function jf(e){if(!e||0==e.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function zf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var $f;function qf(){return!(!Dr(tr)||!tr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}($f||($f={}));var Gf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Jf="v2",Kf="Invalid store dialog size",Qf="No App Id present, but AppId needed to open AppDetail store",Zf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Xf(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t}=null!=e?e:{};return ic("store.openFullStore",[op(t)],Gn(Jf,"store.openFullStore"))}))}function Yf(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t,appId:n}=e;if(!(n instanceof Jr))throw new Error(Qf);return ic("store.openAppDetail",[op(t),n],Gn(Jf,"store.openAppDetail"))}))}function ep(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return ic("store.openInContextStore",[op(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Gn(Jf,"store.openInContextStore"))}))}function tp(e){return Gf(this,void 0,void 0,(function*(){rp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Zf);return ic("store.openSpecificStore",[op(t),n],Gn(Jf,"store.openSpecificStore"))}))}function np(){return Dr(tr)&&!!tr.supports.store}function rp(){if(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),!np())throw un}function op(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Kf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Kf);return JSON.stringify(e)}var ip=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 ap="v1",sp="v2";let cp;function up(e){cp=e}function lp(e){const t=void 0!==e,n=t?e:cp;if(!n)throw new Error("No parameters are provided for authentication");Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);return dp(n.successCallback||n.failureCallback?Gn(ap,"authentication.authenticate"):Gn(sp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(cp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(cp=void 0)}}))}function dp(e,t){return ip(this,void 0,void 0,(function*(){const n=kn(t.url);return Fn(n),nc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function fp(e){xr();return pp(e&&(e.successCallback||e.failureCallback)?Gn(ap,"authentication.getAuthToken"):Gn(sp,"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 pp(e,t){return new Promise((n=>{n(nc(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 gp(e){xr();return mp(e&&(e.successCallback||e.failureCallback)?Gn(ap,"authentication.getUser"):Gn(sp,"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 mp(e){return new Promise((t=>{t(nc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function hp(e,t){Dr(tr,rn.authentication);uc(Gn(t?ap:sp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Nc(Js.parentWindow,(()=>setTimeout((()=>Js.currentWindow.close()),200)))}function vp(e,t){Dr(tr,rn.authentication);uc(Gn(t?ap:sp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Nc(Js.parentWindow,(()=>setTimeout((()=>Js.currentWindow.close()),200)))}var wp;function Cp(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"}(wp||(wp={}));class yp{constructor(e){this.val=e,Cp(e)}toString(){return this.val}}const bp="/l/app/",Sp="/l/meeting/new",Ep="attendees",Ap="startTime",Ip="endTime",Tp="subject",Pp="content",Op="/l/call/0/0",Rp="source",Fp="withVideo",kp="/l/chat/0/0",Mp="users",Np="topicName",xp="message";function Dp(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Mp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Np}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${xp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${kp}?${r}${o}${i}`}function Lp(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Mp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Fp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Rp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Op}?${r}${o}${i}`}function Up(e,t,n,r,o){const i=void 0===e?"":`${Ep}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Ap}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Ip}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Tp}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Pp}=${encodeURIComponent(o)}`;return`${tt}://${nt}${Sp}?${i}${a}${s}${c}${u}`}function Hp(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${tt}://${nt}${bp}${encodeURIComponent(e)}`}const Vp="v1";function _p(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Bp())throw new Error("Not supported");const n=Gn(Vp,"appInstallDialog.openAppInstallDialog");tr.isLegacyTeams?t(Ys(n,"executeDeepLink",Hp(e.appId))):(uc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Bp(){return!(!Dr(tr)||!tr.supports.appInstallDialog)}const Wp="v1",jp=qn("media");var zp,$p,qp,Gp,Jp,Kp,Qp;!function(e){e.Base64="base64",e.ID="id"}(zp||(zp={}));class Zp{}function Xp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Dr(tr,rn.content,rn.task),Bn.isFramelessWindow)if(Lr(Je))uc(Gn(Wp,"media.captureImage"),"captureImage",e);else{e({errorCode:ke.OLD_PLATFORM},[])}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},[])}}function Yp(){if(Dr(tr,rn.content,rn.task),!tg())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(Wp,"media.hasPermission"),"permissions.has",e))}))}function eg(){if(Dr(tr,rn.content,rn.task),!tg())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(Wp,"media.requestPermission"),"permissions.request",e))}))}function tg(){return!(!Dr(tr)||!tr.supports.permissions)}class ng extends Zp{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(Dr(tr,rn.content,rn.task),Lr(Ke))if(hg(this.mimeType,this.format,this.content))Lr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:ke.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:ke.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];uc(Gn(Wp,"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=cg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=ug(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):jp(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=hn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Kr(e)&&uc(Gn(Wp,"media.getMedia"),"getMedia",r),ls(Gn(Wp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ds("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=cg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ds("getMedia"+t)}else{const e=ug(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob),ds("getMedia"+t)}}))}}class rg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Dr(tr,rn.content,rn.task);try{Hr(je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};uc(Gn(Wp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost($p.StopRecording,e)}}class og extends rg{getMediaType(){return Jp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case $p.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function ig(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(Ke)){const e={errorCode:ke.OLD_PLATFORM};return void t(e,[])}try{lg(e)}catch(e){return void t(e,[])}if(!fg(e)){const e={errorCode:ke.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];uc(Gn(Wp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(dg(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 ng(e));t(n,s)}))}function ag(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(Ke)){return void t({errorCode:ke.OLD_PLATFORM})}if(!vg(e)){return void t({errorCode:ke.INVALID_ARGUMENTS})}const n=[e];uc(Gn(Wp,"media.viewImages"),"viewImages",n,t)}function sg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Dr(tr,rn.content,rn.task),Bn.hostClientType!==tn.desktop&&Bn.hostClientType!==tn.web&&Bn.hostClientType!==tn.rigel&&Bn.hostClientType!==tn.teamsRoomsWindows&&Bn.hostClientType!==tn.teamsRoomsAndroid&&Bn.hostClientType!==tn.teamsPhones&&Bn.hostClientType!==tn.teamsDisplays)if(Lr(Qe))if(wg(t))uc(Gn(Wp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:ke.INVALID_ARGUMENTS},"")}else{e({errorCode:ke.OLD_PLATFORM},"")}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},"")}}function cg(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 ug(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 lg(e){gg(e)?Hr(We):mg(e)?Hr(je):pg(e)&&Hr(ze)}function dg(e){return!(e.mediaType!=Jp.Video||!e.videoProps||!e.videoProps.videoController)}function fg(e){return!(null==e||e.maxMediaCount>10)}function pg(e){var t;return!((null==e?void 0:e.mediaType)!=Jp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function gg(e){return!(!e||e.mediaType!=Jp.VideoAndImage&&!e.videoAndImageProps)}function mg(e){return!(!e||e.mediaType!=Jp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function hg(e,t,n){return null!=e&&null!=t&&t==zp.ID&&null!=n}function vg(e){return!(null==e||e.length<=0||e.length>10)}function wg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Cg(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"}($p||($p={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(qp||(qp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Gp||(Gp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Jp||(Jp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Kp||(Kp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Qp||(Qp={}));const yg="v2";function bg(e){return new Promise((t=>{if(Dr(tr,rn.content,rn.task),!Ag())throw un;if(!wg(e))throw{errorCode:ke.INVALID_ARGUMENTS};t(tc(Gn(yg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Sg(){if(Dr(tr,rn.content,rn.task),!Ag())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(yg,"barCode.hasPermission"),"permissions.has",e))}))}function Eg(){if(Dr(tr,rn.content,rn.task),!Ag())throw un;const e=Me.Media;return new Promise((t=>{t(tc(Gn(yg,"barCode.requestPermission"),"permissions.request",e))}))}function Ag(){return!!(Dr(tr)&&tr.supports.barCode&&tr.supports.permissions)}const Ig="v2";function Tg(e){return Pg(Gn(Ig,"chat.openChat"),e)}function Pg(e,t){return new Promise((n=>{if(Dr(tr,rn.content,rn.task),!Rg())throw un;if(tr.isLegacyTeams)n(Ys(e,"executeDeepLink",Dp([t.user],void 0,t.message)));else{n(Ys(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Og(e){const t=Gn(Ig,"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(Pg(t,r))}else{if(Dr(tr,rn.content,rn.task),!Rg())throw un;if(tr.isLegacyTeams)n(Ys(t,"executeDeepLink",Dp(e.users,e.topic,e.message)));else{n(Ys(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Rg(){return!(!Dr(tr)||!tr.supports.chat)}var Fg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const kg="v2";function Mg(e){return Fg(this,void 0,void 0,(function*(){if(Dr(tr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel),!xg())throw un;if(!e.type||!Object.values(Ue).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ue)}`);const t=yield Tn(e),n={mimeType:e.type,content:t};return tc(Gn(kg,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Ng(){return Fg(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel);const e=Gn(kg,"clipboard.read");if(!xg())throw un;const t=yield tc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return In(e.mimeType,e.content)}return t}))}function xg(){return Bn.isFramelessWindow?!(!Dr(tr)||!tr.supports.clipboard):!!(Dr(tr)&&navigator&&navigator.clipboard&&tr.supports.clipboard)}var Dg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Lg="v2",Ug={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Hg;function Vg(){var e;return null!==(e=Dr(tr)&&(tr.isNAAChannelRecommended||jg()))&&void 0!==e&&e}function _g(){return Dr(tr),Js.parentOrigin}function Bg(){var e;return null!==(e=Dr(tr)&&tr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Wg(){var e;return null!==(e=Dr(tr)&&tr.isDeeplyNestedAuthSupported)&&void 0!==e&&e}function jg(){return!!(Dr(tr)&&zg()&&tr.isLegacyTeams&&tr.supports.nestedAppAuth)}function zg(){return Bn.hostClientType===tn.android||Bn.hostClientType===tn.ios||Bn.hostClientType===tn.ipados||Bn.hostClientType===tn.visionOS}function $g(e){return Dg(this,void 0,void 0,(function*(){if(!Bg())throw un;const t=e.map(Jg);return Gg(Hg.ADD,t)}))}function qg(e){return Dg(this,void 0,void 0,(function*(){if(!Bg())throw un;const t=e.map(Jg);return Gg(Hg.DELETE,t)}))}function Gg(e,t){return Dg(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 oc("nestedAppAuth.manageNAATrustedOrigins",[new Kg(e,t)],Ug,Gn(Lg,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Jg(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"}(Hg||(Hg={}));class Kg{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Qg="v2";function Zg(){if(Dr(tr,rn.content,rn.task),!Yg())throw un;return tc(Gn(Qg,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Xg(e){if(Dr(tr,rn.content,rn.task),!Yg())throw un;if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};return tc(Gn(Qg,"geoLocation.showLocation"),"location.showLocation",e)}function Yg(){return!!(Dr(tr)&&tr.supports.geoLocation&&tr.supports.geoLocation.map&&tr.supports.permissions)}const em="v2";function tm(){if(Dr(tr,rn.content,rn.task),!om())throw un;return tc(Gn(em,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function nm(){if(Dr(tr,rn.content,rn.task),!om())throw un;const e=Me.GeoLocation;return new Promise((t=>{t(tc(Gn(em,"geoLocation.hasPermission"),"permissions.has",e))}))}function rm(){if(Dr(tr,rn.content,rn.task),!om())throw un;const e=Me.GeoLocation;return new Promise((t=>{t(tc(Gn(em,"geoLocation.requestPermission"),"permissions.request",e))}))}function om(){return!!(Dr(tr)&&tr.supports.geoLocation&&tr.supports.permissions)}function im(){return tr.hostVersionsInfo?tr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const am="v1";class sm{postMessage(e,t){Dr(tr),uc(Gn(am,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||gn())}addEventListener(e,t){Dr(tr),"message"===e&&ls(Gn(am,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class cm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Dr(tr,rn.task),uc(Gn(am,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||gn())}addEventListener(e,t){Dr(tr,rn.task),"message"===e&&ls(Gn(am,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const um="v2";function lm(e){if(Dr(tr,rn.content),!dm())throw un;if(!e||!An(e))throw{errorCode:ke.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return tc(Gn(um,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function dm(){return!(!Dr(tr)||!tr.supports.secondaryBrowser)}const fm="v1";function pm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!mm())throw un;uc(Gn(fm,"location.getLocation"),"location.getLocation",[e],t)}function gm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Dr(tr,rn.content,rn.task),!Lr(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!mm())throw un;uc(Gn(fm,"location.showLocation"),"location.showLocation",[e],t)}function mm(){return!(!Dr(tr)||!tr.supports.location)}const hm="v1";function vm(e){Dr(tr,rn.sidePanel),e.contentUrl&&new URL(e.contentUrl),uc(Gn(hm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var wm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Cm="v1";var ym,bm,Sm,Em,Am,Im;function Tm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Pm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Om(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content),uc(Gn(Cm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Rm(){var e,t,n;return wm(this,void 0,void 0,(function*(){let r;Dr(tr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content);try{const e=!0;r=yield tc(Gn("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)==Em.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Em.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Fm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage,rn.task),uc(Gn(Cm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function km(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Dr(tr,rn.sidePanel),uc(Gn(Cm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Mm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Dr(tr,rn.sidePanel),uc(Gn(Cm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Nm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Dr(tr,rn.sidePanel),uc(Gn(Cm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function xm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Dr(tr,rn.sidePanel),ls(Gn(Cm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Dm(e,t,n={sharingProtocol:Am.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Lm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Um(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Hm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Vm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ls(Gn(Cm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function _m(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ls(Gn(Cm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Bm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Dr(tr,rn.sidePanel,rn.meetingStage),ls(Gn(Cm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Wm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Dr(tr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Im.Other};return tc(Gn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function jm(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");Dr(tr,rn.sidePanel,rn.meetingStage),e.isAppHandlingAudio?zm(e,t):$m(e,t)}function zm(e,t){uc(Gn(Cm,"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");ls(Gn(Cm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>wm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Gm(n,n.isMicMuted===t.isMicMuted?ym.HostInitiated:ym.AppDeclinedToChange)}catch(e){Gm(t,ym.AppFailedToChange)}}))));ls(Gn(Cm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function $m(e,t){uc(Gn(Cm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");fs("meeting.micStateChanged")&&ds("meeting.micStateChanged"),fs("meeting.audioDeviceSelectionChanged")&&ds("meeting.audioDeviceSelectionChanged"),t(n)}))}function qm(e){Gm(e,ym.AppInitiated)}function Gm(e,t){Dr(tr,rn.sidePanel,rn.meetingStage),uc(Gn(Cm,"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"}(ym||(ym={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(bm||(bm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Sm||(Sm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Em||(Em={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Am||(Am={})),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"}(Im||(Im={}));const Jm="v1",Km="v2";function Qm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Gn(Jm,"monetization.openPurchaseExperience")):(r=e,o=Gn(Km,"monetization.openPurchaseExperience"));return Dr(tr,rn.content),yn((()=>new Promise((e=>{if(!Zm())throw un;e(tc(o,"monetization.openPurchaseExperience",r))}))),n)}function Zm(){return!(!Dr(tr)||!tr.supports.monetization)}const Xm="v2";function Ym(e){return new Promise((t=>{if(Dr(tr,rn.content),!th())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Ys(Gn(Xm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function eh(e){return new Promise((t=>{if(Dr(tr,rn.content),!th())throw new Error("Not supported");const n=Gn(Xm,"calendar.composeMeeting");tr.isLegacyTeams?t(Ys(n,"executeDeepLink",Up(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Ys(n,"calendar.composeMeeting",e))}))}function th(){return!(!Dr(tr)||!tr.supports.calendar)}const nh="v2";function rh(e){e&&0!==e.length&&e.forEach((e=>{Cp(e)}))}function oh(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===fh.New&&(rh(t.toRecipients),rh(t.ccRecipients),rh(t.bccRecipients))}function ih(e){if(Dr(tr,rn.content),!ah())throw new Error("Not supported");return oh(e),ic("mail.handoff.composeMail",[new sh(e)],Gn(nh,"mail.handoff.composeMail"))}function ah(){return!!(Dr(tr)&&tr.supports.mail&&tr.supports.mail.handoff)}class sh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const ch="v2";function uh(e){return new Promise((t=>{if(Dr(tr,rn.content),!dh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Ys(Gn(ch,"mail.openMailItem"),"mail.openMailItem",e))}))}function lh(e){return new Promise((t=>{if(Dr(tr,rn.content),!dh())throw new Error("Not supported");t(Ys(Gn(ch,"mail.composeMail"),"mail.composeMail",e))}))}function dh(){return!(!Dr(tr)||!tr.supports.mail)}var fh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(fh||(fh={}));const ph="v2";function gh(){if(!Bn.printCapabilityEnabled){if(Dr(tr),!yh())throw un;Bn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(mh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function mh(){Pn().print()}function hh(e){vh(Gn(ph,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Kr(e)&&!yh())throw un}))}function vh(e,t,n){!Kr(t)&&Dr(tr),!Kr(t)&&n&&n(),ws(e,t)}function wh(e){Ch(Gn(ph,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Kr(e)&&!yh())throw un}))}function Ch(e,t,n){!Kr(t)&&Dr(tr),!Kr(t)&&n&&n(),bs(e,t)}function yh(){return!(!Dr(tr)||!tr.supports.teamsCore)}const bh="v1",Sh="v2";function Eh(e,t){let n,r;Dr(tr,rn.content,rn.task,rn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Gn(bh,"people.selectPeople")):(r=e,o=Gn(Sh,"people.selectPeople")),wn(Ah,n,o,r)}function Ah(e,t){return new Promise((n=>{if(!Lr(Ge))throw{errorCode:ke.OLD_PLATFORM};if(!Cg(t))throw{errorCode:ke.INVALID_ARGUMENTS};if(!Ih())throw un;n(tc(e,"people.selectPeople",t))}))}function Ih(){return!(!Dr(tr)||!tr.supports.people)}function Th(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?Ph(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Ph(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 Oh="v2";function Rh(e){return Dr(tr,rn.content),new Promise((t=>{const[n,r]=Th(e);if(!n)throw{errorCode:ke.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(tc(Gn(Oh,"profile.showProfile"),"profile.showProfile",o))}))}function Fh(){return!(!Dr(tr)||!tr.supports.profile)}const kh="v2",Mh="search.queryChange",Nh="search.queryClose",xh="search.queryExecute";function Dh(e,t,n){if(Dr(tr,rn.content),!Uh())throw un;ls(Gn(kh,"search.registerOnClosedHandler"),Nh,e),ls(Gn(kh,"search.registerOnExecutedHandler"),xh,t),n&&ls(Gn(kh,"search.registerOnChangeHandler"),Mh,n)}function Lh(){if(Dr(tr,rn.content),!Uh())throw un;uc(Gn(kh,"search.unregisterHandlers"),"search.unregister"),ds(Mh),ds(Nh),ds(xh)}function Uh(){return!(!Dr(tr)||!tr.supports.search)}function Hh(){return new Promise((e=>{if(Dr(tr,rn.content),!Uh())throw new Error("Not supported");e(Ys(Gn(kh,"search.closeSearch"),"search.closeSearch"))}))}var Vh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const _h="v2";function Bh(){return Vh(this,void 0,void 0,(function*(){if(Dr(tr,rn.sidePanel,rn.meetingStage),!Wh())throw un;return yield tc(Gn(_h,"sharing.history.getContent"),"sharing.history.getContent")}))}function Wh(){var e;return Dr(tr)&&void 0!==(null===(e=tr.supports.sharing)||void 0===e?void 0:e.history)}const jh="v1",zh="v2",$h={shareWebContent:"sharing.shareWebContent"};function qh(e,t){try{Jh(e),Kh(e),Qh(e)}catch(e){return Cn((()=>Promise.reject(e)),t)}Dr(tr,rn.content,rn.sidePanel,rn.task,rn.stage,rn.meetingStage);return Cn(Gh,t,Gn(t?jh:zh,"sharing.shareWebContent"),e)}function Gh(e,t){return new Promise((n=>{if(!Zh())throw un;n(tc(e,$h.shareWebContent,t))}))}function Jh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:ke.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Kh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Qh(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Zh(){return!(!Dr(tr)||!tr.supports.sharing)}const Xh="v2";function Yh(){return new Promise((e=>{if(Dr(tr,rn.content),!ev())throw un;e(tc(Gn(Xh,"stageView.self.close"),"stageView.self.close"))}))}function ev(){var e;return Dr(tr)&&void 0!==(null===(e=tr.supports.stageView)||void 0===e?void 0:e.self)}const tv="v2";var nv;function rv(e){return new Promise((t=>{if(Dr(tr,rn.content),!ov())throw un;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(tc(Gn(tv,"stageView.open"),"stageView.open",e))}))}function ov(){return!(!Dr(tr)||!tr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(nv||(nv={}));const iv=10;var av=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 sv="v2";function cv(e){return av(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.task),dv(),fv(e);const t=yield tc(Gn(sv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return pv(e.maxVisualMediaCount,t),t}))}function uv(e){return av(this,void 0,void 0,(function*(){Dr(tr,rn.content,rn.task),dv(),fv(e);const t=yield tc(Gn(sv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return pv(e.maxVisualMediaCount,t),t}))}function lv(){return!!(Dr(tr)&&tr.supports.visualMedia&&tr.supports.visualMedia.image&&tr.supports.permissions)}function dv(){if(!lv())throw un}function fv(e){if(!e||e.maxVisualMediaCount>iv||e.maxVisualMediaCount<1)throw fn}function pv(e,t){if(t.length>e)throw pn}const gv="v2";var mv,hv;function vv(){if(Dr(tr,rn.content,rn.task),!lv())throw un;const e=Me.Media;return tc(Gn(gv,"visualMedia.hasPermission"),"permissions.has",e)}function wv(){if(Dr(tr,rn.content,rn.task),!lv())throw un;const e=Me.Media;return tc(Gn(gv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(mv||(mv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(hv||(hv={}));var Cv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 yv=null;function bv(){return Cv(this,void 0,void 0,(function*(){return null===yv&&(yv=(yield Eo()).app.host.name),yv}))}var Sv=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function Ev(){return Sv(this,void 0,void 0,(function*(){if(Dr(tr),!Iv())throw un;return!(!tr.isLegacyTeams||Bn.hostClientType!==tn.android&&Bn.hostClientType!==tn.ios&&Bn.hostClientType!==tn.ipados&&Bn.hostClientType!==tn.visionOS||(yield Av())!==nn.teams)||(yield Xs(Gn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Av(){return Sv(this,void 0,void 0,(function*(){return bv()}))}function Iv(){return Dr(tr)&&void 0!==tr.supports.webStorage}const Tv="v2";var Pv;function Ov(e){const t=Gn(Tv,"call.startCall");return new Promise((n=>{var r;if(Dr(tr,rn.content,rn.task),!Rv())throw un;if(!tr.isLegacyTeams)return uc(t,"call.startCall",[e],n);n(Xs(t,"executeDeepLink",Lp(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Pv.Video),e.source)).then((e=>{if(!e)throw new Error(at);return e})))}))}function Rv(){return!(!Dr(tr)||!tr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Pv||(Pv={}));const Fv="v1";function kv(){Wi(Gn(Fv,"appInitialization.notifyAppLoaded"))}function Mv(){uc(Gn(Fv,"appInitialization.notifySuccess"),mo.Success,[mr])}function Nv(e){zi(Gn(Fv,"appInitialization.notifyFailure"),e)}function xv(e){ji(Gn(Fv,"appInitialization.notifyExpectedFailure"),e)}const Dv=qn("thirdPartyCloudStorage"),Lv="v2";class Uv{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Hv=[],Vv=null,_v=!0,Bv=null;function Wv(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Dr(tr,rn.content,rn.task),!zv())throw un;if(Bv)throw Bv=null,new Error("getDragAndDropFiles cannot be called twice");Bv=t,_v=!0,uc(Gn(Lv,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],jv)}else{t([],{errorCode:ke.INVALID_ARGUMENTS})}}function jv(e){if(Bv)if(e&&e.error)Bv([],e.error),Bv=null;else if(e&&e.fileChunk)try{_v||0!==e.fileChunk.chunkSequence||(Dv("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),_v=!0,Bv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}),Hv=[],Bv=null);const t=ug(e.fileChunk,e.fileType);if(t?(Vv||(Vv=new Uv(e.fileType,[])),Vv.assembleAttachment.push(t)):(Dv(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Bv?Bv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}):Bv=null,Hv=[],Bv=null,_v=!0),_v=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Vv){const t=cg(Vv.assembleAttachment,Vv.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Hv.push(n)}e.isLastFile&&Bv&&(Bv(Hv,e.error),Hv=[],Bv=null,_v=!0),Vv=null}}catch(e){Bv&&(Bv([],{errorCode:ke.INTERNAL_ERROR,message:e}),Hv=[],Bv=null,_v=!0)}else Bv([],{errorCode:ke.INTERNAL_ERROR,message:"data received is null"}),Hv=[],Bv=null,_v=!0}function zv(){return!(!Dr(tr)||!tr.supports.thirdPartyCloudStorage)}const $v="v1";function qv(e,t){Bi(Gn($v,"initialize"),t).then((()=>{e&&e()}))}function Gv(){gh()}function Jv(){mh()}function Kv(e){xr(),uc(Gn($v,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Bn.frameContext),e(t)}))}function Qv(e){Qi(Gn($v,"registerOnThemeChangeHandlerHelper"),e)}function Zv(e){ps(Gn($v,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Xv(e){ps(Gn($v,"registerAppButtonClickHandler"),"appButtonClick",e,[rn.content])}function Yv(e){ps(Gn($v,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[rn.content])}function ew(e){ps(Gn($v,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[rn.content])}function tw(e){ga(Gn($v,"registerBackButtonHandler"),e)}function nw(e){vh(Gn($v,"registerOnLoadHandler"),e)}function rw(e){Ch(Gn($v,"registerBeforeUnloadHandler"),e)}function ow(e){ps(Gn($v,"registerFocusEnterHandler"),"focusEnter",e,[])}function iw(e){ps(Gn($v,"registerChangeSettingsHandler"),"changeSettings",e,[rn.content])}function aw(e,t){Dr(tr),ja(Gn($v,"getTabInstances"),t).then((t=>{e(t)}))}function sw(e,t){Dr(tr),za(Gn($v,"getMruTabInstances"),t).then((t=>{e(t)}))}function cw(e){$a(Gn($v,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function uw(e,t){Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Zi(Gn($v,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function lw(e){qa(Gn($v,"setFrameContext"),e)}function dw(e,t,n){Bi(Gn($v,"initializeWithFrameContext"),n).then((()=>t&&t())),qa(Gn($v,"setFrameContext"),e)}const fw="v1";function pw(e){Wa(Gn(fw,"navigation.returnFocus"),e)}function gw(e,t){Dr(tr);const n=null!=t?t:gn();Ba(Gn(fw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function mw(e,t){Dr(tr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:gn();Va(Gn(fw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function hw(e){Dr(tr);const t=null!=e?e:gn();_a(Gn(fw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const vw="v1";function ww(e){Ga(Gn(vw,"settings.setValidityState"),e)}function Cw(e){Dr(tr,rn.content,rn.settings,rn.remove,rn.sidePanel),Ja(Gn(vw,"settings.getSettings")).then((t=>{e(t)}))}function yw(e,t){Dr(tr,rn.content,rn.settings,rn.sidePanel);const n=null!=t?t:gn();Ka(Gn(vw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function bw(e){Pi(Gn(vw,"settings.registerOnSaveHandler"),e)}function Sw(e){Ri(Gn(vw,"settings.registerOnRemoveHandler"),e)}var Ew=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 Aw="v1";function Iw(e,t){const n=Gn(Aw,"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?(Dr(tr,rn.content,rn.sidePanel,rn.meetingStage),uc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Jo(n,Rw(e),r):Go(n,Ow(e),r),new sm}function Tw(e){e=Fw(e);const{width:t,height:n}=e,r=Ew(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");qo(Gn(Aw,"tasks.updateTask"),e)}function Pw(e,t){Ko(Gn(Aw,"tasks.submitTask"),e,t)}function Ow(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Rw(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:sn.Small,width:e.width?e.width:sn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Fw(e){return e.height=e.height?e.height:sn.Small,e.width=e.width?e.width:sn.Small,e}const kw="v2";var Mw,Nw;function xw(){return!(!Dr(tr,rn.meetingStage,rn.sidePanel,rn.content)||!tr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Mw||(Mw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Nw||(Nw={}));class Dw{getFluidTenantInfo(){return Lw(),new Promise((e=>{e(tc(Gn(kw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Lw(),new Promise((e=>{e(tc(Gn(kw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Lw(),new Promise((e=>{e(tc(Gn(kw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Lw(),new Promise((t=>{t(tc(Gn(kw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Lw(),new Dw}}function Lw(){if(!xw())throw new Error("LiveShareHost Not supported")}var Uw=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 Hw(e){try{return e.cartItems=Vw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Vw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Vw(e.accessories)),e}))}const _w=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Uw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=_w(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Bw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)jw(t),Ww(t.accessories)}function Ww(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");jw(t)}}}function jw(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");$w(e.price),qw(e.quantity)}function zw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}}function $w(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 qw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Gw(e){if(!Object.values(Zw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Jw="v2",Kw={majorVersion:1,minorVersion:1};var Qw,Zw;function Xw(){if(Dr(tr,rn.content,rn.task),!nC())throw un;return tc(Gn(Jw,"marketplace.getCart"),"marketplace.getCart",Kw).then(Hw)}function Yw(e){if(Dr(tr,rn.content,rn.task),!nC())throw un;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return zw(null==e?void 0:e.cartId),Bw(null==e?void 0:e.cartItems),tc(Gn(Jw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:_w(e.cartItems),cartVersion:Kw})).then(Hw)}function eC(e){if(Dr(tr,rn.content,rn.task),!nC())throw un;if(!e)throw new Error("removeCartItemsParams must be provided");if(zw(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 tc(Gn(Jw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Kw})).then(Hw)}function tC(e){if(Dr(tr,rn.content,rn.task),!nC())throw un;if(!e)throw new Error("updateCartStatusParams must be provided");return zw(null==e?void 0:e.cartId),Gw(null==e?void 0:e.cartStatus),tc(Gn(Jw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Kw})).then(Hw)}function nC(){return!(!Dr(tr)||!tr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Qw||(Qw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Zw||(Zw={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map