@microsoft/teams-js 2.29.0-beta.0 → 2.29.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. package/dist/esm/_virtual/__polyfill-node.tty.js +1 -0
  2. package/dist/esm/_virtual/__polyfill-node.util.js +1 -0
  3. package/dist/esm/_virtual/_commonjsHelpers.js +1 -0
  4. package/dist/esm/_virtual/_polyfill-node._inherits.js +1 -0
  5. package/dist/esm/_virtual/_polyfill-node.buffer.js +1 -0
  6. package/dist/esm/_virtual/_polyfill-node.global.js +1 -0
  7. package/dist/esm/_virtual/_polyfill-node.process.js +1 -0
  8. package/dist/esm/_virtual/_polyfill-node.tty.js +1 -0
  9. package/dist/esm/_virtual/_polyfill-node.util.js +1 -0
  10. package/dist/esm/_virtual/browser.js +1 -0
  11. package/dist/esm/_virtual/index.js +1 -0
  12. package/dist/esm/_virtual/node.js +1 -0
  13. package/dist/esm/node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js +1 -0
  14. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/browser.js +1 -0
  15. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/common.js +1 -0
  16. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/index.js +1 -0
  17. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/node.js +1 -0
  18. package/dist/esm/node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js +1 -0
  19. package/dist/esm/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js +1 -0
  20. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/native.js +1 -0
  21. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  22. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/rng.js +1 -0
  23. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js +1 -0
  24. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js +1 -0
  25. package/dist/esm/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js +1 -0
  26. package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -0
  27. package/dist/esm/packages/teams-js/src/index.js +1 -0
  28. package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +1 -0
  29. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -0
  30. package/dist/esm/packages/teams-js/src/internal/constants.js +1 -0
  31. package/dist/esm/packages/teams-js/src/internal/deepLinkConstants.js +1 -0
  32. package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -0
  33. package/dist/esm/packages/teams-js/src/internal/globalVars.js +1 -0
  34. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -0
  35. package/dist/esm/packages/teams-js/src/internal/internalAPIs.js +1 -0
  36. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -0
  37. package/dist/esm/packages/teams-js/src/internal/mediaUtil.js +1 -0
  38. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -0
  39. package/dist/esm/packages/teams-js/src/internal/nestedAppAuthUtils.js +1 -0
  40. package/dist/esm/packages/teams-js/src/internal/profileUtil.js +1 -0
  41. package/dist/esm/packages/teams-js/src/internal/telemetry.js +1 -0
  42. package/dist/esm/packages/teams-js/src/internal/typeCheckUtilities.js +1 -0
  43. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -0
  44. package/dist/esm/packages/teams-js/src/internal/uuidObject.js +1 -0
  45. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -0
  46. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -0
  47. package/dist/esm/packages/teams-js/src/internal/videoFrameTick.js +1 -0
  48. package/dist/esm/packages/teams-js/src/internal/videoPerformanceMonitor.js +1 -0
  49. package/dist/esm/packages/teams-js/src/internal/videoPerformanceStatistics.js +1 -0
  50. package/dist/esm/packages/teams-js/src/private/appEntity.js +1 -0
  51. package/dist/esm/packages/teams-js/src/private/conversations.js +1 -0
  52. package/dist/esm/packages/teams-js/src/private/copilot.js +1 -0
  53. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -0
  54. package/dist/esm/packages/teams-js/src/private/externalAppCardActions.js +1 -0
  55. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -0
  56. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -0
  57. package/dist/esm/packages/teams-js/src/private/files.js +1 -0
  58. package/dist/esm/packages/teams-js/src/private/hostEntity.js +1 -0
  59. package/dist/esm/packages/teams-js/src/private/interfaces.js +1 -0
  60. package/dist/esm/packages/teams-js/src/private/logs.js +1 -0
  61. package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -0
  62. package/dist/esm/packages/teams-js/src/private/messageChannels.js +1 -0
  63. package/dist/esm/packages/teams-js/src/private/notifications.js +1 -0
  64. package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -0
  65. package/dist/esm/packages/teams-js/src/private/privateAPIs.js +1 -0
  66. package/dist/esm/packages/teams-js/src/private/remoteCamera.js +1 -0
  67. package/dist/esm/packages/teams-js/src/private/teams.js +1 -0
  68. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -0
  69. package/dist/esm/packages/teams-js/src/public/adaptiveCards.js +1 -0
  70. package/dist/esm/packages/teams-js/src/public/app.js +1 -0
  71. package/dist/esm/packages/teams-js/src/public/appId.js +1 -0
  72. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -0
  73. package/dist/esm/packages/teams-js/src/public/appInstallDialog.js +1 -0
  74. package/dist/esm/packages/teams-js/src/public/appWindow.js +1 -0
  75. package/dist/esm/packages/teams-js/src/public/authentication.js +1 -0
  76. package/dist/esm/packages/teams-js/src/public/barCode.js +1 -0
  77. package/dist/esm/packages/teams-js/src/public/calendar.js +1 -0
  78. package/dist/esm/packages/teams-js/src/public/call.js +1 -0
  79. package/dist/esm/packages/teams-js/src/public/chat.js +1 -0
  80. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -0
  81. package/dist/esm/packages/teams-js/src/public/constants.js +1 -0
  82. package/dist/esm/packages/teams-js/src/public/dialog.js +1 -0
  83. package/dist/esm/packages/teams-js/src/public/geoLocation.js +1 -0
  84. package/dist/esm/packages/teams-js/src/public/interfaces.js +1 -0
  85. package/dist/esm/packages/teams-js/src/public/liveShareHost.js +1 -0
  86. package/dist/esm/packages/teams-js/src/public/location.js +1 -0
  87. package/dist/esm/packages/teams-js/src/public/mail.js +1 -0
  88. package/dist/esm/packages/teams-js/src/public/marketplace.js +1 -0
  89. package/dist/esm/packages/teams-js/src/public/media.js +1 -0
  90. package/dist/esm/packages/teams-js/src/public/meeting.js +1 -0
  91. package/dist/esm/packages/teams-js/src/public/menus.js +1 -0
  92. package/dist/esm/packages/teams-js/src/public/monetization.js +1 -0
  93. package/dist/esm/packages/teams-js/src/public/navigation.js +1 -0
  94. package/dist/esm/packages/teams-js/src/public/nestedAppAuth.js +1 -0
  95. package/dist/esm/packages/teams-js/src/public/pages.js +1 -0
  96. package/dist/esm/packages/teams-js/src/public/people.js +1 -0
  97. package/dist/esm/packages/teams-js/src/public/profile.js +1 -0
  98. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -0
  99. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -0
  100. package/dist/esm/packages/teams-js/src/public/search.js +1 -0
  101. package/dist/esm/packages/teams-js/src/public/secondaryBrowser.js +1 -0
  102. package/dist/esm/packages/teams-js/src/public/settings.js +1 -0
  103. package/dist/esm/packages/teams-js/src/public/sharing.js +1 -0
  104. package/dist/esm/packages/teams-js/src/public/stageView.js +1 -0
  105. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -0
  106. package/dist/esm/packages/teams-js/src/public/teamsAPIs.js +1 -0
  107. package/dist/esm/packages/teams-js/src/public/thirdPartyCloudStorage.js +1 -0
  108. package/dist/esm/packages/teams-js/src/public/version.js +1 -0
  109. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -0
  110. package/dist/esm/packages/teams-js/src/public/visualMedia.js +1 -0
  111. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -0
  112. package/dist/{MicrosoftTeams.d.ts → umd/MicrosoftTeams.d.ts} +54 -68
  113. package/dist/{MicrosoftTeams.js → umd/MicrosoftTeams.js} +6869 -6884
  114. package/dist/umd/MicrosoftTeams.js.map +1 -0
  115. package/dist/umd/MicrosoftTeams.min.js +2 -0
  116. package/dist/umd/MicrosoftTeams.min.js.map +1 -0
  117. package/package.json +1 -1
  118. package/dist/MicrosoftTeams.js.map +0 -1
  119. package/dist/MicrosoftTeams.min.js +0 -2
  120. package/dist/MicrosoftTeams.min.js.map +0 -1
