UNPKG

@microsoft/office-js

Version:
12 lines (9 loc) • 258 kB
/* PowerPointer web application specific API library */ /* Version: 16.0.7920.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ var __extends = this && this.__extends || function (b, a) { for (var c in a) if (a.hasOwnProperty(c)) b[c] = a[c]; function d() { this.constructor = b } b.prototype = a === null ? Object.create(a) : (d.prototype = a.prototype, new d) }, OfficeExt; (function (b) { var a = function () { var a = true; function b() { } b.prototype.isMsAjaxLoaded = function () { var b = "function", c = "undefined"; if (typeof Sys !== c && typeof Type !== c && Sys.StringBuilder && typeof Sys.StringBuilder === b && Type.registerNamespace && typeof Type.registerNamespace === b && Type.registerClass && typeof Type.registerClass === b && typeof Function._validateParams === b && Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof Sys.Serialization.JavaScriptSerializer.serialize === b) return a; else return false }; b.prototype.loadMsAjaxFull = function (b) { var a = (window.location.protocol.toLowerCase() === "https:" ? "https:" : "http:") + "//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js"; OSF.OUtil.loadScript(a, b) }; Object.defineProperty(b.prototype, "msAjaxError", { "get": function () { var a = this; if (a._msAjaxError == null && a.isMsAjaxLoaded()) a._msAjaxError = Error; return a._msAjaxError }, "set": function (a) { this._msAjaxError = a }, enumerable: a, configurable: a }); Object.defineProperty(b.prototype, "msAjaxString", { "get": function () { var a = this; if (a._msAjaxString == null && a.isMsAjaxLoaded()) a._msAjaxString = String; return a._msAjaxString }, "set": function (a) { this._msAjaxString = a }, enumerable: a, configurable: a }); Object.defineProperty(b.prototype, "msAjaxDebug", { "get": function () { var a = this; if (a._msAjaxDebug == null && a.isMsAjaxLoaded()) a._msAjaxDebug = Sys.Debug; return a._msAjaxDebug }, "set": function (a) { this._msAjaxDebug = a }, enumerable: a, configurable: a }); return b }(); b.MicrosoftAjaxFactory = a })(OfficeExt || (OfficeExt = {})); var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory, OSF = OSF || {}, OfficeExt; (function (b) { var a = function () { function a(a) { this._internalStorage = a } a.prototype.getItem = function (a) { try { return this._internalStorage && this._internalStorage.getItem(a) } catch (b) { return null } }; a.prototype.setItem = function (b, a) { try { this._internalStorage && this._internalStorage.setItem(b, a) } catch (c) { } }; a.prototype.clear = function () { try { this._internalStorage && this._internalStorage.clear() } catch (a) { } }; a.prototype.removeItem = function (a) { try { this._internalStorage && this._internalStorage.removeItem(a) } catch (b) { } }; a.prototype.getKeysWithPrefix = function (d) { var b = []; try { for (var e = this._internalStorage && this._internalStorage.length || 0, a = 0; a < e; a++) { var c = this._internalStorage.key(a); c.indexOf(d) === 0 && b.push(c) } } catch (f) { } return b }; return a }(); b.SafeStorage = a })(OfficeExt || (OfficeExt = {})); OSF.XdmFieldName = { ConversationUrl: "ConversationUrl", AppId: "AppId" }; OSF.WindowNameItemKeys = { BaseFrameName: "baseFrameName", HostInfo: "hostInfo", XdmInfo: "xdmInfo", SerializerVersion: "serializerVersion", AppContext: "appContext" }; OSF.OUtil = function () { var g = "focus", f = "on", l = "configurable", k = "writable", e = "enumerable", h = "undefined", b = true, c = false, i = 2147483647, a = null, d = -1, s = d, x = "&_xdm_Info=", v = "&_serializer_version=", w = "_xdm_", A = "_serializer_version=", o = "#", u = "&", m = "class", r = {}, z = 3e4, n = a, q = a, j = (new Date).getTime(); function y() { var a = i * Math.random(); a ^= j ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10)); return a.toString(16) } function p() { if (!n) { try { var b = window.sessionStorage } catch (c) { b = a } n = new OfficeExt.SafeStorage(b) } return n } function t(e) { for (var c = [], b = [], f = e.length, a, d = 0; d < f; d++) { a = e[d]; if (a.tabIndex) if (a.tabIndex > 0) b.push(a); else a.tabIndex === 0 && c.push(a); else c.push(a) } b = b.sort(function (d, c) { var a = d.tabIndex - c.tabIndex; if (a === 0) a = b.indexOf(d) - b.indexOf(c); return a }); return [].concat(b, c) } return { set_entropy: function (a) { if (typeof a == "string") for (var b = 0; b < a.length; b += 4) { for (var d = 0, c = 0; c < 4 && b + c < a.length; c++) d = (d << 8) + a.charCodeAt(b + c); j ^= d } else if (typeof a == "number") j ^= a; else j ^= i * Math.random(); j &= i }, extend: function (b, a) { var c = function () { }; c.prototype = a.prototype; b.prototype = new c; b.prototype.constructor = b; b.uber = a.prototype; if (a.prototype.constructor === Object.prototype.constructor) a.prototype.constructor = a }, setNamespace: function (b, a) { if (a && b && !a[b]) a[b] = {} }, unsetNamespace: function (b, a) { if (a && b && a[b]) delete a[b] }, loadScript: function (f, g, h) { if (f && g) { var k = window.document, d = r[f]; if (!d) { var e = k.createElement("script"); e.type = "text/javascript"; d = { loaded: c, pendingCallbacks: [g], timer: a }; r[f] = d; var i = function () { if (d.timer != a) { clearTimeout(d.timer); delete d.timer } d.loaded = b; for (var e = d.pendingCallbacks.length, c = 0; c < e; c++) { var f = d.pendingCallbacks.shift(); f() } }, j = function () { delete r[f]; if (d.timer != a) { clearTimeout(d.timer); delete d.timer } for (var c = d.pendingCallbacks.length, b = 0; b < c; b++) { var e = d.pendingCallbacks.shift(); e() } }; if (e.readyState) e.onreadystatechange = function () { if (e.readyState == "loaded" || e.readyState == "complete") { e.onreadystatechange = a; i() } }; else e.onload = i; e.onerror = j; h = h || z; d.timer = setTimeout(j, h); e.setAttribute("crossOrigin", "anonymous"); e.src = f; k.getElementsByTagName("head")[0].appendChild(e) } else if (d.loaded) g(); else d.pendingCallbacks.push(g) } }, loadCSS: function (c) { if (c) { var b = window.document, a = b.createElement("link"); a.type = "text/css"; a.rel = "stylesheet"; a.href = c; b.getElementsByTagName("head")[0].appendChild(a) } }, parseEnum: function (b, c) { var a = c[b.trim()]; if (typeof a == h) { OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + b); throw OsfMsAjaxFactory.msAjaxError.argument("str") } return a }, delayExecutionAndCache: function () { var a = { calc: arguments[0] }; return function () { if (a.calc) { a.val = a.calc.apply(this, arguments); delete a.calc } return a.val } }, getUniqueId: function () { s = s + 1; return s.toString() }, formatString: function () { var a = arguments, b = a[0]; return b.replace(/{(\d+)}/gm, function (d, b) { var c = parseInt(b, 10) + 1; return a[c] === undefined ? "{" + b + "}" : a[c] }) }, generateConversationId: function () { return [y(), y(), (new Date).getTime().toString()].join("_") }, getFrameName: function (a) { return w + a + this.generateConversationId() }, addXdmInfoAsHash: function (b, a) { return OSF.OUtil.addInfoAsHash(b, x, a, c) }, addSerializerVersionAsHash: function (c, a) { return OSF.OUtil.addInfoAsHash(c, v, a, b) }, addInfoAsHash: function (b, f, c, h) { b = b.trim() || ""; var e = b.split(o), g = e.shift(), d = e.join(o), a; if (h) a = [f, encodeURIComponent(c), d].join(""); else a = [d, f, c].join(""); return [g, o, a].join("") }, parseHostInfoFromWindowName: function (a, b) { return OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.HostInfo) }, parseXdmInfo: function (b) { var a = OSF.OUtil.parseXdmInfoWithGivenFragment(b, window.location.hash); if (!a) a = OSF.OUtil.parseXdmInfoFromWindowName(b, window.name); return a }, parseXdmInfoFromWindowName: function (a, b) { return OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.XdmInfo) }, parseXdmInfoWithGivenFragment: function (a, b) { return OSF.OUtil.parseInfoWithGivenFragment(x, w, c, a, b) }, parseSerializerVersion: function (b) { var a = OSF.OUtil.parseSerializerVersionWithGivenFragment(b, window.location.hash); if (isNaN(a)) a = OSF.OUtil.parseSerializerVersionFromWindowName(b, window.name); return a }, parseSerializerVersionFromWindowName: function (a, b) { return parseInt(OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.SerializerVersion)) }, parseSerializerVersionWithGivenFragment: function (a, c) { return parseInt(OSF.OUtil.parseInfoWithGivenFragment(v, A, b, a, c)) }, parseInfoFromWindowName: function (g, h, f) { try { var b = JSON.parse(h), c = b != a ? b[f] : a, d = p(); if (!g && d && b != a) { var e = b[OSF.WindowNameItemKeys.BaseFrameName] + f; if (c) d.setItem(e, c); else c = d.getItem(e) } return c } catch (i) { return a } }, parseInfoWithGivenFragment: function (m, j, k, i, l) { var f = l.split(m), b = f.length > 1 ? f[f.length - 1] : a; if (k && b != a) { if (b.indexOf(u) >= 0) b = b.split(u)[0]; b = decodeURIComponent(b) } var c = p(); if (!i && c) { var e = window.name.indexOf(j); if (e > d) { var g = window.name.indexOf(";", e); if (g == d) g = window.name.length; var h = window.name.substring(e, g); if (b) c.setItem(h, b); else b = c.getItem(h) } } return b }, getConversationId: function () { var c = window.location.search, b = a; if (c) { var d = c.indexOf("&"); b = d > 0 ? c.substring(1, d) : c.substr(1); if (b && b.charAt(b.length - 1) === "=") { b = b.substring(0, b.length - 1); if (b) b = decodeURIComponent(b) } } return b }, getInfoItems: function (b) { var a = b.split("$"); if (typeof a[1] == h) a = b.split("|"); if (typeof a[1] == h) a = b.split("%7C"); return a }, getXdmFieldValue: function (e, d) { var b = "", c = OSF.OUtil.parseXdmInfo(d); if (c) { var a = OSF.OUtil.getInfoItems(c); if (a != undefined && a.length >= 3) switch (e) { case OSF.XdmFieldName.ConversationUrl: b = a[2]; break; case OSF.XdmFieldName.AppId: b = a[1] } } return b }, validateParamObject: function (f, e) { var a = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: c }, { name: "expectedProperties", type: Object, mayBeNull: c }, { name: "callback", type: Function, mayBeNull: b }]); if (a) throw a; for (var d in e) { a = Function._validateParameter(f[d], e[d], d); if (a) throw a } }, writeProfilerMark: function (a) { if (window.msWriteProfilerMark) { window.msWriteProfilerMark(a); OsfMsAjaxFactory.msAjaxDebug.trace(a) } }, outputDebug: function (a) { typeof OsfMsAjaxFactory !== h && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace && OsfMsAjaxFactory.msAjaxDebug.trace(a) }, defineNondefaultProperty: function (e, f, a, c) { a = a || {}; for (var g in c) { var d = c[g]; if (a[d] == undefined) a[d] = b } Object.defineProperty(e, f, a); return e }, defineNondefaultProperties: function (c, a, d) { a = a || {}; for (var b in a) OSF.OUtil.defineNondefaultProperty(c, b, a[b], d); return c }, defineEnumerableProperty: function (c, b, a) { return OSF.OUtil.defineNondefaultProperty(c, b, a, [e]) }, defineEnumerableProperties: function (b, a) { return OSF.OUtil.defineNondefaultProperties(b, a, [e]) }, defineMutableProperty: function (c, b, a) { return OSF.OUtil.defineNondefaultProperty(c, b, a, [k, e, l]) }, defineMutableProperties: function (b, a) { return OSF.OUtil.defineNondefaultProperties(b, a, [k, e, l]) }, finalizeProperties: function (e, d) { d = d || {}; for (var g = Object.getOwnPropertyNames(e), i = g.length, f = 0; f < i; f++) { var h = g[f], a = Object.getOwnPropertyDescriptor(e, h); if (!a.get && !a.set) a.writable = d.writable || c; a.configurable = d.configurable || c; a.enumerable = d.enumerable || b; Object.defineProperty(e, h, a) } return e }, mapList: function (a, c) { var b = []; if (a) for (var d in a) b.push(c(a[d])); return b }, listContainsKey: function (d, e) { for (var a in d) if (e == a) return b; return c }, listContainsValue: function (a, d) { for (var e in a) if (d == a[e]) return b; return c }, augmentList: function (a, b) { var d = a.push ? function (c, b) { a.push(b) } : function (c, b) { a[c] = b }; for (var c in b) d(c, b[c]) }, redefineList: function (a, b) { for (var d in a) delete a[d]; for (var c in b) a[c] = b[c] }, isArray: function (a) { return Object.prototype.toString.apply(a) === "[object Array]" }, isFunction: function (a) { return Object.prototype.toString.apply(a) === "[object Function]" }, isDate: function (a) { return Object.prototype.toString.apply(a) === "[object Date]" }, addEventListener: function (a, b, d) { if (a.addEventListener) a.addEventListener(b, d, c); else if (Sys.Browser.agent === Sys.Browser.InternetExplorer && a.attachEvent) a.attachEvent(f + b, d); else a[f + b] = d }, removeEventListener: function (b, d, e) { if (b.removeEventListener) b.removeEventListener(d, e, c); else if (Sys.Browser.agent === Sys.Browser.InternetExplorer && b.detachEvent) b.detachEvent(f + d, e); else b[f + d] = a }, getCookieValue: function (b) { var a = RegExp(b + "[^;]+").exec(document.cookie); return a.toString().replace(/^[^=]+./, "") }, xhrGet: function (f, e, c) { var a; try { a = new XMLHttpRequest; a.onreadystatechange = function () { if (a.readyState == 4) if (a.status == 200) e(a.responseText); else c(a.status) }; a.open("GET", f, b); a.send() } catch (d) { c(d) } }, xhrGetFull: function (h, f, g, c) { var a, e = f; try { a = new XMLHttpRequest; a.onreadystatechange = function () { if (a.readyState == 4) if (a.status == 200) g(a, e); else c(a.status) }; a.open("GET", h, b); a.send() } catch (d) { c(d) } }, encodeBase64: function (c) { if (!c) return c; var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", l = [], b = [], h = 0, j, g, i, d, e, f, a, m = c.length; do { j = c.charCodeAt(h++); g = c.charCodeAt(h++); i = c.charCodeAt(h++); a = 0; d = j & 255; e = j >> 8; f = g & 255; b[a++] = d >> 2; b[a++] = (d & 3) << 4 | e >> 4; b[a++] = (e & 15) << 2 | f >> 6; b[a++] = f & 63; if (!isNaN(g)) { d = g >> 8; e = i & 255; f = i >> 8; b[a++] = d >> 2; b[a++] = (d & 3) << 4 | e >> 4; b[a++] = (e & 15) << 2 | f >> 6; b[a++] = f & 63 } if (isNaN(g)) b[a - 1] = 64; else if (isNaN(i)) { b[a - 2] = 64; b[a - 1] = 64 } for (var k = 0; k < a; k++) l.push(n.charAt(b[k])) } while (h < m); return l.join("") }, getSessionStorage: function () { return p() }, getLocalStorage: function () { if (!q) { try { var b = window.localStorage } catch (c) { b = a } q = new OfficeExt.SafeStorage(b) } return q }, convertIntToCssHexColor: function (b) { var a = "#" + (Number(b) + 16777216).toString(16).slice(-6); return a }, attachClickHandler: function (a, b) { a.onclick = function () { b() }; a.ontouchend = function (a) { b(); a.preventDefault() } }, getQueryStringParamValue: function (a, d) { var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: c }, { name: "paramName", type: String, mayBeNull: c }]); if (e) { OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); return "" } var b = new RegExp("[\\?&]" + d + "=([^&#]*)", "i"); if (!b.test(a)) { OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); return "" } return b.exec(a)[1] }, isiOS: function () { return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? b : c }, isChrome: function () { return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() }, isEdge: function () { return window.navigator.userAgent.indexOf("Edge") > 0 }, isIE: function () { return window.navigator.userAgent.indexOf("Trident") > 0 }, isFirefox: function () { return window.navigator.userAgent.indexOf("Firefox") > 0 }, shallowCopy: function (b) { if (b == a) return a; else if (!(b instanceof Object)) return b; else if (Array.isArray(b)) { for (var e = [], d = 0; d < b.length; d++) e.push(b[d]); return e } else { var f = b.constructor(); for (var c in b) if (b.hasOwnProperty(c)) f[c] = b[c]; return f } }, createObject: function (b) { var d = a; if (b) { d = {}; for (var e = b.length, c = 0; c < e; c++) d[b[c].name] = b[c].value } return d }, addClass: function (a, b) { if (!OSF.OUtil.hasClass(a, b)) { var c = a.getAttribute(m); if (c) a.setAttribute(m, c + " " + b); else a.setAttribute(m, b) } }, hasClass: function (c, b) { var a = c.getAttribute(m); return a && a.match(new RegExp("(\\s|^)" + b + "(\\s|$)")) }, focusToFirstTabbable: function (e, j) { var h, i = c, f, k = function () { i = b }, l = function (c, a, b) { if (a < 0 || a > c) return d; else if (a === 0 && b) return d; else if (a === c - 1 && !b) return d; if (b) return a - 1; else return a + 1 }; e = t(e); h = j ? e.length - 1 : 0; if (e.length === 0) return a; while (!i && h >= 0 && h < e.length) { f = e[h]; window.focus(); f.addEventListener(g, k); f.focus(); f.removeEventListener(g, k); h = l(e.length, h, j); if (!i && f === document.activeElement) i = b } if (i) return f; else return a }, focusToNextTabbable: function (f, o, m) { var k, e, i = c, h, l = function () { i = b }, n = function (b, c) { for (var a = 0; a < b.length; a++) if (b[a] === c) return a; return d }, j = function (c, a, b) { if (a < 0 || a > c) return d; else if (a === 0 && b) return d; else if (a === c - 1 && !b) return d; if (b) return a - 1; else return a + 1 }; f = t(f); k = n(f, o); e = j(f.length, k, m); if (e < 0) return a; while (!i && e >= 0 && e < f.length) { h = f[e]; h.addEventListener(g, l); h.focus(); h.removeEventListener(g, l); e = j(f.length, e, m); if (!i && h === document.activeElement) i = b } if (i) return h; else return a } } }(); OSF.OUtil.Guid = function () { var a = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; return { generateNewGuid: function () { for (var c = "", d = (new Date).getTime(), b = 0; b < 32 && d > 0; b++) { if (b == 8 || b == 12 || b == 16 || b == 20) c += "-"; c += a[d % 16]; d = Math.floor(d / 16) } for (; b < 32; b++) { if (b == 8 || b == 12 || b == 16 || b == 20) c += "-"; c += a[Math.floor(Math.random() * 16)] } return c } } }(); window.OSF = OSF; OSF.OUtil.setNamespace("OSF", window); OSF.AppName = { Unsupported: 0, Excel: 1, Word: 2, PowerPoint: 4, Outlook: 8, ExcelWebApp: 16, WordWebApp: 32, OutlookWebApp: 64, Project: 128, AccessWebApp: 256, PowerpointWebApp: 512, ExcelIOS: 1024, Sway: 2048, WordIOS: 4096, PowerPointIOS: 8192, Access: 16384, Lync: 32768, OutlookIOS: 65536, OneNoteWebApp: 131072, OneNote: 262144, ExcelWinRT: 524288, WordWinRT: 1048576, PowerpointWinRT: 2097152, OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, VisioWebApp: 8388610 }; OSF.InternalPerfMarker = { DataCoercionBegin: "Agave.HostCall.CoerceDataStart", DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" }; OSF.HostCallPerfMarker = { IssueCall: "Agave.HostCall.IssueCall", ReceiveResponse: "Agave.HostCall.ReceiveResponse", RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" }; OSF.AgaveHostAction = { Select: 0, UnSelect: 1, CancelDialog: 2, InsertAgave: 3, CtrlF6In: 4, CtrlF6Exit: 5, CtrlF6ExitShift: 6, SelectWithError: 7, NotifyHostError: 8, RefreshAddinCommands: 9, PageIsReady: 10, TabIn: 11, TabInShift: 12, TabExit: 13, TabExitShift: 14, EscExit: 15, F2Exit: 16, ExitNoFocusable: 17, ExitNoFocusableShift: 18 }; OSF.SharedConstants = { NotificationConversationIdSuffix: "_ntf" }; OSF.DialogMessageType = { DialogMessageReceived: 0, DialogParentMessageReceived: 1, DialogClosed: 12006 }; OSF.OfficeAppContext = function (y, u, p, n, r, v, q, t, x, j, w, l, k, m, h, g, f, e, i, c, d, s, o, b) { var a = this; a._id = y; a._appName = u; a._appVersion = p; a._appUILocale = n; a._dataLocale = r; a._docUrl = v; a._clientMode = q; a._settings = t; a._reason = x; a._osfControlType = j; a._eToken = w; a._correlationId = l; a._appInstanceId = k; a._touchEnabled = m; a._commerceAllowed = h; a._appMinorVersion = g; a._requirementMatrix = f; a._hostCustomMessage = e; a._hostFullVersion = i; a._isDialog = false; a._clientWindowHeight = c; a._clientWindowWidth = d; a._addinName = s; a._appDomains = o; a._dialogRequirementMatrix = b; a.get_id = function () { return this._id }; a.get_appName = function () { return this._appName }; a.get_appVersion = function () { return this._appVersion }; a.get_appUILocale = function () { return this._appUILocale }; a.get_dataLocale = function () { return this._dataLocale }; a.get_docUrl = function () { return this._docUrl }; a.get_clientMode = function () { return this._clientMode }; a.get_bindings = function () { return this._bindings }; a.get_settings = function () { return this._settings }; a.get_reason = function () { return this._reason }; a.get_osfControlType = function () { return this._osfControlType }; a.get_eToken = function () { return this._eToken }; a.get_correlationId = function () { return this._correlationId }; a.get_appInstanceId = function () { return this._appInstanceId }; a.get_touchEnabled = function () { return this._touchEnabled }; a.get_commerceAllowed = function () { return this._commerceAllowed }; a.get_appMinorVersion = function () { return this._appMinorVersion }; a.get_requirementMatrix = function () { return this._requirementMatrix }; a.get_dialogRequirementMatrix = function () { return this._dialogRequirementMatrix }; a.get_hostCustomMessage = function () { return this._hostCustomMessage }; a.get_hostFullVersion = function () { return this._hostFullVersion }; a.get_isDialog = function () { return this._isDialog }; a.get_clientWindowHeight = function () { return this._clientWindowHeight }; a.get_clientWindowWidth = function () { return this._clientWindowWidth }; a.get_addinName = function () { return this._addinName }; a.get_appDomains = function () { return this._appDomains } }; OSF.OsfControlType = { DocumentLevel: 0, ContainerLevel: 1 }; OSF.ClientMode = { ReadOnly: 0, ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Client", Microsoft.Office); OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); Microsoft.Office.WebExtension.InitializationReason = { Inserted: "inserted", DocumentOpened: "documentOpened" }; Microsoft.Office.WebExtension.ValueFormat = { Unformatted: "unformatted", Formatted: "formatted" }; Microsoft.Office.WebExtension.FilterType = { All: "all" }; Microsoft.Office.WebExtension.PlatformType = { PC: "PC", OfficeOnline: "OfficeOnline", Mac: "Mac", iOS: "iOS", Android: "Android", Universal: "Universal" }; Microsoft.Office.WebExtension.HostType = { Word: "Word", Excel: "Excel", PowerPoint: "PowerPoint", Outlook: "Outlook", OneNote: "OneNote", Project: "Project", Access: "Access" }; Microsoft.Office.WebExtension.Parameters = { BindingType: "bindingType", CoercionType: "coercionType", ValueFormat: "valueFormat", FilterType: "filterType", Columns: "columns", SampleData: "sampleData", GoToType: "goToType", SelectionMode: "selectionMode", Id: "id", PromptText: "promptText", ItemName: "itemName", FailOnCollision: "failOnCollision", StartRow: "startRow", StartColumn: "startColumn", RowCount: "rowCount", ColumnCount: "columnCount", Callback: "callback", AsyncContext: "asyncContext", Data: "data", Rows: "rows", OverwriteIfStale: "overwriteIfStale", FileType: "fileType", EventType: "eventType", Handler: "handler", SliceSize: "sliceSize", SliceIndex: "sliceIndex", ActiveView: "activeView", Status: "status", PlatformType: "platformType", HostType: "hostType", Xml: "xml", Namespace: "namespace", Prefix: "prefix", XPath: "xPath", Text: "text", ImageLeft: "imageLeft", ImageTop: "imageTop", ImageWidth: "imageWidth", ImageHeight: "imageHeight", TaskId: "taskId", FieldId: "fieldId", FieldValue: "fieldValue", ServerUrl: "serverUrl", ListName: "listName", ResourceId: "resourceId", ViewType: "viewType", ViewName: "viewName", GetRawValue: "getRawValue", CellFormat: "cellFormat", TableOptions: "tableOptions", TaskIndex: "taskIndex", ResourceIndex: "resourceIndex", CustomFieldId: "customFieldId", Url: "url", MessageHandler: "messageHandler", Width: "width", Height: "height", RequireHTTPs: "requireHTTPS", MessageToParent: "messageToParent", DisplayInIframe: "displayInIframe", MessageContent: "messageContent", AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode = { ReadOnly: 1, ReadWrite: 0 }; OSF.DDA.PropertyDescriptors = { AsyncResultStatus: "AsyncResultStatus" }; OSF.DDA.EventDescriptors = {}; OSF.DDA.ListDescriptors = {}; OSF.DDA.UI = {}; OSF.DDA.getXdmEventName = function (b, a) { if (a == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || a == Microsoft.Office.WebExtension.EventType.BindingDataChanged || a == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || a == Microsoft.Office.WebExtension.EventType.DataNodeInserted || a == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) return b + "_" + a; else return a }; OSF.DDA.MethodDispId = { dispidMethodMin: 64, dispidGetSelectedDataMethod: 64, dispidSetSelectedDataMethod: 65, dispidAddBindingFromSelectionMethod: 66, dispidAddBindingFromPromptMethod: 67, dispidGetBindingMethod: 68, dispidReleaseBindingMethod: 69, dispidGetBindingDataMethod: 70, dispidSetBindingDataMethod: 71, dispidAddRowsMethod: 72, dispidClearAllRowsMethod: 73, dispidGetAllBindingsMethod: 74, dispidLoadSettingsMethod: 75, dispidSaveSettingsMethod: 76, dispidGetDocumentCopyMethod: 77, dispidAddBindingFromNamedItemMethod: 78, dispidAddColumnsMethod: 79, dispidGetDocumentCopyChunkMethod: 80, dispidReleaseDocumentCopyMethod: 81, dispidNavigateToMethod: 82, dispidGetActiveViewMethod: 83, dispidGetDocumentThemeMethod: 84, dispidGetOfficeThemeMethod: 85, dispidGetFilePropertiesMethod: 86, dispidClearFormatsMethod: 87, dispidSetTableOptionsMethod: 88, dispidSetFormatsMethod: 89, dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, dispidGetResourceFieldMethod: 113, dispidGetWSSUrlMethod: 114, dispidGetTaskFieldMethod: 115, dispidGetProjectFieldMethod: 116, dispidGetSelectedViewMethod: 117, dispidGetTaskByIndexMethod: 118, dispidGetResourceByIndexMethod: 119, dispidSetTaskFieldMethod: 120, dispidSetResourceFieldMethod: 121, dispidGetMaxTaskIndexMethod: 122, dispidGetMaxResourceIndexMethod: 123, dispidCreateTaskMethod: 124, dispidAddDataPartMethod: 128, dispidGetDataPartByIdMethod: 129, dispidGetDataPartsByNamespaceMethod: 130, dispidGetDataPartXmlMethod: 131, dispidGetDataPartNodesMethod: 132, dispidDeleteDataPartMethod: 133, dispidGetDataNodeValueMethod: 134, dispidGetDataNodeXmlMethod: 135, dispidGetDataNodesMethod: 136, dispidSetDataNodeValueMethod: 137, dispidSetDataNodeXmlMethod: 138, dispidAddDataNamespaceMethod: 139, dispidGetDataUriByPrefixMethod: 140, dispidGetDataPrefixByUriMethod: 141, dispidGetDataNodeTextMethod: 142, dispidSetDataNodeTextMethod: 143, dispidMessageParentMethod: 144, dispidSendMessageMethod: 145, dispidMethodMax: 145 }; OSF.DDA.EventDispId = { dispidEventMin: 0, dispidInitializeEvent: 0, dispidSettingsChangedEvent: 1, dispidDocumentSelectionChangedEvent: 2, dispidBindingSelectionChangedEvent: 3, dispidBindingDataChangedEvent: 4, dispidDocumentOpenEvent: 5, dispidDocumentCloseEvent: 6, dispidActiveViewChangedEvent: 7, dispidDocumentThemeChangedEvent: 8, dispidOfficeThemeChangedEvent: 9, dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, dispidActivationStatusChangedEvent: 32, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, dispidDataNodeAddedEvent: 60, dispidDataNodeReplacedEvent: 61, dispidDataNodeDeletedEvent: 62, dispidEventMax: 63 }; OSF.DDA.ErrorCodeManager = function () { var a = {}; return { getErrorArgs: function (c) { var b = a[c]; if (!b) b = a[this.errorCodes.ooeInternalError]; else { if (!b.name) b.name = a[this.errorCodes.ooeInternalError].name; if (!b.message) b.message = a[this.errorCodes.ooeInternalError].message } return b }, addErrorMessage: function (c, b) { a[c] = b }, errorCodes: { ooeSuccess: 0, ooeChunkResult: 1, ooeCoercionTypeNotSupported: 1e3, ooeGetSelectionNotMatchDataType: 1001, ooeCoercionTypeNotMatchBinding: 1002, ooeInvalidGetRowColumnCounts: 1003, ooeSelectionNotSupportCoercionType: 1004, ooeInvalidGetStartRowColumn: 1005, ooeNonUniformPartialGetNotSupported: 1006, ooeGetDataIsTooLarge: 1008, ooeFileTypeNotSupported: 1009, ooeGetDataParametersConflict: 1010, ooeInvalidGetColumns: 1011, ooeInvalidGetRows: 1012, ooeInvalidReadForBlankRow: 1013, ooeUnsupportedDataObject: 2e3, ooeCannotWriteToSelection: 2001, ooeDataNotMatchSelection: 2002, ooeOverwriteWorksheetData: 2003, ooeDataNotMatchBindingSize: 2004, ooeInvalidSetStartRowColumn: 2005, ooeInvalidDataFormat: 2006, ooeDataNotMatchCoercionType: 2007, ooeDataNotMatchBindingType: 2008, ooeSetDataIsTooLarge: 2009, ooeNonUniformPartialSetNotSupported: 2010, ooeInvalidSetColumns: 2011, ooeInvalidSetRows: 2012, ooeSetDataParametersConflict: 2013, ooeCellDataAmountBeyondLimits: 2014, ooeSelectionCannotBound: 3e3, ooeBindingNotExist: 3002, ooeBindingToMultipleSelection: 3003, ooeInvalidSelectionForBindingType: 3004, ooeOperationNotSupportedOnThisBindingType: 3005, ooeNamedItemNotFound: 3006, ooeMultipleNamedItemFound: 3007, ooeInvalidNamedItemForBindingType: 3008, ooeUnknownBindingType: 3009, ooeOperationNotSupportedOnMatrixData: 3010, ooeInvalidColumnsForBinding: 3011, ooeSettingNameNotExist: 4e3, ooeSettingsCannotSave: 4001, ooeSettingsAreStale: 4002, ooeOperationNotSupported: 5e3, ooeInternalError: 5001, ooeDocumentReadOnly: 5002, ooeEventHandlerNotExist: 5003, ooeInvalidApiCallInContext: 5004, ooeShuttingDown: 5005, ooeUnsupportedEnumeration: 5007, ooeIndexOutOfRange: 5008, ooeBrowserAPINotSupported: 5009, ooeInvalidParam: 5010, ooeRequestTimeout: 5011, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, ooeCustomXmlNodeNotFound: 6e3, ooeCustomXmlError: 6100, ooeCustomXmlExceedQuota: 6101, ooeCustomXmlOutOfDate: 6102, ooeNoCapability: 7e3, ooeCannotNavTo: 7001, ooeSpecifiedIdNotExist: 7002, ooeNavOutOfBound: 7004, ooeElementMissing: 8e3, ooeProtectedError: 8001, ooeInvalidCellsValue: 8010, ooeInvalidTableOptionValue: 8011, ooeInvalidFormatValue: 8012, ooeRowIndexOutOfRange: 8020, ooeColIndexOutOfRange: 8021, ooeFormatValueOutOfRange: 8022, ooeCellFormatAmountBeyondLimits: 8023, ooeMemoryFileLimit: 11000, ooeNetworkProblemRetrieveFile: 11001, ooeInvalidSliceSize: 11002, ooeInvalidCallback: 11101, ooeInvalidWidth: 12000, ooeInvalidHeight: 12001, ooeNavigationError: 12002, ooeInvalidScheme: 12003, ooeAppDomains: 12004, ooeRequireHTTPS: 12005, ooeWebDialogClosed: 12006, ooeDialogAlreadyOpened: 12007, ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, ooeCrossZone: 12011 }, initializeErrorMessages: function (b) { a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: b.L_InvalidCoercion, message: b.L_CoercionTypeNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: b.L_DataReadError, message: b.L_GetSelectionNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: b.L_InvalidCoercion, message: b.L_CoercionTypeNotMatchBinding }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: b.L_DataReadError, message: b.L_InvalidGetRowColumnCounts }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: b.L_DataReadError, message: b.L_SelectionNotSupportCoercionType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: b.L_DataReadError, message: b.L_InvalidGetStartRowColumn }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: b.L_DataReadError, message: b.L_NonUniformPartialGetNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: b.L_DataReadError, message: b.L_GetDataIsTooLarge }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: b.L_DataReadError, message: b.L_FileTypeNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: b.L_DataReadError, message: b.L_GetDataParametersConflict }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: b.L_DataReadError, message: b.L_InvalidGetColumns }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: b.L_DataReadError, message: b.L_InvalidGetRows }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: b.L_DataReadError, message: b.L_InvalidReadForBlankRow }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: b.L_DataWriteError, message: b.L_UnsupportedDataObject }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: b.L_DataWriteError, message: b.L_CannotWriteToSelection }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: b.L_DataWriteError, message: b.L_DataNotMatchSelection }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: b.L_DataWriteError, message: b.L_OverwriteWorksheetData }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: b.L_DataWriteError, message: b.L_DataNotMatchBindingSize }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: b.L_DataWriteError, message: b.L_InvalidSetStartRowColumn }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: b.L_InvalidFormat, message: b.L_InvalidDataFormat }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: b.L_InvalidDataObject, message: b.L_DataNotMatchCoercionType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: b.L_InvalidDataObject, message: b.L_DataNotMatchBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: b.L_DataWriteError, message: b.L_SetDataIsTooLarge }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: b.L_DataWriteError, message: b.L_NonUniformPartialSetNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: b.L_DataWriteError, message: b.L_InvalidSetColumns }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: b.L_DataWriteError, message: b.L_InvalidSetRows }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: b.L_DataWriteError, message: b.L_SetDataParametersConflict }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: b.L_BindingCreationError, message: b.L_SelectionCannotBound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: b.L_InvalidBindingError, message: b.L_BindingNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: b.L_BindingCreationError, message: b.L_BindingToMultipleSelection }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: b.L_BindingCreationError, message: b.L_InvalidSelectionForBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: b.L_InvalidBindingOperation, message: b.L_OperationNotSupportedOnThisBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: b.L_BindingCreationError, message: b.L_NamedItemNotFound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: b.L_BindingCreationError, message: b.L_MultipleNamedItemFound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: b.L_BindingCreationError, message: b.L_InvalidNamedItemForBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: b.L_InvalidBinding, message: b.L_UnknownBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: b.L_InvalidBindingOperation, message: b.L_OperationNotSupportedOnMatrixData }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: b.L_InvalidBinding, message: b.L_InvalidColumnsForBinding }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: b.L_ReadSettingsError, message: b.L_SettingNameNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: b.L_SaveSettingsError, message: b.L_SettingsCannotSave }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: b.L_SettingsStaleError, message: b.L_SettingsAreStale }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: b.L_HostError, message: b.L_OperationNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: b.L_InternalError, message: b.L_InternalErrorDescription }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: b.L_PermissionDenied, message: b.L_DocumentReadOnly }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: b.L_EventRegistrationError, message: b.L_EventHandlerNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: b.L_InvalidAPICall, message: b.L_InvalidApiCallInContext }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: b.L_ShuttingDown, message: b.L_ShuttingDown }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: b.L_UnsupportedEnumeration, message: b.L_UnsupportedEnumerationMessage }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: b.L_IndexOutOfRange, message: b.L_IndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: b.L_APINotSupported, message: b.L_BrowserAPINotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: b.L_APICallFailed, message: b.L_RequestTimeout }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: b.L_APICallFailed, message: b.L_TooManyIncompleteRequests }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: b.L_APICallFailed, message: b.L_RequestTokenUnavailable }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: b.L_APICallFailed, message: b.L_ActivityLimitReached }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: b.L_InvalidNode, message: b.L_CustomXmlNodeNotFound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: b.L_CustomXmlError, message: b.L_CustomXmlError }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: b.L_CustomXmlExceedQuotaName, message: b.L_CustomXmlExceedQuotaMessage }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: b.L_CustomXmlOutOfDateName, message: b.L_CustomXmlOutOfDateMessage }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: b.L_PermissionDenied, message: b.L_NoCapability }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: b.L_CannotNavigateTo, message: b.L_CannotNavigateTo }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: b.L_SpecifiedIdNotExist, message: b.L_SpecifiedIdNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: b.L_NavOutOfBound, message: b.L_NavOutOfBound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: b.L_DataWriteReminder, message: b.L_CellDataAmountBeyondLimits }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: b.L_MissingParameter, message: b.L_ElementMissing }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: b.L_PermissionDenied, message: b.L_NoCapability }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: b.L_InvalidValue, message: b.L_InvalidCellsValue }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: b.L_InvalidValue, message: b.L_InvalidTableOptionValue }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: b.L_InvalidValue, message: b.L_InvalidFormatValue }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: b.L_OutOfRange, message: b.L_RowIndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: b.L_OutOfRange, message: b.L_ColIndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: b.L_OutOfRange, message: b.L_FormatValueOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: b.L_FormattingReminder, message: b.L_CellFormatAmountBeyondLimits }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: b.L_MemoryLimit, message: b.L_CloseFileBeforeRetrieve }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: b.L_NetworkProblem, message: b.L_NetworkProblemRetrieveFile }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: b.L_InvalidValue, message: b.L_SliceSizeNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: b.L_DisplayDialogError, message: b.L_DialogAlreadyOpened }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: b.L_IndexOutOfRange, message: b.L_IndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: b.L_IndexOutOfRange, message: b.L_IndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: b.L_DisplayDialogError, message: b.L_NetworkProblem }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: b.L_DialogNavigateError, message: b.L_DialogInvalidScheme }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: b.L_DisplayDialogError, message: b.L_DialogAddressNotTrusted }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: b.L_DisplayDialogError, message: b.L_DialogRequireHTTPS }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: b.L_DisplayDialogError, message: b.L_UserClickIgnore }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: b.L_DisplayDialogError, message: b.L_NewWindowCrossZoneErrorString } } } }(); var OfficeExt; (function (a) { var b; (function (b) { var a = 1.1, z = function () { function a() { } return a }(); b.RequirementVersion = z; var d = function () { function a(b) { var a = this; a.isSetSupported = function (d, b) { if (d == undefined) return false; if (b == undefined) b = 0; var f = this._setMap, e = f._sets; if (e.hasOwnProperty(d.toLowerCase())) { var g = e[d.toLowerCase()]; try { var a = this._getVersion(g); b = b + ""; var c = this._getVersion(b); if (a.major > 0 && a.major > c.major) return true; if (a.minor > 0 && a.minor > 0 && a.major == c.major && a.minor >= c.minor) return true } catch (h) { return false } } return false }; a._getVersion = function (e) { var a = "version format incorrect", b = e.split("."), c = 0, d = 0; if (b.length < 2 && isNaN(Number(e))) throw a; else { c = Number(b[0]); if (b.length >= 2) d = Number(b[1]); if (isNaN(c) || isNaN(d)) throw a } var f = { minor: d, major: c }; return f }; a._setMap = b; a.isSetSupported = a.isSetSupported.bind(a) } return a }(); b.RequirementMatrix = d; var c = function () { function a(a) { this._addSetMap = function (a) { for (var b in a) this._sets[b] = a[b] }; this._sets = a } return a }(); b.DefaultSetRequirement = c; var x = function (c) { __extends(b, c); function b() { c.call(this, { dialogapi: a }) } return b }(c); b.DefaultDialogSetRequirement = x; var f = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, documentevents: a, excelapi: a, matrixbindings: a, matrixcoercion: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a }) } return b }(c); b.ExcelClientDefaultSetRequirement = f; var k = function (c) { __extends(b, c); function b() { c.call(this); this._addSetMap({ imagecoercion: a }) } return b }(f); b.ExcelClientV1DefaultSetRequirement = k; var l = function (b) { __extends(a, b); function a() { b.call(this, { mailbox: 1.3 }) } return a }(c); b.OutlookClientDefaultSetRequirement = l; var h = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, compressedfile: a, customxmlparts: a, documentevents: a, file: a, htmlcoercion: a, matrixbindings: a, matrixcoercion: a, ooxmlcoercion: a, pdffile: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a, textfile: a, wordapi: a }) } return b }(c); b.WordClientDefaultSetRequirement = h; var p = function (c) { __extends(b, c); function b() { c.call(this); this._addSetMap({ customxmlparts: 1.2, wordapi: 1.2, imagecoercion: a }) } return b }(h); b.WordClientV1DefaultSetRequirement = p; var e = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, compressedfile: a, documentevents: a, file: a, pdffile: a, selection: a, settings: a, textcoercion: a }) } return b }(c); b.PowerpointClientDefaultSetRequirement = e; var j = function (c) { __extends(b, c); function b() { c.call(this); this._addSetMap({ imagecoercion: a }) } return b }(e); b.PowerpointClientV1DefaultSetRequirement = j; var o = function (c) { __extends(b, c); function b() { c.call(this, { selection: a, textcoercion: a }) } return b }(c); b.ProjectClientDefaultSetRequirement = o; var u = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, documentevents: a, matrixbindings: a, matrixcoercion: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a, file: a }) } return b }(c); b.ExcelWebDefaultSetRequirement = u; var w = function (c) { __extends(b, c); function b() { c.call(this, { compressedfile: a, documentevents: a, file: a, imagecoercion: a, matrixcoercion: a, ooxmlcoercion: a, pdffile: a, selection: a, settings: a, tablecoercion: a, textcoercion: a, textfile: a }) } return b }(c); b.WordWebDefaultSetRequirement = w; var n = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, settings: a }) } return b }(c); b.PowerpointWebDefaultSetRequirement = n; var g = function (b) { __extends(a, b); function a() { b.call(this, { mailbox: 1.3 }) } return a }(c); b.OutlookWebDefaultSetRequirement = g; var v = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, documentevents: a, selection: a, settings: a, textcoercion: a }) } return b }(c); b.SwayWebDefaultSetRequirement = v; var r = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, partialtablebindings: a, settings: a, tablebindings: a, tablecoercion: a }) } return b }(c); b.AccessWebDefaultSetRequirement = r; var t = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, documentevents: a, matrixbindings: a, matrixcoercion: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a }) } return b }(c); b.ExcelIOSDefaultSetRequirement = t; var i = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, compressedfile: a, customxmlparts: a, documentevents: a, file: a, htmlcoercion: a, matrixbindings: a, matrixcoercion: a, ooxmlcoercion: a, pdffile: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a, textfile: a }) } return b }(c); b.WordIOSDefaultSetRequirement = i; var s = function (b) { __extends(a, b); function a() { b.call(this); this._addSetMap({ customxmlparts: 1.2, wordapi: 1.2 }) } return a }(i); b.WordIOSV1DefaultSetRequirement = s; var m = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, compressedfile: a, documentevents: a, file: a, pdffile: a, selection: a, settings: a, textcoercion: a }) } return b }(c); b.PowerpointIOSDefaultSetRequirement = m; var q = function (c) { __extends(b, c); function b() { c.call(this, { mailbox: a }) } return b }(c); b.OutlookIOSDefaultSetRequirement = q; var y = function () { var b = "undefined"; function a() { } a.initializeOsfDda = function () { OSF.OUtil.setNamespace("Requirement", OSF.DDA) }; a.getDefaultRequirementMatrix = function (f) { this.initializeDefaultSetMatrix(); var e = undefined, g = f.get_requirementMatrix(); if (g != undefined && g.length > 0 && typeof JSON !== b) { var i = JSON.parse(f.get_requirementMatrix().toLowerCase()); e = new d(new c(i)) } else { var h = a.getClientFullVersionString(f); if (a.DefaultSetArrayMatrix != undefined && a.DefaultSetArrayMatrix[h] != undefined) e = new d(a.DefaultSetArrayMatrix[h]); else e = new d(new c({})) } return e }; a.getDefaultDialogRequirementMatrix = function (f) { var a = undefined, e = f.get_dialogRequirementMatrix(); if (e != undefined && e.length > 0 && typeof JSON !== b) { var g = JSON.parse(f.get_requirementMatrix().toLowerCase()); a = new d(new c(g)) } else a = new d(new x); return a }; a.getClientFullVersionString = function (a) { var d = a.get_appMinorVersion(), e = "", b = "", c = a.get_appName(), f = c == 1024 || c == 4096 || c == 8192 || c == 65536; if (f && a.get_appVersion() == 1) if (c == 4096 && d >= 15) b = "16.00.01"; else b = "16.00"; else if (a.get_appName() == 64) b = a.get_appVersion(); else { if (d < 10) e = "0" + d; else e = "" + d; b = a.get_appVersion() + "." + e } return a.get_appName() + "-" + b }; a.initializeDefaultSetMatrix = function () { a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600] = new f; a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600] = new h; a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600] = new e; a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601] = new k; a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601] = new p; a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601] = new j; a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600] = new l; a.DefaultSetArrayMatrix[a.Excel_WAC_1600] = new u; a.DefaultSetArrayMatrix[a.Word_WAC_1600] = new w; a.DefaultSetArrayMatrix[a.Outlook_WAC_1600] = new g; a.DefaultSetArrayMatr