@microsoft/teams-js 2.48.0-beta.2 → 2.48.0-beta.3

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.
Files changed (104) hide show
  1. package/README.md +4 -4
  2. package/dist/esm/_virtual/_polyfill-node.buffer.js +1 -1
  3. package/dist/esm/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.55.1_tslib@2.8.1_typescript@4.9.5/node_modules/tslib/tslib.es6.js +1 -0
  4. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/browser.js +1 -1
  5. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/common.js +1 -1
  6. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js +1 -1
  7. package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +1 -0
  8. package/dist/esm/packages/teams-js/dts/public/appPerformanceMetrics.d.ts +24 -0
  9. package/dist/esm/packages/teams-js/dts/public/index.d.ts +2 -1
  10. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +59 -0
  11. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +1 -0
  12. package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -1
  13. package/dist/esm/packages/teams-js/src/index.js +1 -1
  14. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
  15. package/dist/esm/packages/teams-js/src/internal/childCommunication.js +1 -1
  16. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  17. package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -1
  18. package/dist/esm/packages/teams-js/src/internal/dialogHelpers.js +1 -1
  19. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
  20. package/dist/esm/packages/teams-js/src/internal/idValidation.js +1 -1
  21. package/dist/esm/packages/teams-js/src/internal/internalAPIs.js +1 -1
  22. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
  23. package/dist/esm/packages/teams-js/src/internal/mediaUtil.js +1 -1
  24. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
  25. package/dist/esm/packages/teams-js/src/internal/pagesHelpers.js +1 -1
  26. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  27. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  28. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
  29. package/dist/esm/packages/teams-js/src/internal/videoFrameTick.js +1 -1
  30. package/dist/esm/packages/teams-js/src/internal/videoPerformanceMonitor.js +1 -1
  31. package/dist/esm/packages/teams-js/src/internal/webStorageHelpers.js +1 -1
  32. package/dist/esm/packages/teams-js/src/private/conversations.js +1 -1
  33. package/dist/esm/packages/teams-js/src/private/copilot/customTelemetry.js +1 -1
  34. package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -1
  35. package/dist/esm/packages/teams-js/src/private/copilot/sidePanel.js +1 -1
  36. package/dist/esm/packages/teams-js/src/private/copilot/view.js +1 -1
  37. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  38. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  39. package/dist/esm/packages/teams-js/src/private/externalAppCardActions.js +1 -1
  40. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
  41. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForDA.js +1 -1
  42. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
  43. package/dist/esm/packages/teams-js/src/private/hostEntity/tab.js +1 -1
  44. package/dist/esm/packages/teams-js/src/private/logs.js +1 -1
  45. package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -1
  46. package/dist/esm/packages/teams-js/src/private/messageChannels/dataLayer.js +1 -1
  47. package/dist/esm/packages/teams-js/src/private/messageChannels/telemetry.js +1 -1
  48. package/dist/esm/packages/teams-js/src/private/privateAPIs.js +1 -1
  49. package/dist/esm/packages/teams-js/src/private/store.js +1 -1
  50. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/fullTrust.js +1 -1
  51. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/joinedTeams.js +1 -1
  52. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  53. package/dist/esm/packages/teams-js/src/private/widgetHosting/widgetHosting.js +1 -1
  54. package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
  55. package/dist/esm/packages/teams-js/src/public/appInstallDialog.js +1 -1
  56. package/dist/esm/packages/teams-js/src/public/appPerformanceMetrics.js +1 -0
  57. package/dist/esm/packages/teams-js/src/public/authentication.js +1 -1
  58. package/dist/esm/packages/teams-js/src/public/barCode.js +1 -1
  59. package/dist/esm/packages/teams-js/src/public/calendar.js +1 -1
  60. package/dist/esm/packages/teams-js/src/public/call.js +1 -1
  61. package/dist/esm/packages/teams-js/src/public/chat.js +1 -1
  62. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  63. package/dist/esm/packages/teams-js/src/public/dialog/adaptiveCard/adaptiveCard.js +1 -1
  64. package/dist/esm/packages/teams-js/src/public/dialog/adaptiveCard/bot.js +1 -1
  65. package/dist/esm/packages/teams-js/src/public/dialog/url/parentCommunication.js +1 -1
  66. package/dist/esm/packages/teams-js/src/public/geoLocation/geoLocation.js +1 -1
  67. package/dist/esm/packages/teams-js/src/public/liveShareHost.js +1 -1
  68. package/dist/esm/packages/teams-js/src/public/mail/handoff.js +1 -1
  69. package/dist/esm/packages/teams-js/src/public/mail/mail.js +1 -1
  70. package/dist/esm/packages/teams-js/src/public/media.js +1 -1
  71. package/dist/esm/packages/teams-js/src/public/meeting/meeting.js +1 -1
  72. package/dist/esm/packages/teams-js/src/public/monetization.js +1 -1
  73. package/dist/esm/packages/teams-js/src/public/navigation.js +1 -1
  74. package/dist/esm/packages/teams-js/src/public/nestedAppAuth.js +1 -1
  75. package/dist/esm/packages/teams-js/src/public/pages/appButton.js +1 -1
  76. package/dist/esm/packages/teams-js/src/public/pages/backStack.js +1 -1
  77. package/dist/esm/packages/teams-js/src/public/pages/config.js +1 -1
  78. package/dist/esm/packages/teams-js/src/public/pages/currentApp.js +1 -1
  79. package/dist/esm/packages/teams-js/src/public/pages/pages.js +1 -1
  80. package/dist/esm/packages/teams-js/src/public/people.js +1 -1
  81. package/dist/esm/packages/teams-js/src/public/profile.js +1 -1
  82. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  83. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  84. package/dist/esm/packages/teams-js/src/public/search.js +1 -1
  85. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  86. package/dist/esm/packages/teams-js/src/public/sharing/history.js +1 -1
  87. package/dist/esm/packages/teams-js/src/public/sharing/sharing.js +1 -1
  88. package/dist/esm/packages/teams-js/src/public/shortcutRelay.js +1 -1
  89. package/dist/esm/packages/teams-js/src/public/stageView/self.js +1 -1
  90. package/dist/esm/packages/teams-js/src/public/stageView/stageView.js +1 -1
  91. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  92. package/dist/esm/packages/teams-js/src/public/teamsAPIs.js +1 -1
  93. package/dist/esm/packages/teams-js/src/public/thirdPartyCloudStorage.js +1 -1
  94. package/dist/esm/packages/teams-js/src/public/uuidObject.js +1 -1
  95. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  96. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -1
  97. package/dist/esm/packages/teams-js/src/public/visualMedia/image.js +1 -1
  98. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  99. package/dist/umd/MicrosoftTeams.js +506 -465
  100. package/dist/umd/MicrosoftTeams.js.map +1 -1
  101. package/dist/umd/MicrosoftTeams.min.js +1 -1
  102. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  103. package/package.json +1 -1
  104. package/dist/esm/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js +0 -1
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Ne,AppId:()=>no,ChannelType:()=>gn,ChildAppWindow:()=>Pm,DialogDimension:()=>pn,EduType:()=>Be,EmailAddress:()=>Hg,ErrorCode:()=>Ue,FileOpenPreference:()=>xe,FrameContexts:()=>un,HostClientType:()=>sn,HostName:()=>cn,LiveShareHost:()=>ey,NotificationTypes:()=>eu,ParentAppWindow:()=>Tm,RenderingSurfaces:()=>ln,SecondaryM365ContentIdName:()=>De,TaskModuleDimension:()=>pn,TeamType:()=>dn,UUID:()=>$n,UserAuthenticationState:()=>al,UserSettingTypes:()=>nu,UserTeamRole:()=>fn,ValidatedSafeString:()=>to,ViewerActionTypes:()=>tu,activateChildProxyingCommunication:()=>Ir,app:()=>i,appEntity:()=>W,appInitialization:()=>Te,appInstallDialog:()=>Y,authentication:()=>X,barCode:()=>te,calendar:()=>fe,call:()=>Pe,chat:()=>ne,clipboard:()=>re,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>fC,executeDeepLink:()=>OC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>D,geoLocation:()=>ae,getAdaptiveCardSchemaVersion:()=>Em,getContext:()=>gC,getCurrentFeatureFlagsState:()=>Or,getMruTabInstances:()=>PC,getTabInstances:()=>IC,hostEntity:()=>K,initialize:()=>dC,initializeWithFrameContext:()=>FC,liveShare:()=>ke,location:()=>ce,logs:()=>S,mail:()=>ge,marketplace:()=>Me,media:()=>ee,meeting:()=>le,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>de,navigateBack:()=>DC,navigateCrossDomain:()=>NC,navigateToTab:()=>xC,nestedAppAuth:()=>oe,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>uu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Fr,pages:()=>y,people:()=>me,print:()=>pC,profile:()=>ve,registerAppButtonClickHandler:()=>vC,registerAppButtonHoverEnterHandler:()=>wC,registerAppButtonHoverLeaveHandler:()=>CC,registerBackButtonHandler:()=>yC,registerBeforeUnloadHandler:()=>bC,registerChangeSettingsHandler:()=>EC,registerCustomHandler:()=>su,registerFocusEnterHandler:()=>AC,registerFullScreenHandler:()=>mC,registerOnLoadHandler:()=>SC,registerOnThemeChangeHandler:()=>hC,registerUserSettingsChangeHandler:()=>cu,remoteCamera:()=>B,returnFocus:()=>MC,search:()=>we,secondaryBrowser:()=>se,sendCustomEvent:()=>au,sendCustomMessage:()=>iu,setFeatureFlagsState:()=>Rr,setFrameContext:()=>RC,settings:()=>Re,shareDeepLink:()=>TC,sharing:()=>ye,shortcutRelay:()=>je,sidePanelInterfaces:()=>I,stageView:()=>be,store:()=>Q,tasks:()=>Fe,teams:()=>q,teamsCore:()=>he,thirdPartyCloudStorage:()=>Oe,uploadCustomApp:()=>ou,version:()=>Ar,videoEffects:()=>$,videoEffectsEx:()=>G,visualMedia:()=>Ee,webStorage:()=>Ie,widgetHosting:()=>Z});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>lo,getTelemetryPort:()=>co,isSupported:()=>uo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>wo,getDataLayerPort:()=>mo,isSupported:()=>vo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Co,registerOnResumeHandler:()=>yo});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Io,FailedReason:()=>Eo,Messages:()=>Ao,_initialize:()=>Ro,_uninitialize:()=>Fo,getContext:()=>ko,getFrameContext:()=>To,initialize:()=>Oo,isInitialized:()=>Po,lifecycle:()=>o,notifyAppLoaded:()=>Mo,notifyExpectedFailure:()=>Do,notifyFailure:()=>No,notifySuccess:()=>xo,openLink:()=>_o,registerHostToAppPerformanceMetricsHandler:()=>Ho,registerOnContextChangeHandler:()=>Lo,registerOnThemeChangeHandler:()=>Uo});var a={};n.r(a),n.d(a,{isSupported:()=>Wo,resize:()=>Bo});var s={};n.r(s),n.d(s,{isSupported:()=>zo,open:()=>jo});var c={};n.r(c),n.d(c,{isSupported:()=>Jo,registerOnMessageFromParent:()=>Go,sendMessageToDialog:()=>$o,sendMessageToParentFromDialog:()=>qo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Yo,getDialogInfoFromUrlDialogInfo:()=>Xo,isSupported:()=>Zo,open:()=>Ko,parentCommunication:()=>c,submit:()=>Qo});var l={};n.r(l),n.d(l,{isSupported:()=>di,open:()=>li});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>pi,open:()=>fi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>gi,isSupported:()=>hi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>vi,MenuItem:()=>Ci,MenuListType:()=>wi,initialize:()=>Ii,isSupported:()=>Mi,setNavBarMenu:()=>Oi,setUpViews:()=>Pi,showActionMenu:()=>Fi});var g={};n.r(g),n.d(g,{initialize:()=>xi,isSupported:()=>qi,registerChangeConfigHandler:()=>Bi,registerOnRemoveHandler:()=>Hi,registerOnRemoveHandlerHelper:()=>_i,registerOnSaveHandler:()=>Ui,registerOnSaveHandlerHelper:()=>Li,setConfig:()=>Di,setValidityState:()=>Ni});var h={};n.r(h),n.d(h,{isSupported:()=>Aa,onClick:()=>ya,onHoverEnter:()=>Sa,onHoverLeave:()=>ba});var m={};n.r(m),n.d(m,{_initialize:()=>Ea,isSupported:()=>Oa,navigateBack:()=>Ia,registerBackButtonHandler:()=>Pa,registerBackButtonHandlerHelper:()=>Ta});var v={};n.r(v),n.d(v,{isSupported:()=>ka,navigateTo:()=>Ra,navigateToDefaultPage:()=>Fa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ma,exitFullscreen:()=>xa,isSupported:()=>Na});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>La,getTabInstances:()=>Ua,isSupported:()=>Ha,navigateToTab:()=>Da});var y={};n.r(y),n.d(y,{EnterFocusType:()=>_a,ReturnFocusType:()=>Va,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>qa,initializeWithFrameContext:()=>za,isSupported:()=>Qa,navigateCrossDomain:()=>$a,navigateToApp:()=>Ga,registerFocusEnterHandler:()=>Wa,registerFullScreenHandler:()=>Ka,returnFocus:()=>Ba,setCurrentFrame:()=>ja,shareDeepLink:()=>Ja,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>Yc,registerGetLogHandler:()=>Xc});var b={};n.r(b),n.d(b,{closeConversation:()=>fu,getChatMembers:()=>pu,isSupported:()=>gu,openConversation:()=>du});var A={};n.r(A),n.d(A,{isSupported:()=>wu,sendCustomTelemetryData:()=>Cu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Eu,isSupported:()=>Au});var I={};n.r(I),n.d(I,{ContentItemType:()=>Pu,CopilotMode:()=>Fu,MediaSelectionType:()=>Tu,SidePanelErrorCode:()=>Nu,SidePanelErrorImpl:()=>Du,TeamsContextType:()=>Mu,TeamsDimensionName:()=>Ru,TeamsSessionType:()=>Ou,TranscriptState:()=>ku,UserConsent:()=>xu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>ju,getContent:()=>Vu,isResponseAReportableError:()=>_u,isSupported:()=>Hu,preCheckUserConsent:()=>Bu,registerUserActionContentSelect:()=>Wu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>Zu,isSupported:()=>Qu});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>nl,ActionExecuteResponseHandler:()=>sl,InvokeErrorCode:()=>il,InvokeResponseType:()=>ol,OriginalRequestType:()=>rl,SerializableActionExecuteInvokeRequest:()=>el,SerializableConnectorParameters:()=>vl,UserAuthenticationState:()=>al,authenticateAndResendRequest:()=>fl,authenticateWithConnector:()=>wl,authenticateWithOauth2:()=>hl,authenticateWithPowerPlatformConnectorPlugins:()=>ml,authenticateWithSSO:()=>pl,authenticateWithSSOAndResendRequest:()=>gl,disconnectConnector:()=>Sl,getUserAuthenticationStateForConnector:()=>yl,isActionExecuteResponse:()=>tl,isInvokeError:()=>cl,isSupported:()=>bl,validateActionExecuteInvokeRequest:()=>ll});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Tl,authenticateWithOauth:()=>Pl,authenticateWithSSO:()=>Il,authenticateWithSSOAndResendRequest:()=>Ol,isSupported:()=>Rl,validateInput:()=>Fl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>xl,ActionOpenUrlType:()=>Ml,isSupported:()=>Ul,processActionOpenUrl:()=>Dl,processActionSubmit:()=>Nl});var M={};n.r(M),n.d(M,{isSupported:()=>Bl,processActionOpenUrl:()=>_l,processActionSubmit:()=>Vl});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>Kl,isSupported:()=>Gl,processActionOpenUrlDialog:()=>$l});var N={};n.r(N),n.d(N,{isSupported:()=>Yl,processActionCommand:()=>Xl});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>td,CloudStorageProviderFileAction:()=>ad,CloudStorageProviderType:()=>nd,DocumentLibraryAccessType:()=>od,FileDownloadStatus:()=>id,SpecialDocumentLibraryType:()=>rd,addCloudStorageFolder:()=>cd,addCloudStorageProvider:()=>md,addCloudStorageProviderFile:()=>wd,copyMoveFiles:()=>pd,deleteCloudStorageFolder:()=>ud,deleteCloudStorageProviderFile:()=>yd,downloadCloudStorageProviderFile:()=>Sd,getCloudStorageFolderContents:()=>ld,getCloudStorageFolders:()=>sd,getExternalProviders:()=>fd,getFileDownloads:()=>gd,openCloudStorageFile:()=>dd,openDownloadFolder:()=>hd,registerCloudStorageProviderContentChangeHandler:()=>Ed,registerCloudStorageProviderListChangeHandler:()=>Ad,removeCloudStorageProvider:()=>vd,renameCloudStorageProviderFile:()=>Cd,uploadCloudStorageProviderFile:()=>bd});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>Td,isSupported:()=>kd,registerMeetingRoomCapabilitiesUpdateHandler:()=>Rd,registerMeetingRoomStatesUpdateHandler:()=>Fd,sendCommandToPairedMeetingRoom:()=>Od});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Md,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Ld,version:()=>xd});var _={};n.r(_),n.d(_,{isSupported:()=>$d,showNotification:()=>qd});var V={};n.r(V),n.d(V,{isSupported:()=>Zd,notifyInstallCompleted:()=>Qd,registerAppInstallationHandler:()=>Jd,unregisterAppInstallationHandler:()=>Kd});var B={};n.r(B),n.d(B,{ControlCommand:()=>Yd,ErrorReason:()=>ef,SessionTerminatedReason:()=>tf,getCapableParticipants:()=>nf,isSupported:()=>df,registerOnCapableParticipantsChangeHandler:()=>sf,registerOnDeviceStateChangeHandler:()=>uf,registerOnErrorHandler:()=>cf,registerOnSessionStatusChangeHandler:()=>lf,requestControl:()=>rf,sendControlCommand:()=>of,terminateSession:()=>af});var W={};n.r(W),n.d(W,{isSupported:()=>gf,selectAppEntity:()=>pf});var j={};n.r(j),n.d(j,{getUserJoinedTeams:()=>mf,isSupported:()=>vf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>yf,isSupported:()=>Sf,joinedTeams:()=>j});var q={};n.r(q),n.d(q,{ChannelType:()=>Af,fullTrust:()=>z,getTeamChannels:()=>Ef,isSupported:()=>Pf,refreshSiteUrl:()=>If});var $={};n.r($),n.d($,{EffectChangeType:()=>Uf,EffectFailureReason:()=>Lf,VideoFrameFormat:()=>Df,isSupported:()=>jf,notifySelectedVideoEffectChanged:()=>_f,registerForVideoEffect:()=>Vf,registerForVideoFrame:()=>Hf});var G={};n.r(G),n.d(G,{ErrorLevel:()=>pp,frameProcessingTimeoutInMs:()=>dp,isSupported:()=>Sp,notifyFatalError:()=>Ep,notifySelectedVideoEffectChanged:()=>wp,registerForVideoEffect:()=>Cp,registerForVideoFrame:()=>gp,updatePersonalizedEffects:()=>yp});var J={};n.r(J),n.d(J,{addAndConfigure:()=>Mp,getAll:()=>xp,isSupported:()=>Lp,reconfigure:()=>Np,remove:()=>Up,rename:()=>Dp});var K={};n.r(K),n.d(K,{AppTypes:()=>Vp,isSupported:()=>Bp,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Zp,openAppDetail:()=>Jp,openFullStore:()=>Gp,openInContextStore:()=>Kp,openSpecificStore:()=>Qp});var Z={};n.r(Z),n.d(Z,{callTool:()=>og,contentSizeChanged:()=>ug,isSupported:()=>rg,notifyIntrinsicHeight:()=>cg,openExternal:()=>dg,registerModalCloseHandler:()=>fg,requestDisplayMode:()=>ag,requestModal:()=>sg,sendFollowUpMessage:()=>ig,setWidgetState:()=>lg});var X={};n.r(X),n.d(X,{DataResidency:()=>Ug,authenticate:()=>Og,getAuthToken:()=>Fg,getUser:()=>Mg,notifyFailure:()=>Dg,notifySuccess:()=>Ng,registerAuthenticationHandlers:()=>Tg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>ih,openAppInstallDialog:()=>oh});var ee={};n.r(ee),n.d(ee,{CameraStartMode:()=>lh,File:()=>hh,FileFormat:()=>ch,ImageOutputFormats:()=>gh,ImageUriType:()=>ph,Media:()=>yh,MediaControllerEvent:()=>uh,MediaType:()=>fh,Source:()=>dh,VideoController:()=>bh,captureImage:()=>mh,hasPermission:()=>vh,requestPermission:()=>wh,scanBarCode:()=>Ih,selectMedia:()=>Ah,viewImages:()=>Eh});var te={};n.r(te),n.d(te,{hasPermission:()=>Vh,isSupported:()=>Wh,requestPermission:()=>Bh,scanBarCode:()=>_h});var ne={};n.r(ne),n.d(ne,{isSupported:()=>Gh,openChat:()=>zh,openGroupChat:()=>$h});var re={};n.r(re),n.d(re,{isSupported:()=>Xh,read:()=>Zh,write:()=>Qh});var oe={};n.r(oe),n.d(oe,{addNAATrustedOrigins:()=>lm,canParentManageNAATrustedOrigins:()=>im,deleteNAATrustedOrigins:()=>dm,getParentOrigin:()=>om,isDeeplyNestedAuthSupported:()=>am,isNAAChannelRecommended:()=>rm});var ie={};n.r(ie),n.d(ie,{chooseLocation:()=>mm,isSupported:()=>wm,showLocation:()=>vm});var ae={};n.r(ae),n.d(ae,{getCurrentLocation:()=>ym,hasPermission:()=>Sm,isSupported:()=>Am,map:()=>ie,requestPermission:()=>bm});var se={};n.r(se),n.d(se,{isSupported:()=>Fm,open:()=>Rm});var ce={};n.r(ce),n.d(ce,{getLocation:()=>Mm,isSupported:()=>Nm,showLocation:()=>xm});var ue={};n.r(ue),n.d(ue,{setOptions:()=>Um});var le={};n.r(le),n.d(le,{CallType:()=>Wm,EventActionSource:()=>zm,MeetingReactionType:()=>Vm,MeetingType:()=>Bm,SharingProtocol:()=>jm,appShareButton:()=>ue,getAppContentStageSharingCapabilities:()=>tv,getAppContentStageSharingState:()=>rv,getAuthenticationTokenForAnonymousUser:()=>Km,getIncomingClientAudioState:()=>qm,getLiveStreamState:()=>Qm,getMeetingDetails:()=>Gm,getMeetingDetailsVerbose:()=>Jm,joinMeeting:()=>sv,registerLiveStreamChangedHandler:()=>Ym,registerMeetingReactionReceivedHandler:()=>av,registerRaiseHandStateChangedHandler:()=>iv,registerSpeakingStateChangeHandler:()=>ov,requestAppAudioHandling:()=>cv,requestStartLiveStreaming:()=>Zm,requestStopLiveStreaming:()=>Xm,shareAppContentToStage:()=>ev,stopSharingAppContentToStage:()=>nv,toggleIncomingClientAudio:()=>$m,updateMicState:()=>dv});var de={};n.r(de),n.d(de,{isSupported:()=>mv,openPurchaseExperience:()=>hv});var fe={};n.r(fe),n.d(fe,{composeMeeting:()=>Cv,isSupported:()=>yv,openCalendarItem:()=>wv});var pe={};n.r(pe),n.d(pe,{composeMailWithHandoff:()=>Ev,isSupported:()=>Iv});var ge={};n.r(ge),n.d(ge,{ComposeMailType:()=>kv,composeMail:()=>Rv,handoff:()=>pe,isSupported:()=>Fv,openMailItem:()=>Ov});var he={};n.r(he),n.d(he,{enablePrintCapability:()=>xv,isSupported:()=>_v,print:()=>Nv,registerBeforeUnloadHandler:()=>Lv,registerBeforeUnloadHandlerHelper:()=>Hv,registerOnLoadHandler:()=>Dv,registerOnLoadHandlerHelper:()=>Uv});var me={};n.r(me),n.d(me,{isSupported:()=>zv,selectPeople:()=>Wv});var ve={};n.r(ve),n.d(ve,{isSupported:()=>Kv,showProfile:()=>Jv});var we={};n.r(we),n.d(we,{closeSearch:()=>rw,isSupported:()=>nw,registerHandlers:()=>ew,unregisterHandlers:()=>tw});var Ce={};n.r(Ce),n.d(Ce,{getContent:()=>aw,isSupported:()=>sw});var ye={};n.r(ye),n.d(ye,{SharingAPIMessages:()=>lw,history:()=>Ce,isSupported:()=>mw,shareWebContent:()=>dw});var Se={};n.r(Se),n.d(Se,{close:()=>ww,isSupported:()=>Cw});var be={};n.r(be),n.d(be,{StageViewOpenMode:()=>Sw,isSupported:()=>Aw,open:()=>bw,self:()=>Se});var Ae={};n.r(Ae),n.d(Ae,{captureImages:()=>Tw,isSupported:()=>Rw,retrieveImages:()=>Ow});var Ee={};n.r(Ee),n.d(Ee,{CameraRestriction:()=>Nw,Source:()=>Dw,hasPermission:()=>Uw,image:()=>Ae,requestPermission:()=>Lw});var Ie={};n.r(Ie),n.d(Ie,{isSupported:()=>zw,isWebStorageClearedOnUserLogOut:()=>Ww});var Pe={};n.r(Pe),n.d(Pe,{CallModalities:()=>$w,isSupported:()=>Jw,startCall:()=>Gw});var Te={};n.r(Te),n.d(Te,{ExpectedFailureReason:()=>Io,FailedReason:()=>Eo,Messages:()=>Ao,notifyAppLoaded:()=>Qw,notifyExpectedFailure:()=>Yw,notifyFailure:()=>Xw,notifySuccess:()=>Zw});var Oe={};n.r(Oe),n.d(Oe,{getDragAndDropFiles:()=>sC,isSupported:()=>uC});var Re={};n.r(Re),n.d(Re,{getSettings:()=>HC,registerOnRemoveHandler:()=>BC,registerOnSaveHandler:()=>VC,setSettings:()=>_C,setValidityState:()=>LC});var Fe={};n.r(Fe),n.d(Fe,{getDefaultSizeIfNotProvided:()=>KC,startTask:()=>zC,submitTask:()=>$C,updateTask:()=>qC});var ke={};n.r(ke),n.d(ke,{ContainerState:()=>XC,LiveShareHost:()=>ey,UserMeetingRole:()=>ZC,isSupported:()=>YC});var Me={};n.r(Me),n.d(Me,{CartStatus:()=>my,Intent:()=>hy,addOrUpdateCartItems:()=>wy,cartVersion:()=>gy,getCart:()=>vy,isSupported:()=>Sy,removeCartItems:()=>Cy,updateCartStatus:()=>yy});var xe,Ne,De,Ue,Le,He,_e,Ve,Be,We,je={};function ze(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(je),n.d(je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>Vy,enableShortcutRelayCapability:()=>Hy,isSupported:()=>_y,resetIsShortcutRelayCapabilityEnabled:()=>Ly,setOverridableShortcutHandler:()=>Uy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(xe||(xe={})),function(e){e.M365Content="m365content"}(Ne||(Ne={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(De||(De={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Ue||(Ue={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Le||(Le={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(He||(He={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(_e||(_e={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(Ve||(Ve={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Be||(Be={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(We||(We={}));const qe=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001"]}');const $e="2.0.1",Ge="2.0.2",Je="2.0.3",Ke="2.0.4",Qe="2.0.1",Ze="1.9.0",Xe="2.0.0",Ye="1.7.0",et="1.8.0",tt="1.9.0",nt=n.t(qe,2).validOrigins,rt=1500,ot=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),it=/^https:\/\//,at="https",st="teams.microsoft.com",ct="The library has not yet been initialized",ut="The runtime has not yet been initialized",lt="The runtime version is not supported",dt="The call was not properly started";var ft=n(933);const pt=ht,gt=2147483647;function ht(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return vt(e)}return mt(e,t,n)}function mt(e,t,n){if("string"==typeof e)return St(e,t);if(ArrayBuffer.isView(e))return Ot(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(At(e,ArrayBuffer)||e&&At(e.buffer,ArrayBuffer))return Rt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(At(e,SharedArrayBuffer)||e&&At(e.buffer,SharedArrayBuffer)))return Rt(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return ht.from(r,t,n);const o=Qt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ht.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function vt(e){return wt(e),Ct(e<0?0:0|yt(e))}function wt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ct(e){if(e>gt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ht.prototype),t}function yt(e){if(e>=gt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gt.toString(16)+" bytes");return 0|e}function St(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ht.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|bt(e,t);let r=Ct(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function bt(e,t){if(ht.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||At(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return It(e).length;default:if(o)return r?-1:Et(e).length;t=(""+t).toLowerCase(),o=!0}}function At(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Et(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function It(e){return ft.toByteArray(Tt(e))}ht.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),ht.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ht.from=function(e,t,n){return mt(e,t,n)},Object.setPrototypeOf(ht.prototype,Uint8Array.prototype),Object.setPrototypeOf(ht,Uint8Array),ht.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ht.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ht.prototype};const Pt=/[^+/0-9A-Za-z-_]/g;function Tt(e){if((e=(e=e.split("=")[0]).trim().replace(Pt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ot(e){if(At(e,Uint8Array)){const t=new Uint8Array(e);return Rt(t.buffer,t.byteOffset,t.byteLength)}return Ft(e)}function Rt(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,ht.prototype),r}function Ft(e){const t=e.length<0?0:0|yt(e.length),n=Ct(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function kt(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Nt(r)}function Mt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Dt(this,t,n);case"utf8":case"utf-8":return kt(this,t,n);case"ascii":return Ut(this,t,n);case"latin1":case"binary":return Lt(this,t,n);case"base64":return Ht(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ht.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?kt(this,0,e):Mt.apply(this,arguments)};const xt=4096;function Nt(e){const t=e.length;if(t<=xt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=xt));return n}function Dt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Kt[e[r]];return o}function Ut(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Lt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Ht(e,t,n){return 0===t&&n===e.length?ft.fromByteArray(e):ft.fromByteArray(e.slice(t,n))}function _t(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Vt(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(Jt(r))return a;e[n+a]=r}return a}function Bt(e,t,n,r){return Gt(Et(t,e.length-n),e,n,r)}function Wt(e,t,n,r){return Gt(qt(t),e,n,r)}function jt(e,t,n,r){return Gt(It(t),e,n,r)}function zt(e,t,n,r){return Gt($t(t,e.length-n),e,n,r)}function qt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $t(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function Gt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Jt(e){return e!=e}ht.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Vt(this,e,t,n);case"utf8":case"utf-8":return Bt(this,e,t,n);case"ascii":case"latin1":case"binary":return Wt(this,e,t,n);case"base64":return jt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Kt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Qt(e){if(ht.isBuffer(e)){const t=0|yt(e.length),n=Ct(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Jt(e.length)?Ct(0):Ft(e):"Buffer"===e.type&&Array.isArray(e.data)?Ft(e.data):void 0}const Zt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xt;const Yt=new Uint8Array(16);function en(){if(!Xt&&(Xt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xt(Yt)}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function nn(e,t=0){return tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]}const rn=function(e,t,n){if(Zt.randomUUID&&!t&&!e)return Zt.randomUUID();const r=(e=e||{}).random||(e.rng||en)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return nn(r)},on=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const an=function(e){return"string"==typeof e&&on.test(e)};var sn,cn,un,ln,dn,fn,pn,gn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(sn||(sn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(cn||(cn={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(un||(un={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(ln||(ln={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(dn||(dn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(fn||(fn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(pn||(pn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(gn||(gn={}));const hn={errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},mn={majorVersion:1,minorVersion:5},vn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},wn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Cn=new Error("Invalid response: Received more images than the specified max limit in the response.");function yn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Sn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function bn(){return rn()}function An(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&An(e[t])})),Object.freeze(e)}function En(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function In(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Pn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Tn(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function On(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Rn(e){return!(Sn(`${e.majorVersion}.${e.minorVersion}`,`${mn.majorVersion}.${mn.minorVersion}`)>=0)}function Fn(e){return"https:"===e.protocol}function kn(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=pt.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Mn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function xn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function Dn(e,t){if(Hn(e)||!_n(e)||!Vn(e))throw t||new Error("id is not valid.")}function Un(e,t){const n=e.toString().toLocaleLowerCase();if(Hn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Fn(e))throw t||new Error("Url should be a valid https url")}function Ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Hn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function _n(e){return e.length<256&&e.length>4}function Vn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Bn(e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}const Wn=!!performance&&"now"in performance;function jn(){return Wn?performance.now()+performance.timeOrigin:void 0}function zn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>zn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>zn(e[n],t+1)))}function qn(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:Ve.NotAdult})})})}class $n{constructor(e=bn()){this.uuid=e,Bn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Gn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Jn{}Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.additionalValidOrigins=[],Jn.initializePromise=void 0,Jn.isFramelessWindow=!1,Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.printCapabilityEnabled=!1,Jn.teamsJsInstanceId=(new $n).toString();var Kn=n(815);const Qn=new $n,Zn=Kn.debug.formatArgs;Kn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Qn.toString()}]`,Zn.call(this,e)};const Xn=(0,Kn.debug)("teamsJs");function Yn(e){return Xn.extend(e)}function er(e,t){return`${e}_${t}`}function tr(e){return/^v\d+_[\w.]+$/.test(e)}var nr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const rr=Yn("runtime"),or=4;function ir(e){return e.apiVersion===or}const ar={apiVersion:-1,supports:{}};function sr(e){if(ir(e))return!0;throw-1===e.apiVersion?new Error(ut):new Error(lt)}let cr=ar;const ur={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:vn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},lr=[sn.desktop,sn.web,sn.rigel,sn.surfaceHub,sn.teamsRoomsWindows,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays],dr=[sn.android,sn.ios,sn.ipados,sn.visionOS],fr=[...lr,...dr];function pr(e){let t=e;if(t.apiVersion<or&&gr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),ir(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const gr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=nr(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],hr="2.1.2",mr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:lr}],"1.9.0":[{capability:{location:{}},hostClientTypes:fr}],"2.0.0":[{capability:{people:{}},hostClientTypes:fr},{capability:{sharing:{}},hostClientTypes:[sn.desktop,sn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[sn.android,sn.desktop,sn.ios,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays,sn.web]},{capability:{webStorage:{}},hostClientTypes:[sn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[sn.android,sn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[sn.android,sn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[sn.android,sn.ios,sn.ipados,sn.visionOS]}],"2.1.2":[]},vr=rr.extend("generateBackCompatRuntimeConfig");function wr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=wr(e[r]||{},t[r]));return n}function Cr(e,t,n){vr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);vr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Sn(e,t)>=0&&n[t].forEach((e=>{void 0!==Jn.hostClientType&&e.hostClientTypes.includes(Jn.hostClientType)&&(r=wr(r,e.capability))}))}));const o={apiVersion:or,hostVersionsInfo:vn,isLegacyTeams:!0,supports:r};return vr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const yr=rr.extend("applyRuntimeConfig");function Sr(e){"string"==typeof e.apiVersion&&(yr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),yr("Fast-forwarding runtime %o",e);const t=pr(e);yr("Applying runtime %o",t),cr=An(t)}function br(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Ar="2.48.0-beta.2",Er={childProxyingCommunication:!1};function Ir(){Er.childProxyingCommunication=!0}function Pr(){return Er.childProxyingCommunication}let Tr={disableEnforceOriginMatchForChildResponses:!1};function Or(){return Tr}function Rr(e){Tr=e}function Fr(e){return Rr(Object.assign(Object.assign({},Tr),e)),Or()}var kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Mr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},xr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Dr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Ur(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Lr=Yn("flushMessageQueue");function Hr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Mr(o);Lr("Flushing message %s from %s message queue via postMessage.",Ur(n),r),e.postMessage(n,t)}}}const _r=Yn("internal"),Vr=_r.extend("ensureInitializeCalled"),Br=_r.extend("ensureInitialized");function Wr(){if(!Jn.initializeCalled)throw Vr(ct),new Error(ct)}function jr(e,...t){if(!Jn.initializeCompleted)throw Br("%s. initializeCalled: %s",ct,Jn.initializeCalled.toString()),new Error(ct);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Jn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Jn.frameContext}".`)}return sr(e)}function zr(e=$e){const t=Sn(Jn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function qr(){return Jn.hostClientType==sn.android||Jn.hostClientType==sn.ios||Jn.hostClientType==sn.ipados||Jn.hostClientType==sn.visionOS}function $r(e=$e){if(!qr()){throw{errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM}}if(!zr(e)){throw{errorCode:Ue.OLD_PLATFORM}}}function Gr(e){let t=Jn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&it.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Jn.additionalValidOrigins=t}function Jr(e){if(!Xr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Qr}-${Zr}).`)}function Kr(e){if(Hn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Yr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Qr=4,Zr=256;function Xr(e){return e.length<Zr&&e.length>Qr}function Yr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function eo(e){if(!(e instanceof no))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class to{constructor(e){this.idAsString=e,Kr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class no extends to{constructor(e){super(e),Jr(e)}toJSON(){return{appIdAsString:this.toString()}}}function ro(e){return null==e}var oo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let io;const ao="v1",so=Yn("messageChannels.telemetry");function co(){return oo(this,void 0,void 0,(function*(){if(io)return so("Returning telemetry port from cache"),io;if(!uo())throw hn;return io=yield Sc(er(ao,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),io}))}function uo(){var e;return!(!jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function lo(){io=void 0}var fo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let po;const go="v1",ho=Yn("messageChannels.dataLayer");function mo(){return fo(this,void 0,void 0,(function*(){if(po)return ho("Returning dataLayer port from cache"),po;if(!vo())throw hn;return po=yield Sc(er(go,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),po}))}function vo(){var e;return!(!jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function wo(){po=void 0}function Co(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");jr(cr),Hs(e)}function yo(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");jr(cr),_s(e)}const So="v2",bo=Yn("app"),Ao={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Eo,Io;function Po(){return Jn.initializeCompleted}function To(){return Jn.frameContext}function Oo(e){return Zi(er(So,"app.initialize"),e)}function Ro(e){uc.currentWindow=e}function Fo(){Jn.initializeCalled&&(ys(),Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.initializePromise=void 0,Jn.additionalValidOrigins=[],Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.isFramelessWindow=!1,lo(),wo(),fc())}function ko(){return new Promise((e=>{Wr(),e(pc(er(So,"app.getContext"),"getContext"))})).then((e=>Vo(e)))}function Mo(){Wr(),Xi(er(So,"app.notifyAppLoaded"))}function xo(){return ta(er(So,"app.notifySuccess"))}function No(e){Wr(),ea(er(So,"app.notifyFailure"),e)}function Do(e){Wr(),Yi(er(So,"app.notifyExpectedFailure"),e)}function Uo(e){aa(er(So,"app.registerOnThemeChangeHandler"),e)}function Lo(e){sa(er(So,"app.registerOnContextChangeHandler"),e)}function Ho(e){ks(e)}function _o(e){return ca(er(So,"app.openLink"),e)}function Vo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:cn.teams,clientType:e.hostClientType?e.hostClientType:sn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new no(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Jn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Bo(e){ni(er(ei,"dialog.update.resize"),e)}function Wo(){return!(!jr(cr)||!cr.supports.dialog)&&!!cr.supports.dialog.update}function jo(e,t,n){oi(er(ei,"dialog.url.bot.open"),e,t,n)}function zo(){return jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url&&cr.supports.dialog.url.bot)}function qo(e){if(jr(cr,un.task),!Jo())throw hn;Ec(er(ei,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function $o(e){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Jo())throw hn;Ec(er(ei,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Go(e){if(jr(cr,un.task),!Jo())throw hn;for(Es("messageForChild"),As(er(ei,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ci.reverse();ci.length>0;){e(ci.pop())}}function Jo(){var e,t;return jr(cr)&&!!(null===(t=null===(e=cr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Ko(e,t,n){ri(er(ei,"dialog.url.open"),e,t,n)}function Qo(e,t){ii(er(ei,"dialog.url.submit"),e,t)}function Zo(){return jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url)}function Xo(e){return{url:e.url,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Yo(e){const t=Xo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Eo||(Eo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Io||(Io={})),bo("teamsjs instance is version %s, starting at %s UTC (%s local)",Ar,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Nn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?bo("teamsjs is being used from %s. %s",t,n):bo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ei="v2",ti="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function ni(e,t){if(jr(cr,un.content,un.sidePanel,un.task,un.meetingStage),!Wo())throw hn;Ec(e,"tasks.updateTask",[t])}function ri(e,t,n,r){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Zo())throw hn;r&&As(er(ei,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Ec(e,"tasks.startTask",[Xo(t)],((e,t)=>{null==n||n({err:e,result:t}),Es("messageForParent")}))}function oi(e,t,n,r){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!zo())throw hn;r&&As(er(ei,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Ec(e,"tasks.startTask",[Yo(t)],((e,t)=>{null==n||n({err:e,result:t}),Es("messageForParent")}))}function ii(e,t,n){if(jr(cr,un.content,un.task),!Zo())throw hn;Jn.frameContext===un.content&&console.warn(ti),Ec(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ai(e){return{card:e.card,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title}}function si(e){const t=ai(e);return t.completionBotId=e.completionBotId,t}const ci=[];function ui(e){Jn.frameContext&&(Jn.frameContext===un.task?ci.push(e):Es("messageForChild"))}function li(e,t){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!di())throw hn;const n=si(e);Ec(er(ei,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card&&cr.supports.dialog.card.bot)}function fi(e,t){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!pi())throw hn;const n=ai(e);Ec(er(ei,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function pi(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card)}function gi(){As(er(ei,"dialog.registerMessageForChildHandler"),"messageForChild",ui,!1)}function hi(){return!(!jr(cr)||!cr.supports.dialog)}const mi="v2";var vi,wi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(vi||(vi={}));class Ci{constructor(){this.enabled=!0,this.selected=!1}}let yi,Si,bi,Ai,Ei;function Ii(){As(er(mi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ri,!1),As(er(mi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ki,!1),As(er(mi,"menus.registerSetModuleViewHandler"),"setModuleView",Ti,!1)}function Pi(e,t){if(jr(cr),!Mi())throw hn;bi=t,Ec(er(mi,"menus.setUpViews"),"setUpViews",[e])}function Ti(e){bi&&bi(e)||(jr(cr),Ec(er(mi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Oi(e,t){if(jr(cr),!Mi())throw hn;yi=t,Ec(er(mi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ri(e){yi&&yi(e)||(jr(cr),Ec(er(mi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Fi(e,t){if(jr(cr),!Mi())throw hn;Si=t,Ec(er(mi,"menus.showActionMenu"),"showActionMenu",[e])}function ki(e){Si&&Si(e)||(jr(cr),Ec(er(mi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Mi(){return!(!jr(cr)||!cr.supports.menus)}function xi(){As(er(Za,"pages.config.registerSettingsSaveHandler"),"settings.save",Vi,!1),As(er(Za,"pages.config.registerSettingsRemoveHandler"),"settings.remove",ji,!1)}function Ni(e){return as(er(Za,"pages.config.setValidityState"),e)}function Di(e){return cs(er(Za,"pages.config.setConfig"),e)}function Ui(e){Li(er(Za,"pages.config.registerOnSaveHandler"),e,(()=>{if(!ro(e)&&!qi())throw hn}))}function Li(e,t,n){!ro(t)&&jr(cr,un.settings),n&&n(),Ai=t,!ro(t)&&Ec(e,"registerHandler",["save"])}function Hi(e){_i(er(Za,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!ro(e)&&!qi())throw hn}))}function _i(e,t,n){!ro(t)&&jr(cr,un.remove,un.settings),n&&n(),Ei=t,!ro(t)&&Ec(e,"registerHandler",["remove"])}function Vi(e){const t=new Wi(e);Ai?Ai(t):zs()?Zs("settings.save",[e]):t.notifySuccess()}function Bi(e){Ps(er(Za,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[un.content],(()=>{if(!qi())throw hn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(wi||(wi={}));class Wi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Ec(er(Za,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ec(er(Za,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function ji(){const e=new zi;Ei?Ei(e):zs()?Zs("settings.remove",[]):e.notifySuccess()}class zi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Ec(er(Za,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ec(er(Za,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function qi(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.config}class $i{}class Gi extends $i{validate(e){return!0}deserialize(e){return e}}var Ji=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ki=6e4,Qi=Yn("app");function Zi(e,t){if(Nn()){return Qi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Tn((()=>ia(e,t)),Ki,new Error("SDK initialization timed out."))}function Xi(e){Ec(e,Ao.AppLoaded,[Ar])}function Yi(e,t){Ec(e,Ao.ExpectedFailure,[t.reason,t.message])}function ea(e,t){Ec(e,Ao.Failure,[t.reason,t.message])}function ta(e){return Ji(this,void 0,void 0,(function*(){if(Jn.initializeCompleted)return ra(e);if(!Jn.initializePromise)throw new Error(ct);return Jn.initializePromise.then((()=>ra(e)))}))}function na(){var e;return jr(cr)&&!!(null===(e=cr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ra(e){return Ji(this,void 0,void 0,(function*(){return na()?Cc(Ao.Success,[Ar],new Gi,e).then((()=>({hasFinishedSuccessfully:!0}))):(Ec(e,Ao.Success,[Ar]),{hasFinishedSuccessfully:"unknown"})}))}const oa=Qi.extend("initializeHelper");function ia(e,t){return new Promise((n=>{Jn.initializeCalled||(Jn.initializeCalled=!0,Cs(),Jn.initializePromise=dc(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=$e})=>{Jn.frameContext=e,Jn.hostClientType=t,Jn.clientSupportedSDKVersion=r;try{oa("Parsing %s",n);let e=JSON.parse(n);if(oa("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=qn(e),n&&Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{oa("Attempting to parse %s as an SDK version",n),isNaN(Sn(n,$e))||(Jn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(oa("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=qn(e),Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Sr(Cr(Jn.clientSupportedSDKVersion,ur,mr))}}Jn.initializeCompleted=!0})),Ii(),xi(),gi()),Array.isArray(t)&&Gr(t),void 0!==Jn.initializePromise?n(Jn.initializePromise):oa("GlobalVars.initializePromise is unexpectedly undefined")}))}function aa(e,t){!ro(t)&&Wr(),Ts(e,t)}function sa(e,t){!ro(t)&&Wr(),Os(e,t)}function ca(e,t){return new Promise((n=>{jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),n(gc(e,"executeDeepLink",t))}))}var ua=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let la=[];const da=Yn("validateOrigin");let fa;function pa(){return ua(this,void 0,void 0,(function*(){fa||(yield ha())}))}function ga(){return 0===la.length}function ha(e=!1){return ua(this,void 0,void 0,(function*(){if(!ga()&&!e)return la;if(fa)return fa;if(Nn())return la=nt,nt;{da("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),rt);return fa=fetch(ot,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return da("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(ma(JSON.stringify(e)))return la=e.validOrigins,la;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?da(`validOrigins fetch call to CDN failed due to Timeout of ${rt} ms. Defaulting to fallback list`):da("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),la=nt,la))),fa}}))}function ma(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return da("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function va(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function wa(e,t){const n=t||ga()?nt:la;return Ca(e,n)?Promise.resolve(!0):(da("Origin %s is not in the local valid origins list, fetching from CDN",e),ha(t).then((t=>Ca(e,t))))}function Ca(e,t){if(!Fn(e))return da("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>va(e,n))))return!0;for(const e of Jn.additionalValidOrigins){if(va("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return da("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Jn.additionalValidOrigins),!1}function ya(e){Ps(er(Za,"pages.appButton.onClick"),"appButtonClick",e,[un.content],(()=>{if(!Aa())throw hn}))}function Sa(e){Ps(er(Za,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[un.content],(()=>{if(!Aa())throw hn}))}function ba(e){Ps(er(Za,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[un.content],(()=>{if(!Aa())throw hn}))}function Aa(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.appButton}function Ea(){gs()}function Ia(){return Ya(er(Za,"pages.backStack.navigateBack"))}function Pa(e){Ta(er(Za,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!ro(e)&&!Oa())throw hn}))}function Ta(e,t,n){!ro(t)&&jr(cr),n&&n(),ps(t),!ro(t)&&Ec(e,"registerHandler",["backButton"])}function Oa(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.backStack}function Ra(e){return new Promise((t=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ka())throw hn;t(mc(er(Za,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Fa(){return new Promise((e=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ka())throw hn;e(mc(er(Za,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function ka(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.currentApp}function Ma(){if(jr(cr,un.content),!Na())throw hn;Ec(er(Za,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function xa(){if(jr(cr,un.content),!Na())throw hn;Ec(er(Za,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Na(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.fullTrust}function Da(e){return es(er(Za,"pages.tabs.navigateToTab"),e)}function Ua(e){return ns(er(Za,"pages.tabs.getTabInstances"),e)}function La(e){return rs(er(Za,"pages.tabs.getMruTabInstances"),e)}function Ha(){return!(!jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.tabs}var _a,Va;function Ba(e){const t=er(Za,"pages.returnFocus");if(jr(cr),!Qa())throw hn;if(void 0===e&&Ec(t,"returnFocus",[!1]),"boolean"==typeof e)Ec(t,"returnFocus",[e]);else switch(e){case Va.PreviousLandmark:case Va.GoToActivityFeed:Ec(t,"returnFocus",[!1,e]);break;case Va.NextLandmark:Ec(t,"returnFocus",[!0,e])}}function Wa(e){Ps(er(Za,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Qa())throw hn}))}function ja(e){is(er(Za,"pages.setCurrentFrame"),e)}function za(e,t,n){pa(),Zi(er(Za,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),ja(e)}function qa(){return ss(er(Za,"pages.getConfig."))}function $a(e){return Xa(er(Za,"pages.navigateCrossDomain"),e)}function Ga(e){return new Promise((t=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!Qa())throw hn;const n=er(Za,"pages.navigateToApp");if(cr.isLegacyTeams){t(gc(n,"executeDeepLink",On(us(e)?e:ls(e))))}else{t(gc(n,"pages.navigateToApp",us(e)?ds(e):e))}}))}function Ja(e){return os(er(Za,"pages.shareDeepLink"),e)}function Ka(e){Ps(er(Za,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!ro(e)&&!Qa())throw hn}))}function Qa(){return!(!jr(cr)||!cr.supports.pages)}pa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(_a||(_a={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Va||(Va={}));const Za="v2";function Xa(e,t){return new Promise((n=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage),!Qa())throw hn;n(hc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ya(e){return new Promise((t=>{if(jr(cr),!Oa())throw hn;t(hc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function es(e,t){return new Promise((n=>{if(jr(cr),!Ha())throw hn;n(hc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function ts(e,t){if(jr(cr),!Qa())throw hn;Ec(e,"returnFocus",[t])}function ns(e,t){return new Promise((n=>{if(jr(cr),!Ha())throw hn;n(pc(e,"getTabInstances",t))}))}function rs(e,t){return new Promise((n=>{if(jr(cr),!Ha())throw hn;n(pc(e,"getMruTabInstances",t))}))}function os(e,t){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Qa())throw hn;Ec(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function is(e,t){if(jr(cr,un.content),!Qa())throw hn;Ec(e,"setFrameContext",[t])}function as(e,t){if(jr(cr,un.settings,un.remove),!qi())throw hn;Ec(e,"settings.setValidityState",[t])}function ss(e){return new Promise((t=>{if(jr(cr,un.content,un.settings,un.remove,un.sidePanel),!Qa())throw hn;t(pc(e,"settings.getSettings"))}))}function cs(e,t){return new Promise((n=>{if(jr(cr,un.content,un.settings,un.sidePanel),!qi())throw hn;n(gc(e,"settings.setSettings",t))}))}function us(e){return e.appId instanceof no}function ls(e){return Object.assign(Object.assign({},e),{appId:new no(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ds(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let fs;function ps(e){fs=e}function gs(){As(er(Za,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",hs,!1)}function hs(){fs&&fs()||(zs()?Zs("backButtonPress",[]):Ia())}var ms=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const vs=Yn("handlers");class ws{static initializeHandlers(){ws.handlers.themeChange=Rs,ws.handlers.contextChange=Fs,ws.handlers.load=Ns,ws.handlers.beforeUnload=Ls,gs()}static uninitializeHandlers(){ws.handlers={},ws.themeChangeHandler=null,ws.beforeUnloadHandler=null,ws.beforeSuspendOrTerminateHandler=null,ws.resumeHandler=null,ws.contextChangeHandler=null}}function Cs(){ws.initializeHandlers()}function ys(){ws.uninitializeHandlers()}ws.handlers={},ws.themeChangeHandler=null,ws.loadHandler=null,ws.beforeUnloadHandler=null,ws.beforeSuspendOrTerminateHandler=null,ws.resumeHandler=null,ws.hostToAppPerformanceMetricsHandler=null,ws.contextChangeHandler=null;const Ss=vs.extend("callHandler");function bs(e,t){const n=ws.handlers[e];if(n){Ss("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return zs()?(Zs(e,t),[!1,void 0]):(Ss("Handler for action message %s not found.",e),[!1,void 0])}function As(e,t,n,r=!0,o=[]){n?(ws.handlers[t]=n,r&&Ec(e,"registerHandler",[t,...o])):delete ws.handlers[t]}function Es(e){delete ws.handlers[e]}function Is(e){return null!=ws.handlers[e]}function Ps(e,t,n,r,o){n&&jr(cr,...r),o&&o(),As(e,t,n)}function Ts(e,t){ws.themeChangeHandler=t,!ro(t)&&Ec(e,"registerHandler",["themeChange"])}function Os(e,t){ws.contextChangeHandler=t,!ro(t)&&Ec(e,"registerHandler",["contextChange"])}function Rs(e){ws.themeChangeHandler&&ws.themeChangeHandler(e),zs()&&Zs("themeChange",[e])}function Fs(e){ws.contextChangeHandler&&ws.contextChangeHandler(e),zs()&&Zs("contextChange",[e])}function ks(e){ws.hostToAppPerformanceMetricsHandler=e}function Ms(e){ws.hostToAppPerformanceMetricsHandler&&ws.hostToAppPerformanceMetricsHandler(e)}function xs(e,t){ws.loadHandler=t,!ro(t)&&Ec(e,"registerHandler",["load"])}function Ns(e){const t=Ds(e);ws.resumeHandler?(ws.resumeHandler(t),zs()&&Zs("load",[t])):ws.loadHandler&&(ws.loadHandler(e),zs()&&Zs("load",[e]))}function Ds(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Us(e,t){ws.beforeUnloadHandler=t,!ro(t)&&Ec(e,"registerHandler",["beforeUnload"])}function Ls(){return ms(this,void 0,void 0,(function*(){const e=()=>{Ec(er("v2","handleBeforeUnload"),"readyToUnload",[])};ws.beforeSuspendOrTerminateHandler?(yield ws.beforeSuspendOrTerminateHandler(),zs()?Zs("beforeUnload"):e()):ws.beforeUnloadHandler&&ws.beforeUnloadHandler(e)||(zs()?Zs("beforeUnload"):e())}))}function Hs(e){ws.beforeSuspendOrTerminateHandler=e,!ro(e)&&Ec(er("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function _s(e){ws.resumeHandler=e,!ro(e)&&Ec(er("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Vs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Bs=Yn("childProxyingCommunication");class Ws{}function js(){Ws.window=null,Ws.origin=null,Ws.messageQueue=[]}function zs(){return!!Pr()&&!!Ws.window}function qs(e,t){return!!Pr()&&(Ws.window&&!Ws.window.closed&&e!==Ws.window||(Ws.window=e,Ws.origin=t),Ws.window&&Ws.window.closed?(Ws.window=null,Ws.origin=null,!1):Ws.window===e)}function $s(e,t,n,r){return Vs(this,void 0,void 0,(function*(){Ws.window===t&&(Hr(Ws.window,Ws.origin,Ws.messageQueue,"child"),Js(e,n,r))}))}Ws.messageQueue=[];const Gs=Bs.extend("handleIncomingMessageFromChild");function Js(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=xr(e.data),[o,i]=bs(r.func,r.args);if(o&&void 0!==i)return Gs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Ur(r),r.func),void Qs(r.id,r.uuid,Array.isArray(i)?i:[i]);Gs("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Ur(r),r.func),Ks(r,t,n)}function Ks(e,t,n){const r=t(er("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ws.origin;n(r.uuid,((...t)=>{if(!Ws.window)return;if(!Or().disableEnforceOriginMatchForChildResponses&&o!==Ws.origin)return void Gs("Origin of child window has changed, not sending response back to child window");const n=t.pop();Gs("Message from parent being relayed to child, id: %s",Ur(e)),Qs(e.id,e.uuid,t,n)}))}function Qs(e,t,n,r){const o=Ws.window,i=Xs(e,t,n,r),a=Dr(i),s=Ws.origin;o&&s&&(Gs("Sending message %s to %s via postMessage, args = %o",Ur(a),"child",a.args),o.postMessage(a,s))}function Zs(e,t){const n=Ws.window,r=Ys(e,t),o=Ws.origin;n&&o?n.postMessage(r,o):Ws.messageQueue.push(r)}function Xs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Ys(e,t){return{func:e,args:t||[]}}class ec{static storeCallbackInformation(e,t){ec.callbackInformation.set(e,t)}static clearMessages(){ec.callbackInformation.clear()}static deleteMessageInformation(e){ec.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ms({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=ec.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ms({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),ec.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}ec.callbackInformation=new Map;const tc=Yn("nestedAppAuthUtils"),nc=tc.extend("tryPolyfillWithNestedAppAuthBridge"),rc="v2";function oc(e,t,n){var r;const o=nc;if(Jn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=ac(a,n);s&&(a.nestedAppAuthBridge=s)}const ic=tc.extend("createNestedAppAuthBridge");function ac(e,t){const n=ic;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=er(rc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var sc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 cc=Yn("communication");class uc{}class lc{}function dc(e,t){if(lc.messageListener=e=>Mc(e),uc.currentWindow=uc.currentWindow||xn(),uc.parentWindow=uc.currentWindow.parent!==uc.currentWindow.self?uc.currentWindow.parent:uc.currentWindow.opener,uc.topWindow=uc.currentWindow.top,(uc.parentWindow||e)&&uc.currentWindow.addEventListener("message",lc.messageListener,!1),!uc.parentWindow){const e=uc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Jn.isFramelessWindow=!0,e.onNativeMessage=Wc}try{return uc.parentOrigin="*",vc(t,"initialize",[Ar,or,e]).then((([e,t,n,r])=>(oc(r,uc.currentWindow,{onMessage:Nc,sendPostMessage:Pc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{uc.parentOrigin=null}}function fc(){uc.currentWindow&&uc.currentWindow.removeEventListener("message",lc.messageListener,!1),uc.currentWindow=null,uc.parentWindow=null,uc.parentOrigin=null,lc.parentMessageQueue=[],lc.nextMessageId=0,lc.callbacks.clear(),lc.promiseCallbacks.clear(),lc.portCallbacks.clear(),lc.legacyMessageIdsToUuidMap={},ec.clearMessages(),js()}function pc(e,t,...n){return vc(e,t,n).then((([e])=>e))}function gc(e,t,...n){return vc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function hc(e,t,n,...r){return vc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function mc(e,t,...n){return vc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function vc(e,t,n=void 0){if(!tr(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(Ac(Fc(e,t,n).uuid))}))}function wc(e){return e.map((e=>br(e)?e.serialize():e))}function Cc(e,t,n,r,o){var i;return sc(this,void 0,void 0,(function*(){const a=wc(t),[s]=yield vc(r,e,a);if(o&&o(s)||!o&&ze(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function yc(e,t,n,r){var o;return sc(this,void 0,void 0,(function*(){const i=wc(t),[a]=yield vc(n,e,i);if(r&&r(a)||!r&&ze(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Sc(e,t,n=void 0){if(!tr(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return bc(Fc(e,t,n).uuid)}function bc(e){return new Promise(((t,n)=>{lc.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 Ac(e){return new Promise((t=>{lc.promiseCallbacks.set(e,t)}))}function Ec(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!tr(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Fc(e,t,o);r&&lc.callbacks.set(i.uuid,r)}lc.parentMessageQueue=[],lc.topMessageQueue=[],lc.nextMessageId=0,lc.callbacks=new Map,lc.promiseCallbacks=new Map,lc.portCallbacks=new Map,lc.legacyMessageIdsToUuidMap={};const Ic=cc.extend("sendNestedAuthRequestToTopWindow");function Pc(e,t){const n=Ic,r=uc.topWindow,o=Qc(e,t);return n("Message %s information: %o",Ur(o),{actionName:o.func}),Oc(r,o)}const Tc=cc.extend("sendRequestToTargetWindowHelper");function Oc(e,t){const n=Tc,r=Gc(e),o=Mr(t);if(Jn.isFramelessWindow)uc.currentWindow&&uc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Ur(o),r),uc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=$c(e);e&&i?(n("Sending message %s to %s via postMessage",Ur(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Ur(o),r),qc(e).push(t))}return t}const Rc=cc.extend("sendMessageToParentHelper");function Fc(e,t,n,r,o){const i=Rc,a=uc.parentWindow,s=Kc(e,t,n,r,o);return ec.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Ur(s),{actionName:t,args:n}),Oc(a,s)}const kc=cc.extend("processIncomingMessage");function Mc(e){return sc(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void kc("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 Uc(t,n).then((r=>{r?(Lc(t,n),t!==uc.parentWindow?qs(t,n)&&$s(e,t,Fc,((e,t)=>lc.callbacks.set(e,t))):Wc(e)):kc("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 xc=cc.extend("processAuthBridgeMessage");function Nc(e,t){var n,r;const o=xc;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?Uc(c,u)?(uc.topWindow&&!uc.topWindow.closed&&c!==uc.topWindow||(uc.topWindow=c,uc.topOrigin=u),uc.topWindow&&uc.topWindow.closed&&(uc.topWindow=null,uc.topOrigin=null),Hr(uc.topWindow,uc.topOrigin,lc.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 Dc=cc.extend("shouldProcessIncomingMessage");function Uc(e,t){return sc(this,void 0,void 0,(function*(){if(uc.currentWindow&&e===uc.currentWindow)return Dc("Should not process message because it is coming from the current window"),!1;if(uc.currentWindow&&uc.currentWindow.location&&t&&t===uc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Dc("Message has an invalid origin of %s",t),!1}const n=yield wa(e);return n||Dc("Message has an invalid origin of %s",t),n}}))}function Lc(e,t){Jn.isFramelessWindow||uc.parentWindow&&!uc.parentWindow.closed&&e!==uc.parentWindow||(uc.parentWindow=e,uc.parentOrigin=t),uc.parentWindow&&uc.parentWindow.closed&&(uc.parentWindow=null,uc.parentOrigin=null),Hr(uc.parentWindow,uc.parentOrigin,lc.parentMessageQueue,"parent")}const Hc=cc.extend("handleIncomingMessageFromParent");function _c(e){const t=Hc;if(!e.uuid)return lc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Vc(lc.callbacks,t);if(n)return n;const r=Vc(lc.promiseCallbacks,t);if(r)return r;const o=Vc(lc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Ur(e))}function Vc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Bc(e,t){const n=Vc(t,e.uuid);n&&t.delete(n),e.uuid?lc.legacyMessageIdsToUuidMap={}:delete lc.legacyMessageIdsToUuidMap[e.id]}function Wc(e){const t=Hc,n=jn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=_c(o);if(i){const r=lc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),ec.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),jc(e)||(t("Removing registered callback for message %s",i.toString()),Bc(o,lc.callbacks)));const a=lc.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()),Bc(o,lc.promiseCallbacks));const s=lc.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()),Bc(o,lc.portCallbacks)}o.uuid&&(lc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;ec.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Ur(r),r.func),bs(r.func,r.args)}else t("Received an unknown message: %O",e)}function jc(e){return!0===e.data.isPartialResponse}function zc(){return uc.topWindow!==uc.parentWindow}function qc(e){return e===uc.topWindow&&zc()?lc.topMessageQueue:e===uc.parentWindow?lc.parentMessageQueue:[]}function $c(e){return e===uc.topWindow&&zc()?uc.topOrigin:e===uc.parentWindow?uc.parentOrigin:null}function Gc(e){return e===uc.topWindow&&zc()?"top":e===uc.parentWindow?"parent":null}function Jc(e,t){let n;n=uc.currentWindow.setInterval((()=>{0===qc(e).length&&(clearInterval(n),t())}),100)}function Kc(e,t,n,r,o){const i=lc.nextMessageId++,a=new $n;lc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Jn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:jn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Qc(e,t){const n=lc.nextMessageId++,r=new $n;return lc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:jn(),apiVersionTag:t,args:[],data:e}}const Zc="v1";function Xc(e){if(!ro(e)&&jr(cr),!ro(e)&&!Yc())throw hn;e?As(er(Zc,"log.request"),"log.request",(()=>{const t=e();Ec(er(Zc,"log.receive"),"log.receive",[t])})):Es("log.request")}function Yc(){return!(!jr(cr)||!cr.supports.logs)}var eu,tu,nu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(eu||(eu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(tu||(tu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(nu||(nu={}));const ru="v1";function ou(e,t){jr(cr),Ec(er(ru,"uploadCustomApp"),"uploadCustomApp",[e],t||yn())}function iu(e,t,n){jr(cr),Ec(er(ru,"sendCustomMessage"),e,t,n)}function au(e,t){if(jr(cr),!zs())throw new Error("The child window has not yet been initialized or is not present");Zs(e,t)}function su(e,t){jr(cr),As(er(ru,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function cu(e,t){jr(cr),As(er(ru,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function uu(e){jr(cr,un.content,un.sidePanel,un.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Ec(er(ru,"openFilePreview"),"openFilePreview",t)}const lu="v1";function du(e){return new Promise((t=>{if(jr(cr,un.content),!gu())throw hn;const n=gc(er(lu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&As(er(lu,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&As(er(lu,"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 fu(){if(jr(cr,un.content),!gu())throw hn;Ec(er(lu,"conversations.closeConversation"),"conversations.closeConversation"),Es("startConversation"),Es("closeConversation")}function pu(){return new Promise((e=>{if(jr(cr),!gu())throw hn;e(pc(er(lu,"conversations.getChatMember"),"getChatMembers"))}))}function gu(){return!(!jr(cr)||!cr.supports.conversations)}var hu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mu="v2",vu=Yn("copilot");function wu(){var e;return jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Cu(e,t){var n;return void 0===t&&(t=null!==(n=jn())&&void 0!==n?n:Date.now()),hu(this,void 0,void 0,(function*(){return jr(cr),vu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),yc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],er(mu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var yu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Su="v2",bu=Yn("copilot");function Au(){var e,t;return jr(cr)&&(!!(null===(e=cr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=cr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Eu(e){var t,n,r;return yu(this,void 0,void 0,(function*(){if(jr(cr),!Au())throw new Error(`Error code: ${hn.errorCode}, message: Not supported on platform`);if((null===(t=cr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return bu("Eligibility information is already available on runtime."),cr.hostVersionsInfo.appEligibilityInformation;bu("Eligibility information is not available on runtime. Requesting from host.");const o=yield pc(er(Su,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(ze(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!Iu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=Ve.NotAdult),o}))}function Iu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var Pu,Tu,Ou,Ru,Fu,ku,Mu,xu,Nu;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Pu||(Pu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Tu||(Tu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Ou||(Ou={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Ru||(Ru={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Fu||(Fu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(ku||(ku={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Mu||(Mu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(xu||(xu={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Nu||(Nu={}));class Du extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Uu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Lu="v2";function Hu(){var e;return jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function _u(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Nu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||ze(e)}function Vu(e){return Uu(this,void 0,void 0,(function*(){jr(cr);return Cc("copilot.sidePanel.getContent",e?[new $u(e)]:[],new zu,er(Lu,"copilot.sidePanel.getContent"),_u)}))}function Bu(e){return Uu(this,void 0,void 0,(function*(){jr(cr);return Cc("copilot.sidePanel.preCheckUserConsent",e?[new Gu(e)]:[],new qu,er(Lu,"copilot.sidePanel.preCheckUserConsent"),_u)}))}function Wu(e){Ps(er(Lu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[un.content],(()=>{if(!Hu())throw ju}))}const ju=new Du(Nu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class zu extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class qu extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class $u{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class Gu{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}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 Ku="v2";function Qu(){var e;return jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.view)}function Zu(){return Ju(this,void 0,void 0,(function*(){jr(cr),yield Cc("copilot.view.closeSidePanel",[],new Xu,er(Ku,"copilot.view.closeSidePanel"))}))}class Xu extends $i{validate(e){return!0}deserialize(e){return e}}const Yu="v2";class el{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function tl(e){const t=e;return t.responseType===ol.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const nl="Action.Execute";var rl,ol,il,al;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(rl||(rl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(ol||(ol={}));class sl extends $i{validate(e){return tl(e)}deserialize(e){return e}}function cl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(il).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function ul(e){e.requestType===rl.ActionExecuteInvokeRequest?ll(e):e.requestType===rl.QueryMessageExtensionRequest&&dl(e)}function ll(e){if(e.type!==nl){throw{errorCode:il.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${nl}"`}}if(!zn(e.data)){throw{errorCode:il.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function dl(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 fl(e,t,n){if(jr(cr,un.content),!bl())throw hn;const r=new no(e);return ul(n),vc(er(Yu,"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 pl(e,t){if(jr(cr,un.content),!bl())throw hn;const n=new no(e);return vc(er(Yu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function gl(e,t,n){if(jr(cr,un.content),!bl())throw hn;const r=new no(e);return ul(n),vc(er(Yu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function hl(e,t,n){if(jr(cr,un.content),!bl())throw hn;return Dn(e,new Error("titleId is Invalid.")),Dn(t,new Error("oauthConfigId is Invalid.")),vc(er(Yu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function ml(e,t,n){if(jr(cr,un.content),!bl())throw hn;return Dn(e,new Error("titleId is Invalid.")),t&&Un(t),vc(er(Yu,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(il||(il={}));class vl{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function wl(e){if(jr(cr,un.content),!bl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),yc("externalAppAuthentication.authenticateWithConnector",[new vl(e)],er(Yu,"externalAppAuthentication.authenticateWithConnector"),cl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(al||(al={}));class Cl extends $i{validate(e){return"string"==typeof e&&e in al}deserialize(e){return e}}function yl(e){if(jr(cr,un.content),!bl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Cc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new vl(e)],new Cl,er(Yu,"externalAppAuthentication.getUserAuthenticationStateForConnector"),cl)}function Sl(e){if(jr(cr,un.content),!bl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),yc("externalAppAuthentication.disconnectConnector",[new vl(e)],er(Yu,"externalAppAuthentication.disconnectConnector"),cl)}function bl(){return!(!jr(cr)||!cr.supports.externalAppAuthentication)}var Al=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const El="v2";function Il(e,t,n){return Al(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Rl())throw hn;return Fl(e,t),yc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],er(El,"externalAppAuthenticationForCEA.authenticateWithSSO"),cl)}))}function Pl(e,t,n){return Al(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Rl())throw hn;return Fl(e,t),yc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],er(El,"externalAppAuthenticationForCEA.authenticateWithOauth"),cl)}))}function Tl(e,t,n,r){return Al(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Rl())throw hn;return Fl(e,t),ll(r),Cc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new el(r),n.url.href,n.width,n.height,n.isExternal],new sl,er(El,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),cl)}))}function Ol(e,t,n,r){return Al(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Rl())throw hn;return Fl(e,t),ll(r),Cc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new el(r),n.authId,n.connectionName,n.claims,n.silent],new sl,er(El,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),cl)}))}function Rl(){return!(!jr(cr)||!cr.supports.externalAppAuthenticationForCEA)}function Fl(e,t){Dn(t,new Error("conversation id is not valid.")),eo(e)}const kl="v2";var Ml,xl;function Nl(e,t){if(jr(cr,un.content),!Ul())throw hn;const n=new no(e);return vc(er(kl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Dl(e,t,n){if(jr(cr,un.content),!Ul())throw hn;const r=new no(e);return vc(er(kl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Ul(){return!(!jr(cr)||!cr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Ml||(Ml={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(xl||(xl={}));var Ll=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Hl="v2";function _l(e,t,n){return Ll(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Bl())throw hn;Fl(e,t);const[r,o]=yield vc(er(Hl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Vl(e,t,n){return Ll(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Bl())throw hn;Fl(e,t);const r=yield pc(er(Hl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Bl(){return!(!jr(cr)||!cr.supports.externalAppCardActionsForCEA)}var Wl;function jl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Wl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Wl||(Wl={}));var zl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ql="v2";function $l(e,t,n){return zl(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Gl())throw hn;return Jl(e,n),yc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Kl(t),n],er(ql,"externalAppCardActionsForDA.processActionOpenUrlDialog"),jl)}))}function Gl(){return!(!jr(cr)||!cr.supports.externalAppCardActionsForDA)}function Jl(e,t){eo(e),Gn(t)}class Kl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Ql=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Zl="v2";function Xl(e,t,n){return Ql(this,void 0,void 0,(function*(){if(jr(cr,un.content),!Yl())throw hn;const r=new no(e),[o,i]=yield vc(er(Zl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Yl(){return!(!jr(cr)||!cr.supports.externalAppCommands)}const ed="v1";var td,nd,rd,od,id,ad;function sd(e,t){if(jr(cr,un.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Ec(er(ed,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function cd(e,t){if(jr(cr,un.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Ec(er(ed,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function ud(e,t,n){if(jr(cr,un.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Ec(er(ed,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function ld(e,t,n){if(jr(cr,un.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Ec(er(ed,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function dd(e,t,n){if(jr(cr,un.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Ec(er(ed,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function fd(e=!1,t){if(jr(cr,un.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ec(er(ed,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function pd(e,t,n,r,o=!1,i){if(jr(cr,un.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Ec(er(ed,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function gd(e){if(jr(cr,un.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ec(er(ed,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function hd(e=void 0,t){if(jr(cr,un.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ec(er(ed,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function md(e){if(jr(cr,un.content),!e)throw Id(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ec(er(ed,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function vd(e,t){if(jr(cr,un.content),!t)throw Id(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Id(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Ec(er(ed,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function wd(e,t){if(jr(cr,un.content),!t)throw Id(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Id(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ec(er(ed,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Cd(e,t){if(jr(cr,un.content),!t)throw Id(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Id(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ec(er(ed,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function yd(e,t){if(jr(cr,un.content),!t)throw Id(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Id(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ec(er(ed,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Sd(e,t){if(jr(cr,un.content),!t)throw Id(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Id(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ec(er(ed,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function bd(e,t){if(jr(cr,un.content),!t)throw Id(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Id(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Id(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Ec(er(ed,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Ad(e){if(jr(cr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");As(er(ed,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Ed(e){if(jr(cr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");As(er(ed,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Id(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"}(td||(td={})),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"}(nd||(nd={})),function(e){e.ClassMaterials="classMaterials"}(rd||(rd={})),function(e){e.Readonly="readonly"}(od||(od={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(id||(id={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(ad||(ad={}));const Pd="v1";function Td(){return new Promise((e=>{if(jr(cr),!kd())throw hn;e(mc(er(Pd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Od(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(jr(cr),!kd())throw hn;t(mc(er(Pd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Rd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(jr(cr),!kd())throw hn;As(er(Pd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{jr(cr),e(t)}))}function Fd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(jr(cr),!kd())throw hn;As(er(Pd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{jr(cr),e(t)}))}function kd(){return!(!jr(cr)||!cr.supports.meetingRoom)}function Md(){return!(!jr(cr)||!cr.supports.messageChannels)}const xd="1.0.1",Nd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Wd("Invalid message format, ignoring. Message: %o",e);if(!_d(e.source,e.origin))return void Wd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return jd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Wd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Dd=null,Ud=!1;function Ld(e,t,n=!1){if(Ud=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.`);Dd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Wd("Nested App Auth Bridge is already present");const o=Hd(r);o&&(r.nestedAppAuthBridge=o)}function Hd(e){const t=new WeakMap,{onMessage:n}=Nd,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 Wd(`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=Vd(t);if(e===e.top||!Dd)return void jd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Dd)}}catch(e){return void jd("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function _d(e,t){if(t===Dd)try{return"https:"===new URL(t).protocol}catch(e){return jd("Invalid message origin URL:",e),!1}return!1}function Vd(e){const t=Date.now();return{id:Bd(),uuid:rn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Bd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Wd(...e){Ud&&console.log(...e)}function jd(...e){Ud&&console.error(...e)}const zd="v1";function qd(e){if(jr(cr,un.content),!$d())throw hn;Ec(er(zd,"notifications.showNotification"),"notifications.showNotification",[e])}function $d(){return!(!jr(cr)||!cr.supports.notifications)}const Gd="v2";function Jd(e){if(!Zd())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());if(ro(e))throw new Error(Ue.INVALID_ARGUMENTS.toString());As(er(Gd,"otherApp.install"),"otherApp.install",e)}function Kd(){if(!Zd())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());Ec(er(Gd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Es("otherApp.install")}function Qd(e){if(!Zd())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());return yc("otherApp.notifyInstallCompleted",[e.toString()],er(Gd,"otherApp.notifyInstallCompleted"))}function Zd(){return!(!jr(cr)||!cr.supports.otherAppStateChange)}const Xd="v1";var Yd,ef,tf;function nf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;Ec(er(Xd,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function rf(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;Ec(er(Xd,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function of(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;Ec(er(Xd,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function af(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;Ec(er(Xd,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function sf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;As(er(Xd,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function cf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;As(er(Xd,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function uf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;As(er(Xd,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function lf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(jr(cr,un.sidePanel),!df())throw hn;As(er(Xd,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function df(){return!(!jr(cr)||!cr.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(Yd||(Yd={})),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"}(ef||(ef={})),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"}(tf||(tf={}));const ff="v1";function pf(e,t,n,r){if(jr(cr,un.content),!gf())throw hn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Ec(er(ff,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function gf(){return!(!jr(cr)||!cr.supports.appEntity)}const hf="v1";function mf(e){return new Promise((t=>{if(jr(cr),!vf())throw hn;if((Jn.hostClientType===sn.android||Jn.hostClientType===sn.teamsRoomsAndroid||Jn.hostClientType===sn.teamsPhones||Jn.hostClientType===sn.teamsDisplays)&&!zr(Qe)){const e={errorCode:Ue.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(pc(er(hf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function vf(){return!(!jr(cr)||!cr.supports.teams)&&(!!cr.supports.teams.fullTrust&&!!cr.supports.teams.fullTrust.joinedTeams)}var wf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Cf="v1";function yf(e){return wf(this,void 0,void 0,(function*(){if(jr(cr),!Sf())throw hn;return Cc("getConfigSetting",[e],new Gi,er(Cf,"teams.fullTrust.getConfigSetting"))}))}function Sf(){return!(!jr(cr)||!cr.supports.teams)&&!!cr.supports.teams.fullTrust}const bf="v1";var Af;function Ef(e,t){if(jr(cr,un.content),!Pf())throw hn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ec(er(bf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function If(e,t){if(jr(cr),!Pf())throw hn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ec(er(bf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Pf(){return!(!jr(cr)||!cr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Af||(Af={}));class Tf{static setTimeout(e,t){const n=performance.now(),r=bn();return Tf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Tf.setTimeoutCallbacks[e]}static setInterval(e,t){Tf.setTimeout((function n(){e(),Tf.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Tf.setTimeoutCallbacks){const r=Tf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Tf.setTimeoutCallbacks[e].callback(),delete Tf.setTimeoutCallbacks[e]}}}Tf.setTimeoutCallbacks={};class Of{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Tf.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&&Tf.clearTimeout(this.timeoutId),this.timeoutId=Tf.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(Of.maxSessionTimeoutInMs,2*t.timeoutInMs):Of.initialSessionTimeoutInMs}}Of.initialSessionTimeoutInMs=1e3,Of.maxSessionTimeoutInMs=3e4;const Rf="v2";class Ff{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Of(Ff.distributionBinSize,(e=>this.reportPerformanceEvent(er(Rf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Tf.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(er(Rf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Ff.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){Tf.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(er(Rf,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(er(Rf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Ff.distributionBinSize=1e3,Ff.calculateFPSInterval=1e3;var kf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Mf=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 xf="v2",Nf=Nn()?void 0:new Ff(Ec);var Df,Uf,Lf;function Hf(e){if(jr(cr,un.sidePanel),!jf())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(As(er(xf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Nf?void 0:Nf.setFrameProcessTimeLimit(e.timeLimit)),!1),Jf())zf(e.videoFrameHandler,e.config);else{if(!Qf())throw hn;$f(e.videoBufferHandler,e.config)}null==Nf||Nf.startMonitorSlowFrameProcessing()}function _f(e,t){if(jr(cr,un.sidePanel),!jf())throw hn;Ec(er(xf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Vf(e){if(jr(cr,un.sidePanel),!jf())throw hn;As(er(xf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",cp(e,Nf),!1),Ec(er(xf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Bf(e){Ec(er(xf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Wf(e){Ec(er(xf,"videoEffects.notifyError"),"video.notifyError",[e])}function jf(){return jr(cr)&&!!cr.supports.video&&(!!cr.supports.video.mediaStream||!!cr.supports.video.sharedFrame)}function zf(e,t){if(jr(cr,un.sidePanel),!jf()||!Jf())throw hn;As(er(xf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>kf(this,void 0,void 0,(function*(){const{streamId:n}=t,r=qf(e,Nf);yield Yf(n,r,Wf,Nf)}))),!1),Ec(er(xf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function qf(e,t){return n=>kf(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 $f(e,t){if(jr(cr,un.sidePanel),!jf()||!Qf())throw hn;As(er(xf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Nf||Nf.reportStartFrameProcessing(t.width,t.height),e(Gf(t),(()=>{null==Nf||Nf.reportFrameProcessed(),Bf(n)}),Wf)}}),!1),Ec(er(xf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Gf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Mf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Jf(){var e;return jr(cr,un.sidePanel)&&Kf()&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.mediaStream)}function Kf(){var e,t,n,r;return!(!(null===(t=null===(e=xn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=xn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Qf(){var e;return jr(cr,un.sidePanel)&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Df||(Df={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Uf||(Uf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Lf||(Lf={}));var Zf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Xf="v2";function Yf(e,t,n,r){var o,i;return Zf(this,void 0,void 0,(function*(){const a=np();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),rp(yield tp(e,n,r),new op(n,t),a.writable)}))}function ep(e,t,n,r){var o,i;return Zf(this,void 0,void 0,(function*(){const a=np();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),rp(yield tp(e,n,r),new sp(n,t),a.writable)}))}function tp(e,t,n){return Zf(this,void 0,void 0,(function*(){if(Nn())throw hn;const r=xn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function np(){if(Nn())throw hn;const e=window.MediaStreamTrackGenerator;if(!e)throw hn;return new e({kind:"video"})}function rp(e,t,n){new(0,xn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class op{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Zf(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 ip{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 ap{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 sp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Zf(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=>Zf(this,void 0,void 0,(function*(){if(Nn())throw hn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new ip(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 ap(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),As(er(Xf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function cp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Ec(er(Xf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Lf?e:Lf.InitializationFailure;Ec(er(Xf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var up=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 lp="v2",dp=2e3,fp=Nn()?void 0:new Ff(Ec);var pp;function gp(e){var t,n;if(!Sp())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(jr(cr,un.sidePanel)){if(As(er(lp,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==fp?void 0:fp.setFrameProcessTimeLimit(e)),!1),null===(t=cr.supports.video)||void 0===t?void 0:t.mediaStream)As(er(lp,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>up(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=fp?mp(e.videoFrameHandler,fp):e.videoFrameHandler;r?yield ep(n,o,Ap,fp):yield Yf(n,o,Ap,fp)}))),!1),Ec(er(lp,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=cr.supports.video)||void 0===n?void 0:n.sharedFrame))throw hn;As(er(lp,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==fp||fp.reportStartFrameProcessing(t.width,t.height);const n=hp(),r=t.timestamp;e.videoBufferHandler(vp(t),(()=>{n(),null==fp||fp.reportFrameProcessed(),bp(r)}),Ap)}}),!1),Ec(er(lp,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==fp||fp.startMonitorSlowFrameProcessing()}}function hp(){const e=setTimeout((()=>{Ap(`Frame not processed in ${dp}ms`,pp.Warn)}),dp);return function(){clearTimeout(e)}}function mp(e,t){return n=>up(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=hp(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function vp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function wp(e,t,n){if(jr(cr,un.sidePanel),!Sp())throw hn;Ec(er(lp,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Cp(e){if(jr(cr,un.sidePanel),!Sp())throw hn;As(er(lp,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",cp(e,fp),!1),Ec(er(lp,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function yp(e){if(jr(cr,un.sidePanel),!jf())throw hn;Ec(er(lp,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Sp(){return jr(cr),jf()}function bp(e){Ec(er(lp,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Ap(e,t=pp.Warn){Ec(er(lp,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Ep(e){if(jr(cr),!jf())throw hn;Ap(e,pp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(pp||(pp={}));const Ip="v2";class Pp extends $i{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Tp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Op{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Rp extends $i{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Fp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class kp extends $i{validate(e){const t=new Rp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Mp(e,t){if(jr(cr),!Lp())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Hp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Cc("hostEntity.tab.addAndConfigure",[new Op(e),t],new Rp,er(Ip,"hostEntity.tab.addAndConfigure"))}function xp(e){if(jr(cr),!Lp())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Hp(e.threadId),Cc("hostEntity.tab.getAll",[new Op(e)],new kp,er(Ip,"hostEntity.tab.getAll"))}function Np(e,t){if(jr(cr),!Lp())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return _p(e),Hp(t.threadId),Cc("hostEntity.tab.reconfigure",[new Tp(e),new Op(t)],new Pp,er(Ip,"hostEntity.tab.reconfigure"))}function Dp(e,t){if(jr(cr),!Lp())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return _p(e),Hp(t.threadId),Cc("hostEntity.tab.rename",[new Tp(e),new Op(t)],new Pp,er(Ip,"hostEntity.tab.rename"))}function Up(e,t){if(jr(cr),!Lp())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Hp(t.threadId),_p(e),Cc("hostEntity.tab.remove",[new Fp(e),new Op(t)],new Gi,er(Ip,"hostEntity.tab.remove"))}function Lp(){var e;return!!(jr(cr)&&Bp()&&(null===(e=cr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Hp(e){if(!e||0==e.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function _p(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Vp;function Bp(){return!(!jr(cr)||!cr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Vp||(Vp={}));var Wp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const jp="v2",zp="Invalid store dialog size",qp="No App Id present, but AppId needed to open AppDetail store",$p="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Gp(e){return Wp(this,void 0,void 0,(function*(){Xp();const{size:t}=null!=e?e:{};return yc("store.openFullStore",[Yp(t)],er(jp,"store.openFullStore"))}))}function Jp(e){return Wp(this,void 0,void 0,(function*(){Xp();const{size:t,appId:n}=e;if(!(n instanceof no))throw new Error(qp);return yc("store.openAppDetail",[Yp(t),n],er(jp,"store.openAppDetail"))}))}function Kp(e){return Wp(this,void 0,void 0,(function*(){Xp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return yc("store.openInContextStore",[Yp(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],er(jp,"store.openInContextStore"))}))}function Qp(e){return Wp(this,void 0,void 0,(function*(){Xp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error($p);return yc("store.openSpecificStore",[Yp(t),n],er(jp,"store.openSpecificStore"))}))}function Zp(){return jr(cr)&&!!cr.supports.store}function Xp(){if(jr(cr,un.content,un.sidePanel,un.meetingStage),!Zp())throw hn}function Yp(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(zp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(zp);return JSON.stringify(e)}var eg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 tg="v1",ng=Yn("widgetHosting");function rg(){return jr(cr)&&!!cr.supports.widgetHosting}function og(e,t){return eg(this,void 0,void 0,(function*(){return Wr(),ng("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Cc("widgetHosting.callTool",[new hg(e,t)],new pg,er(tg,"widgetHosting.callTool"),ze)}))}function ig(e,t){return eg(this,void 0,void 0,(function*(){return Wr(),ng("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),yc("widgetHosting.sendFollowUpMessage",[new mg(e,t)],er(tg,"widgetHosting.sendFollowUpMessage"))}))}function ag(e,t){return eg(this,void 0,void 0,(function*(){return Wr(),ng("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),yc("widgetHosting.requestDisplayMode",[new vg(e,t)],er(tg,"widgetHosting.requestDisplayMode"))}))}function sg(e,t){return eg(this,void 0,void 0,(function*(){return Wr(),ng("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Cc("widgetHosting.requestModal",[new Sg(e,t)],new gg,er(tg,"widgetHosting.requestModal"),ze)}))}function cg(e,t){Wr(),ng("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),yc("widgetHosting.notifyIntrinsicHeight",[new yg(e,t)],er(tg,"widgetHosting.notifyIntrinsicHeight"))}function ug(e,t,n){Wr(),ng("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),yc("widgetHosting.contentSizeChanged",[new bg(e,t,n)],er(tg,"widgetHosting.contentSizeChanged"))}function lg(e,t){return eg(this,void 0,void 0,(function*(){return Wr(),ng("Setting widget state with widgetId: ",{widgetId:e,state:t}),yc("widgetHosting.setWidgetState",[new Cg(e,t)],er(tg,"widgetHosting.setWidgetState"))}))}function dg(e,t){Wr(),ng("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),yc("widgetHosting.openExternal",[new wg(e,t)],er(tg,"widgetHosting.openExternal"))}function fg(e){Ps(er(tg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],(()=>{if(!rg())throw new Error("Widget Hosting is not supported on this platform")}))}class pg extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class gg extends $i{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class hg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class mg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class vg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class wg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Cg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class yg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class Sg{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class bg{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Ag=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Eg="v1",Ig="v2";let Pg;function Tg(e){Pg=e}function Og(e){const t=void 0!==e,n=t?e:Pg;if(!n)throw new Error("No parameters are provided for authentication");jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);return Rg(n.successCallback||n.failureCallback?er(Eg,"authentication.authenticate"):er(Ig,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Pg=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Pg=void 0)}}))}function Rg(e,t){return Ag(this,void 0,void 0,(function*(){const n=Ln(t.url);return Un(n),vc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Fg(e){Wr();return kg(e&&(e.successCallback||e.failureCallback)?er(Eg,"authentication.getAuthToken"):er(Ig,"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 kg(e,t){return new Promise((n=>{n(vc(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 Mg(e){Wr();return xg(e&&(e.successCallback||e.failureCallback)?er(Eg,"authentication.getUser"):er(Ig,"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 xg(e){return new Promise((t=>{t(vc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Ng(e,t){jr(cr,un.authentication);Ec(er(t?Eg:Ig,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Jc(uc.parentWindow,(()=>setTimeout((()=>uc.currentWindow.close()),200)))}function Dg(e,t){jr(cr,un.authentication);Ec(er(t?Eg:Ig,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Jc(uc.parentWindow,(()=>setTimeout((()=>uc.currentWindow.close()),200)))}var Ug;function Lg(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"}(Ug||(Ug={}));class Hg{constructor(e){this.val=e,Lg(e)}toString(){return this.val}}const _g="/l/app/",Vg="/l/meeting/new",Bg="attendees",Wg="startTime",jg="endTime",zg="subject",qg="content",$g="/l/call/0/0",Gg="source",Jg="withVideo",Kg="/l/chat/0/0",Qg="users",Zg="topicName",Xg="message";function Yg(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Qg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Zg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Xg}=${encodeURIComponent(n)}`;return`${at}://${st}${Kg}?${r}${o}${i}`}function eh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Qg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Jg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Gg}=${encodeURIComponent(n)}`;return`${at}://${st}${$g}?${r}${o}${i}`}function th(e,t,n,r,o){const i=void 0===e?"":`${Bg}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Wg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${jg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${zg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${qg}=${encodeURIComponent(o)}`;return`${at}://${st}${Vg}?${i}${a}${s}${c}${u}`}function nh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${at}://${st}${_g}${encodeURIComponent(e)}`}const rh="v1";function oh(e){return new Promise((t=>{if(jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ih())throw new Error("Not supported");const n=er(rh,"appInstallDialog.openAppInstallDialog");cr.isLegacyTeams?t(gc(n,"executeDeepLink",nh(e.appId))):(Ec(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function ih(){return!(!jr(cr)||!cr.supports.appInstallDialog)}const ah="v1",sh=Yn("media");var ch,uh,lh,dh,fh,ph,gh;!function(e){e.Base64="base64",e.ID="id"}(ch||(ch={}));class hh{}function mh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(jr(cr,un.content,un.task),Jn.isFramelessWindow)if(zr(Ye))Ec(er(ah,"media.captureImage"),"captureImage",e);else{e({errorCode:Ue.OLD_PLATFORM},[])}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},[])}}function vh(){if(jr(cr,un.content,un.task),!Ch())throw hn;const e=Le.Media;return new Promise((t=>{t(mc(er(ah,"media.hasPermission"),"permissions.has",e))}))}function wh(){if(jr(cr,un.content,un.task),!Ch())throw hn;const e=Le.Media;return new Promise((t=>{t(mc(er(ah,"media.requestPermission"),"permissions.request",e))}))}function Ch(){return!(!jr(cr)||!cr.supports.permissions)}class yh extends hh{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(jr(cr,un.content,un.task),zr(et))if(Nh(this.mimeType,this.format,this.content))zr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ue.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ue.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Ec(er(ah,"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=Ph(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Th(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):sh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=bn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!ro(e)&&Ec(er(ah,"media.getMedia"),"getMedia",r),As(er(ah,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Es("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Ph(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Es("getMedia"+t)}else{const e=Th(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob),Es("getMedia"+t)}}))}}class Sh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){jr(cr,un.content,un.task);try{$r(Je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Ec(er(ah,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(uh.StopRecording,e)}}class bh extends Sh{getMediaType(){return fh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case uh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Ah(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(et)){const e={errorCode:Ue.OLD_PLATFORM};return void t(e,[])}try{Oh(e)}catch(e){return void t(e,[])}if(!Fh(e)){const e={errorCode:Ue.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Ec(er(ah,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Rh(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 yh(e));t(n,s)}))}function Eh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(et)){return void t({errorCode:Ue.OLD_PLATFORM})}if(!Dh(e)){return void t({errorCode:Ue.INVALID_ARGUMENTS})}const n=[e];Ec(er(ah,"media.viewImages"),"viewImages",n,t)}function Ih(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(jr(cr,un.content,un.task),Jn.hostClientType!==sn.desktop&&Jn.hostClientType!==sn.web&&Jn.hostClientType!==sn.rigel&&Jn.hostClientType!==sn.teamsRoomsWindows&&Jn.hostClientType!==sn.teamsRoomsAndroid&&Jn.hostClientType!==sn.teamsPhones&&Jn.hostClientType!==sn.teamsDisplays)if(zr(tt))if(Uh(t))Ec(er(ah,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ue.INVALID_ARGUMENTS},"")}else{e({errorCode:Ue.OLD_PLATFORM},"")}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},"")}}function Ph(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 Th(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 Oh(e){Mh(e)?$r(Ge):xh(e)?$r(Je):kh(e)&&$r(Ke)}function Rh(e){return!(e.mediaType!=fh.Video||!e.videoProps||!e.videoProps.videoController)}function Fh(e){return!(null==e||e.maxMediaCount>10)}function kh(e){var t;return!((null==e?void 0:e.mediaType)!=fh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Mh(e){return!(!e||e.mediaType!=fh.VideoAndImage&&!e.videoAndImageProps)}function xh(e){return!(!e||e.mediaType!=fh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Nh(e,t,n){return null!=e&&null!=t&&t==ch.ID&&null!=n}function Dh(e){return!(null==e||e.length<=0||e.length>10)}function Uh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Lh(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(uh||(uh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(lh||(lh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(dh||(dh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(fh||(fh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(ph||(ph={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(gh||(gh={}));const Hh="v2";function _h(e){return new Promise((t=>{if(jr(cr,un.content,un.task),!Wh())throw hn;if(!Uh(e))throw{errorCode:Ue.INVALID_ARGUMENTS};t(mc(er(Hh,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Vh(){if(jr(cr,un.content,un.task),!Wh())throw hn;const e=Le.Media;return new Promise((t=>{t(mc(er(Hh,"barCode.hasPermission"),"permissions.has",e))}))}function Bh(){if(jr(cr,un.content,un.task),!Wh())throw hn;const e=Le.Media;return new Promise((t=>{t(mc(er(Hh,"barCode.requestPermission"),"permissions.request",e))}))}function Wh(){return!!(jr(cr)&&cr.supports.barCode&&cr.supports.permissions)}const jh="v2";function zh(e){return qh(er(jh,"chat.openChat"),e)}function qh(e,t){return new Promise((n=>{if(jr(cr,un.content,un.task),!Gh())throw hn;if(cr.isLegacyTeams)n(gc(e,"executeDeepLink",Yg([t.user],void 0,t.message)));else{n(gc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function $h(e){const t=er(jh,"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(qh(t,r))}else{if(jr(cr,un.content,un.task),!Gh())throw hn;if(cr.isLegacyTeams)n(gc(t,"executeDeepLink",Yg(e.users,e.topic,e.message)));else{n(gc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Gh(){return!(!jr(cr)||!cr.supports.chat)}var Jh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Kh="v2";function Qh(e){return Jh(this,void 0,void 0,(function*(){if(jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel),!Xh())throw hn;if(!e.type||!Object.values(We).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(We)}`);const t=yield Mn(e),n={mimeType:e.type,content:t};return mc(er(Kh,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Zh(){return Jh(this,void 0,void 0,(function*(){jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel);const e=er(Kh,"clipboard.read");if(!Xh())throw hn;const t=yield mc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return kn(e.mimeType,e.content)}return t}))}function Xh(){return Jn.isFramelessWindow?!(!jr(cr)||!cr.supports.clipboard):!!(jr(cr)&&navigator&&navigator.clipboard&&cr.supports.clipboard)}var Yh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const em="v2",tm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var nm;function rm(){var e;return null!==(e=jr(cr)&&(cr.isNAAChannelRecommended||cm()))&&void 0!==e&&e}function om(){return jr(cr),uc.parentOrigin}function im(){var e;return null!==(e=jr(cr)&&cr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function am(){var e;return null!==(e=jr(cr)&&(cr.isDeeplyNestedAuthSupported||sm()))&&void 0!==e&&e}function sm(){return!!(jr(cr)&&um()&&cr.isLegacyTeams&&zr(hr))}function cm(){return!!(jr(cr)&&um()&&cr.isLegacyTeams&&cr.supports.nestedAppAuth)}function um(){return Jn.hostClientType===sn.android||Jn.hostClientType===sn.ios||Jn.hostClientType===sn.ipados||Jn.hostClientType===sn.visionOS}function lm(e){return Yh(this,void 0,void 0,(function*(){if(!im())throw hn;const t=e.map(pm);return fm(nm.ADD,t)}))}function dm(e){return Yh(this,void 0,void 0,(function*(){if(!im())throw hn;const t=e.map(pm);return fm(nm.DELETE,t)}))}function fm(e,t){return Yh(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 Cc("nestedAppAuth.manageNAATrustedOrigins",[new gm(e,t)],tm,er(em,"nestedAppAuth.manageNAATrustedOrigins"))}))}function pm(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"}(nm||(nm={}));class gm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const hm="v2";function mm(){if(jr(cr,un.content,un.task),!wm())throw hn;return mc(er(hm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function vm(e){if(jr(cr,un.content,un.task),!wm())throw hn;if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};return mc(er(hm,"geoLocation.showLocation"),"location.showLocation",e)}function wm(){return!!(jr(cr)&&cr.supports.geoLocation&&cr.supports.geoLocation.map&&cr.supports.permissions)}const Cm="v2";function ym(){if(jr(cr,un.content,un.task),!Am())throw hn;return mc(er(Cm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Sm(){if(jr(cr,un.content,un.task),!Am())throw hn;const e=Le.GeoLocation;return new Promise((t=>{t(mc(er(Cm,"geoLocation.hasPermission"),"permissions.has",e))}))}function bm(){if(jr(cr,un.content,un.task),!Am())throw hn;const e=Le.GeoLocation;return new Promise((t=>{t(mc(er(Cm,"geoLocation.requestPermission"),"permissions.request",e))}))}function Am(){return!!(jr(cr)&&cr.supports.geoLocation&&cr.supports.permissions)}function Em(){return cr.hostVersionsInfo?cr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Im="v1";class Pm{postMessage(e,t){jr(cr),Ec(er(Im,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||yn())}addEventListener(e,t){jr(cr),"message"===e&&As(er(Im,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Tm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){jr(cr,un.task),Ec(er(Im,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||yn())}addEventListener(e,t){jr(cr,un.task),"message"===e&&As(er(Im,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Om="v2";function Rm(e){if(jr(cr,un.content),!Fm())throw hn;if(!e||!Fn(e))throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return mc(er(Om,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Fm(){return!(!jr(cr)||!cr.supports.secondaryBrowser)}const km="v1";function Mm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(Ze))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Nm())throw hn;Ec(er(km,"location.getLocation"),"location.getLocation",[e],t)}function xm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(jr(cr,un.content,un.task),!zr(Ze))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Nm())throw hn;Ec(er(km,"location.showLocation"),"location.showLocation",[e],t)}function Nm(){return!(!jr(cr)||!cr.supports.location)}const Dm="v1";function Um(e){jr(cr,un.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ec(er(Dm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Lm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Hm="v1";var _m,Vm,Bm,Wm,jm,zm;function qm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function $m(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Gm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content),Ec(er(Hm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Jm(){var e,t,n;return Lm(this,void 0,void 0,(function*(){let r;jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content);try{const e=!0;r=yield mc(er("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Wm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Wm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Km(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage,un.task),Ec(er(Hm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Qm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");jr(cr,un.sidePanel),Ec(er(Hm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Zm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");jr(cr,un.sidePanel),Ec(er(Hm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Xm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");jr(cr,un.sidePanel),Ec(er(Hm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Ym(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");jr(cr,un.sidePanel),As(er(Hm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function ev(e,t,n={sharingProtocol:jm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function tv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function nv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function rv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function ov(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),As(er(Hm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function iv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),As(er(Hm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function av(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),As(er(Hm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function sv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));jr(cr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||zm.Other};return mc(er("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function cv(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");jr(cr,un.sidePanel,un.meetingStage),e.isAppHandlingAudio?uv(e,t):lv(e,t)}function uv(e,t){Ec(er(Hm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");As(er(Hm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Lm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);fv(n,n.isMicMuted===t.isMicMuted?_m.HostInitiated:_m.AppDeclinedToChange)}catch(e){fv(t,_m.AppFailedToChange)}}))));As(er(Hm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function lv(e,t){Ec(er(Hm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Is("meeting.micStateChanged")&&Es("meeting.micStateChanged"),Is("meeting.audioDeviceSelectionChanged")&&Es("meeting.audioDeviceSelectionChanged"),t(n)}))}function dv(e){fv(e,_m.AppInitiated)}function fv(e,t){jr(cr,un.sidePanel,un.meetingStage),Ec(er(Hm,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(_m||(_m={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Vm||(Vm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Bm||(Bm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Wm||(Wm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(jm||(jm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(zm||(zm={}));const pv="v1",gv="v2";function hv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=er(pv,"monetization.openPurchaseExperience")):(r=e,o=er(gv,"monetization.openPurchaseExperience"));return jr(cr,un.content),Pn((()=>new Promise((e=>{if(!mv())throw hn;e(mc(o,"monetization.openPurchaseExperience",r))}))),n)}function mv(){return!(!jr(cr)||!cr.supports.monetization)}const vv="v2";function wv(e){return new Promise((t=>{if(jr(cr,un.content),!yv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(gc(er(vv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Cv(e){return new Promise((t=>{if(jr(cr,un.content),!yv())throw new Error("Not supported");const n=er(vv,"calendar.composeMeeting");cr.isLegacyTeams?t(gc(n,"executeDeepLink",th(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(gc(n,"calendar.composeMeeting",e))}))}function yv(){return!(!jr(cr)||!cr.supports.calendar)}const Sv="v2";function bv(e){e&&0!==e.length&&e.forEach((e=>{Lg(e)}))}function Av(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===kv.New&&(bv(t.toRecipients),bv(t.ccRecipients),bv(t.bccRecipients))}function Ev(e){if(jr(cr,un.content),!Iv())throw new Error("Not supported");return Av(e),yc("mail.handoff.composeMail",[new Pv(e)],er(Sv,"mail.handoff.composeMail"))}function Iv(){return!!(jr(cr)&&cr.supports.mail&&cr.supports.mail.handoff)}class Pv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Tv="v2";function Ov(e){return new Promise((t=>{if(jr(cr,un.content),!Fv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(gc(er(Tv,"mail.openMailItem"),"mail.openMailItem",e))}))}function Rv(e){return new Promise((t=>{if(jr(cr,un.content),!Fv())throw new Error("Not supported");t(gc(er(Tv,"mail.composeMail"),"mail.composeMail",e))}))}function Fv(){return!(!jr(cr)||!cr.supports.mail)}var kv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(kv||(kv={}));const Mv="v2";function xv(){if(!Jn.printCapabilityEnabled){if(jr(cr),!_v())throw hn;Jn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Nv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Nv(){xn().print()}function Dv(e){Uv(er(Mv,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!ro(e)&&!_v())throw hn}))}function Uv(e,t,n){!ro(t)&&jr(cr),!ro(t)&&n&&n(),xs(e,t)}function Lv(e){Hv(er(Mv,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!ro(e)&&!_v())throw hn}))}function Hv(e,t,n){!ro(t)&&jr(cr),!ro(t)&&n&&n(),Us(e,t)}function _v(){return!(!jr(cr)||!cr.supports.teamsCore)}const Vv="v1",Bv="v2";function Wv(e,t){let n,r;jr(cr,un.content,un.task,un.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=er(Vv,"people.selectPeople")):(r=e,o=er(Bv,"people.selectPeople")),En(jv,n,o,r)}function jv(e,t){return new Promise((n=>{if(!zr(Xe))throw{errorCode:Ue.OLD_PLATFORM};if(!Lh(t))throw{errorCode:Ue.INVALID_ARGUMENTS};if(!zv())throw hn;n(mc(e,"people.selectPeople",t))}))}function zv(){return!(!jr(cr)||!cr.supports.people)}function qv(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?$v(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function $v(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 Gv="v2";function Jv(e){return jr(cr,un.content),new Promise((t=>{const[n,r]=qv(e);if(!n)throw{errorCode:Ue.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(mc(er(Gv,"profile.showProfile"),"profile.showProfile",o))}))}function Kv(){return!(!jr(cr)||!cr.supports.profile)}const Qv="v2",Zv="search.queryChange",Xv="search.queryClose",Yv="search.queryExecute";function ew(e,t,n){if(jr(cr,un.content),!nw())throw hn;As(er(Qv,"search.registerOnClosedHandler"),Xv,e),As(er(Qv,"search.registerOnExecutedHandler"),Yv,t),n&&As(er(Qv,"search.registerOnChangeHandler"),Zv,n)}function tw(){if(jr(cr,un.content),!nw())throw hn;Ec(er(Qv,"search.unregisterHandlers"),"search.unregister"),Es(Zv),Es(Xv),Es(Yv)}function nw(){return!(!jr(cr)||!cr.supports.search)}function rw(){return new Promise((e=>{if(jr(cr,un.content),!nw())throw new Error("Not supported");e(gc(er(Qv,"search.closeSearch"),"search.closeSearch"))}))}var ow=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const iw="v2";function aw(){return ow(this,void 0,void 0,(function*(){if(jr(cr,un.sidePanel,un.meetingStage),!sw())throw hn;return yield mc(er(iw,"sharing.history.getContent"),"sharing.history.getContent")}))}function sw(){var e;return jr(cr)&&void 0!==(null===(e=cr.supports.sharing)||void 0===e?void 0:e.history)}const cw="v1",uw="v2",lw={shareWebContent:"sharing.shareWebContent"};function dw(e,t){try{pw(e),gw(e),hw(e)}catch(e){return In((()=>Promise.reject(e)),t)}jr(cr,un.content,un.sidePanel,un.task,un.stage,un.meetingStage);return In(fw,t,er(t?cw:uw,"sharing.shareWebContent"),e)}function fw(e,t){return new Promise((n=>{if(!mw())throw hn;n(mc(e,lw.shareWebContent,t))}))}function pw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function gw(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function hw(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function mw(){return!(!jr(cr)||!cr.supports.sharing)}const vw="v2";function ww(){return new Promise((e=>{if(jr(cr,un.content),!Cw())throw hn;e(mc(er(vw,"stageView.self.close"),"stageView.self.close"))}))}function Cw(){var e;return jr(cr)&&void 0!==(null===(e=cr.supports.stageView)||void 0===e?void 0:e.self)}const yw="v2";var Sw;function bw(e){return new Promise((t=>{if(jr(cr,un.content),!Aw())throw hn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(mc(er(yw,"stageView.open"),"stageView.open",e))}))}function Aw(){return!(!jr(cr)||!cr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Sw||(Sw={}));const Ew=10;var Iw=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Pw="v2";function Tw(e){return Iw(this,void 0,void 0,(function*(){jr(cr,un.content,un.task),Fw(),kw(e);const t=yield mc(er(Pw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Mw(e.maxVisualMediaCount,t),t}))}function Ow(e){return Iw(this,void 0,void 0,(function*(){jr(cr,un.content,un.task),Fw(),kw(e);const t=yield mc(er(Pw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Mw(e.maxVisualMediaCount,t),t}))}function Rw(){return!!(jr(cr)&&cr.supports.visualMedia&&cr.supports.visualMedia.image&&cr.supports.permissions)}function Fw(){if(!Rw())throw hn}function kw(e){if(!e||e.maxVisualMediaCount>Ew||e.maxVisualMediaCount<1)throw wn}function Mw(e,t){if(t.length>e)throw Cn}const xw="v2";var Nw,Dw;function Uw(){if(jr(cr,un.content,un.task),!Rw())throw hn;const e=Le.Media;return mc(er(xw,"visualMedia.hasPermission"),"permissions.has",e)}function Lw(){if(jr(cr,un.content,un.task),!Rw())throw hn;const e=Le.Media;return mc(er(xw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Nw||(Nw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Dw||(Dw={}));var Hw=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let _w=null;function Vw(){return Hw(this,void 0,void 0,(function*(){return null===_w&&(_w=(yield ko()).app.host.name),_w}))}var Bw=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Ww(){return Bw(this,void 0,void 0,(function*(){if(jr(cr),!zw())throw hn;return!(!cr.isLegacyTeams||Jn.hostClientType!==sn.android&&Jn.hostClientType!==sn.ios&&Jn.hostClientType!==sn.ipados&&Jn.hostClientType!==sn.visionOS||(yield jw())!==cn.teams)||(yield pc(er("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function jw(){return Bw(this,void 0,void 0,(function*(){return Vw()}))}function zw(){return jr(cr)&&void 0!==cr.supports.webStorage}const qw="v2";var $w;function Gw(e){const t=er(qw,"call.startCall");return new Promise((n=>{var r;if(jr(cr,un.content,un.task),!Jw())throw hn;if(!cr.isLegacyTeams)return Ec(t,"call.startCall",[e],n);n(pc(t,"executeDeepLink",eh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes($w.Video),e.source)).then((e=>{if(!e)throw new Error(dt);return e})))}))}function Jw(){return!(!jr(cr)||!cr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}($w||($w={}));const Kw="v1";function Qw(){Xi(er(Kw,"appInitialization.notifyAppLoaded"))}function Zw(){Ec(er(Kw,"appInitialization.notifySuccess"),Ao.Success,[Ar])}function Xw(e){ea(er(Kw,"appInitialization.notifyFailure"),e)}function Yw(e){Yi(er(Kw,"appInitialization.notifyExpectedFailure"),e)}const eC=Yn("thirdPartyCloudStorage"),tC="v2";class nC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let rC=[],oC=null,iC=!0,aC=null;function sC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(jr(cr,un.content,un.task),!uC())throw hn;if(aC)throw aC=null,new Error("getDragAndDropFiles cannot be called twice");aC=t,iC=!0,Ec(er(tC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],cC)}else{t([],{errorCode:Ue.INVALID_ARGUMENTS})}}function cC(e){if(aC)if(e&&e.error)aC([],e.error),aC=null;else if(e&&e.fileChunk)try{iC||0!==e.fileChunk.chunkSequence||(eC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),iC=!0,aC([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}),rC=[],aC=null);const t=Th(e.fileChunk,e.fileType);if(t?(oC||(oC=new nC(e.fileType,[])),oC.assembleAttachment.push(t)):(eC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),aC?aC([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}):aC=null,rC=[],aC=null,iC=!0),iC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&oC){const t=Ph(oC.assembleAttachment,oC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});rC.push(n)}e.isLastFile&&aC&&(aC(rC,e.error),rC=[],aC=null,iC=!0),oC=null}}catch(e){aC&&(aC([],{errorCode:Ue.INTERNAL_ERROR,message:e}),rC=[],aC=null,iC=!0)}else aC([],{errorCode:Ue.INTERNAL_ERROR,message:"data received is null"}),rC=[],aC=null,iC=!0}function uC(){return!(!jr(cr)||!cr.supports.thirdPartyCloudStorage)}const lC="v1";function dC(e,t){Zi(er(lC,"initialize"),t).then((()=>{e&&e()}))}function fC(){xv()}function pC(){Nv()}function gC(e){Wr(),Ec(er(lC,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Jn.frameContext),e(t)}))}function hC(e){aa(er(lC,"registerOnThemeChangeHandlerHelper"),e)}function mC(e){Ps(er(lC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function vC(e){Ps(er(lC,"registerAppButtonClickHandler"),"appButtonClick",e,[un.content])}function wC(e){Ps(er(lC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[un.content])}function CC(e){Ps(er(lC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[un.content])}function yC(e){Ta(er(lC,"registerBackButtonHandler"),e)}function SC(e){Uv(er(lC,"registerOnLoadHandler"),e)}function bC(e){Hv(er(lC,"registerBeforeUnloadHandler"),e)}function AC(e){Ps(er(lC,"registerFocusEnterHandler"),"focusEnter",e,[])}function EC(e){Ps(er(lC,"registerChangeSettingsHandler"),"changeSettings",e,[un.content])}function IC(e,t){jr(cr),ns(er(lC,"getTabInstances"),t).then((t=>{e(t)}))}function PC(e,t){jr(cr),rs(er(lC,"getMruTabInstances"),t).then((t=>{e(t)}))}function TC(e){os(er(lC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function OC(e,t){jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();ca(er(lC,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function RC(e){is(er(lC,"setFrameContext"),e)}function FC(e,t,n){Zi(er(lC,"initializeWithFrameContext"),n).then((()=>t&&t())),is(er(lC,"setFrameContext"),e)}const kC="v1";function MC(e){ts(er(kC,"navigation.returnFocus"),e)}function xC(e,t){jr(cr);const n=null!=t?t:yn();es(er(kC,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function NC(e,t){jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();Xa(er(kC,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function DC(e){jr(cr);const t=null!=e?e:yn();Ya(er(kC,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const UC="v1";function LC(e){as(er(UC,"settings.setValidityState"),e)}function HC(e){jr(cr,un.content,un.settings,un.remove,un.sidePanel),ss(er(UC,"settings.getSettings")).then((t=>{e(t)}))}function _C(e,t){jr(cr,un.content,un.settings,un.sidePanel);const n=null!=t?t:yn();cs(er(UC,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function VC(e){Li(er(UC,"settings.registerOnSaveHandler"),e)}function BC(e){_i(er(UC,"settings.registerOnRemoveHandler"),e)}var WC=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 jC="v1";function zC(e,t){const n=er(jC,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(jr(cr,un.content,un.sidePanel,un.meetingStage),Ec(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?oi(n,JC(e),r):ri(n,GC(e),r),new Pm}function qC(e){e=KC(e);const{width:t,height:n}=e,r=WC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ni(er(jC,"tasks.updateTask"),e)}function $C(e,t){ii(er(jC,"tasks.submitTask"),e,t)}function GC(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function JC(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function KC(e){return e.height=e.height?e.height:pn.Small,e.width=e.width?e.width:pn.Small,e}const QC="v2";var ZC,XC;function YC(){return!(!jr(cr,un.meetingStage,un.sidePanel,un.content)||!cr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(ZC||(ZC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(XC||(XC={}));class ey{getFluidTenantInfo(){return ty(),new Promise((e=>{e(mc(er(QC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return ty(),new Promise((t=>{t(mc(er(QC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return ty(),new Promise((e=>{e(mc(er(QC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return ty(),new Promise((t=>{t(mc(er(QC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return ty(),new Promise((e=>{e(mc(er(QC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return ty(),new Promise((t=>{t(mc(er(QC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return ty(),new Promise((t=>{t(mc(er(QC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return ty(),new Promise((t=>{t(mc(er(QC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return ty(),new ey}}function ty(){if(!YC())throw new Error("LiveShareHost Not supported")}var ny=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 ry(e){try{return e.cartItems=oy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function oy(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=oy(e.accessories)),e}))}const iy=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=ny(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=iy(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function ay(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)cy(t),sy(t.accessories)}function sy(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");cy(t)}}}function cy(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");ly(e.price),dy(e.quantity)}function uy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}}function ly(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function dy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function fy(e){if(!Object.values(my).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const py="v2",gy={majorVersion:1,minorVersion:1};var hy,my;function vy(){if(jr(cr,un.content,un.task),!Sy())throw hn;return mc(er(py,"marketplace.getCart"),"marketplace.getCart",gy).then(ry)}function wy(e){if(jr(cr,un.content,un.task),!Sy())throw hn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return uy(null==e?void 0:e.cartId),ay(null==e?void 0:e.cartItems),mc(er(py,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:iy(e.cartItems),cartVersion:gy})).then(ry)}function Cy(e){if(jr(cr,un.content,un.task),!Sy())throw hn;if(!e)throw new Error("removeCartItemsParams must be provided");if(uy(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 mc(er(py,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:gy})).then(ry)}function yy(e){if(jr(cr,un.content,un.task),!Sy())throw hn;if(!e)throw new Error("updateCartStatusParams must be provided");return uy(null==e?void 0:e.cartId),fy(null==e?void 0:e.cartStatus),mc(er(py,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:gy})).then(ry)}function Sy(){return!(!jr(cr)||!cr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(hy||(hy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(my||(my={}));var by=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};class Ay{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function Ey(e){return e.toLowerCase().split("+").sort().join("+")}function Iy(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function Py(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Ty(e,t){if(Py(t)){const n=Iy(t);if(e.has(n))return{matchedShortcut:n,isOverridable:My.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function Oy(e){xy.clear(),e.shortcuts.forEach((e=>{xy.add(Ey(e))})),My.clear(),e.overridableShortcuts.forEach((e=>{My.add(Ey(e))}))}class Ry extends $i{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function Fy(e){As(er("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function ky(e){if(e.target.closest(`[${Vy}]`))return;const{matchedShortcut:t,isOverridable:n}=Ty(xy,e);if(!t)return;if(n&&Ny){if(Ny(e,{matchedShortcut:t}))return}yc("shortcutRelay.forwardShortcutEvent",[new Ay(e)],er("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const My=new Set,xy=new Set;let Ny,Dy=!1;function Uy(e){if(!_y())throw hn;const t=Ny;return Ny=e,t}function Ly(){if(!_y())throw hn;Dy=!1,xy.clear(),My.clear(),Ny=void 0,document.removeEventListener("keydown",ky,{capture:!0})}function Hy(){return by(this,void 0,void 0,(function*(){if(!_y())throw hn;Oy(yield Cc("shortcutRelay.getHostShortcuts",[],new Ry,er("v2","shortcutRelay.getHostShortcuts"))),Dy||document.addEventListener("keydown",ky,{capture:!0}),Dy=!0,Fy((e=>{Oy(e)}))}))}function _y(){return!(!jr(cr)||!cr.supports.shortcutRelay)}const Vy="data-disable-shortcuts-forwarding"})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={530(e,t,n){e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},815(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))}),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},821(e){var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},933(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>De,AppId:()=>ro,ChannelType:()=>hn,ChildAppWindow:()=>Rm,DialogDimension:()=>gn,EduType:()=>je,EmailAddress:()=>Bg,ErrorCode:()=>Le,FileOpenPreference:()=>Ne,FrameContexts:()=>ln,HostClientType:()=>cn,HostName:()=>un,LiveShareHost:()=>ry,NotificationTypes:()=>tu,ParentAppWindow:()=>Fm,RenderingSurfaces:()=>dn,SecondaryM365ContentIdName:()=>Ue,TaskModuleDimension:()=>gn,TeamType:()=>fn,UUID:()=>Gn,UserAuthenticationState:()=>sl,UserSettingTypes:()=>ru,UserTeamRole:()=>pn,ValidatedSafeString:()=>no,ViewerActionTypes:()=>nu,activateChildProxyingCommunication:()=>Pr,app:()=>i,appEntity:()=>j,appInitialization:()=>Oe,appInstallDialog:()=>ee,appPerformanceMetrics:()=>Y,authentication:()=>X,barCode:()=>ne,calendar:()=>pe,call:()=>Te,chat:()=>re,clipboard:()=>oe,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>hC,executeDeepLink:()=>kC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>D,geoLocation:()=>se,getAdaptiveCardSchemaVersion:()=>Tm,getContext:()=>vC,getCurrentFeatureFlagsState:()=>Rr,getMruTabInstances:()=>RC,getTabInstances:()=>OC,hostEntity:()=>K,initialize:()=>gC,initializeWithFrameContext:()=>xC,liveShare:()=>Me,location:()=>ue,logs:()=>S,mail:()=>he,marketplace:()=>xe,media:()=>te,meeting:()=>de,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>fe,navigateBack:()=>HC,navigateCrossDomain:()=>LC,navigateToTab:()=>UC,nestedAppAuth:()=>ie,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>lu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>kr,pages:()=>y,people:()=>ve,print:()=>mC,profile:()=>we,registerAppButtonClickHandler:()=>yC,registerAppButtonHoverEnterHandler:()=>SC,registerAppButtonHoverLeaveHandler:()=>bC,registerBackButtonHandler:()=>AC,registerBeforeUnloadHandler:()=>IC,registerChangeSettingsHandler:()=>TC,registerCustomHandler:()=>cu,registerFocusEnterHandler:()=>PC,registerFullScreenHandler:()=>CC,registerOnLoadHandler:()=>EC,registerOnThemeChangeHandler:()=>wC,registerUserSettingsChangeHandler:()=>uu,remoteCamera:()=>B,returnFocus:()=>DC,search:()=>Ce,secondaryBrowser:()=>ce,sendCustomEvent:()=>su,sendCustomMessage:()=>au,setFeatureFlagsState:()=>Fr,setFrameContext:()=>MC,settings:()=>Fe,shareDeepLink:()=>FC,sharing:()=>Se,shortcutRelay:()=>ze,sidePanelInterfaces:()=>I,stageView:()=>Ae,store:()=>Q,tasks:()=>ke,teams:()=>q,teamsCore:()=>me,thirdPartyCloudStorage:()=>Re,uploadCustomApp:()=>iu,version:()=>Er,videoEffects:()=>$,videoEffectsEx:()=>G,visualMedia:()=>Ie,webStorage:()=>Pe,widgetHosting:()=>Z});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>fo,getTelemetryPort:()=>uo,isSupported:()=>lo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Co,getDataLayerPort:()=>vo,isSupported:()=>wo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>yo,registerOnResumeHandler:()=>So});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Po,FailedReason:()=>Io,Messages:()=>Eo,_initialize:()=>Fo,_uninitialize:()=>ko,getContext:()=>Mo,getFrameContext:()=>Oo,initialize:()=>Ro,isInitialized:()=>To,lifecycle:()=>o,notifyAppLoaded:()=>xo,notifyExpectedFailure:()=>Uo,notifyFailure:()=>Do,notifySuccess:()=>No,openLink:()=>Vo,registerHostToAppPerformanceMetricsHandler:()=>_o,registerOnContextChangeHandler:()=>Ho,registerOnThemeChangeHandler:()=>Lo});var a={};n.r(a),n.d(a,{isSupported:()=>Wo,resize:()=>jo});var s={};n.r(s),n.d(s,{isSupported:()=>qo,open:()=>zo});var c={};n.r(c),n.d(c,{isSupported:()=>Ko,registerOnMessageFromParent:()=>Jo,sendMessageToDialog:()=>Go,sendMessageToParentFromDialog:()=>$o});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>ei,getDialogInfoFromUrlDialogInfo:()=>Yo,isSupported:()=>Xo,open:()=>Qo,parentCommunication:()=>c,submit:()=>Zo});var l={};n.r(l),n.d(l,{isSupported:()=>fi,open:()=>di});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>gi,open:()=>pi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>hi,isSupported:()=>mi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>wi,MenuItem:()=>yi,MenuListType:()=>Ci,initialize:()=>Pi,isSupported:()=>xi,setNavBarMenu:()=>Ri,setUpViews:()=>Ti,showActionMenu:()=>ki});var g={};n.r(g),n.d(g,{initialize:()=>Ni,isSupported:()=>$i,registerChangeConfigHandler:()=>ji,registerOnRemoveHandler:()=>_i,registerOnRemoveHandlerHelper:()=>Vi,registerOnSaveHandler:()=>Li,registerOnSaveHandlerHelper:()=>Hi,setConfig:()=>Ui,setValidityState:()=>Di});var h={};n.r(h),n.d(h,{isSupported:()=>Ea,onClick:()=>Sa,onHoverEnter:()=>ba,onHoverLeave:()=>Aa});var m={};n.r(m),n.d(m,{_initialize:()=>Ia,isSupported:()=>Ra,navigateBack:()=>Pa,registerBackButtonHandler:()=>Ta,registerBackButtonHandlerHelper:()=>Oa});var v={};n.r(v),n.d(v,{isSupported:()=>Ma,navigateTo:()=>Fa,navigateToDefaultPage:()=>ka});var w={};n.r(w),n.d(w,{enterFullscreen:()=>xa,exitFullscreen:()=>Na,isSupported:()=>Da});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ha,getTabInstances:()=>La,isSupported:()=>_a,navigateToTab:()=>Ua});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Va,ReturnFocusType:()=>Ba,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>$a,initializeWithFrameContext:()=>qa,isSupported:()=>Za,navigateCrossDomain:()=>Ga,navigateToApp:()=>Ja,registerFocusEnterHandler:()=>Wa,registerFullScreenHandler:()=>Qa,returnFocus:()=>ja,setCurrentFrame:()=>za,shareDeepLink:()=>Ka,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>eu,registerGetLogHandler:()=>Yc});var b={};n.r(b),n.d(b,{closeConversation:()=>pu,getChatMembers:()=>gu,isSupported:()=>hu,openConversation:()=>fu});var A={};n.r(A),n.d(A,{isSupported:()=>Cu,sendCustomTelemetryData:()=>yu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Iu,isSupported:()=>Eu});var I={};n.r(I),n.d(I,{ContentItemType:()=>Tu,CopilotMode:()=>ku,MediaSelectionType:()=>Ou,SidePanelErrorCode:()=>Du,SidePanelErrorImpl:()=>Uu,TeamsContextType:()=>xu,TeamsDimensionName:()=>Fu,TeamsSessionType:()=>Ru,TranscriptState:()=>Mu,UserConsent:()=>Nu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>zu,getContent:()=>Bu,isResponseAReportableError:()=>Vu,isSupported:()=>_u,preCheckUserConsent:()=>ju,registerUserActionContentSelect:()=>Wu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>Xu,isSupported:()=>Zu});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>rl,ActionExecuteResponseHandler:()=>cl,InvokeErrorCode:()=>al,InvokeResponseType:()=>il,OriginalRequestType:()=>ol,SerializableActionExecuteInvokeRequest:()=>tl,SerializableConnectorParameters:()=>wl,UserAuthenticationState:()=>sl,authenticateAndResendRequest:()=>pl,authenticateWithConnector:()=>Cl,authenticateWithOauth2:()=>ml,authenticateWithPowerPlatformConnectorPlugins:()=>vl,authenticateWithSSO:()=>gl,authenticateWithSSOAndResendRequest:()=>hl,disconnectConnector:()=>bl,getUserAuthenticationStateForConnector:()=>Sl,isActionExecuteResponse:()=>nl,isInvokeError:()=>ul,isSupported:()=>Al,validateActionExecuteInvokeRequest:()=>dl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Ol,authenticateWithOauth:()=>Tl,authenticateWithSSO:()=>Pl,authenticateWithSSOAndResendRequest:()=>Rl,isSupported:()=>Fl,validateInput:()=>kl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Nl,ActionOpenUrlType:()=>xl,isSupported:()=>Ll,processActionOpenUrl:()=>Ul,processActionSubmit:()=>Dl});var M={};n.r(M),n.d(M,{isSupported:()=>jl,processActionOpenUrl:()=>Vl,processActionSubmit:()=>Bl});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>Ql,isSupported:()=>Jl,processActionOpenUrlDialog:()=>Gl});var N={};n.r(N),n.d(N,{isSupported:()=>ed,processActionCommand:()=>Yl});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>nd,CloudStorageProviderFileAction:()=>sd,CloudStorageProviderType:()=>rd,DocumentLibraryAccessType:()=>id,FileDownloadStatus:()=>ad,SpecialDocumentLibraryType:()=>od,addCloudStorageFolder:()=>ud,addCloudStorageProvider:()=>vd,addCloudStorageProviderFile:()=>Cd,copyMoveFiles:()=>gd,deleteCloudStorageFolder:()=>ld,deleteCloudStorageProviderFile:()=>Sd,downloadCloudStorageProviderFile:()=>bd,getCloudStorageFolderContents:()=>dd,getCloudStorageFolders:()=>cd,getExternalProviders:()=>pd,getFileDownloads:()=>hd,openCloudStorageFile:()=>fd,openDownloadFolder:()=>md,registerCloudStorageProviderContentChangeHandler:()=>Id,registerCloudStorageProviderListChangeHandler:()=>Ed,removeCloudStorageProvider:()=>wd,renameCloudStorageProviderFile:()=>yd,uploadCloudStorageProviderFile:()=>Ad});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>Od,isSupported:()=>Md,registerMeetingRoomCapabilitiesUpdateHandler:()=>Fd,registerMeetingRoomStatesUpdateHandler:()=>kd,sendCommandToPairedMeetingRoom:()=>Rd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>xd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Hd,version:()=>Nd});var _={};n.r(_),n.d(_,{isSupported:()=>Gd,showNotification:()=>$d});var V={};n.r(V),n.d(V,{isSupported:()=>Xd,notifyInstallCompleted:()=>Zd,registerAppInstallationHandler:()=>Kd,unregisterAppInstallationHandler:()=>Qd});var B={};n.r(B),n.d(B,{ControlCommand:()=>ef,ErrorReason:()=>tf,SessionTerminatedReason:()=>nf,getCapableParticipants:()=>rf,isSupported:()=>ff,registerOnCapableParticipantsChangeHandler:()=>cf,registerOnDeviceStateChangeHandler:()=>lf,registerOnErrorHandler:()=>uf,registerOnSessionStatusChangeHandler:()=>df,requestControl:()=>of,sendControlCommand:()=>af,terminateSession:()=>sf});var j={};n.r(j),n.d(j,{isSupported:()=>hf,selectAppEntity:()=>gf});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>vf,isSupported:()=>wf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>Sf,isSupported:()=>bf,joinedTeams:()=>W});var q={};n.r(q),n.d(q,{ChannelType:()=>Ef,fullTrust:()=>z,getTeamChannels:()=>If,isSupported:()=>Tf,refreshSiteUrl:()=>Pf});var $={};n.r($),n.d($,{EffectChangeType:()=>Lf,EffectFailureReason:()=>Hf,VideoFrameFormat:()=>Uf,isSupported:()=>zf,notifySelectedVideoEffectChanged:()=>Vf,registerForVideoEffect:()=>Bf,registerForVideoFrame:()=>_f});var G={};n.r(G),n.d(G,{ErrorLevel:()=>gp,frameProcessingTimeoutInMs:()=>fp,isSupported:()=>bp,notifyFatalError:()=>Ip,notifySelectedVideoEffectChanged:()=>Cp,registerForVideoEffect:()=>yp,registerForVideoFrame:()=>hp,updatePersonalizedEffects:()=>Sp});var J={};n.r(J),n.d(J,{addAndConfigure:()=>xp,getAll:()=>Np,isSupported:()=>Hp,reconfigure:()=>Dp,remove:()=>Lp,rename:()=>Up});var K={};n.r(K),n.d(K,{AppTypes:()=>Bp,isSupported:()=>jp,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Xp,openAppDetail:()=>Kp,openFullStore:()=>Jp,openInContextStore:()=>Qp,openSpecificStore:()=>Zp});var Z={};n.r(Z),n.d(Z,{callTool:()=>ig,contentSizeChanged:()=>lg,isSupported:()=>og,notifyIntrinsicHeight:()=>ug,openExternal:()=>fg,registerModalCloseHandler:()=>pg,requestDisplayMode:()=>sg,requestModal:()=>cg,sendFollowUpMessage:()=>ag,setWidgetState:()=>dg});var X={};n.r(X),n.d(X,{DataResidency:()=>Lg,authenticate:()=>Rg,getAuthToken:()=>kg,getUser:()=>xg,notifyFailure:()=>Ug,notifySuccess:()=>Dg,registerAuthenticationHandlers:()=>Og});var Y={};n.r(Y),n.d(Y,{isSupported:()=>Hg,registerHostMemoryMetricsHandler:()=>_g});var ee={};n.r(ee),n.d(ee,{isSupported:()=>ch,openAppInstallDialog:()=>sh});var te={};n.r(te),n.d(te,{CameraStartMode:()=>ph,File:()=>wh,FileFormat:()=>dh,ImageOutputFormats:()=>vh,ImageUriType:()=>mh,Media:()=>Ah,MediaControllerEvent:()=>fh,MediaType:()=>hh,Source:()=>gh,VideoController:()=>Ih,captureImage:()=>Ch,hasPermission:()=>yh,requestPermission:()=>Sh,scanBarCode:()=>Oh,selectMedia:()=>Ph,viewImages:()=>Th});var ne={};n.r(ne),n.d(ne,{hasPermission:()=>Wh,isSupported:()=>qh,requestPermission:()=>zh,scanBarCode:()=>jh});var re={};n.r(re),n.d(re,{isSupported:()=>Qh,openChat:()=>Gh,openGroupChat:()=>Kh});var oe={};n.r(oe),n.d(oe,{isSupported:()=>tm,read:()=>em,write:()=>Yh});var ie={};n.r(ie),n.d(ie,{addNAATrustedOrigins:()=>pm,canParentManageNAATrustedOrigins:()=>cm,deleteNAATrustedOrigins:()=>gm,getParentOrigin:()=>sm,isDeeplyNestedAuthSupported:()=>um,isNAAChannelRecommended:()=>am});var ae={};n.r(ae),n.d(ae,{chooseLocation:()=>Cm,isSupported:()=>Sm,showLocation:()=>ym});var se={};n.r(se),n.d(se,{getCurrentLocation:()=>Am,hasPermission:()=>Em,isSupported:()=>Pm,map:()=>ae,requestPermission:()=>Im});var ce={};n.r(ce),n.d(ce,{isSupported:()=>xm,open:()=>Mm});var ue={};n.r(ue),n.d(ue,{getLocation:()=>Dm,isSupported:()=>Lm,showLocation:()=>Um});var le={};n.r(le),n.d(le,{setOptions:()=>_m});var de={};n.r(de),n.d(de,{CallType:()=>qm,EventActionSource:()=>Gm,MeetingReactionType:()=>Wm,MeetingType:()=>zm,SharingProtocol:()=>$m,appShareButton:()=>le,getAppContentStageSharingCapabilities:()=>ov,getAppContentStageSharingState:()=>av,getAuthenticationTokenForAnonymousUser:()=>Xm,getIncomingClientAudioState:()=>Jm,getLiveStreamState:()=>Ym,getMeetingDetails:()=>Qm,getMeetingDetailsVerbose:()=>Zm,joinMeeting:()=>lv,registerLiveStreamChangedHandler:()=>nv,registerMeetingReactionReceivedHandler:()=>uv,registerRaiseHandStateChangedHandler:()=>cv,registerSpeakingStateChangeHandler:()=>sv,requestAppAudioHandling:()=>dv,requestStartLiveStreaming:()=>ev,requestStopLiveStreaming:()=>tv,shareAppContentToStage:()=>rv,stopSharingAppContentToStage:()=>iv,toggleIncomingClientAudio:()=>Km,updateMicState:()=>gv});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Cv,openPurchaseExperience:()=>wv});var pe={};n.r(pe),n.d(pe,{composeMeeting:()=>bv,isSupported:()=>Av,openCalendarItem:()=>Sv});var ge={};n.r(ge),n.d(ge,{composeMailWithHandoff:()=>Tv,isSupported:()=>Ov});var he={};n.r(he),n.d(he,{ComposeMailType:()=>Nv,composeMail:()=>Mv,handoff:()=>ge,isSupported:()=>xv,openMailItem:()=>kv});var me={};n.r(me),n.d(me,{enablePrintCapability:()=>Uv,isSupported:()=>jv,print:()=>Lv,registerBeforeUnloadHandler:()=>Vv,registerBeforeUnloadHandlerHelper:()=>Bv,registerOnLoadHandler:()=>Hv,registerOnLoadHandlerHelper:()=>_v});var ve={};n.r(ve),n.d(ve,{isSupported:()=>Gv,selectPeople:()=>qv});var we={};n.r(we),n.d(we,{isSupported:()=>Xv,showProfile:()=>Zv});var Ce={};n.r(Ce),n.d(Ce,{closeSearch:()=>aw,isSupported:()=>iw,registerHandlers:()=>rw,unregisterHandlers:()=>ow});var ye={};n.r(ye),n.d(ye,{getContent:()=>uw,isSupported:()=>lw});var Se={};n.r(Se),n.d(Se,{SharingAPIMessages:()=>pw,history:()=>ye,isSupported:()=>Cw,shareWebContent:()=>gw});var be={};n.r(be),n.d(be,{close:()=>Sw,isSupported:()=>bw});var Ae={};n.r(Ae),n.d(Ae,{StageViewOpenMode:()=>Ew,isSupported:()=>Pw,open:()=>Iw,self:()=>be});var Ee={};n.r(Ee),n.d(Ee,{captureImages:()=>Fw,isSupported:()=>Mw,retrieveImages:()=>kw});var Ie={};n.r(Ie),n.d(Ie,{CameraRestriction:()=>Lw,Source:()=>Hw,hasPermission:()=>_w,image:()=>Ee,requestPermission:()=>Vw});var Pe={};n.r(Pe),n.d(Pe,{isSupported:()=>Gw,isWebStorageClearedOnUserLogOut:()=>qw});var Te={};n.r(Te),n.d(Te,{CallModalities:()=>Kw,isSupported:()=>Zw,startCall:()=>Qw});var Oe={};n.r(Oe),n.d(Oe,{ExpectedFailureReason:()=>Po,FailedReason:()=>Io,Messages:()=>Eo,notifyAppLoaded:()=>Yw,notifyExpectedFailure:()=>nC,notifyFailure:()=>tC,notifySuccess:()=>eC});var Re={};n.r(Re),n.d(Re,{getDragAndDropFiles:()=>lC,isSupported:()=>fC});var Fe={};n.r(Fe),n.d(Fe,{getSettings:()=>BC,registerOnRemoveHandler:()=>zC,registerOnSaveHandler:()=>WC,setSettings:()=>jC,setValidityState:()=>VC});var ke={};n.r(ke),n.d(ke,{getDefaultSizeIfNotProvided:()=>XC,startTask:()=>GC,submitTask:()=>KC,updateTask:()=>JC});var Me={};n.r(Me),n.d(Me,{ContainerState:()=>ty,LiveShareHost:()=>ry,UserMeetingRole:()=>ey,isSupported:()=>ny});var xe={};n.r(xe),n.d(xe,{CartStatus:()=>Cy,Intent:()=>wy,addOrUpdateCartItems:()=>Sy,cartVersion:()=>vy,getCart:()=>yy,isSupported:()=>Ey,removeCartItems:()=>by,updateCartStatus:()=>Ay});var Ne,De,Ue,Le,He,_e,Ve,Be,je,We,ze={};function qe(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(ze),n.d(ze,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>Wy,enableShortcutRelayCapability:()=>By,isSupported:()=>jy,resetIsShortcutRelayCapabilityEnabled:()=>Vy,setOverridableShortcutHandler:()=>_y}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Ne||(Ne={})),function(e){e.M365Content="m365content"}(De||(De={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Ue||(Ue={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Le||(Le={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(He||(He={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(_e||(_e={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ve||(Ve={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(Be||(Be={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(je||(je={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(We||(We={}));const $e=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001"]}');const Ge="2.0.1",Je="2.0.2",Ke="2.0.3",Qe="2.0.4",Ze="2.0.1",Xe="1.9.0",Ye="2.0.0",et="1.7.0",tt="1.8.0",nt="1.9.0",rt=n.t($e,2).validOrigins,ot=1500,it=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),at=/^https:\/\//,st="https",ct="teams.microsoft.com",ut="The library has not yet been initialized",lt="The runtime has not yet been initialized",dt="The runtime version is not supported",ft="The call was not properly started";var pt=n(933);const gt=mt,ht=2147483647;function mt(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 wt(e)}return vt(e,t,n)}function vt(e,t,n){if("string"==typeof e)return bt(e,t);if(ArrayBuffer.isView(e))return Rt(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(Et(e,ArrayBuffer)||e&&Et(e.buffer,ArrayBuffer))return Ft(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Et(e,SharedArrayBuffer)||e&&Et(e.buffer,SharedArrayBuffer)))return Ft(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 mt.from(r,t,n);const o=Zt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return mt.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 wt(e){return Ct(e),yt(e<0?0:0|St(e))}function Ct(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 yt(e){if(e>ht)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,mt.prototype),t}function St(e){if(e>=ht)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ht.toString(16)+" bytes");return 0|e}function bt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!mt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|At(e,t);let r=yt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function At(e,t){if(mt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Et(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 It(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Pt(e).length;default:if(o)return r?-1:It(e).length;t=(""+t).toLowerCase(),o=!0}}function Et(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function It(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 Pt(e){return pt.toByteArray(Ot(e))}mt.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}}(),mt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),mt.from=function(e,t,n){return vt(e,t,n)},Object.setPrototypeOf(mt.prototype,Uint8Array.prototype),Object.setPrototypeOf(mt,Uint8Array),mt.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}},mt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==mt.prototype};const Tt=/[^+/0-9A-Za-z-_]/g;function Ot(e){if((e=(e=e.split("=")[0]).trim().replace(Tt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Rt(e){if(Et(e,Uint8Array)){const t=new Uint8Array(e);return Ft(t.buffer,t.byteOffset,t.byteLength)}return kt(e)}function Ft(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,mt.prototype),r}function kt(e){const t=e.length<0?0:0|St(e.length),n=yt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Mt(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 Dt(r)}function xt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ut(this,t,n);case"utf8":case"utf-8":return Mt(this,t,n);case"ascii":return Lt(this,t,n);case"latin1":case"binary":return Ht(this,t,n);case"base64":return _t(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}mt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Mt(this,0,e):xt.apply(this,arguments)};const Nt=4096;function Dt(e){const t=e.length;if(t<=Nt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Nt));return n}function Ut(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Qt[e[r]];return o}function Lt(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 Ht(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 _t(e,t,n){return 0===t&&n===e.length?pt.fromByteArray(e):pt.fromByteArray(e.slice(t,n))}function Vt(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 Bt(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(Kt(r))return a;e[n+a]=r}return a}function jt(e,t,n,r){return Jt(It(t,e.length-n),e,n,r)}function Wt(e,t,n,r){return Jt($t(t),e,n,r)}function zt(e,t,n,r){return Jt(Pt(t),e,n,r)}function qt(e,t,n,r){return Jt(Gt(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 Gt(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 Jt(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 Kt(e){return e!=e}mt.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 Bt(this,e,t,n);case"utf8":case"utf-8":return jt(this,e,t,n);case"ascii":case"latin1":case"binary":return Wt(this,e,t,n);case"base64":return zt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Qt=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 Zt(e){if(mt.isBuffer(e)){const t=0|St(e.length),n=yt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Kt(e.length)?yt(0):kt(e):"Buffer"===e.type&&Array.isArray(e.data)?kt(e.data):void 0}const Xt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Yt;const en=new Uint8Array(16);function tn(){if(!Yt&&(Yt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yt(en)}const nn=[];for(let e=0;e<256;++e)nn.push((e+256).toString(16).slice(1));function rn(e,t=0){return nn[e[t+0]]+nn[e[t+1]]+nn[e[t+2]]+nn[e[t+3]]+"-"+nn[e[t+4]]+nn[e[t+5]]+"-"+nn[e[t+6]]+nn[e[t+7]]+"-"+nn[e[t+8]]+nn[e[t+9]]+"-"+nn[e[t+10]]+nn[e[t+11]]+nn[e[t+12]]+nn[e[t+13]]+nn[e[t+14]]+nn[e[t+15]]}const on=function(e,t,n){if(Xt.randomUUID&&!t&&!e)return Xt.randomUUID();const r=(e=e||{}).random||(e.rng||tn)();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 rn(r)},an=/^(?:[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 sn=function(e){return"string"==typeof e&&an.test(e)};var cn,un,ln,dn,fn,pn,gn,hn;!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"}(cn||(cn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(un||(un={})),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"}(ln||(ln={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(dn||(dn={})),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"}(fn||(fn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(pn||(pn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(gn||(gn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(hn||(hn={}));const mn={errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},vn={majorVersion:1,minorVersion:5},wn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Cn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),yn=new Error("Invalid response: Received more images than the specified max limit in the response.");function Sn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function bn(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 An(){return on()}function En(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&En(e[t])}),Object.freeze(e)}function In(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Pn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Tn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function On(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 Rn(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 Fn(e){return!(bn(`${e.majorVersion}.${e.minorVersion}`,`${vn.majorVersion}.${vn.minorVersion}`)>=0)}function kn(e){return"https:"===e.protocol}function Mn(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=gt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function xn(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 Nn(){if(Dn())throw new Error("window object undefined at SSR check");return window}function Dn(){return"undefined"==typeof window}function Un(e,t){if(_n(e)||!Vn(e)||!Bn(e))throw t||new Error("id is not valid.")}function Ln(e,t){const n=e.toString().toLocaleLowerCase();if(_n(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!kn(e))throw t||new Error("Url should be a valid https url")}function Hn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function _n(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 Vn(e){return e.length<256&&e.length>4}function Bn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function jn(e){if(!e)throw new Error("id must not be empty");if(!1===sn(e))throw new Error("id must be a valid UUID")}const Wn=!!performance&&"now"in performance;function zn(){return Wn?performance.now()+performance.timeOrigin:void 0}function qn(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=>qn(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=>qn(e[n],t+1))}function $n(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:Be.NotAdult})})})}class Gn{constructor(e=An()){this.uuid=e,jn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Jn(e){if(!(e instanceof Gn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Kn{}Kn.initializeCalled=!1,Kn.initializeCompleted=!1,Kn.additionalValidOrigins=[],Kn.initializePromise=void 0,Kn.isFramelessWindow=!1,Kn.frameContext=void 0,Kn.hostClientType=void 0,Kn.printCapabilityEnabled=!1,Kn.teamsJsInstanceId=(new Gn).toString();var Qn=n(815);const Zn=new Gn,Xn=Qn.debug.formatArgs;Qn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Zn.toString()}]`,Xn.call(this,e)};const Yn=(0,Qn.debug)("teamsJs");function er(e){return Yn.extend(e)}function tr(e,t){return`${e}_${t}`}function nr(e){return/^v\d+_[\w.]+$/.test(e)}var rr=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 or=er("runtime"),ir=4;function ar(e){return e.apiVersion===ir}const sr={apiVersion:-1,supports:{}};function cr(e){if(ar(e))return!0;throw-1===e.apiVersion?new Error(lt):new Error(dt)}let ur=sr;const lr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:wn,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:{}}}},dr=[cn.desktop,cn.web,cn.rigel,cn.surfaceHub,cn.teamsRoomsWindows,cn.teamsRoomsAndroid,cn.teamsPhones,cn.teamsDisplays],fr=[cn.android,cn.ios,cn.ipados,cn.visionOS],pr=[...dr,...fr];function gr(e){let t=e;if(t.apiVersion<ir&&hr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ar(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const hr=[{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=rr(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})}}}],mr="2.1.2",vr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:dr}],"1.9.0":[{capability:{location:{}},hostClientTypes:pr}],"2.0.0":[{capability:{people:{}},hostClientTypes:pr},{capability:{sharing:{}},hostClientTypes:[cn.desktop,cn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[cn.android,cn.desktop,cn.ios,cn.teamsRoomsAndroid,cn.teamsPhones,cn.teamsDisplays,cn.web]},{capability:{webStorage:{}},hostClientTypes:[cn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[cn.android,cn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[cn.android,cn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[cn.android,cn.ios,cn.ipados,cn.visionOS]}],"2.1.2":[]},wr=or.extend("generateBackCompatRuntimeConfig");function Cr(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]=Cr(e[r]||{},t[r]));return n}function yr(e,t,n){wr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);wr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{bn(e,t)>=0&&n[t].forEach(e=>{void 0!==Kn.hostClientType&&e.hostClientTypes.includes(Kn.hostClientType)&&(r=Cr(r,e.capability))})});const o={apiVersion:ir,hostVersionsInfo:wn,isLegacyTeams:!0,supports:r};return wr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Sr=or.extend("applyRuntimeConfig");function br(e){"string"==typeof e.apiVersion&&(Sr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Sr("Fast-forwarding runtime %o",e);const t=gr(e);Sr("Applying runtime %o",t),ur=En(t)}function Ar(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Er="2.48.0-beta.3",Ir={childProxyingCommunication:!1};function Pr(){Ir.childProxyingCommunication=!0}function Tr(){return Ir.childProxyingCommunication}let Or={disableEnforceOriginMatchForChildResponses:!1};function Rr(){return Or}function Fr(e){Or=e}function kr(e){return Fr(Object.assign(Object.assign({},Or),e)),Rr()}var Mr=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 xr=e=>{const{uuid:t}=e,n=Mr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Nr=e=>{const{uuidAsString:t}=e,n=Mr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Gn(t):void 0})},Dr=e=>{const{uuidAsString:t}=e,n=Mr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Gn(t):void 0})},Ur=e=>{const{uuid:t}=e,n=Mr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Lr(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 Hr=er("flushMessageQueue");function _r(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=xr(o);Hr("Flushing message %s from %s message queue via postMessage.",Lr(n),r),e.postMessage(n,t)}}}const Vr=er("internal"),Br=Vr.extend("ensureInitializeCalled"),jr=Vr.extend("ensureInitialized");function Wr(){if(!Kn.initializeCalled)throw Br(ut),new Error(ut)}function zr(e,...t){if(!Kn.initializeCompleted)throw jr("%s. initializeCalled: %s",ut,Kn.initializeCalled.toString()),new Error(ut);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Kn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Kn.frameContext}".`)}return cr(e)}function qr(e=Ge){const t=bn(Kn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function $r(){return Kn.hostClientType==cn.android||Kn.hostClientType==cn.ios||Kn.hostClientType==cn.ipados||Kn.hostClientType==cn.visionOS}function Gr(e=Ge){if(!$r()){throw{errorCode:Le.NOT_SUPPORTED_ON_PLATFORM}}if(!qr(e)){throw{errorCode:Le.OLD_PLATFORM}}}function Jr(e){let t=Kn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&at.test(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Kn.additionalValidOrigins=t}function Kr(e){if(!Yr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Zr}-${Xr}).`)}function Qr(e){if(_n(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(eo(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Zr=4,Xr=256;function Yr(e){return e.length<Xr&&e.length>Zr}function eo(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function to(e){if(!(e instanceof ro))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class no{constructor(e){this.idAsString=e,Qr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class ro extends no{constructor(e){super(e),Kr(e)}toJSON(){return{appIdAsString:this.toString()}}}function oo(e){return null==e}var io=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 ao;const so="v1",co=er("messageChannels.telemetry");function uo(){return io(this,void 0,void 0,function*(){if(ao)return co("Returning telemetry port from cache"),ao;if(!lo())throw mn;return ao=yield bc(tr(so,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),ao})}function lo(){var e;return!(!zr(ur)||!(null===(e=ur.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function fo(){ao=void 0}var po=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 go;const ho="v1",mo=er("messageChannels.dataLayer");function vo(){return po(this,void 0,void 0,function*(){if(go)return mo("Returning dataLayer port from cache"),go;if(!wo())throw mn;return go=yield bc(tr(ho,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),go})}function wo(){var e;return!(!zr(ur)||!(null===(e=ur.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Co(){go=void 0}function yo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");zr(ur),_s(e)}function So(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");zr(ur),Vs(e)}const bo="v2",Ao=er("app"),Eo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Io,Po;function To(){return Kn.initializeCompleted}function Oo(){return Kn.frameContext}function Ro(e){return Xi(tr(bo,"app.initialize"),e)}function Fo(e){lc.currentWindow=e}function ko(){Kn.initializeCalled&&(Ss(),Kn.initializeCalled=!1,Kn.initializeCompleted=!1,Kn.initializePromise=void 0,Kn.additionalValidOrigins=[],Kn.frameContext=void 0,Kn.hostClientType=void 0,Kn.isFramelessWindow=!1,fo(),Co(),pc())}function Mo(){return new Promise(e=>{Wr(),e(gc(tr(bo,"app.getContext"),"getContext"))}).then(e=>Bo(e))}function xo(){Wr(),Yi(tr(bo,"app.notifyAppLoaded"))}function No(){return na(tr(bo,"app.notifySuccess"))}function Do(e){Wr(),ta(tr(bo,"app.notifyFailure"),e)}function Uo(e){Wr(),ea(tr(bo,"app.notifyExpectedFailure"),e)}function Lo(e){sa(tr(bo,"app.registerOnThemeChangeHandler"),e)}function Ho(e){ca(tr(bo,"app.registerOnContextChangeHandler"),e)}function _o(e){Ms(e)}function Vo(e){return ua(tr(bo,"app.openLink"),e)}function Bo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:un.teams,clientType:e.hostClientType?e.hostClientType:cn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new ro(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Kn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function jo(e){ri(tr(ti,"dialog.update.resize"),e)}function Wo(){return!(!zr(ur)||!ur.supports.dialog)&&!!ur.supports.dialog.update}function zo(e,t,n){ii(tr(ti,"dialog.url.bot.open"),e,t,n)}function qo(){return zr(ur)&&void 0!==(ur.supports.dialog&&ur.supports.dialog.url&&ur.supports.dialog.url.bot)}function $o(e){if(zr(ur,ln.task),!Ko())throw mn;Ic(tr(ti,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Go(e){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Ko())throw mn;Ic(tr(ti,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Jo(e){if(zr(ur,ln.task),!Ko())throw mn;for(Is("messageForChild"),Es(tr(ti,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ui.reverse();ui.length>0;){e(ui.pop())}}function Ko(){var e,t;return zr(ur)&&!!(null===(t=null===(e=ur.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Qo(e,t,n){oi(tr(ti,"dialog.url.open"),e,t,n)}function Zo(e,t){ai(tr(ti,"dialog.url.submit"),e,t)}function Xo(){return zr(ur)&&void 0!==(ur.supports.dialog&&ur.supports.dialog.url)}function Yo(e){return{url:e.url,height:e.size?e.size.height:gn.Small,width:e.size?e.size.width:gn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ei(e){const t=Yo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Io||(Io={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Po||(Po={})),Ao("teamsjs instance is version %s, starting at %s UTC (%s local)",Er,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Dn())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?Ao("teamsjs is being used from %s. %s",t,n):Ao("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ti="v2",ni="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function ri(e,t){if(zr(ur,ln.content,ln.sidePanel,ln.task,ln.meetingStage),!Wo())throw mn;Ic(e,"tasks.updateTask",[t])}function oi(e,t,n,r){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Xo())throw mn;r&&Es(tr(ti,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Ic(e,"tasks.startTask",[Yo(t)],(e,t)=>{null==n||n({err:e,result:t}),Is("messageForParent")})}function ii(e,t,n,r){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!qo())throw mn;r&&Es(tr(ti,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Ic(e,"tasks.startTask",[ei(t)],(e,t)=>{null==n||n({err:e,result:t}),Is("messageForParent")})}function ai(e,t,n){if(zr(ur,ln.content,ln.task),!Xo())throw mn;Kn.frameContext===ln.content&&console.warn(ni),Ic(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function si(e){return{card:e.card,height:e.size?e.size.height:gn.Small,width:e.size?e.size.width:gn.Small,title:e.title}}function ci(e){const t=si(e);return t.completionBotId=e.completionBotId,t}const ui=[];function li(e){Kn.frameContext&&(Kn.frameContext===ln.task?ui.push(e):Is("messageForChild"))}function di(e,t){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!fi())throw mn;const n=ci(e);Ic(tr(ti,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function fi(){const e=ur.hostVersionsInfo&&ur.hostVersionsInfo.adaptiveCardSchemaVersion&&!Fn(ur.hostVersionsInfo.adaptiveCardSchemaVersion);return zr(ur)&&void 0!==(e&&ur.supports.dialog&&ur.supports.dialog.card&&ur.supports.dialog.card.bot)}function pi(e,t){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!gi())throw mn;const n=si(e);Ic(tr(ti,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function gi(){const e=ur.hostVersionsInfo&&ur.hostVersionsInfo.adaptiveCardSchemaVersion&&!Fn(ur.hostVersionsInfo.adaptiveCardSchemaVersion);return zr(ur)&&void 0!==(e&&ur.supports.dialog&&ur.supports.dialog.card)}function hi(){Es(tr(ti,"dialog.registerMessageForChildHandler"),"messageForChild",li,!1)}function mi(){return!(!zr(ur)||!ur.supports.dialog)}const vi="v2";var wi,Ci;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(wi||(wi={}));class yi{constructor(){this.enabled=!0,this.selected=!1}}let Si,bi,Ai,Ei,Ii;function Pi(){Es(tr(vi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Fi,!1),Es(tr(vi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Mi,!1),Es(tr(vi,"menus.registerSetModuleViewHandler"),"setModuleView",Oi,!1)}function Ti(e,t){if(zr(ur),!xi())throw mn;Ai=t,Ic(tr(vi,"menus.setUpViews"),"setUpViews",[e])}function Oi(e){Ai&&Ai(e)||(zr(ur),Ic(tr(vi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ri(e,t){if(zr(ur),!xi())throw mn;Si=t,Ic(tr(vi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Fi(e){Si&&Si(e)||(zr(ur),Ic(tr(vi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ki(e,t){if(zr(ur),!xi())throw mn;bi=t,Ic(tr(vi,"menus.showActionMenu"),"showActionMenu",[e])}function Mi(e){bi&&bi(e)||(zr(ur),Ic(tr(vi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function xi(){return!(!zr(ur)||!ur.supports.menus)}function Ni(){Es(tr(Xa,"pages.config.registerSettingsSaveHandler"),"settings.save",Bi,!1),Es(tr(Xa,"pages.config.registerSettingsRemoveHandler"),"settings.remove",zi,!1)}function Di(e){return ss(tr(Xa,"pages.config.setValidityState"),e)}function Ui(e){return us(tr(Xa,"pages.config.setConfig"),e)}function Li(e){Hi(tr(Xa,"pages.config.registerOnSaveHandler"),e,()=>{if(!oo(e)&&!$i())throw mn})}function Hi(e,t,n){!oo(t)&&zr(ur,ln.settings),n&&n(),Ei=t,!oo(t)&&Ic(e,"registerHandler",["save"])}function _i(e){Vi(tr(Xa,"pages.config.registerOnRemoveHandler"),e,()=>{if(!oo(e)&&!$i())throw mn})}function Vi(e,t,n){!oo(t)&&zr(ur,ln.remove,ln.settings),n&&n(),Ii=t,!oo(t)&&Ic(e,"registerHandler",["remove"])}function Bi(e){const t=new Wi(e);Ei?Ei(t):qs()?Xs("settings.save",[e]):t.notifySuccess()}function ji(e){Ts(tr(Xa,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[ln.content],()=>{if(!$i())throw mn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ci||(Ci={}));class Wi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Ic(tr(Xa,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ic(tr(Xa,"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 zi(){const e=new qi;Ii?Ii(e):qs()?Xs("settings.remove",[]):e.notifySuccess()}class qi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Ic(tr(Xa,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ic(tr(Xa,"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 $i(){return!(!zr(ur)||!ur.supports.pages)&&!!ur.supports.pages.config}class Gi{}class Ji extends Gi{validate(e){return!0}deserialize(e){return e}}var Ki=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Qi=6e4,Zi=er("app");function Xi(e,t){if(Dn()){return Zi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return On(()=>aa(e,t),Qi,new Error("SDK initialization timed out."))}function Yi(e){Ic(e,Eo.AppLoaded,[Er])}function ea(e,t){Ic(e,Eo.ExpectedFailure,[t.reason,t.message])}function ta(e,t){Ic(e,Eo.Failure,[t.reason,t.message])}function na(e){return Ki(this,void 0,void 0,function*(){if(Kn.initializeCompleted)return oa(e);if(!Kn.initializePromise)throw new Error(ut);return Kn.initializePromise.then(()=>oa(e))})}function ra(){var e;return zr(ur)&&!!(null===(e=ur.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function oa(e){return Ki(this,void 0,void 0,function*(){return ra()?yc(Eo.Success,[Er],new Ji,e).then(()=>({hasFinishedSuccessfully:!0})):(Ic(e,Eo.Success,[Er]),{hasFinishedSuccessfully:"unknown"})})}const ia=Zi.extend("initializeHelper");function aa(e,t){return new Promise(n=>{Kn.initializeCalled||(Kn.initializeCalled=!0,ys(),Kn.initializePromise=fc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ge})=>{Kn.frameContext=e,Kn.hostClientType=t,Kn.clientSupportedSDKVersion=r;try{ia("Parsing %s",n);let e=JSON.parse(n);if(ia("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=$n(e),n&&br(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ia("Attempting to parse %s as an SDK version",n),isNaN(bn(n,Ge))||(Kn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ia("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=$n(e),br(e)}catch(e){if(!(e instanceof SyntaxError))throw e;br(yr(Kn.clientSupportedSDKVersion,lr,vr))}}Kn.initializeCompleted=!0}),Pi(),Ni(),hi()),Array.isArray(t)&&Jr(t),void 0!==Kn.initializePromise?n(Kn.initializePromise):ia("GlobalVars.initializePromise is unexpectedly undefined")})}function sa(e,t){!oo(t)&&Wr(),Os(e,t)}function ca(e,t){!oo(t)&&Wr(),Rs(e,t)}function ua(e,t){return new Promise(n=>{zr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),n(hc(e,"executeDeepLink",t))})}var la=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 da=[];const fa=er("validateOrigin");let pa;function ga(){return la(this,void 0,void 0,function*(){pa||(yield ma())})}function ha(){return 0===da.length}function ma(e=!1){return la(this,void 0,void 0,function*(){if(!ha()&&!e)return da;if(pa)return pa;if(Dn())return da=rt,rt;{fa("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),ot);return pa=fetch(it,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return fa("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(va(JSON.stringify(e)))return da=e.validOrigins,da;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?fa(`validOrigins fetch call to CDN failed due to Timeout of ${ot} ms. Defaulting to fallback list`):fa("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),da=rt,da)),pa}})}function va(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 fa("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function wa(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 Ca(e,t){const n=t||ha()?rt:da;return ya(e,n)?Promise.resolve(!0):(fa("Origin %s is not in the local valid origins list, fetching from CDN",e),ma(t).then(t=>ya(e,t)))}function ya(e,t){if(!kn(e))return fa("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=>wa(e,n)))return!0;for(const e of Kn.additionalValidOrigins){if(wa("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return fa("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,Kn.additionalValidOrigins),!1}function Sa(e){Ts(tr(Xa,"pages.appButton.onClick"),"appButtonClick",e,[ln.content],()=>{if(!Ea())throw mn})}function ba(e){Ts(tr(Xa,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[ln.content],()=>{if(!Ea())throw mn})}function Aa(e){Ts(tr(Xa,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[ln.content],()=>{if(!Ea())throw mn})}function Ea(){return!(!zr(ur)||!ur.supports.pages)&&!!ur.supports.pages.appButton}function Ia(){hs()}function Pa(){return es(tr(Xa,"pages.backStack.navigateBack"))}function Ta(e){Oa(tr(Xa,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!oo(e)&&!Ra())throw mn})}function Oa(e,t,n){!oo(t)&&zr(ur),n&&n(),gs(t),!oo(t)&&Ic(e,"registerHandler",["backButton"])}function Ra(){return!(!zr(ur)||!ur.supports.pages)&&!!ur.supports.pages.backStack}function Fa(e){return new Promise(t=>{if(zr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!Ma())throw mn;t(vc(tr(Xa,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function ka(){return new Promise(e=>{if(zr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!Ma())throw mn;e(vc(tr(Xa,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Ma(){return!(!zr(ur)||!ur.supports.pages)&&!!ur.supports.pages.currentApp}function xa(){if(zr(ur,ln.content),!Da())throw mn;Ic(tr(Xa,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Na(){if(zr(ur,ln.content),!Da())throw mn;Ic(tr(Xa,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Da(){return!(!zr(ur)||!ur.supports.pages)&&!!ur.supports.pages.fullTrust}function Ua(e){return ts(tr(Xa,"pages.tabs.navigateToTab"),e)}function La(e){return rs(tr(Xa,"pages.tabs.getTabInstances"),e)}function Ha(e){return os(tr(Xa,"pages.tabs.getMruTabInstances"),e)}function _a(){return!(!zr(ur)||!ur.supports.pages)&&!!ur.supports.pages.tabs}var Va,Ba;function ja(e){const t=tr(Xa,"pages.returnFocus");if(zr(ur),!Za())throw mn;if(void 0===e&&Ic(t,"returnFocus",[!1]),"boolean"==typeof e)Ic(t,"returnFocus",[e]);else switch(e){case Ba.PreviousLandmark:case Ba.GoToActivityFeed:Ic(t,"returnFocus",[!1,e]);break;case Ba.NextLandmark:Ic(t,"returnFocus",[!0,e])}}function Wa(e){Ts(tr(Xa,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!Za())throw mn})}function za(e){as(tr(Xa,"pages.setCurrentFrame"),e)}function qa(e,t,n){ga(),Xi(tr(Xa,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),za(e)}function $a(){return cs(tr(Xa,"pages.getConfig."))}function Ga(e){return Ya(tr(Xa,"pages.navigateCrossDomain"),e)}function Ja(e){return new Promise(t=>{if(zr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!Za())throw mn;const n=tr(Xa,"pages.navigateToApp");if(ur.isLegacyTeams){t(hc(n,"executeDeepLink",Rn(ls(e)?e:ds(e))))}else{t(hc(n,"pages.navigateToApp",ls(e)?fs(e):e))}})}function Ka(e){return is(tr(Xa,"pages.shareDeepLink"),e)}function Qa(e){Ts(tr(Xa,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!oo(e)&&!Za())throw mn})}function Za(){return!(!zr(ur)||!ur.supports.pages)}ga(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Va||(Va={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ba||(Ba={}));const Xa="v2";function Ya(e,t){return new Promise(n=>{if(zr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage),!Za())throw mn;n(mc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function es(e){return new Promise(t=>{if(zr(ur),!Ra())throw mn;t(mc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ts(e,t){return new Promise(n=>{if(zr(ur),!_a())throw mn;n(mc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function ns(e,t){if(zr(ur),!Za())throw mn;Ic(e,"returnFocus",[t])}function rs(e,t){return new Promise(n=>{if(zr(ur),!_a())throw mn;n(gc(e,"getTabInstances",t))})}function os(e,t){return new Promise(n=>{if(zr(ur),!_a())throw mn;n(gc(e,"getMruTabInstances",t))})}function is(e,t){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Za())throw mn;Ic(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function as(e,t){if(zr(ur,ln.content),!Za())throw mn;Ic(e,"setFrameContext",[t])}function ss(e,t){if(zr(ur,ln.settings,ln.remove),!$i())throw mn;Ic(e,"settings.setValidityState",[t])}function cs(e){return new Promise(t=>{if(zr(ur,ln.content,ln.settings,ln.remove,ln.sidePanel),!Za())throw mn;t(gc(e,"settings.getSettings"))})}function us(e,t){return new Promise(n=>{if(zr(ur,ln.content,ln.settings,ln.sidePanel),!$i())throw mn;n(hc(e,"settings.setSettings",t))})}function ls(e){return e.appId instanceof ro}function ds(e){return Object.assign(Object.assign({},e),{appId:new ro(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function fs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ps;function gs(e){ps=e}function hs(){Es(tr(Xa,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ms,!1)}function ms(){ps&&ps()||(qs()?Xs("backButtonPress",[]):Pa())}var vs=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 ws=er("handlers");class Cs{static initializeHandlers(){Cs.handlers.themeChange=Fs,Cs.handlers.contextChange=ks,Cs.handlers.load=Ds,Cs.handlers.beforeUnload=Hs,hs()}static uninitializeHandlers(){Cs.handlers={},Cs.themeChangeHandler=null,Cs.beforeUnloadHandler=null,Cs.beforeSuspendOrTerminateHandler=null,Cs.resumeHandler=null,Cs.contextChangeHandler=null}}function ys(){Cs.initializeHandlers()}function Ss(){Cs.uninitializeHandlers()}Cs.handlers={},Cs.themeChangeHandler=null,Cs.loadHandler=null,Cs.beforeUnloadHandler=null,Cs.beforeSuspendOrTerminateHandler=null,Cs.resumeHandler=null,Cs.hostToAppPerformanceMetricsHandler=null,Cs.contextChangeHandler=null;const bs=ws.extend("callHandler");function As(e,t){const n=Cs.handlers[e];if(n){bs("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return qs()?(Xs(e,t),[!1,void 0]):(bs("Handler for action message %s not found.",e),[!1,void 0])}function Es(e,t,n,r=!0,o=[]){n?(Cs.handlers[t]=n,r&&Ic(e,"registerHandler",[t,...o])):delete Cs.handlers[t]}function Is(e){delete Cs.handlers[e]}function Ps(e){return null!=Cs.handlers[e]}function Ts(e,t,n,r,o){n&&zr(ur,...r),o&&o(),Es(e,t,n)}function Os(e,t){Cs.themeChangeHandler=t,!oo(t)&&Ic(e,"registerHandler",["themeChange"])}function Rs(e,t){Cs.contextChangeHandler=t,!oo(t)&&Ic(e,"registerHandler",["contextChange"])}function Fs(e){Cs.themeChangeHandler&&Cs.themeChangeHandler(e),qs()&&Xs("themeChange",[e])}function ks(e){Cs.contextChangeHandler&&Cs.contextChangeHandler(e),qs()&&Xs("contextChange",[e])}function Ms(e){Cs.hostToAppPerformanceMetricsHandler=e}function xs(e){Cs.hostToAppPerformanceMetricsHandler&&Cs.hostToAppPerformanceMetricsHandler(e)}function Ns(e,t){Cs.loadHandler=t,!oo(t)&&Ic(e,"registerHandler",["load"])}function Ds(e){const t=Us(e);Cs.resumeHandler?(Cs.resumeHandler(t),qs()&&Xs("load",[t])):Cs.loadHandler&&(Cs.loadHandler(e),qs()&&Xs("load",[e]))}function Us(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ls(e,t){Cs.beforeUnloadHandler=t,!oo(t)&&Ic(e,"registerHandler",["beforeUnload"])}function Hs(){return vs(this,void 0,void 0,function*(){const e=()=>{Ic(tr("v2","handleBeforeUnload"),"readyToUnload",[])};Cs.beforeSuspendOrTerminateHandler?(yield Cs.beforeSuspendOrTerminateHandler(),qs()?Xs("beforeUnload"):e()):Cs.beforeUnloadHandler&&Cs.beforeUnloadHandler(e)||(qs()?Xs("beforeUnload"):e())})}function _s(e){Cs.beforeSuspendOrTerminateHandler=e,!oo(e)&&Ic(tr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Vs(e){Cs.resumeHandler=e,!oo(e)&&Ic(tr("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Bs=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 js=er("childProxyingCommunication");class Ws{}function zs(){Ws.window=null,Ws.origin=null,Ws.messageQueue=[]}function qs(){return!!Tr()&&!!Ws.window}function $s(e,t){return!!Tr()&&(Ws.window&&!Ws.window.closed&&e!==Ws.window||(Ws.window=e,Ws.origin=t),Ws.window&&Ws.window.closed?(Ws.window=null,Ws.origin=null,!1):Ws.window===e)}function Gs(e,t,n,r){return Bs(this,void 0,void 0,function*(){Ws.window===t&&(_r(Ws.window,Ws.origin,Ws.messageQueue,"child"),Ks(e,n,r))})}Ws.messageQueue=[];const Js=js.extend("handleIncomingMessageFromChild");function Ks(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Nr(e.data),[o,i]=As(r.func,r.args);if(o&&void 0!==i)return Js("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Lr(r),r.func),void Zs(r.id,r.uuid,Array.isArray(i)?i:[i]);Js("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Lr(r),r.func),Qs(r,t,n)}function Qs(e,t,n){const r=t(tr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ws.origin;n(r.uuid,(...t)=>{if(!Ws.window)return;if(!Rr().disableEnforceOriginMatchForChildResponses&&o!==Ws.origin)return void Js("Origin of child window has changed, not sending response back to child window");const n=t.pop();Js("Message from parent being relayed to child, id: %s",Lr(e)),Zs(e.id,e.uuid,t,n)})}function Zs(e,t,n,r){const o=Ws.window,i=Ys(e,t,n,r),a=Ur(i),s=Ws.origin;o&&s&&(Js("Sending message %s to %s via postMessage, args = %o",Lr(a),"child",a.args),o.postMessage(a,s))}function Xs(e,t){const n=Ws.window,r=ec(e,t),o=Ws.origin;n&&o?n.postMessage(r,o):Ws.messageQueue.push(r)}function Ys(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function ec(e,t){return{func:e,args:t||[]}}class tc{static storeCallbackInformation(e,t){tc.callbackInformation.set(e,t)}static clearMessages(){tc.callbackInformation.clear()}static deleteMessageInformation(e){tc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?xs({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=tc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(xs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),tc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}tc.callbackInformation=new Map;const nc=er("nestedAppAuthUtils"),rc=nc.extend("tryPolyfillWithNestedAppAuthBridge"),oc="v2";function ic(e,t,n){var r;const o=rc;if(Kn.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=sc(a,n);s&&(a.nestedAppAuthBridge=s)}const ac=nc.extend("createNestedAppAuthBridge");function sc(e,t){const n=ac;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=tr(oc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var cc=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 uc=er("communication");class lc{}class dc{}function fc(e,t){if(dc.messageListener=e=>xc(e),lc.currentWindow=lc.currentWindow||Nn(),lc.parentWindow=lc.currentWindow.parent!==lc.currentWindow.self?lc.currentWindow.parent:lc.currentWindow.opener,lc.topWindow=lc.currentWindow.top,(lc.parentWindow||e)&&lc.currentWindow.addEventListener("message",dc.messageListener,!1),!lc.parentWindow){const e=lc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Kn.isFramelessWindow=!0,e.onNativeMessage=Wc}try{return lc.parentOrigin="*",wc(t,"initialize",[Er,ir,e]).then(([e,t,n,r])=>(ic(r,lc.currentWindow,{onMessage:Dc,sendPostMessage:Tc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{lc.parentOrigin=null}}function pc(){lc.currentWindow&&lc.currentWindow.removeEventListener("message",dc.messageListener,!1),lc.currentWindow=null,lc.parentWindow=null,lc.parentOrigin=null,dc.parentMessageQueue=[],dc.nextMessageId=0,dc.callbacks.clear(),dc.promiseCallbacks.clear(),dc.portCallbacks.clear(),dc.legacyMessageIdsToUuidMap={},tc.clearMessages(),zs()}function gc(e,t,...n){return wc(e,t,n).then(([e])=>e)}function hc(e,t,...n){return wc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function mc(e,t,n,...r){return wc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function vc(e,t,...n){return wc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function wc(e,t,n=void 0){if(!nr(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(Ec(kc(e,t,n).uuid))})}function Cc(e){return e.map(e=>Ar(e)?e.serialize():e)}function yc(e,t,n,r,o){var i;return cc(this,void 0,void 0,function*(){const a=Cc(t),[s]=yield wc(r,e,a);if(o&&o(s)||!o&&qe(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Le.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Sc(e,t,n,r){var o;return cc(this,void 0,void 0,function*(){const i=Cc(t),[a]=yield wc(n,e,i);if(r&&r(a)||!r&&qe(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Le.INTERNAL_ERROR}, message: Invalid response from host`)})}function bc(e,t,n=void 0){if(!nr(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 Ac(kc(e,t,n).uuid)}function Ac(e){return new Promise((t,n)=>{dc.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 Ec(e){return new Promise(t=>{dc.promiseCallbacks.set(e,t)})}function Ic(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!nr(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=kc(e,t,o);r&&dc.callbacks.set(i.uuid,r)}dc.parentMessageQueue=[],dc.topMessageQueue=[],dc.nextMessageId=0,dc.callbacks=new Map,dc.promiseCallbacks=new Map,dc.portCallbacks=new Map,dc.legacyMessageIdsToUuidMap={};const Pc=uc.extend("sendNestedAuthRequestToTopWindow");function Tc(e,t){const n=Pc,r=lc.topWindow,o=Zc(e,t);return n("Message %s information: %o",Lr(o),{actionName:o.func}),Rc(r,o)}const Oc=uc.extend("sendRequestToTargetWindowHelper");function Rc(e,t){const n=Oc,r=Jc(e),o=xr(t);if(Kn.isFramelessWindow)lc.currentWindow&&lc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Lr(o),r),lc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Gc(e);e&&i?(n("Sending message %s to %s via postMessage",Lr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Lr(o),r),$c(e).push(t))}return t}const Fc=uc.extend("sendMessageToParentHelper");function kc(e,t,n,r,o){const i=Fc,a=lc.parentWindow,s=Qc(e,t,n,r,o);return tc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Lr(s),{actionName:t,args:n}),Rc(a,s)}const Mc=uc.extend("processIncomingMessage");function xc(e){return cc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Mc("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 Lc(t,n).then(r=>{r?(Hc(t,n),t!==lc.parentWindow?$s(t,n)&&Gs(e,t,kc,(e,t)=>dc.callbacks.set(e,t)):Wc(e)):Mc("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 Nc=uc.extend("processAuthBridgeMessage");function Dc(e,t){var n,r;const o=Nc;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?Lc(c,u)?(lc.topWindow&&!lc.topWindow.closed&&c!==lc.topWindow||(lc.topWindow=c,lc.topOrigin=u),lc.topWindow&&lc.topWindow.closed&&(lc.topWindow=null,lc.topOrigin=null),_r(lc.topWindow,lc.topOrigin,dc.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 Uc=uc.extend("shouldProcessIncomingMessage");function Lc(e,t){return cc(this,void 0,void 0,function*(){if(lc.currentWindow&&e===lc.currentWindow)return Uc("Should not process message because it is coming from the current window"),!1;if(lc.currentWindow&&lc.currentWindow.location&&t&&t===lc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Uc("Message has an invalid origin of %s",t),!1}const n=yield Ca(e);return n||Uc("Message has an invalid origin of %s",t),n}})}function Hc(e,t){Kn.isFramelessWindow||lc.parentWindow&&!lc.parentWindow.closed&&e!==lc.parentWindow||(lc.parentWindow=e,lc.parentOrigin=t),lc.parentWindow&&lc.parentWindow.closed&&(lc.parentWindow=null,lc.parentOrigin=null),_r(lc.parentWindow,lc.parentOrigin,dc.parentMessageQueue,"parent")}const _c=uc.extend("handleIncomingMessageFromParent");function Vc(e){const t=_c;if(!e.uuid)return dc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Bc(dc.callbacks,t);if(n)return n;const r=Bc(dc.promiseCallbacks,t);if(r)return r;const o=Bc(dc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Lr(e))}function Bc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function jc(e,t){const n=Bc(t,e.uuid);n&&t.delete(n),e.uuid?dc.legacyMessageIdsToUuidMap={}:delete dc.legacyMessageIdsToUuidMap[e.id]}function Wc(e){const t=_c,n=zn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Dr(r),i=Vc(o);if(i){const r=dc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),tc.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]),zc(e)||(t("Removing registered callback for message %s",i.toString()),jc(o,dc.callbacks)));const a=dc.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()),jc(o,dc.promiseCallbacks));const s=dc.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()),jc(o,dc.portCallbacks)}o.uuid&&(dc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;tc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Lr(r),r.func),As(r.func,r.args)}else t("Received an unknown message: %O",e)}function zc(e){return!0===e.data.isPartialResponse}function qc(){return lc.topWindow!==lc.parentWindow}function $c(e){return e===lc.topWindow&&qc()?dc.topMessageQueue:e===lc.parentWindow?dc.parentMessageQueue:[]}function Gc(e){return e===lc.topWindow&&qc()?lc.topOrigin:e===lc.parentWindow?lc.parentOrigin:null}function Jc(e){return e===lc.topWindow&&qc()?"top":e===lc.parentWindow?"parent":null}function Kc(e,t){let n;n=lc.currentWindow.setInterval(()=>{0===$c(e).length&&(clearInterval(n),t())},100)}function Qc(e,t,n,r,o){const i=dc.nextMessageId++,a=new Gn;dc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Kn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:zn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Zc(e,t){const n=dc.nextMessageId++,r=new Gn;return dc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:zn(),apiVersionTag:t,args:[],data:e}}const Xc="v1";function Yc(e){if(!oo(e)&&zr(ur),!oo(e)&&!eu())throw mn;e?Es(tr(Xc,"log.request"),"log.request",()=>{const t=e();Ic(tr(Xc,"log.receive"),"log.receive",[t])}):Is("log.request")}function eu(){return!(!zr(ur)||!ur.supports.logs)}var tu,nu,ru;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(tu||(tu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(nu||(nu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(ru||(ru={}));const ou="v1";function iu(e,t){zr(ur),Ic(tr(ou,"uploadCustomApp"),"uploadCustomApp",[e],t||Sn())}function au(e,t,n){zr(ur),Ic(tr(ou,"sendCustomMessage"),e,t,n)}function su(e,t){if(zr(ur),!qs())throw new Error("The child window has not yet been initialized or is not present");Xs(e,t)}function cu(e,t){zr(ur),Es(tr(ou,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function uu(e,t){zr(ur),Es(tr(ou,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function lu(e){zr(ur,ln.content,ln.sidePanel,ln.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];Ic(tr(ou,"openFilePreview"),"openFilePreview",t)}const du="v1";function fu(e){return new Promise(t=>{if(zr(ur,ln.content),!hu())throw mn;const n=hc(tr(du,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Es(tr(du,"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&&Es(tr(du,"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 pu(){if(zr(ur,ln.content),!hu())throw mn;Ic(tr(du,"conversations.closeConversation"),"conversations.closeConversation"),Is("startConversation"),Is("closeConversation")}function gu(){return new Promise(e=>{if(zr(ur),!hu())throw mn;e(gc(tr(du,"conversations.getChatMember"),"getChatMembers"))})}function hu(){return!(!zr(ur)||!ur.supports.conversations)}var mu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 vu="v2",wu=er("copilot");function Cu(){var e;return zr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function yu(e,t){var n;return void 0===t&&(t=null!==(n=zn())&&void 0!==n?n:Date.now()),mu(this,void 0,void 0,function*(){return zr(ur),wu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Sc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],tr(vu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Su=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 bu="v2",Au=er("copilot");function Eu(){var e,t;return zr(ur)&&(!!(null===(e=ur.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=ur.supports.copilot)||void 0===t?void 0:t.eligibility))}function Iu(e){var t,n,r;return Su(this,void 0,void 0,function*(){if(zr(ur),!Eu())throw new Error(`Error code: ${mn.errorCode}, message: Not supported on platform`);if((null===(t=ur.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Au("Eligibility information is already available on runtime."),ur.hostVersionsInfo.appEligibilityInformation;Au("Eligibility information is not available on runtime. Requesting from host.");const o=yield gc(tr(bu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(qe(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!Pu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=Be.NotAdult),o})}function Pu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var Tu,Ou,Ru,Fu,ku,Mu,xu,Nu,Du;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Tu||(Tu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Ou||(Ou={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Ru||(Ru={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Fu||(Fu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(ku||(ku={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Mu||(Mu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(xu||(xu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Nu||(Nu={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Du||(Du={}));class Uu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Lu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Hu="v2";function _u(){var e;return zr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.sidePanel)}function Vu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Du).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||qe(e)}function Bu(e){return Lu(this,void 0,void 0,function*(){zr(ur);return yc("copilot.sidePanel.getContent",e?[new Gu(e)]:[],new qu,tr(Hu,"copilot.sidePanel.getContent"),Vu)})}function ju(e){return Lu(this,void 0,void 0,function*(){zr(ur);return yc("copilot.sidePanel.preCheckUserConsent",e?[new Ju(e)]:[],new $u,tr(Hu,"copilot.sidePanel.preCheckUserConsent"),Vu)})}function Wu(e){Ts(tr(Hu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[ln.content],()=>{if(!_u())throw zu})}const zu=new Uu(Du.NotSupportedOnPlatform,"This API is not supported on the current platform.");class qu extends Gi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class $u extends Gi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Gu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class Ju{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var Ku=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Qu="v2";function Zu(){var e;return zr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.view)}function Xu(){return Ku(this,void 0,void 0,function*(){zr(ur),yield yc("copilot.view.closeSidePanel",[],new Yu,tr(Qu,"copilot.view.closeSidePanel"))})}class Yu extends Gi{validate(e){return!0}deserialize(e){return e}}const el="v2";class tl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function nl(e){const t=e;return t.responseType===il.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const rl="Action.Execute";var ol,il,al,sl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(ol||(ol={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(il||(il={}));class cl extends Gi{validate(e){return nl(e)}deserialize(e){return e}}function ul(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(al).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function ll(e){e.requestType===ol.ActionExecuteInvokeRequest?dl(e):e.requestType===ol.QueryMessageExtensionRequest&&fl(e)}function dl(e){if(e.type!==rl){throw{errorCode:al.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${rl}"`}}if(!qn(e.data)){throw{errorCode:al.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function fl(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 pl(e,t,n){if(zr(ur,ln.content),!Al())throw mn;const r=new ro(e);return ll(n),wc(tr(el,"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 gl(e,t){if(zr(ur,ln.content),!Al())throw mn;const n=new ro(e);return wc(tr(el,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function hl(e,t,n){if(zr(ur,ln.content),!Al())throw mn;const r=new ro(e);return ll(n),wc(tr(el,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function ml(e,t,n){if(zr(ur,ln.content),!Al())throw mn;return Un(e,new Error("titleId is Invalid.")),Un(t,new Error("oauthConfigId is Invalid.")),wc(tr(el,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function vl(e,t,n){if(zr(ur,ln.content),!Al())throw mn;return Un(e,new Error("titleId is Invalid.")),t&&Ln(t),wc(tr(el,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then(([e,t])=>{if(!e)throw t})}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(al||(al={}));class wl{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function Cl(e){if(zr(ur,ln.content),!Al())throw mn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Sc("externalAppAuthentication.authenticateWithConnector",[new wl(e)],tr(el,"externalAppAuthentication.authenticateWithConnector"),ul)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(sl||(sl={}));class yl extends Gi{validate(e){return"string"==typeof e&&e in sl}deserialize(e){return e}}function Sl(e){if(zr(ur,ln.content),!Al())throw mn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),yc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new wl(e)],new yl,tr(el,"externalAppAuthentication.getUserAuthenticationStateForConnector"),ul)}function bl(e){if(zr(ur,ln.content),!Al())throw mn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Sc("externalAppAuthentication.disconnectConnector",[new wl(e)],tr(el,"externalAppAuthentication.disconnectConnector"),ul)}function Al(){return!(!zr(ur)||!ur.supports.externalAppAuthentication)}var El=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Il="v2";function Pl(e,t,n){return El(this,void 0,void 0,function*(){if(zr(ur,ln.content),!Fl())throw mn;return kl(e,t),Sc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],tr(Il,"externalAppAuthenticationForCEA.authenticateWithSSO"),ul)})}function Tl(e,t,n){return El(this,void 0,void 0,function*(){if(zr(ur,ln.content),!Fl())throw mn;return kl(e,t),Sc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],tr(Il,"externalAppAuthenticationForCEA.authenticateWithOauth"),ul)})}function Ol(e,t,n,r){return El(this,void 0,void 0,function*(){if(zr(ur,ln.content),!Fl())throw mn;return kl(e,t),dl(r),yc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new tl(r),n.url.href,n.width,n.height,n.isExternal],new cl,tr(Il,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),ul)})}function Rl(e,t,n,r){return El(this,void 0,void 0,function*(){if(zr(ur,ln.content),!Fl())throw mn;return kl(e,t),dl(r),yc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new tl(r),n.authId,n.connectionName,n.claims,n.silent],new cl,tr(Il,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),ul)})}function Fl(){return!(!zr(ur)||!ur.supports.externalAppAuthenticationForCEA)}function kl(e,t){Un(t,new Error("conversation id is not valid.")),to(e)}const Ml="v2";var xl,Nl;function Dl(e,t){if(zr(ur,ln.content),!Ll())throw mn;const n=new ro(e);return wc(tr(Ml,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Ul(e,t,n){if(zr(ur,ln.content),!Ll())throw mn;const r=new ro(e);return wc(tr(Ml,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Ll(){return!(!zr(ur)||!ur.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(xl||(xl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Nl||(Nl={}));var Hl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const _l="v2";function Vl(e,t,n){return Hl(this,void 0,void 0,function*(){if(zr(ur,ln.content),!jl())throw mn;kl(e,t);const[r,o]=yield wc(tr(_l,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function Bl(e,t,n){return Hl(this,void 0,void 0,function*(){if(zr(ur,ln.content),!jl())throw mn;kl(e,t);const r=yield gc(tr(_l,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function jl(){return!(!zr(ur)||!ur.supports.externalAppCardActionsForCEA)}var Wl;function zl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Wl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Wl||(Wl={}));var ql=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const $l="v2";function Gl(e,t,n){return ql(this,void 0,void 0,function*(){if(zr(ur,ln.content),!Jl())throw mn;return Kl(e,n),Sc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Ql(t),n],tr($l,"externalAppCardActionsForDA.processActionOpenUrlDialog"),zl)})}function Jl(){return!(!zr(ur)||!ur.supports.externalAppCardActionsForDA)}function Kl(e,t){to(e),Jn(t)}class Ql{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Zl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Xl="v2";function Yl(e,t,n){return Zl(this,void 0,void 0,function*(){if(zr(ur,ln.content),!ed())throw mn;const r=new ro(e),[o,i]=yield wc(tr(Xl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function ed(){return!(!zr(ur)||!ur.supports.externalAppCommands)}const td="v1";var nd,rd,od,id,ad,sd;function cd(e,t){if(zr(ur,ln.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");Ic(tr(td,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function ud(e,t){if(zr(ur,ln.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");Ic(tr(td,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function ld(e,t,n){if(zr(ur,ln.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");Ic(tr(td,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function dd(e,t,n){if(zr(ur,ln.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");Ic(tr(td,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function fd(e,t,n){if(zr(ur,ln.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");Ic(tr(td,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function pd(e=!1,t){if(zr(ur,ln.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ic(tr(td,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function gd(e,t,n,r,o=!1,i){if(zr(ur,ln.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");Ic(tr(td,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function hd(e){if(zr(ur,ln.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ic(tr(td,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function md(e=void 0,t){if(zr(ur,ln.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ic(tr(td,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function vd(e){if(zr(ur,ln.content),!e)throw Pd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ic(tr(td,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function wd(e,t){if(zr(ur,ln.content),!t)throw Pd(Le.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Pd(Le.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Ic(tr(td,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Cd(e,t){if(zr(ur,ln.content),!t)throw Pd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Pd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ic(tr(td,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function yd(e,t){if(zr(ur,ln.content),!t)throw Pd(Le.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Pd(Le.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ic(tr(td,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Sd(e,t){if(zr(ur,ln.content),!t)throw Pd(Le.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Pd(Le.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ic(tr(td,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function bd(e,t){if(zr(ur,ln.content),!t)throw Pd(Le.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Pd(Le.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ic(tr(td,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Ad(e,t){if(zr(ur,ln.content),!t)throw Pd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Pd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Pd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Ic(tr(td,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Ed(e){if(zr(ur),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Es(tr(td,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Id(e){if(zr(ur),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Es(tr(td,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Pd(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(nd||(nd={})),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"}(rd||(rd={})),function(e){e.ClassMaterials="classMaterials"}(od||(od={})),function(e){e.Readonly="readonly"}(id||(id={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(ad||(ad={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(sd||(sd={}));const Td="v1";function Od(){return new Promise(e=>{if(zr(ur),!Md())throw mn;e(vc(tr(Td,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function Rd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(zr(ur),!Md())throw mn;t(vc(tr(Td,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Fd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(zr(ur),!Md())throw mn;Es(tr(Td,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{zr(ur),e(t)})}function kd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(zr(ur),!Md())throw mn;Es(tr(Td,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{zr(ur),e(t)})}function Md(){return!(!zr(ur)||!ur.supports.meetingRoom)}function xd(){return!(!zr(ur)||!ur.supports.messageChannels)}const Nd="1.0.1",Dd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Wd("Invalid message format, ignoring. Message: %o",e);if(!Vd(e.source,e.origin))return void Wd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return zd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Wd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Ud=null,Ld=!1;function Hd(e,t,n=!1){if(Ld=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.`);Ud=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Wd("Nested App Auth Bridge is already present");const o=_d(r);o&&(r.nestedAppAuthBridge=o)}function _d(e){const t=new WeakMap,{onMessage:n}=Dd,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 Wd(`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=Bd(t);if(e===e.top||!Ud)return void zd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Ud)}}catch(e){return void zd("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 Vd(e,t){if(t===Ud)try{return"https:"===new URL(t).protocol}catch(e){return zd("Invalid message origin URL:",e),!1}return!1}function Bd(e){const t=Date.now();return{id:jd(),uuid:on(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function jd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Wd(...e){Ld&&console.log(...e)}function zd(...e){Ld&&console.error(...e)}const qd="v1";function $d(e){if(zr(ur,ln.content),!Gd())throw mn;Ic(tr(qd,"notifications.showNotification"),"notifications.showNotification",[e])}function Gd(){return!(!zr(ur)||!ur.supports.notifications)}const Jd="v2";function Kd(e){if(!Xd())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());if(oo(e))throw new Error(Le.INVALID_ARGUMENTS.toString());Es(tr(Jd,"otherApp.install"),"otherApp.install",e)}function Qd(){if(!Xd())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());Ic(tr(Jd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Is("otherApp.install")}function Zd(e){if(!Xd())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());return Sc("otherApp.notifyInstallCompleted",[e.toString()],tr(Jd,"otherApp.notifyInstallCompleted"))}function Xd(){return!(!zr(ur)||!ur.supports.otherAppStateChange)}const Yd="v1";var ef,tf,nf;function rf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Ic(tr(Yd,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function of(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Ic(tr(Yd,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function af(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(zr(ur,ln.sidePanel),!ff())throw mn;Ic(tr(Yd,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function sf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Ic(tr(Yd,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function cf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Es(tr(Yd,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function uf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Es(tr(Yd,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function lf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Es(tr(Yd,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function df(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(zr(ur,ln.sidePanel),!ff())throw mn;Es(tr(Yd,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function ff(){return!(!zr(ur)||!ur.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"}(ef||(ef={})),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"}(tf||(tf={})),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"}(nf||(nf={}));const pf="v1";function gf(e,t,n,r){if(zr(ur,ln.content),!hf())throw mn;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");Ic(tr(pf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function hf(){return!(!zr(ur)||!ur.supports.appEntity)}const mf="v1";function vf(e){return new Promise(t=>{if(zr(ur),!wf())throw mn;if((Kn.hostClientType===cn.android||Kn.hostClientType===cn.teamsRoomsAndroid||Kn.hostClientType===cn.teamsPhones||Kn.hostClientType===cn.teamsDisplays)&&!qr(Ze)){const e={errorCode:Le.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(gc(tr(mf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function wf(){return!(!zr(ur)||!ur.supports.teams)&&(!!ur.supports.teams.fullTrust&&!!ur.supports.teams.fullTrust.joinedTeams)}var Cf=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 yf="v1";function Sf(e){return Cf(this,void 0,void 0,function*(){if(zr(ur),!bf())throw mn;return yc("getConfigSetting",[e],new Ji,tr(yf,"teams.fullTrust.getConfigSetting"))})}function bf(){return!(!zr(ur)||!ur.supports.teams)&&!!ur.supports.teams.fullTrust}const Af="v1";var Ef;function If(e,t){if(zr(ur,ln.content),!Tf())throw mn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ic(tr(Af,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Pf(e,t){if(zr(ur),!Tf())throw mn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ic(tr(Af,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Tf(){return!(!zr(ur)||!ur.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Ef||(Ef={}));class Of{static setTimeout(e,t){const n=performance.now(),r=An();return Of.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Of.setTimeoutCallbacks[e]}static setInterval(e,t){Of.setTimeout(function n(){e(),Of.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Of.setTimeoutCallbacks){const r=Of.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Of.setTimeoutCallbacks[e].callback(),delete Of.setTimeoutCallbacks[e]}}}Of.setTimeoutCallbacks={};class Rf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Of.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&&Of.clearTimeout(this.timeoutId),this.timeoutId=Of.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(Rf.maxSessionTimeoutInMs,2*t.timeoutInMs):Rf.initialSessionTimeoutInMs}}Rf.initialSessionTimeoutInMs=1e3,Rf.maxSessionTimeoutInMs=3e4;const Ff="v2";class kf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Rf(kf.distributionBinSize,e=>this.reportPerformanceEvent(tr(Ff,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Of.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(tr(Ff,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},kf.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){Of.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(tr(Ff,"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(tr(Ff,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}kf.distributionBinSize=1e3,kf.calculateFPSInterval=1e3;var Mf=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})},xf=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 Nf="v2",Df=Dn()?void 0:new kf(Ic);var Uf,Lf,Hf;function _f(e){if(zr(ur,ln.sidePanel),!zf())throw mn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Es(tr(Nf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Df?void 0:Df.setFrameProcessTimeLimit(e.timeLimit),!1),Kf())qf(e.videoFrameHandler,e.config);else{if(!Zf())throw mn;Gf(e.videoBufferHandler,e.config)}null==Df||Df.startMonitorSlowFrameProcessing()}function Vf(e,t){if(zr(ur,ln.sidePanel),!zf())throw mn;Ic(tr(Nf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Bf(e){if(zr(ur,ln.sidePanel),!zf())throw mn;Es(tr(Nf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",up(e,Df),!1),Ic(tr(Nf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function jf(e){Ic(tr(Nf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Wf(e){Ic(tr(Nf,"videoEffects.notifyError"),"video.notifyError",[e])}function zf(){return zr(ur)&&!!ur.supports.video&&(!!ur.supports.video.mediaStream||!!ur.supports.video.sharedFrame)}function qf(e,t){if(zr(ur,ln.sidePanel),!zf()||!Kf())throw mn;Es(tr(Nf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Mf(this,void 0,void 0,function*(){const{streamId:n}=t,r=$f(e,Df);yield ep(n,r,Wf,Df)}),!1),Ic(tr(Nf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function $f(e,t){return n=>Mf(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 Gf(e,t){if(zr(ur,ln.sidePanel),!zf()||!Zf())throw mn;Es(tr(Nf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==Df||Df.reportStartFrameProcessing(t.width,t.height),e(Jf(t),()=>{null==Df||Df.reportFrameProcessed(),jf(n)},Wf)}},!1),Ic(tr(Nf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Jf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=xf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Kf(){var e;return zr(ur,ln.sidePanel)&&Qf()&&!!(null===(e=ur.supports.video)||void 0===e?void 0:e.mediaStream)}function Qf(){var e,t,n,r;return!(!(null===(t=null===(e=Nn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Nn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Zf(){var e;return zr(ur,ln.sidePanel)&&!!(null===(e=ur.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Uf||(Uf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Lf||(Lf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Hf||(Hf={}));var Xf=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Yf="v2";function ep(e,t,n,r){var o,i;return Xf(this,void 0,void 0,function*(){const a=rp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),op(yield np(e,n,r),new ip(n,t),a.writable)})}function tp(e,t,n,r){var o,i;return Xf(this,void 0,void 0,function*(){const a=rp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),op(yield np(e,n,r),new cp(n,t),a.writable)})}function np(e,t,n){return Xf(this,void 0,void 0,function*(){if(Dn())throw mn;const r=Nn().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 rp(){if(Dn())throw mn;const e=window.MediaStreamTrackGenerator;if(!e)throw mn;return new e({kind:"video"})}function op(e,t,n){new(0,Nn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class ip{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Xf(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 ap{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 sp{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 cp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Xf(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=>Xf(this,void 0,void 0,function*(){if(Dn())throw mn;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 ap(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 sp(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}}}),Es(tr(Yf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function up(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Ic(tr(Yf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in Hf?e:Hf.InitializationFailure;Ic(tr(Yf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var lp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const dp="v2",fp=2e3,pp=Dn()?void 0:new kf(Ic);var gp;function hp(e){var t,n;if(!bp())throw mn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(zr(ur,ln.sidePanel)){if(Es(tr(dp,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==pp?void 0:pp.setFrameProcessTimeLimit(e),!1),null===(t=ur.supports.video)||void 0===t?void 0:t.mediaStream)Es(tr(dp,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>lp(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=pp?vp(e.videoFrameHandler,pp):e.videoFrameHandler;r?yield tp(n,o,Ep,pp):yield ep(n,o,Ep,pp)}),!1),Ic(tr(dp,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=ur.supports.video)||void 0===n?void 0:n.sharedFrame))throw mn;Es(tr(dp,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==pp||pp.reportStartFrameProcessing(t.width,t.height);const n=mp(),r=t.timestamp;e.videoBufferHandler(wp(t),()=>{n(),null==pp||pp.reportFrameProcessed(),Ap(r)},Ep)}},!1),Ic(tr(dp,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==pp||pp.startMonitorSlowFrameProcessing()}}function mp(){const e=setTimeout(()=>{Ep(`Frame not processed in ${fp}ms`,gp.Warn)},fp);return function(){clearTimeout(e)}}function vp(e,t){return n=>lp(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=mp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function wp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Cp(e,t,n){if(zr(ur,ln.sidePanel),!bp())throw mn;Ic(tr(dp,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function yp(e){if(zr(ur,ln.sidePanel),!bp())throw mn;Es(tr(dp,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",up(e,pp),!1),Ic(tr(dp,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Sp(e){if(zr(ur,ln.sidePanel),!zf())throw mn;Ic(tr(dp,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function bp(){return zr(ur),zf()}function Ap(e){Ic(tr(dp,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Ep(e,t=gp.Warn){Ic(tr(dp,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Ip(e){if(zr(ur),!zf())throw mn;Ep(e,gp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(gp||(gp={}));const Pp="v2";class Tp extends Gi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Op{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Rp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Fp extends Gi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class kp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Mp extends Gi{validate(e){const t=new Fp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function xp(e,t){if(zr(ur),!Hp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(_p(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return yc("hostEntity.tab.addAndConfigure",[new Rp(e),t],new Fp,tr(Pp,"hostEntity.tab.addAndConfigure"))}function Np(e){if(zr(ur),!Hp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return _p(e.threadId),yc("hostEntity.tab.getAll",[new Rp(e)],new Mp,tr(Pp,"hostEntity.tab.getAll"))}function Dp(e,t){if(zr(ur),!Hp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Vp(e),_p(t.threadId),yc("hostEntity.tab.reconfigure",[new Op(e),new Rp(t)],new Tp,tr(Pp,"hostEntity.tab.reconfigure"))}function Up(e,t){if(zr(ur),!Hp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Vp(e),_p(t.threadId),yc("hostEntity.tab.rename",[new Op(e),new Rp(t)],new Tp,tr(Pp,"hostEntity.tab.rename"))}function Lp(e,t){if(zr(ur),!Hp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return _p(t.threadId),Vp(e),yc("hostEntity.tab.remove",[new kp(e),new Rp(t)],new Ji,tr(Pp,"hostEntity.tab.remove"))}function Hp(){var e;return!!(zr(ur)&&jp()&&(null===(e=ur.supports.hostEntity)||void 0===e?void 0:e.tab))}function _p(e){if(!e||0==e.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Vp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Bp;function jp(){return!(!zr(ur)||!ur.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Bp||(Bp={}));var Wp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 zp="v2",qp="Invalid store dialog size",$p="No App Id present, but AppId needed to open AppDetail store",Gp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Jp(e){return Wp(this,void 0,void 0,function*(){Yp();const{size:t}=null!=e?e:{};return Sc("store.openFullStore",[eg(t)],tr(zp,"store.openFullStore"))})}function Kp(e){return Wp(this,void 0,void 0,function*(){Yp();const{size:t,appId:n}=e;if(!(n instanceof ro))throw new Error($p);return Sc("store.openAppDetail",[eg(t),n],tr(zp,"store.openAppDetail"))})}function Qp(e){return Wp(this,void 0,void 0,function*(){Yp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Sc("store.openInContextStore",[eg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],tr(zp,"store.openInContextStore"))})}function Zp(e){return Wp(this,void 0,void 0,function*(){Yp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Gp);return Sc("store.openSpecificStore",[eg(t),n],tr(zp,"store.openSpecificStore"))})}function Xp(){return zr(ur)&&!!ur.supports.store}function Yp(){if(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Xp())throw mn}function eg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(qp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(qp);return JSON.stringify(e)}var tg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 ng="v1",rg=er("widgetHosting");function og(){return zr(ur)&&!!ur.supports.widgetHosting}function ig(e,t){return tg(this,void 0,void 0,function*(){return Wr(),rg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),yc("widgetHosting.callTool",[new mg(e,t)],new gg,tr(ng,"widgetHosting.callTool"),qe)})}function ag(e,t){return tg(this,void 0,void 0,function*(){return Wr(),rg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Sc("widgetHosting.sendFollowUpMessage",[new vg(e,t)],tr(ng,"widgetHosting.sendFollowUpMessage"))})}function sg(e,t){return tg(this,void 0,void 0,function*(){return Wr(),rg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Sc("widgetHosting.requestDisplayMode",[new wg(e,t)],tr(ng,"widgetHosting.requestDisplayMode"))})}function cg(e,t){return tg(this,void 0,void 0,function*(){return Wr(),rg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),yc("widgetHosting.requestModal",[new bg(e,t)],new hg,tr(ng,"widgetHosting.requestModal"),qe)})}function ug(e,t){Wr(),rg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Sc("widgetHosting.notifyIntrinsicHeight",[new Sg(e,t)],tr(ng,"widgetHosting.notifyIntrinsicHeight"))}function lg(e,t,n){Wr(),rg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Sc("widgetHosting.contentSizeChanged",[new Ag(e,t,n)],tr(ng,"widgetHosting.contentSizeChanged"))}function dg(e,t){return tg(this,void 0,void 0,function*(){return Wr(),rg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Sc("widgetHosting.setWidgetState",[new yg(e,t)],tr(ng,"widgetHosting.setWidgetState"))})}function fg(e,t){Wr(),rg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Sc("widgetHosting.openExternal",[new Cg(e,t)],tr(ng,"widgetHosting.openExternal"))}function pg(e){Ts(tr(ng,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!og())throw new Error("Widget Hosting is not supported on this platform")})}class gg extends Gi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class hg extends Gi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class mg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class vg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class wg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Cg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class yg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Sg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class bg{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Ag{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Eg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Ig="v1",Pg="v2";let Tg;function Og(e){Tg=e}function Rg(e){const t=void 0!==e,n=t?e:Tg;if(!n)throw new Error("No parameters are provided for authentication");zr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage);return Fg(n.successCallback||n.failureCallback?tr(Ig,"authentication.authenticate"):tr(Pg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Tg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Tg=void 0)}})}function Fg(e,t){return Eg(this,void 0,void 0,function*(){const n=Hn(t.url);return Ln(n),wc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function kg(e){Wr();return Mg(e&&(e.successCallback||e.failureCallback)?tr(Ig,"authentication.getAuthToken"):tr(Pg,"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 Mg(e,t){return new Promise(n=>{n(wc(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 xg(e){Wr();return Ng(e&&(e.successCallback||e.failureCallback)?tr(Ig,"authentication.getUser"):tr(Pg,"authentication.getUser")).then(t=>e&&e.successCallback?(e.successCallback(t),null):t).catch(t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)})}function Ng(e){return new Promise(t=>{t(wc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function Dg(e,t){zr(ur,ln.authentication);Ic(tr(t?Ig:Pg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Kc(lc.parentWindow,()=>setTimeout(()=>lc.currentWindow.close(),200))}function Ug(e,t){zr(ur,ln.authentication);Ic(tr(t?Ig:Pg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Kc(lc.parentWindow,()=>setTimeout(()=>lc.currentWindow.close(),200))}var Lg;function Hg(){return zr(ur)&&!!ur.supports.appPerformanceMetrics}function _g(e){zr(ur),Es(tr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function Vg(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"}(Lg||(Lg={}));class Bg{constructor(e){this.val=e,Vg(e)}toString(){return this.val}}const jg="/l/app/",Wg="/l/meeting/new",zg="attendees",qg="startTime",$g="endTime",Gg="subject",Jg="content",Kg="/l/call/0/0",Qg="source",Zg="withVideo",Xg="/l/chat/0/0",Yg="users",eh="topicName",th="message";function nh(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Yg}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${eh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${th}=${encodeURIComponent(n)}`;return`${st}://${ct}${Xg}?${r}${o}${i}`}function rh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Yg}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${Zg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Qg}=${encodeURIComponent(n)}`;return`${st}://${ct}${Kg}?${r}${o}${i}`}function oh(e,t,n,r,o){const i=void 0===e?"":`${zg}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${qg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${$g}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Gg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Jg}=${encodeURIComponent(o)}`;return`${st}://${ct}${Wg}?${i}${a}${s}${c}${u}`}function ih(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${st}://${ct}${jg}${encodeURIComponent(e)}`}const ah="v1";function sh(e){return new Promise(t=>{if(zr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!ch())throw new Error("Not supported");const n=tr(ah,"appInstallDialog.openAppInstallDialog");ur.isLegacyTeams?t(hc(n,"executeDeepLink",ih(e.appId))):(Ic(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function ch(){return!(!zr(ur)||!ur.supports.appInstallDialog)}const uh="v1",lh=er("media");var dh,fh,ph,gh,hh,mh,vh;!function(e){e.Base64="base64",e.ID="id"}(dh||(dh={}));class wh{}function Ch(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(zr(ur,ln.content,ln.task),!Kn.isFramelessWindow){return void e({errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},[])}if(!qr(et)){return void e({errorCode:Le.OLD_PLATFORM},[])}Ic(tr(uh,"media.captureImage"),"captureImage",e)}function yh(){if(zr(ur,ln.content,ln.task),!bh())throw mn;const e=He.Media;return new Promise(t=>{t(vc(tr(uh,"media.hasPermission"),"permissions.has",e))})}function Sh(){if(zr(ur,ln.content,ln.task),!bh())throw mn;const e=He.Media;return new Promise(t=>{t(vc(tr(uh,"media.requestPermission"),"permissions.request",e))})}function bh(){return!(!zr(ur)||!ur.supports.permissions)}class Ah extends wh{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(zr(ur,ln.content,ln.task),!qr(tt)){return void e({errorCode:Le.OLD_PLATFORM},new Blob)}if(!Lh(this.mimeType,this.format,this.content)){return void e({errorCode:Le.INVALID_ARGUMENTS},new Blob)}qr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Ic(tr(uh,"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=Rh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Fh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):lh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Le.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=An(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!oo(e)&&Ic(tr(uh,"media.getMedia"),"getMedia",r),Es(tr(uh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Is("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Rh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Is("getMedia"+t)}else{const e=Fh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Le.INTERNAL_ERROR,message:"data received is null"},new Blob),Is("getMedia"+t)}})}}class Eh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){zr(ur,ln.content,ln.task);try{Gr(Ke)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Ic(tr(uh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(fh.StopRecording,e)}}class Ih extends Eh{getMediaType(){return hh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case fh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Ph(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(zr(ur,ln.content,ln.task),!qr(tt)){const e={errorCode:Le.OLD_PLATFORM};return void t(e,[])}try{kh(e)}catch(e){return void t(e,[])}if(!xh(e)){const e={errorCode:Le.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Ic(tr(uh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(Mh(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 Ah(e));t(n,s)})}function Th(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(zr(ur,ln.content,ln.task),!qr(tt)){return void t({errorCode:Le.OLD_PLATFORM})}if(!Hh(e)){return void t({errorCode:Le.INVALID_ARGUMENTS})}const n=[e];Ic(tr(uh,"media.viewImages"),"viewImages",n,t)}function Oh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(zr(ur,ln.content,ln.task),Kn.hostClientType===cn.desktop||Kn.hostClientType===cn.web||Kn.hostClientType===cn.rigel||Kn.hostClientType===cn.teamsRoomsWindows||Kn.hostClientType===cn.teamsRoomsAndroid||Kn.hostClientType===cn.teamsPhones||Kn.hostClientType===cn.teamsDisplays){return void e({errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},"")}if(!qr(nt)){return void e({errorCode:Le.OLD_PLATFORM},"")}if(!_h(t)){return void e({errorCode:Le.INVALID_ARGUMENTS},"")}Ic(tr(uh,"media.scanBarCode"),"media.scanBarCode",[t],e)}function Rh(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 Fh(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 kh(e){Dh(e)?Gr(Je):Uh(e)?Gr(Ke):Nh(e)&&Gr(Qe)}function Mh(e){return!(e.mediaType!=hh.Video||!e.videoProps||!e.videoProps.videoController)}function xh(e){return!(null==e||e.maxMediaCount>10)}function Nh(e){var t;return!((null==e?void 0:e.mediaType)!=hh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Dh(e){return!(!e||e.mediaType!=hh.VideoAndImage&&!e.videoAndImageProps)}function Uh(e){return!(!e||e.mediaType!=hh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Lh(e,t,n){return null!=e&&null!=t&&t==dh.ID&&null!=n}function Hh(e){return!(null==e||e.length<=0||e.length>10)}function _h(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Vh(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"}(fh||(fh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(ph||(ph={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(gh||(gh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(hh||(hh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(mh||(mh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(vh||(vh={}));const Bh="v2";function jh(e){return new Promise(t=>{if(zr(ur,ln.content,ln.task),!qh())throw mn;if(!_h(e))throw{errorCode:Le.INVALID_ARGUMENTS};t(vc(tr(Bh,"barCode.scanBarCode"),"media.scanBarCode",e))})}function Wh(){if(zr(ur,ln.content,ln.task),!qh())throw mn;const e=He.Media;return new Promise(t=>{t(vc(tr(Bh,"barCode.hasPermission"),"permissions.has",e))})}function zh(){if(zr(ur,ln.content,ln.task),!qh())throw mn;const e=He.Media;return new Promise(t=>{t(vc(tr(Bh,"barCode.requestPermission"),"permissions.request",e))})}function qh(){return!!(zr(ur)&&ur.supports.barCode&&ur.supports.permissions)}const $h="v2";function Gh(e){return Jh(tr($h,"chat.openChat"),e)}function Jh(e,t){return new Promise(n=>{if(zr(ur,ln.content,ln.task),!Qh())throw mn;if(ur.isLegacyTeams)n(hc(e,"executeDeepLink",nh([t.user],void 0,t.message)));else{n(hc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function Kh(e){const t=tr($h,"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(Jh(t,r))}else{if(zr(ur,ln.content,ln.task),!Qh())throw mn;if(ur.isLegacyTeams)n(hc(t,"executeDeepLink",nh(e.users,e.topic,e.message)));else{n(hc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function Qh(){return!(!zr(ur)||!ur.supports.chat)}var Zh=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Xh="v2";function Yh(e){return Zh(this,void 0,void 0,function*(){if(zr(ur,ln.content,ln.meetingStage,ln.task,ln.settings,ln.stage,ln.sidePanel),!tm())throw mn;if(!e.type||!Object.values(We).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(We)}`);const t=yield xn(e),n={mimeType:e.type,content:t};return vc(tr(Xh,"clipboard.write"),"clipboard.writeToClipboard",n)})}function em(){return Zh(this,void 0,void 0,function*(){zr(ur,ln.content,ln.meetingStage,ln.task,ln.settings,ln.stage,ln.sidePanel);const e=tr(Xh,"clipboard.read");if(!tm())throw mn;const t=yield vc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Mn(e.mimeType,e.content)}return t})}function tm(){return Kn.isFramelessWindow?!(!zr(ur)||!ur.supports.clipboard):!!(zr(ur)&&navigator&&navigator.clipboard&&ur.supports.clipboard)}var nm=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 rm="v2",om={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var im;function am(){var e;return null!==(e=zr(ur)&&(ur.isNAAChannelRecommended||dm()))&&void 0!==e&&e}function sm(){return zr(ur),lc.parentOrigin}function cm(){var e;return null!==(e=zr(ur)&&ur.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function um(){var e;return null!==(e=zr(ur)&&(ur.isDeeplyNestedAuthSupported||lm()))&&void 0!==e&&e}function lm(){return!!(zr(ur)&&fm()&&ur.isLegacyTeams&&qr(mr))}function dm(){return!!(zr(ur)&&fm()&&ur.isLegacyTeams&&ur.supports.nestedAppAuth)}function fm(){return Kn.hostClientType===cn.android||Kn.hostClientType===cn.ios||Kn.hostClientType===cn.ipados||Kn.hostClientType===cn.visionOS}function pm(e){return nm(this,void 0,void 0,function*(){if(!cm())throw mn;const t=e.map(mm);return hm(im.ADD,t)})}function gm(e){return nm(this,void 0,void 0,function*(){if(!cm())throw mn;const t=e.map(mm);return hm(im.DELETE,t)})}function hm(e,t){return nm(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 yc("nestedAppAuth.manageNAATrustedOrigins",[new vm(e,t)],om,tr(rm,"nestedAppAuth.manageNAATrustedOrigins"))})}function mm(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"}(im||(im={}));class vm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const wm="v2";function Cm(){if(zr(ur,ln.content,ln.task),!Sm())throw mn;return vc(tr(wm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function ym(e){if(zr(ur,ln.content,ln.task),!Sm())throw mn;if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};return vc(tr(wm,"geoLocation.showLocation"),"location.showLocation",e)}function Sm(){return!!(zr(ur)&&ur.supports.geoLocation&&ur.supports.geoLocation.map&&ur.supports.permissions)}const bm="v2";function Am(){if(zr(ur,ln.content,ln.task),!Pm())throw mn;return vc(tr(bm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Em(){if(zr(ur,ln.content,ln.task),!Pm())throw mn;const e=He.GeoLocation;return new Promise(t=>{t(vc(tr(bm,"geoLocation.hasPermission"),"permissions.has",e))})}function Im(){if(zr(ur,ln.content,ln.task),!Pm())throw mn;const e=He.GeoLocation;return new Promise(t=>{t(vc(tr(bm,"geoLocation.requestPermission"),"permissions.request",e))})}function Pm(){return!!(zr(ur)&&ur.supports.geoLocation&&ur.supports.permissions)}function Tm(){return ur.hostVersionsInfo?ur.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Om="v1";class Rm{postMessage(e,t){zr(ur),Ic(tr(Om,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Sn())}addEventListener(e,t){zr(ur),"message"===e&&Es(tr(Om,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Fm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){zr(ur,ln.task),Ic(tr(Om,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Sn())}addEventListener(e,t){zr(ur,ln.task),"message"===e&&Es(tr(Om,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const km="v2";function Mm(e){if(zr(ur,ln.content),!xm())throw mn;if(!e||!kn(e))throw{errorCode:Le.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return vc(tr(km,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function xm(){return!(!zr(ur)||!ur.supports.secondaryBrowser)}const Nm="v1";function Dm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(zr(ur,ln.content,ln.task),!qr(Xe))throw{errorCode:Le.OLD_PLATFORM};if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};if(!Lm())throw mn;Ic(tr(Nm,"location.getLocation"),"location.getLocation",[e],t)}function Um(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(zr(ur,ln.content,ln.task),!qr(Xe))throw{errorCode:Le.OLD_PLATFORM};if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};if(!Lm())throw mn;Ic(tr(Nm,"location.showLocation"),"location.showLocation",[e],t)}function Lm(){return!(!zr(ur)||!ur.supports.location)}const Hm="v1";function _m(e){zr(ur,ln.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ic(tr(Hm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Vm=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Bm="v1";var jm,Wm,zm,qm,$m,Gm;function Jm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Km(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Qm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage,ln.settings,ln.content),Ic(tr(Bm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Zm(){var e,t,n;return Vm(this,void 0,void 0,function*(){let r;zr(ur,ln.sidePanel,ln.meetingStage,ln.settings,ln.content);try{const e=!0;r=yield vc(tr("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)==qm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==qm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function Xm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage,ln.task),Ic(tr(Bm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Ym(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");zr(ur,ln.sidePanel),Ic(tr(Bm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function ev(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");zr(ur,ln.sidePanel),Ic(tr(Bm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function tv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");zr(ur,ln.sidePanel),Ic(tr(Bm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function nv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");zr(ur,ln.sidePanel),Es(tr(Bm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function rv(e,t,n={sharingProtocol:$m.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function ov(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function iv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function av(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function sv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Es(tr(Bm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function cv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Es(tr(Bm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function uv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");zr(ur,ln.sidePanel,ln.meetingStage),Es(tr(Bm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function lv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));zr(ur);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Gm.Other};return vc(tr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function dv(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");zr(ur,ln.sidePanel,ln.meetingStage),e.isAppHandlingAudio?fv(e,t):pv(e,t)}function fv(e,t){Ic(tr(Bm,"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");Es(tr(Bm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>Vm(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);hv(n,n.isMicMuted===t.isMicMuted?jm.HostInitiated:jm.AppDeclinedToChange)}catch(e){hv(t,jm.AppFailedToChange)}}));Es(tr(Bm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function pv(e,t){Ic(tr(Bm,"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");Ps("meeting.micStateChanged")&&Is("meeting.micStateChanged"),Ps("meeting.audioDeviceSelectionChanged")&&Is("meeting.audioDeviceSelectionChanged"),t(n)})}function gv(e){hv(e,jm.AppInitiated)}function hv(e,t){zr(ur,ln.sidePanel,ln.meetingStage),Ic(tr(Bm,"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"}(jm||(jm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Wm||(Wm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(zm||(zm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(qm||(qm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}($m||($m={})),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"}(Gm||(Gm={}));const mv="v1",vv="v2";function wv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=tr(mv,"monetization.openPurchaseExperience")):(r=e,o=tr(vv,"monetization.openPurchaseExperience"));return zr(ur,ln.content),Tn(()=>new Promise(e=>{if(!Cv())throw mn;e(vc(o,"monetization.openPurchaseExperience",r))}),n)}function Cv(){return!(!zr(ur)||!ur.supports.monetization)}const yv="v2";function Sv(e){return new Promise(t=>{if(zr(ur,ln.content),!Av())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(hc(tr(yv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function bv(e){return new Promise(t=>{if(zr(ur,ln.content),!Av())throw new Error("Not supported");const n=tr(yv,"calendar.composeMeeting");ur.isLegacyTeams?t(hc(n,"executeDeepLink",oh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(hc(n,"calendar.composeMeeting",e))})}function Av(){return!(!zr(ur)||!ur.supports.calendar)}const Ev="v2";function Iv(e){e&&0!==e.length&&e.forEach(e=>{Vg(e)})}function Pv(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===Nv.New&&(Iv(t.toRecipients),Iv(t.ccRecipients),Iv(t.bccRecipients))}function Tv(e){if(zr(ur,ln.content),!Ov())throw new Error("Not supported");return Pv(e),Sc("mail.handoff.composeMail",[new Rv(e)],tr(Ev,"mail.handoff.composeMail"))}function Ov(){return!!(zr(ur)&&ur.supports.mail&&ur.supports.mail.handoff)}class Rv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Fv="v2";function kv(e){return new Promise(t=>{if(zr(ur,ln.content),!xv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(hc(tr(Fv,"mail.openMailItem"),"mail.openMailItem",e))})}function Mv(e){return new Promise(t=>{if(zr(ur,ln.content),!xv())throw new Error("Not supported");t(hc(tr(Fv,"mail.composeMail"),"mail.composeMail",e))})}function xv(){return!(!zr(ur)||!ur.supports.mail)}var Nv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Nv||(Nv={}));const Dv="v2";function Uv(){if(!Kn.printCapabilityEnabled){if(zr(ur),!jv())throw mn;Kn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Lv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Lv(){Nn().print()}function Hv(e){_v(tr(Dv,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!oo(e)&&!jv())throw mn})}function _v(e,t,n){!oo(t)&&zr(ur),!oo(t)&&n&&n(),Ns(e,t)}function Vv(e){Bv(tr(Dv,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!oo(e)&&!jv())throw mn})}function Bv(e,t,n){!oo(t)&&zr(ur),!oo(t)&&n&&n(),Ls(e,t)}function jv(){return!(!zr(ur)||!ur.supports.teamsCore)}const Wv="v1",zv="v2";function qv(e,t){let n,r;zr(ur,ln.content,ln.task,ln.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=tr(Wv,"people.selectPeople")):(r=e,o=tr(zv,"people.selectPeople")),In($v,n,o,r)}function $v(e,t){return new Promise(n=>{if(!qr(Ye))throw{errorCode:Le.OLD_PLATFORM};if(!Vh(t))throw{errorCode:Le.INVALID_ARGUMENTS};if(!Gv())throw mn;n(vc(e,"people.selectPeople",t))})}function Gv(){return!(!zr(ur)||!ur.supports.people)}function Jv(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?Kv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Kv(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 Qv="v2";function Zv(e){return zr(ur,ln.content),new Promise(t=>{const[n,r]=Jv(e);if(!n)throw{errorCode:Le.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(vc(tr(Qv,"profile.showProfile"),"profile.showProfile",o))})}function Xv(){return!(!zr(ur)||!ur.supports.profile)}const Yv="v2",ew="search.queryChange",tw="search.queryClose",nw="search.queryExecute";function rw(e,t,n){if(zr(ur,ln.content),!iw())throw mn;Es(tr(Yv,"search.registerOnClosedHandler"),tw,e),Es(tr(Yv,"search.registerOnExecutedHandler"),nw,t),n&&Es(tr(Yv,"search.registerOnChangeHandler"),ew,n)}function ow(){if(zr(ur,ln.content),!iw())throw mn;Ic(tr(Yv,"search.unregisterHandlers"),"search.unregister"),Is(ew),Is(tw),Is(nw)}function iw(){return!(!zr(ur)||!ur.supports.search)}function aw(){return new Promise(e=>{if(zr(ur,ln.content),!iw())throw new Error("Not supported");e(hc(tr(Yv,"search.closeSearch"),"search.closeSearch"))})}var sw=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const cw="v2";function uw(){return sw(this,void 0,void 0,function*(){if(zr(ur,ln.sidePanel,ln.meetingStage),!lw())throw mn;return yield vc(tr(cw,"sharing.history.getContent"),"sharing.history.getContent")})}function lw(){var e;return zr(ur)&&void 0!==(null===(e=ur.supports.sharing)||void 0===e?void 0:e.history)}const dw="v1",fw="v2",pw={shareWebContent:"sharing.shareWebContent"};function gw(e,t){try{mw(e),vw(e),ww(e)}catch(e){return Pn(()=>Promise.reject(e),t)}zr(ur,ln.content,ln.sidePanel,ln.task,ln.stage,ln.meetingStage);return Pn(hw,t,tr(t?dw:fw,"sharing.shareWebContent"),e)}function hw(e,t){return new Promise(n=>{if(!Cw())throw mn;n(vc(e,pw.shareWebContent,t))})}function mw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Le.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function vw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function ww(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some(e=>!e.url))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Cw(){return!(!zr(ur)||!ur.supports.sharing)}const yw="v2";function Sw(){return new Promise(e=>{if(zr(ur,ln.content),!bw())throw mn;e(vc(tr(yw,"stageView.self.close"),"stageView.self.close"))})}function bw(){var e;return zr(ur)&&void 0!==(null===(e=ur.supports.stageView)||void 0===e?void 0:e.self)}const Aw="v2";var Ew;function Iw(e){return new Promise(t=>{if(zr(ur,ln.content),!Pw())throw mn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(vc(tr(Aw,"stageView.open"),"stageView.open",e))})}function Pw(){return!(!zr(ur)||!ur.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Ew||(Ew={}));const Tw=10;var Ow=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Rw="v2";function Fw(e){return Ow(this,void 0,void 0,function*(){zr(ur,ln.content,ln.task),xw(),Nw(e);const t=yield vc(tr(Rw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Dw(e.maxVisualMediaCount,t),t})}function kw(e){return Ow(this,void 0,void 0,function*(){zr(ur,ln.content,ln.task),xw(),Nw(e);const t=yield vc(tr(Rw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Dw(e.maxVisualMediaCount,t),t})}function Mw(){return!!(zr(ur)&&ur.supports.visualMedia&&ur.supports.visualMedia.image&&ur.supports.permissions)}function xw(){if(!Mw())throw mn}function Nw(e){if(!e||e.maxVisualMediaCount>Tw||e.maxVisualMediaCount<1)throw Cn}function Dw(e,t){if(t.length>e)throw yn}const Uw="v2";var Lw,Hw;function _w(){if(zr(ur,ln.content,ln.task),!Mw())throw mn;const e=He.Media;return vc(tr(Uw,"visualMedia.hasPermission"),"permissions.has",e)}function Vw(){if(zr(ur,ln.content,ln.task),!Mw())throw mn;const e=He.Media;return vc(tr(Uw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Lw||(Lw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Hw||(Hw={}));var Bw=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 jw=null;function Ww(){return Bw(this,void 0,void 0,function*(){return null===jw&&(jw=(yield Mo()).app.host.name),jw})}var zw=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 qw(){return zw(this,void 0,void 0,function*(){if(zr(ur),!Gw())throw mn;return!(!ur.isLegacyTeams||Kn.hostClientType!==cn.android&&Kn.hostClientType!==cn.ios&&Kn.hostClientType!==cn.ipados&&Kn.hostClientType!==cn.visionOS||(yield $w())!==un.teams)||(yield gc(tr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function $w(){return zw(this,void 0,void 0,function*(){return Ww()})}function Gw(){return zr(ur)&&void 0!==ur.supports.webStorage}const Jw="v2";var Kw;function Qw(e){const t=tr(Jw,"call.startCall");return new Promise(n=>{var r;if(zr(ur,ln.content,ln.task),!Zw())throw mn;if(!ur.isLegacyTeams)return Ic(t,"call.startCall",[e],n);n(gc(t,"executeDeepLink",rh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Kw.Video),e.source)).then(e=>{if(!e)throw new Error(ft);return e}))})}function Zw(){return!(!zr(ur)||!ur.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Kw||(Kw={}));const Xw="v1";function Yw(){Yi(tr(Xw,"appInitialization.notifyAppLoaded"))}function eC(){Ic(tr(Xw,"appInitialization.notifySuccess"),Eo.Success,[Er])}function tC(e){ta(tr(Xw,"appInitialization.notifyFailure"),e)}function nC(e){ea(tr(Xw,"appInitialization.notifyExpectedFailure"),e)}const rC=er("thirdPartyCloudStorage"),oC="v2";class iC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let aC=[],sC=null,cC=!0,uC=null;function lC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Le.INVALID_ARGUMENTS})}if(zr(ur,ln.content,ln.task),!fC())throw mn;if(uC)throw uC=null,new Error("getDragAndDropFiles cannot be called twice");uC=t,cC=!0,Ic(tr(oC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],dC)}function dC(e){if(uC)if(e&&e.error)uC([],e.error),uC=null;else if(e&&e.fileChunk)try{cC||0!==e.fileChunk.chunkSequence||(rC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),cC=!0,uC([],{errorCode:Le.INTERNAL_ERROR,message:"error occurred while receiving data"}),aC=[],uC=null);const t=Fh(e.fileChunk,e.fileType);if(t?(sC||(sC=new iC(e.fileType,[])),sC.assembleAttachment.push(t)):(rC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),uC?uC([],{errorCode:Le.INTERNAL_ERROR,message:"error occurred while receiving data"}):uC=null,aC=[],uC=null,cC=!0),cC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&sC){const t=Rh(sC.assembleAttachment,sC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});aC.push(n)}e.isLastFile&&uC&&(uC(aC,e.error),aC=[],uC=null,cC=!0),sC=null}}catch(e){uC&&(uC([],{errorCode:Le.INTERNAL_ERROR,message:e}),aC=[],uC=null,cC=!0)}else uC([],{errorCode:Le.INTERNAL_ERROR,message:"data received is null"}),aC=[],uC=null,cC=!0}function fC(){return!(!zr(ur)||!ur.supports.thirdPartyCloudStorage)}const pC="v1";function gC(e,t){Xi(tr(pC,"initialize"),t).then(()=>{e&&e()})}function hC(){Uv()}function mC(){Lv()}function vC(e){Wr(),Ic(tr(pC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Kn.frameContext),e(t)})}function wC(e){sa(tr(pC,"registerOnThemeChangeHandlerHelper"),e)}function CC(e){Ts(tr(pC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function yC(e){Ts(tr(pC,"registerAppButtonClickHandler"),"appButtonClick",e,[ln.content])}function SC(e){Ts(tr(pC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[ln.content])}function bC(e){Ts(tr(pC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[ln.content])}function AC(e){Oa(tr(pC,"registerBackButtonHandler"),e)}function EC(e){_v(tr(pC,"registerOnLoadHandler"),e)}function IC(e){Bv(tr(pC,"registerBeforeUnloadHandler"),e)}function PC(e){Ts(tr(pC,"registerFocusEnterHandler"),"focusEnter",e,[])}function TC(e){Ts(tr(pC,"registerChangeSettingsHandler"),"changeSettings",e,[ln.content])}function OC(e,t){zr(ur),rs(tr(pC,"getTabInstances"),t).then(t=>{e(t)})}function RC(e,t){zr(ur),os(tr(pC,"getMruTabInstances"),t).then(t=>{e(t)})}function FC(e){is(tr(pC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function kC(e,t){zr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage);const n=null!=t?t:Sn();ua(tr(pC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function MC(e){as(tr(pC,"setFrameContext"),e)}function xC(e,t,n){Xi(tr(pC,"initializeWithFrameContext"),n).then(()=>t&&t()),as(tr(pC,"setFrameContext"),e)}const NC="v1";function DC(e){ns(tr(NC,"navigation.returnFocus"),e)}function UC(e,t){zr(ur);const n=null!=t?t:Sn();ts(tr(NC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function LC(e,t){zr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage);const n=null!=t?t:Sn();Ya(tr(NC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function HC(e){zr(ur);const t=null!=e?e:Sn();es(tr(NC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const _C="v1";function VC(e){ss(tr(_C,"settings.setValidityState"),e)}function BC(e){zr(ur,ln.content,ln.settings,ln.remove,ln.sidePanel),cs(tr(_C,"settings.getSettings")).then(t=>{e(t)})}function jC(e,t){zr(ur,ln.content,ln.settings,ln.sidePanel);const n=null!=t?t:Sn();us(tr(_C,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function WC(e){Hi(tr(_C,"settings.registerOnSaveHandler"),e)}function zC(e){Vi(tr(_C,"settings.registerOnRemoveHandler"),e)}var qC=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 $C="v1";function GC(e,t){const n=tr($C,"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?(zr(ur,ln.content,ln.sidePanel,ln.meetingStage),Ic(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ii(n,ZC(e),r):oi(n,QC(e),r),new Rm}function JC(e){e=XC(e);const{width:t,height:n}=e,r=qC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ri(tr($C,"tasks.updateTask"),e)}function KC(e,t){ai(tr($C,"tasks.submitTask"),e,t)}function QC(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:gn.Small,width:e.width?e.width:gn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function ZC(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:gn.Small,width:e.width?e.width:gn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function XC(e){return e.height=e.height?e.height:gn.Small,e.width=e.width?e.width:gn.Small,e}const YC="v2";var ey,ty;function ny(){return!(!zr(ur,ln.meetingStage,ln.sidePanel,ln.content)||!ur.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(ey||(ey={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(ty||(ty={}));class ry{getFluidTenantInfo(){return oy(),new Promise(e=>{e(vc(tr(YC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return oy(),new Promise(t=>{t(vc(tr(YC,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return oy(),new Promise(e=>{e(vc(tr(YC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return oy(),new Promise(t=>{t(vc(tr(YC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return oy(),new Promise(e=>{e(vc(tr(YC,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return oy(),new Promise(t=>{t(vc(tr(YC,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return oy(),new Promise(t=>{t(vc(tr(YC,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return oy(),new Promise(t=>{t(vc(tr(YC,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return oy(),new ry}}function oy(){if(!ny())throw new Error("LiveShareHost Not supported")}var iy=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 ay(e){try{return e.cartItems=sy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function sy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=sy(e.accessories)),e})}const cy=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=iy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=cy(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function uy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)dy(t),ly(t.accessories)}function ly(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");dy(t)}}}function dy(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");py(e.price),gy(e.quantity)}function fy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===sn(e))throw new Error("id must be a valid UUID")}}function py(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 gy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function hy(e){if(!Object.values(Cy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const my="v2",vy={majorVersion:1,minorVersion:1};var wy,Cy;function yy(){if(zr(ur,ln.content,ln.task),!Ey())throw mn;return vc(tr(my,"marketplace.getCart"),"marketplace.getCart",vy).then(ay)}function Sy(e){if(zr(ur,ln.content,ln.task),!Ey())throw mn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return fy(null==e?void 0:e.cartId),uy(null==e?void 0:e.cartItems),vc(tr(my,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:cy(e.cartItems),cartVersion:vy})).then(ay)}function by(e){if(zr(ur,ln.content,ln.task),!Ey())throw mn;if(!e)throw new Error("removeCartItemsParams must be provided");if(fy(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 vc(tr(my,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:vy})).then(ay)}function Ay(e){if(zr(ur,ln.content,ln.task),!Ey())throw mn;if(!e)throw new Error("updateCartStatusParams must be provided");return fy(null==e?void 0:e.cartId),hy(null==e?void 0:e.cartStatus),vc(tr(my,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:vy})).then(ay)}function Ey(){return!(!zr(ur)||!ur.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(wy||(wy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Cy||(Cy={}));var Iy=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};class Py{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function Ty(e){return e.toLowerCase().split("+").sort().join("+")}function Oy(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function Ry(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Fy(e,t){if(Ry(t)){const n=Oy(t);if(e.has(n))return{matchedShortcut:n,isOverridable:Dy.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function ky(e){Uy.clear(),e.shortcuts.forEach(e=>{Uy.add(Ty(e))}),Dy.clear(),e.overridableShortcuts.forEach(e=>{Dy.add(Ty(e))})}class My extends Gi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function xy(e){Es(tr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function Ny(e){if(e.target.closest(`[${Wy}]`))return;const{matchedShortcut:t,isOverridable:n}=Fy(Uy,e);if(!t)return;if(n&&Ly){if(Ly(e,{matchedShortcut:t}))return}Sc("shortcutRelay.forwardShortcutEvent",[new Py(e)],tr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const Dy=new Set,Uy=new Set;let Ly,Hy=!1;function _y(e){if(!jy())throw mn;const t=Ly;return Ly=e,t}function Vy(){if(!jy())throw mn;Hy=!1,Uy.clear(),Dy.clear(),Ly=void 0,document.removeEventListener("keydown",Ny,{capture:!0})}function By(){return Iy(this,void 0,void 0,function*(){if(!jy())throw mn;ky(yield yc("shortcutRelay.getHostShortcuts",[],new My,tr("v2","shortcutRelay.getHostShortcuts"))),Hy||document.addEventListener("keydown",Ny,{capture:!0}),Hy=!0,xy(e=>{ky(e)})})}function jy(){return!(!zr(ur)||!ur.supports.shortcutRelay)}const Wy="data-disable-shortcuts-forwarding"})(),r})());
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map