@@ -0,0 +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],l=i[1],u=new o(c(e,a,l)),d=0,f=l>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)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},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(u(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 l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(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(l(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?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(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:()=>X,AppId:()=>tn,ChannelType:()=>ge,ChildAppWindow:()=>Yi,DialogDimension:()=>fe,ErrorCode:()=>ee,FileOpenPreference:()=>Q,FrameContexts:()=>le,HostClientType:()=>se,HostName:()=>ce,LiveShareHost:()=>ls,NotificationTypes:()=>yo,ParentAppWindow:()=>ea,SecondaryM365ContentIdName:()=>Y,TaskModuleDimension:()=>me,TeamType:()=>ue,UserSettingTypes:()=>bo,UserTeamRole:()=>de,ViewerActionTypes:()=>So,app:()=>Fn,appEntity:()=>Jo,appInitialization:()=>Pa,appInstallDialog:()=>Pi,authentication:()=>sn,barCode:()=>zi,calendar:()=>sa,call:()=>Ia,chat:()=>$i,clipboard:()=>Gi,conversations:()=>ko,copilot:()=>Mo,dialog:()=>pn,enablePrintCapability:()=>Ma,executeDeepLink:()=>Ja,externalAppAuthentication:()=>Lo,externalAppCardActions:()=>No,externalAppCardActionsForCEA:()=>xo,externalAppCommands:()=>Vo,files:()=>Wo,geoLocation:()=>Zi,getAdaptiveCardSchemaVersion:()=>Qi,getContext:()=>La,getMruTabInstances:()=>qa,getTabInstances:()=>$a,hostEntity:()=>Si,initialize:()=>ka,initializeWithFrameContext:()=>Za,liveShare:()=>cs,location:()=>na,logs:()=>Co,mail:()=>ca,marketplace:()=>Es,media:()=>Ri,meeting:()=>ia,meetingRoom:()=>jo,menus:()=>mn,messageChannels:()=>nn,monetization:()=>aa,navigateBack:()=>ts,navigateCrossDomain:()=>es,navigateToTab:()=>Ya,nestedAppAuth:()=>Ji,notifications:()=>zo,openFilePreview:()=>Oo,otherAppStateChange:()=>$o,pages:()=>Bn,people:()=>ua,print:()=>Ua,profile:()=>pa,registerAppButtonClickHandler:()=>xa,registerAppButtonHoverEnterHandler:()=>Ha,registerAppButtonHoverLeaveHandler:()=>Va,registerBackButtonHandler:()=>_a,registerBeforeUnloadHandler:()=>Ba,registerChangeSettingsHandler:()=>za,registerCustomHandler:()=>Po,registerFocusEnterHandler:()=>ja,registerFullScreenHandler:()=>Da,registerOnLoadHandler:()=>Wa,registerOnThemeChangeHandler:()=>Na,registerUserSettingsChangeHandler:()=>Fo,remoteCamera:()=>Go,returnFocus:()=>Xa,search:()=>ma,secondaryBrowser:()=>ta,sendCustomEvent:()=>To,sendCustomMessage:()=>Io,setFrameContext:()=>Ka,settings:()=>rs,shareDeepLink:()=>Ga,sharing:()=>wa,stageView:()=>va,tasks:()=>as,teams:()=>Zo,teamsCore:()=>la,thirdPartyCloudStorage:()=>Oa,uploadCustomApp:()=>Ao,version:()=>Rt,videoEffects:()=>oi,videoEffectsEx:()=>Ci,visualMedia:()=>Sa,webStorage:()=>ba});var e=n(815),t=n(933);const o=a,i=2147483647;function a(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 c(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return f(e,t);if(ArrayBuffer.isView(e))return C(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(g(e,ArrayBuffer)||e&&g(e.buffer,ArrayBuffer))return y(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(g(e,SharedArrayBuffer)||e&&g(e.buffer,SharedArrayBuffer)))return y(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 a.from(r,t,n);const o=W(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.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 c(e){return l(e),u(e<0?0:0|d(e))}function l(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 u(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function d(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function f(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|p(e,t);let r=u(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||g(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 m(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return h(e).length;default:if(o)return r?-1:m(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function m(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 h(e){return t.toByteArray(v(e))}a.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}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.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}},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype};const w=/[^+/0-9A-Za-z-_]/g;function v(e){if((e=(e=e.split("=")[0]).trim().replace(w,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function C(e){if(g(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return S(e)}function y(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,a.prototype),r}function S(e){const t=e.length<0?0:0|d(e.length),n=u(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function b(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 I(r)}function E(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 T(this,t,n);case"utf8":case"utf-8":return b(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return F(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?b(this,0,e):E.apply(this,arguments)};const A=4096;function I(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}function T(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+=_[e[r]];return o}function P(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 F(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 O(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function R(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 k(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(V(r))return a;e[n+a]=r}return a}function M(e,t,n,r){return H(m(t,e.length-n),e,n,r)}function U(e,t,n,r){return H(D(t),e,n,r)}function L(e,t,n,r){return H(h(t),e,n,r)}function N(e,t,n,r){return H(x(t,e.length-n),e,n,r)}function D(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function x(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 H(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 V(e){return e!=e}a.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 k(this,e,t,n);case"utf8":case"utf-8":return M(this,e,t,n);case"ascii":case"latin1":case"binary":return U(this,e,t,n);case"base64":return L(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const _=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 W(e){if(a.isBuffer(e)){const t=0|d(e.length),n=u(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?u(0):S(e):"Buffer"===e.type&&Array.isArray(e.data)?S(e.data):void 0}const B={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let j;const z=new Uint8Array(16);function $(){if(!j&&(j="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!j))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return j(z)}const q=[];for(let e=0;e<256;++e)q.push((e+256).toString(16).slice(1));function G(e,t=0){return q[e[t+0]]+q[e[t+1]]+q[e[t+2]]+q[e[t+3]]+"-"+q[e[t+4]]+q[e[t+5]]+"-"+q[e[t+6]]+q[e[t+7]]+"-"+q[e[t+8]]+q[e[t+9]]+"-"+q[e[t+10]]+q[e[t+11]]+q[e[t+12]]+q[e[t+13]]+q[e[t+14]]+q[e[t+15]]}const J=function(e,t,n){if(B.randomUUID&&!t&&!e)return B.randomUUID();const r=(e=e||{}).random||(e.rng||$)();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 G(r)},K=/^(?:[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 Z=function(e){return"string"==typeof e&&K.test(e)};var Q,X,Y,ee,te,ne,re,oe,ie,ae,se,ce,le,ue,de,fe;function pe(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Q||(Q={})),function(e){e.M365Content="m365content"}(X||(X={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Y||(Y={})),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"}(ee||(ee={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(te||(te={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(ne||(ne={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(re||(re={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(oe||(oe={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(ie||(ie={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(ae||(ae={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(se||(se={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(ce||(ce={})),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"}(le||(le={})),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"}(ue||(ue={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(de||(de={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(fe||(fe={}));var ge,me=fe;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(ge||(ge={}));const he={errorCode:ee.NOT_SUPPORTED_ON_PLATFORM},we=1,ve=5,Ce={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},ye=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Se=new Error("Invalid response: Received more images than the specified max limit in the response.");function be(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Ee(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 Ae(){return J()}function Ie(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Ie(e[t])})),Object.freeze(e)}function Te(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Pe(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Fe(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Oe(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 Re(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 ke(e){return!(Ee(`${e.majorVersion}.${e.minorVersion}`,`${we}.${ve}`)>=0)}function Me(e){return"https:"===e.protocol}function Ue(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 i=o.from(t,"base64").toString();n(new Blob([i],{type:e}))}))}function Le(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 Ne(){if(De())throw new Error("window object undefined at SSR check");return window}function De(){return"undefined"==typeof window}function xe(e,t){if(_e(e)||!We(e)||!Be(e))throw t||new Error("id is not valid.")}function He(e,t){const n=e.toString().toLocaleLowerCase();if(_e(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Me(e))throw t||new Error("Url should be a valid https url")}function Ve(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function _e(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 We(e){return e.length<256&&e.length>4}function Be(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function je(e){if(!e)throw new Error("id must not be empty");if(!1===Z(e))throw new Error("id must be a valid UUID")}class ze{constructor(e=Ae()){this.uuid=e,je(e)}toString(){return this.uuid}}const $e=new ze,qe=e.debug.formatArgs;e.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${$e.toString()}]`,qe.call(this,e)};const Ge=(0,e.debug)("teamsJs");function Je(e){return Ge.extend(e)}function Ke(e,t){return`${e}_${t}`}function Ze(e){return/^v\d+_[\w.]+$/.test(e)}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.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","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","edgeapi.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const Xe="2.0.1",Ye="2.0.3",et="1.9.0",tt="1.8.0",nt=n.t(Qe,2).validOrigins,rt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ot=/^https:\/\//,it="https",at="teams.microsoft.com",st="The library has not yet been initialized",ct="The runtime has not yet been initialized",lt="The runtime version is not supported";class ut{}ut.initializeCalled=!1,ut.initializeCompleted=!1,ut.additionalValidOrigins=[],ut.initializePromise=void 0,ut.isFramelessWindow=!1,ut.frameContext=void 0,ut.hostClientType=void 0,ut.printCapabilityEnabled=!1;var dt=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 ft=Je("runtime"),pt=4;function gt(e){return e.apiVersion===pt}const mt={apiVersion:-1,supports:{}};function ht(e){if(gt(e))return!0;throw-1===e.apiVersion?new Error(ct):new Error(lt)}let wt=mt;const vt={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:Ce,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:{}}}},Ct=[se.desktop,se.web,se.rigel,se.surfaceHub,se.teamsRoomsWindows,se.teamsRoomsAndroid,se.teamsPhones,se.teamsDisplays],yt=[se.android,se.ios,se.ipados],St=[...Ct,...yt];function bt(e){let t=e;if(t.apiVersion<pt&&Et.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),gt(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Et=[{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=dt(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})}}}],At={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Ct}],"1.9.0":[{capability:{location:{}},hostClientTypes:St}],"2.0.0":[{capability:{people:{}},hostClientTypes:St},{capability:{sharing:{}},hostClientTypes:[se.desktop,se.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[se.android,se.desktop,se.ios,se.teamsRoomsAndroid,se.teamsPhones,se.teamsDisplays,se.web]},{capability:{webStorage:{}},hostClientTypes:[se.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[se.android,se.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[se.android,se.ios]}]},It=ft.extend("generateBackCompatRuntimeConfig");function Tt(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]=Tt(e[r]||{},t[r]));return n}function Pt(e,t,n){It("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);It("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Ee(e,t)>=0&&n[t].forEach((e=>{void 0!==ut.hostClientType&&e.hostClientTypes.includes(ut.hostClientType)&&(r=Tt(r,e.capability))}))}));const o={apiVersion:pt,hostVersionsInfo:Ce,isLegacyTeams:!0,supports:r};return It("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Ft=ft.extend("applyRuntimeConfig");function Ot(e){"string"==typeof e.apiVersion&&(Ft("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Ft("Fast-forwarding runtime %o",e);const t=bt(e);Ft("Applying runtime %o",t),wt=Ie(t)}const Rt="2.29.0-beta.2",kt=Je("internal"),Mt=kt.extend("ensureInitializeCalled"),Ut=kt.extend("ensureInitialized");function Lt(){if(!ut.initializeCalled)throw Mt(st),new Error(st)}function Nt(e,...t){if(!ut.initializeCompleted)throw Ut("%s. initializeCalled: %s",st,ut.initializeCalled.toString()),new Error(st);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===ut.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${ut.frameContext}".`)}return ht(e)}function Dt(e=Xe){const t=Ee(ut.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function xt(){return ut.hostClientType==se.android||ut.hostClientType==se.ios||ut.hostClientType==se.ipados}function Ht(e=Xe){if(!xt()){throw{errorCode:ee.NOT_SUPPORTED_ON_PLATFORM}}if(!Dt(e)){throw{errorCode:ee.OLD_PLATFORM}}}function Vt(e){let t=ut.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&ot.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),ut.additionalValidOrigins=t}function _t(e){return null==e}var Wt=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Bt=[];const jt=Je("validateOrigin");function zt(){return Wt(this,void 0,void 0,(function*(){yield qt()}))}function $t(){return 0===Bt.length}function qt(){return Wt(this,void 0,void 0,(function*(){return $t()?De()?(Bt=nt,nt):fetch(rt).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Gt(JSON.stringify(e)))return Bt=e.validOrigins,Bt;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(jt("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Bt=nt,Bt))):Bt}))}function Gt(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 jt("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Jt(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 Kt(e){return qt().then((t=>{if(!Me(e))return jt("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=>Jt(e,n))))return!0;for(const e of ut.additionalValidOrigins){if(Jt("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return jt("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,ut.additionalValidOrigins),!1}))}function Zt(e){if(_e(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Yt(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Qt}-${Xt}).`);if(en(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Qt=4,Xt=256;function Yt(e){return e.length<Xt&&e.length>Qt}function en(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}class tn{constructor(e){this.appIdAsString=e,Zt(e)}toString(){return this.appIdAsString}}var nn,rn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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(e){let t,n;!function(e){let t;const n=Je("messageChannels.telemetry");function r(){var e;return!(!Nt(wt)||!(null===(e=wt.supports.messageChannels)||void 0===e?void 0:e.telemetry))}e.getTelemetryPort=function(){return rn(this,void 0,void 0,(function*(){if(t)return n("Returning telemetry port from cache"),t;if(!r())throw he;return t=yield Ur(Ke("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),t}))},e.isSupported=r,e._clearTelemetryPort=function(){t=void 0}}(t=e.telemetry||(e.telemetry={})),function(e){let t;const n=Je("messageChannels.dataLayer");function r(){var e;return!(!Nt(wt)||!(null===(e=wt.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}e.getDataLayerPort=function(){return rn(this,void 0,void 0,(function*(){if(t)return n("Returning dataLayer port from cache"),t;if(!r())throw he;return t=yield Ur(Ke("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),t}))},e.isSupported=r,e._clearDataLayerPort=function(){t=void 0}}(n=e.dataLayer||(e.dataLayer={})),e.isSupported=function(){return!(!Nt(wt)||!wt.supports.messageChannels)}}(nn||(nn={}));const on="v1",an="v2";var sn;!function(e){let t,n,r,o;function i(e,n){return new Promise(((r,o)=>{if(ut.hostClientType!==se.web){const t=Ve(n.url);He(t),r(Mr(e,"authentication.authenticate",[t.href,n.width,n.height,n.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else t={success:r,fail:o},l(n)}))}function a(e,t){return new Promise((n=>{n(Mr(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 s(e){return new Promise((t=>{t(Mr(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function c(){u();try{Ar.childWindow&&Ar.childWindow.close()}finally{Ar.childWindow=null,Ar.childOrigin=null}}function l(e){c();let t=e.width||600,n=e.height||400;t=Math.min(t,Ar.currentWindow.outerWidth-400),n=Math.min(n,Ar.currentWindow.outerHeight-200);const r=Ve(e.url.replace("{oauthRedirectMethod}","web"));He(r);let o=void 0!==Ar.currentWindow.screenLeft?Ar.currentWindow.screenLeft:Ar.currentWindow.screenX,i=void 0!==Ar.currentWindow.screenTop?Ar.currentWindow.screenTop:Ar.currentWindow.screenY;o+=Ar.currentWindow.outerWidth/2-t/2,i+=Ar.currentWindow.outerHeight/2-n/2,Ar.childWindow=Ar.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Ar.childWindow?d():p("FailedToOpenWindow")}function u(){n&&(clearInterval(n),n=0),er("initialize"),er("navigateCrossDomain")}function d(){u(),n=Ar.currentWindow.setInterval((()=>{if(!Ar.childWindow||Ar.childWindow.closed)p("CancelledByUser");else{const e=Ar.childOrigin;try{Ar.childOrigin="*",po("ping")}finally{Ar.childOrigin=e}}}),100),Yn(Ke(on,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[le.authentication,ut.hostClientType])),Yn(Ke(on,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function f(e){try{t&&t.success(e)}finally{t=void 0,c()}}function p(e){try{t&&t.fail(new Error(e))}finally{t=void 0,c()}}e.initialize=function(){Yn(Ke(on,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",f,!1),Yn(Ke(on,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",p,!1)},e.registerAuthenticationHandlers=function(e){r=e},e.authenticate=function(e){const t=void 0!==e,n=t?e:r;if(!n)throw new Error("No parameters are provided for authentication");return Nt(wt,le.content,le.sidePanel,le.settings,le.remove,le.task,le.stage,le.meetingStage),i(n.successCallback||n.failureCallback?Ke(on,"authentication.authenticate"):Ke(an,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(r=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(r=void 0)}}))},e.getAuthToken=function(e){return Lt(),a(e&&(e.successCallback||e.failureCallback)?Ke(on,"authentication.getAuthToken"):Ke(an,"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}))},e.getUser=function(e){return Lt(),s(e&&(e.successCallback||e.failureCallback)?Ke(on,"authentication.getUser"):Ke(an,"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)}))},e.notifySuccess=function(e,t){Nt(wt,le.authentication),Dr(Ke(t?on:an,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),uo(Ar.parentWindow,(()=>setTimeout((()=>Ar.currentWindow.close()),200)))},e.notifyFailure=function(e,t){Nt(wt,le.authentication),Dr(Ke(t?on:an,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),uo(Ar.parentWindow,(()=>setTimeout((()=>Ar.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(o=e.DataResidency||(e.DataResidency={}))}(sn||(sn={}));const cn="v2";function ln(e,t){if(Nt(wt,le.content,le.sidePanel,le.task,le.meetingStage),!pn.update.isSupported())throw he;Dr(e,"tasks.updateTask",[t])}function un(e,t,n,r){if(Nt(wt,le.content,le.sidePanel,le.meetingStage),!pn.url.isSupported())throw he;r&&Yn(Ke(cn,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Dr(e,"tasks.startTask",[pn.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),er("messageForParent")}))}function dn(e,t,n,r){if(Nt(wt,le.content,le.sidePanel,le.meetingStage),!pn.url.bot.isSupported())throw he;r&&Yn(Ke(cn,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Dr(e,"tasks.startTask",[pn.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),er("messageForParent")}))}function fn(e,t,n){if(Nt(wt,le.task),!pn.url.isSupported())throw he;Dr(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var pn;!function(e){const t=[];function n(e){ut.frameContext&&(ut.frameContext===le.task?t.push(e):er("messageForChild"))}let r,o,i;e.initialize=function(){Yn(Ke(cn,"dialog.registerMessageForChildHandler"),"messageForChild",n,!1)},function(e){let n,r;function o(e){return{url:e.url,height:e.size?e.size.height:fe.Small,width:e.size?e.size.width:fe.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){un(Ke(cn,"dialog.url.open"),e,t,n)},e.submit=function(e,t){fn(Ke(cn,"dialog.url.submit"),e,t)},function(e){function n(){var e,t;return Nt(wt)&&!!(null===(t=null===(e=wt.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(Nt(wt,le.task),!n())throw he;Dr(Ke(cn,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Nt(wt,le.content,le.sidePanel,le.meetingStage),!n())throw he;Dr(Ke(cn,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Nt(wt,le.task),!n())throw he;for(er("messageForChild"),Yn(Ke(cn,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n}(n=e.parentCommunication||(e.parentCommunication={})),e.isSupported=function(){return Nt(wt)&&void 0!==(wt.supports.dialog&&wt.supports.dialog.url)},function(e){e.open=function(e,t,n){dn(Ke(cn,"dialog.url.bot.open"),e,t,n)},e.isSupported=function(){return Nt(wt)&&void 0!==(wt.supports.dialog&&wt.supports.dialog.url&&wt.supports.dialog.url.bot)}}(r=e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=o,e.getDialogInfoFromBotUrlDialogInfo=function(e){const t=o(e);return t.completionBotId=e.completionBotId,t}}(r=e.url||(e.url={})),e.isSupported=function(){return!(!Nt(wt)||!wt.supports.dialog)},function(e){e.resize=function(e){ln(Ke(cn,"dialog.update.resize"),e)},e.isSupported=function(){return!(!Nt(wt)||!wt.supports.dialog)&&!!wt.supports.dialog.update}}(o=e.update||(e.update={})),function(e){function t(){const e=wt.hostVersionsInfo&&wt.hostVersionsInfo.adaptiveCardSchemaVersion&&!ke(wt.hostVersionsInfo.adaptiveCardSchemaVersion);return Nt(wt)&&void 0!==(e&&wt.supports.dialog&&wt.supports.dialog.card)}let n;function r(e){return{card:e.card,height:e.size?e.size.height:fe.Small,width:e.size?e.size.width:fe.Small,title:e.title}}function o(e){const t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Nt(wt,le.content,le.sidePanel,le.meetingStage),!t())throw he;const o=r(e);Dr(Ke(cn,"dialog.adaptiveCard.open"),"tasks.startTask",[o],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=wt.hostVersionsInfo&&wt.hostVersionsInfo.adaptiveCardSchemaVersion&&!ke(wt.hostVersionsInfo.adaptiveCardSchemaVersion);return Nt(wt)&&void 0!==(e&&wt.supports.dialog&&wt.supports.dialog.card&&wt.supports.dialog.card.bot)}e.open=function(e,n){if(Nt(wt,le.content,le.sidePanel,le.meetingStage),!t())throw he;const r=o(e);Dr(Ke(cn,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[r],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t}(n=e.bot||(e.bot={}))}(i=e.adaptiveCard||(e.adaptiveCard={}))}(pn||(pn={}));const gn="v2";var mn;!function(e){let t,n,r,o,i;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(t=e.DisplayMode||(e.DisplayMode={}));function a(e){i&&i(e)||(Nt(wt),Dr(Ke(gn,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function s(e){r&&r(e)||(Nt(wt),Dr(Ke(gn,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function c(e){o&&o(e)||(Nt(wt),Dr(Ke(gn,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function l(){return!(!Nt(wt)||!wt.supports.menus)}e.MenuItem=class{constructor(){this.enabled=!0,this.selected=!1}},function(e){e.dropDown="dropDown",e.popOver="popOver"}(n=e.MenuListType||(e.MenuListType={})),e.initialize=function(){Yn(Ke(gn,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",s,!1),Yn(Ke(gn,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",c,!1),Yn(Ke(gn,"menus.registerSetModuleViewHandler"),"setModuleView",a,!1)},e.setUpViews=function(e,t){if(Nt(wt),!l())throw he;i=t,Dr(Ke(gn,"menus.setUpViews"),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Nt(wt),!l())throw he;r=t,Dr(Ke(gn,"menus.setNavBarMenu"),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Nt(wt),!l())throw he;o=t,Dr(Ke(gn,"menus.showActionMenu"),"showActionMenu",[e])},e.isSupported=l}(mn||(mn={}));const hn="v2",wn=5e3,vn=Je("app");function Cn(e,t){if(De()){return vn.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Oe((()=>In(e,t)),wn,new Error("SDK initialization timed out."))}function yn(e){Dr(e,Fn.Messages.AppLoaded,[Rt])}function Sn(e,t){Dr(e,Fn.Messages.ExpectedFailure,[t.reason,t.message])}function bn(e,t){Dr(e,Fn.Messages.Failure,[t.reason,t.message])}function En(e){Dr(e,Fn.Messages.Success,[Rt])}const An=vn.extend("initializeHelper");function In(e,t){return new Promise((n=>{ut.initializeCalled||(ut.initializeCalled=!0,Kn(),ut.initializePromise=Tr(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Xe})=>{ut.frameContext=e,ut.hostClientType=t,ut.clientSupportedSDKVersion=r;try{An("Parsing %s",n);const e=JSON.parse(n);if(An("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&Ot(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{An("Attempting to parse %s as an SDK version",n),isNaN(Ee(n,Xe))||(ut.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(An("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Ot(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ot(Pt(ut.clientSupportedSDKVersion,vt,At))}}ut.initializeCompleted=!0})),sn.initialize(),mn.initialize(),Bn.config.initialize(),pn.initialize()),Array.isArray(t)&&Vt(t),void 0!==ut.initializePromise?n(ut.initializePromise):An("GlobalVars.initializePromise is unexpectedly undefined")}))}function Tn(e,t){!_t(t)&&Lt(),rr(e,t)}function Pn(e,t){return new Promise((n=>{Nt(wt,le.content,le.sidePanel,le.settings,le.task,le.stage,le.meetingStage),n(Or(e,"executeDeepLink",t))}))}var Fn;function On(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:ce.teams,clientType:e.hostClientType?e.hostClientType:se.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:ut.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){const t=Je("app");let n,r,o;e.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(n=e.FailedReason||(e.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(r=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return ut.initializeCompleted},e.getFrameContext=function(){return ut.frameContext},t("teamsjs instance is version %s, starting at %s UTC (%s local)",Rt,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(De())return;const e=document.getElementsByTagName("script"),n=e&&e[e.length-1]&&e[e.length-1].src,r="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";n&&0!==n.length?t("teamsjs is being used from %s. %s",n,r):t("teamsjs is being used from a script tag embedded directly in your html. %s",r)}(),e.initialize=function(e){return zt(),Cn(Ke(hn,"app.initialize"),e)},e._initialize=function(e){Ar.currentWindow=e},e._uninitialize=function(){ut.initializeCalled&&(Zn(),ut.initializeCalled=!1,ut.initializeCompleted=!1,ut.initializePromise=void 0,ut.additionalValidOrigins=[],ut.frameContext=void 0,ut.hostClientType=void 0,ut.isFramelessWindow=!1,nn.telemetry._clearTelemetryPort(),nn.dataLayer._clearDataLayerPort(),Pr())},e.getContext=function(){return new Promise((e=>{Lt(),e(Fr(Ke(hn,"app.getContext"),"getContext"))})).then((e=>On(e)))},e.notifyAppLoaded=function(){Lt(),yn(Ke(hn,"app.notifyAppLoaded"))},e.notifySuccess=function(){Lt(),En(Ke(hn,"app.notifySuccess"))},e.notifyFailure=function(e){Lt(),bn(Ke(hn,"app.notifyFailure"),e)},e.notifyExpectedFailure=function(e){Lt(),Sn(Ke(hn,"app.notifyExpectedFailure"),e)},e.registerOnThemeChangeHandler=function(e){Tn(Ke(hn,"app.registerOnThemeChangeHandler"),e)},e.openLink=function(e){return Pn(Ke(hn,"app.openLink"),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Nt(wt),ur(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Nt(wt),dr(e)}}(o=e.lifecycle||(e.lifecycle={}))}(Fn||(Fn={}));const Rn="v2";function kn(e,t){return new Promise((n=>{if(Nt(wt,le.content,le.sidePanel,le.settings,le.remove,le.task,le.stage,le.meetingStage),!Bn.isSupported())throw he;n(Rr(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Mn(e){return new Promise((t=>{if(Nt(wt),!Bn.backStack.isSupported())throw he;t(Rr(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Un(e,t){return new Promise((n=>{if(Nt(wt),!Bn.tabs.isSupported())throw he;n(Rr(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ln(e,t){if(Nt(wt),!Bn.isSupported())throw he;Dr(e,"returnFocus",[t])}function Nn(e,t){return new Promise((n=>{if(Nt(wt),!Bn.tabs.isSupported())throw he;n(Fr(e,"getTabInstances",t))}))}function Dn(e,t){return new Promise((n=>{if(Nt(wt),!Bn.tabs.isSupported())throw he;n(Fr(e,"getMruTabInstances",t))}))}function xn(e,t){if(Nt(wt,le.content,le.sidePanel,le.meetingStage),!Bn.isSupported())throw he;Dr(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Hn(e,t){if(Nt(wt,le.content),!Bn.isSupported())throw he;Dr(e,"setFrameContext",[t])}function Vn(e,t){if(Nt(wt,le.settings,le.remove),!Bn.config.isSupported())throw he;Dr(e,"settings.setValidityState",[t])}function _n(e){return new Promise((t=>{if(Nt(wt,le.content,le.settings,le.remove,le.sidePanel),!Bn.isSupported())throw he;t(Fr(e,"settings.getSettings"))}))}function Wn(e,t){return new Promise((n=>{if(Nt(wt,le.content,le.settings,le.sidePanel),!Bn.config.isSupported())throw he;n(Or(e,"settings.setSettings",t))}))}var Bn;function jn(e){return e.appId instanceof tn}function zn(e){return Object.assign(Object.assign({},e),{appId:new tn(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function $n(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}!function(e){let t,n,r,o,i,a,s,c;function l(e){Hn(Ke(Rn,"pages.setCurrentFrame"),e)}function u(){return!(!Nt(wt)||!wt.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(t=e.EnterFocusType||(e.EnterFocusType={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(n=e.ReturnFocusType||(e.ReturnFocusType={})),e.returnFocus=function(t){const n=Ke(Rn,"pages.returnFocus");if(Nt(wt),!e.isSupported())throw he;if(void 0===t&&Dr(n,"returnFocus",[!1]),"boolean"==typeof t)Dr(n,"returnFocus",[t]);else switch(t){case e.ReturnFocusType.PreviousLandmark:case e.ReturnFocusType.GoToActivityFeed:Dr(n,"returnFocus",[!1,t]);break;case e.ReturnFocusType.NextLandmark:Dr(n,"returnFocus",[!0,t])}},e.registerFocusEnterHandler=function(e){nr(Ke(Rn,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!u())throw he}))},e.setCurrentFrame=l,e.initializeWithFrameContext=function(e,t,n){zt(),Cn(Ke(Rn,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),l(e)},e.getConfig=function(){return _n(Ke(Rn,"pages.getConfig."))},e.navigateCrossDomain=function(e){return kn(Ke(Rn,"pages.navigateCrossDomain"),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Nt(wt,le.content,le.sidePanel,le.settings,le.task,le.stage,le.meetingStage),!u())throw he;const n=Ke(Rn,"pages.navigateToApp");if(wt.isLegacyTeams){t(Or(n,"executeDeepLink",Re(jn(e)?e:zn(e))))}else{t(Or(n,"pages.navigateToApp",jn(e)?$n(e):e))}}))},e.shareDeepLink=function(e){return xn(Ke(Rn,"pages.shareDeepLink"),e)},e.registerFullScreenHandler=function(e){nr(Ke(Rn,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!_t(e)&&!u())throw he}))},e.isSupported=u,function(e){e.navigateToTab=function(e){return Un(Ke(Rn,"pages.tabs.navigateToTab"),e)},e.getTabInstances=function(e){return Nn(Ke(Rn,"pages.tabs.getTabInstances"),e)},e.getMruTabInstances=function(e){return Dn(Ke(Rn,"pages.tabs.getMruTabInstances"),e)},e.isSupported=function(){return!(!Nt(wt)||!wt.supports.pages)&&!!wt.supports.pages.tabs}}(r=e.tabs||(e.tabs={})),function(e){let t,n;function r(e,n,r){!_t(n)&&Nt(wt,le.settings),r&&r(),t=n,!_t(n)&&Dr(e,"registerHandler",["save"])}function o(e,t,r){!_t(t)&&Nt(wt,le.remove,le.settings),r&&r(),n=t,!_t(t)&&Dr(e,"registerHandler",["remove"])}function i(e){const n=new a(e);t?t(n):Ar.childWindow?po("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Yn(Ke(Rn,"pages.config.registerSettingsSaveHandler"),"settings.save",i,!1),Yn(Ke(Rn,"pages.config.registerSettingsRemoveHandler"),"settings.remove",s,!1)},e.setValidityState=function(e){return Vn(Ke(Rn,"pages.config.setValidityState"),e)},e.setConfig=function(e){return Wn(Ke(Rn,"pages.config.setConfig"),e)},e.registerOnSaveHandler=function(e){r(Ke(Rn,"pages.config.registerOnSaveHandler"),e,(()=>{if(!_t(e)&&!l())throw he}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){o(Ke(Rn,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!_t(e)&&!l())throw he}))},e.registerOnRemoveHandlerHelper=o,e.registerChangeConfigHandler=function(e){nr(Ke(Rn,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[le.content],(()=>{if(!l())throw he}))};class a{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Dr(Ke(Rn,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Dr(Ke(Rn,"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 s(){const e=new c;n?n(e):Ar.childWindow?po("settings.remove",[]):e.notifySuccess()}class c{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Dr(Ke(Rn,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Dr(Ke(Rn,"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 l(){return!(!Nt(wt)||!wt.supports.pages)&&!!wt.supports.pages.config}e.isSupported=l}(o=e.config||(e.config={})),function(e){let t;function n(){return Mn(Ke(Rn,"pages.backStack.navigateBack"))}function r(e,n,r){!_t(n)&&Nt(wt),r&&r(),t=n,!_t(n)&&Dr(e,"registerHandler",["backButton"])}function o(){t&&t()||(Ar.childWindow?po("backButtonPress",[]):n())}function i(){return!(!Nt(wt)||!wt.supports.pages)&&!!wt.supports.pages.backStack}e._initialize=function(){Yn(Ke(Rn,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",o,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(Ke(Rn,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!_t(e)&&!i())throw he}))},e.registerBackButtonHandlerHelper=r,e.isSupported=i}(i=e.backStack||(e.backStack={})),function(e){function t(){return!(!Nt(wt)||!wt.supports.pages)&&!!wt.supports.pages.fullTrust}e.enterFullscreen=function(){if(Nt(wt,le.content),!t())throw he;Dr(Ke(Rn,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])},e.exitFullscreen=function(){if(Nt(wt,le.content),!t())throw he;Dr(Ke(Rn,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])},e.isSupported=t}(a=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Nt(wt)||!wt.supports.pages)&&!!wt.supports.pages.appButton}e.onClick=function(e){nr(Ke(Rn,"pages.appButton.onClick"),"appButtonClick",e,[le.content],(()=>{if(!t())throw he}))},e.onHoverEnter=function(e){nr(Ke(Rn,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[le.content],(()=>{if(!t())throw he}))},e.onHoverLeave=function(e){nr(Ke(Rn,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[le.content],(()=>{if(!t())throw he}))},e.isSupported=t}(s=e.appButton||(e.appButton={})),function(e){function t(){return!(!Nt(wt)||!wt.supports.pages)&&!!wt.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Nt(wt,le.content,le.sidePanel,le.settings,le.task,le.stage,le.meetingStage),!t())throw he;n(kr(Ke(Rn,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Nt(wt,le.content,le.sidePanel,le.settings,le.task,le.stage,le.meetingStage),!t())throw he;e(kr(Ke(Rn,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(c=e.currentApp||(e.currentApp={}))}(Bn||(Bn={}));var qn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Gn=Je("handlers");class Jn{static initializeHandlers(){Jn.handlers.themeChange=or,Jn.handlers.load=ar,Jn.handlers.beforeUnload=lr,Bn.backStack._initialize()}static uninitializeHandlers(){Jn.handlers={},Jn.themeChangeHandler=null,Jn.loadHandler=null,Jn.beforeUnloadHandler=null,Jn.beforeSuspendOrTerminateHandler=null,Jn.resumeHandler=null}}function Kn(){Jn.initializeHandlers()}function Zn(){Jn.uninitializeHandlers()}Jn.handlers={},Jn.themeChangeHandler=null,Jn.loadHandler=null,Jn.beforeUnloadHandler=null,Jn.beforeSuspendOrTerminateHandler=null,Jn.resumeHandler=null;const Qn=Gn.extend("callHandler");function Xn(e,t){const n=Jn.handlers[e];if(n){Qn("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ar.childWindow?(po(e,t),[!1,void 0]):(Qn("Handler for action message %s not found.",e),[!1,void 0])}function Yn(e,t,n,r=!0,o=[]){n?(Jn.handlers[t]=n,r&&Dr(e,"registerHandler",[t,...o])):delete Jn.handlers[t]}function er(e){delete Jn.handlers[e]}function tr(e){return null!=Jn.handlers[e]}function nr(e,t,n,r,o){n&&Nt(wt,...r),o&&o(),Yn(e,t,n)}function rr(e,t){Jn.themeChangeHandler=t,!_t(t)&&Dr(e,"registerHandler",["themeChange"])}function or(e){Jn.themeChangeHandler&&Jn.themeChangeHandler(e),Ar.childWindow&&po("themeChange",[e])}function ir(e,t){Jn.loadHandler=t,!_t(t)&&Dr(e,"registerHandler",["load"])}function ar(e){const t=sr(e);Jn.resumeHandler?(Jn.resumeHandler(t),Ar.childWindow&&po("load",[t])):Jn.loadHandler&&(Jn.loadHandler(e),Ar.childWindow&&po("load",[e]))}function sr(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function cr(e,t){Jn.beforeUnloadHandler=t,!_t(t)&&Dr(e,"registerHandler",["beforeUnload"])}function lr(){return qn(this,void 0,void 0,(function*(){const e=()=>{Dr(Ke("v2","handleBeforeUnload"),"readyToUnload",[])};Jn.beforeSuspendOrTerminateHandler?(yield Jn.beforeSuspendOrTerminateHandler(),Ar.childWindow?po("beforeUnload"):e()):Jn.beforeUnloadHandler&&Jn.beforeUnloadHandler(e)||(Ar.childWindow?po("beforeUnload"):e())}))}function ur(e){Jn.beforeSuspendOrTerminateHandler=e,!_t(e)&&Dr(Ke("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function dr(e){Jn.resumeHandler=e,!_t(e)&&Dr(Ke("v2","registerOnResumeHandler"),"registerHandler",["load"])}var fr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const pr=e=>{const{uuid:t}=e,n=fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},gr=e=>{const{uuidAsString:t}=e,n=fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new ze(t):void 0})},mr=e=>{const{uuidAsString:t}=e,n=fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new ze(t):void 0})},hr=e=>{const{uuid:t}=e,n=fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},wr=Je("nestedAppAuthUtils"),vr=wr.extend("tryPolyfillWithNestedAppAuthBridge");function Cr(e,t,n){var r;const o=vr;if(ut.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");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=Sr(a,n);s&&(a.nestedAppAuthBridge=s)}const yr=wr.extend("createNestedAppAuthBridge");function Sr(e,t){const n=yr;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}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var br=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 Er=Je("communication");class Ar{}class Ir{}function Tr(e,t){if(Ir.messageListener=e=>zr(e),Ar.currentWindow=Ar.currentWindow||Ne(),Ar.parentWindow=Ar.currentWindow.parent!==Ar.currentWindow.self?Ar.currentWindow.parent:Ar.currentWindow.opener,Ar.topWindow=Ar.currentWindow.top,(Ar.parentWindow||e)&&Ar.currentWindow.addEventListener("message",Ir.messageListener,!1),!Ar.parentWindow){const e=Ar.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));ut.isFramelessWindow=!0,e.onNativeMessage=eo}try{return Ar.parentOrigin="*",Mr(t,"initialize",[Rt,pt,e]).then((([e,t,n,r])=>(Cr(r,Ar.currentWindow,{onMessage:qr,sendPostMessage:Hr}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ar.parentOrigin=null}}function Pr(){Ar.currentWindow&&Ar.currentWindow.removeEventListener("message",Ir.messageListener,!1),Ar.currentWindow=null,Ar.parentWindow=null,Ar.parentOrigin=null,Ar.childWindow=null,Ar.childOrigin=null,Ir.parentMessageQueue=[],Ir.childMessageQueue=[],Ir.nextMessageId=0,Ir.callbacks.clear(),Ir.promiseCallbacks.clear(),Ir.portCallbacks.clear(),Ir.legacyMessageIdsToUuidMap={}}function Fr(e,t,...n){return Mr(e,t,n).then((([e])=>e))}function Or(e,t,...n){return Mr(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function Rr(e,t,n,...r){return Mr(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function kr(e,t,...n){return Mr(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function Mr(e,t,n=void 0){if(!Ze(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(Nr(Br(e,t,n).uuid))}))}function Ur(e,t,n=void 0){if(!Ze(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 Lr(Br(e,t,n).uuid)}function Lr(e){return new Promise(((t,n)=>{Ir.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 Nr(e){return new Promise((t=>{Ir.promiseCallbacks.set(e,t)}))}function Dr(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Ze(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=Br(e,t,o);r&&Ir.callbacks.set(i.uuid,r)}Ir.parentMessageQueue=[],Ir.childMessageQueue=[],Ir.topMessageQueue=[],Ir.nextMessageId=0,Ir.callbacks=new Map,Ir.promiseCallbacks=new Map,Ir.portCallbacks=new Map,Ir.legacyMessageIdsToUuidMap={};const xr=Er.extend("sendNestedAuthRequestToTopWindow");function Hr(e){const t=xr,n=Ar.topWindow,r=mo(e);return t("Message %s information: %o",vo(r),{actionName:r.func}),_r(n,r)}const Vr=Er.extend("sendRequestToTargetWindowHelper");function _r(e,t){const n=Vr,r=so(e),o=pr(t);if(ut.isFramelessWindow)Ar.currentWindow&&Ar.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",vo(o),r),Ar.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=ao(e);e&&i?(n("Sending message %s to %s via postMessage",vo(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",vo(o),r),io(e).push(t))}return t}const Wr=Er.extend("sendMessageToParentHelper");function Br(e,t,n){const r=Wr,o=Ar.parentWindow,i=go(e,t,n);return r("Message %s information: %o",vo(i),{actionName:t,args:n}),_r(o,i)}const jr=Er.extend("processIncomingMessage");function zr(e){return br(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void jr("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 Jr(t,n).then((r=>{r?(Kr(t,n),t===Ar.parentWindow?eo(e):t===Ar.childWindow&&ro(e)):jr("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 $r=Er.extend("processAuthBridgeMessage");function qr(e,t){var n,r;const o=$r;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),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Jr(c,l)?(Ar.topWindow&&!Ar.topWindow.closed&&c!==Ar.topWindow||(Ar.topWindow=c,Ar.topOrigin=l),Ar.topWindow&&Ar.topWindow.closed&&(Ar.topWindow=null,Ar.topOrigin=null),lo(Ar.topWindow),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 Gr=Er.extend("shouldProcessIncomingMessage");function Jr(e,t){return br(this,void 0,void 0,(function*(){if(Ar.currentWindow&&e===Ar.currentWindow)return Gr("Should not process message because it is coming from the current window"),!1;if(Ar.currentWindow&&Ar.currentWindow.location&&t&&t===Ar.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Gr("Message has an invalid origin of %s",t),!1}const n=yield Kt(e);return n||Gr("Message has an invalid origin of %s",t),n}}))}function Kr(e,t){ut.isFramelessWindow||Ar.parentWindow&&!Ar.parentWindow.closed&&e!==Ar.parentWindow?Ar.childWindow&&!Ar.childWindow.closed&&e!==Ar.childWindow||(Ar.childWindow=e,Ar.childOrigin=t):(Ar.parentWindow=e,Ar.parentOrigin=t),Ar.parentWindow&&Ar.parentWindow.closed&&(Ar.parentWindow=null,Ar.parentOrigin=null),Ar.childWindow&&Ar.childWindow.closed&&(Ar.childWindow=null,Ar.childOrigin=null),lo(Ar.parentWindow),lo(Ar.childWindow)}const Zr=Er.extend("handleIncomingMessageFromParent");function Qr(e){const t=Zr;if(!e.uuid)return Ir.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Xr(Ir.callbacks,t);if(n)return n;const r=Xr(Ir.promiseCallbacks,t);if(r)return r;const o=Xr(Ir.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",vo(e))}function Xr(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Yr(e,t){const n=Xr(t,e.uuid);n&&t.delete(n),e.uuid?Ir.legacyMessageIdsToUuidMap={}:delete Ir.legacyMessageIdsToUuidMap[e.id]}function eo(e){const t=Zr;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,r=mr(n),o=Qr(r);if(o){const n=Ir.callbacks.get(o);t("Received a response from parent for message %s",o.toString()),n&&(t("Invoking the registered callback for message %s with arguments %o",o.toString(),r.args),n.apply(null,[...r.args,r.isPartialResponse]),to(e)||(t("Removing registered callback for message %s",o.toString()),Yr(r,Ir.callbacks)));const i=Ir.promiseCallbacks.get(o);i&&(t("Invoking the registered promise callback for message %s with arguments %o",o.toString(),r.args),i(r.args),t("Removing registered promise callback for message %s",o.toString()),Yr(r,Ir.promiseCallbacks));const a=Ir.portCallbacks.get(o);if(a){let n;t("Invoking the registered port callback for message %s with arguments %o",o.toString(),r.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),a(n,r.args),t("Removing registered port callback for message %s",o.toString()),Yr(r,Ir.portCallbacks)}r.uuid&&(Ir.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t('Received a message from parent %s, action: "%s"',vo(n),n.func),Xn(n.func,n.args)}else t("Received an unknown message: %O",e)}function to(e){return!0===e.data.isPartialResponse}const no=Er.extend("handleIncomingMessageFromChild");function ro(e){if("id"in e.data&&"func"in e.data){const t=gr(e.data),[n,r]=Xn(t.func,t.args);n&&void 0!==r?(no("Returning message %s from child back to child, action: %s.",vo(t),t.func),fo(t.id,t.uuid,Array.isArray(r)?r:[r])):(no("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",vo(t),t.func),Dr(Ke("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Ar.childWindow){const n=e.pop();no("Message from parent being relayed to child, id: %s",vo(t)),fo(t.id,t.uuid,e,n)}})))}}function oo(){return Ar.topWindow!==Ar.parentWindow}function io(e){return e===Ar.topWindow&&oo()?Ir.topMessageQueue:e===Ar.parentWindow?Ir.parentMessageQueue:e===Ar.childWindow?Ir.childMessageQueue:[]}function ao(e){return e===Ar.topWindow&&oo()?Ar.topOrigin:e===Ar.parentWindow?Ar.parentOrigin:e===Ar.childWindow?Ar.childOrigin:null}function so(e){return e===Ar.topWindow&&oo()?"top":e===Ar.parentWindow?"parent":e===Ar.childWindow?"child":null}const co=Er.extend("flushMessageQueue");function lo(e){const t=ao(e),n=io(e),r=so(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=pr(o);co("Flushing message %s from %s message queue via postMessage.",vo(n),r),e.postMessage(n,t)}}}function uo(e,t){let n;n=Ar.currentWindow.setInterval((()=>{0===io(e).length&&(clearInterval(n),t())}),100)}function fo(e,t,n,r){const o=Ar.childWindow,i=ho(e,t,n,r),a=hr(i),s=ao(o);o&&s&&o.postMessage(a,s)}function po(e,t){const n=Ar.childWindow,r=wo(e,t),o=ao(n);n&&o?n.postMessage(r,o):io(n).push(r)}function go(e,t,n){const r=Ir.nextMessageId++,o=new ze;return Ir.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),args:n||[],apiVersionTag:e}}function mo(e){const t=Ir.nextMessageId++,n=new ze;return Ir.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function ho(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function wo(e,t){return{func:e,args:t||[]}}function vo(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}var Co,yo,So,bo;!function(e){function t(){return!(!Nt(wt)||!wt.supports.logs)}e.registerGetLogHandler=function(e){if(!_t(e)&&Nt(wt),!_t(e)&&!t())throw he;e?Yn(Ke("v1","log.request"),"log.request",(()=>{const t=e();Dr(Ke("v1","log.receive"),"log.receive",[t])})):er("log.request")},e.isSupported=t}(Co||(Co={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(yo||(yo={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(So||(So={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(bo||(bo={}));const Eo="v1";function Ao(e,t){Nt(wt),Dr(Ke(Eo,"uploadCustomApp"),"uploadCustomApp",[e],t||be())}function Io(e,t,n){Nt(wt),Dr(Ke(Eo,"sendCustomMessage"),e,t,n)}function To(e,t){if(Nt(wt),!Ar.childWindow)throw new Error("The child window has not yet been initialized or is not present");po(e,t)}function Po(e,t){Nt(wt),Yn(Ke(Eo,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Fo(e,t){Nt(wt),Yn(Ke(Eo,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Oo(e){Nt(wt,le.content,le.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];Dr(Ke(Eo,"openFilePreview"),"openFilePreview",t)}const Ro="v1";var ko,Mo;!function(e){function t(){return!(!Nt(wt)||!wt.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Nt(wt,le.content),!t())throw he;const r=Or(Ke(Ro,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Yn(Ke(Ro,"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&&Yn(Ke(Ro,"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})})),n(r)}))},e.closeConversation=function(){if(Nt(wt,le.content),!t())throw he;Dr(Ke(Ro,"conversations.closeConversation"),"conversations.closeConversation"),er("startConversation"),er("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Nt(wt),!t())throw he;e(Fr(Ke(Ro,"conversations.getChatMember"),"getChatMembers"))}))},e.isSupported=t}(ko||(ko={})),function(e){let t;!function(e){function t(){var e;return Nt(wt)&&!!(null===(e=wt.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)}e.isSupported=t,e.getEligibilityInfo=function(){if(Nt(wt),!t())throw he;return wt.hostVersionsInfo.appEligibilityInformation}}(t=e.eligibility||(e.eligibility={}))}(Mo||(Mo={}));const Uo="v2";var Lo;!function(e){const t="Action.Execute";let n,r,o;function i(e){if(e.requestType===n.ActionExecuteInvokeRequest){const n=e;if(n.type!==t){throw{errorCode:o.INTERNAL_ERROR,message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if(e.requestType===n.QueryMessageExtensionRequest){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 a(){return!(!Nt(wt)||!wt.supports.externalAppAuthentication)}!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(n=e.OriginalRequestType||(e.OriginalRequestType={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(r=e.InvokeResponseType||(e.InvokeResponseType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(o=e.InvokeErrorCode||(e.InvokeErrorCode={})),e.authenticateAndResendRequest=function(e,t,n){if(Nt(wt,le.content),!a())throw he;const r=new tn(e);return i(n),Mr(Ke(Uo,"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}))},e.authenticateWithSSO=function(e,t){if(Nt(wt,le.content),!a())throw he;const n=new tn(e);return Mr(Ke(Uo,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(Nt(wt,le.content),!a())throw he;const r=new tn(e);return i(n),Mr(Ke(Uo,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithOauth2=function(e,t,n){if(Nt(wt,le.content),!a())throw he;return xe(e,new Error("titleId is Invalid.")),xe(t,new Error("oauthConfigId is Invalid.")),Mr(Ke(Uo,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithPowerPlatformConnectorPlugins=function(e,t,n){if(Nt(wt,le.content),!a())throw he;return xe(e,new Error("titleId is Invalid.")),t&&He(t),Mr(Ke(Uo,"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}))},e.isSupported=a}(Lo||(Lo={}));var No;!function(e){let t,n;function r(){return!(!Nt(wt)||!wt.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(t=e.ActionOpenUrlType||(e.ActionOpenUrlType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(n=e.ActionOpenUrlErrorCode||(e.ActionOpenUrlErrorCode={})),e.processActionSubmit=function(e,t){if(Nt(wt,le.content),!r())throw he;const n=new tn(e);return Mr(Ke("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t,n){if(Nt(wt,le.content),!r())throw he;const o=new tn(e);return Mr(Ke("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[o.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=r}(No||(No={}));var Do=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var xo;!function(e){function t(){return!(!Nt(wt)||!wt.supports.externalAppCardActionsForCEA)}e.processActionOpenUrl=function(e,n,r){return Do(this,void 0,void 0,(function*(){if(Nt(wt,le.content),!t())throw he;xe(n,new Error("conversation id is not valid."));const[o,i]=yield Mr(Ke("v2","externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),n,r.href]);if(o)throw o;return i}))},e.processActionSubmit=function(e,n,r){return Do(this,void 0,void 0,(function*(){if(Nt(wt,le.content),!t())throw he;xe(n,new Error("conversation id is not valid."));const o=yield Fr(Ke("v2","externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),n,r);if(o)throw o}))},e.isSupported=t}(xo||(xo={}));var Ho=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var Vo;!function(e){function t(){return!(!Nt(wt)||!wt.supports.externalAppCommands)}e.processActionCommand=function(e,n,r){return Ho(this,void 0,void 0,(function*(){if(Nt(wt,le.content),!t())throw he;const o=new tn(e),[i,a]=yield Mr(Ke("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[o.toString(),n,r]);if(i)throw i;return a}))},e.isSupported=t}(Vo||(Vo={}));const _o="v1";var Wo;!function(e){let t,n,r,o,i,a;function s(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"}(t=e.CloudStorageProvider||(e.CloudStorageProvider={})),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"}(n=e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(r=e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(o=e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(i=e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(a=e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Nt(wt,le.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");Dr(Ke(_o,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Nt(wt,le.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");Dr(Ke(_o,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Nt(wt,le.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");Dr(Ke(_o,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Nt(wt,le.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");Dr(Ke(_o,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Nt(wt,le.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");Dr(Ke(_o,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Nt(wt,le.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Dr(Ke(_o,"files.getExternalProviders"),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,o=!1,i){if(Nt(wt,le.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");Dr(Ke(_o,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)},e.getFileDownloads=function(e){if(Nt(wt,le.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Dr(Ke(_o,"files.getFileDownloads"),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Nt(wt,le.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Dr(Ke(_o,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Nt(wt,le.content),!e)throw s(ee.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Dr(Ke(_o,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(Nt(wt,le.content),!t)throw s(ee.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw s(ee.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Dr(Ke(_o,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(Nt(wt,le.content),!t)throw s(ee.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw s(ee.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Dr(Ke(_o,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(Nt(wt,le.content),!t)throw s(ee.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw s(ee.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Dr(Ke(_o,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(Nt(wt,le.content),!t)throw s(ee.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw s(ee.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Dr(Ke(_o,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(Nt(wt,le.content),!t)throw s(ee.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw s(ee.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Dr(Ke(_o,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(Nt(wt,le.content),!t)throw s(ee.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw s(ee.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw s(ee.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Dr(Ke(_o,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Nt(wt),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Yn(Ke(_o,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Nt(wt),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Yn(Ke(_o,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}}(Wo||(Wo={}));const Bo="v1";var jo;!function(e){function t(){return!(!Nt(wt)||!wt.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Nt(wt),!t())throw he;e(kr(Ke(Bo,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((n=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Nt(wt),!t())throw he;n(kr(Ke(Bo,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Nt(wt),!t())throw he;Yn(Ke(Bo,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Nt(wt),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Nt(wt),!t())throw he;Yn(Ke(Bo,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Nt(wt),e(t)}))},e.isSupported=t}(jo||(jo={}));var zo,$o;!function(e){function t(){return!(!Nt(wt)||!wt.supports.notifications)}e.showNotification=function(e){if(Nt(wt,le.content),!t())throw he;Dr(Ke("v1","notifications.showNotification"),"notifications.showNotification",[e])},e.isSupported=t}(zo||(zo={})),function(e){function t(){return!(!Nt(wt)||!wt.supports.otherAppStateChange)}e.registerAppInstallationHandler=function(e){if(!t())throw new Error(ee.NOT_SUPPORTED_ON_PLATFORM.toString());if(_t(e))throw new Error(ee.INVALID_ARGUMENTS.toString());Yn(Ke("v2","otherApp.install"),"otherApp.install",e)},e.unregisterAppInstallationHandler=function(){if(!t())throw new Error(ee.NOT_SUPPORTED_ON_PLATFORM.toString());Dr(Ke("v2","otherApp.unregisterInstall"),"otherApp.unregisterInstall"),er("otherApp.install")},e.isSupported=t}($o||($o={}));const qo="v1";var Go;!function(e){let t,n,r;function o(){return!(!Nt(wt)||!wt.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"}(t=e.ControlCommand||(e.ControlCommand={})),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"}(n=e.ErrorReason||(e.ErrorReason={})),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"}(r=e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Nt(wt,le.sidePanel),!o())throw he;Dr(Ke(qo,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)},e.requestControl=function(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(Nt(wt,le.sidePanel),!o())throw he;Dr(Ke(qo,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)},e.sendControlCommand=function(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(Nt(wt,le.sidePanel),!o())throw he;Dr(Ke(qo,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Nt(wt,le.sidePanel),!o())throw he;Dr(Ke(qo,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Nt(wt,le.sidePanel),!o())throw he;Yn(Ke(qo,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Nt(wt,le.sidePanel),!o())throw he;Yn(Ke(qo,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Nt(wt,le.sidePanel),!o())throw he;Yn(Ke(qo,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Nt(wt,le.sidePanel),!o())throw he;Yn(Ke(qo,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)},e.isSupported=o}(Go||(Go={}));var Jo;!function(e){function t(){return!(!Nt(wt)||!wt.supports.appEntity)}e.selectAppEntity=function(e,n,r,o){if(Nt(wt,le.content),!t())throw he;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!o)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Dr(Ke("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,n,r],o)},e.isSupported=t}(Jo||(Jo={}));const Ko="v1";var Zo;!function(e){let t,n;function r(){return!(!Nt(wt)||!wt.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(t=e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,t){if(Nt(wt,le.content),!r())throw he;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Dr(Ke(Ko,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(Nt(wt),!r())throw he;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Dr(Ke(Ko,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)},e.isSupported=r,function(e){let t;function n(){return!(!Nt(wt)||!wt.supports.teams)&&!!wt.supports.teams.fullTrust}!function(e){function t(){return!(!Nt(wt)||!wt.supports.teams)&&(!!wt.supports.teams.fullTrust&&!!wt.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Nt(wt),!t())throw he;if((ut.hostClientType===se.android||ut.hostClientType===se.teamsRoomsAndroid||ut.hostClientType===se.teamsPhones||ut.hostClientType===se.teamsDisplays)&&!Dt("2.0.1")){const e={errorCode:ee.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(Fr(Ke(Ko,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Nt(wt),!n())throw he;t(Fr(Ke(Ko,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Zo||(Zo={}));class Qo{static setTimeout(e,t){const n=performance.now(),r=Ae();return Qo.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Qo.setTimeoutCallbacks[e]}static setInterval(e,t){Qo.setTimeout((function n(){e(),Qo.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Qo.setTimeoutCallbacks){const r=Qo.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Qo.setTimeoutCallbacks[e].callback(),delete Qo.setTimeoutCallbacks[e]}}}Qo.setTimeoutCallbacks={};class Xo{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Qo.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&&Qo.clearTimeout(this.timeoutId),this.timeoutId=Qo.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(Xo.maxSessionTimeoutInMs,2*t.timeoutInMs):Xo.initialSessionTimeoutInMs}}Xo.initialSessionTimeoutInMs=1e3,Xo.maxSessionTimeoutInMs=3e4;const Yo="v2";class ei{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Xo(ei.distributionBinSize,(e=>this.reportPerformanceEvent(Ke(Yo,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Qo.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Ke(Yo,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ei.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){Qo.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(Ke(Yo,"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(Ke(Yo,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ei.distributionBinSize=1e3,ei.calculateFPSInterval=1e3;var ti=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},ni=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 ri="v2";var oi;!function(e){const t=De()?void 0:new ei(Dr);let n,r,o;function i(e){Dr(Ke(ri,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function a(e){Dr(Ke(ri,"videoEffects.notifyError"),"video.notifyError",[e])}function s(){return Nt(wt)&&!!wt.supports.video&&(!!wt.supports.video.mediaStream||!!wt.supports.video.sharedFrame)}function c(e,n){if(Nt(wt,le.sidePanel),!s()||!f())throw he;Yn(Ke(ri,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>ti(this,void 0,void 0,(function*(){const{streamId:r}=n,o=l(e,t);yield si(r,o,a,t)}))),!1),Dr(Ke(ri,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])}function l(e,t){return n=>ti(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 u(e,n){if(Nt(wt,le.sidePanel),!s()||!g())throw he;Yn(Ke(ri,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(n=>{if(n){const r=n.timestamp;null==t||t.reportStartFrameProcessing(n.width,n.height),e(d(n),(()=>{null==t||t.reportFrameProcessed(),i(r)}),a)}}),!1),Dr(Ke(ri,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])}function d(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=ni(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function f(){var e;return Nt(wt,le.sidePanel)&&p()&&!!(null===(e=wt.supports.video)||void 0===e?void 0:e.mediaStream)}function p(){var e,t,n,r;return!(!(null===(t=null===(e=Ne().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Ne().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function g(){var e;return Nt(wt,le.sidePanel)&&!!(null===(e=wt.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(n=e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(r=e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(o=e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Nt(wt,le.sidePanel),!s())throw he;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Yn(Ke(ri,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),f())c(e.videoFrameHandler,e.config);else{if(!g())throw he;u(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Nt(wt,le.sidePanel),!s())throw he;Dr(Ke(ri,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Nt(wt,le.sidePanel),!s())throw he;Yn(Ke(ri,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",hi(e,t),!1),Dr(Ke(ri,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},e.isSupported=s}(oi||(oi={}));var ii=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 ai="v2";function si(e,t,n,r){var o,i;return ii(this,void 0,void 0,(function*(){const a=ui();!De()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),di(yield li(e,n,r),new fi(n,t),a.writable)}))}function ci(e,t,n,r){var o,i;return ii(this,void 0,void 0,(function*(){const a=ui();!De()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),di(yield li(e,n,r),new mi(n,t),a.writable)}))}function li(e,t,n){return ii(this,void 0,void 0,(function*(){if(De())throw he;const r=Ne().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 ui(){if(De())throw he;const e=window.MediaStreamTrackGenerator;if(!e)throw he;return new e({kind:"video"})}function di(e,t,n){new(0,Ne().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class fi{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>ii(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 pi{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 gi{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 mi{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>ii(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=>ii(this,void 0,void 0,(function*(){if(De())throw he;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 pi(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 gi(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}}})),Yn(Ke(ai,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function hi(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Dr(Ke(ai,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in oi.EffectFailureReason?e:oi.EffectFailureReason.InitializationFailure;Dr(Ke(ai,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var wi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const vi="v2";var Ci;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=De()?void 0:new ei(Dr);let n;function r(){const t=setTimeout((()=>{c(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,n.Warn)}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function o(e,t){return n=>wi(this,void 0,void 0,(function*(){const o=n.videoFrame;t.reportStartFrameProcessing(o.codedWidth,o.codedHeight);const i=r(),a=yield e(n);return i(),t.reportFrameProcessed(),a}))}function i(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function a(){return Nt(wt),oi.isSupported()}function s(e){Dr(Ke(vi,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function c(e,t=n.Warn){Dr(Ke(vi,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}!function(e){e.Fatal="fatal",e.Warn="warn"}(n=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var n,l;if(!a())throw he;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Nt(wt,le.sidePanel)){if(Yn(Ke(vi,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=wt.supports.video)||void 0===n?void 0:n.mediaStream)Yn(Ke(vi,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(n=>wi(this,void 0,void 0,(function*(){const{streamId:r,metadataInTexture:i}=n,a=t?o(e.videoFrameHandler,t):e.videoFrameHandler;i?yield ci(r,a,c,t):yield si(r,a,c,t)}))),!1),Dr(Ke(vi,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(l=wt.supports.video)||void 0===l?void 0:l.sharedFrame))throw he;Yn(Ke(vi,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(n=>{if(n){null==t||t.reportStartFrameProcessing(n.width,n.height);const o=r(),a=n.timestamp;e.videoBufferHandler(i(n),(()=>{o(),null==t||t.reportFrameProcessed(),s(a)}),c)}}),!1),Dr(Ke(vi,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Nt(wt,le.sidePanel),!a())throw he;Dr(Ke(vi,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Nt(wt,le.sidePanel),!a())throw he;Yn(Ke(vi,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",hi(e,t),!1),Dr(Ke(vi,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Nt(wt,le.sidePanel),!oi.isSupported())throw he;Dr(Ke(vi,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},e.isSupported=a,e.notifyFatalError=function(e){if(Nt(wt),!oi.isSupported())throw he;c(e,n.Fatal)}}(Ci||(Ci={}));const yi="v2";var Si;!function(e){let t,n;!function(e){e.edu="EDU"}(t=e.AppTypes||(e.AppTypes={})),function(t){function n(){var t;return!!(Nt(wt)&&e.isSupported()&&(null===(t=wt.supports.hostEntity)||void 0===t?void 0:t.tab))}function r(e){if(!e||0==e.length)throw new Error(`Error code: ${ee.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function o(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${ee.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}t.addAndConfigure=function(e,t){if(Nt(wt),!n())throw new Error(`Error code: ${ee.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(r(e.threadId),t&&0===t.length)throw new Error(`Error code: ${ee.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Mr(Ke(yi,"hostEntity.tab.addAndConfigure"),"hostEntity.tab.addAndConfigure",[e,t]).then((([e])=>{var t;if(pe(e))throw new Error(`Error code: ${e.errorCode}, message: ${null!==(t=e.message)&&void 0!==t?t:"None"}`);return e}))},t.getAll=function(e){if(Nt(wt),!n())throw new Error(`Error code: ${ee.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return r(e.threadId),Mr(Ke(yi,"hostEntity.tab.getAll"),"hostEntity.tab.getAll",[e]).then((([e])=>{var t;if(pe(e))throw new Error(`Error code: ${e.errorCode}, message: ${null!==(t=e.message)&&void 0!==t?t:"None"}`);return e}))},t.reconfigure=function(e,t){if(Nt(wt),!n())throw new Error(`Error code: ${ee.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return o(e),r(t.threadId),Mr(Ke(yi,"hostEntity.tab.reconfigure"),"hostEntity.tab.reconfigure",[e,t]).then((([e])=>{var t;if(pe(e))throw new Error(`Error code: ${e.errorCode}, message: ${null!==(t=e.message)&&void 0!==t?t:"None"}`);return e}))},t.rename=function(e,t){if(Nt(wt),!n())throw new Error(`Error code: ${ee.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return o(e),r(t.threadId),Mr(Ke(yi,"hostEntity.tab.rename"),"hostEntity.tab.rename",[e,t]).then((([e])=>{var t;if(pe(e))throw new Error(`Error code: ${e.errorCode}, message: ${null!==(t=e.message)&&void 0!==t?t:"None"}`);return e}))},t.remove=function(e,t){if(Nt(wt),!n())throw new Error(`Error code: ${ee.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return r(t.threadId),o(e),Mr(Ke(yi,"hostEntity.tab.remove"),"hostEntity.tab.remove",[e,t]).then((([e])=>{var t;if(pe(e))throw new Error(`Error code: ${e.errorCode}, message: ${null!==(t=e.message)&&void 0!==t?t:"None"}`);return!0}))},t.isSupported=n}(n=e.tab||(e.tab={})),e.isSupported=function(){return!(!Nt(wt)||!wt.supports.hostEntity)}}(Si||(Si={}));const bi="users";function Ei(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${bi}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&topicName=${encodeURIComponent(t)}`,i=void 0===n?"":`&message=${encodeURIComponent(n)}`;return`${it}://${at}/l/chat/0/0?${r}${o}${i}`}function Ai(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${bi}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&withVideo=${encodeURIComponent(t)}`,i=void 0===n?"":`&source=${encodeURIComponent(n)}`;return`${it}://${at}/l/call/0/0?${r}${o}${i}`}function Ii(e,t,n,r,o){const i=void 0===e?"":"attendees="+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&startTime=${encodeURIComponent(t)}`,s=void 0===n?"":`&endTime=${encodeURIComponent(n)}`,c=void 0===r?"":`&subject=${encodeURIComponent(r)}`,l=void 0===o?"":`&content=${encodeURIComponent(o)}`;return`${it}://${at}/l/meeting/new?${i}${a}${s}${c}${l}`}function Ti(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${it}://${at}/l/app/${encodeURIComponent(e)}`}var Pi;!function(e){function t(){return!(!Nt(wt)||!wt.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Nt(wt,le.content,le.sidePanel,le.settings,le.task,le.stage,le.meetingStage),!t())throw new Error("Not supported");const r=Ke("v1","appInstallDialog.openAppInstallDialog");wt.isLegacyTeams?n(Or(r,"executeDeepLink",Ti(e.appId))):(Dr(r,"appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(Pi||(Pi={}));const Fi="v1",Oi=Je("media");var Ri;function ki(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 Mi(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 Ui(e){xi(e)?Ht("2.0.2"):Hi(e)?Ht(Ye):Di(e)&&Ht("2.0.4")}function Li(e){return!(e.mediaType!=Ri.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function Ni(e){return!(null==e||e.maxMediaCount>10)}function Di(e){var t;return!((null==e?void 0:e.mediaType)!=Ri.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function xi(e){return!(!e||e.mediaType!=Ri.MediaType.VideoAndImage&&!e.videoAndImageProps)}function Hi(e){return!(!e||e.mediaType!=Ri.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Vi(e,t,n){return null!=e&&null!=t&&t==Ri.FileFormat.ID&&null!=n}function _i(e){return!(null==e||e.length<=0||e.length>10)}function Wi(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Bi(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){let t,n,r,o,i,a,s;!function(e){e.Base64="base64",e.ID="id"}(t=e.FileFormat||(e.FileFormat={}));class c{}function l(){return!(!Nt(wt)||!wt.supports.permissions)}e.File=c,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Nt(wt,le.content,le.task),ut.isFramelessWindow)if(Dt("1.7.0"))Dr(Ke(Fi,"media.captureImage"),"captureImage",e);else{e({errorCode:ee.OLD_PLATFORM},[])}else{e({errorCode:ee.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Nt(wt,le.content,le.task),!l())throw he;const e=te.Media;return new Promise((t=>{t(kr(Ke(Fi,"media.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Nt(wt,le.content,le.task),!l())throw he;const e=te.Media;return new Promise((t=>{t(kr(Ke(Fi,"media.requestPermission"),"permissions.request",e))}))};class u extends c{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(Nt(wt,le.content,le.task),Dt(tt))if(Vi(this.mimeType,this.format,this.content))Dt("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:ee.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:ee.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Dr(Ke(Fi,"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=ki(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Mi(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Oi(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:ee.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Ae(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!_t(e)&&Dr(Ke(Fi,"media.getMedia"),"getMedia",r),Yn(Ke(Fi,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),er("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=ki(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),er("getMedia"+t)}else{const e=Mi(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:ee.INTERNAL_ERROR,message:"data received is null"},new Blob),er("getMedia"+t)}}))}}e.Media=u;class d{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Nt(wt,le.content,le.task);try{Ht(Ye)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Dr(Ke(Fi,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(n.StopRecording,e)}}e.VideoController=class extends d{getMediaType(){return i.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case n.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}},function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(n=e.MediaControllerEvent||(e.MediaControllerEvent={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(r=e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(o=e.Source||(e.Source={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(i=e.MediaType||(e.MediaType={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(a=e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(s=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Nt(wt,le.content,le.task),!Dt(tt)){const e={errorCode:ee.OLD_PLATFORM};return void t(e,[])}try{Ui(e)}catch(e){return void t(e,[])}if(!Ni(e)){const e={errorCode:ee.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Dr(Ke(Fi,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Li(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 u(e));t(n,s)}))},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Nt(wt,le.content,le.task),!Dt(tt)){return void t({errorCode:ee.OLD_PLATFORM})}if(!_i(e)){return void t({errorCode:ee.INVALID_ARGUMENTS})}const n=[e];Dr(Ke(Fi,"media.viewImages"),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Nt(wt,le.content,le.task),ut.hostClientType!==se.desktop&&ut.hostClientType!==se.web&&ut.hostClientType!==se.rigel&&ut.hostClientType!==se.teamsRoomsWindows&&ut.hostClientType!==se.teamsRoomsAndroid&&ut.hostClientType!==se.teamsPhones&&ut.hostClientType!==se.teamsDisplays)if(Dt("1.9.0"))if(Wi(t))Dr(Ke(Fi,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:ee.INVALID_ARGUMENTS},"")}else{e({errorCode:ee.OLD_PLATFORM},"")}else{e({errorCode:ee.NOT_SUPPORTED_ON_PLATFORM},"")}}}(Ri||(Ri={}));const ji="v2";var zi;!function(e){function t(){return!!(Nt(wt)&&wt.supports.barCode&&wt.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Nt(wt,le.content,le.task),!t())throw he;if(!Wi(e))throw{errorCode:ee.INVALID_ARGUMENTS};n(kr(Ke(ji,"barCode.scanBarCode"),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Nt(wt,le.content,le.task),!t())throw he;const e=te.Media;return new Promise((t=>{t(kr(Ke(ji,"barCode.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Nt(wt,le.content,le.task),!t())throw he;const e=te.Media;return new Promise((t=>{t(kr(Ke(ji,"barCode.requestPermission"),"permissions.request",e))}))},e.isSupported=t}(zi||(zi={}));var $i;!function(e){function t(e,t){return new Promise((r=>{if(Nt(wt,le.content,le.task),!n())throw he;if(wt.isLegacyTeams)r(Or(e,"executeDeepLink",Ei([t.user],void 0,t.message)));else{r(Or(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Nt(wt)||!wt.supports.chat)}e.openChat=function(e){return t(Ke("v2","chat.openChat"),e)},e.openGroupChat=function(e){const r=Ke("v2","chat.openGroupChat");return new Promise((o=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const n={user:e.users[0],message:e.message};o(t(r,n))}else{if(Nt(wt,le.content,le.task),!n())throw he;if(wt.isLegacyTeams)o(Or(r,"executeDeepLink",Ei(e.users,e.topic,e.message)));else{o(Or(r,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}($i||($i={}));var qi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var Gi,Ji;!function(e){function t(){return ut.isFramelessWindow?!(!Nt(wt)||!wt.supports.clipboard):!!(Nt(wt)&&navigator&&navigator.clipboard&&wt.supports.clipboard)}e.write=function(e){return qi(this,void 0,void 0,(function*(){if(Nt(wt,le.content,le.meetingStage,le.task,le.settings,le.stage,le.sidePanel),!t())throw he;if(!e.type||!Object.values(ae).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(ae)}`);const n=yield Le(e),r={mimeType:e.type,content:n};return kr(Ke("v2","clipboard.write"),"clipboard.writeToClipboard",r)}))},e.read=function(){return qi(this,void 0,void 0,(function*(){Nt(wt,le.content,le.meetingStage,le.task,le.settings,le.stage,le.sidePanel);const e=Ke("v2","clipboard.read");if(!t())throw he;const n=yield kr(e,"clipboard.readFromClipboard");if("string"==typeof n){const e=JSON.parse(n);return Ue(e.mimeType,e.content)}return n}))},e.isSupported=t}(Gi||(Gi={})),function(e){e.isNAAChannelRecommended=function(){var e;return null!==(e=Nt(wt)&&wt.isNAAChannelRecommended)&&void 0!==e&&e}}(Ji||(Ji={}));const Ki="v2";var Zi;function Qi(){return wt.hostVersionsInfo?wt.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Nt(wt)&&wt.supports.geoLocation&&wt.supports.permissions)}let n;e.getCurrentLocation=function(){if(Nt(wt,le.content,le.task),!t())throw he;return kr(Ke(Ki,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Nt(wt,le.content,le.task),!t())throw he;const e=te.GeoLocation;return new Promise((t=>{t(kr(Ke(Ki,"geoLocation.hasPermission"),"permissions.has",e))}))},e.requestPermission=function(){if(Nt(wt,le.content,le.task),!t())throw he;const e=te.GeoLocation;return new Promise((t=>{t(kr(Ke(Ki,"geoLocation.requestPermission"),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Nt(wt)&&wt.supports.geoLocation&&wt.supports.geoLocation.map&&wt.supports.permissions)}e.chooseLocation=function(){if(Nt(wt,le.content,le.task),!t())throw he;return kr(Ke(Ki,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Nt(wt,le.content,le.task),!t())throw he;if(!e)throw{errorCode:ee.INVALID_ARGUMENTS};return kr(Ke(Ki,"geoLocation.showLocation"),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Zi||(Zi={}));const Xi="v1";class Yi{postMessage(e,t){Nt(wt),Dr(Ke(Xi,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||be())}addEventListener(e,t){Nt(wt),"message"===e&&Yn(Ke(Xi,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class ea{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Nt(wt,le.task),Dr(Ke(Xi,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||be())}addEventListener(e,t){Nt(wt,le.task),"message"===e&&Yn(Ke(Xi,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}var ta;!function(e){function t(){return!(!Nt(wt)||!wt.supports.secondaryBrowser)}e.open=function(e){if(Nt(wt,le.content),!t())throw he;if(!e||!Me(e))throw{errorCode:ee.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return kr(Ke("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())},e.isSupported=t}(ta||(ta={}));var na;!function(e){function t(){return!(!Nt(wt)||!wt.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Nt(wt,le.content,le.task),!Dt(et))throw{errorCode:ee.OLD_PLATFORM};if(!e)throw{errorCode:ee.INVALID_ARGUMENTS};if(!t())throw he;Dr(Ke("v1","location.getLocation"),"location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Nt(wt,le.content,le.task),!Dt(et))throw{errorCode:ee.OLD_PLATFORM};if(!e)throw{errorCode:ee.INVALID_ARGUMENTS};if(!t())throw he;Dr(Ke("v1","location.showLocation"),"location.showLocation",[e],n)},e.isSupported=t}(na||(na={}));var ra=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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 oa="v1";var ia;!function(e){let t,n,r,o,i,a,s;function c(e,n){Dr(Ke(oa,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((r,o)=>{if(r&&null!=o)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(r)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${r.errorCode} ${r.message}`);if("boolean"!=typeof o)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Yn(Ke(oa,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(n=>ra(this,void 0,void 0,(function*(){try{const r=yield e.micMuteStateChangedCallback(n);u(r,r.isMicMuted===n.isMicMuted?t.HostInitiated:t.AppDeclinedToChange)}catch(e){u(n,t.AppFailedToChange)}}))));Yn(Ke(oa,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(o)}))}function l(e,t){Dr(Ke(oa,"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");tr("meeting.micStateChanged")&&er("meeting.micStateChanged"),tr("meeting.audioDeviceSelectionChanged")&&er("meeting.audioDeviceSelectionChanged"),t(n)}))}function u(e,t){Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"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"}(t||(t={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(n=e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(r=e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(o=e.CallType||(e.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(i=e.SharingProtocol||(e.SharingProtocol={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage,le.settings,le.content),Dr(Ke(oa,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},e.getMeetingDetailsVerbose=function(){var e,t,n;return ra(this,void 0,void 0,(function*(){let r;Nt(wt,le.sidePanel,le.meetingStage,le.settings,le.content);try{const e=!0;r=yield kr(Ke("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)==o.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==o.OneOnOneCall)&&!r.details.originalCaller)throw new Error(ee.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage,le.task),Dr(Ke(oa,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Nt(wt,le.sidePanel),Dr(Ke(oa,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Nt(wt,le.sidePanel),Dr(Ke(oa,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Nt(wt,le.sidePanel),Dr(Ke(oa,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Nt(wt,le.sidePanel),Yn(Ke(oa,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t,n={sharingProtocol:i.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Dr(Ke(oa,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Yn(Ke(oa,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Yn(Ke(oa,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Nt(wt,le.sidePanel,le.meetingStage),Yn(Ke(oa,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)},e.joinMeeting=function(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Nt(wt);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||a.Other};return kr(Ke("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)},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"}(a=e.EventActionSource||(e.EventActionSource={})),function(e){e.setOptions=function(e){Nt(wt,le.sidePanel),e.contentUrl&&new URL(e.contentUrl),Dr(Ke(oa,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}}(s=e.appShareButton||(e.appShareButton={})),e.requestAppAudioHandling=function(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");Nt(wt,le.sidePanel,le.meetingStage),e.isAppHandlingAudio?c(e,t):l(e,t)},e.updateMicState=function(e){u(e,t.AppInitiated)}}(ia||(ia={}));var aa;!function(e){function t(){return!(!Nt(wt)||!wt.supports.monetization)}e.openPurchaseExperience=function(e,n){let r,o,i="";return"function"==typeof e?(r=e,o=n,i=Ke("v1","monetization.openPurchaseExperience")):(o=e,i=Ke("v2","monetization.openPurchaseExperience")),Nt(wt,le.content),Fe((()=>new Promise((e=>{if(!t())throw he;e(kr(i,"monetization.openPurchaseExperience",o))}))),r)},e.isSupported=t}(aa||(aa={}));var sa;!function(e){function t(){return!(!Nt(wt)||!wt.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Nt(wt,le.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(Or(Ke("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Nt(wt,le.content),!t())throw new Error("Not supported");const r=Ke("v2","calendar.composeMeeting");wt.isLegacyTeams?n(Or(r,"executeDeepLink",Ii(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(Or(r,"calendar.composeMeeting",e))}))},e.isSupported=t}(sa||(sa={}));var ca;!function(e){function t(){return!(!Nt(wt)||!wt.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Nt(wt,le.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(Or(Ke("v2","mail.openMailItem"),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Nt(wt,le.content),!t())throw new Error("Not supported");n(Or(Ke("v2","mail.composeMail"),"mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(n=e.ComposeMailType||(e.ComposeMailType={}))}(ca||(ca={}));var la;!function(e){function t(){Ne().print()}function n(e,t,n){!_t(t)&&Nt(wt),!_t(t)&&n&&n(),ir(e,t)}function r(e,t,n){!_t(t)&&Nt(wt),!_t(t)&&n&&n(),cr(e,t)}function o(){return!(!Nt(wt)||!wt.supports.teamsCore)}e.enablePrintCapability=function(){if(!ut.printCapabilityEnabled){if(Nt(wt),!o())throw he;ut.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}},e.print=t,e.registerOnLoadHandler=function(e){n(Ke("v2","teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!_t(e)&&!o())throw he}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(Ke("v2","teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!_t(e)&&!o())throw he}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=o}(la||(la={}));var ua;function da(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?fa(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function fa(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"]}!function(e){function t(e,t){return new Promise((r=>{if(!Dt("2.0.0"))throw{errorCode:ee.OLD_PLATFORM};if(!Bi(t))throw{errorCode:ee.INVALID_ARGUMENTS};if(!n())throw he;r(kr(e,"people.selectPeople",t))}))}function n(){return!(!Nt(wt)||!wt.supports.people)}e.selectPeople=function(e,n){let r,o;Nt(wt,le.content,le.task,le.settings);let i="";return"function"==typeof e?([r,o]=[e,n],i=Ke("v1","people.selectPeople")):(o=e,i=Ke("v2","people.selectPeople")),Te(t,r,i,o)},e.isSupported=n}(ua||(ua={}));var pa;!function(e){e.showProfile=function(e){return Nt(wt,le.content),new Promise((t=>{const[n,r]=da(e);if(!n)throw{errorCode:ee.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(kr(Ke("v2","profile.showProfile"),"profile.showProfile",o))}))},e.isSupported=function(){return!(!Nt(wt)||!wt.supports.profile)}}(pa||(pa={}));const ga="v2";var ma;!function(e){const t="search.queryChange",n="search.queryClose",r="search.queryExecute";function o(){return!(!Nt(wt)||!wt.supports.search)}e.registerHandlers=function(e,i,a){if(Nt(wt,le.content),!o())throw he;Yn(Ke(ga,"search.registerOnClosedHandler"),n,e),Yn(Ke(ga,"search.registerOnExecutedHandler"),r,i),a&&Yn(Ke(ga,"search.registerOnChangeHandler"),t,a)},e.unregisterHandlers=function(){if(Nt(wt,le.content),!o())throw he;Dr(Ke(ga,"search.unregisterHandlers"),"search.unregister"),er(t),er(n),er(r)},e.isSupported=o,e.closeSearch=function(){return new Promise((e=>{if(Nt(wt,le.content),!o())throw new Error("Not supported");e(Or(Ke(ga,"search.closeSearch"),"search.closeSearch"))}))}}(ma||(ma={}));var ha=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var wa;!function(e){function t(t,n){return new Promise((r=>{if(!i())throw he;r(kr(t,e.SharingAPIMessages.shareWebContent,n))}))}function n(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:ee.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function r(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:ee.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:ee.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function o(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:ee.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:ee.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function i(){return!(!Nt(wt)||!wt.supports.sharing)}let a;e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,i){try{n(e),r(e),o(e)}catch(e){return Pe((()=>Promise.reject(e)),i)}return Nt(wt,le.content,le.sidePanel,le.task,le.stage,le.meetingStage),Pe(t,i,Ke(i?"v1":"v2","sharing.shareWebContent"),e)},e.isSupported=i,function(e){function t(){var e;return Nt(wt)&&void 0!==(null===(e=wt.supports.sharing)||void 0===e?void 0:e.history)}e.getContent=function(){return ha(this,void 0,void 0,(function*(){if(Nt(wt,le.sidePanel,le.meetingStage),!t())throw he;return yield kr(Ke("v2","sharing.history.getContent"),"sharing.history.getContent")}))},e.isSupported=t}(a=e.history||(e.history={}))}(wa||(wa={}));var va;!function(e){let t,n;function r(){return!(!Nt(wt)||!wt.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(t=e.StageViewOpenMode||(e.StageViewOpenMode={})),e.open=function(e){return new Promise((t=>{if(Nt(wt,le.content),!r())throw he;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(kr(Ke("v2","stageView.open"),"stageView.open",e))}))},e.isSupported=r,function(e){function t(){var e;return Nt(wt)&&void 0!==(null===(e=wt.supports.stageView)||void 0===e?void 0:e.self)}e.close=function(){return new Promise((e=>{if(Nt(wt,le.content),!t())throw he;e(kr(Ke("v2","stageView.self.close"),"stageView.self.close"))}))},e.isSupported=t}(n=e.self||(e.self={}))}(va||(va={}));var Ca=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ya="v2";var Sa;!function(e){let t,n,r;!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(t=e.CameraRestriction||(e.CameraRestriction={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(n=e.Source||(e.Source={})),e.hasPermission=function(){if(Nt(wt,le.content,le.task),!r.isSupported())throw he;const e=te.Media;return kr(Ke(ya,"visualMedia.hasPermission"),"permissions.has",e)},e.requestPermission=function(){if(Nt(wt,le.content,le.task),!r.isSupported())throw he;const e=te.Media;return kr(Ke(ya,"visualMedia.requestPermission"),"permissions.request",e)},function(e){function t(){return!!(Nt(wt)&&wt.supports.visualMedia&&wt.supports.visualMedia.image&&wt.supports.permissions)}function n(){if(!t())throw he}function r(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw ye}function o(e,t){if(t.length>e)throw Se}e.captureImages=function(e){return Ca(this,void 0,void 0,(function*(){Nt(wt,le.content,le.task),n(),r(e);const t=yield kr(Ke(ya,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return o(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return Ca(this,void 0,void 0,(function*(){Nt(wt,le.content,le.task),n(),r(e);const t=yield kr(Ke(ya,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return o(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(r=e.image||(e.image={}))}(Sa||(Sa={}));var ba,Ea=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(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(e){function t(){return Ea(this,void 0,void 0,(function*(){return null===Aa&&(Aa=(yield Fn.getContext()).app.host.name),Aa}))}function n(){return Nt(wt)&&void 0!==wt.supports.webStorage}e.isWebStorageClearedOnUserLogOut=function(){return Ea(this,void 0,void 0,(function*(){if(Nt(wt),!n())throw he;return!(!wt.isLegacyTeams||ut.hostClientType!==se.android&&ut.hostClientType!==se.ios&&ut.hostClientType!==se.ipados||(yield t())!==ce.teams)||(yield Fr(Ke("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))},e.isSupported=n}(ba||(ba={}));let Aa=null;var Ia;!function(e){let t;function n(){return!(!Nt(wt)||!wt.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(t=e.CallModalities||(e.CallModalities={})),e.startCall=function(e){const r=Ke("v2","call.startCall");return new Promise((o=>{var i;if(Nt(wt,le.content,le.task),!n())throw he;if(!wt.isLegacyTeams)return Dr(r,"call.startCall",[e],o);o(Fr(r,"executeDeepLink",Ai(e.targets,null===(i=e.requestedModalities)||void 0===i?void 0:i.includes(t.Video),e.source)).then((e=>{if(!e)throw new Error("The call was not properly started");return e})))}))},e.isSupported=n}(Ia||(Ia={}));const Ta="v1";var Pa;!function(e){e.Messages=Fn.Messages,e.FailedReason=Fn.FailedReason,e.ExpectedFailureReason=Fn.ExpectedFailureReason,e.notifyAppLoaded=function(){yn(Ke(Ta,"appInitialization.notifyAppLoaded"))},e.notifySuccess=function(){En(Ke(Ta,"appInitialization.notifySuccess"))},e.notifyFailure=function(e){bn(Ke(Ta,"appInitialization.notifyFailure"),e)},e.notifyExpectedFailure=function(e){Sn(Ke(Ta,"appInitialization.notifyExpectedFailure"),e)}}(Pa||(Pa={}));const Fa=Je("thirdPartyCloudStorage");var Oa;!function(e){class t{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let n=[],r=null,o=!0,i=null;function a(e){if(i)if(e&&e.error)i([],e.error),i=null;else if(e&&e.fileChunk)try{o||0!==e.fileChunk.chunkSequence||(Fa("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),o=!0,i([],{errorCode:ee.INTERNAL_ERROR,message:"error occurred while receiving data"}),n=[],i=null);const a=Mi(e.fileChunk,e.fileType);if(a?(r||(r=new t(e.fileType,[])),r.assembleAttachment.push(a)):(Fa(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),i?i([],{errorCode:ee.INTERNAL_ERROR,message:"error occurred while receiving data"}):i=null,n=[],i=null,o=!0),o=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&r){const t=ki(r.assembleAttachment,r.fileType);if(t){const r=new File([t],e.fileName,{type:t.type});n.push(r)}e.isLastFile&&i&&(i(n,e.error),n=[],i=null,o=!0),r=null}}catch(e){i&&(i([],{errorCode:ee.INTERNAL_ERROR,message:e}),n=[],i=null,o=!0)}else i([],{errorCode:ee.INTERNAL_ERROR,message:"data received is null"}),n=[],i=null,o=!0}function s(){return!(!Nt(wt)||!wt.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Nt(wt,le.content,le.task),!s())throw he;if(i)throw i=null,new Error("getDragAndDropFiles cannot be called twice");i=t,o=!0,Dr(Ke("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],a)}else{t([],{errorCode:ee.INVALID_ARGUMENTS})}},e.isSupported=s}(Oa||(Oa={}));const Ra="v1";function ka(e,t){Cn(Ke(Ra,"initialize"),t).then((()=>{e&&e()}))}function Ma(){la.enablePrintCapability()}function Ua(){la.print()}function La(e){Lt(),Dr(Ke(Ra,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=ut.frameContext),e(t)}))}function Na(e){Tn(Ke(Ra,"registerOnThemeChangeHandlerHelper"),e)}function Da(e){nr(Ke(Ra,"registerFullScreenHandler"),"fullScreenChange",e,[])}function xa(e){nr(Ke(Ra,"registerAppButtonClickHandler"),"appButtonClick",e,[le.content])}function Ha(e){nr(Ke(Ra,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[le.content])}function Va(e){nr(Ke(Ra,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[le.content])}function _a(e){Bn.backStack.registerBackButtonHandlerHelper(Ke(Ra,"registerBackButtonHandler"),e)}function Wa(e){la.registerOnLoadHandlerHelper(Ke(Ra,"registerOnLoadHandler"),e)}function Ba(e){la.registerBeforeUnloadHandlerHelper(Ke(Ra,"registerBeforeUnloadHandler"),e)}function ja(e){nr(Ke(Ra,"registerFocusEnterHandler"),"focusEnter",e,[])}function za(e){nr(Ke(Ra,"registerChangeSettingsHandler"),"changeSettings",e,[le.content])}function $a(e,t){Nt(wt),Nn(Ke(Ra,"getTabInstances"),t).then((t=>{e(t)}))}function qa(e,t){Nt(wt),Dn(Ke(Ra,"getMruTabInstances"),t).then((t=>{e(t)}))}function Ga(e){xn(Ke(Ra,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Ja(e,t){Nt(wt,le.content,le.sidePanel,le.settings,le.task,le.stage,le.meetingStage);const n=null!=t?t:be();Pn(Ke(Ra,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ka(e){Hn(Ke(Ra,"setFrameContext"),e)}function Za(e,t,n){Cn(Ke(Ra,"initializeWithFrameContext"),n).then((()=>t&&t())),Hn(Ke(Ra,"setFrameContext"),e)}const Qa="v1";function Xa(e){Ln(Ke(Qa,"navigation.returnFocus"),e)}function Ya(e,t){Nt(wt);const n=null!=t?t:be();Un(Ke(Qa,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function es(e,t){Nt(wt,le.content,le.sidePanel,le.settings,le.remove,le.task,le.stage,le.meetingStage);const n=null!=t?t:be();kn(Ke(Qa,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ts(e){Nt(wt);const t=null!=e?e:be();Mn(Ke(Qa,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const ns="v1";var rs;!function(e){e.setValidityState=function(e){Vn(Ke(ns,"settings.setValidityState"),e)},e.getSettings=function(e){Nt(wt,le.content,le.settings,le.remove,le.sidePanel),_n(Ke(ns,"settings.getSettings")).then((t=>{e(t)}))},e.setSettings=function(e,t){Nt(wt,le.content,le.settings,le.sidePanel);const n=null!=t?t:be();Wn(Ke(ns,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){Bn.config.registerOnSaveHandlerHelper(Ke(ns,"settings.registerOnSaveHandler"),e)},e.registerOnRemoveHandler=function(e){Bn.config.registerOnRemoveHandlerHelper(Ke(ns,"settings.registerOnRemoveHandler"),e)}}(rs||(rs={}));var os=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 is="v1";var as;!function(e){function t(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:me.Small,width:e.width?e.width:me.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(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:me.Small,width:e.width?e.width:me.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:me.Small,e.width=e.width?e.width:me.Small,e}e.startTask=function(e,r){const o=Ke(is,"tasks.startTask"),i=r?e=>{var t,n;return r(null!==(t=e.err)&&void 0!==t?t:"",null!==(n=e.result)&&void 0!==n?n:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Nt(wt,le.content,le.sidePanel,le.meetingStage),Dr(o,"tasks.startTask",[e],r)):void 0!==e.completionBotId?dn(o,n(e),i):un(o,t(e),i),new Yi},e.updateTask=function(e){e=r(e);const{width:t,height:n}=e,o=os(e,["width","height"]);if(Object.keys(o).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ln(Ke(is,"tasks.updateTask"),e)},e.submitTask=function(e,t){fn(Ke(is,"tasks.submitTask"),e,t)},e.getDefaultSizeIfNotProvided=r}(as||(as={}));const ss="v2";var cs;!function(e){let t,n;!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(t=e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(n=e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Nt(wt,le.meetingStage,le.sidePanel,le.content)||!wt.supports.interactive)}}(cs||(cs={}));class ls{getFluidTenantInfo(){return us(),new Promise((e=>{e(kr(Ke(ss,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return us(),new Promise((t=>{t(kr(Ke(ss,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return us(),new Promise((e=>{e(kr(Ke(ss,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return us(),new Promise((t=>{t(kr(Ke(ss,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return us(),new Promise((e=>{e(kr(Ke(ss,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return us(),new Promise((t=>{t(kr(Ke(ss,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return us(),new Promise((t=>{t(kr(Ke(ss,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return us(),new Promise((t=>{t(kr(Ke(ss,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return us(),new ls}}function us(){if(!cs.isSupported())throw new Error("LiveShareHost Not supported")}var ds=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 fs(e){try{return e.cartItems=ps(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function ps(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=ps(e.accessories)),e}))}const gs=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=ds(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=gs(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function ms(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)ws(t),hs(t.accessories)}function hs(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");ws(t)}}}function ws(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");Cs(e.price),ys(e.quantity)}function vs(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Z(e))throw new Error("id must be a valid UUID")}}function Cs(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 ys(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Ss(e){if(!Object.values(Es.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const bs="v2";var Es;!function(e){let t,n;function r(){return!(!Nt(wt)||!wt.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(t=e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(n=e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Nt(wt,le.content,le.task),!r())throw he;return kr(Ke(bs,"marketplace.getCart"),"marketplace.getCart",e.cartVersion).then(fs)},e.addOrUpdateCartItems=function(t){if(Nt(wt,le.content,le.task),!r())throw he;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return vs(null==t?void 0:t.cartId),ms(null==t?void 0:t.cartItems),kr(Ke(bs,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:gs(t.cartItems),cartVersion:e.cartVersion})).then(fs)},e.removeCartItems=function(t){if(Nt(wt,le.content,le.task),!r())throw he;if(!t)throw new Error("removeCartItemsParams must be provided");if(vs(null==t?void 0:t.cartId),!Array.isArray(null==t?void 0:t.cartItemIds)||0===(null==t?void 0:t.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return kr(Ke(bs,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(fs)},e.updateCartStatus=function(t){if(Nt(wt,le.content,le.task),!r())throw he;if(!t)throw new Error("updateCartStatusParams must be provided");return vs(null==t?void 0:t.cartId),Ss(null==t?void 0:t.cartStatus),kr(Ke(bs,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(fs)},e.isSupported=r}(Es||(Es={}))})(),r})()));
2
+ //# sourceMappingURL=MicrosoftTeams.min.js.map