How to use sendMessageToParent method in Playwright Internal

Best JavaScript code snippet using playwright-internal

MicrosoftTeams.js

Source:MicrosoftTeams.js Github

copy

Full Screen

1!function(e, n) {2 "object" == typeof exports && "object" == typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define("microsoftTeams", [], n) : "object" == typeof exports ? exports.microsoftTeams = n() : e.microsoftTeams = n()3}(window, function() {4 return function(t) {5 var r = {};6 function i(e) {7 if (r[e])8 return r[e].exports;9 var n = r[e] = {10 i: e,11 l: !1,12 exports: {}13 };14 return t[e].call(n.exports, n, n.exports, i),15 n.l = !0,16 n.exports17 }18 return i.m = t,19 i.c = r,20 i.d = function(e, n, t) {21 i.o(e, n) || Object.defineProperty(e, n, {22 enumerable: !0,23 get: t24 })25 }26 ,27 i.r = function(e) {28 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {29 value: "Module"30 }),31 Object.defineProperty(e, "__esModule", {32 value: !033 })34 }35 ,36 i.t = function(n, e) {37 if (1 & e && (n = i(n)),38 8 & e)39 return n;40 if (4 & e && "object" == typeof n && n && n.__esModule)41 return n;42 var t = Object.create(null);43 if (i.r(t),44 Object.defineProperty(t, "default", {45 enumerable: !0,46 value: n47 }),48 2 & e && "string" != typeof n)49 for (var r in n)50 i.d(t, r, function(e) {51 return n[e]52 }53 .bind(null, r));54 return t55 }56 ,57 i.n = function(e) {58 var n = e && e.__esModule ? function() {59 return e.default60 }61 : function() {62 return e63 }64 ;65 return i.d(n, "a", n),66 n67 }68 ,69 i.o = function(e, n) {70 return Object.prototype.hasOwnProperty.call(e, n)71 }72 ,73 i.p = "",74 i(i.s = 19)75 }([function(e, n, t) {76 "use strict";77 var r = this && this.__spreadArray || function(e, n, t) {78 if (t || 2 === arguments.length)79 for (var r, i = 0, o = n.length; i < o; i++)80 !r && i in n || ((r = r || Array.prototype.slice.call(n, 0, i))[i] = n[i]);81 return e.concat(r || Array.prototype.slice.call(n))82 }83 ;84 Object.defineProperty(n, "__esModule", {85 value: !086 }),87 n.sendMessageEventToChild = n.waitForMessageQueue = n.sendMessageToParent = n.uninitializeCommunication = n.initializeCommunication = n.Communication = void 0;88 var i = t(4)89 , o = t(6)90 , a = t(3)91 , s = function() {92 return function() {}93 }();94 n.Communication = s;95 var l = function() {96 function e() {}97 return e.parentMessageQueue = [],98 e.childMessageQueue = [],99 e.nextMessageId = 0,100 e.callbacks = {},101 e102 }();103 function u(e, n, t) {104 n instanceof Function ? t = n : n instanceof Array && (r = n);105 var r, n = s.parentWindow, e = y(e, r);106 o.GlobalVars.isFramelessWindow ? s.currentWindow && s.currentWindow.nativeInterface && s.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(e)) : (r = h(n),107 n && r ? n.postMessage(e, r) : C(n).push(e)),108 t && (l.callbacks[e.id] = t)109 }110 function d(e) {111 var n, t;112 e && e.data && "object" == typeof e.data && (c(n = e.source || e.originalEvent && e.originalEvent.source, t = e.origin || e.originalEvent && e.originalEvent.origin) && (m(n, t),113 n === s.parentWindow ? g(e) : n === s.childWindow && p(e)))114 }115 function c(e, n) {116 return (!s.currentWindow || e !== s.currentWindow) && (s.currentWindow && s.currentWindow.location && n && n === s.currentWindow.location.origin || !!(i.validOriginRegExp.test(n.toLowerCase()) || o.GlobalVars.additionalValidOriginsRegexp && o.GlobalVars.additionalValidOriginsRegexp.test(n.toLowerCase())))117 }118 function m(e, n) {119 o.GlobalVars.isFramelessWindow || s.parentWindow && !s.parentWindow.closed && e !== s.parentWindow ? s.childWindow && !s.childWindow.closed && e !== s.childWindow || (s.childWindow = e,120 s.childOrigin = n) : (s.parentWindow = e,121 s.parentOrigin = n),122 s.parentWindow && s.parentWindow.closed && (s.parentWindow = null,123 s.parentOrigin = null),124 s.childWindow && s.childWindow.closed && (s.childWindow = null,125 s.childOrigin = null),126 b(s.parentWindow),127 b(s.childWindow)128 }129 function g(e) {130 var n, t;131 "id"in e.data && "number" == typeof e.data.id ? (t = e.data,132 (n = l.callbacks[t.id]) && (n.apply(null, r(r([], t.args, !0), [t.isPartialResponse], !1)),133 f(e) || delete l.callbacks[t.id])) : "func"in e.data && "string" == typeof e.data.func && (t = e.data,134 (0,135 a.callHandler)(t.func, t.args))136 }137 function f(e) {138 return !0 === e.data.isPartialResponse139 }140 function p(e) {141 var r, n;142 "id"in e.data && "func"in e.data && (r = e.data,143 e = (n = (0,144 a.callHandler)(r.func, r.args))[0],145 n = n[1],146 e && void 0 !== n ? v(r.id, Array.isArray(n) ? n : [n]) : u(r.func, r.args, function() {147 for (var e, n = [], t = 0; t < arguments.length; t++)148 n[t] = arguments[t];149 s.childWindow && (e = n.pop(),150 v(r.id, n, e))151 }))152 }153 function C(e) {154 return e === s.parentWindow ? l.parentMessageQueue : e === s.childWindow ? l.childMessageQueue : []155 }156 function h(e) {157 return e === s.parentWindow ? s.parentOrigin : e === s.childWindow ? s.childOrigin : null158 }159 function b(e) {160 for (var n = h(e), t = C(e); e && n && 0 < t.length; )161 e.postMessage(t.shift(), n)162 }163 function v(e, n, t) {164 var r = s.childWindow165 , n = P(e, n, t)166 , t = h(r);167 r && t && r.postMessage(n, t)168 }169 function y(e, n) {170 return {171 id: l.nextMessageId++,172 func: e,173 timestamp: Date.now(),174 args: n || []175 }176 }177 function P(e, n, t) {178 return {179 id: e,180 args: n || [],181 isPartialResponse: t182 }183 }184 function T(e, n) {185 return {186 func: e,187 args: n || []188 }189 }190 n.initializeCommunication = function(e, n) {191 l.messageListener = function(e) {192 return d(e)193 }194 ,195 s.currentWindow = s.currentWindow || window,196 s.parentWindow = s.currentWindow.parent !== s.currentWindow.self ? s.currentWindow.parent : s.currentWindow.opener,197 (s.parentWindow || n) && s.currentWindow.addEventListener("message", l.messageListener, !1),198 s.parentWindow || (o.GlobalVars.isFramelessWindow = !0,199 window.onNativeMessage = g);200 try {201 s.parentOrigin = "*",202 u("initialize", [i.version], e)203 } finally {204 s.parentOrigin = null205 }206 }207 ,208 n.uninitializeCommunication = function() {209 s.currentWindow.removeEventListener("message", l.messageListener, !1),210 s.parentWindow = null,211 s.parentOrigin = null,212 s.childWindow = null,213 s.childOrigin = null,214 l.parentMessageQueue = [],215 l.childMessageQueue = [],216 l.nextMessageId = 0,217 l.callbacks = {}218 }219 ,220 n.sendMessageToParent = u,221 n.waitForMessageQueue = function(e, n) {222 var t = s.currentWindow.setInterval(function() {223 0 === C(e).length && (clearInterval(t),224 n())225 }, 100)226 }227 ,228 n.sendMessageEventToChild = function(e, n) {229 var t = s.childWindow230 , e = T(e, n)231 , n = h(t);232 t && n ? t.postMessage(e, n) : C(t).push(e)233 }234 }235 , function(e, n, t) {236 "use strict";237 Object.defineProperty(n, "__esModule", {238 value: !0239 }),240 n.processAdditionalValidOrigins = n.isAPISupportedByPlatform = n.ensureInitialized = void 0;241 var r = t(4)242 , i = t(6)243 , o = t(5);244 n.ensureInitialized = function() {245 for (var e = [], n = 0; n < arguments.length; n++)246 e[n] = arguments[n];247 if (!i.GlobalVars.initializeCalled)248 throw new Error("The library has not yet been initialized");249 if (i.GlobalVars.frameContext && e && 0 < e.length) {250 for (var t = !1, r = 0; r < e.length; r++)251 if (e[r] === i.GlobalVars.frameContext) {252 t = !0;253 break254 }255 if (!t)256 throw new Error("This call is not allowed in the '" + i.GlobalVars.frameContext + "' context")257 }258 }259 ,260 n.isAPISupportedByPlatform = function(e) {261 return void 0 === e && (e = r.defaultSDKVersionForCompatCheck),262 e = (0,263 o.compareSDKVersions)(i.GlobalVars.clientSupportedSDKVersion, e),264 !isNaN(e) && 0 <= e265 }266 ,267 n.processAdditionalValidOrigins = function(e) {268 var e = i.GlobalVars.additionalValidOrigins.concat(e.filter(function(e) {269 return "string" == typeof e && r.userOriginUrlValidationRegExp.test(e)270 }))271 , n = {}272 , e = e.filter(function(e) {273 return !n[e] && (n[e] = !0)274 });275 i.GlobalVars.additionalValidOrigins = e,276 0 < i.GlobalVars.additionalValidOrigins.length ? i.GlobalVars.additionalValidOriginsRegexp = (0,277 o.generateRegExpFromUrls)(i.GlobalVars.additionalValidOrigins) : i.GlobalVars.additionalValidOriginsRegexp = null278 }279 }280 , function(e, n, t) {281 "use strict";282 Object.defineProperty(n, "__esModule", {283 value: !0284 }),285 n.ChannelType = n.TaskModuleDimension = n.UserTeamRole = n.TeamType = n.FrameContexts = n.HostClientType = void 0,286 function(e) {287 e.desktop = "desktop",288 e.web = "web",289 e.android = "android",290 e.ios = "ios",291 e.rigel = "rigel",292 e.surfaceHub = "surfaceHub",293 e.teamsRoomsWindows = "teamsRoomsWindows",294 e.teamsRoomsAndroid = "teamsRoomsAndroid",295 e.teamsPhones = "teamsPhones",296 e.teamsDisplays = "teamsDisplays"297 }(n.HostClientType || (n.HostClientType = {})),298 function(e) {299 e.settings = "settings",300 e.content = "content",301 e.authentication = "authentication",302 e.remove = "remove",303 e.task = "task",304 e.sidePanel = "sidePanel",305 e.stage = "stage",306 e.meetingStage = "meetingStage"307 }(n.FrameContexts || (n.FrameContexts = {})),308 function(e) {309 e[e.Standard = 0] = "Standard",310 e[e.Edu = 1] = "Edu",311 e[e.Class = 2] = "Class",312 e[e.Plc = 3] = "Plc",313 e[e.Staff = 4] = "Staff"314 }(n.TeamType || (n.TeamType = {})),315 function(e) {316 e[e.Admin = 0] = "Admin",317 e[e.User = 1] = "User",318 e[e.Guest = 2] = "Guest"319 }(n.UserTeamRole || (n.UserTeamRole = {})),320 function(e) {321 e.Large = "large",322 e.Medium = "medium",323 e.Small = "small"324 }(n.TaskModuleDimension || (n.TaskModuleDimension = {})),325 function(e) {326 e.Regular = "Regular",327 e.Private = "Private",328 e.Shared = "Shared"329 }(n.ChannelType || (n.ChannelType = {}))330 }331 , function(e, n, t) {332 "use strict";333 var i = this && this.__spreadArray || function(e, n, t) {334 if (t || 2 === arguments.length)335 for (var r, i = 0, o = n.length; i < o; i++)336 !r && i in n || ((r = r || Array.prototype.slice.call(n, 0, i))[i] = n[i]);337 return e.concat(r || Array.prototype.slice.call(n))338 }339 ;340 Object.defineProperty(n, "__esModule", {341 value: !0342 }),343 n.registerBeforeUnloadHandler = n.registerOnLoadHandler = n.registerFocusEnterHandler = n.registerBackButtonHandler = n.handleThemeChange = n.registerOnThemeChangeHandler = n.removeHandler = n.registerHandler = n.callHandler = n.initializeHandlers = void 0;344 var r = t(8)345 , o = t(0)346 , a = function() {347 function e() {}348 return e.handlers = {},349 e350 }();351 function s(e) {352 a.themeChangeHandler && a.themeChangeHandler(e),353 o.Communication.childWindow && (0,354 o.sendMessageEventToChild)("themeChange", [e])355 }356 function l() {357 a.backButtonPressHandler && a.backButtonPressHandler() || (0,358 r.navigateBack)()359 }360 function u(e) {361 a.focusEnterHandler && a.focusEnterHandler(e)362 }363 function d(e) {364 a.loadHandler && a.loadHandler(e),365 o.Communication.childWindow && (0,366 o.sendMessageEventToChild)("load", [e])367 }368 function c() {369 function e() {370 (0,371 o.sendMessageToParent)("readyToUnload", [])372 }373 a.beforeUnloadHandler && a.beforeUnloadHandler(e) || e()374 }375 n.initializeHandlers = function() {376 a.handlers.themeChange = s,377 a.handlers.backButtonPress = l,378 a.handlers.load = d,379 a.handlers.beforeUnload = c,380 a.handlers.focusEnter = u381 }382 ,383 n.callHandler = function(e, n) {384 return (e = a.handlers[e]) ? [!0, e.apply(this, n)] : [!1, void 0]385 }386 ,387 n.registerHandler = function(e, n, t, r) {388 void 0 === t && (t = !0),389 void 0 === r && (r = []),390 n ? (a.handlers[e] = n,391 t && (0,392 o.sendMessageToParent)("registerHandler", i([e], r, !0))) : delete a.handlers[e]393 }394 ,395 n.removeHandler = function(e) {396 delete a.handlers[e]397 }398 ,399 n.registerOnThemeChangeHandler = function(e) {400 (a.themeChangeHandler = e) && (0,401 o.sendMessageToParent)("registerHandler", ["themeChange"])402 }403 ,404 n.handleThemeChange = s,405 n.registerBackButtonHandler = function(e) {406 (a.backButtonPressHandler = e) && (0,407 o.sendMessageToParent)("registerHandler", ["backButton"])408 }409 ,410 n.registerFocusEnterHandler = function(e) {411 (a.focusEnterHandler = e) && (0,412 o.sendMessageToParent)("registerHandler", ["focusEnter"])413 }414 ,415 n.registerOnLoadHandler = function(e) {416 (a.loadHandler = e) && (0,417 o.sendMessageToParent)("registerHandler", ["load"])418 }419 ,420 n.registerBeforeUnloadHandler = function(e) {421 (a.beforeUnloadHandler = e) && (0,422 o.sendMessageToParent)("registerHandler", ["beforeUnload"])423 }424 }425 , function(e, n, t) {426 "use strict";427 Object.defineProperty(n, "__esModule", {428 value: !0429 }),430 n.userOriginUrlValidationRegExp = n.validOriginRegExp = n.validOrigins = n.scanBarCodeAPIMobileSupportVersion = n.getMediaCallbackSupportVersion = n.mediaAPISupportVersion = n.captureImageMobileSupportVersion = n.peoplePickerRequiredVersion = n.locationAPIsRequiredVersion = n.getUserJoinedTeamsSupportedAndroidClientVersion = n.videoAndImageMediaAPISupportVersion = n.defaultSDKVersionForCompatCheck = n.version = void 0;431 t = t(5);432 n.version = "1.11.0",433 n.defaultSDKVersionForCompatCheck = "2.0.1",434 n.videoAndImageMediaAPISupportVersion = "2.0.2",435 n.getUserJoinedTeamsSupportedAndroidClientVersion = "2.0.1",436 n.locationAPIsRequiredVersion = "1.9.0",437 n.peoplePickerRequiredVersion = "2.0.0",438 n.captureImageMobileSupportVersion = "1.7.0",439 n.mediaAPISupportVersion = "1.8.0",440 n.getMediaCallbackSupportVersion = "2.0.0",441 n.scanBarCodeAPIMobileSupportVersion = "1.9.0",442 n.validOrigins = ["https://teams.microsoft.com", "https://teams.microsoft.us", "https://gov.teams.microsoft.us", "https://dod.teams.microsoft.us", "https://int.teams.microsoft.com", "https://teams.live.com", "https://devspaces.skype.com", "https://ssauth.skype.com", "https://local.teams.live.com", "https://local.teams.live.com:8080", "https://local.teams.office.com", "https://local.teams.office.com:8080", "https://msft.spoppe.com", "https://*.sharepoint.com", "https://*.sharepoint-df.com", "https://*.sharepointonline.com", "https://outlook.office.com", "https://outlook-sdf.office.com", "https://*.teams.microsoft.com", "https://www.office.com", "https://word.office.com", "https://excel.office.com", "https://powerpoint.office.com", "https://www.officeppe.com", "https://*.www.office.com"],443 n.validOriginRegExp = (0,444 t.generateRegExpFromUrls)(n.validOrigins),445 n.userOriginUrlValidationRegExp = /^https\:\/\//446 }447 , function(e, n, t) {448 "use strict";449 Object.defineProperty(n, "__esModule", {450 value: !0451 }),452 n.generateGUID = n.compareSDKVersions = n.getGenericOnCompleteHandler = n.generateRegExpFromUrls = void 0;453 var r = t(22);454 function i(e) {455 for (var n = "^", t = e.split("."), r = 0; r < t.length; r++)456 n += (0 < r ? "[.]" : "") + t[r].replace("*", "[^/^.]+");457 return n += "$"458 }459 n.generateRegExpFromUrls = function(e) {460 for (var n = "", t = 0; t < e.length; t++)461 n += (0 === t ? "" : "|") + i(e[t]);462 return new RegExp(n)463 }464 ,465 n.getGenericOnCompleteHandler = function(t) {466 return function(e, n) {467 if (!e)468 throw new Error(t || n)469 }470 }471 ,472 n.compareSDKVersions = function(e, n) {473 if ("string" != typeof e || "string" != typeof n)474 return NaN;475 var t = e.split(".")476 , r = n.split(".");477 function i(e) {478 return /^\d+$/.test(e)479 }480 if (!t.every(i) || !r.every(i))481 return NaN;482 for (; t.length < r.length; )483 t.push("0");484 for (; r.length < t.length; )485 r.push("0");486 for (var o = 0; o < t.length; ++o)487 if (Number(t[o]) != Number(r[o]))488 return Number(t[o]) > Number(r[o]) ? 1 : -1;489 return 0490 }491 ,492 n.generateGUID = function() {493 return r.v4()494 }495 }496 , function(e, n, t) {497 "use strict";498 Object.defineProperty(n, "__esModule", {499 value: !0500 }),501 n.GlobalVars = void 0;502 var r = function() {503 function e() {}504 return e.initializeCalled = !1,505 e.initializeCompleted = !1,506 e.additionalValidOrigins = [],507 e.additionalValidOriginsRegexp = null,508 e.initializeCallbacks = [],509 e.isFramelessWindow = !1,510 e.printCapabilityEnabled = !1,511 e512 }();513 n.GlobalVars = r514 }515 , function(e, n, t) {516 "use strict";517 Object.defineProperty(n, "__esModule", {518 value: !0519 }),520 n.ErrorCode = n.FileOpenPreference = void 0,521 function(e) {522 e.Inline = "inline",523 e.Desktop = "desktop",524 e.Web = "web"525 }(n.FileOpenPreference || (n.FileOpenPreference = {})),526 function(e) {527 e[e.NOT_SUPPORTED_ON_PLATFORM = 100] = "NOT_SUPPORTED_ON_PLATFORM",528 e[e.INTERNAL_ERROR = 500] = "INTERNAL_ERROR",529 e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT = 501] = "NOT_SUPPORTED_IN_CURRENT_CONTEXT",530 e[e.PERMISSION_DENIED = 1e3] = "PERMISSION_DENIED",531 e[e.NETWORK_ERROR = 2e3] = "NETWORK_ERROR",532 e[e.NO_HW_SUPPORT = 3e3] = "NO_HW_SUPPORT",533 e[e.INVALID_ARGUMENTS = 4e3] = "INVALID_ARGUMENTS",534 e[e.UNAUTHORIZED_USER_OPERATION = 5e3] = "UNAUTHORIZED_USER_OPERATION",535 e[e.INSUFFICIENT_RESOURCES = 6e3] = "INSUFFICIENT_RESOURCES",536 e[e.THROTTLE = 7e3] = "THROTTLE",537 e[e.USER_ABORT = 8e3] = "USER_ABORT",538 e[e.OPERATION_TIMED_OUT = 8001] = "OPERATION_TIMED_OUT",539 e[e.OLD_PLATFORM = 9e3] = "OLD_PLATFORM",540 e[e.FILE_NOT_FOUND = 404] = "FILE_NOT_FOUND",541 e[e.SIZE_EXCEEDED = 1e4] = "SIZE_EXCEEDED"542 }(n.ErrorCode || (n.ErrorCode = {}))543 }544 , function(e, n, t) {545 "use strict";546 Object.defineProperty(n, "__esModule", {547 value: !0548 }),549 n.sharing = n.video = n.people = n.monetization = n.meeting = n.location = n.media = n.ParentAppWindow = n.ChildAppWindow = n.tasks = n.settings = n.navigateToTab = n.navigateCrossDomain = n.navigateBack = n.returnFocus = n.shareDeepLink = n.setFrameContext = n.registerAppButtonHoverLeaveHandler = n.registerAppButtonHoverEnterHandler = n.registerAppButtonClickHandler = n.registerOnThemeChangeHandler = n.registerOnLoadHandler = n.registerFullScreenHandler = n.registerEnterSettingsHandler = n.registerFocusEnterHandler = n.registerBeforeUnloadHandler = n.registerBackButtonHandler = n.print = n.initializeWithFrameContext = n.initialize = n.getTabInstances = n.getMruTabInstances = n.getContext = n.executeDeepLink = n.enablePrintCapability = n.FileOpenPreference = n.ErrorCode = n.ChannelType = n.UserTeamRole = n.TeamType = n.TaskModuleDimension = n.HostClientType = n.FrameContexts = n.authentication = n.appInitialization = void 0;550 var r = t(25);551 Object.defineProperty(n, "appInitialization", {552 enumerable: !0,553 get: function() {554 return r.appInitialization555 }556 });557 var i = t(11);558 Object.defineProperty(n, "authentication", {559 enumerable: !0,560 get: function() {561 return i.authentication562 }563 });564 var o = t(2);565 Object.defineProperty(n, "FrameContexts", {566 enumerable: !0,567 get: function() {568 return o.FrameContexts569 }570 }),571 Object.defineProperty(n, "HostClientType", {572 enumerable: !0,573 get: function() {574 return o.HostClientType575 }576 }),577 Object.defineProperty(n, "TaskModuleDimension", {578 enumerable: !0,579 get: function() {580 return o.TaskModuleDimension581 }582 }),583 Object.defineProperty(n, "TeamType", {584 enumerable: !0,585 get: function() {586 return o.TeamType587 }588 }),589 Object.defineProperty(n, "UserTeamRole", {590 enumerable: !0,591 get: function() {592 return o.UserTeamRole593 }594 }),595 Object.defineProperty(n, "ChannelType", {596 enumerable: !0,597 get: function() {598 return o.ChannelType599 }600 });601 var a = t(7);602 Object.defineProperty(n, "ErrorCode", {603 enumerable: !0,604 get: function() {605 return a.ErrorCode606 }607 }),608 Object.defineProperty(n, "FileOpenPreference", {609 enumerable: !0,610 get: function() {611 return a.FileOpenPreference612 }613 });614 var s = t(26);615 Object.defineProperty(n, "enablePrintCapability", {616 enumerable: !0,617 get: function() {618 return s.enablePrintCapability619 }620 }),621 Object.defineProperty(n, "executeDeepLink", {622 enumerable: !0,623 get: function() {624 return s.executeDeepLink625 }626 }),627 Object.defineProperty(n, "getContext", {628 enumerable: !0,629 get: function() {630 return s.getContext631 }632 }),633 Object.defineProperty(n, "getMruTabInstances", {634 enumerable: !0,635 get: function() {636 return s.getMruTabInstances637 }638 }),639 Object.defineProperty(n, "getTabInstances", {640 enumerable: !0,641 get: function() {642 return s.getTabInstances643 }644 }),645 Object.defineProperty(n, "initialize", {646 enumerable: !0,647 get: function() {648 return s.initialize649 }650 }),651 Object.defineProperty(n, "initializeWithFrameContext", {652 enumerable: !0,653 get: function() {654 return s.initializeWithFrameContext655 }656 }),657 Object.defineProperty(n, "print", {658 enumerable: !0,659 get: function() {660 return s.print661 }662 }),663 Object.defineProperty(n, "registerBackButtonHandler", {664 enumerable: !0,665 get: function() {666 return s.registerBackButtonHandler667 }668 }),669 Object.defineProperty(n, "registerBeforeUnloadHandler", {670 enumerable: !0,671 get: function() {672 return s.registerBeforeUnloadHandler673 }674 }),675 Object.defineProperty(n, "registerFocusEnterHandler", {676 enumerable: !0,677 get: function() {678 return s.registerFocusEnterHandler679 }680 }),681 Object.defineProperty(n, "registerEnterSettingsHandler", {682 enumerable: !0,683 get: function() {684 return s.registerEnterSettingsHandler685 }686 }),687 Object.defineProperty(n, "registerFullScreenHandler", {688 enumerable: !0,689 get: function() {690 return s.registerFullScreenHandler691 }692 }),693 Object.defineProperty(n, "registerOnLoadHandler", {694 enumerable: !0,695 get: function() {696 return s.registerOnLoadHandler697 }698 }),699 Object.defineProperty(n, "registerOnThemeChangeHandler", {700 enumerable: !0,701 get: function() {702 return s.registerOnThemeChangeHandler703 }704 }),705 Object.defineProperty(n, "registerAppButtonClickHandler", {706 enumerable: !0,707 get: function() {708 return s.registerAppButtonClickHandler709 }710 }),711 Object.defineProperty(n, "registerAppButtonHoverEnterHandler", {712 enumerable: !0,713 get: function() {714 return s.registerAppButtonHoverEnterHandler715 }716 }),717 Object.defineProperty(n, "registerAppButtonHoverLeaveHandler", {718 enumerable: !0,719 get: function() {720 return s.registerAppButtonHoverLeaveHandler721 }722 }),723 Object.defineProperty(n, "setFrameContext", {724 enumerable: !0,725 get: function() {726 return s.setFrameContext727 }728 }),729 Object.defineProperty(n, "shareDeepLink", {730 enumerable: !0,731 get: function() {732 return s.shareDeepLink733 }734 });735 var l = t(27);736 Object.defineProperty(n, "returnFocus", {737 enumerable: !0,738 get: function() {739 return l.returnFocus740 }741 }),742 Object.defineProperty(n, "navigateBack", {743 enumerable: !0,744 get: function() {745 return l.navigateBack746 }747 }),748 Object.defineProperty(n, "navigateCrossDomain", {749 enumerable: !0,750 get: function() {751 return l.navigateCrossDomain752 }753 }),754 Object.defineProperty(n, "navigateToTab", {755 enumerable: !0,756 get: function() {757 return l.navigateToTab758 }759 });760 var u = t(12);761 Object.defineProperty(n, "settings", {762 enumerable: !0,763 get: function() {764 return u.settings765 }766 });767 var d = t(28);768 Object.defineProperty(n, "tasks", {769 enumerable: !0,770 get: function() {771 return d.tasks772 }773 });774 var c = t(16);775 Object.defineProperty(n, "ChildAppWindow", {776 enumerable: !0,777 get: function() {778 return c.ChildAppWindow779 }780 }),781 Object.defineProperty(n, "ParentAppWindow", {782 enumerable: !0,783 get: function() {784 return c.ParentAppWindow785 }786 });787 var m = t(17);788 Object.defineProperty(n, "media", {789 enumerable: !0,790 get: function() {791 return m.media792 }793 });794 var g = t(29);795 Object.defineProperty(n, "location", {796 enumerable: !0,797 get: function() {798 return g.location799 }800 });801 var f = t(30);802 Object.defineProperty(n, "meeting", {803 enumerable: !0,804 get: function() {805 return f.meeting806 }807 });808 var p = t(31);809 Object.defineProperty(n, "monetization", {810 enumerable: !0,811 get: function() {812 return p.monetization813 }814 });815 var C = t(32);816 Object.defineProperty(n, "people", {817 enumerable: !0,818 get: function() {819 return C.people820 }821 });822 var h = t(33);823 Object.defineProperty(n, "video", {824 enumerable: !0,825 get: function() {826 return h.video827 }828 });829 var b = t(34);830 Object.defineProperty(n, "sharing", {831 enumerable: !0,832 get: function() {833 return b.sharing834 }835 })836 }837 , function(e, n) {838 var t, r, i = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof window.msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto);839 i ? (t = new Uint8Array(16),840 e.exports = function() {841 return i(t),842 t843 }844 ) : (r = new Array(16),845 e.exports = function() {846 for (var e, n = 0; n < 16; n++)847 0 == (3 & n) && (e = 4294967296 * Math.random()),848 r[n] = e >>> ((3 & n) << 3) & 255;849 return r850 }851 )852 }853 , function(e, n) {854 for (var r = [], t = 0; t < 256; ++t)855 r[t] = (t + 256).toString(16).substr(1);856 e.exports = function(e, n) {857 var t = n || 0;858 return [(n = r)[e[t++]], n[e[t++]], n[e[t++]], n[e[t++]], "-", n[e[t++]], n[e[t++]], "-", n[e[t++]], n[e[t++]], "-", n[e[t++]], n[e[t++]], "-", n[e[t++]], n[e[t++]], n[e[t++]], n[e[t++]], n[e[t++]], n[e[+t]]].join("")859 }860 }861 , function(e, n, t) {862 "use strict";863 Object.defineProperty(n, "__esModule", {864 value: !0865 }),866 n.authentication = void 0;867 var c = t(1)868 , m = t(6)869 , g = t(2)870 , f = t(0)871 , p = t(3);872 !function(e) {873 var o, n;874 function a() {875 t();876 try {877 f.Communication.childWindow && f.Communication.childWindow.close()878 } finally {879 f.Communication.childWindow = null,880 f.Communication.childOrigin = null881 }882 }883 function r(e) {884 o = e,885 a();886 var n = o.width || 600887 , t = o.height || 400888 , n = Math.min(n, f.Communication.currentWindow.outerWidth - 400)889 , t = Math.min(t, f.Communication.currentWindow.outerHeight - 200)890 , r = document.createElement("a");891 r.href = o.url;892 var i = void 0 !== f.Communication.currentWindow.screenLeft ? f.Communication.currentWindow.screenLeft : f.Communication.currentWindow.screenX893 , e = void 0 !== f.Communication.currentWindow.screenTop ? f.Communication.currentWindow.screenTop : f.Communication.currentWindow.screenY;894 i += f.Communication.currentWindow.outerWidth / 2 - n / 2,895 e += f.Communication.currentWindow.outerHeight / 2 - t / 2,896 f.Communication.childWindow = f.Communication.currentWindow.open(r.href, "_blank", "toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top=" + e + ", left=" + i + ", width=" + n + ", height=" + t),897 f.Communication.childWindow ? s() : l("FailedToOpenWindow")898 }899 function t() {900 n && (clearInterval(n),901 n = 0),902 (0,903 p.removeHandler)("initialize"),904 (0,905 p.removeHandler)("navigateCrossDomain")906 }907 function s() {908 t(),909 n = f.Communication.currentWindow.setInterval(function() {910 if (!f.Communication.childWindow || f.Communication.childWindow.closed)911 l("CancelledByUser");912 else {913 var e = f.Communication.childOrigin;914 try {915 f.Communication.childOrigin = "*",916 (0,917 f.sendMessageEventToChild)("ping")918 } finally {919 f.Communication.childOrigin = e920 }921 }922 }, 100),923 (0,924 p.registerHandler)("initialize", function() {925 return [g.FrameContexts.authentication, m.GlobalVars.hostClientType]926 }),927 (0,928 p.registerHandler)("navigateCrossDomain", function() {929 return !1930 })931 }932 function i(e) {933 try {934 o && o.successCallback && o.successCallback(e)935 } finally {936 o = null,937 a()938 }939 }940 function l(e) {941 try {942 o && o.failureCallback && o.failureCallback(e)943 } finally {944 o = null,945 a()946 }947 }948 function u(e, n, t) {949 var r;950 e && ((r = document.createElement("a")).href = decodeURIComponent(e),951 r.host && r.host !== window.location.host && "outlook.office.com" === r.host && -1 < r.search.indexOf("client_type=Win32_Outlook") && (n && "result" === n && (t && (r.href = d(r.href, "result", t)),952 f.Communication.currentWindow.location.assign(d(r.href, "authSuccess", ""))),953 n && "reason" === n && (t && (r.href = d(r.href, "reason", t)),954 f.Communication.currentWindow.location.assign(d(r.href, "authFailure", "")))))955 }956 function d(e, n, t) {957 var r = e.indexOf("#")958 , i = (i = -1 === r ? "#" : e.substr(r)) + "&" + n + ("" !== t ? "=" + t : "");959 return (e = -1 === r ? e : e.substr(0, r)) + i960 }961 e.initialize = function() {962 (0,963 p.registerHandler)("authentication.authenticate.success", i, !1),964 (0,965 p.registerHandler)("authentication.authenticate.failure", l, !1)966 }967 ,968 e.registerAuthenticationHandlers = function(e) {969 o = e970 }971 ,972 e.authenticate = function(e) {973 var t = void 0 !== e ? e : o;974 (0,975 c.ensureInitialized)(g.FrameContexts.content, g.FrameContexts.sidePanel, g.FrameContexts.settings, g.FrameContexts.remove, g.FrameContexts.task, g.FrameContexts.stage, g.FrameContexts.meetingStage),976 m.GlobalVars.hostClientType === g.HostClientType.desktop || m.GlobalVars.hostClientType === g.HostClientType.android || m.GlobalVars.hostClientType === g.HostClientType.ios || m.GlobalVars.hostClientType === g.HostClientType.rigel || m.GlobalVars.hostClientType === g.HostClientType.teamsRoomsWindows || m.GlobalVars.hostClientType === g.HostClientType.teamsRoomsAndroid || m.GlobalVars.hostClientType === g.HostClientType.teamsPhones || m.GlobalVars.hostClientType === g.HostClientType.teamsDisplays ? ((e = document.createElement("a")).href = t.url,977 (0,978 f.sendMessageToParent)("authentication.authenticate", [e.href, t.width, t.height], function(e, n) {979 e ? t.successCallback(n) : t.failureCallback(n)980 })) : r(t)981 }982 ,983 e.getAuthToken = function(t) {984 (0,985 c.ensureInitialized)(),986 (0,987 f.sendMessageToParent)("authentication.getAuthToken", [t.resources, t.claims, t.silent], function(e, n) {988 e ? t.successCallback(n) : t.failureCallback(n)989 })990 }991 ,992 e.getUser = function(t) {993 (0,994 c.ensureInitialized)(),995 (0,996 f.sendMessageToParent)("authentication.getUser", function(e, n) {997 e ? t.successCallback(n) : t.failureCallback(n)998 })999 }1000 ,1001 e.notifySuccess = function(e, n) {1002 u(n, "result", e),1003 (0,1004 c.ensureInitialized)(g.FrameContexts.authentication),1005 (0,1006 f.sendMessageToParent)("authentication.authenticate.success", [e]),1007 (0,1008 f.waitForMessageQueue)(f.Communication.parentWindow, function() {1009 return setTimeout(function() {1010 return f.Communication.currentWindow.close()1011 }, 200)1012 })1013 }1014 ,1015 e.notifyFailure = function(e, n) {1016 u(n, "reason", e),1017 (0,1018 c.ensureInitialized)(g.FrameContexts.authentication),1019 (0,1020 f.sendMessageToParent)("authentication.authenticate.failure", [e]),1021 (0,1022 f.waitForMessageQueue)(f.Communication.parentWindow, function() {1023 return setTimeout(function() {1024 return f.Communication.currentWindow.close()1025 }, 200)1026 })1027 }1028 }(n.authentication || (n.authentication = {}))1029 }1030 , function(e, n, t) {1031 "use strict";1032 Object.defineProperty(n, "__esModule", {1033 value: !01034 }),1035 n.settings = void 0;1036 var s = t(1)1037 , l = t(2)1038 , u = t(5)1039 , d = t(0)1040 , c = t(3);1041 !function(e) {1042 var n, t;1043 function r(e) {1044 e = new i(e);1045 n ? n(e) : e.notifySuccess()1046 }1047 e.initialize = function() {1048 (0,1049 c.registerHandler)("settings.save", r, !1),1050 (0,1051 c.registerHandler)("settings.remove", o, !1)1052 }1053 ,1054 e.setValidityState = function(e) {1055 (0,1056 s.ensureInitialized)(l.FrameContexts.settings, l.FrameContexts.remove),1057 (0,1058 d.sendMessageToParent)("settings.setValidityState", [e])1059 }1060 ,1061 e.getSettings = function(e) {1062 (0,1063 s.ensureInitialized)(l.FrameContexts.content, l.FrameContexts.settings, l.FrameContexts.remove, l.FrameContexts.sidePanel),1064 (0,1065 d.sendMessageToParent)("settings.getSettings", e)1066 }1067 ,1068 e.setSettings = function(e, n) {1069 (0,1070 s.ensureInitialized)(l.FrameContexts.content, l.FrameContexts.settings, l.FrameContexts.sidePanel),1071 (0,1072 d.sendMessageToParent)("settings.setSettings", [e], n || (0,1073 u.getGenericOnCompleteHandler)())1074 }1075 ,1076 e.registerOnSaveHandler = function(e) {1077 (0,1078 s.ensureInitialized)(l.FrameContexts.settings),1079 (n = e) && (0,1080 d.sendMessageToParent)("registerHandler", ["save"])1081 }1082 ,1083 e.registerOnRemoveHandler = function(e) {1084 (0,1085 s.ensureInitialized)(l.FrameContexts.remove, l.FrameContexts.settings),1086 (t = e) && (0,1087 d.sendMessageToParent)("registerHandler", ["remove"])1088 }1089 ;1090 var i = function() {1091 function e(e) {1092 this.notified = !1,1093 this.result = e || {}1094 }1095 return e.prototype.notifySuccess = function() {1096 this.ensureNotNotified(),1097 (0,1098 d.sendMessageToParent)("settings.save.success"),1099 this.notified = !01100 }1101 ,1102 e.prototype.notifyFailure = function(e) {1103 this.ensureNotNotified(),1104 (0,1105 d.sendMessageToParent)("settings.save.failure", [e]),1106 this.notified = !01107 }1108 ,1109 e.prototype.ensureNotNotified = function() {1110 if (this.notified)1111 throw new Error("The SaveEvent may only notify success or failure once.")1112 }1113 ,1114 e1115 }();1116 function o() {1117 var e = new a;1118 t ? t(e) : e.notifySuccess()1119 }1120 var a = function() {1121 function e() {1122 this.notified = !11123 }1124 return e.prototype.notifySuccess = function() {1125 this.ensureNotNotified(),1126 (0,1127 d.sendMessageToParent)("settings.remove.success"),1128 this.notified = !01129 }1130 ,1131 e.prototype.notifyFailure = function(e) {1132 this.ensureNotNotified(),1133 (0,1134 d.sendMessageToParent)("settings.remove.failure", [e]),1135 this.notified = !01136 }1137 ,1138 e.prototype.ensureNotNotified = function() {1139 if (this.notified)1140 throw new Error("The removeEvent may only notify success or failure once.")1141 }1142 ,1143 e1144 }()1145 }(n.settings || (n.settings = {}))1146 }1147 , function(e, n, t) {1148 "use strict";1149 Object.defineProperty(n, "__esModule", {1150 value: !01151 }),1152 n.logs = void 0;1153 var r = t(1)1154 , i = t(0)1155 , o = t(3);1156 !function() {1157 (n.logs || (n.logs = {})).registerGetLogHandler = function(n) {1158 (0,1159 r.ensureInitialized)(),1160 n ? (0,1161 o.registerHandler)("log.request", function() {1162 var e = n();1163 (0,1164 i.sendMessageToParent)("log.receive", [e])1165 }) : (0,1166 o.removeHandler)("log.request")1167 }1168 }()1169 }1170 , function(e, n, t) {1171 "use strict";1172 Object.defineProperty(n, "__esModule", {1173 value: !01174 }),1175 n.registerUserSettingsChangeHandler = n.getConfigSetting = n.getChatMembers = n.registerCustomHandler = n.sendCustomEvent = n.sendCustomMessage = n.uploadCustomApp = n.showNotification = n.openFilePreview = n.exitFullscreen = n.enterFullscreen = n.getUserJoinedTeams = n.initializePrivateApis = void 0;1176 var i = t(1)1177 , r = t(2)1178 , o = t(5)1179 , a = t(0)1180 , s = t(15)1181 , l = t(3)1182 , u = t(6)1183 , d = t(7)1184 , c = t(4);1185 n.initializePrivateApis = function() {1186 s.menus.initialize()1187 }1188 ,1189 n.getUserJoinedTeams = function(e, n) {1190 if ((0,1191 i.ensureInitialized)(),1192 (u.GlobalVars.hostClientType === r.HostClientType.android || u.GlobalVars.hostClientType === r.HostClientType.teamsRoomsAndroid || u.GlobalVars.hostClientType === r.HostClientType.teamsPhones || u.GlobalVars.hostClientType === r.HostClientType.teamsDisplays) && !(0,1193 i.isAPISupportedByPlatform)(c.getUserJoinedTeamsSupportedAndroidClientVersion)) {1194 var t = {1195 errorCode: d.ErrorCode.OLD_PLATFORM1196 };1197 throw new Error(JSON.stringify(t))1198 }1199 (0,1200 a.sendMessageToParent)("getUserJoinedTeams", [n], e)1201 }1202 ,1203 n.enterFullscreen = function() {1204 (0,1205 i.ensureInitialized)(r.FrameContexts.content),1206 (0,1207 a.sendMessageToParent)("enterFullscreen", [])1208 }1209 ,1210 n.exitFullscreen = function() {1211 (0,1212 i.ensureInitialized)(r.FrameContexts.content),1213 (0,1214 a.sendMessageToParent)("exitFullscreen", [])1215 }1216 ,1217 n.openFilePreview = function(e) {1218 (0,1219 i.ensureInitialized)(r.FrameContexts.content),1220 e = [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],1221 (0,1222 a.sendMessageToParent)("openFilePreview", e)1223 }1224 ,1225 n.showNotification = function(e) {1226 (0,1227 i.ensureInitialized)(r.FrameContexts.content),1228 e = [e.message, e.notificationType],1229 (0,1230 a.sendMessageToParent)("showNotification", e)1231 }1232 ,1233 n.uploadCustomApp = function(e, n) {1234 (0,1235 i.ensureInitialized)(),1236 (0,1237 a.sendMessageToParent)("uploadCustomApp", [e], n || (0,1238 o.getGenericOnCompleteHandler)())1239 }1240 ,1241 n.sendCustomMessage = function(e, n, t) {1242 (0,1243 i.ensureInitialized)(),1244 (0,1245 a.sendMessageToParent)(e, n, t)1246 }1247 ,1248 n.sendCustomEvent = function(e, n) {1249 if ((0,1250 i.ensureInitialized)(),1251 !a.Communication.childWindow)1252 throw new Error("The child window has not yet been initialized or is not present");1253 (0,1254 a.sendMessageEventToChild)(e, n)1255 }1256 ,1257 n.registerCustomHandler = function(e, t) {1258 var r = this;1259 (0,1260 i.ensureInitialized)(),1261 (0,1262 l.registerHandler)(e, function() {1263 for (var e = [], n = 0; n < arguments.length; n++)1264 e[n] = arguments[n];1265 return t.apply(r, e)1266 })1267 }1268 ,1269 n.getChatMembers = function(e) {1270 (0,1271 i.ensureInitialized)(),1272 (0,1273 a.sendMessageToParent)("getChatMembers", e)1274 }1275 ,1276 n.getConfigSetting = function(e, n) {1277 (0,1278 i.ensureInitialized)(),1279 (0,1280 a.sendMessageToParent)("getConfigSetting", [n], e)1281 }1282 ,1283 n.registerUserSettingsChangeHandler = function(e, n) {1284 (0,1285 i.ensureInitialized)(),1286 (0,1287 l.registerHandler)("userSettingsChange", n, !0, [e])1288 }1289 }1290 , function(e, n, t) {1291 "use strict";1292 Object.defineProperty(n, "__esModule", {1293 value: !01294 }),1295 n.menus = void 0;1296 var l = t(1)1297 , u = t(0)1298 , d = t(3);1299 !function(e) {1300 var t, r, i, n = function() {1301 return function() {1302 this.enabled = !0,1303 this.selected = !11304 }1305 }();1306 function o(e) {1307 i && i(e) || ((0,1308 l.ensureInitialized)(),1309 (0,1310 u.sendMessageToParent)("viewConfigItemPress", [e]))1311 }1312 function a(e) {1313 t && t(e) || ((0,1314 l.ensureInitialized)(),1315 (0,1316 u.sendMessageToParent)("handleNavBarMenuItemPress", [e]))1317 }1318 function s(e) {1319 r && r(e) || ((0,1320 l.ensureInitialized)(),1321 (0,1322 u.sendMessageToParent)("handleActionMenuItemPress", [e]))1323 }1324 e.MenuItem = n,1325 function(e) {1326 e.dropDown = "dropDown",1327 e.popOver = "popOver"1328 }(e.MenuListType || (e.MenuListType = {})),1329 e.initialize = function() {1330 (0,1331 d.registerHandler)("navBarMenuItemPress", a, !1),1332 (0,1333 d.registerHandler)("actionMenuItemPress", s, !1),1334 (0,1335 d.registerHandler)("setModuleView", o, !1)1336 }1337 ,1338 e.setUpViews = function(e, n) {1339 (0,1340 l.ensureInitialized)(),1341 i = n,1342 (0,1343 u.sendMessageToParent)("setUpViews", [e])1344 }1345 ,1346 e.setNavBarMenu = function(e, n) {1347 (0,1348 l.ensureInitialized)(),1349 t = n,1350 (0,1351 u.sendMessageToParent)("setNavBarMenu", [e])1352 }1353 ,1354 e.showActionMenu = function(e, n) {1355 (0,1356 l.ensureInitialized)(),1357 r = n,1358 (0,1359 u.sendMessageToParent)("showActionMenu", [e])1360 }1361 }(n.menus || (n.menus = {}))1362 }1363 , function(e, n, t) {1364 "use strict";1365 Object.defineProperty(n, "__esModule", {1366 value: !01367 }),1368 n.ParentAppWindow = n.ChildAppWindow = void 0;1369 var r = t(1)1370 , i = t(2)1371 , o = t(5)1372 , a = t(0)1373 , s = t(3)1374 , t = function() {1375 function e() {}1376 return e.prototype.postMessage = function(e, n) {1377 (0,1378 r.ensureInitialized)(),1379 (0,1380 a.sendMessageToParent)("messageForChild", [e], n || (0,1381 o.getGenericOnCompleteHandler)())1382 }1383 ,1384 e.prototype.addEventListener = function(e, n) {1385 "message" === e && (0,1386 s.registerHandler)("messageForParent", n)1387 }1388 ,1389 e1390 }();1391 n.ChildAppWindow = t;1392 t = function() {1393 function e() {}1394 return Object.defineProperty(e, "Instance", {1395 get: function() {1396 return this._instance || (this._instance = new this)1397 },1398 enumerable: !1,1399 configurable: !01400 }),1401 e.prototype.postMessage = function(e, n) {1402 (0,1403 r.ensureInitialized)(i.FrameContexts.task),1404 (0,1405 a.sendMessageToParent)("messageForParent", [e], n || (0,1406 o.getGenericOnCompleteHandler)())1407 }1408 ,1409 e.prototype.addEventListener = function(e, n) {1410 "message" === e && (0,1411 s.registerHandler)("messageForChild", n)1412 }1413 ,1414 e1415 }();1416 n.ParentAppWindow = t1417 }1418 , function(e, n, t) {1419 "use strict";1420 var r = this && this.__extends || function() {1421 var r = function(e, n) {1422 return (r = Object.setPrototypeOf || {1423 __proto__: []1424 }instanceof Array && function(e, n) {1425 e.__proto__ = n1426 }1427 || function(e, n) {1428 for (var t in n)1429 Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t])1430 }1431 )(e, n)1432 };1433 return function(e, n) {1434 if ("function" != typeof n && null !== n)1435 throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");1436 function t() {1437 this.constructor = e1438 }1439 r(e, n),1440 e.prototype = null === n ? Object.create(n) : (t.prototype = n.prototype,1441 new t)1442 }1443 }();1444 Object.defineProperty(n, "__esModule", {1445 value: !01446 }),1447 n.media = void 0;1448 var i = t(6)1449 , o = t(7)1450 , l = t(1)1451 , u = t(2)1452 , a = t(5)1453 , d = t(18)1454 , c = t(0)1455 , m = t(3)1456 , g = t(4);1457 !function(e) {1458 !function(e) {1459 e.Base64 = "base64",1460 e.ID = "id"1461 }(e.FileFormat || (e.FileFormat = {}));1462 var n = function() {1463 return function() {}1464 }();1465 e.File = n,1466 e.captureImage = function(e) {1467 if (!e)1468 throw new Error("[captureImage] Callback cannot be null");1469 (0,1470 l.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.task),1471 i.GlobalVars.isFramelessWindow ? (0,1472 l.isAPISupportedByPlatform)(g.captureImageMobileSupportVersion) ? (0,1473 c.sendMessageToParent)("captureImage", e) : e({1474 errorCode: o.ErrorCode.OLD_PLATFORM1475 }, void 0) : e({1476 errorCode: o.ErrorCode.NOT_SUPPORTED_ON_PLATFORM1477 }, void 0)1478 }1479 ;1480 var s = function(t) {1481 function e(e) {1482 void 0 === e && (e = null);1483 var n = t.call(this) || this;1484 return e && (n.content = e.content,1485 n.format = e.format,1486 n.mimeType = e.mimeType,1487 n.name = e.name,1488 n.preview = e.preview,1489 n.size = e.size),1490 n1491 }1492 return r(e, t),1493 e.prototype.getMedia = function(e) {1494 if (!e)1495 throw new Error("[get Media] Callback cannot be null");1496 (0,1497 l.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.task),1498 (0,1499 l.isAPISupportedByPlatform)(g.mediaAPISupportVersion) ? (0,1500 d.validateGetMediaInputs)(this.mimeType, this.format, this.content) ? (0,1501 l.isAPISupportedByPlatform)(g.getMediaCallbackSupportVersion) ? this.getMediaViaCallback(e) : this.getMediaViaHandler(e) : e({1502 errorCode: o.ErrorCode.INVALID_ARGUMENTS1503 }, null) : e({1504 errorCode: o.ErrorCode.OLD_PLATFORM1505 }, null)1506 }1507 ,1508 e.prototype.getMediaViaCallback = function(t) {1509 var r = {1510 mediaMimeType: this.mimeType,1511 assembleAttachment: []1512 }1513 , e = [this.content];1514 (0,1515 c.sendMessageToParent)("getMedia", e, function(e) {1516 var n;1517 t && (e && e.error ? t(e.error, null) : e && e.mediaChunk ? e.mediaChunk.chunkSequence <= 0 ? (n = (0,1518 d.createFile)(r.assembleAttachment, r.mediaMimeType),1519 t(e.error, n)) : (e = (0,1520 d.decodeAttachment)(e.mediaChunk, r.mediaMimeType),1521 r.assembleAttachment.push(e)) : t({1522 errorCode: o.ErrorCode.INTERNAL_ERROR,1523 message: "data received is null"1524 }, null))1525 })1526 }1527 ,1528 e.prototype.getMediaViaHandler = function(t) {1529 var r = (0,1530 a.generateGUID)()1531 , i = {1532 mediaMimeType: this.mimeType,1533 assembleAttachment: []1534 }1535 , e = [r, this.content];1536 this.content && t && (0,1537 c.sendMessageToParent)("getMedia", e),1538 (0,1539 m.registerHandler)("getMedia" + r, function(e) {1540 var n;1541 t && ((n = JSON.parse(e)).error ? (t(n.error, null),1542 (0,1543 m.removeHandler)("getMedia" + r)) : n.mediaChunk ? n.mediaChunk.chunkSequence <= 0 ? (e = (0,1544 d.createFile)(i.assembleAttachment, i.mediaMimeType),1545 t(n.error, e),1546 (0,1547 m.removeHandler)("getMedia" + r)) : (n = (0,1548 d.decodeAttachment)(n.mediaChunk, i.mediaMimeType),1549 i.assembleAttachment.push(n)) : (t({1550 errorCode: o.ErrorCode.INTERNAL_ERROR,1551 message: "data received is null"1552 }, null),1553 (0,1554 m.removeHandler)("getMedia" + r)))1555 })1556 }1557 ,1558 e1559 }(n);1560 e.Media = s,1561 function(e) {1562 e[e.Photo = 1] = "Photo",1563 e[e.Document = 2] = "Document",1564 e[e.Whiteboard = 3] = "Whiteboard",1565 e[e.BusinessCard = 4] = "BusinessCard"1566 }(e.CameraStartMode || (e.CameraStartMode = {})),1567 function(e) {1568 e[e.Camera = 1] = "Camera",1569 e[e.Gallery = 2] = "Gallery"1570 }(e.Source || (e.Source = {})),1571 function(e) {1572 e[e.Image = 1] = "Image",1573 e[e.VideoAndImage = 3] = "VideoAndImage",1574 e[e.Audio = 4] = "Audio"1575 }(e.MediaType || (e.MediaType = {})),1576 function(e) {1577 e[e.ID = 1] = "ID",1578 e[e.URL = 2] = "URL"1579 }(e.ImageUriType || (e.ImageUriType = {})),1580 e.selectMedia = function(e, a) {1581 if (!a)1582 throw new Error("[select Media] Callback cannot be null");1583 if ((0,1584 l.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.task),1585 (0,1586 l.isAPISupportedByPlatform)(g.mediaAPISupportVersion)) {1587 if ((0,1588 d.isMediaCallForVideoAndImageInputs)(e)) {1589 if (i.GlobalVars.hostClientType != u.HostClientType.android && i.GlobalVars.hostClientType != u.HostClientType.ios) {1590 var n = {1591 errorCode: o.ErrorCode.NOT_SUPPORTED_ON_PLATFORM1592 };1593 return void a(n, null)1594 }1595 if (!(0,1596 l.isAPISupportedByPlatform)(g.videoAndImageMediaAPISupportVersion)) {1597 t = {1598 errorCode: o.ErrorCode.OLD_PLATFORM1599 };1600 return void a(t, null)1601 }1602 }1603 (0,1604 d.validateSelectMediaInputs)(e) ? (0,1605 c.sendMessageToParent)("selectMedia", [e], function(e, n) {1606 if (n) {1607 for (var t = [], r = 0, i = n; r < i.length; r++) {1608 var o = i[r];1609 t.push(new s(o))1610 }1611 a(e, t)1612 } else1613 a(e, null)1614 }) : (e = {1615 errorCode: o.ErrorCode.INVALID_ARGUMENTS1616 },1617 a(e, null))1618 } else {1619 var t = {1620 errorCode: o.ErrorCode.OLD_PLATFORM1621 };1622 a(t, null)1623 }1624 }1625 ,1626 e.viewImages = function(e, n) {1627 if (!n)1628 throw new Error("[view images] Callback cannot be null");1629 (0,1630 l.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.task),1631 (0,1632 l.isAPISupportedByPlatform)(g.mediaAPISupportVersion) ? (0,1633 d.validateViewImagesInput)(e) ? (0,1634 c.sendMessageToParent)("viewImages", [e], n) : n({1635 errorCode: o.ErrorCode.INVALID_ARGUMENTS1636 }) : n({1637 errorCode: o.ErrorCode.OLD_PLATFORM1638 })1639 }1640 ,1641 e.scanBarCode = function(e, n) {1642 if (!e)1643 throw new Error("[media.scanBarCode] Callback cannot be null");1644 (0,1645 l.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.task),1646 i.GlobalVars.hostClientType !== u.HostClientType.desktop && i.GlobalVars.hostClientType !== u.HostClientType.web && i.GlobalVars.hostClientType !== u.HostClientType.rigel && i.GlobalVars.hostClientType !== u.HostClientType.teamsRoomsWindows && i.GlobalVars.hostClientType !== u.HostClientType.teamsRoomsAndroid && i.GlobalVars.hostClientType !== u.HostClientType.teamsPhones && i.GlobalVars.hostClientType !== u.HostClientType.teamsDisplays ? (0,1647 l.isAPISupportedByPlatform)(g.scanBarCodeAPIMobileSupportVersion) ? (0,1648 d.validateScanBarCodeInput)(n) ? (0,1649 c.sendMessageToParent)("media.scanBarCode", [n], e) : e({1650 errorCode: o.ErrorCode.INVALID_ARGUMENTS1651 }, null) : e({1652 errorCode: o.ErrorCode.OLD_PLATFORM1653 }, null) : e({1654 errorCode: o.ErrorCode.NOT_SUPPORTED_ON_PLATFORM1655 }, null)1656 }1657 }(n.media || (n.media = {}))1658 }1659 , function(e, n, t) {1660 "use strict";1661 Object.defineProperty(n, "__esModule", {1662 value: !01663 }),1664 n.validatePeoplePickerInput = n.validateScanBarCodeInput = n.validateViewImagesInput = n.validateGetMediaInputs = n.isMediaCallForVideoAndImageInputs = n.validateSelectMediaInputs = n.decodeAttachment = n.createFile = void 0;1665 var r = t(17);1666 n.createFile = function(e, n) {1667 if (null == e || null == n || e.length <= 0)1668 return null;1669 var t, r = 1;1670 return e.sort(function(e, n) {1671 return e.sequence > n.sequence ? 1 : -11672 }),1673 e.forEach(function(e) {1674 e.sequence == r && (t = t ? new Blob([t, e.file],{1675 type: n1676 }) : new Blob([e.file],{1677 type: n1678 }),1679 r++)1680 }),1681 t1682 }1683 ,1684 n.decodeAttachment = function(e, n) {1685 if (null == e || null == n)1686 return null;1687 for (var t = atob(e.chunk), r = new Array(t.length), i = 0; i < t.length; i++)1688 r[i] = t.charCodeAt(i);1689 var o = new Uint8Array(r)1690 , n = new Blob([o],{1691 type: n1692 });1693 return {1694 sequence: e.chunkSequence,1695 file: n1696 }1697 }1698 ,1699 n.validateSelectMediaInputs = function(e) {1700 return !(null == e || 10 < e.maxMediaCount)1701 }1702 ,1703 n.isMediaCallForVideoAndImageInputs = function(e) {1704 return !(!e || e.mediaType != r.media.MediaType.VideoAndImage && !e.videoAndImageProps)1705 }1706 ,1707 n.validateGetMediaInputs = function(e, n, t) {1708 return null != e && null != n && n == r.media.FileFormat.ID && null != t1709 }1710 ,1711 n.validateViewImagesInput = function(e) {1712 return !(null == e || e.length <= 0 || 10 < e.length)1713 }1714 ,1715 n.validateScanBarCodeInput = function(e) {1716 return !e || !(null === e.timeOutIntervalInSec || e.timeOutIntervalInSec <= 0 || 60 < e.timeOutIntervalInSec)1717 }1718 ,1719 n.validatePeoplePickerInput = function(e) {1720 if (e) {1721 if (e.title && "string" != typeof e.title)1722 return !1;1723 if (e.setSelected && "object" != typeof e.setSelected)1724 return !1;1725 if (e.openOrgWideSearchInChatOrChannel && "boolean" != typeof e.openOrgWideSearchInChatOrChannel)1726 return !1;1727 if (e.singleSelect && "boolean" != typeof e.singleSelect)1728 return !11729 }1730 return !01731 }1732 }1733 , function(e, n, t) {1734 "use strict";1735 var r = this && this.__createBinding || (Object.create ? function(e, n, t, r) {1736 void 0 === r && (r = t),1737 Object.defineProperty(e, r, {1738 enumerable: !0,1739 get: function() {1740 return n[t]1741 }1742 })1743 }1744 : function(e, n, t, r) {1745 e[r = void 0 === r ? t : r] = n[t]1746 }1747 )1748 , i = this && this.__exportStar || function(e, n) {1749 for (var t in e)1750 "default" === t || Object.prototype.hasOwnProperty.call(n, t) || r(n, e, t)1751 }1752 ;1753 Object.defineProperty(n, "__esModule", {1754 value: !01755 }),1756 i(t(20), n),1757 i(t(8), n)1758 }1759 , function(e, n, t) {1760 "use strict";1761 Object.defineProperty(n, "__esModule", {1762 value: !01763 }),1764 n.teams = n.appEntity = n.files = n.remoteCamera = n.meetingRoom = n.conversations = n.registerUserSettingsChangeHandler = n.uploadCustomApp = n.registerCustomHandler = n.sendCustomEvent = n.showNotification = n.sendCustomMessage = n.openFilePreview = n.getUserJoinedTeams = n.getConfigSetting = n.getChatMembers = n.exitFullscreen = n.enterFullscreen = n.UserSettingTypes = n.ViewerActionTypes = n.NotificationTypes = n.logs = n.menus = n.bot = void 0;1765 var r = t(21);1766 Object.defineProperty(n, "bot", {1767 enumerable: !0,1768 get: function() {1769 return r.bot1770 }1771 });1772 var i = t(15);1773 Object.defineProperty(n, "menus", {1774 enumerable: !0,1775 get: function() {1776 return i.menus1777 }1778 });1779 var o = t(13);1780 Object.defineProperty(n, "logs", {1781 enumerable: !0,1782 get: function() {1783 return o.logs1784 }1785 });1786 var a = t(35);1787 Object.defineProperty(n, "NotificationTypes", {1788 enumerable: !0,1789 get: function() {1790 return a.NotificationTypes1791 }1792 }),1793 Object.defineProperty(n, "ViewerActionTypes", {1794 enumerable: !0,1795 get: function() {1796 return a.ViewerActionTypes1797 }1798 }),1799 Object.defineProperty(n, "UserSettingTypes", {1800 enumerable: !0,1801 get: function() {1802 return a.UserSettingTypes1803 }1804 });1805 var s = t(14);1806 Object.defineProperty(n, "enterFullscreen", {1807 enumerable: !0,1808 get: function() {1809 return s.enterFullscreen1810 }1811 }),1812 Object.defineProperty(n, "exitFullscreen", {1813 enumerable: !0,1814 get: function() {1815 return s.exitFullscreen1816 }1817 }),1818 Object.defineProperty(n, "getChatMembers", {1819 enumerable: !0,1820 get: function() {1821 return s.getChatMembers1822 }1823 }),1824 Object.defineProperty(n, "getConfigSetting", {1825 enumerable: !0,1826 get: function() {1827 return s.getConfigSetting1828 }1829 }),1830 Object.defineProperty(n, "getUserJoinedTeams", {1831 enumerable: !0,1832 get: function() {1833 return s.getUserJoinedTeams1834 }1835 }),1836 Object.defineProperty(n, "openFilePreview", {1837 enumerable: !0,1838 get: function() {1839 return s.openFilePreview1840 }1841 }),1842 Object.defineProperty(n, "sendCustomMessage", {1843 enumerable: !0,1844 get: function() {1845 return s.sendCustomMessage1846 }1847 }),1848 Object.defineProperty(n, "showNotification", {1849 enumerable: !0,1850 get: function() {1851 return s.showNotification1852 }1853 }),1854 Object.defineProperty(n, "sendCustomEvent", {1855 enumerable: !0,1856 get: function() {1857 return s.sendCustomEvent1858 }1859 }),1860 Object.defineProperty(n, "registerCustomHandler", {1861 enumerable: !0,1862 get: function() {1863 return s.registerCustomHandler1864 }1865 }),1866 Object.defineProperty(n, "uploadCustomApp", {1867 enumerable: !0,1868 get: function() {1869 return s.uploadCustomApp1870 }1871 }),1872 Object.defineProperty(n, "registerUserSettingsChangeHandler", {1873 enumerable: !0,1874 get: function() {1875 return s.registerUserSettingsChangeHandler1876 }1877 });1878 var l = t(36);1879 Object.defineProperty(n, "conversations", {1880 enumerable: !0,1881 get: function() {1882 return l.conversations1883 }1884 });1885 var u = t(37);1886 Object.defineProperty(n, "meetingRoom", {1887 enumerable: !0,1888 get: function() {1889 return u.meetingRoom1890 }1891 });1892 var d = t(38);1893 Object.defineProperty(n, "remoteCamera", {1894 enumerable: !0,1895 get: function() {1896 return d.remoteCamera1897 }1898 });1899 var c = t(39);1900 Object.defineProperty(n, "files", {1901 enumerable: !0,1902 get: function() {1903 return c.files1904 }1905 });1906 var m = t(40);1907 Object.defineProperty(n, "appEntity", {1908 enumerable: !0,1909 get: function() {1910 return m.appEntity1911 }1912 });1913 var g = t(41);1914 Object.defineProperty(n, "teams", {1915 enumerable: !0,1916 get: function() {1917 return g.teams1918 }1919 })1920 }1921 , function(e, n, t) {1922 "use strict";1923 Object.defineProperty(n, "__esModule", {1924 value: !01925 }),1926 n.bot = void 0;1927 var i = t(0)1928 , o = t(1);1929 !function(e) {1930 e.sendQuery = function(e, t, r) {1931 (0,1932 o.ensureInitialized)(),1933 (0,1934 i.sendMessageToParent)("bot.executeQuery", [e], function(e, n) {1935 (e ? t : r)(n)1936 })1937 }1938 ,1939 e.getSupportedCommands = function(t, r) {1940 (0,1941 o.ensureInitialized)(),1942 (0,1943 i.sendMessageToParent)("bot.getSupportedCommands", function(e, n) {1944 (e ? t : r)(n)1945 })1946 }1947 ,1948 e.authenticate = function(e, t, r) {1949 (0,1950 o.ensureInitialized)(),1951 (0,1952 i.sendMessageToParent)("bot.authenticate", [e], function(e, n) {1953 (e ? t : r)(n)1954 })1955 }1956 ,1957 function(e) {1958 e.Results = "Results",1959 e.Auth = "Auth"1960 }(e.ResponseType || (e.ResponseType = {}))1961 }(n.bot || (n.bot = {}))1962 }1963 , function(e, n, t) {1964 var r = t(23)1965 , i = t(24)1966 , t = i;1967 t.v1 = r,1968 t.v4 = i,1969 e.exports = t1970 }1971 , function(e, n, t) {1972 var d, c, m = t(9), g = t(10), f = 0, p = 0;1973 e.exports = function(e, n, t) {1974 var r = n && t || 01975 , i = n || []1976 , o = (e = e || {}).node || d1977 , a = void 0 !== e.clockseq ? e.clockseq : c;1978 null != o && null != a || (l = m(),1979 null == o && (o = d = [1 | l[0], l[1], l[2], l[3], l[4], l[5]]),1980 null == a && (a = c = 16383 & (l[6] << 8 | l[7])));1981 var s = void 0 !== e.msecs ? e.msecs : (new Date).getTime()1982 , t = void 0 !== e.nsecs ? e.nsecs : p + 11983 , l = s - f + (t - p) / 1e4;1984 if (l < 0 && void 0 === e.clockseq && (a = a + 1 & 16383),1985 1e4 <= (t = (l < 0 || f < s) && void 0 === e.nsecs ? 0 : t))1986 throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");1987 f = s,1988 c = a,1989 t = (1e4 * (268435455 & (s += 122192928e5)) + (p = t)) % 4294967296,1990 i[r++] = t >>> 24 & 255,1991 i[r++] = t >>> 16 & 255,1992 i[r++] = t >>> 8 & 255,1993 i[r++] = 255 & t,1994 s = s / 4294967296 * 1e4 & 268435455,1995 i[r++] = s >>> 8 & 255,1996 i[r++] = 255 & s,1997 i[r++] = s >>> 24 & 15 | 16,1998 i[r++] = s >>> 16 & 255,1999 i[r++] = a >>> 8 | 128,2000 i[r++] = 255 & a;2001 for (var u = 0; u < 6; ++u)2002 i[r + u] = o[u];2003 return n || g(i)2004 }2005 }2006 , function(e, n, t) {2007 var a = t(9)2008 , s = t(10);2009 e.exports = function(e, n, t) {2010 var r = n && t || 0;2011 "string" == typeof e && (n = "binary" === e ? new Array(16) : null,2012 e = null);2013 var i = (e = e || {}).random || (e.rng || a)();2014 if (i[6] = 15 & i[6] | 64,2015 i[8] = 63 & i[8] | 128,2016 n)2017 for (var o = 0; o < 16; ++o)2018 n[r + o] = i[o];2019 return n || s(i)2020 }2021 }2022 , function(e, n, t) {2023 "use strict";2024 Object.defineProperty(n, "__esModule", {2025 value: !02026 }),2027 n.appInitialization = void 0;2028 var r = t(1)2029 , i = t(4)2030 , o = t(0);2031 !function(n) {2032 n.Messages = {2033 AppLoaded: "appInitialization.appLoaded",2034 Success: "appInitialization.success",2035 Failure: "appInitialization.failure",2036 ExpectedFailure: "appInitialization.expectedFailure"2037 },2038 function(e) {2039 e.AuthFailed = "AuthFailed",2040 e.Timeout = "Timeout",2041 e.Other = "Other"2042 }(n.FailedReason || (n.FailedReason = {})),2043 function(e) {2044 e.PermissionError = "PermissionError",2045 e.NotFound = "NotFound",2046 e.Throttling = "Throttling",2047 e.Offline = "Offline",2048 e.Other = "Other"2049 }(n.ExpectedFailureReason || (n.ExpectedFailureReason = {})),2050 n.notifyAppLoaded = function() {2051 (0,2052 r.ensureInitialized)(),2053 (0,2054 o.sendMessageToParent)(n.Messages.AppLoaded, [i.version])2055 }2056 ,2057 n.notifySuccess = function() {2058 (0,2059 r.ensureInitialized)(),2060 (0,2061 o.sendMessageToParent)(n.Messages.Success, [i.version])2062 }2063 ,2064 n.notifyFailure = function(e) {2065 (0,2066 r.ensureInitialized)(),2067 (0,2068 o.sendMessageToParent)(n.Messages.Failure, [e.reason, e.message])2069 }2070 ,2071 n.notifyExpectedFailure = function(e) {2072 (0,2073 r.ensureInitialized)(),2074 (0,2075 o.sendMessageToParent)(n.Messages.ExpectedFailure, [e.reason, e.message])2076 }2077 }(n.appInitialization || (n.appInitialization = {}))2078 }2079 , function(e, n, t) {2080 "use strict";2081 Object.defineProperty(n, "__esModule", {2082 value: !02083 }),2084 n.initializeWithFrameContext = n.setFrameContext = n.executeDeepLink = n.shareDeepLink = n.getMruTabInstances = n.getTabInstances = n.registerEnterSettingsHandler = n.registerFocusEnterHandler = n.registerBeforeUnloadHandler = n.registerOnLoadHandler = n.registerBackButtonHandler = n.registerAppButtonHoverLeaveHandler = n.registerAppButtonHoverEnterHandler = n.registerAppButtonClickHandler = n.registerFullScreenHandler = n.registerOnThemeChangeHandler = n.getContext = n.print = n.enablePrintCapability = n._uninitialize = n._initialize = n.initialize = void 0;2085 var r = t(1)2086 , i = t(6)2087 , o = t(4)2088 , a = t(12)2089 , s = t(5)2090 , l = t(13)2091 , u = t(2)2092 , d = t(0)2093 , c = t(11)2094 , m = t(14)2095 , g = t(3);2096 function f(e, n) {2097 i.GlobalVars.initializeCalled || (i.GlobalVars.initializeCalled = !0,2098 g.initializeHandlers(),2099 (0,2100 d.initializeCommunication)(function(e, n, t) {2101 void 0 === t && (t = o.defaultSDKVersionForCompatCheck),2102 i.GlobalVars.frameContext = e,2103 i.GlobalVars.hostClientType = n,2104 i.GlobalVars.clientSupportedSDKVersion = t,2105 i.GlobalVars.initializeCallbacks.forEach(function(e) {2106 return e()2107 }),2108 i.GlobalVars.initializeCallbacks = [],2109 i.GlobalVars.initializeCompleted = !02110 }, n),2111 c.authentication.initialize(),2112 a.settings.initialize(),2113 (0,2114 m.initializePrivateApis)()),2115 Array.isArray(n) && (0,2116 r.processAdditionalValidOrigins)(n),2117 e && (i.GlobalVars.initializeCompleted ? e() : i.GlobalVars.initializeCallbacks.push(e))2118 }2119 function p() {2120 window.print()2121 }2122 function C(e) {2123 (0,2124 r.ensureInitialized)(),2125 g.registerOnThemeChangeHandler(e)2126 }2127 function h(e) {2128 (0,2129 r.ensureInitialized)(),2130 g.registerHandler("fullScreenChange", e)2131 }2132 function b(e) {2133 (0,2134 r.ensureInitialized)(),2135 g.registerBackButtonHandler(e)2136 }2137 function v(e) {2138 (0,2139 r.ensureInitialized)(),2140 g.registerOnLoadHandler(e)2141 }2142 function y(e) {2143 (0,2144 r.ensureInitialized)(),2145 g.registerBeforeUnloadHandler(e)2146 }2147 function P(e) {2148 (0,2149 r.ensureInitialized)(),2150 g.registerFocusEnterHandler(e)2151 }2152 function T(e) {2153 (0,2154 r.ensureInitialized)(u.FrameContexts.content),2155 (0,2156 d.sendMessageToParent)("setFrameContext", [e])2157 }2158 n.initialize = f,2159 n._initialize = function(e) {2160 d.Communication.currentWindow = e2161 }2162 ,2163 n._uninitialize = function() {2164 i.GlobalVars.initializeCalled && (i.GlobalVars.frameContext && (C(null),2165 h(null),2166 b(null),2167 y(null),2168 P(null),2169 v(null),2170 l.logs.registerGetLogHandler(null)),2171 i.GlobalVars.frameContext === u.FrameContexts.settings && a.settings.registerOnSaveHandler(null),2172 i.GlobalVars.frameContext === u.FrameContexts.remove && a.settings.registerOnRemoveHandler(null),2173 i.GlobalVars.initializeCalled = !1,2174 i.GlobalVars.initializeCompleted = !1,2175 i.GlobalVars.initializeCallbacks = [],2176 i.GlobalVars.additionalValidOrigins = [],2177 i.GlobalVars.frameContext = null,2178 i.GlobalVars.hostClientType = null,2179 (i.GlobalVars.isFramelessWindow = !1,2180 d.uninitializeCommunication)())2181 }2182 ,2183 n.enablePrintCapability = function() {2184 i.GlobalVars.printCapabilityEnabled || (i.GlobalVars.printCapabilityEnabled = !0,2185 (0,2186 r.ensureInitialized)(),2187 document.addEventListener("keydown", function(e) {2188 (e.ctrlKey || e.metaKey) && 80 === e.keyCode && (p(),2189 e.cancelBubble = !0,2190 e.preventDefault(),2191 e.stopImmediatePropagation())2192 }))2193 }2194 ,2195 n.print = p,2196 n.getContext = function(n) {2197 (0,2198 r.ensureInitialized)(),2199 (0,2200 d.sendMessageToParent)("getContext", function(e) {2201 e.frameContext || (e.frameContext = i.GlobalVars.frameContext),2202 n(e)2203 })2204 }2205 ,2206 n.registerOnThemeChangeHandler = C,2207 n.registerFullScreenHandler = h,2208 n.registerAppButtonClickHandler = function(e) {2209 (0,2210 r.ensureInitialized)(u.FrameContexts.content),2211 g.registerHandler("appButtonClick", e)2212 }2213 ,2214 n.registerAppButtonHoverEnterHandler = function(e) {2215 (0,2216 r.ensureInitialized)(u.FrameContexts.content),2217 g.registerHandler("appButtonHoverEnter", e)2218 }2219 ,2220 n.registerAppButtonHoverLeaveHandler = function(e) {2221 (0,2222 r.ensureInitialized)(u.FrameContexts.content),2223 g.registerHandler("appButtonHoverLeave", e)2224 }2225 ,2226 n.registerBackButtonHandler = b,2227 n.registerOnLoadHandler = v,2228 n.registerBeforeUnloadHandler = y,2229 n.registerFocusEnterHandler = P,2230 n.registerEnterSettingsHandler = function(e) {2231 (0,2232 r.ensureInitialized)(u.FrameContexts.content),2233 g.registerHandler("changeSettings", e)2234 }2235 ,2236 n.getTabInstances = function(e, n) {2237 (0,2238 r.ensureInitialized)(),2239 (0,2240 d.sendMessageToParent)("getTabInstances", [n], e)2241 }2242 ,2243 n.getMruTabInstances = function(e, n) {2244 (0,2245 r.ensureInitialized)(),2246 (0,2247 d.sendMessageToParent)("getMruTabInstances", [n], e)2248 }2249 ,2250 n.shareDeepLink = function(e) {2251 (0,2252 r.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.sidePanel, u.FrameContexts.meetingStage),2253 (0,2254 d.sendMessageToParent)("shareDeepLink", [e.subEntityId, e.subEntityLabel, e.subEntityWebUrl])2255 }2256 ,2257 n.executeDeepLink = function(e, n) {2258 (0,2259 r.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.sidePanel, u.FrameContexts.settings, u.FrameContexts.task, u.FrameContexts.stage, u.FrameContexts.meetingStage),2260 (0,2261 d.sendMessageToParent)("executeDeepLink", [e], n || (0,2262 s.getGenericOnCompleteHandler)())2263 }2264 ,2265 n.setFrameContext = T,2266 n.initializeWithFrameContext = function(e, n, t) {2267 f(n, t),2268 T(e)2269 }2270 }2271 , function(e, n, t) {2272 "use strict";2273 Object.defineProperty(n, "__esModule", {2274 value: !02275 }),2276 n.navigateBack = n.navigateCrossDomain = n.navigateToTab = n.returnFocus = void 0;2277 var r = t(1)2278 , i = t(5)2279 , o = t(2)2280 , a = t(0);2281 n.returnFocus = function(e) {2282 (0,2283 r.ensureInitialized)(o.FrameContexts.content),2284 (0,2285 a.sendMessageToParent)("returnFocus", [e])2286 }2287 ,2288 n.navigateToTab = function(e, n) {2289 (0,2290 r.ensureInitialized)(),2291 (0,2292 a.sendMessageToParent)("navigateToTab", [e], n || (0,2293 i.getGenericOnCompleteHandler)("Invalid internalTabInstanceId and/or channelId were/was provided"))2294 }2295 ,2296 n.navigateCrossDomain = function(e, n) {2297 (0,2298 r.ensureInitialized)(o.FrameContexts.content, o.FrameContexts.sidePanel, o.FrameContexts.settings, o.FrameContexts.remove, o.FrameContexts.task, o.FrameContexts.stage, o.FrameContexts.meetingStage),2299 (0,2300 a.sendMessageToParent)("navigateCrossDomain", [e], n || (0,2301 i.getGenericOnCompleteHandler)("Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest."))2302 }2303 ,2304 n.navigateBack = function(e) {2305 (0,2306 r.ensureInitialized)(),2307 (0,2308 a.sendMessageToParent)("navigateBack", [], e || (0,2309 i.getGenericOnCompleteHandler)("Back navigation is not supported in the current client or context."))2310 }2311 }2312 , function(e, n, t) {2313 "use strict";2314 var r = this && this.__rest || function(e, n) {2315 var t = {};2316 for (i in e)2317 Object.prototype.hasOwnProperty.call(e, i) && n.indexOf(i) < 0 && (t[i] = e[i]);2318 if (null != e && "function" == typeof Object.getOwnPropertySymbols)2319 for (var r = 0, i = Object.getOwnPropertySymbols(e); r < i.length; r++)2320 n.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[r]) && (t[i[r]] = e[i[r]]);2321 return t2322 }2323 ;2324 Object.defineProperty(n, "__esModule", {2325 value: !02326 }),2327 n.tasks = void 0;2328 var i = t(2)2329 , o = t(16)2330 , a = t(0)2331 , s = t(1);2332 !function(e) {2333 e.startTask = function(e, n) {2334 return (0,2335 s.ensureInitialized)(i.FrameContexts.content, i.FrameContexts.sidePanel, i.FrameContexts.meetingStage),2336 (0,2337 a.sendMessageToParent)("tasks.startTask", [e], n),2338 new o.ChildAppWindow2339 }2340 ,2341 e.updateTask = function(e) {2342 (0,2343 s.ensureInitialized)(i.FrameContexts.task),2344 e.width,2345 e.height;2346 var n = r(e, ["width", "height"]);2347 if (Object.keys(n).length)2348 throw new Error("updateTask requires a taskInfo argument containing only width and height");2349 (0,2350 a.sendMessageToParent)("tasks.updateTask", [e])2351 }2352 ,2353 e.submitTask = function(e, n) {2354 (0,2355 s.ensureInitialized)(i.FrameContexts.task),2356 (0,2357 a.sendMessageToParent)("tasks.completeTask", [e, Array.isArray(n) ? n : [n]])2358 }2359 }(n.tasks || (n.tasks = {}))2360 }2361 , function(e, n, t) {2362 "use strict";2363 Object.defineProperty(n, "__esModule", {2364 value: !02365 }),2366 n.location = void 0;2367 var r = t(7)2368 , i = t(1)2369 , o = t(2)2370 , a = t(0)2371 , s = t(4);2372 !function(e) {2373 e.getLocation = function(e, n) {2374 if (!n)2375 throw new Error("[location.getLocation] Callback cannot be null");2376 (0,2377 i.ensureInitialized)(o.FrameContexts.content, o.FrameContexts.task),2378 (0,2379 i.isAPISupportedByPlatform)(s.locationAPIsRequiredVersion) ? e ? (0,2380 a.sendMessageToParent)("location.getLocation", [e], n) : n({2381 errorCode: r.ErrorCode.INVALID_ARGUMENTS2382 }, void 0) : n({2383 errorCode: r.ErrorCode.OLD_PLATFORM2384 }, void 0)2385 }2386 ,2387 e.showLocation = function(e, n) {2388 if (!n)2389 throw new Error("[location.showLocation] Callback cannot be null");2390 (0,2391 i.ensureInitialized)(o.FrameContexts.content, o.FrameContexts.task),2392 (0,2393 i.isAPISupportedByPlatform)(s.locationAPIsRequiredVersion) ? e ? (0,2394 a.sendMessageToParent)("location.showLocation", [e], n) : n({2395 errorCode: r.ErrorCode.INVALID_ARGUMENTS2396 }, void 0) : n({2397 errorCode: r.ErrorCode.OLD_PLATFORM2398 }, void 0)2399 }2400 }(n.location || (n.location = {}))2401 }2402 , function(e, n, t) {2403 "use strict";2404 Object.defineProperty(n, "__esModule", {2405 value: !02406 }),2407 n.meeting = void 0;2408 var r = t(0)2409 , i = t(3)2410 , o = t(1)2411 , a = t(2);2412 !function(e) {2413 !function(e) {2414 e.Unknown = "Unknown",2415 e.Adhoc = "Adhoc",2416 e.Scheduled = "Scheduled",2417 e.Recurring = "Recurring",2418 e.Broadcast = "Broadcast",2419 e.MeetNow = "MeetNow"2420 }(e.MeetingType || (e.MeetingType = {})),2421 e.getIncomingClientAudioState = function(e) {2422 if (!e)2423 throw new Error("[get incoming client audio state] Callback cannot be null");2424 (0,2425 o.ensureInitialized)(a.FrameContexts.sidePanel, a.FrameContexts.meetingStage),2426 (0,2427 r.sendMessageToParent)("getIncomingClientAudioState", e)2428 }2429 ,2430 e.toggleIncomingClientAudio = function(e) {2431 if (!e)2432 throw new Error("[toggle incoming client audio] Callback cannot be null");2433 (0,2434 o.ensureInitialized)(a.FrameContexts.sidePanel, a.FrameContexts.meetingStage),2435 (0,2436 r.sendMessageToParent)("toggleIncomingClientAudio", e)2437 }2438 ,2439 e.getMeetingDetails = function(e) {2440 if (!e)2441 throw new Error("[get meeting details] Callback cannot be null");2442 (0,2443 o.ensureInitialized)(a.FrameContexts.sidePanel, a.FrameContexts.meetingStage, a.FrameContexts.settings, a.FrameContexts.content),2444 (0,2445 r.sendMessageToParent)("meeting.getMeetingDetails", e)2446 }2447 ,2448 e.getAuthenticationTokenForAnonymousUser = function(e) {2449 if (!e)2450 throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");2451 (0,2452 o.ensureInitialized)(a.FrameContexts.sidePanel, a.FrameContexts.meetingStage),2453 (0,2454 r.sendMessageToParent)("meeting.getAuthenticationTokenForAnonymousUser", e)2455 }2456 ,2457 e.getLiveStreamState = function(e) {2458 if (!e)2459 throw new Error("[get live stream state] Callback cannot be null");2460 (0,2461 o.ensureInitialized)(a.FrameContexts.sidePanel),2462 (0,2463 r.sendMessageToParent)("meeting.getLiveStreamState", e)2464 }2465 ,2466 e.requestStartLiveStreaming = function(e, n, t) {2467 if (!e)2468 throw new Error("[request start live streaming] Callback cannot be null");2469 (0,2470 o.ensureInitialized)(a.FrameContexts.sidePanel),2471 (0,2472 r.sendMessageToParent)("meeting.requestStartLiveStreaming", [n, t], e)2473 }2474 ,2475 e.requestStopLiveStreaming = function(e) {2476 if (!e)2477 throw new Error("[request stop live streaming] Callback cannot be null");2478 (0,2479 o.ensureInitialized)(a.FrameContexts.sidePanel),2480 (0,2481 r.sendMessageToParent)("meeting.requestStopLiveStreaming", e)2482 }2483 ,2484 e.registerLiveStreamChangedHandler = function(e) {2485 if (!e)2486 throw new Error("[register live stream changed handler] Handler cannot be null");2487 (0,2488 o.ensureInitialized)(a.FrameContexts.sidePanel),2489 (0,2490 i.registerHandler)("meeting.liveStreamChanged", e)2491 }2492 ,2493 e.shareAppContentToStage = function(e, n) {2494 if (!e)2495 throw new Error("[share app content to stage] Callback cannot be null");2496 (0,2497 o.ensureInitialized)(a.FrameContexts.sidePanel),2498 (0,2499 r.sendMessageToParent)("meeting.shareAppContentToStage", [n], e)2500 }2501 ,2502 e.getAppContentStageSharingCapabilities = function(e) {2503 if (!e)2504 throw new Error("[get app content stage sharing capabilities] Callback cannot be null");2505 (0,2506 o.ensureInitialized)(a.FrameContexts.sidePanel),2507 (0,2508 r.sendMessageToParent)("meeting.getAppContentStageSharingCapabilities", e)2509 }2510 ,2511 e.stopSharingAppContentToStage = function(e) {2512 if (!e)2513 throw new Error("[stop sharing app content to stage] Callback cannot be null");2514 (0,2515 o.ensureInitialized)(a.FrameContexts.sidePanel),2516 (0,2517 r.sendMessageToParent)("meeting.stopSharingAppContentToStage", e)2518 }2519 ,2520 e.getAppContentStageSharingState = function(e) {2521 if (!e)2522 throw new Error("[get app content stage sharing state] Callback cannot be null");2523 (0,2524 o.ensureInitialized)(a.FrameContexts.sidePanel),2525 (0,2526 r.sendMessageToParent)("meeting.getAppContentStageSharingState", e)2527 }2528 }(n.meeting || (n.meeting = {}))2529 }2530 , function(e, n, t) {2531 "use strict";2532 Object.defineProperty(n, "__esModule", {2533 value: !02534 }),2535 n.monetization = void 0;2536 var r = t(0)2537 , i = t(1)2538 , o = t(2);2539 !function() {2540 (n.monetization || (n.monetization = {})).openPurchaseExperience = function(e, n) {2541 if (!e)2542 throw new Error("[open purchase experience] Callback cannot be null");2543 (0,2544 i.ensureInitialized)(o.FrameContexts.content),2545 (0,2546 r.sendMessageToParent)("monetization.openPurchaseExperience", [n], e)2547 }2548 }()2549 }2550 , function(e, n, t) {2551 "use strict";2552 Object.defineProperty(n, "__esModule", {2553 value: !02554 }),2555 n.people = void 0;2556 var r = t(1)2557 , i = t(2)2558 , o = t(7)2559 , a = t(18)2560 , s = t(0)2561 , l = t(4);2562 !function() {2563 (n.people || (n.people = {})).selectPeople = function(e, n) {2564 if (!e)2565 throw new Error("[people picker] Callback cannot be null");2566 (0,2567 r.ensureInitialized)(i.FrameContexts.content, i.FrameContexts.task, i.FrameContexts.settings),2568 (0,2569 r.isAPISupportedByPlatform)(l.peoplePickerRequiredVersion) ? (0,2570 a.validatePeoplePickerInput)(n) ? (0,2571 s.sendMessageToParent)("people.selectPeople", [n], e) : e({2572 errorCode: o.ErrorCode.INVALID_ARGUMENTS2573 }, null) : e({2574 errorCode: o.ErrorCode.OLD_PLATFORM2575 }, void 0)2576 }2577 }()2578 }2579 , function(e, n, t) {2580 "use strict";2581 Object.defineProperty(n, "__esModule", {2582 value: !02583 }),2584 n.video = void 0;2585 var i = t(0)2586 , o = t(1)2587 , a = t(2)2588 , s = t(3);2589 !function(e) {2590 function t() {2591 (0,2592 i.sendMessageToParent)("video.videoFrameProcessed")2593 }2594 function r(e) {2595 (0,2596 i.sendMessageToParent)("video.notifyError", [e])2597 }2598 !function(e) {2599 e[e.NV12 = 0] = "NV12"2600 }(e.VideoFrameFormat || (e.VideoFrameFormat = {})),2601 function(e) {2602 e[e.EffectChanged = 0] = "EffectChanged",2603 e[e.EffectDisabled = 1] = "EffectDisabled"2604 }(e.EffectChangeType || (e.EffectChangeType = {})),2605 e.registerForVideoFrame = function(n, e) {2606 (0,2607 o.ensureInitialized)(a.FrameContexts.sidePanel),2608 (0,2609 s.registerHandler)("video.newVideoFrame", function(e) {2610 void 0 !== e && n(e, t, r)2611 }),2612 (0,2613 i.sendMessageToParent)("video.registerForVideoFrame", [e])2614 }2615 ,2616 e.notifySelectedVideoEffectChanged = function(e, n) {2617 (0,2618 o.ensureInitialized)(a.FrameContexts.sidePanel),2619 (0,2620 i.sendMessageToParent)("video.videoEffectChanged", [e, n])2621 }2622 ,2623 e.registerForVideoEffect = function(e) {2624 (0,2625 o.ensureInitialized)(a.FrameContexts.sidePanel),2626 (0,2627 s.registerHandler)("video.effectParameterChange", e)2628 }2629 ,2630 e.registerForPreviewStatus = function(e) {2631 (0,2632 o.ensureInitialized)(a.FrameContexts.sidePanel),2633 (0,2634 s.registerHandler)("video.previewStatusChanged", e)2635 }2636 }(n.video || (n.video = {}))2637 }2638 , function(e, n, t) {2639 "use strict";2640 Object.defineProperty(n, "__esModule", {2641 value: !02642 }),2643 n.sharing = void 0;2644 var a = t(1)2645 , s = t(0)2646 , l = t(7)2647 , u = t(2);2648 !function(t) {2649 function r(e, n) {2650 if (e && e.content && e.content.length)2651 return 1;2652 n && n({2653 errorCode: l.ErrorCode.INVALID_ARGUMENTS,2654 message: "Shared content is missing"2655 })2656 }2657 function i(n, e) {2658 if (n.content.some(function(e) {2659 return !e.type2660 }))2661 e && e({2662 errorCode: l.ErrorCode.INVALID_ARGUMENTS,2663 message: "Shared content type cannot be undefined"2664 });2665 else {2666 if (!n.content.some(function(e) {2667 return e.type !== n.content[0].type2668 }))2669 return 1;2670 e && e({2671 errorCode: l.ErrorCode.INVALID_ARGUMENTS,2672 message: "Shared content must be of the same type"2673 })2674 }2675 }2676 function o(e, n) {2677 if ("URL" === e.content[0].type) {2678 if (!e.content.some(function(e) {2679 return !e.url2680 }))2681 return 1;2682 n && n({2683 errorCode: l.ErrorCode.INVALID_ARGUMENTS,2684 message: "URLs are required for URL content types"2685 })2686 } else2687 n && n({2688 errorCode: l.ErrorCode.INVALID_ARGUMENTS,2689 message: "Content type is unsupported"2690 })2691 }2692 t.SharingAPIMessages = {2693 shareWebContent: "sharing.shareWebContent"2694 },2695 t.shareWebContent = function(e, n) {2696 r(e, n) && i(e, n) && o(e, n) && ((0,2697 a.ensureInitialized)(u.FrameContexts.content, u.FrameContexts.sidePanel, u.FrameContexts.task, u.FrameContexts.stage, u.FrameContexts.meetingStage),2698 (0,2699 s.sendMessageToParent)(t.SharingAPIMessages.shareWebContent, [e], n))2700 }2701 }(n.sharing || (n.sharing = {}))2702 }2703 , function(e, n, t) {2704 "use strict";2705 Object.defineProperty(n, "__esModule", {2706 value: !02707 }),2708 n.UserSettingTypes = n.ViewerActionTypes = n.NotificationTypes = void 0,2709 function(e) {2710 e.fileDownloadStart = "fileDownloadStart",2711 e.fileDownloadComplete = "fileDownloadComplete"2712 }(n.NotificationTypes || (n.NotificationTypes = {})),2713 function(e) {2714 e.view = "view",2715 e.edit = "edit",2716 e.editNew = "editNew"2717 }(n.ViewerActionTypes || (n.ViewerActionTypes = {})),2718 function(e) {2719 e.fileOpenPreference = "fileOpenPreference",2720 e.theme = "theme"2721 }(n.UserSettingTypes || (n.UserSettingTypes = {}))2722 }2723 , function(e, n, t) {2724 "use strict";2725 Object.defineProperty(n, "__esModule", {2726 value: !02727 }),2728 n.conversations = void 0;2729 var r = t(1)2730 , o = t(2)2731 , a = t(0)2732 , s = t(3);2733 !function(e) {2734 e.openConversation = function(i) {2735 (0,2736 r.ensureInitialized)(o.FrameContexts.content),2737 (0,2738 a.sendMessageToParent)("conversations.openConversation", [{2739 title: i.title,2740 subEntityId: i.subEntityId,2741 conversationId: i.conversationId,2742 channelId: i.channelId,2743 entityId: i.entityId2744 }], function(e, n) {2745 if (!e)2746 throw new Error(n)2747 }),2748 i.onStartConversation && (0,2749 s.registerHandler)("startConversation", function(e, n, t, r) {2750 return i.onStartConversation({2751 subEntityId: e,2752 conversationId: n,2753 channelId: t,2754 entityId: r2755 })2756 }),2757 i.onCloseConversation && (0,2758 s.registerHandler)("closeConversation", function(e, n, t, r) {2759 return i.onCloseConversation({2760 subEntityId: e,2761 conversationId: n,2762 channelId: t,2763 entityId: r2764 })2765 })2766 }2767 ,2768 e.closeConversation = function() {2769 (0,2770 r.ensureInitialized)(o.FrameContexts.content),2771 (0,2772 a.sendMessageToParent)("conversations.closeConversation"),2773 (0,2774 s.removeHandler)("startConversation"),2775 (0,2776 s.removeHandler)("closeConversation")2777 }2778 }(n.conversations || (n.conversations = {}))2779 }2780 , function(e, n, t) {2781 "use strict";2782 Object.defineProperty(n, "__esModule", {2783 value: !02784 }),2785 n.meetingRoom = void 0;2786 var r = t(1)2787 , i = t(0)2788 , o = t(3);2789 !function(e) {2790 !function(e) {2791 e.toggleMute = "toggleMute",2792 e.toggleCamera = "toggleCamera",2793 e.toggleCaptions = "toggleCaptions",2794 e.volume = "volume",2795 e.showVideoGallery = "showVideoGallery",2796 e.showContent = "showContent",2797 e.showVideoGalleryAndContent = "showVideoGalleryAndContent",2798 e.showLargeGallery = "showLargeGallery",2799 e.showTogether = "showTogether",2800 e.leaveMeeting = "leaveMeeting"2801 }(e.Capability || (e.Capability = {})),2802 e.getPairedMeetingRoomInfo = function(e) {2803 (0,2804 r.ensureInitialized)(),2805 (0,2806 i.sendMessageToParent)("meetingRoom.getPairedMeetingRoomInfo", e)2807 }2808 ,2809 e.sendCommandToPairedMeetingRoom = function(e, n) {2810 if (!e || 0 == e.length)2811 throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");2812 if (!n)2813 throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Callback cannot be null");2814 (0,2815 r.ensureInitialized)(),2816 (0,2817 i.sendMessageToParent)("meetingRoom.sendCommandToPairedMeetingRoom", [e], n)2818 }2819 ,2820 e.registerMeetingRoomCapabilitiesUpdateHandler = function(n) {2821 if (!n)2822 throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");2823 (0,2824 r.ensureInitialized)(),2825 (0,2826 o.registerHandler)("meetingRoom.meetingRoomCapabilitiesUpdate", function(e) {2827 (0,2828 r.ensureInitialized)(),2829 n(e)2830 })2831 }2832 ,2833 e.registerMeetingRoomStatesUpdateHandler = function(n) {2834 if (!n)2835 throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");2836 (0,2837 r.ensureInitialized)(),2838 (0,2839 o.registerHandler)("meetingRoom.meetingRoomStatesUpdate", function(e) {2840 (0,2841 r.ensureInitialized)(),2842 n(e)2843 })2844 }2845 }(n.meetingRoom || (n.meetingRoom = {}))2846 }2847 , function(e, n, t) {2848 "use strict";2849 Object.defineProperty(n, "__esModule", {2850 value: !02851 }),2852 n.remoteCamera = void 0;2853 var r = t(1)2854 , i = t(2)2855 , o = t(0)2856 , a = t(3);2857 !function(e) {2858 !function(e) {2859 e.Reset = "Reset",2860 e.ZoomIn = "ZoomIn",2861 e.ZoomOut = "ZoomOut",2862 e.PanLeft = "PanLeft",2863 e.PanRight = "PanRight",2864 e.TiltUp = "TiltUp",2865 e.TiltDown = "TiltDown"2866 }(e.ControlCommand || (e.ControlCommand = {})),2867 function(e) {2868 e[e.CommandResetError = 0] = "CommandResetError",2869 e[e.CommandZoomInError = 1] = "CommandZoomInError",2870 e[e.CommandZoomOutError = 2] = "CommandZoomOutError",2871 e[e.CommandPanLeftError = 3] = "CommandPanLeftError",2872 e[e.CommandPanRightError = 4] = "CommandPanRightError",2873 e[e.CommandTiltUpError = 5] = "CommandTiltUpError",2874 e[e.CommandTiltDownError = 6] = "CommandTiltDownError",2875 e[e.SendDataError = 7] = "SendDataError"2876 }(e.ErrorReason || (e.ErrorReason = {})),2877 function(e) {2878 e[e.None = 0] = "None",2879 e[e.ControlDenied = 1] = "ControlDenied",2880 e[e.ControlNoResponse = 2] = "ControlNoResponse",2881 e[e.ControlBusy = 3] = "ControlBusy",2882 e[e.AckTimeout = 4] = "AckTimeout",2883 e[e.ControlTerminated = 5] = "ControlTerminated",2884 e[e.ControllerTerminated = 6] = "ControllerTerminated",2885 e[e.DataChannelError = 7] = "DataChannelError",2886 e[e.ControllerCancelled = 8] = "ControllerCancelled",2887 e[e.ControlDisabled = 9] = "ControlDisabled",2888 e[e.ControlTerminatedToAllowOtherController = 10] = "ControlTerminatedToAllowOtherController"2889 }(e.SessionTerminatedReason || (e.SessionTerminatedReason = {})),2890 e.getCapableParticipants = function(e) {2891 if (!e)2892 throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");2893 (0,2894 r.ensureInitialized)(i.FrameContexts.sidePanel),2895 (0,2896 o.sendMessageToParent)("remoteCamera.getCapableParticipants", e)2897 }2898 ,2899 e.requestControl = function(e, n) {2900 if (!e)2901 throw new Error("[remoteCamera.requestControl] Participant cannot be null");2902 if (!n)2903 throw new Error("[remoteCamera.requestControl] Callback cannot be null");2904 (0,2905 r.ensureInitialized)(i.FrameContexts.sidePanel),2906 (0,2907 o.sendMessageToParent)("remoteCamera.requestControl", [e], n)2908 }2909 ,2910 e.sendControlCommand = function(e, n) {2911 if (!e)2912 throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");2913 if (!n)2914 throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");2915 (0,2916 r.ensureInitialized)(i.FrameContexts.sidePanel),2917 (0,2918 o.sendMessageToParent)("remoteCamera.sendControlCommand", [e], n)2919 }2920 ,2921 e.terminateSession = function(e) {2922 if (!e)2923 throw new Error("[remoteCamera.terminateSession] Callback cannot be null");2924 (0,2925 r.ensureInitialized)(i.FrameContexts.sidePanel),2926 (0,2927 o.sendMessageToParent)("remoteCamera.terminateSession", e)2928 }2929 ,2930 e.registerOnCapableParticipantsChangeHandler = function(e) {2931 if (!e)2932 throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");2933 (0,2934 r.ensureInitialized)(i.FrameContexts.sidePanel),2935 (0,2936 a.registerHandler)("remoteCamera.capableParticipantsChange", e)2937 }2938 ,2939 e.registerOnErrorHandler = function(e) {2940 if (!e)2941 throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");2942 (0,2943 r.ensureInitialized)(i.FrameContexts.sidePanel),2944 (0,2945 a.registerHandler)("remoteCamera.handlerError", e)2946 }2947 ,2948 e.registerOnDeviceStateChangeHandler = function(e) {2949 if (!e)2950 throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");2951 (0,2952 r.ensureInitialized)(i.FrameContexts.sidePanel),2953 (0,2954 a.registerHandler)("remoteCamera.deviceStateChange", e)2955 }2956 ,2957 e.registerOnSessionStatusChangeHandler = function(e) {2958 if (!e)2959 throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");2960 (0,2961 r.ensureInitialized)(i.FrameContexts.sidePanel),2962 (0,2963 a.registerHandler)("remoteCamera.sessionStatusChange", e)2964 }2965 }(n.remoteCamera || (n.remoteCamera = {}))2966 }2967 , function(e, n, t) {2968 "use strict";2969 Object.defineProperty(n, "__esModule", {2970 value: !02971 }),2972 n.files = void 0;2973 var r = t(0)2974 , i = t(1)2975 , o = t(8);2976 !function(e) {2977 !function(e) {2978 e.Dropbox = "DROPBOX",2979 e.Box = "BOX",2980 e.Sharefile = "SHAREFILE",2981 e.GoogleDrive = "GOOGLEDRIVE",2982 e.Egnyte = "EGNYTE"2983 }(e.CloudStorageProvider || (e.CloudStorageProvider = {})),2984 function(e) {2985 e[e.Sharepoint = 0] = "Sharepoint",2986 e[e.WopiIntegration = 1] = "WopiIntegration",2987 e[e.Google = 2] = "Google"2988 }(e.CloudStorageProviderType || (e.CloudStorageProviderType = {})),2989 e.getCloudStorageFolders = function(e, n) {2990 if ((0,2991 i.ensureInitialized)(o.FrameContexts.content),2992 !e || 0 == e.length)2993 throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");2994 if (!n)2995 throw new Error("[files.getCloudStorageFolders] Callback cannot be null");2996 (0,2997 r.sendMessageToParent)("files.getCloudStorageFolders", [e], n)2998 }2999 ,3000 e.addCloudStorageFolder = function(e, n) {3001 if ((0,3002 i.ensureInitialized)(o.FrameContexts.content),3003 !e || 0 == e.length)3004 throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");3005 if (!n)3006 throw new Error("[files.addCloudStorageFolder] Callback cannot be null");3007 (0,3008 r.sendMessageToParent)("files.addCloudStorageFolder", [e], n)3009 }3010 ,3011 e.deleteCloudStorageFolder = function(e, n, t) {3012 if ((0,3013 i.ensureInitialized)(o.FrameContexts.content),3014 !e)3015 throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");3016 if (!n)3017 throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");3018 if (!t)3019 throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");3020 (0,3021 r.sendMessageToParent)("files.deleteCloudStorageFolder", [e, n], t)3022 }3023 ,3024 e.getCloudStorageFolderContents = function(e, n, t) {3025 if ((0,3026 i.ensureInitialized)(o.FrameContexts.content),3027 !e || !n)3028 throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");3029 if (!t)3030 throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");3031 if ("isSubdirectory"in e && !e.isSubdirectory)3032 throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");3033 (0,3034 r.sendMessageToParent)("files.getCloudStorageFolderContents", [e, n], t)3035 }3036 ,3037 e.openCloudStorageFile = function(e, n, t) {3038 if ((0,3039 i.ensureInitialized)(o.FrameContexts.content),3040 !e || !n)3041 throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");3042 if (e.isSubdirectory)3043 throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");3044 (0,3045 r.sendMessageToParent)("files.openCloudStorageFile", [e, n, t])3046 }3047 }(n.files || (n.files = {}))3048 }3049 , function(e, n, t) {3050 "use strict";3051 Object.defineProperty(n, "__esModule", {3052 value: !03053 }),3054 n.appEntity = void 0;3055 var i = t(0)3056 , o = t(1)3057 , a = t(8);3058 !function() {3059 (n.appEntity || (n.appEntity = {})).selectAppEntity = function(e, n, t, r) {3060 if ((0,3061 o.ensureInitialized)(a.FrameContexts.content),3062 !e || 0 == e.length)3063 throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");3064 if (!r)3065 throw new Error("[appEntity.selectAppEntity] Callback cannot be null");3066 (0,3067 i.sendMessageToParent)("appEntity.selectAppEntity", [e, n, t], r)3068 }3069 }()3070 }3071 , function(e, n, t) {3072 "use strict";3073 Object.defineProperty(n, "__esModule", {3074 value: !03075 }),3076 n.teams = void 0;3077 var r = t(0)3078 , i = t(1)3079 , o = t(8);3080 !function(e) {3081 !function(e) {3082 e[e.Regular = 0] = "Regular",3083 e[e.Private = 1] = "Private",3084 e[e.Shared = 2] = "Shared"3085 }(e.ChannelType || (e.ChannelType = {})),3086 e.getTeamChannels = function(e, n) {3087 if ((0,3088 i.ensureInitialized)(o.FrameContexts.content),3089 !e)3090 throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");3091 if (!n)3092 throw new Error("[teams.getTeamChannels] Callback cannot be null");3093 (0,3094 r.sendMessageToParent)("teams.getTeamChannels", [e], n)3095 }3096 ,3097 e.refreshSiteUrl = function(e, n) {3098 if ((0,3099 i.ensureInitialized)(),3100 !e)3101 throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");3102 if (!n)3103 throw new Error("[teams.refreshSiteUrl] Callback cannot be null");3104 (0,3105 r.sendMessageToParent)("teams.refreshSiteUrl", [e], n)3106 }3107 }(n.teams || (n.teams = {}))3108 }3109 ])...

Full Screen

Full Screen

epicker-ui.js

Source:epicker-ui.js Github

copy

Full Screen

...16 return;17 }18 clickPosition.clientX = ev.clientX;19 clickPosition.clientY = ev.clientY;20 sendMessageToParent({21 what: 'filterElementAtPoint',22 mx: ev.clientX,23 my: ev.clientY24 })25 };26 const calculationDialogPosition = function () {27 let x = clickPosition.clientX;28 let y = clickPosition.clientY;29 let width = document.body.clientWidth;30 let height = document.body.clientHeight;31 let dialogWidth = dialog.offsetWidth;32 let dialogHeight = 135;33 if (x > width - dialogWidth) {34 x = width - dialogWidth - 2;35 }36 if (y > height - dialogHeight) {37 y = height - dialogHeight - 2;38 }39 dialog.style.top = y + 'px';40 dialog.style.left = x + 'px';41 };42 const onQuitClicked = function () {43 quitPicker();44 };45 const onKeyPressed = function (ev) {46 // Esc47 if (ev.key === 'Escape' || ev.which === 27) {48 onQuitClicked();49 return;50 }51 };52 const svgListening = (() => {53 let on = false;54 let timer;55 let mx = 0, my = 0;56 const onTimer = () => {57 timer = undefined;58 sendMessageToParent({59 what: 'highlightElementAtPoint',60 mx,61 my,62 });63 };64 const onHover = ev => {65 mx = ev.clientX;66 my = ev.clientY;67 if (timer === undefined) {68 timer = self.requestAnimationFrame(onTimer);69 }70 };71 return state => {72 if (state === on) { return; }73 on = state;74 if (on) {75 document.addEventListener('mousemove', onHover, { passive: true });76 return;77 }78 document.removeEventListener('mousemove', onHover, { passive: true });79 if (timer !== undefined) {80 self.cancelAnimationFrame(timer);81 timer = undefined;82 }83 };84 })();85 const showDialog = function (details) {86 pausePicker();87 const { text } = details;88 if (!text || text.length == 0) {89 cmEditor.value = '';90 return;91 }92 cmEditor.value = text.join('\r\n');93 };94 const pausePicker = function () {95 pickerRoot.classList.add('paused');96 calculationDialogPosition();97 svgListening(false);98 };99 const unpausePicker = function () {100 pickerRoot.classList.remove('paused');101 sendMessageToParent({102 what: 'togglePreview',103 state: false,104 });105 svgListening(true);106 };107 const startPicker = function () {108 self.addEventListener('keydown', onKeyPressed, true);109 const svg = $stor('svg');110 svg.addEventListener('click', onSvgClicked);111 unpausePicker();112 };113 const quitPicker = function () {114 sendMessageToParent({ what: 'quitPicker' });115 };116 const onPickerMessage = function (msg) {117 switch (msg.what) {118 case 'showDialog':119 showDialog(msg);120 break;121 case 'svgPaths': {122 let { ocean, islands } = msg;123 ocean += islands;124 svgOcean.setAttribute('d', ocean);125 svgIslands.setAttribute('d', islands || NoPaths);126 break;127 }128 default:129 break;130 }131 };132 const onConnectionMessage = function (msg) {133 switch (msg.what) {134 case 'connectionMessage':135 onPickerMessage(msg.payload);136 break;137 case 'showDialog':138 showDialog(msg);139 break;140 case 'svgPaths': {141 let { ocean, islands } = msg;142 ocean += islands;143 svgOcean.setAttribute('d', ocean);144 svgIslands.setAttribute('d', islands || NoPaths);145 break;146 }147 case 'connectionAccepted':148 startPicker();149 sendMessageToParent({ what: 'start' });150 break;151 }152 };153 window.addEventListener('message', function (e) {154 if (e.source != window.parent) {155 return;156 }157 onConnectionMessage(e.data);158 }, false);159 const sendMessageToParent = function (msg) {160 window.parent.postMessage(msg, '*');161 }...

Full Screen

Full Screen

worker.js

Source:worker.js Github

copy

Full Screen

...21 * See the License for the specific language governing permissions and22 * limitations under the License.23 */24let closed = false;25sendMessageToParent('ready');26global.console = new _console.Console({27 stdout: process.stdout,28 stderr: process.stderr,29 colorMode: process.env.FORCE_COLOR === '1'30});31process.stdout.write = chunk => {32 var _workerRunner, _workerRunner$_curren;33 const outPayload = {34 testId: (_workerRunner = workerRunner) === null || _workerRunner === void 0 ? void 0 : (_workerRunner$_curren = _workerRunner._currentTest) === null || _workerRunner$_curren === void 0 ? void 0 : _workerRunner$_curren.testId,35 ...chunkToParams(chunk)36 };37 sendMessageToParent('stdOut', outPayload);38 return true;39};40if (!process.env.PW_RUNNER_DEBUG) {41 process.stderr.write = chunk => {42 var _workerRunner2, _workerRunner2$_curre;43 const outPayload = {44 testId: (_workerRunner2 = workerRunner) === null || _workerRunner2 === void 0 ? void 0 : (_workerRunner2$_curre = _workerRunner2._currentTest) === null || _workerRunner2$_curre === void 0 ? void 0 : _workerRunner2$_curre.testId,45 ...chunkToParams(chunk)46 };47 sendMessageToParent('stdErr', outPayload);48 return true;49 };50}51process.on('disconnect', gracefullyCloseAndExit);52process.on('SIGINT', () => {});53process.on('SIGTERM', () => {});54let workerRunner;55let workerIndex;56process.on('unhandledRejection', (reason, promise) => {57 if (workerRunner) workerRunner.unhandledError(reason);58});59process.on('uncaughtException', error => {60 if (workerRunner) workerRunner.unhandledError(error);61});62process.on('message', async message => {63 if (message.method === 'init') {64 const initParams = message.params;65 workerIndex = initParams.workerIndex;66 (0, _profiler.startProfiling)();67 workerRunner = new _workerRunner3.WorkerRunner(initParams);68 for (const event of ['testBegin', 'testEnd', 'stepBegin', 'stepEnd', 'done']) workerRunner.on(event, sendMessageToParent.bind(null, event));69 return;70 }71 if (message.method === 'stop') {72 await gracefullyCloseAndExit();73 return;74 }75 if (message.method === 'run') {76 const runPayload = message.params;77 await workerRunner.run(runPayload);78 }79});80async function gracefullyCloseAndExit() {81 if (closed) return;82 closed = true; // Force exit after 30 seconds.83 setTimeout(() => process.exit(0), 30000); // Meanwhile, try to gracefully shutdown.84 try {85 if (workerRunner) {86 await workerRunner.stop();87 await workerRunner.cleanup();88 }89 if (workerIndex !== undefined) await (0, _profiler.stopProfiling)(workerIndex);90 } catch (e) {91 process.send({92 method: 'teardownError',93 params: {94 error: (0, _util2.serializeError)(e)95 }96 });97 }98 process.exit(0);99}100function sendMessageToParent(method, params = {}) {101 try {102 process.send({103 method,104 params105 });106 } catch (e) {// Can throw when closing.107 }108}109function chunkToParams(chunk) {110 if (chunk instanceof Buffer) return {111 buffer: chunk.toString('base64')112 };113 if (typeof chunk !== 'string') return {114 text: util.inspect(chunk)...

Full Screen

Full Screen

testem_connection.js

Source:testem_connection.js Github

copy

Full Screen

...22 console.error('Testem: Error deserializing message:', message);23 return {};24 }25}26function sendMessageToParent(type, data) {27 var message = {type: type};28 if (data) {29 message.data = data;30 }31 message = serializeMessage(message);32 parent.postMessage(message, '*');33}34var addListener = window.addEventListener ?35 function(obj, evt, cb) { obj.addEventListener(evt, cb, false); } :36 function(obj, evt, cb) { obj.attachEvent('on' + evt, cb); };37addListener(window, 'message', handleMessage);38var messageListeners = {};39function handleMessage(event) {40 if (event.source !== window.parent) {41 // Ignore messages not from the parent42 return;43 }44 var message = deserializeMessage(event.data);45 var type = message.type;46 var data = message.data;47 if (messageListeners[type]) {48 var callback = messageListeners[type].callback;49 var listenOnce = messageListeners[type].listenOnce;50 callback(data);51 if (listenOnce) {52 messageListeners[type] = null;53 }54 }55}56function addMessageListener(type, callback, listenOnce) {57 messageListeners[type] = {callback: callback, listenOnce: listenOnce};58}59function addMessageListenerOnce(type, callback) {60 var listenOnce = true;61 addMessageListener(type, callback, listenOnce);62}63function startTests() {64 socket.disconnect();65 sendMessageToParent('reload');66}67function initUI() {68 var markup = 'TEST\u0027EM \u0027SCRIPTS!';69 var elm = document.createElement('div');70 elm.id = '__testem_ui__';71 elm.className = connectStatus;72 elm.innerHTML = markup;73 document.body.appendChild(elm);74}75function getBrowserName(userAgent) {76 var regexs = [77 /MS(?:(IE) (1?[0-9]\.[0-9]))/,78 [/Trident\/.* rv:(1?[0-9]\.[0-9])/, function(m) {79 return ['IE', m[1]].join(' ');80 }],81 [/(OPR)\/([0-9]+\.[0-9]+)/, function(m) {82 return ['Opera', m[2]].join(' ');83 }],84 /(Opera).*Version\/([0-9]+\.[0-9]+)/,85 /(Edge)\/([0-9]+\.[0-9]+)/,86 /(Chrome)\/([0-9]+\.[0-9]+)/,87 /(Firefox)\/([0-9a-z]+\.[0-9a-z]+)/,88 /(PhantomJS)\/([0-9]+\.[0-9]+)/,89 [/(Android).*Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m) {90 return [m[1], m[3], m[2]].join(' ');91 }],92 [/(iPhone).*Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m) {93 return [m[1], m[3], m[2]].join(' ');94 }],95 [/(iPad).*Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m) {96 return [m[1], m[3], m[2]].join(' ');97 }],98 [/Version\/([0-9]+\.[0-9]+).*(Safari)/, function(m) {99 return [m[2], m[1]].join(' ');100 }]101 ];102 var defaultPick = function(m) {103 return m.slice(1).join(' ');104 };105 for (var i = 0; i < regexs.length; i++) {106 var regex = regexs[i];107 var pick = defaultPick;108 if (regex instanceof Array) {109 pick = regex[1];110 regex = regex[0];111 }112 var match = userAgent.match(regex);113 if (match) {114 return pick(match);115 }116 }117 return userAgent;118}119function getId(callback) {120 addMessageListenerOnce('get-id', function(id) {121 callback(id);122 });123 sendMessageToParent('get-id');124}125function init() {126 getId(function(id) {127 if (id === '-1') { // No connection required128 sendMessageToParent('no-connection-required');129 } else {130 initSocket(id);131 addListener(window, 'load', initUI);132 addMessageListener('emit-message', function(item) {133 socket.emit.apply(socket, item);134 });135 sendMessageToParent('iframe-ready');136 }137 });138}139function initSocket(id) {140 socket = io.connect({ reconnectionDelayMax: 1000, randomizationFactor: 0 });141 socket.emit('browser-login', getBrowserName(navigator.userAgent), id);142 socket.on('connect', function() {143 connectStatus = 'connected';144 syncConnectStatus();145 });146 socket.on('disconnect', function() {147 connectStatus = 'disconnected';148 syncConnectStatus();149 });150 socket.on('start-tests', startTests);151 socket.on('tap-all-test-results', function() {152 sendMessageToParent('tap-all-test-results');153 });154 socket.on('stop-run', function() {155 sendMessageToParent('stop-run');156 });157}...

Full Screen

Full Screen

input_form.js

Source:input_form.js Github

copy

Full Screen

...62 if (this.input.val()) {63 return true;64 } else {65 this.setState('error');66 this.sendMessageToParent('error',"You need to enter an address");67 return false;68 }69};70// Submit the form to OA71OA.InputForm.prototype.submitForm = function() {72 var data = {73 address: this.input.val(),74 contribute: this.checkbox.prop('checked')75 };76 if (this.validate()) {77 $.ajax({78 method: 'post',79 url: OA.url,80 data: data,81 context: this,82 beforeSend: function(xhr,obj) {83 this.onLoading(data);84 },85 success: function(data,status,xhr) {86 this.onSuccess(data);87 },88 error: function(xhr,status,error) {89 this.onError(error);90 }91 })92 }93};94// Handle successful submission to OA95OA.InputForm.prototype.onLoading = function(data) {96 this.sendMessageToParent('loading', data);97 this.setState('loading')98};99// Handle successful submission to OA100OA.InputForm.prototype.onSuccess = function(data) {101 this.sendMessageToParent('success', data);102 this.setState('success')103};104// Handle unsuccessful submission to OA105OA.InputForm.prototype.onError = function(message) {106 this.sendMessageToParent('error',message);107 this.setState('error');108};109OA.InputForm.prototype.setState = function(status) {110 var className = 'is-'+status;111 var _container = this.container;112 $(this.formStatuses).each(function(i,val) {113 _container.removeClass("is-"+val);114 });115 this.container.addClass(className);116 if (status == 'collecting') {117 this.input.attr('disabled',false);118 this.input.focus();119 }120 if (status == 'loading' || status == 'error') {...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

...23 if(origin&&item){24 if(loaded===false){25 //加载配置26 console.log('get model config ...');27 sendMessageToParent(createGetModelConfMessage({frameType:item.frameType,frameID:item.key,origin:origin},modelID));28 } else {29 console.log("loaded views :",views);30 dispatch(initDataView(views));31 }32 }33 },[loaded,origin,item,modelID,dispatch,sendMessageToParent,views]);34 if(loaded&&currentView){35 return (36 <div className='list_view_main'>37 <Row>38 <Col span={6}><ModelViewList/></Col>39 <Col span={18}><ListOperationBar sendMessageToParent={sendMessageToParent}/></Col>40 </Row>41 <Row>...

Full Screen

Full Screen

kepler.js

Source:kepler.js Github

copy

Full Screen

...4window.addEventListener('message', function(e) {5 let view = e.data;6 if(view === "map") {7 viewMap(KeplerGl, store);8 sendMessageToParent(view);9 } else if(view === "satellite") {10 viewSatellite(KeplerGl, store);11 sendMessageToParent(view);12 } else if(view === "road") {13 // view road14 sendMessageToParent(view);15 } else {16 throw new Error("invalid view");17 }18});19// send message to iframe when view is changed20function sendMessageToParent(view) {21 parent.postMessage(view, "*");22 console.log("view changed");...

Full Screen

Full Screen

Remote.js

Source:Remote.js Github

copy

Full Screen

2import {useListenerEffect, sendMessageToParent} from '../useIFrame';3function Remote() {4 const [message, updateMessage] = useState();5 const sendMessage = (data) => {6 sendMessageToParent(data);7 }8 useListenerEffect((message) => updateMessage(message))9 return <>10 <h1>Remote Application</h1>11 <h2>Message from Parent: {message}</h2>12 <input onChange={(e) => sendMessage(e.target.value)}/>13 </>14}...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const playwright = require('playwright');2(async () => {3 const browser = await playwright.chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.evaluate(() => {7 window.playwright.sendMessageToParent('hello');8 });9 await browser.close();10})();11from playwright.sync_api import sync_playwright12with sync_playwright() as p:13 browser = p.chromium.launch()14 page = browser.new_page()15 page.evaluate("() => window.playwright.sendMessageToParent('hello')")16 browser.close()17const playwright = require('playwright');18(async () => {19 const browser = await playwright.chromium.launch();20 const context = await browser.newContext();21 const page = await context.newPage();22 const size = await page.evaluate(() => {23 return window.playwright.sendMessageToParent('resize-window', { width: 100, height: 200 });24 });25 console.log('size', size);26 await browser.close();27})();28from playwright.sync_api import sync_playwright29with sync_playwright() as p:30 browser = p.chromium.launch()31 page = browser.new_page()32 size = page.evaluate("() => window.playwright.sendMessageToParent('resize-window', { width: 100, height: 200 })")33 print('size', size)34 browser.close()35const playwright = require('playwright');36(async () => {37 const browser = await playwright.chromium.launch();38 const context = await browser.newContext();39 const page = await context.newPage();40 const browserName = await page.evaluate(() => {41 return window.playwright.sendMessageToParent('get-browser-name');

Full Screen

Using AI Code Generation

copy

Full Screen

1const playwright = require('playwright');2const browser = await playwright.chromium.launch();3const context = await browser.newContext();4const page = await context.newPage();5await page.evaluate(() => {6 window['playwright'].sendMessageToParent('hello');7});8await page.close();9await context.close();10await browser.close();11const playwright = require('playwright');12const browser = await playwright.chromium.launch();13const context = await browser.newContext();14const page = await context.newPage();15await page.evaluate(() => {16 window['playwright'].sendMessageToParent('hello');17});18await page.close();19await context.close();20await browser.close();21const playwright = require('playwright');22const browser = await playwright.chromium.launch();23const context = await browser.newContext();24const page = await context.newPage();25await page.evaluate(() => {26 window['playwright'].sendMessageToParent('hello');27});28await page.close();29await context.close();30await browser.close();31const playwright = require('playwright');32const browser = await playwright.chromium.launch();33const context = await browser.newContext();34const page = await context.newPage();35await page.evaluate(() => {36 window['playwright'].sendMessageToParent('hello');37});38await page.close();39await context.close();40await browser.close();41const playwright = require('playwright');42const browser = await playwright.chromium.launch();43const context = await browser.newContext();44const page = await context.newPage();45await page.evaluate(() => {46 window['playwright'].sendMessageToParent('hello');47});

Full Screen

Using AI Code Generation

copy

Full Screen

1const playwright = require('playwright');2(async () => {3 const browser = await playwright.chromium.launch();4 const page = await browser.newPage();5 await page.exposeFunction('sendMessageToParent', (message) => {6 console.log(message);7 });8 await page.evaluate(() => {9 sendMessageToParent('hello from child');10 });11 await browser.close();12})();13const playwright = require('playwright');14(async () => {15 const browser = await playwright.chromium.launch();16 const page = await browser.newPage();17 await page.exposeFunction('sendMessageToParent', (message) => {18 console.log(message);19 });20 await page.evaluate(() => {21 sendMessageToParent('hello from child');22 });23 await browser.close();24})();25const playwright = require('playwright');26(async () => {27 const browser = await playwright.chromium.launch();28 const page = await browser.newPage();29 await page.exposeFunction('sendMessageToParent', (message) => {30 console.log(message);31 });32 await page.evaluate(() => {33 sendMessageToParent('hello from child');34 });35 await browser.close();36})();37const playwright = require('playwright');38(async () => {39 const browser = await playwright.chromium.launch();40 const page = await browser.newPage();41 await page.exposeFunction('sendMessageToParent', (message) => {42 console.log(message);43 });44 await page.evaluate(() => {45 sendMessageToParent('hello from child');46 });47 await browser.close();48})();49const playwright = require('playwright');50(async () => {51 const browser = await playwright.chromium.launch();52 const page = await browser.newPage();53 await page.exposeFunction('sendMessageToParent', (message) => {54 console.log(message);55 });

Full Screen

Using AI Code Generation

copy

Full Screen

1const { sendMessageToParent } = require('@playwright/test/lib/server/transport');2const { test } = require('@playwright/test');3test('test', async ({ page }) => {4 await sendMessageToParent('message', { result: 'hello' });5});6const { test, expect } = require('@playwright/test');7test.describe('test', () => {8 test.beforeEach(async ({}, testInfo) => {9 testInfo.attachments.push({10 });11 });12 test('test', async ({}, testInfo) => {13 const { result } = testInfo.attachments.find((a) => a.name === 'message');14 expect(result).toBe('hello');15 });16});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { sendMessageToParent } = require('@playwright/test/lib/test');2describe('Test', () => {3 it('should send message to parent', async () => {4 await sendMessageToParent({ foo: 'bar' });5 });6});7In the above code, we are importing the sendMessageToParent method and using it in a test. We can then run this test using the below command:8[ { foo: 'bar' } ]9const { testRunner } = require('@playwright/test');10testRunner.on('testDone', (testInfo) => {11 if (testInfo.error) {12 sendMessageToParent({ foo: 'bar' });13 }14});15describe('Test', () => {16 it('should send message to parent', async () => {17 expect(true).toBe(false);18 });19});20[ { foo: 'bar' } ]

Full Screen

Using AI Code Generation

copy

Full Screen

1const { sendMessageToParent } = require('playwright/lib/client/api');2sendMessageToParent('message', { foo: 'bar' });3const { test } = require('@playwright/test');4test('test', async ({ page }) => {5 page.on('message', (msg) => {6 console.log(msg);7 });8});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { sendMessageToParent } = require('@playwright/test/lib/utils/testReporter');2sendMessageToParent('message', { 'message': 'message to send' });3process.on('message', (message) => {4 if (message.type === 'message') {5 console.log(message.message);6 }7});8"scripts": {9}10const { sendMessageToParent } = require('@playwright/test/lib/utils/testReporter');11sendMessageToParent('message', { 'message': 'run test test2' });12const { spawn } = require('child_process');13process.on('message', (message) => {14 if (message.type === 'message') {15 if (message.message === 'run test test2') {16 spawn('npx', ['playwright', 'test', '--grep', 'test2'], {17 });18 }19 }20});21 ✓ test2 (1ms)22 1 passed (30ms)23 ✓ test1 (1ms)24 1 passed (30ms)25 ✓ test3 (1ms)26 1 passed (30ms)27 ✓ test4 (1ms)28 1 passed (30ms)29 ✓ test5 (1ms)30 1 passed (30ms)31 ✓ test6 (1ms)32 1 passed (30ms)33 ✓ test7 (1ms)34 1 passed (30ms)35 ✓ test8 (1ms)36 1 passed (30ms)37 ✓ test9 (1ms)38 1 passed (30ms)39 ✓ test10 (1ms)40 1 passed (30ms)41 ✓ test11 (1ms

Full Screen

Using AI Code Generation

copy

Full Screen

1const { sendMessageToParent } = require('@playwright/test/lib/utils/worker');2sendMessageToParent({ type: 'log', message: 'some message' });3const { test, expect } = require('@playwright/test');4test.use({ foo: 'bar' }).describe('test', ({ foo }) => {5 expect(foo).toBe('bar');6});7const { test, expect } = require('@playwright/test');8const { chromium, firefox, webkit } = require('playwright');9test.use({ browserName: 'chromium', headless: false }).describe('chromium', ({ browserName, headless }) => {10 test.use({ browserName: 'firefox', headless: false }).describe('firefox', ({ browserName, headless }) => {11 test.use({ browserName: 'webkit', headless: false }).describe('webkit', ({ browserName, headless }) => {12 test('test', async ({ browserName, headless }) => {13 const browser = await { chromium, firefox, webkit }[browserName].launch({ headless });14 const context = await browser.newContext();15 const page = await context.newPage();16 expect(await page.title()).toBe('Playwright');17 await browser.close();18 });19 });20 });21});22const { test, expect } = require('@playwright/test');23const { devices } = require('playwright');24test.use({ deviceName: 'iPhone 11' }).describe('iPhone 11', ({ deviceName }) => {25 test.use({ deviceName: 'Pixel 2

Full Screen

Using AI Code Generation

copy

Full Screen

1const { sendMessageToParent } = require("@playwright/test");2sendMessageToParent("hello from child");3const { receiveMessageFromChild } = require("@playwright/test");4test.on("message", (msg) => {5 console.log("message from child:", msg);6});7const msg = await receiveMessageFromChild();8console.log("message from child:", msg);9setTimeout(() => {10 sendMessageToParent("hello from child");11}, 2000);12setTimeout(() => {13 sendMessageToParent("hello from child");14}, 4000);15setTimeout(() => {16 sendMessageToParent("hello from child");17}, 6000);18setTimeout(() => {19 sendMessageToParent("hello from child");20}, 8000);21setTimeout(() => {22 sendMessageToParent("hello from child");23}, 10000);24setTimeout(() => {25 sendMessageToParent("hello from child");26}, 12000);27setTimeout(() => {28 sendMessageToParent("hello from child");29}, 14000);30setTimeout(() => {31 sendMessageToParent("hello from child");32}, 16000);33setTimeout(() => {34 sendMessageToParent("hello from child");35}, 18000);

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful