/* Word Web-specific API library */
/* Version: 16.0.9311.3000 */

/* Office.js Version: 16.0.9124.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.
*/

/*
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license   Licensed under MIT license
*            See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version   2.3.0
*/

var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSF_DDA_Marshaling_FilePropertiesKeys,OSF_DDA_Marshaling_File_FilePropertiesKeys,OSF_DDA_Marshaling_File_SlicePropertiesKeys,OSF_DDA_Marshaling_File_FileType,OSF_DDA_Marshaling_File_ParameterKeys,OSF_DDA_Marshaling_GoToType,OSF_DDA_Marshaling_SelectionMode,OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,OfficeExt,OSFWordWAC,OfficeExtension,OfficeFirstPartyAuth,OfficeCore,Word;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t<u;t++)i=this._internalStorage.key(t),i.indexOf(n)===0&&r.push(i)}catch(f){}return r},n}();n.SafeStorage=t}(OfficeExt||(OfficeExt={}));OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"};OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext"};OSF.OUtil=function(){function rt(){var n=l*Math.random();return n^=e^(new Date).getMilliseconds()<<Math.floor(Math.random()*21),n.toString(16)}function b(){if(!p){try{var t=window.sessionStorage}catch(i){t=n}p=new OfficeExt.SafeStorage(t)}return p}function ut(n){for(var r=[],i=[],f=n.length,t,u=0;u<f;u++)t=n[u],t.tabIndex?t.tabIndex>0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t<n.length;t+=4){for(r=0,i=0;i<4&&t+i<n.length;i++)r=(r<<8)+n.charCodeAt(t+i);e^=r}else e^=typeof n=="number"?n:l*Math.random();e&=l},extend:function(n,t){var i=function(){};i.prototype=t.prototype;n.prototype=new i;n.prototype.constructor=n;n.uber=t.prototype;t.prototype.constructor===Object.prototype.constructor&&(t.prototype.constructor=t)},setNamespace:function(n,t){t&&n&&!t[n]&&(t[n]={})},unsetNamespace:function(n,t){t&&n&&t[n]&&delete t[n]},serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var f={},u,t;n=n||{};for(u in n){t=n[u];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t<r;t++)u=e.pendingCallbacks.shift(),u()},c=function(){var i,t,u;for(delete y[r],e.timer!=n&&(clearTimeout(e.timer),delete e.timer),i=e.pendingCallbacks.length,t=0;t<i;t++)u=e.pendingCallbacks.shift(),u()},o.readyState?o.onreadystatechange=function(){(o.readyState=="loaded"||o.readyState=="complete")&&(o.onreadystatechange=n,h())}:o.onload=h,o.onerror=c,f=f||et,e.timer=setTimeout(c,f),o.setAttribute("crossOrigin","anonymous"),o.src=r,s.getElementsByTagName("head")[0].appendChild(o)))},loadCSS:function(n){if(n){var i=window.document,t=i.createElement("link");t.type="text/css";t.rel="stylesheet";t.href=n;i.getElementsByTagName("head")[0].appendChild(t)}},parseEnum:function(n,t){var i=t[n.trim()];if(typeof i==c){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+n);throw OsfMsAjaxFactory.msAjaxError.argument("str");}return i},delayExecutionAndCache:function(){var n={calc:arguments[0]};return function(){return n.calc&&(n.val=n.calc.apply(this,arguments),delete n.calc),n.val}},getUniqueId:function(){return a=a+1,a.toString()},formatString:function(){var n=arguments,t=n[0];return t.replace(/{(\d+)}/gm,function(t,i){var r=parseInt(i,10)+1;return n[r]===undefined?"{"+i+"}":n[r]})},generateConversationId:function(){return[rt(),rt(),(new Date).getTime().toString()].join("_")},getFrameName:function(n){return tt+n+this.generateConversationId()},addXdmInfoAsHash:function(n,i){return OSF.OUtil.addInfoAsHash(n,g,i,t)},addSerializerVersionAsHash:function(n,t){return OSF.OUtil.addInfoAsHash(n,nt,t,i)},addInfoAsHash:function(n,t,i,r){n=n.trim()||u;var f=n.split(v),s=f.shift(),e=f.join(v),o;return o=r?[t,encodeURIComponent(i),e].join(u):[e,t,i].join(u),[s,v,o].join(u)},parseHostInfoFromWindowName:function(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(n){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(n,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(n,window.name)),t},parseXdmInfoFromWindowName:function(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(n,i){return OSF.OUtil.parseInfoWithGivenFragment(g,tt,t,n,i)},parseSerializerVersion:function(n){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(n,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(n,window.name)),t},parseSerializerVersionFromWindowName:function(n,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(n,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(nt,ft,i,n,t))},parseInfoFromWindowName:function(t,i,r){var o;try{var u=JSON.parse(i),f=u!=n?u[r]:n,e=b();return!t&&e&&u!=n&&(o=u[OSF.WindowNameItemKeys.BaseFrameName]+r,f?e.setItem(o,f):f=e.getItem(o)),f}catch(s){return n}},parseInfoWithGivenFragment:function(t,i,u,f,e){var l=e.split(t),o=l.length>1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f<s;f++)e=o[f],u=Object.getOwnPropertyDescriptor(n,e),u.get||u.set||(u.writable=r.writable||t),u.configurable=r.configurable||t,u.enumerable=r.enumerable||i,Object.defineProperty(n,e,u);return n},mapList:function(n,t){var i=[],r;if(n)for(r in n)i.push(t(n[r]));return i},listContainsKey:function(n,r){for(var u in n)if(r==u)return i;return t},listContainsValue:function(n,r){for(var u in n)if(r==n[u])return i;return t},augmentList:function(n,t){var r=n.push?function(t,i){n.push(i)}:function(t,i){n[t]=i};for(var i in t)r(i,t[i])},redefineList:function(n,t){var r,i;for(r in n)delete n[r];for(i in t)n[i]=t[i]},isArray:function(n){return Object.prototype.toString.apply(n)==="[object Array]"},isFunction:function(n){return Object.prototype.toString.apply(n)==="[object Function]"},isDate:function(n){return Object.prototype.toString.apply(n)==="[object Date]"},addEventListener:function(n,i,r){n.addEventListener?n.addEventListener(i,r,t):Sys.Browser.agent===Sys.Browser.InternetExplorer&&n.attachEvent?n.attachEvent(s+i,r):n[s+i]=r},removeEventListener:function(i,r,u){i.removeEventListener?i.removeEventListener(r,u,t):Sys.Browser.agent===Sys.Browser.InternetExplorer&&i.detachEvent?i.detachEvent(s+r,u):i[s+r]=n},getCookieValue:function(n){var t=RegExp(n+"[^;]+").exec(document.cookie);return t.toString().replace(/^[^=]+./,u)},xhrGet:function(n,t,r){var u;try{u=new XMLHttpRequest;u.onreadystatechange=function(){u.readyState==4&&(u.status==200?t(u.responseText):r(u.status))};u.open("GET",n,i);u.send()}catch(f){r(f)}},xhrGetFull:function(n,t,r,u){var f,e=t;try{f=new XMLHttpRequest;f.onreadystatechange=function(){f.readyState==4&&(f.status==200?r(f,e):u(f.status))};f.open("GET",n,i);f.send()}catch(o){u(o)}},encodeBase64:function(n){var c;if(!n)return n;var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=[],i=[],s=0,l,o,h,r,f,e,t,y=n.length;do for(l=n.charCodeAt(s++),o=n.charCodeAt(s++),h=n.charCodeAt(s++),t=0,r=l&255,f=l>>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c<t;c++)a.push(v.charAt(i[c]));while(s<y);return a.join(u)},getSessionStorage:function(){return b()},getLocalStorage:function(){if(!w){try{var t=window.localStorage}catch(i){t=n}w=new OfficeExt.SafeStorage(t)}return w},convertIntToCssHexColor:function(n){return"#"+(Number(n)+16777216).toString(16).slice(-6)},attachClickHandler:function(n,t){n.onclick=function(){t()};n.ontouchend=function(n){t();n.preventDefault()}},getQueryStringParamValue:function(n,i){var f=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:t},{name:"paramName",type:String,mayBeNull:t}]),r;return f?(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."),u):(r=new RegExp("[\\?&]"+i+"=([^&#]*)","i"),!r.test(n))?(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."),u):r.exec(n)[1]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?i:t},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(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;i<t.length;i++)u.push(t[i]);return u}else{f=t.constructor();for(r in t)t.hasOwnProperty(r)&&(f[r]=t[r]);return f}else return t},createObject:function(t){var r=n,u,i;if(t)for(r={},u=t.length,i=0;i<u;i++)r[t[i].name]=t[i].value;return r},addClass:function(n,t){if(!OSF.OUtil.hasClass(n,t)){var i=n.getAttribute(f);i?n.setAttribute(f,i+" "+t):n.setAttribute(f,t)}},removeClass:function(n,t){if(OSF.OUtil.hasClass(n,t)){var i=n.getAttribute(f),r=new RegExp("(\\s|^)"+t+"(\\s|$)");i=i.replace(r,u);n.setAttribute(f,i)}},hasClass:function(n,t){var i=n.getAttribute(f);return i&&i.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},focusToFirstTabbable:function(u,f){var e,h=t,s,c=function(){h=i},l=function(n,t,i){if(t<0||t>n)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&e<u.length)s=u[e],window.focus(),s.addEventListener(o,c),s.focus(),s.removeEventListener(o,c),e=l(u.length,e,f),h||s!==document.activeElement||(h=i);return h?s:n},focusToNextTabbable:function(u,f,e){var l,s,c=t,h,a=function(){c=i},y=function(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return r},v=function(n,t,i){if(t<0||t>n)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s<u.length)h=u[s],h.addEventListener(o,a),h.focus(),h.removeEventListener(o,a),s=v(u.length,s,e),c||h!==document.activeElement||(c=i);return c?h:n}}}();OSF.OUtil.Guid=function(){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return{generateNewGuid:function(){for(var i="",r=(new Date).getTime(),t=0;t<32&&r>0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};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,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};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,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.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",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",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",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"};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(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};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,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,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,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},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,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,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:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.length<e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(f=[],u=0;u<e;u++)f.push(t[u]);for(this.verifyArguments(n,f),h={},u=0;u<e;u++){if(s=n[u],c=f[u],s.verify&&(l=s.verify(c,i,r),!l))throw o();h[s.name]=c}return h};f.fillOptions=function(n,i,r,u){var o,f,e;n=n||{};for(o in t)OSF.OUtil.listContainsKey(n,o)||(f=undefined,e=t[o],e.calculate&&i&&(f=e.calculate(i,r,u)),f||e.defaultValue===undefined||(f=e.defaultValue),n[o]=f);return n};f.constructCallArgs=function(n,t,u,f){var e={},o,s,h;for(o in n)e[o]=n[o];for(s in t)e[s]=t[s];for(h in i)e[h]=i[h](u,f);return r&&(e=r(e,u,f)),e}};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};OSF.DDA.AsyncMethodNames={};OSF.DDA.AsyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.AsyncMethodNames[t]=i};OSF.DDA.AsyncMethodCall=function(n,t,i,r,u,f,e){function c(n,i,r,u){var f,e,c,l;if(n.length>s+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t<r;t++)i[n[t].name]=n[t].value;return i}var i=new OSF.DDA.HostParameterMap(n),f=i.self,u;i.define=function(n){var t={},u=r(n.toHost);n.invertible?t.map=u:n.canonical?t.toHost=t.fromHost=u:(t.toHost=u,t.fromHost=r(n.fromHost));i.addMapping(n.type,t);n.isComplexType&&i.addComplexType(n.type)};for(u in t)i.define(t[u]);return i};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"};OSF.DDA.DispIdHost.Facade=function(n,t){function y(n){return n==OSF.DDA.EventDispId.dispidObjectDeletedEvent||n==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent||n==OSF.DDA.EventDispId.dispidObjectDataChangedEvent||n==OSF.DDA.EventDispId.dispidContentControlAddedEvent}function o(n,t,i,r){if(typeof n=="number")r||(r=t.getCallArgs(i)),OSF.DDA.issueAsyncResult(r,n,OSF.DDA.ErrorCodeManager.getErrorArgs(n));else throw n;}var s=!1,h=null,e=this,r={},u=OSF.DDA.AsyncMethodNames,i=OSF.DDA.MethodDispId,v={GoToByIdAsync:i.dispidNavigateToMethod,GetSelectedDataAsync:i.dispidGetSelectedDataMethod,SetSelectedDataAsync:i.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:i.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:i.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:i.dispidGetDocumentCopyMethod,AddFromSelectionAsync:i.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:i.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:i.dispidAddBindingFromNamedItemMethod,GetAllAsync:i.dispidGetAllBindingsMethod,GetByIdAsync:i.dispidGetBindingMethod,ReleaseByIdAsync:i.dispidReleaseBindingMethod,GetDataAsync:i.dispidGetBindingDataMethod,SetDataAsync:i.dispidSetBindingDataMethod,AddRowsAsync:i.dispidAddRowsMethod,AddColumnsAsync:i.dispidAddColumnsMethod,DeleteAllDataValuesAsync:i.dispidClearAllRowsMethod,RefreshAsync:i.dispidLoadSettingsMethod,SaveAsync:i.dispidSaveSettingsMethod,GetActiveViewAsync:i.dispidGetActiveViewMethod,GetFilePropertiesAsync:i.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:i.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:i.dispidGetDocumentThemeMethod,ClearFormatsAsync:i.dispidClearFormatsMethod,SetTableOptionsAsync:i.dispidSetTableOptionsMethod,SetFormatsAsync:i.dispidSetFormatsMethod,GetAccessTokenAsync:i.dispidGetAccessTokenMethod,ExecuteRichApiRequestAsync:i.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:i.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:i.dispidCloseContainerMethod,OpenBrowserWindow:i.dispidOpenBrowserWindow,CreateDocumentAsync:i.dispidCreateDocumentMethod,InsertFormAsync:i.dispidInsertFormMethod,AddDataPartAsync:i.dispidAddDataPartMethod,GetDataPartByIdAsync:i.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:i.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:i.dispidGetDataPartXmlMethod,GetPartNodesAsync:i.dispidGetDataPartNodesMethod,DeleteDataPartAsync:i.dispidDeleteDataPartMethod,GetNodeValueAsync:i.dispidGetDataNodeValueMethod,GetNodeXmlAsync:i.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:i.dispidGetDataNodesMethod,SetNodeValueAsync:i.dispidSetDataNodeValueMethod,SetNodeXmlAsync:i.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:i.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:i.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:i.dispidGetDataPrefixByUriMethod,GetNodeTextAsync:i.dispidGetDataNodeTextMethod,SetNodeTextAsync:i.dispidSetDataNodeTextMethod,GetSelectedTask:i.dispidGetSelectedTaskMethod,GetTask:i.dispidGetTaskMethod,GetWSSUrl:i.dispidGetWSSUrlMethod,GetTaskField:i.dispidGetTaskFieldMethod,GetSelectedResource:i.dispidGetSelectedResourceMethod,GetResourceField:i.dispidGetResourceFieldMethod,GetProjectField:i.dispidGetProjectFieldMethod,GetSelectedView:i.dispidGetSelectedViewMethod,GetTaskByIndex:i.dispidGetTaskByIndexMethod,GetResourceByIndex:i.dispidGetResourceByIndexMethod,SetTaskField:i.dispidSetTaskFieldMethod,SetResourceField:i.dispidSetResourceFieldMethod,GetMaxTaskIndex:i.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:i.dispidGetMaxResourceIndexMethod,CreateTask:i.dispidCreateTaskMethod},l,f,a,c;for(f in v)u[f]&&(r[u[f].id]=v[f]);u=OSF.DDA.SyncMethodNames;i=OSF.DDA.MethodDispId;l={MessageParent:i.dispidMessageParentMethod,SendMessage:i.dispidSendMessageMethod};for(f in l)u[f]&&(r[u[f].id]=l[f]);u=Microsoft.Office.WebExtension.EventType;i=OSF.DDA.EventDispId;a={SettingsChanged:i.dispidSettingsChangedEvent,DocumentSelectionChanged:i.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:i.dispidBindingSelectionChangedEvent,BindingDataChanged:i.dispidBindingDataChangedEvent,ActiveViewChanged:i.dispidActiveViewChangedEvent,OfficeThemeChanged:i.dispidOfficeThemeChangedEvent,DocumentThemeChanged:i.dispidDocumentThemeChangedEvent,AppCommandInvoked:i.dispidAppCommandInvokedEvent,DialogMessageReceived:i.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:i.dispidDialogParentMessageReceivedEvent,ObjectDeleted:i.dispidObjectDeletedEvent,ObjectSelectionChanged:i.dispidObjectSelectionChangedEvent,ObjectDataChanged:i.dispidObjectDataChangedEvent,ContentControlAdded:i.dispidContentControlAddedEvent,RichApiMessage:i.dispidRichApiMessageEvent,ItemChanged:i.dispidOlkItemSelectedChangedEvent,RecipientsChanged:i.dispidOlkRecipientsChangedEvent,AppointmentTimeChanged:i.dispidOlkAppointmentTimeChangedEvent,RecurrenceChanged:i.dispidOlkRecurrenceChangedEvent,TaskSelectionChanged:i.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:i.dispidResourceSelectionChangedEvent,ViewSelectionChanged:i.dispidViewSelectionChangedEvent,DataNodeInserted:i.dispidDataNodeAddedEvent,DataNodeReplaced:i.dispidDataNodeReplacedEvent,DataNodeDeleted:i.dispidDataNodeDeletedEvent};for(c in a)u[c]&&(r[u[c]]=a[c]);e[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(i,u,f,e){var s,a,v,l,p,b,w,k;try{a=i.id;v=OSF.DDA.AsyncMethodCalls[a];s=v.verifyAndExtractCall(u,f,e);var y=r[a],d=n(a),c=h;window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api")&&(window.Excel._RedirectV1APIs=!0);window.Excel&&window.Excel._RedirectV1APIs&&(c=window.Excel._V1APIMap[a])?(l=OSF.OUtil.shallowCopy(s),delete l[Microsoft.Office.WebExtension.Parameters.AsyncContext],c.preprocess&&(l=c.preprocess(l)),p=new window.Excel.RequestContext,b=c.call(p,l),p.sync().then(function(){var n=b.value,t=n.status;delete n.status;delete n["@odata.type"];c.postprocess&&(n=c.postprocess(n,l));t!=0&&(n=OSF.DDA.ErrorCodeManager.getErrorArgs(t));OSF.DDA.issueAsyncResult(s,t,n)})["catch"](function(){OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,h)})):(w=t.toHost?t.toHost(y,s):s,k=(new Date).getTime(),d[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:y,hostCallArgs:w,onCalling:function(){},onReceiving:function(){},onComplete:function(n,i){var r,u;r=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?t.fromHost?t.fromHost(y,i):i:i;u=v.processResponse(n,r,f,s);OSF.DDA.issueAsyncResult(s,n,u);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(y,w,Math.abs((new Date).getTime()-k),n)}}))}catch(g){o(g,v,u,s)}};e[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(i,u,f,e){function w(n){var t,i;n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=l?u.addObjectEventHandler(h,c[Microsoft.Office.WebExtension.Parameters.Id],p):u.addEventHandler(h,p),t||(n=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed));n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(i=OSF.DDA.ErrorCodeManager.getErrorArgs(n));OSF.DDA.issueAsyncResult(c,n,i)}var c,h,p,l=s,b,v,a,k,d;try{if(b=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id],c=b.verifyAndExtractCall(i,f,u),h=c[Microsoft.Office.WebExtension.Parameters.EventType],p=c[Microsoft.Office.WebExtension.Parameters.Handler],e){w(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);return}v=r[h];l=y(v);a=l?c[Microsoft.Office.WebExtension.Parameters.Id]:f.id||"";k=l?u.getObjectEventHandlerCount(h,a):u.getEventHandlerCount(h);k==0?(d=n(h)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync],d({eventType:h,dispId:v,targetId:a,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:w,onEvent:function(n){var i=t.fromHost(v,n);l?u.fireObjectEvent(a,OSF.DDA.OMFactory.manufactureEventArgs(h,a,i)):u.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(h,f,i))}})):w(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(g){o(g,b,i,c)}};e[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(t,i,u){function k(n){var t;n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(n));OSF.DDA.issueAsyncResult(e,n,t)}var e,f,a,c=s,p,w,l,b,v,d,g;try{p=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=p.verifyAndExtractCall(t,u,i);f=e[Microsoft.Office.WebExtension.Parameters.EventType];a=e[Microsoft.Office.WebExtension.Parameters.Handler];w=r[f];c=y(w);l=c?e[Microsoft.Office.WebExtension.Parameters.Id]:u.id||"";a===h?(v=c?i.clearObjectEventHandlers(f,l):i.clearEventHandlers(f),b=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):(v=c?i.removeObjectEventHandler(f,l,a):i.removeEventHandler(f,a),b=v?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);d=c?i.getObjectEventHandlerCount(f,l):i.getEventHandlerCount(f);v&&d==0?(g=n(f)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync],g({eventType:f,dispId:w,targetId:l,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:k})):k(b)}catch(nt){o(nt,p,t,e)}};e[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(i,u,f){function y(n){var t,i;n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?i=OSF.DDA.ErrorCodeManager.getErrorArgs(n):(t={},t[Microsoft.Office.WebExtension.Parameters.Id]=v,t[Microsoft.Office.WebExtension.Parameters.Data]=u,i=a.processResponse(n,t,f,c),OSF.DialogShownStatus.hasDialogShown=!0,u.clearEventHandlers(e),u.clearEventHandlers(l));OSF.DDA.issueAsyncResult(c,n,i)}var c,v,e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,l=Microsoft.Office.WebExtension.EventType.DialogEventReceived,a;try{if((e==undefined||l==undefined)&&y(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported),OSF.DDA.AsyncMethodNames.DisplayDialogAsync==h){y(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}a=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];c=a.verifyAndExtractCall(i,f,u);var w=r[e],p=n(e),b=p[OSF.DDA.DispIdHost.Delegates.OpenDialog]!=undefined?p[OSF.DDA.DispIdHost.Delegates.OpenDialog]:p[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];v=JSON.stringify(c);OSF.DialogShownStatus.hasDialogShown||(u.clearQueuedEvent(e),u.clearQueuedEvent(l),u.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived));b({eventType:e,dispId:w,targetId:v,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:y,onEvent:function(n){var h=t.fromHost(w,n),o=OSF.DDA.OMFactory.manufactureEventArgs(e,f,h),r,i;o.type==l&&(r=OSF.DDA.ErrorCodeManager.getErrorArgs(o.error),i={},i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=r.name||r,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=r.message||r,o.error=new OSF.DDA.Error(i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]));u.fireOrQueueEvent(o);h[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed&&(u.clearEventHandlers(e),u.clearEventHandlers(l),u.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived),OSF.DialogShownStatus.hasDialogShown=s)}})}catch(k){o(k,a,i,c)}};e[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(t,i,u,f){function y(n){h=n;OSF.DialogShownStatus.hasDialogShown=s}var a,e,v,h=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,c;try{c=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];a=c.verifyAndExtractCall(t,f,u);e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;v=Microsoft.Office.WebExtension.EventType.DialogEventReceived;u.clearEventHandlers(e);u.clearEventHandlers(v);var p=r[e],l=n(e),w=l[OSF.DDA.DispIdHost.Delegates.CloseDialog]!=undefined?l[OSF.DDA.DispIdHost.Delegates.CloseDialog]:l[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];w({eventType:e,dispId:p,targetId:i,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:y})}catch(b){o(b,c,t,a)}if(h!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,h);};e[OSF.DDA.DispIdHost.Methods.MessageParent]=function(t,i){var u={},f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],e=f.verifyAndExtractCall(t,i,u),o=n(OSF.DDA.SyncMethodNames.MessageParent.id),s=o[OSF.DDA.DispIdHost.Delegates.MessageParent],h=r[OSF.DDA.SyncMethodNames.MessageParent.id];return s({dispId:h,hostCallArgs:e,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})};e[OSF.DDA.DispIdHost.Methods.SendMessage]=function(t,i,u){var f={},e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id],o=e.verifyAndExtractCall(t,u,f),s=n(OSF.DDA.SyncMethodNames.SendMessage.id),h=s[OSF.DDA.DispIdHost.Delegates.SendMessage],c=r[OSF.DDA.SyncMethodNames.SendMessage.id];return h({dispId:c,hostCallArgs:o,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(n,t,i){var f,r,u;for(f in t)r=t[f],u=r.displayName,n[u]||OSF.OUtil.defineEnumerableProperty(n,u,{value:function(t){return function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];r(t,arguments,n,i)}}(r)})};OSF.DDA.DispIdHost.addEventSupport=function(n,t,i){var r=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,u=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;n[r]||OSF.OUtil.defineEnumerableProperty(n,r,{value:function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];r(arguments,t,n,i)}});n[u]||OSF.OUtil.defineEnumerableProperty(n,u,{value:function(){var i=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];i(arguments,t,n)}})};OSF.ShowWindowDialogParameterKeys={Url:"url",Width:"width",Height:"height",DisplayInIframe:"displayInIframe",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels"};OSF.HostThemeButtonStyleKeys={ButtonBorderColor:"buttonBorderColor",ButtonBackgroundColor:"buttonBackgroundColor"};OSF.OmexPageParameterKeys={AppName:"client",AppVersion:"cv",AppUILocale:"ui",AppDomain:"appDomain",StoreLocator:"rs",AssetId:"assetid",NotificationType:"notificationType",AppCorrelationId:"corr",AuthType:"authType"};OSF.AuthType={Anonymous:0,MSA:1,OrgId:2,ADAL:3};OSF.OmexMessageKeys={MessageType:"messageType",MessageValue:"messageValue"};OSF.OmexRemoveAddinMessageKeys={RemoveAddinResultCode:"resultCode",RemoveAddinResultValue:"resultValue"};OSF.OmexRemoveAddinResultCode={Success:0,ClientError:400,ServerError:500,UnknownError:600},function(n){var t;(function(n){function u(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.AppContext)}function f(n){if(typeof JSON!="undefined")try{return JSON.stringify(n)}catch(t){}return""}function e(){return new RegExp(r).test(OSF.getClientEndPoint()._targetUrl.toLowerCase())}function o(n,t){if(!n)return null;n=n.trim()||"";var f="?",h="_host_Info=",c="&_host_Info=",r="#",e=n.split(r),u=e.shift(),o=e.join(r),s=u.split(f),i;return s.length>1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function s(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}function h(){try{for(var i=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],r=window.navigator.userAgent,n=0,u=i.length;n<u;n++)if(r.indexOf(i[n])>-1)return t();return!1}catch(f){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+f),!1}}function t(){try{var n=window.navigator.userAgent;return n.indexOf("MSIE ")>-1||n.indexOf("Trident/")>-1||n.indexOf("Edge/")>-1}catch(t){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+t),!1}}function c(n){for(var r=OSF.OUtil.getLocalStorage(),u=r.getKeysWithPrefix(""),t=0,e=u.length;t<e;t++)for(var f=u[t],i=0,o=n.length;i<o;i++)if(n[i].test(f)){r.removeItem(f);break}}var r="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/",i;n.parseAppContextFromWindowName=u;n.serializeObjectToString=f;n.isHostTrusted=e;n.addHostInfoAsQueryParam=o;n.getDomainForUrl=s;n.shouldUseLocalStorageToPassMessage=h;n.isInternetExplorer=t;n.removeMatchesFromLocalStorage=c;i=function(){function n(){}return n.GatedCacheKeyPrefix="__OSF_GATED_OMEX.",n.AuthenticatedAppInstallInfoCacheKey=n.GatedCacheKeyPrefix+"appinstall_authenticated.{0}.{1}.{2}.{3}",n.EntitlementsKey="entitle.{0}.{1}",n}();n.CacheConstants=i})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return r=n,r.replace(/{(\d+)}/gm,function(n,t){var r=parseInt(t,10);return i[r]===undefined?"{"+t+"}":i[r]})},n.startsWith=function(n,t){return n.substr(0,t.length)===t},n}();n.MsAjaxString=u;s=function(){function n(){}return n.trace=function(){},n}();n.MsAjaxDebug=s;OsfMsAjaxFactory.isMsAjaxLoaded()||(f=function(n,t,i){n.__typeName===undefined&&(n.__typeName=t);n.__class===undefined&&(n.__class=i)},f(Function,"Function",i),f(Error,"Error",i),f(Object,"Object",i),f(String,"String",i),f(Boolean,"Boolean",i),f(Date,"Date",i),f(Number,"Number",i),f(RegExp,"RegExp",i),f(Array,"Array",i),Function.createCallback||(Function.createCallback=function(n,t){var r=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:i}]);if(r)throw r;return function(){var u=arguments.length,r,i;if(u>0){for(r=[],i=0;i<u;i++)r[i]=arguments[i];return r[u]=t,n.apply(this,r)}return n.call(this,t)}}),Function.createDelegate||(Function.createDelegate=function(n,t){var r=Function._validateParams(arguments,[{name:"instance",mayBeNull:i},{name:"method",type:Function}]);if(r)throw r;return function(){return t.apply(n,arguments)}}),Function._validateParams||(Function._validateParams=function(n,i,u){var f,s=i.length,e,c,o,h;if(u=u||typeof u===r,f=Function._validateParameterCount(n,i,u),f)return f.popStackFrame(),f;for(e=0,c=n.length;e<c;e++){if(o=i[Math.min(e,s-1)],h=o.name,o.parameterArray)h+="["+(e-s+1)+"]";else if(!u&&e>=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(h<e){for(c=e,f=0;f<e;f++)l=r[f],(l.optional||l.parameterArray)&&c--;h<c&&(s=i)}else if(u&&h>e)for(s=i,f=0;f<e;f++)if(r[f].parameterArray){s=!1;break}return s?(a=o.parameterCount(),a.popStackFrame(),a):t}),Function._validateParameter||(Function._validateParameter=function(n,i,u){var f,h=i.type,l=!!i.integer,a=!!i.domElement,v=!!i.mayBeNull,o,s,c;if(f=Function._validateParameterType(n,h,l,a,v,u),f)return f.popStackFrame(),f;if(o=i.elementType,s=!!i.elementMayBeNull,h===Array&&typeof n!==r&&n!==t&&(o||!s))for(var y=!!i.elementInteger,p=!!i.elementDomElement,e=0;e<n.length;e++)if(c=n[e],f=Function._validateParameterType(c,o,y,p,s,u+"["+e+"]"),f)return f.popStackFrame(),f;return t}),Function._validateParameterType||(Function._validateParameterType=function(i,u,f,e,o,s){var h,c;return typeof i===r?o?t:(h=n.MsAjaxError.argumentUndefined(s),h.popStackFrame(),h):i===t?o?t:(h=n.MsAjaxError.argumentNull(s),h.popStackFrame(),h):u&&!n.MsAjaxTypeHelper.isInstanceOfType(u,i)?(h=n.MsAjaxError.argumentType(s,typeof i,u),h.popStackFrame(),h):t}),window.Type||(window.Type=Function),Type.registerNamespace||(Type.registerNamespace=function(n){for(var i=n.split("."),r=window,t=0;t<i.length;t++)r[i[t]]=r[i[t]]||{},r=r[i[t]]}),Type.prototype.registerClass||(Type.prototype.registerClass=function(n){n={}}),typeof Sys===r&&Type.registerNamespace("Sys"),Error.prototype.popStackFrame||(Error.prototype.popStackFrame=function(){var n=this,s,u;if(arguments.length!==0)throw o.parameterCount();if(typeof n.stack!==r&&n.stack!==t&&typeof n.fileName!==r&&n.fileName!==t&&typeof n.lineNumber!==r&&n.lineNumber!==t){for(var i=n.stack.split(e),f=i[0],h=n.fileName+":"+n.lineNumber;typeof f!==r&&f!==t&&f.indexOf(h)===-1;)i.shift(),f=i[0];(s=i[1],typeof s!==r&&s!==t)&&(u=s.match(/@(.*):(\d+)$/),typeof u!==r&&u!==t)&&(n.fileName=u[1],n.lineNumber=parseInt(u[2]),i.shift(),n.stack=i.join(e))}}),OsfMsAjaxFactory.msAjaxError=o,OsfMsAjaxFactory.msAjaxString=u,OsfMsAjaxFactory.msAjaxDebug=s)}(OfficeExt||(OfficeExt={}));OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};OSF.SerializerVersion={MsAjax:0,Browser:1},function(n){function t(){return!1}n.appSpecificCheckOrigin=t}(OfficeExt||(OfficeExt={}));Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(n,t,i){this._method=n;this._invokeType=t;this._blockingOthers=i};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(n,t){this._registerMethodObject=n;this._unregisterMethodObject=t};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(n){var t=this,i=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(i)throw i;t._methodObjectList={};t._eventHandlerProxyList={};t._Id=n;t._conversations={};t._policyManager=null;t._appDomains={};t._onHandleRequestError=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(n,t,i,r){var f="invokeType",u=!1,e=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:u},{name:"method",type:Function,mayBeNull:u},{name:f,type:Number,mayBeNull:u},{name:"blockingOthers",type:Boolean,mayBeNull:u}]),o;if(e)throw e;if(i!==Microsoft.Office.Common.InvokeType.async&&i!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(f);o=new Microsoft.Office.Common.MethodObject(t,i,r);this._methodObjectList[n]=o},unregisterMethod:function(n){var t=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1}]);if(t)throw t;delete this._methodObjectList[n]},registerEvent:function(n,t,i){var r=!1,u=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:r},{name:"registerMethod",type:Function,mayBeNull:r},{name:"unregisterMethod",type:Function,mayBeNull:r}]),f;if(u)throw u;f=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,Microsoft.Office.Common.InvokeType.syncRegisterEvent,r),new Microsoft.Office.Common.MethodObject(i,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,r));this._methodObjectList[n]=f},registerEventEx:function(n,t,i,r,u){var f=!1,e=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:f},{name:"registerMethod",type:Function,mayBeNull:f},{name:"registerMethodInvokeType",type:Number,mayBeNull:f},{name:"unregisterMethod",type:Function,mayBeNull:f},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:f}]),o;if(e)throw e;o=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,i,f),new Microsoft.Office.Common.MethodObject(r,u,f));this._methodObjectList[n]=o},unregisterEvent:function(n){var t=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1}]);if(t)throw t;this.unregisterMethod(n)},registerConversation:function(n,t,i,r){var f="appDomains",u=!0,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"conversationUrl",type:String,mayBeNull:!1,optional:u},{name:f,type:Object,mayBeNull:u,optional:u},{name:"serializerVersion",type:Number,mayBeNull:u,optional:u}]);if(e)throw e;if(i){if(!(i instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument(f);this._appDomains[n]=i}this._conversations[n]={url:t,serializerVersion:r}},unregisterConversation:function(n){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete this._conversations[n]},setPolicyManager:function(n){var t="policyManager",i=Function._validateParams(arguments,[{name:t,type:Object,mayBeNull:!1}]);if(i)throw i;if(!n.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(t);this._policyManager=n},getPolicyManager:function(){return this._policyManager},dispose:function(){var n=null,t=this;t._methodObjectList=n;t._eventHandlerProxyList=n;t._Id=n;t._conversations=n;t._policyManager=n;t._appDomains=n;t._onHandleRequestError=n}};Microsoft.Office.Common.ClientEndPoint=function(n,t,i,r){var f="targetWindow",u=this,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:f,mayBeNull:!1},{name:"targetUrl",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(e)throw e;try{if(!t.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(f);}catch(o){if(!Object.prototype.hasOwnProperty.call(t,"postMessage"))throw OsfMsAjaxFactory.msAjaxError.argument(f);}u._conversationId=n;u._targetWindow=t;u._targetUrl=i;u._callingIndex=0;u._callbackList={};u._eventHandlerList={};u._serializerVersion=r!=null?r:OSF.SerializerVersion.Browser};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"param",mayBeNull:!0}]),o,s;if(f)throw f;var u=r._callingIndex++,h=new Date,e={callback:t,createdOn:h.getTime()};i&&typeof i=="object"&&typeof i.__timeout__=="number"&&(e.timeout=i.__timeout__,delete i.__timeout__);r._callbackList[u]=e;try{o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.invoke,r._conversationId,u,i);s=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(s,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(c){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete r._callbackList[u]}}},registerForEvent:function(n,t,i,r){var u=this,e=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"eventHandler",type:Function,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]),f,o,s,h;if(e)throw e;f=u._callingIndex++;o=new Date;u._callbackList[f]={callback:i,createdOn:o.getTime()};try{s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.registerEvent,u._conversationId,f,r);h=Microsoft.Office.Common.MessagePackager.envelope(s,u._serializerVersion);u._targetWindow.postMessage(h,u._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();u._eventHandlerList[n]=t}catch(c){try{i!==null&&i(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete u._callbackList[f]}}},unregisterForEvent:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]),u,e,o,s;if(f)throw f;u=r._callingIndex++;e=new Date;r._callbackList[u]={callback:t,createdOn:e.getTime()};try{o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.unregisterEvent,r._conversationId,u,i);s=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(s,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(h){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete r._callbackList[u]}}finally{delete r._eventHandlerList[n]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){function it(n){for(var t in r)if(r[t]._conversations[n])return r[t];OsfMsAjaxFactory.msAjaxDebug.trace(y);throw OsfMsAjaxFactory.msAjaxError.argument(s);}function rt(n){var t=i[n];return t||OsfMsAjaxFactory.msAjaxDebug.trace(y),t}function ut(t,i){var r=t._methodObjectList[i._actionName],u;if(!r){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+i._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject");}return u=n,i._actionType===Microsoft.Office.Common.ActionType.invoke?r:i._actionType===Microsoft.Office.Common.ActionType.registerEvent?r.getRegisterMethodObject():r.getUnregisterMethodObject()}function ft(n){h.push(n)}function et(){if(u!==n){if(!o)if(h.length>0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;r<n.length&&!u;r++)n[r].indexOf("://")!==-1&&(e.href=n[r],u=g(f,e));return delete f,e,u}function g(n,t){return n.hostname==t.hostname&&n.protocol==t.protocol&&n.port==t.port}function lt(i){var tt="Access Denied",r,f,ot,b,s,a,k,g,nt,h,v,y;if(OSF&&i.data!=""){f=OSF.SerializerVersion.Browser;ot=i.data;try{r=Microsoft.Office.Common.MessagePackager.unenvelope(ot,OSF.SerializerVersion.Browser);f=r._serializerVersion!=n?r._serializerVersion:f}catch(w){return}if(r._messageType===Microsoft.Office.Common.MessageType.request){b=i.origin==n||i.origin=="null"?r._origin:i.origin;try{if(s=it(r._conversationId),a=s._conversations[r._conversationId],f=a.serializerVersion!=n?a.serializerVersion:f,k=[a.url].concat(s._appDomains[r._conversationId]),!l(k,i.origin)&&!OfficeExt.appSpecificCheckOrigin(k,i,r._origin,l))throw"Failed origin check";if(g=s.getPolicyManager(),g&&!g.checkPermission(r._conversationId,r._actionName,r._data))throw tt;var vt=ut(s,r),yt=new Microsoft.Office.Common.InvokeCompleteCallback(i.source,b,r._actionName,r._conversationId,r._correlationId,st,f),ht=new Microsoft.Office.Common.Invoker(vt,r._data,yt,s._eventHandlerProxyList,r._conversationId,r._actionName,f),lt=e;u==n&&((c==n||(new Date).getTime()-c>p)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){(n.hostCallArgs||(n.hostCallArgs={}),n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId},n.hostCallArgs.__timeout__=-1,n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().invoke("executeMethod",function(t,i){n.onReceiving&&n.onReceiving();var r;if(t==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=i.Version,r=i.Error;else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(r,i)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n<t.length;n++)OSF.WebApp._isGoodUrl(t[n].href)&&(t[n].href=OSF.WebApp.AddHostInfoAndXdmInfo(t[n].href));for(r=document.querySelectorAll("form[data-officejs-navigate]"),n=0;n<r.length;n++)i=r[n],OSF.WebApp._isGoodUrl(i.action)&&(i.action=OSF.WebApp.AddHostInfoAndXdmInfo(i.action))};OSF.WebApp._isGoodUrl=function(n){if(typeof n=="undefined")return!1;n=n.trim();var i=n.indexOf(":"),t=i>0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))};OSF.CommonUI={HostButtonBorderColor:"#a3bde3",HostButtonBackgroundColor:"#d5e1f2"},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){}function f(){}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){}return n.prototype.writeLog=function(){},n.prototype.loadProxyFrame=function(){},n}();OSF.Logger||(OSF.Logger=n);n.ulsEndpoint=e()}(Logger||(Logger={})),function(n){var t=function(){function n(){}return n.prototype.getAriaCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"},n.getInstance=function(){return n.AriaLoggerObj===undefined&&(n.AriaLoggerObj=new n),n.AriaLoggerObj},n.prototype.isIUsageData=function(n){return n.Fields!==undefined},n.prototype.loadAriaScriptAndLog=function(n,t){var i=1e3;OSF.OUtil.loadScript(this.getAriaCDNLocation(),function(){var u,i,r,f;try{this.ALogger||(u="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439",this.ALogger=AWTLogManager.initialize(u));i=new AWTEventProperties;i.setName("Office.Extensibility.OfficeJS."+n);for(r in t)r.toLowerCase()!=="table"&&i.setProperty(r,t[r]);f=new Date;i.setProperty("Date",f.toISOString());this.ALogger.logEvent(i)}catch(e){}},i)},n.prototype.logData=function(n){this.isIUsageData(n)?this.loadAriaScriptAndLog(n.Table,n.Fields):this.loadAriaScriptAndLog(n.Table,n)},n}();n.AriaLogger=t}(OSFAriaLogger||(OSFAriaLogger={})),function(n){function u(n){return n&&(n=n.replace(/[{}]/g,r).toLowerCase()),n||r}function y(f){var h,o;n.enableTelemetry&&(t||(t=new v,t.hostVersion=f.get_hostFullVersion()?f.get_hostFullVersion():f.get_appVersion(),t.appId=f.get_id(),t.host=f.get_appName(),t.browser=window.navigator.userAgent,t.correlationId=u(f.get_correlationId()),t.clientId=(new c).getClientId(),t.appInstanceId=f.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase()),t.message=f.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="16.0.9124.1000",f._wacHostEnvironment&&(t.wacHostEnvironment=f._wacHostEnvironment),f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==i&&(t.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase()),h=f.get_docUrl(),t.docUrl=a.test(h)?h:r,o=location.href,o&&(o=o.split("?")[0].split("#")[0]),t.appURL=o,function(n,t){var o,s,u,f,e;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");f=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid");e=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");f&&f.nodeValue?t.userId=f.nodeValue:e&&e.nodeValue&&(t.userId=e.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}}(f.get_eToken(),t),function(){var l=new Date,r=i,o=0,c=!1,u=function(){document.hasFocus()?r==i&&(r=new Date):r&&(o+=Math.abs((new Date).getTime()-r.getTime()),r=i)},t=[],h,f;for(t.push(new e("focus",u)),t.push(new e("blur",u)),t.push(new e("focusout",u)),t.push(new e("focusin",u)),h=function(){for(var u=0;u<t.length;u++)OSF.OUtil.removeEventListener(window,t[u].name,t[u].handler);if(t.length=0,!c){document.hasFocus()&&r&&(o+=Math.abs((new Date).getTime()-r.getTime()),r=i);n.onAppClosed(Math.abs((new Date).getTime()-l.getTime()),o);c=s}},t.push(new e("beforeunload",h)),t.push(new e("unload",h)),f=0;f<t.length;f++)OSF.OUtil.addEventListener(window,t[f].name,t[f].handler);u()}(),n.onAppActivated()))}function p(){if(t){(new c).enumerateLog(function(n,t){return(new o).LogRawData(t)},s);var n=new OSFLog.AppActivatedUsageData;n.SessionId=f;n.AppId=t.appId;n.AssetId=t.assetId;n.AppURL=t.appURL;n.UserId=t.userId;n.ClientId=t.clientId;n.Browser=t.browser;n.Host=t.host;n.HostVersion=t.hostVersion;n.CorrelationId=u(t.correlationId);n.AppSizeWidth=window.innerWidth;n.AppSizeHeight=window.innerHeight;n.AppInstanceId=t.appInstanceId;n.Message=t.message;n.DocUrl=t.docUrl;n.OfficeJSVersion=t.officeJSVersion;n.HostJSVersion=t.hostJSVersion;t.wacHostEnvironment&&(n.WacHostEnvironment=t.wacHostEnvironment);t.isFromWacAutomation!==undefined&&t.isFromWacAutomation!==i&&(n.IsFromWacAutomation=t.isFromWacAutomation);(new o).LogData(n)}}function w(n,t,i,r){var e=new OSFLog.ScriptLoadUsageData;e.CorrelationId=u(r);e.SessionId=f;e.ScriptId=n;e.StartTime=t;e.ResponseTime=i;(new o).LogData(e)}function b(n,i,r,e,s){if(t){var c=new OSFLog.APIUsageUsageData;c.CorrelationId=u(h);c.SessionId=f;c.APIType=n;c.APIID=i;c.Parameters=r;c.ResponseTime=e;c.ErrorType=s;(new o).LogData(c)}}function k(n,t,u,f){var e=i,o;if(t)if(typeof t=="number")e=String(t);else if(typeof t=="object")for(o in t)e!==i?e+=",":e=r,typeof t[o]=="number"&&(e+=String(t[o]));else e=r;OSF.AppTelemetry.onCallDone("method",n,e,u,f)}function d(n,t){OSF.AppTelemetry.onCallDone("property",-1,n,t)}function g(n,t){OSF.AppTelemetry.onCallDone("event",n,i,0,t)}function nt(n,t,r,u){OSF.AppTelemetry.onCallDone(n?"registerevent":"unregisterevent",t,i,r,u)}function tt(n,i){if(t){var r=new OSFLog.AppClosedUsageData;r.CorrelationId=u(h);r.SessionId=f;r.FocusTime=i;r.OpenTime=n;r.AppSizeFinalWidth=window.innerWidth;r.AppSizeFinalHeight=window.innerHeight;(new c).saveLog(f,r.SerializeRow())}}function it(n){h=u(n)}function l(n,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=u(h);i.SessionId=f;i.SuccessCode=n?1:0;i.Message=t;(new o).LogData(i)}function rt(n){l(!1,n)}function ut(n){l(s,n)}var i=null,s=!0,r="";"use strict";var t,f=OSF.OUtil.Guid.generateNewGuid(),h=r,a=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");n.enableTelemetry=s;var v=function(){function n(){}return n}(),e=function(){function n(n,t){this.name=n;this.handler=t}return n}(),c=function(){function n(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}return n.prototype.getClientId=function(){var t=this,n=t.getValue(t.clientIDKey);return(!n||n.length<=0||n.length>40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i<n.length;i++)t=Math.max(t,OSF.DDA.DataCoercion.findArrayDimensionality(n[i]));return t+1}else return 0},getCoercionDefaultForBinding:function(n){switch(n){case Microsoft.Office.WebExtension.BindingType.Matrix:return Microsoft.Office.WebExtension.CoercionType.Matrix;case Microsoft.Office.WebExtension.BindingType.Table:return Microsoft.Office.WebExtension.CoercionType.Table;case Microsoft.Office.WebExtension.BindingType.Text:default:return Microsoft.Office.WebExtension.CoercionType.Text}},getBindingDefaultForCoercion:function(n){switch(n){case Microsoft.Office.WebExtension.CoercionType.Matrix:return Microsoft.Office.WebExtension.BindingType.Matrix;case Microsoft.Office.WebExtension.CoercionType.Table:return Microsoft.Office.WebExtension.BindingType.Table;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:return Microsoft.Office.WebExtension.BindingType.Text}},determineCoercionType:function(t){if(t==n||t==undefined)return n;var i=n,r=typeof t;if(t.rows!==undefined)i=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(t))i=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(r=="string"||r=="number"||r=="boolean"||OSF.OUtil.isDate(t))i=Microsoft.Office.WebExtension.CoercionType.Text;else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return i},coerceData:function(n,t,i){return i=i||OSF.DDA.DataCoercion.determineCoercionType(n),i&&i!=t&&(OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin),n=OSF.DDA.DataCoercion._coerceDataFromTable(t,OSF.DDA.DataCoercion._coerceDataToTable(n,i)),OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)),n},_matrixToText:function(n){if(n.length==1&&n[0].length==1)return""+n[0][0];for(var t="",i=0;i<n.length;i++)t+=n[i].join("\t")+"\n";return t.substring(0,t.length-1)},_textToMatrix:function(n){for(var t=n.split("\n"),i=0;i<t.length;i++)t[i]=t[i].split("\t");return t},_tableToText:function(t){var i="",r;return t.headers!=n&&(i=OSF.DDA.DataCoercion._matrixToText([t.headers])+"\n"),r=OSF.DDA.DataCoercion._matrixToText(t.rows),r==""&&(i=i.substring(0,i.length-1)),i+r},_tableToMatrix:function(t){var i=t.rows;return t.headers!=n&&i.unshift(t.headers),i},_coerceDataFromTable:function(t,i){var r;switch(t){case Microsoft.Office.WebExtension.CoercionType.Table:r=i;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:r=OSF.DDA.DataCoercion._tableToMatrix(i);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:r=n;OSF.DDA.OMFactory.manufactureSlideRange&&(r=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(i)));r==n&&(r=OSF.DDA.DataCoercion._tableToText(i));break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:r=OSF.DDA.DataCoercion._tableToText(i)}return r},_coerceDataToTable:function(n,t){t==undefined&&(t=OSF.DDA.DataCoercion.determineCoercionType(n));var i;switch(t){case Microsoft.Office.WebExtension.CoercionType.Table:i=n;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:i=new Microsoft.Office.WebExtension.TableData(n);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:i=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(n))}return i}}}();OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Ooxml:"ooxml"});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r<n.length;r++)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r<i.length;r++)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u<r.length;u++)if(r[u]===i)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];return i&&!this.hasEventHandler(n,t)?(i.push(t),!0):!1},addObjectEventHandler:function(n,t,i){if(typeof i!="function")return!1;var r=this._objectEventHandlers[n];return r&&!this.hasObjectEventHandler(n,t,i)?(r[t]==null&&(r[t]=[]),r[t].push(i),!0):!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);return u&&i&&this.fireQueuedEvent(n),i},removeEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r<i.length;r++)if(i[r]===t)return i.splice(r,1),!0;return!1},removeObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u<r.length;u++)if(r[u]===i)return r.splice(u,1),!0;return!1},clearEventHandlers:function(n){return typeof this._eventHandlers[n]!="undefined"&&this._eventHandlers[n].length>0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i<r.length;i++)r[i](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u<r.length;u++)r[u](t);return!0}return!1},fireOrQueueEvent:function(n){var t=this,i=n.type,r,u;return i&&t._eventHandlers[i]?(r=t._eventHandlers[i],u=t._queuedEventsArgs[i],r.length==0?u.push(n):t.fireEvent(n),!0):!1},fireQueuedEvent:function(n){var t,i,r,u;if(n&&this._eventHandlers[n]&&(t=this._eventHandlers[n],i=this._queuedEventsArgs[n],t.length>0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecurrenceChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"});OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties);OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties);OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced",NodeDeleted:"nodeDeleted",NodeInserted:"nodeInserted",NodeReplaced:"nodeReplaced"});OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[OSF.DDA.DataPartProperties.BuiltIn])};OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.CustomXmlPartsKeys={Id:"id",Namespace:"namespace",Xml:"xml",XPath:"xpath",Prefix:"prefix"};OSF.DDA.Marshaling.DataPartProperties={Id:"id",BuiltIn:"DataPartBuiltIn"};OSF.DDA.Marshaling.PropertyDescriptors={DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};OSF.DDA.Marshaling.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.Marshaling.ListDescriptors={DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.Marshaling.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:OSF.DDA.DataPartProperties.BuiltIn,value:OSF.DDA.Marshaling.DataPartProperties.BuiltIn}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:OSF.DDA.DataNodeProperties.BaseName,value:OSF.DDA.Marshaling.DataNodeProperties.BaseName},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:OSF.DDA.Marshaling.DataNodeProperties.NamespaceUri},{name:OSF.DDA.DataNodeProperties.NodeType,value:OSF.DDA.Marshaling.DataNodeProperties.NodeType}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NextSiblingNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.Marshaling.ListDescriptors.DataPartList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Text,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Text}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource},{name:OSF.DDA.PropertyDescriptors.Subset,value:OSF.DDA.PropertyDescriptors.Subset}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"},function(n){var t="NamedItem";n[n.Binding=0]="Binding";n[n[t]=1]=t;n[n.Slide=2]="Slide";n[n.Index=3]="Index"}(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType,function(n){var t="Selected";n[n.Default=0]="Default";n[n[t]=1]=t;n[n.None=2]="None"}(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r<t.length-1;r++)if(i[t[r]]&&(typeof i[t[r]]==f||typeof i[t[r]]==s))i=i[t[r]];else return e;if(o=i[t[t.length-1]],typeof o!=s)return e}catch(h){return e}return{callback:o,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}},r.prototype._invokeAppCommandCompletedMethod=function(n,t,i){this._pseudoDocument.appCommandInvocationCompletedAsync(n,t,i)},r.prototype._constructEventObjectForCallback=function(n){var f=this,t=new i,r;try{r=JSON.parse(n.eventObjStr);this._translateEventObjectInternal(r,t);Object.defineProperty(t,"completed",{value:function(i){t.completedContext=i;var r=JSON.stringify(t);f._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,r)},enumerable:!0})}catch(e){t=u}return t},r.prototype._translateEventObjectInternal=function(n,t){var i,r;for(i in n)n.hasOwnProperty(i)&&(r=n[i],typeof r==f&&r!=u?(OSF.OUtil.defineEnumerableProperty(t,i,{value:{}}),this._translateEventObjectInternal(r,t[i])):Object.defineProperty(t,i,{value:r,enumerable:!0,writable:!0}))},r.prototype._constructObjectByTemplate=function(n,t){var r={},i;if(!n||!t)return r;for(i in n)if(n.hasOwnProperty(i)&&(r[i]=u,t[i]!=u)){var o=n[i],s=t[i],h=typeof s;typeof o==f&&o!=u?r[i]=this._constructObjectByTemplate(o,s):(h=="number"||h==e||h=="boolean")&&(r[i]=s)}return r},r.instance=function(){return r._instance==u&&(r._instance=new r),r._instance},r._instance=u,r}(),r,i;t.AppCommandManager=u;r=function(){function n(n,t,i){var r=this;r.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;r.appCommandId=n;r.callbackName=t;r.eventObjStr=i}return n.create=function(i){return new n(i[t.AppCommandInvokedEventEnums.AppCommandId],i[t.AppCommandInvokedEventEnums.CallbackName],i[t.AppCommandInvokedEventEnums.EventObjStr])},n}();t.AppCommandInvokedEventArgs=r;i=function(){function n(){}return n}();t.AppCommandCallbackEventArgs=i;t.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}})(t=n.AppCommand||(n.AppCommand={}))}(OfficeExt||(OfficeExt={}));OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("AppCommand",OSF.DDA.Marshaling),function(n){var t="EventObjStr",i="CallbackName",r="AppCommandId";n[n[r]=0]=r;n[n[i]=1]=i;n[n[t]=2]=t}(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys||(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys={}));OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys=OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,function(n){n[n.Id=0]="Id";n[n.Status=1]="Status";n[n.Data=2]="Data"}(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys||(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys={}));OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys=OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,function(n){var t;(function(t){function i(){if(OSF.DDA.WAC){var t=OSF.DDA.WAC.Delegate.ParameterMap;t.define({type:OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.Status,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data}]});t.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:t.self}]});t.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent);t.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:n.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId},{name:n.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName},{name:n.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr}]})}}t.registerDdaFacade=i})(t=n.AppCommand||(n.AppCommand={}))}(OfficeExt||(OfficeExt={}));OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function gt(n){var t=n.input;t!=i&&(y={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function ni(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function ti(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){vt(t);return}k=r;var c=r,y=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(y.hostType),p=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=yt(s);document.body.insertBefore(o,document.body.firstChild);f=si(s,p);f.id=lt;var l=pt(s),i=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){vt(t);k||w()};function v(){function n(n){et();wt(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(ft(i),ut(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(ft(u),ut(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function b(){i.focus()}h.onComplete=b;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function ii(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r<t.length&&t[r].indexOf("://")!==-1;r++)u.postMessage(ot,t[r]);u==i||u.closed||u.close();p?window.removeEventListener(b,it):window.removeEventListener(l,tt);window.clearInterval(d);u=i;n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at close window dialog."+f);n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function ri(n){var r=n.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent],u,t,i;if(p)try{u=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+st;window.localStorage.setItem(u,r)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during messageParent method:"+f)}else if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(i=0;i<t.length&&t[i].indexOf("://")!==-1;i++)window.opener.postMessage(r,t[i])}function ui(n){var t,r,f;if(u!=i&&(t=n.hostCallArgs,r=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,r))for(f=0;f<r.length&&r[f].indexOf("://")!==-1;f++)typeof t!=c&&(t=JSON.stringify(t)),u.postMessage(t,r[f])}function fi(){function n(n){var t,r,u;n.source==window.opener&&(typeof n.data===c&&n.data.indexOf(ot)>-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ei(n,t){v=n;e=t}function oi(){try{f&&f.id==lt&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}w()}function at(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=yt(e);document.body.insertBefore(o,document.body.firstChild);f=hi(e,t);f.id=dt;h=pt(e);u=rt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);k=!0;u.onclick=function(){w()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(g).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,w(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(g).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function tt(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;v(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function it(n){var i=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+st,t;if(n.key==i)try{t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.newValue;v(t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+r)}}function vt(t){function nt(){try{if(u==i||u.closed){window.clearInterval(d);p?window.removeEventListener(b,it):window.removeEventListener(l,tt);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;v(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,y=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=y.join("|"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext,f=t[OSF.ShowWindowDialogParameterKeys.Url],o;f=n.WACUtils.addHostInfoAsQueryParam(f,h);o=JSON.parse(window.name);o[OSF.WindowNameItemKeys.HostInfo]=h;o[OSF.WindowNameItemKeys.AppContext]=s;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,w=s._clientWindowWidth/2-c/2,k=s._clientWindowHeight/2-a/2,g="width="+c+", height="+a+", left="+w+", top="+k+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(f,n.WACUtils.serializeObjectToString(o),g),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");et();at(f,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}p?window.addEventListener(b,it):window.addEventListener(l,tt);d=window.setInterval(nt,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function rt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ht,i.style.backgroundColor=ct,i.setAttribute("value",t),r=function(){ut(i)},u=function(){ft(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function ut(n){y!=i?(n.style.borderColor=y.HostButtonBorderColor,n.style.backgroundColor=y.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=kt}function ft(n){n.style.borderColor=ht;n.style.backgroundColor=ct}function w(){function n(n){et();wt(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function et(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function yt(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function si(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),bt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=nt,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function pt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function wt(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function hi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),bt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=nt,r=document.createElement("a"),r.id=g,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function bt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",nt)}var s="div",c="string",l="message",b="storage",a="keydown",r=!1,i=null,u=i,v=i,o=i,f=i,ot="osfDialogInternal:action=closeDialog",e=i,k=r,d=-1,st="messageParentKey",y=i,ht="#ababab",ct="#ffffff",kt="#ccc",lt="newWindowNotificaiton",dt="crossZoneNotification",g="configureBrowserLink",nt="dialogNotificationTextPanel",p=n.WACUtils.shouldUseLocalStorageToPassMessage(),h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=gt;t.removeEventListenersForDialog=ni;t.handleNewWindowDialog=ti;t.closeDialog=ii;t.messageParent=ri;t.sendMessage=ui;t.registerMessageReceivedEvent=fi;t.setHandlerAndShowDialogCallback=ei;t.escDismissDialogNotification=oi;t.showCrossZoneNotification=at})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};try{e(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+i)}}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};try{i(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+r)}}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}}],onSucceeded:function(n){return n[Microsoft.Office.WebExtension.Parameters.Data]}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge"};OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={AccessToken:"accessToken"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken}]}),function(n){var t=function(){function n(n,t){var i=this;OSF.DDA.WordDocument.uber.constructor.call(i,n,t);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync,OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.SaveAsync,OSF.DDA.AsyncMethodNames.RefreshAsync]);OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.BindingSelectionChanged]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeInserted]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeReplaced]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeDeleted]));OSF.OUtil.defineEnumerableProperty(i,"customXmlParts",{value:new OSF.DDA.CustomXmlParts});OSF.OUtil.defineEnumerableProperty(i,"bindings",{value:new OSF.DDA.BindingFacade(i)});OSF.OUtil.finalizeProperties(i)}return n}();n.WordDocument=t}(OSFWordWAC||(OSFWordWAC={}));OSF.DDA.WordDocument=OSFWordWAC.WordDocument;OSF.OUtil.extend(OSF.DDA.WordDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Html:"html",Text:"text",Ooxml:"ooxml",Table:"table",Matrix:"matrix",Image:"image"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.WordDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){var t,i,r;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);this.initWebAuth(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));!n.get_isDialog()&&OSF.AdditionalPostContextSettingOverride&&OSF.AdditionalPostContextSettingOverride();OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));i=n.get_reason();Microsoft.Office.WebExtension.initialize(i);r=OfficeExt.AppCommand.AppCommandManager.instance();r.initializeAndChangeOnce()};__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_operationType=t;this.m_flags=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"operationType",{get:function(){return this.m_operationType},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u,f){var e;n.Utility.validateObjectPath(i);var s={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},h=[u],o=n.Utility.setMethodArguments(t,s.ArgumentInfo,h);return n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),e=new n.Action(s,0,f),t._pendingRequest.addAction(e),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),e.referencedObjectPath=i._objectPath,e.referencedArgumentObjectPaths=o,e},i.createMethodAction=function(t,i,r,u,f,e){var h,o,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),s=new n.Action(h,u,n.Utility._fixupApiFlags(e)),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,1,4),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,1,4);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,1,4),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,1,4);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createUpdateAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:9,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,0,0);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,1,4);return r.referencedObjectPath=i._objectPath,t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,1,4);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleRetrieveResult=function(n,t){this._handleIdResult(n)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s<u.length;s++)o=u[s],i.hasOwnProperty(o)&&typeof i[o]!="undefined"&&(this[o]=i[o]);for(s=0;s<f.length;s++)o=f[s],i.hasOwnProperty(o)&&typeof i[o]!="undefined"&&(a=c?v[o]:i[o],this[o].set(a,r));for(h=!c,r&&!n.Utility.isNullOrUndefined(h)&&(h=r.throwOnReadOnly),s=0;s<e.length;s++)if(o=e[s],i.hasOwnProperty(o)&&typeof i[o]!="undefined"&&h)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.cannotApplyPropertyThroughSetMethod,o),debugInfo:{errorLocation:o}});for(o in i)if(u.indexOf(o)<0&&f.indexOf(o)<0){if(l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o),!l)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.propertyDoesNotExist,o),debugInfo:{errorLocation:o}});if(h&&!l.set)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.attemptingToSetReadOnlyProperty,o),debugInfo:{errorLocation:o}});}}catch(y){throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".set"},innerError:y});}},t.prototype._recursivelyUpdate=function(t){var o=n._internalConfig.alwaysPolyfillClientObjectUpdateMethod,r,f,e,c,u,l,i,v,y;o||(o=!n.Utility.isSetSupported("RichApiRuntime","1.2"));try{if(r=this[n.Constants.scalarPropertyNames],r||(r=[]),f=this[n.Constants.scalarPropertyUpdateable],!f)for(f=[],u=0;u<r.length;u++)f.push(!1);e=this[n.Constants.navigationPropertyNames];e||(e=[]);var s={},h={},a=0;for(i in t)if(c=r.indexOf(i),c>=0){if(!f[c])throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.attemptingToSetReadOnlyProperty,i),debugInfo:{errorLocation:i}});s[i]=t[i];++a}else if(e.indexOf(i)>=0)h[i]=t[i];else throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.propertyDoesNotExist,i),debugInfo:{errorLocation:i}});if(a>0)if(o)for(u=0;u<r.length;u++)i=r[u],l=s[i],n.Utility.isUndefined(l)||n.ActionFactory.createSetPropertyAction(this.context,this,i,l);else n.ActionFactory.createUpdateAction(this.context,this,s);for(i in h)v=this[i],y=h[i],v._recursivelyUpdate(y)}catch(p){throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility._getResourceString(n.ResourceStrings.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".update"},innerError:p});}},t}();n.ClientObject=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n;this.m_actions=[];this.m_actionResultHandler={};this.m_referencedObjectPaths={};this.m_instantiatedObjectPaths={};this.m_traceInfos={};this.m_pendingProcessEventHandlers=[];this.m_pendingEventHandlerActions={};this.m_responseTraceIds={};this.m_responseTraceMessages=[];this.m_preSyncPromises=[]}return Object.defineProperty(t.prototype,"traceInfos",{get:function(){return this.m_traceInfos},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceMessages",{get:function(){return this.m_responseTraceMessages},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceIds",{get:function(){return this.m_responseTraceIds},enumerable:!0,configurable:!0}),t.prototype._setResponseTraceIds=function(t){var i,r,u;if(t)for(i=0;i<t.length;i++)r=t[i],this.m_responseTraceIds[r]=r,u=this.m_traceInfos[r],n.Utility.isNullOrUndefined(u)||this.m_responseTraceMessages.push(u)},t.prototype.addAction=function(n){if(this.m_context.batchMode===1){var t=!1;n.actionInfo.ActionType===1&&n.referencedObjectPath.objectPathInfo.ObjectPathType===4&&(t=!0);t||this.m_context.ensureInProgressBatchIfBatchMode()}this.m_actions.push(n);n.actionInfo.ActionType==1&&(this.m_instantiatedObjectPaths[n.actionInfo.ObjectPathId]=n)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,1,4);i.referencedObjectPath=t;this.addReferencedObjectPath(t);this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t<n.length;t++)this.ensureInstantiateObjectPath(n[t])},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t<n.length;t++)this.addReferencedObjectPath(n[t])},t.prototype.addActionResultHandler=function(n,t){this.m_actionResultHandler[n.actionInfo.Id]=t},t.prototype.aggregrateRequestFlags=function(n,t,i){return t===0&&(n=n|1,(i&2)==0&&(n=n&-17),n=n&-5),i&1&&(n=n|2),(i&4)==0&&(n=n&-5),n},t.prototype.finallyNormalizeFlags=function(t){return(t&1)==0&&(t=t&-17),n._internalConfig.enableConcurrentFlag||(t=t&-5),n._internalConfig.enableUndoableFlag||(t=t&-17),typeof this.m_flagsForTesting=="number"&&(t=this.m_flagsForTesting),t},t.prototype.buildRequestMessageBodyAndRequestFlags=function(){var i,e,u,o,s,f,r,h;n._internalConfig.enableEarlyDispose&&t._calculateLastUsedObjectPathIds(this.m_actions);i=20;e={};for(u in this.m_referencedObjectPaths)i=this.aggregrateRequestFlags(i,this.m_referencedObjectPaths[u].operationType,this.m_referencedObjectPaths[u].flags),e[u]=this.m_referencedObjectPaths[u].objectPathInfo;for(o=[],s=!1,f=0;f<this.m_actions.length;f++)r=this.m_actions[f],r.actionInfo.ActionType===3&&r.actionInfo.Name===n.Constants.keepReference&&(s=!0),i=this.aggregrateRequestFlags(i,r.operationType,r.flags),o.push(r.actionInfo);return i=this.finallyNormalizeFlags(i),h={AutoKeepReference:this.m_context._autoCleanup&&s,Actions:o,ObjectPaths:e},{body:h,flags:i}},t.prototype.processResponse=function(n){var t,i,r;if(n)for(t=0;t<n.length;t++)i=n[t],r=this.m_actionResultHandler[i.ActionId],r&&r._handleResult(i.Value)},t.prototype.invalidatePendingInvalidObjectPaths=function(){for(var n in this.m_referencedObjectPaths)this.m_referencedObjectPaths[n].isInvalidAfterRequest&&(this.m_referencedObjectPaths[n].isValid=!1)},t.prototype._addPendingEventHandlerAction=function(n,t){this.m_pendingEventHandlerActions[n._id]||(this.m_pendingEventHandlerActions[n._id]=[],this.m_pendingProcessEventHandlers.push(n));this.m_pendingEventHandlerActions[n._id].push(t)},Object.defineProperty(t.prototype,"_pendingProcessEventHandlers",{get:function(){return this.m_pendingProcessEventHandlers},enumerable:!0,configurable:!0}),t.prototype._getPendingEventHandlerActions=function(n){return this.m_pendingEventHandlerActions[n._id]},t.prototype._addPreSyncPromise=function(n){this.m_preSyncPromises.push(n)},Object.defineProperty(t.prototype,"_preSyncPromises",{get:function(){return this.m_preSyncPromises},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_actions",{get:function(){return this.m_actions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPaths",{get:function(){return this.m_referencedObjectPaths},enumerable:!0,configurable:!0}),t.prototype._removeKeepReferenceAction=function(t){for(var r,i=this.m_actions.length-1;i>=0;i--)if(r=this.m_actions[i].actionInfo,r.ObjectPathId===t&&r.ActionType===3&&r.Name===n.Constants.keepReference){this.m_actions.splice(i);break}},t._updateLastUsedActionIdOfObjectPathId=function(n,i,r){for(var u,e,f;i;){if(n[i.objectPathInfo.Id])return;if(n[i.objectPathInfo.Id]=r,u=i.argumentObjectPaths,u)for(e=u.length,f=0;f<e;f++)t._updateLastUsedActionIdOfObjectPathId(n,u[f],r);i=i.parentObjectPath}},t._calculateLastUsedObjectPathIds=function(n){for(var o,v,s,h,l,u,f,i,c,e={},a=n.length,r=a-1;r>=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s<v;s++)t._updateLastUsedActionIdOfObjectPathId(e,o[s],u);h={};for(l in e)u=e[l],f=h[u],f||(f=[],h[u]=f),f.push(parseInt(l));for(r=0;r<a;r++)i=n[r],c=h[i.actionInfo.Id],c&&c.length>0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!1,enableUndoableFlag:!1};n.config={extendedErrorLogging:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this.m_batchMode=0,this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"url"});this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"batchMode",{get:function(){return this.m_batchMode},enumerable:!0,configurable:!0}),i.prototype.ensureInProgressBatchIfBatchMode=function(){if(this.m_batchMode===1&&!this.m_explicitBatchInProgress)throw n.Utility.createRuntimeError(n.ErrorCodes.generalException,n.Utility._getResourceString(n.ResourceStrings.notInsideBatch),null);},i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError({argumentName:i.combineQueryPath(u,e,".")});o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError({argumentName:i.combineQueryPath(u,e,".")});t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError({argumentName:i.combineQueryPath(u,e,".")});t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:i.combineQueryPath(u,e,".")});},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"option.select"});if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"option.expand"});if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"option.top"});if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"option.skip"});}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"option"});return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"options"});f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.ensureRequestUrlAndHeaderInfo=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})})},i.prototype.syncPrivateMain=function(){var n=this;return this.ensureRequestUrlAndHeaderInfo().then(function(){var t=n._pendingRequest;return n.m_pendingRequest=null,n.processPreSyncPromises(t).then(function(){return n.syncPrivate(t)})})},i.prototype.syncPrivate=function(t){var f=this,s,u,h,r,i;if(!t.hasActions)return this.processPendingEventHandlers(t);var e=t.buildRequestMessageBodyAndRequestFlags(),c=e.body,o=e.flags;return this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:c},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),this._lastRequestFlags=o,s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})},i.prototype.processRequestExecutorResponseMessage=function(t,i){var o,r,e,s,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),o=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(e=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=e.processForDebugStatementInfo(i.Body.Error.ActionIndex),r={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},n.config.extendedErrorLogging&&(e=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),r.fullStatements=e.process())),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements,f.fullStatements=r.fullStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:o,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:o});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r<t._pendingProcessEventHandlers.length;r++)u=t._pendingProcessEventHandlers[r],i=i.then(this.createProcessOneEventHandlersFunc(u,t));return i},i.prototype.createProcessOneEventHandlersFunc=function(n,t){return function(){return n._processRegistration(t)}},i.prototype.processPreSyncPromises=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r<t._preSyncPromises.length;r++)u=t._preSyncPromises[r],i=i.then(this.createProcessOneProSyncFunc(u));return i},i.prototype.createProcessOneProSyncFunc=function(n){return function(){return n}},i.prototype.sync=function(n){return this.syncPrivateMain().then(function(){return n})},i.prototype.batch=function(t){var i=this,u,r,f,e;if(this.m_batchMode!==1)return n.CoreUtility.Promise.reject(n.Utility.createRuntimeError(n.ErrorCodes.generalException,null,null));if(this.m_explicitBatchInProgress)return n.CoreUtility.Promise.reject(n.Utility.createRuntimeError(n.ErrorCodes.generalException,n.Utility._getResourceString(n.ResourceStrings.pendingBatchInProgress),null));if(n.Utility.isNullOrUndefined(t))return n.Utility._createPromiseFromResult(null);this.m_explicitBatchInProgress=!0;u=this.m_pendingRequest;this.m_pendingRequest=new n.ClientRequest(this);try{r=t(this._rootObject,this)}catch(o){return this.m_explicitBatchInProgress=!1,this.m_pendingRequest=u,n.CoreUtility.Promise.reject(o)}return typeof r=="object"&&r&&typeof r.then=="function"?e=n.Utility._createPromiseFromResult(null).then(function(){return r}).then(function(n){return i.m_explicitBatchInProgress=!1,f=i.m_pendingRequest,i.m_pendingRequest=u,n}).catch(function(t){return i.m_explicitBatchInProgress=!1,f=i.m_pendingRequest,i.m_pendingRequest=u,n.CoreUtility.Promise.reject(t)}):(this.m_explicitBatchInProgress=!1,f=this.m_pendingRequest,this.m_pendingRequest=u,e=n.Utility._createPromiseFromResult(r)),e.then(function(n){return i.ensureRequestUrlAndHeaderInfo().then(function(){return i.syncPrivate(f)}).then(function(){return n})})},i._run=function(n,t,r,u,f,e){return r===void 0&&(r=3),u===void 0&&(u=5e3),i._runCommon("run",null,n,0,t,r,u,f,e)},i.isRequestUrlAndHeaderInfo=function(t){return typeof t=="object"&&t!==null&&Object.getPrototypeOf(t)===Object.getPrototypeOf({})&&!n.Utility.isNullOrUndefined(t.url)},i.isRequestUrlAndHeaderInfoResolver=function(n){return typeof n=="object"&&n!==null&&typeof n._resolveRequestUrlAndHeaderInfo=="function"},i._runBatch=function(n,t,r,u,f,e,o){return u===void 0&&(u=3),f===void 0&&(f=5e3),i._runBatchCommon(0,n,t,r,u,f,e,o)},i._runExplicitBatch=function(n,t,r,u,f,e,o){return u===void 0&&(u=3),f===void 0&&(f=5e3),i._runBatchCommon(1,n,t,r,u,f,e,o)},i._runBatchCommon=function(t,r,u,f,e,o,s,h){var a,y,p,c,l,v;if(e===void 0&&(e=3),o===void 0&&(o=5e3),p=null,c=0,u.length>0&&(typeof u[0]=="string"||i.isRequestUrlAndHeaderInfo(u[0])||i.isRequestUrlAndHeaderInfoResolver(u[0]))&&(p=u[0],c=1),u.length==c+1)a=f,y=u[c+0];else if(u.length==c+2){if(n.Utility.isNullOrUndefined(u[c+0]))a=f;else if(u[c+0]instanceof n.ClientObject)a=function(){return u[c+0].context};else if(u[c+0]instanceof i)a=function(){return u[c+0]};else if(Array.isArray(u[c+0])){if(l=u[c+0],l.length==0)return i.createErrorPromise(r);for(v=0;v<l.length;v++){if(!(l[v]instanceof n.ClientObject))return i.createErrorPromise(r);if(l[v].context!=l[0].context)return i.createErrorPromise(r,n.ResourceStrings.invalidRequestContext)}a=function(){return l[0].context}}else return i.createErrorPromise(r);y=u[c+1]}else return i.createErrorPromise(r);return i._runCommon(r,p,a,t,y,e,o,s,h)},i.createErrorPromise=function(t,i){return i===void 0&&(i=n.ResourceStrings.invalidArgument),n.CoreUtility.Promise.reject(n.Utility.createRuntimeError(i,n.Utility._getResourceString(i),t))},i._runCommon=function(t,r,u,f,e,o,s,h,c){i._overrideSession&&(r=i._overrideSession);var p=new n.CoreUtility.Promise(function(n,t){n()}),l,v=!1,a,y;return p.then(function(){if(l=u(r),l._autoCleanup)return new n.CoreUtility.Promise(function(n,t){l._onRunFinishedNotifiers.push(function(){l._autoCleanup=!0;n()})});else l._autoCleanup=!0}).then(function(){if(typeof e!="function")return i.createErrorPromise(t);y=l.m_batchMode;l.m_batchMode=f;var r;return r=f==1?e(l.batch.bind(l)):e(l),(n.Utility.isNullOrUndefined(r)||typeof r.then!="function")&&n.Utility.throwError(n.ResourceStrings.runMustReturnPromise),r}).then(function(n){return f===1?n:l.sync(n)}).then(function(n){v=!0;a=n}).catch(function(n){a=n}).then(function(){function f(){var r;t++;var e=l.m_pendingRequest,a=l.m_batchMode,i=new n.ClientRequest(l);l.m_pendingRequest=i;l.m_batchMode=0;try{for(r in u)l.trackedObjects.remove(u[r])}finally{l.m_batchMode=a;l.m_pendingRequest=e}return l.syncPrivate(i).then(function(){h&&h(t)}).catch(function(){c&&c(t);t<o&&setTimeout(function(){f()},s)})}var u=l.trackedObjects._retrieveAndClearAutoCleanupList(),e,t;l._autoCleanup=!1;l.m_batchMode=y;for(e in u)u[e]._objectPath.isValid=!1;if(t=0,n.Utility._synchronousCleanup||i.isRequestUrlAndHeaderInfoResolver(r))return f();else f()}).then(function(){if(l._onRunFinishedNotifiers&&l._onRunFinishedNotifiers.length>0){var n=l._onRunFinishedNotifiers.shift();n()}if(v)return a;else throw a;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(t,i){var r;this.m_proxy=t;this.m_shouldPolyfill=i;var u=t[n.Constants.scalarPropertyNames],f=t[n.Constants.navigationPropertyNames],e=t[n.Constants.className],o=t[n.Constants.isCollection];if(u)for(r=0;r<u.length;r++)n.Utility.definePropertyThrowUnloadedException(this,e,u[r]);if(f)for(r=0;r<f.length;r++)n.Utility.definePropertyThrowUnloadedException(this,e,f[r]);o&&n.Utility.definePropertyThrowUnloadedException(this,e,n.Constants.itemsLowerCase)}return Object.defineProperty(t.prototype,"$proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$isNullObject",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.$isNullObject"}});return this.m_isNullObject},enumerable:!0,configurable:!0}),t.prototype.toJSON=function(){return this.m_isLoaded?this.m_isNullObject?null:(n.Utility.isUndefined(this.m_json)&&(this.m_json=this.purifyJson(this.m_value)),this.m_json):undefined},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.prototype._handleResult=function(n){this.m_isLoaded=!0;n===null||typeof n=="object"&&n&&n._IsNull?(this.m_isNullObject=!0,n=null):this.m_isNullObject=!1;this.m_shouldPolyfill&&(n=this.changePropertyNameToCamelLowerCase(n));this.m_value=n;this.m_proxy._handleRetrieveResult(n,this)},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,r,i,u,f,e;if(Array.isArray(t)){for(i=[],r=0;r<t.length;r++)i.push(this.changePropertyNameToCamelLowerCase(t[r]));return i}else if(typeof t=="object"&&t!==null){i={};for(u in t)if(f=t[u],u===n.Constants.items){i={};i[n.Constants.itemsLowerCase]=this.changePropertyNameToCamelLowerCase(f);break}else e=n.Utility._toCamelLowerCase(u),i[e]=this.changePropertyNameToCamelLowerCase(f);return i}else return t},t.prototype.purifyJson=function(n){var f=95,r,i,u,t;if(Array.isArray(n)){for(i=[],r=0;r<n.length;r++)i.push(this.purifyJson(n[r]));return i}else if(typeof n=="object"&&n!==null){i={};for(u in n)u.charCodeAt(0)!==f&&(t=n[u],typeof t=="object"&&t!==null&&Array.isArray(t.items)&&(t=t.items),i[u]=this.purifyJson(t));return i}else return n},t}();n.RetrieveResultImpl=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idLowerCase="id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.keepReference="_KeepReference",n.objectPathIdPrivate="_ObjectPathId",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.sessionContext="sc",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n.eventMessageCategory=65536,n.eventWorkbookId="Workbook",n.eventSourceRemote="Remote",n.itemsLowerCase="items",n.proxy="$proxy",n.scalarPropertyNames="_scalarPropertyNames",n.navigationPropertyNames="_navigationPropertyNames",n.className="_className",n.isCollection="_isCollection",n.scalarPropertyUpdateable="_scalarPropertyUpdateable",n.collectionPropertyPath="_collectionPropertyPath",n.objectPathInfoDoNotKeepReferenceFieldName="D",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return Object.defineProperty(t,"Promise",{get:function(){if(typeof n.Promise!="undefined")return n.Promise;if(typeof Office!="undefined"&&Office.Promise)return Office.Promise;if(typeof OfficeExtension!="undefined"&&OfficeExtension.Promise)return OfficeExtension.Promise;throw new n.Error("No Promise implementation found");},enumerable:!0,configurable:!0}),t}();n.CoreUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){var i=u.call(this)||this;return i.m_chosenWindow=null,i.m_chosenOrigin=null,i.m_enabled=!0,i.m_onMessageHandler=i._onMessage.bind(i),i.m_callbackList={},i.m_id=0,i.m_timeoutId=-1,i.m_appContext=null,i.m_url=n,i.m_options=t,i.m_options||(i.m_options={sessionKey:Math.random().toString()}),i.m_options.sessionKey||(i.m_options.sessionKey=Math.random().toString()),i.m_options.container||(i.m_options.container=document.body),i.m_options.timeoutInMilliseconds||(i.m_options.timeoutInMilliseconds=6e4),i.m_options.height||(i.m_options.height="400px"),i.m_options.width||(i.m_options.width="100%"),i.m_options.webApplication&&i.m_options.webApplication.accessToken&&i.m_options.webApplication.accessTokenTtl||(i.m_options.webApplication=null),i}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),f=!1,t,r;return(this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(f=!0),t=document.createElement("a"),t.href=this.m_url,this.m_options.webApplication?(r=n.Constants.embeddingPageOrigin+"="+u+"&"+n.Constants.embeddingPageSessionInfo+"="+this.m_options.sessionKey,t.search=t.search.length===0||t.search==="?"?"?"+n.Constants.sessionContext+"="+encodeURIComponent(r):t.search+"&"+n.Constants.sessionContext+"="+encodeURIComponent(r)):f?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n.CoreUtility.Promise(function(r,u){var f=document.createElement("iframe"),e,o,s;t.m_options.id&&(f.id=t.m_options.id,f.name=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;t.m_options.webApplication?(e=document.createElement("form"),e.setAttribute("action",i),e.setAttribute("method","post"),e.setAttribute("target",f.name),t.m_options.container.appendChild(e),o=document.createElement("input"),o.setAttribute("type","hidden"),o.setAttribute("name","access_token"),o.setAttribute("value",t.m_options.webApplication.accessToken),e.appendChild(o),s=document.createElement("input"),s.setAttribute("type","hidden"),s.setAttribute("name","access_token_ttl"),s.setAttribute("value",t.m_options.webApplication.accessTokenTtl),e.appendChild(s),t.m_options.container.appendChild(f),e.submit()):(f.src=i,t.m_options.container.appendChild(f));t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n.CoreUtility.Promise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n.CoreUtility.Promise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r<e.length;r++)e[r](l);return}i&&i.hasOwnProperty(t.RespondingId)&&(o=i[t.RespondingId],s=this.m_callbackList[o],typeof s=="function"&&s(i[t.ParamsKey]),delete this.m_callbackList[o])}},f.prototype._sendMessageWithCallback=function(n,i,r,u){this.m_callbackList[n]=u;var f={};f[t.SendingId]=n;f[t.CommandKey]=i;f[t.ParamsKey]=r;this.m_chosenWindow.postMessage(JSON.stringify(f),this.m_chosenOrigin)},f.prototype._isValidDescendant=function(n){function i(t){if(t===n)return!0;for(var r=0,u=t.frames.length;r<u;r++)if(i(t.frames[r]))return!0;return!1}for(var u=this.m_options.container||document.body,r=u.getElementsByTagName("iframe"),t=0,f=r.length;t<f;t++)if(i(r[t].contentWindow))return!0;return!1},f.prototype._setupContext=function(n){!(this.m_appContext=n)},f}(n.SessionBase);n.EmbeddedSession=f;e=function(){function r(n){this.m_session=n}return r.prototype.executeAsync=function(u,f,e){var o=this,s=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(u,f,e,r.SourceLibHeaderValue);return new n.CoreUtility.Promise(function(u,f){o.m_session._invoke(t.ExecuteMethodCommand,function(t,r){n.Utility.log("Response:");n.Utility.log(JSON.stringify(r));var f;f=t==i.Success?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBodyFromSafeArray(r.Data),n.RichApiMessageUtility.getResponseHeadersFromSafeArray(r.Data)):n.RichApiMessageUtility.buildResponseOnError(r.error.Code,r.error.Message);u(f)},r._transformMessageArrayIntoParams(s))})},r._transformMessageArrayIntoParams=function(n){return{ArrayData:n,DdaMethod:{DispatchId:r.DispidExecuteRichApiRequestMethod}}},r.DispidExecuteRichApiRequestMethod=93,r.SourceLibHeaderValue="Embedded",r}()}(OfficeExtension||(OfficeExtension={})),function(n){var t;(function(t){var i=function(i){function r(n){var t=i.call(this,typeof n=="string"?n:n.message)||this;return Object.setPrototypeOf(t,r.prototype),t.name="OfficeExtension.Error",typeof n=="string"?t.message=n:(t.code=n.code,t.message=n.message,t.traceMessages=n.traceMessages||[],t.innerError=n.innerError||null,t.debugInfo=t._createDebugInfo(n.debugInfo||{})),t}return __extends(r,i),r.prototype.toString=function(){return this.code+": "+this.message},r.prototype._createDebugInfo=function(t){var i={code:this.code,message:this.message,toString:function(){return JSON.stringify(this)}};for(var r in t)i[r]=t[r];return this.innerError&&(i.innerError=this.innerError instanceof n._Internal.RuntimeError?this.innerError.debugInfo:this.innerError),i},r._createInvalidArgError=function(i){return new t.RuntimeError({code:n.ErrorCodes.invalidArgument,message:n.Utility.isNullOrEmptyString(i.argumentName)?n.Utility._getResourceString(n.ResourceStrings.invalidArgumentGeneric):n.Utility._getResourceString(n.ResourceStrings.invalidArgument,i.argumentName),debugInfo:i.errorLocation?{errorLocation:i.errorLocation}:{},innerError:i.innerError})},r}(Error);t.RuntimeError=i})(t=n._Internal||(n._Internal={}));n.Error=t.RuntimeError}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.accessDenied="AccessDenied",n.generalException="GeneralException",n.activityLimitReached="ActivityLimitReached",n.invalidObjectPath="InvalidObjectPath",n.propertyNotLoaded="PropertyNotLoaded",n.valueNotLoaded="ValueNotLoaded",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.runMustReturnPromise="RunMustReturnPromise",n.cannotRegisterEvent="CannotRegisterEvent",n.apiNotFound="ApiNotFound",n.connectionFailure="ConnectionFailure",n.timeout="Timeout",n.invalidOrTimedOutSession="InvalidOrTimedOutSession",n.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",n}();n.ErrorCodes=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){var u=this;this.m_id=n._nextId();this.m_context=n;this.m_name=i;this.m_handlers=[];this.m_registered=!1;this.m_eventInfo=r;this.m_callback=function(n){u.m_eventInfo.eventArgsTransformFunc(n).then(function(n){return u.fireEvent(n)})}}return Object.defineProperty(t.prototype,"_registered",{get:function(){return this.m_registered},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_id",{get:function(){return this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_handlers",{get:function(){return this.m_handlers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_callback",{get:function(){return this.m_callback},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var i=n.ActionFactory.createTraceAction(this.m_context,null,!1);return this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:i.actionInfo.Id,handler:t,operation:0}),new n.EventHandlerResult(this.m_context,this,t)},t.prototype.remove=function(t){var i=n.ActionFactory.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:i.actionInfo.Id,handler:t,operation:1})},t.prototype.removeAll=function(){var t=n.ActionFactory.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:null,operation:2})},t.prototype._processRegistration=function(t){var f=this,u=n.Utility._createPromiseFromResult(null),e=t._getPendingEventHandlerActions(this),r,s,i,o;if(!e)return u;for(r=[],i=0;i<this.m_handlers.length;i++)r.push(this.m_handlers[i]);for(s=!1,i=0;i<e.length;i++)if(t._responseTraceIds[e[i].id]){s=!0;switch(e[i].operation){case 0:r.push(e[i].handler);break;case 1:for(o=r.length-1;o>=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i<this.m_handlers.length;i++)u=this.m_handlers[i],f=n.Utility._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(u,t)).catch(function(t){n.Utility.log("Error when invoke handler: "+JSON.stringify(t))}),r.push(f);n.CoreUtility.Promise.all(r)},t.prototype.createFireOneEventHandlerFunc=function(n,t){return function(){return n(t)}},t}();n.EventHandlers=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n,t,i){this.m_context=n;this.m_allHandlers=t;this.m_handler=i}return Object.defineProperty(n.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),n.prototype.remove=function(){this.m_allHandlers&&this.m_handler&&(this.m_allHandlers.remove(this.m_handler),this.m_allHandlers=null,this.m_handler=null)},n}();n.EventHandlerResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(t){var i=function(){function i(){}return i.prototype.register=function(i,r,u){switch(i){case 4:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.addHandlerAsync(Office.EventType.BindingDataChanged,u,n)})});case 3:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.addHandlerAsync(Office.EventType.BindingSelectionChanged,u,n)})});case 2:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged,u,n)});case 1:return n.Utility.promisify(function(n){return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged,u,n)});case 5:return n.Utility.promisify(function(n){return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage",u,n)});case 13:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted,u,{id:r},n)});case 14:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged,u,{id:r},n)});case 15:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged,u,{id:r},n)});case 16:return n.Utility.promisify(function(n){return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded,u,{id:r},n)});default:throw t.RuntimeError._createInvalidArgError({argumentName:"eventId"});}},i.prototype.unregister=function(i,r,u){switch(i){case 4:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.removeHandlerAsync(Office.EventType.BindingDataChanged,{handler:u},n)})});case 3:return n.Utility.promisify(function(n){return Office.context.document.bindings.getByIdAsync(r,n)}).then(function(t){return n.Utility.promisify(function(n){return t.removeHandlerAsync(Office.EventType.BindingSelectionChanged,{handler:u},n)})});case 2:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged,{handler:u},n)});case 1:return n.Utility.promisify(function(n){return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged,{handler:u},n)});case 5:return n.Utility.promisify(function(n){return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage",{handler:u},n)});case 13:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted,{id:r,handler:u},n)});case 14:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged,{id:r,handler:u},n)});case 15:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged,{id:r,handler:u},n)});case 16:return n.Utility.promisify(function(n){return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded,{id:r,handler:u},n)});default:throw t.RuntimeError._createInvalidArgError({argumentName:"eventId"});}},i}();t.officeJsEventRegistration=new i})(t=n._Internal||(n._Internal={}));i=function(){function i(n,t){this.m_handlersByEventByTarget={};this.m_registerEventImpl=n;this.m_unregisterEventImpl=t}return i.prototype.getHandlers=function(t,i){var r,u;return n.Utility.isNullOrUndefined(i)&&(i=""),r=this.m_handlersByEventByTarget[t],r||(r={},this.m_handlersByEventByTarget[t]=r),u=r[i],u||(u=[],r[i]=u),u},i.prototype.register=function(i,r,u){if(!u)throw t.RuntimeError._createInvalidArgError({argumentName:"handler"});var f=this.getHandlers(i,r);return(f.push(u),f.length===1)?this.m_registerEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i.prototype.unregister=function(i,r,u){var f,e;if(!u)throw t.RuntimeError._createInvalidArgError({argumentName:"handler"});for(f=this.getHandlers(i,r),e=f.length-1;e>=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r<t.entries.length;r++)if(i=t.entries[r],i.messageCategory==n.Constants.eventMessageCategory&&(n.Utility._logEnabled&&n.Utility.log(JSON.stringify(i)),u=this.m_eventRegistration.getHandlers(i.messageType,i.targetId),u.length>0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f<u.length;f++)u[f](e)},t.getGenericEventRegistration=function(){return t.s_genericEventRegistration||(t.s_genericEventRegistration=new t),t.s_genericEventRegistration},t.richApiMessageEventCategory=65536,t}(),i;n._testSetRichApiMessageReadyImpl=r;n._testTriggerRichApiMessageEvent=u;i=function(i){function r(n,t,r,u){var f=i.call(this,n,t,r,u)||this;return f.m_genericEventInfo=u,f}return __extends(r,i),r.prototype.add=function(i){var r=this;return this._handlers.length==0&&this.m_genericEventInfo.registerFunc&&this.m_genericEventInfo.registerFunc(),t.getGenericEventRegistration().isReady||this._context._pendingRequest._addPreSyncPromise(t.getGenericEventRegistration().ready()),n.ActionFactory.createTraceMarkerForCallback(this._context,function(){r._handlers.push(i);r._handlers.length==1&&t.getGenericEventRegistration().register(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)}),new n.EventHandlerResult(this._context,this,i)},r.prototype.remove=function(i){var r=this;this._handlers.length==1&&this.m_genericEventInfo.unregisterFunc&&this.m_genericEventInfo.unregisterFunc();n.ActionFactory.createTraceMarkerForCallback(this._context,function(){for(var n=r._handlers,u=n.length-1;u>=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n.CoreUtility.Promise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n.CoreUtility.Promise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=i.call(this)||this;return t.m_promiseResolver={},t.m_bridge=n,t.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)},t}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n.CoreUtility.Promise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r,u,f){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0;this.m_operationType=u;this.m_flags=f}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"operationType",{get:function(){return this.m_operationType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalObjectPathInfo",{get:function(){return this.m_originalObjectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.resetForUpdateUsingObjectData();this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_parentObjectPath=null},t.prototype.saveOriginalObjectPathInfo=function(){n.config.extendedErrorLogging&&!this.m_originalObjectPathInfo&&(this.m_originalObjectPathInfo={},t.copyObjectPathInfo(this.m_objectPathInfo,this.m_originalObjectPathInfo))},t.prototype.updateUsingObjectData=function(i,r){var l=i[n.Constants.referenceId],h,c,f,e,o,a,s,u;if(!n.Utility.isNullOrEmptyString(l)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(h={},t.copyObjectPathInfo(this.m_objectPathInfo,h),this.m_savedObjectPathInfo={pathInfo:h,parent:this.m_parentObjectPath});this.saveOriginalObjectPathInfo();this.resetForUpdateUsingObjectData();this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=l;delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;return}if(c=r[n.Constants.collectionPropertyPath],!n.Utility.isNullOrEmptyString(c)&&(u=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(i),!n.Utility.isNullOrUndefined(u))){for(f=c.split("."),e=r.context[f[0]],o=1;o<f.length;o++)e=e[f[o]];this.saveOriginalObjectPathInfo();this.resetForUpdateUsingObjectData();this.m_parentObjectPath=e._objectPath;this.m_objectPathInfo.ParentObjectPathId=this.m_parentObjectPath.objectPathInfo.Id;this.m_objectPathInfo.ObjectPathType=5;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo.Arguments=[u];return}if(a=this.parentObjectPath&&this.parentObjectPath.isCollection,s=this.getByIdMethodName,(a||!n.Utility.isNullOrEmptyString(s))&&(u=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(i),!n.Utility.isNullOrUndefined(u))){this.saveOriginalObjectPathInfo();this.resetForUpdateUsingObjectData();n.Utility.isNullOrEmptyString(s)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=s,this.m_getByIdMethodName=null);this.m_objectPathInfo.ArgumentInfo.Arguments=[u];return}},t.prototype.resetForUpdateUsingObjectData=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_operationType=1;this.m_flags=4;this.m_objectPathInfo.ArgumentInfo={};this.m_argumentObjectPaths=null},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1,1,4)},t.createNewObjectObjectPath=function(t,i,r,u){var f={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(f,null,r,!1,1,n.Utility._fixupApiFlags(u))},t.createPropertyObjectPath=function(t,i,r,u,f,e){var o={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(o,i._objectPath,u,f,1,n.Utility._fixupApiFlags(e))},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1,1,4)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1,1,4)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o,u,n.Utility._fixupApiFlags(h));return c.argumentObjectPaths=a,c.getByIdMethodName=s,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1,1,4)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(f);return i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=n.Utility.tryGetObjectIdFromLoadOrRetrieveResult(r),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1,1,4)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1,1,4)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n.CoreUtility.Promise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n<h;n+=2)t=e[n],i=e[n+1],t(i),e[n]=undefined,e[n+1]=undefined;h=0}function l(){}function ui(){return new TypeError("You cannot resolve a promise with itself")}function fi(){return new TypeError("A promises callback cannot return that same promise.")}function ei(n){try{return n.then}catch(t){return y.error=t,y}}function oi(n,t,i,r){try{n.call(t,i,r)}catch(u){return u}}function si(n,i,u){f(function(n){var f=!1,e=oi(u,i,function(t){f||(f=!0,i!==t?v(n,t):r(n,t))},function(i){f||(f=!0,t(n,i))},"Settle: "+(n._label||" unknown promise"));!f&&e&&(f=!0,t(n,e))},n)}function hi(n,i){i._state===a?r(n,i._result):i._state===s?t(n,i._result):p(i,undefined,function(t){v(n,t)},function(i){t(n,i)})}function ci(n,i){if(i.constructor===n.constructor)hi(n,i);else{var u=ei(i);u===y?t(n,y.error):u===undefined?r(n,i):b(u)?si(n,i,u):r(n,i)}}function v(n,i){n===i?t(n,ui()):vt(i)?ci(n,i):r(n,i)}function li(n){n._onerror&&n._onerror(n._result);d(n)}function r(n,t){n._state===o&&(n._result=t,n._state=a,n._subscribers.length!==0&&f(d,n))}function t(n,t){n._state===o&&(n._state=s,n._result=t,f(li,n))}function p(n,t,i,r){var u=n._subscribers,e=u.length;n._onerror=null;u[e]=t;u[e+a]=i;u[e+s]=r;e===0&&n._state&&f(d,n)}function d(n){var i=n._subscribers,e=n._state,r,u,f,t;if(i.length!==0){for(f=n._result,t=0;t<i.length;t+=3)r=i[t],u=i[t+e],r?ft(e,r,u,f):u(f);n._subscribers.length=0}}function ut(){this.error=null}function ai(n,t){try{return n(t)}catch(i){return w.error=i,w}}function ft(n,i,u,f){var c=b(u),e,l,h,y;if(c){if(e=ai(u,f),e===w?(y=!0,l=e.error,e=null):h=!0,i===e){t(i,fi());return}}else e=f,h=!0;i._state!==o||(c&&h?v(i,e):y?t(i,l):n===a?r(i,e):n===s&&t(i,e))}function vi(n,i){try{i(function(t){v(n,t)},function(i){t(n,i)})}catch(r){t(n,r)}}function u(n,i){var u=this;u._instanceConstructor=n;u.promise=new n(l);u._validateInput(i)?(u._input=i,u.length=i.length,u._remaining=i.length,u._init(),u.length===0?r(u.promise,u._result):(u.length=u.length||0,u._enumerate(),u._remaining===0&&r(u.promise,u._result))):t(u.promise,u._validationError())}function yi(n){return new et(this,n).promise}function pi(n){function e(n){v(i,n)}function s(n){t(i,n)}var u=this,i=new u(l),f,r;if(!nt(n))return t(i,new TypeError("You must pass an array to race.")),i;for(f=n.length,r=0;i._state===o&&r<f;r++)p(u.resolve(n[r]),undefined,e,s);return i}function wi(n){var i=this,t;return n&&typeof n=="object"&&n.constructor===i?n:(t=new i(l),v(t,n),t)}function bi(n){var r=this,i=new r(l);return t(i,n),i}function ki(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function di(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}function i(n){this._id=lt++;this._state=undefined;this._result=undefined;this._subscribers=[];l!==n&&(b(n)||ki(),this instanceof i||di(),vi(this,n))}var g,e,rt,w,et,ot,st,ht,ct,lt,at;g=Array.isArray?Array.isArray:function(n){return Object.prototype.toString.call(n)==="[object Array]"};var nt=g,h=0,gi={}.toString,pt,k,f=function(n,t){e[h]=n;e[h+1]=t;h+=2;h===2&&(k?k(c):rt())};var kt=typeof window!="undefined"?window:undefined,tt=kt||{},it=tt.MutationObserver||tt.WebKitMutationObserver,dt=typeof process!="undefined"&&{}.toString.call(process)==="[object process]",gt=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";e=new Array(1e3);rt=dt?ni():it?ti():gt?ii():ri();var o=void 0,a=1,s=2,y=new ut;return w=new ut,u.prototype._validateInput=function(n){return nt(n)},u.prototype._validationError=function(){return new n.Error("Array Methods must be provided an Array")},u.prototype._init=function(){this._result=new Array(this.length)},et=u,u.prototype._enumerate=function(){for(var n=this,i=n.length,r=n.promise,u=n._input,t=0;r._state===o&&t<i;t++)n._eachEntry(u[t],t)},u.prototype._eachEntry=function(n,t){var i=this,r=i._instanceConstructor;yt(n)?n.constructor===r&&n._state!==o?(n._onerror=null,i._settledAt(n._state,t,n._result)):i._willSettleAt(r.resolve(n),t):(i._remaining--,i._result[t]=n)},u.prototype._settledAt=function(n,i,u){var f=this,e=f.promise;e._state===o&&(f._remaining--,n===s?t(e,u):f._result[i]=u);f._remaining===0&&r(e,f._result)},u.prototype._willSettleAt=function(n,t){var i=this;p(n,undefined,function(n){i._settledAt(a,t,n)},function(n){i._settledAt(s,t,n)})},ot=yi,st=pi,ht=wi,ct=bi,lt=0,at=i,i.all=ot,i.race=st,i.resolve=ht,i.reject=ct,i._setScheduler=wt,i._setAsap=bt,i._asap=f,i.prototype={constructor:i,then:function(n,t){var u=this,i=u._state,r,e,o;return i===a&&!n||i===s&&!t?this:(r=new this.constructor(l),e=u._result,i?(o=arguments[i-1],f(function(){ft(i,r,o,e)})):p(u,r,n,t),r)},"catch":function(n){return this.then(null,n)}},at}.call(this)}t.Init=i})(t=n.PromiseImpl||(n.PromiseImpl={}))}(t=n._Internal||(n._Internal={})),function(n){function t(){var n=window.navigator.userAgent,t=n.indexOf("Edge/");return t>=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId],u=t._objectPath.objectPathInfo[n.Constants.objectPathInfoDoNotKeepReferenceFieldName];if(u)throw n.Utility.createRuntimeError(n.ErrorCodes.generalException,n.Utility._getResourceString(n.ResourceStrings.objectIsUntracked),null);n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var i,r;t._objectPath.objectPathInfo[n.Constants.objectPathInfoDoNotKeepReferenceFieldName]=!0;t.context._pendingRequest._removeKeepReferenceAction(t._objectPath.objectPathInfo.Id);i=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(i)||(r=this.m_context._rootObject,r._RemoveReference&&r._RemoveReference(i));delete t[n.Constants.isTracked]},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r,u){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r;this.m_removePII=u}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t<this.m_actions.length;t++)this.processOneAction(this.m_actions[t]);return this.m_statements},t.prototype.processForDebugStatementInfo=function(t){var o,c,i,u,f,e,r,s,h;for(this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions),o=5,this.m_statements=[],c="",i=-1,u=0;u<this.m_actions.length;u++)if(this.processOneAction(this.m_actions[u]),t==u&&(i=this.m_statements.length-1),i>=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s<i;s++)r.push(this.m_statements[s]);for(r.push("// >>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h<e;h++)r.push(this.m_statements[h]);return e<this.m_statements.length&&r.push("..."),{statement:this.m_statements[i],surroundingStatements:r}},t.prototype.processOneAction=function(n){var t=n.actionInfo;switch(t.ActionType){case 1:this.processInstantiateAction(n);break;case 3:this.processMethodAction(n);break;case 2:this.processQueryAction(n);break;case 7:this.processQueryAsJsonAction(n);break;case 6:this.processRecursiveQueryAction(n);break;case 4:this.processSetPropertyAction(n);break;case 5:this.processTraceAction(n);break;case 8:this.processEnsureUnchangedAction(n);break;case 9:this.processUpdateAction(n);break}},t.prototype.processInstantiateAction=function(n){var i=n.actionInfo.ObjectPathId,u=this.m_referencedObjectPaths[i],r=this.getObjVarName(i),t;this.m_declaredObjectPathMap[i]?(t="// Instantiate {"+r+"}",t=this.appendDisposeCommentIfRelevant(t,n),this.m_statements.push(t)):(t="var "+r+"="+this.buildObjectPathExpressionWithParent(u)+";",t=this.appendDisposeCommentIfRelevant(t,n),this.m_statements.push(t),this.m_declaredObjectPathMap[i]=r)},t.prototype.processMethodAction=function(t){var r=t.actionInfo.Name,i;if(r==="_KeepReference"){if(!n._internalConfig.showInternalApiInDebugInfo)return;r="track"}i=this.getObjVarName(t.actionInfo.ObjectPathId)+"."+n.Utility._toCamelLowerCase(r)+"("+this.buildArgumentsExpression(t.actionInfo.ArgumentInfo)+");";i=this.appendDisposeCommentIfRelevant(i,t);this.m_statements.push(i)},t.prototype.processQueryAction=function(n){var i=this.buildQueryExpression(n),t=this.getObjVarName(n.actionInfo.ObjectPathId)+".load("+i+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processQueryAsJsonAction=function(n){var i=this.buildQueryExpression(n),t=this.getObjVarName(n.actionInfo.ObjectPathId)+".retrieve("+i+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processRecursiveQueryAction=function(n){var i="",t;n.actionInfo.RecursiveQueryInfo&&(i=JSON.stringify(n.actionInfo.RecursiveQueryInfo));t=this.getObjVarName(n.actionInfo.ObjectPathId)+".loadRecursive("+i+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processSetPropertyAction=function(t){var i=this.getObjVarName(t.actionInfo.ObjectPathId)+"."+n.Utility._toCamelLowerCase(t.actionInfo.Name)+"="+this.buildArgumentsExpression(t.actionInfo.ArgumentInfo)+";";i=this.appendDisposeCommentIfRelevant(i,t);this.m_statements.push(i)},t.prototype.processTraceAction=function(n){var t="context.trace();";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processEnsureUnchangedAction=function(n){var t=this.getObjVarName(n.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(n.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.processUpdateAction=function(n){var t=this.getObjVarName(n.actionInfo.ObjectPathId)+".update("+JSON.stringify(n.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,n);this.m_statements.push(t)},t.prototype.appendDisposeCommentIfRelevant=function(n,t){var u=this,i,r;return this.m_showDispose&&(i=t.actionInfo.L,i&&i.length>0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(n){var t=this.buildObjectPathInfoExpression(n.objectPathInfo),i=n.originalObjectPathInfo;return i&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(i)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(t){switch(t.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.Name)+"("+this.buildArgumentsExpression(t.ArgumentInfo)+")";case 2:return t.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments||n.Arguments.length===0)return t;if(this.m_removePII)return typeof n.Arguments[0]=="undefined"?t:"...";for(i=0;i<n.Arguments.length;i++)i>0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;if(f)switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.objectIsUntracked="ObjectIsUntracked",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n.pendingBatchInProgress="PendingBatchInProgress",n.notInsideBatch="NotInsideBatch",n.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.Script.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n.PendingBatchInProgress="There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",n.NotInsideBatch="Operations may not be invoked outside of a batch method.",n.CannotUpdateReadOnlyProperty="The property '{0}' is read-only and it cannot be updated.",n.ObjectIsUntracked="The object is untracked.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t<i.length-1;t+=2)r[i[t]]=i[t+1];return r},t.getResponseStatusCode=function(n){return t.getResponseStatusCodeFromSafeArray(n.value.data)},t.getResponseStatusCodeFromSafeArray=function(n){return n[0]},t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012,t.OfficeJsErrorCode_ooeActivityLimitReached=5102,t.OfficeJsErrorCode_ooeNoCapability=7e3,t}();n.RichApiMessageUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.checkArgumentNull=function(i,r){if(t.isNullOrUndefined(i))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:r});},t.isNullOrUndefined=function(n){return n===null?!0:typeof n=="undefined"?!0:!1},t.isUndefined=function(n){return typeof n=="undefined"?!0:!1},t.isNullOrEmptyString=function(n){return n===null?!0:typeof n=="undefined"?!0:n.length==0?!0:!1},t.isPlainJsonObject=function(n){return t.isNullOrUndefined(n)?!1:typeof n!="object"?!1:Object.getPrototypeOf(n)===Object.getPrototypeOf({})},t.trim=function(n){return n.replace(new RegExp("^\\s+|\\s+$","g"),"")},t.caseInsensitiveCompareString=function(n,i){return t.isNullOrUndefined(n)?t.isNullOrUndefined(i):t.isNullOrUndefined(i)?!1:n.toUpperCase()==i.toUpperCase()},t.adjustToDateTime=function(i){var r,u;if(t.isNullOrUndefined(i))return null;if(typeof i=="string")return new Date(i);if(Array.isArray(i)){for(r=i,u=0;u<r.length;u++)r[u]=t.adjustToDateTime(r[u]);return r}throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"date"});},t.isReadonlyRestRequest=function(n){return t.caseInsensitiveCompareString(n,"GET")},t.setMethodArguments=function(n,i,r){if(t.isNullOrUndefined(r))return null;var u=[],f=[],e=t.collectObjectPathInfos(n,r,u,f);return i.Arguments=r,e&&(i.ReferencedObjectPathIds=f),u},t.collectObjectPathInfos=function(i,r,u,f){for(var o,h,c,s=!1,e=0;e<r.length;e++)r[e]instanceof n.ClientObject?(o=r[e],t.validateContext(i,o),r[e]=o._objectPath.objectPathInfo.Id,f.push(o._objectPath.objectPathInfo.Id),u.push(o._objectPath),s=!0):Array.isArray(r[e])?(h=[],c=t.collectObjectPathInfos(i,r[e],u,h),c?(f.push(h),s=!0):f.push(0)):t.isPlainJsonObject(r[e])?(f.push(0),t.replaceClientObjectPropertiesWithObjectPathIds(r[e],u)):f.push(0);return s},t.replaceClientObjectPropertiesWithObjectPathIds=function(i,r){var e,u,f,o,s,h;for(e in i)if(u=i[e],u instanceof n.ClientObject)r.push(u._objectPath),i[e]=(s={},s[n.Constants.objectPathIdPrivate]=u._objectPath.objectPathInfo.Id,s);else if(Array.isArray(u))for(f=0;f<u.length;f++)u[f]instanceof n.ClientObject?(o=u[f],r.push(o._objectPath),u[f]=(h={},h[n.Constants.objectPathIdPrivate]=o._objectPath.objectPathInfo.Id,h)):t.isPlainJsonObject(u[f])&&t.replaceClientObjectPropertiesWithObjectPathIds(u[f],r);else t.isPlainJsonObject(u)&&t.replaceClientObjectPropertiesWithObjectPathIds(u,r)},t.fixObjectPathIfNecessary=function(n,t){n&&n._objectPath&&t&&n._objectPath.updateUsingObjectData(t,n)},t.tryGetObjectIdFromLoadOrRetrieveResult=function(i){var r=i[n.Constants.id];return t.isNullOrUndefined(r)&&(r=i[n.Constants.idLowerCase]),t.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),r},t.validateObjectPath=function(i){for(var r=i._objectPath;r;){if(!r.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:t._getResourceString(n.ResourceStrings.invalidObjectPath,t.getObjectPathExpression(r)),debugInfo:{errorLocation:t.getObjectPathExpression(r)}});r=r.parentObjectPath}},t.validateReferencedObjectPaths=function(i){var u,r;if(i)for(u=0;u<i.length;u++)for(r=i[u];r;){if(!r.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:t._getResourceString(n.ResourceStrings.invalidObjectPath,t.getObjectPathExpression(r))});r=r.parentObjectPath}},t.validateContext=function(i,r){if(r&&r.context!==i)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidRequestContext,message:t._getResourceString(n.ResourceStrings.invalidRequestContext)});},t.log=function(n){t._logEnabled&&typeof console!="undefined"&&console.log&&console.log(n)},t.load=function(n,t){return n.context.load(n,t),n},t.loadAndSync=function(n,t){return n.context.load(n,t),n.context.sync().then(function(){return n})},t.retrieve=function(i,r){var u=n._internalConfig.alwaysPolyfillClientObjectRetrieveMethod,f,e,o;return u||(u=!t.isSetSupported("RichApiRuntime","1.1")),f=new n.RetrieveResultImpl(i,u),e=n.ClientRequestContext._parseQueryOption(r),o=u?n.ActionFactory.createQueryAction(i.context,i,e):n.ActionFactory.createQueryAsJsonAction(i.context,i,e),i.context._pendingRequest.addActionResultHandler(o,f),f},t.retrieveAndSync=function(n,i){var r=t.retrieve(n,i);return n.context.sync().then(function(){return r})},t.isSetSupported=function(n,t){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported(n,t):!0},t._parseSelectExpand=function(n){function e(n){var t=n.toLowerCase(),i,r;return t==="items"||t==="items/"?"*":(i=6,r=t.substr(0,i)==="items/"||t.substr(0,i)==="items.",r&&(n=n.substr(i)),n.replace(new RegExp("[/.]items[/.]","gi"),"/"))}var f=[],u,r,i;if(!t.isNullOrEmptyString(n))for(u=n.split(","),r=0;r<u.length;r++)i=u[r],i=e(i.trim()),i.length>0&&f.push(i);return f},t.toJson=function(n,i,r,u){var o={},e,f;for(e in i)f=i[e],typeof f!="undefined"&&(o[e]=f);for(e in r)f=r[e],typeof f!="undefined"&&(o[e]=f[t.fieldName_isCollection]&&typeof f[t.fieldName_m__items]!="undefined"?f.toJSON().items:f.toJSON());return u&&(o.items=u.map(function(n){return n.toJSON()})),o},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r<i.length)return i[r];else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"format"});})},t.throwIfNotLoaded=function(n,i,r,u){if(!u&&t.isUndefined(i)&&n.charCodeAt(0)!=t.s_underscoreCharCode)throw t.createPropertyNotLoadedException(r,n);},t.createPropertyNotLoadedException=function(i,r){return new n._Internal.RuntimeError({code:n.ErrorCodes.propertyNotLoaded,message:t._getResourceString(n.ResourceStrings.propertyNotLoaded,r),debugInfo:i?{errorLocation:i+"."+r}:undefined})},t.createCannotUpdateReadOnlyPropertyException=function(i,r){return new n._Internal.RuntimeError({code:n.ErrorCodes.cannotUpdateReadOnlyProperty,message:t._getResourceString(n.ResourceStrings.cannotUpdateReadOnlyProperty,r),debugInfo:i?{errorLocation:i+"."+r}:undefined})},t.throwIfApiNotSupported=function(i,r,u,f){if(t._doApiNotSupportedCheck&&!t.isSetSupported(r,u)){var e=t._getResourceString(n.ResourceStrings.apiNotFoundDetails,[i,r+" "+u,f]);throw new n._Internal.RuntimeError({code:n.ErrorCodes.apiNotFound,message:e,debugInfo:{errorLocation:i}});}},t.getObjectPathExpression=function(n){for(var i="";n;){switch(n.objectPathInfo.ObjectPathType){case 1:i=i;break;case 2:i="new()"+(i.length>0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n.CoreUtility.Promise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n.CoreUtility.Promise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n.CoreUtility.Promise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u<r.length-1;u+=2)t.isUndefined(i[r[u+1]])||n[r[u]]._handleResult(i[r[u+1]])},t.normalizeName=function(n){return n.substr(0,1).toLowerCase()+n.substr(1)},t._isLocalDocumentUrl=function(n){return t._getLocalDocumentUrlPrefixLength(n)>0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t<i.length;t++)if(r===i[t])return i[t].length;else if(r.substr(0,i[t].length+1)===i[t]+"/")return i[t].length+1;return 0},t._validateLocalDocumentRequest=function(i){var f=t._getLocalDocumentUrlPrefixLength(i.url),r,u;if(f<=0)throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});return r=i.url.substr(f),u=r.toLowerCase(),u==="_api"?r="":u.substr(0,5)==="_api/"&&(r=r.substr(5)),{method:i.method,url:r,headers:i.headers,body:i.body}},t._buildRequestMessageSafeArray=function(i){var r=0,f,s,e,u,o,h;if(t.isReadonlyRestRequest(i.method)||(r=1),i.url.substr(0,n.Constants.processQuery.length).toLowerCase()===n.Constants.processQuery.toLowerCase()&&(f=i.url.indexOf("?"),f>0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u<e.length;u++)if(o=e[u].split("="),o[0].toLowerCase()===n.Constants.flags){h=parseInt(o[1]);r=h;r=r&1;break}return n.RichApiMessageUtility.buildRequestMessageSafeArray("",r,i.method,i.url,i.headers,i.body)},t._parseHttpResponseHeaders=function(n){var s={},h,o,r,i,u,f,e;if(!t.isNullOrEmptyString(n))for(h=new RegExp("\r?\n"),o=n.split(h),r=0;r<o.length;r++)i=o[r],i!=null&&(u=i.indexOf(":"),u>0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i<n.length&&n.charCodeAt(i)>=65&&n.charCodeAt(i)<=90;)i++;return i<n.length?n.substr(0,i).toLowerCase()+n.substr(i):n.toLowerCase()},t._fixupApiFlags=function(n){return typeof n=="boolean"&&(n=n?1:0),n},t.definePropertyThrowUnloadedException=function(n,i,r){Object.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){throw t.createPropertyNotLoadedException(i,r);},set:function(){throw t.createCannotUpdateReadOnlyPropertyException(i,r);}})},t.defineReadOnlyPropertyWithValue=function(n,i,r){Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return r},set:function(){throw t.createCannotUpdateReadOnlyPropertyException(null,i);}})},t.processRetrieveResult=function(i,r,u,f){var c,a,v,l,e,o,h,w,s;if(!t.isNullOrUndefined(r))if(f){if(c=r[n.Constants.itemsLowerCase],Array.isArray(c)){for(a=[],e=0;e<c.length;e++)v=f(c[e],e),l={},l[n.Constants.proxy]=v,v._handleRetrieveResult(c[e],l),a.push(l);t.defineReadOnlyPropertyWithValue(u,n.Constants.itemsLowerCase,a)}}else{var y=i[n.Constants.scalarPropertyNames],p=i[n.Constants.navigationPropertyNames],b=i[n.Constants.className];if(y)for(e=0;e<y.length;e++)o=y[e],h=r[o],t.isUndefined(h)?t.definePropertyThrowUnloadedException(u,b,o):t.defineReadOnlyPropertyWithValue(u,o,h);if(p)for(e=0;e<p.length;e++)o=p[e],h=r[o],t.isUndefined(h)?t.definePropertyThrowUnloadedException(u,b,o):(w=i[o],s={},w._handleRetrieveResult(h,s),s[n.Constants.proxy]=w,Array.isArray(s[n.Constants.itemsLowerCase])&&(s=s[n.Constants.itemsLowerCase]),t.defineReadOnlyPropertyWithValue(u,o,s))}},t.fieldName_m__items="m__items",t.fieldName_isCollection="_isCollection",t._logEnabled=!1,t._synchronousCleanup=!1,t._doApiNotSupportedCheck=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var c="OfficeCore",l="AgaveVisualApi",a=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,v=OfficeExtension.ObjectPathFactory.createMethodObjectPath,y=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,i=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,p=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,w=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,b=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,t=OfficeExtension.ActionFactory.createMethodAction,k=OfficeExtension.ActionFactory.createEnsureUnchangedAction,d=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,g=OfficeExtension.Utility.isUndefined,nt=OfficeExtension.Utility.throwIfNotLoaded,tt=OfficeExtension.Utility.throwIfApiNotSupported,it=OfficeExtension.Utility.load,rt=OfficeExtension.Utility.retrieve,u=OfficeExtension.Utility.toJson,f=OfficeExtension.Utility.fixObjectPathIfNecessary,e=OfficeExtension.Utility._addActionResultHandler,ut=OfficeExtension.Utility._handleNavigationPropertyResults,ft=OfficeExtension.Utility.adjustToDateTime,o=OfficeExtension.Utility.processRetrieveResult,et="BiShim",s=function(s){function h(){return s!==null&&s.apply(this,arguments)||this}return __extends(h,s),Object.defineProperty(h.prototype,"_className",{get:function(){return"BiShim"},enumerable:!0,configurable:!0}),h.prototype.initialize=function(n){t(this.context,this,"Initialize",0,[n],0)},h.prototype.getData=function(){var i=t(this.context,this,"getData",1,[],4),n=new OfficeExtension.ClientResult;return e(this,i,n),n},h.prototype.setVisualObjects=function(n){t(this.context,this,"setVisualObjects",0,[n],2)},h.prototype.setVisualObjectsToPersist=function(n){t(this.context,this,"setVisualObjectsToPersist",0,[n],2)},h.prototype._handleResult=function(n){if(s.prototype._handleResult.call(this,n),!r(n)){var t=n;f(this,t)}},h.prototype._handleRetrieveResult=function(n,t){s.prototype._handleRetrieveResult.call(this,n,t);o(this,n,t)},h.newObject=function(t){return new n.BiShim(t,i(t,"Microsoft.AgaveVisual.BiShim",!1,4))},h.prototype.toJSON=function(){return u(this,{},{})},h}(OfficeExtension.ClientObject),h;n.BiShim=s,function(n){n.generalException="GeneralException"}(h=n.AgaveVisualErrorCodes||(n.AgaveVisualErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){var y="OfficeCore",p="ExperimentApi",w=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,i=OfficeExtension.ObjectPathFactory.createMethodObjectPath,b=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,o=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,k=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,d=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,g=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,t=OfficeExtension.ActionFactory.createMethodAction,nt=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,s=OfficeExtension.Utility.isUndefined,h=OfficeExtension.Utility.throwIfNotLoaded,tt=OfficeExtension.Utility.throwIfApiNotSupported,c=OfficeExtension.Utility.load,u=OfficeExtension.Utility.fixObjectPathIfNecessary,f=OfficeExtension.Utility._addActionResultHandler,it=OfficeExtension.Utility._handleNavigationPropertyResults,rt=OfficeExtension.Utility.adjustToDateTime,l=function(e){function s(){return e!==null&&e.apply(this,arguments)||this}return __extends(s,e),Object.defineProperty(s.prototype,"_className",{get:function(){return"FlightingService"},enumerable:!0,configurable:!0}),s.prototype.getClientSessionId=function(){var i=t(this.context,this,"GetClientSessionId",1,[]),n=new OfficeExtension.ClientResult;return f(this,i,n),n},s.prototype.getDeferredFlights=function(){var i=t(this.context,this,"GetDeferredFlights",1,[]),n=new OfficeExtension.ClientResult;return f(this,i,n),n},s.prototype.getFeature=function(t,r,u,f){return new n.ABType(this.context,i(this.context,this,"GetFeature",1,[t,r,u,f],!1,!1,null))},s.prototype.getFeatureGate=function(t,r){return new n.ABType(this.context,i(this.context,this,"GetFeatureGate",1,[t,r],!1,!1,null))},s.prototype.resetOverride=function(n){t(this.context,this,"ResetOverride",0,[n])},s.prototype.setOverride=function(n,i,r){t(this.context,this,"SetOverride",0,[n,i,r])},s.prototype._handleResult=function(n){if(e.prototype._handleResult.call(this,n),!r(n)){var t=n;u(this,t)}},s.newObject=function(t){return new n.FlightingService(t,o(t,"Microsoft.Experiment.FlightingService",!1))},s.prototype.toJSON=function(){return{}},s}(OfficeExtension.ClientObject),e,a,v;n.FlightingService=l;e=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"ABType"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return h("value",this.m_value,"ABType",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!r(t)){var i=t;u(this,i);s(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{value:this.m_value}},t}(OfficeExtension.ClientObject);n.ABType=e,function(n){n.boolean="Boolean";n.integer="Integer";n.string="String"}(a=n.FeatureType||(n.FeatureType={})),function(n){n.generalException="GeneralException"}(v=n.ExperimentErrorCodes||(n.ExperimentErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){function r(t,i){return OfficeExtension.ClientRequestContext._runBatch("OfficeCore.run",arguments,function(t){return new n.RequestContext(t)})}var t=function(){function t(n){this.context=n}return Object.defineProperty(t.prototype,"authentication",{get:function(){return this.m_authentication||(this.m_authentication=n.AuthenticationService.newObject(this.context)),this.m_authentication},enumerable:!0,configurable:!0}),t}(),i;n.FirstPartyApis=t;i=function(i){function r(n){return i.call(this,n)||this}return __extends(r,i),Object.defineProperty(r.prototype,"firstParty",{get:function(){return this.m_firstPartyApis||(this.m_firstPartyApis=new t(this)),this.m_firstPartyApis},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"flighting",{get:function(){return this.flightingService},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"telemetry",{get:function(){return this.m_telemetry||(this.m_telemetry=n.TelemetryService.newObject(this)),this.m_telemetry},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bi",{get:function(){return this.m_biShim||(this.m_biShim=n.BiShim.newObject(this)),this.m_biShim},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"flightingService",{get:function(){return this.m_flightingService||(this.m_flightingService=n.FlightingService.newObject(this)),this.m_flightingService},enumerable:!0,configurable:!0}),r}(OfficeExtension.ClientRequestContext);n.RequestContext=i;n.run=r}(OfficeCore||(OfficeCore={})),function(n){var o="OfficeCore",s="TelemetryApi",h=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,c=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,t=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,y=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,i=OfficeExtension.ActionFactory.createMethodAction,p=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,w=OfficeExtension.Utility.isUndefined,b=OfficeExtension.Utility.throwIfNotLoaded,k=OfficeExtension.Utility.throwIfApiNotSupported,d=OfficeExtension.Utility.load,u=OfficeExtension.Utility.fixObjectPathIfNecessary,g=OfficeExtension.Utility._addActionResultHandler,nt=OfficeExtension.Utility._handleNavigationPropertyResults,tt=OfficeExtension.Utility.adjustToDateTime,it="TelemetryService",f=function(f){function e(){return f!==null&&f.apply(this,arguments)||this}return __extends(e,f),Object.defineProperty(e.prototype,"_className",{get:function(){return"TelemetryService"},enumerable:!0,configurable:!0}),e.prototype.sendTelemetryEvent=function(n,t,r,u,f){i(this.context,this,"SendTelemetryEvent",1,[n,t,r,u,f],!1)},e.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var t=n;u(this,t)}},e.newObject=function(i){return new n.TelemetryService(i,t(i,"Microsoft.Telemetry.TelemetryService",!1,!1))},e.prototype.toJSON=function(){return{}},e}(OfficeExtension.ClientObject),e;n.TelemetryService=f,function(n){n.generalException="GeneralException"}(e=n.TelemetryErrorCodes||(n.TelemetryErrorCodes={}))}(OfficeCore||(OfficeCore={})),function(n){function t(n){var t=new OfficeCore.RequestContext,r=OfficeCore.AuthenticationService.newObject(t),i;return t._customData="WacPartition",i=new OfficeExtension.Promise(function(i,u){var f=r.getAccessToken(n);t.sync().then(function(){i(f)}).catch(function(n){throw n;})}),i.then(function(n){return new OfficeExtension.Promise(function(t,i){t(n)})})}function i(){var n=new OfficeCore.RequestContext,i=OfficeCore.AuthenticationService.newObject(n),t;return n._customData="WacPartition",t=new OfficeExtension.Promise(function(t,r){var u=i.getPrimaryIdentityInfo();n.sync().then(function(){t(u)}).catch(function(n){throw n;})}),t.then(function(n){return new OfficeExtension.Promise(function(t,i){t(n)})})}n.getAccessToken=t;n.getPrimaryIdentityInfo=i}(OfficeFirstPartyAuth||(OfficeFirstPartyAuth={})),function(n){var nt="Office",ct="OfficeSharedApi",o=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,l=OfficeExtension.ObjectPathFactory.createMethodObjectPath,tt=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,it=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,lt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,at=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,rt=OfficeExtension.ActionFactory.createEnsureUnchangedAction,v=OfficeExtension.ActionFactory.createSetPropertyAction,f=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,ut=OfficeExtension.Utility.throwIfApiNotSupported,y=OfficeExtension.Utility.load,p=OfficeExtension.Utility.retrieve,s=OfficeExtension.Utility.toJson,h=OfficeExtension.Utility.fixObjectPathIfNecessary,e=OfficeExtension.Utility._addActionResultHandler,ft=OfficeExtension.Utility._handleNavigationPropertyResults,w=OfficeExtension.Utility.adjustToDateTime,c=OfficeExtension.Utility.processRetrieveResult,et,ot,b,r,k,d,g,st,ht;(function(n){n.organizationAccount="OrganizationAccount";n.microsoftAccount="MicrosoftAccount"})(et=n.IdentityType||(n.IdentityType={}));ot="AuthenticationService";b=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_className",{get:function(){return"AuthenticationService"},enumerable:!0,configurable:!0}),i.prototype.getAccessToken=function(n){var i=u(this.context,this,"GetAccessToken",1,[n],!0),t=new OfficeExtension.ClientResult;return e(this,i,t),t},i.prototype.getPrimaryIdentityInfo=function(){ut("AuthenticationService.getPrimaryIdentityInfo","FirstPartyAuthentication","1.2",nt);var t=u(this.context,this,"GetPrimaryIdentityInfo",1,[],!0),n=new OfficeExtension.ClientResult;return e(this,t,n),n},i.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!f(n)){var i=n;h(this,i)}},i.prototype._handleRetrieveResult=function(n,i){t.prototype._handleRetrieveResult.call(this,n,i);c(this,n,i)},i.newObject=function(t){return new n.AuthenticationService(t,it(t,"Microsoft.Authentication.AuthenticationService",!1,!1))},i.prototype.toJSON=function(){return s(this,{},{})},i}(OfficeExtension.ClientObject);n.AuthenticationService=b;r="Comment";k=function(a){function b(){return a!==null&&a.apply(this,arguments)||this}return __extends(b,a),Object.defineProperty(b.prototype,"_className",{get:function(){return"Comment"},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"_scalarPropertyNames",{get:function(){return["id","text","created","level","resolved","author","mentions"]},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!1,!1,!0,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"_navigationPropertyNames",{get:function(){return["parent","parentOrNullObject","replies"]},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"parent",{get:function(){return this._P||(this._P=new n.Comment(this.context,o(this.context,this,"Parent",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"parentOrNullObject",{get:function(){return this._Pa||(this._Pa=new n.Comment(this.context,o(this.context,this,"ParentOrNullObject",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"replies",{get:function(){return this._R||(this._R=new n.CommentCollection(this.context,o(this.context,this,"Replies",!0,!1,!1))),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"author",{get:function(){return i("author",this._A,r,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"created",{get:function(){return i("created",this._C,r,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"id",{get:function(){return i("id",this._I,r,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"level",{get:function(){return i("level",this._L,r,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"mentions",{get:function(){return i("mentions",this._M,r,this._isNull),this._M},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"resolved",{get:function(){return i("resolved",this._Re,r,this._isNull),this._Re},set:function(n){this._Re=n;v(this.context,this,"Resolved",n)},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"text",{get:function(){return i("text",this._T,r,this._isNull),this._T},set:function(n){this._T=n;v(this.context,this,"Text",n)},enumerable:!0,configurable:!0}),b.prototype.set=function(n,t){this._recursivelySet(n,t,["text","resolved"],[],["parent","parentOrNullObject","replies"])},b.prototype.update=function(n){this._recursivelyUpdate(n)},b.prototype.delete=function(){u(this.context,this,"Delete",0,[],!1)},b.prototype.getParentOrSelf=function(){return new n.Comment(this.context,l(this.context,this,"GetParentOrSelf",1,[],!1,!1,null,!1))},b.prototype.getRichText=function(n){var i=u(this.context,this,"GetRichText",1,[n],!1),t=new OfficeExtension.ClientResult;return e(this,i,t),t},b.prototype.reply=function(t,i){return new n.Comment(this.context,l(this.context,this,"Reply",0,[t,i],!1,!1,null,!1))},b.prototype.setRichText=function(n,t){var r=u(this.context,this,"SetRichText",0,[n,t],!1),i=new OfficeExtension.ClientResult;return e(this,r,i),i},b.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!f(n)){var i=n;h(this,i);t(i.Author)||(this._A=i.Author);t(i.Created)||(this._C=w(i.Created));t(i.Id)||(this._I=i.Id);t(i.Level)||(this._L=i.Level);t(i.Mentions)||(this._M=i.Mentions);t(i.Resolved)||(this._Re=i.Resolved);t(i.Text)||(this._T=i.Text);ft(this,i,["parent","Parent","parentOrNullObject","ParentOrNullObject","replies","Replies"])}},b.prototype.load=function(n){return y(this,n)},b.prototype.retrieve=function(n){return p(this,n)},b.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),f(n))||t(n.Id)||(this._I=n.Id)},b.prototype._handleRetrieveResult=function(n,i){if(a.prototype._handleRetrieveResult.call(this,n,i),!f(n)){var r=n;t(r.Created)||(r.created=w(r.created));c(this,n,i)}},b.prototype.toJSON=function(){return s(this,{author:this._A,created:this._C,id:this._I,level:this._L,mentions:this._M,resolved:this._Re,text:this._T},{replies:this._R})},b.prototype.ensureUnchanged=function(n){rt(this.context,this,n);return},b}(OfficeExtension.ClientObject);n.Comment=k;d="CommentCollection";g=function(t){function r(){return t!==null&&t.apply(this,arguments)||this}return __extends(r,t),Object.defineProperty(r.prototype,"_className",{get:function(){return"CommentCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"items",{get:function(){return i("items",this.m__items,d,this._isNull),this.m__items},enumerable:!0,configurable:!0}),r.prototype.getCount=function(){var t=u(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return e(this,t,n),n},r.prototype.getItem=function(t){return new n.Comment(this.context,tt(this.context,this,[t]))},r.prototype._handleResult=function(i){var u,e,r,o;if((t.prototype._handleResult.call(this,i),!f(i))&&(u=i,h(this,u),!f(u[OfficeExtension.Constants.items])))for(this.m__items=[],e=u[OfficeExtension.Constants.items],r=0;r<e.length;r++)o=new n.Comment(this.context,a(!0,this.context,this,e[r],r)),o._handleResult(e[r]),this.m__items.push(o)},r.prototype.load=function(n){return y(this,n)},r.prototype.retrieve=function(n){return p(this,n)},r.prototype._handleRetrieveResult=function(i,r){var u=this;t.prototype._handleRetrieveResult.call(this,i,r);c(this,i,r,function(t,i){return new n.Comment(u.context,a(!0,u.context,u,t,i))})},r.prototype.toJSON=function(){return s(this,{},{},this.m__items)},r}(OfficeExtension.ClientObject);n.CommentCollection=g,function(n){n.plain="Plain";n.markdown="Markdown";n.delta="Delta"}(st=n.CommentTextFormat||(n.CommentTextFormat={})),function(n){n.apiNotAvailable="ApiNotAvailable";n.clientError="ClientError";n.invalidArgument="InvalidArgument";n.invalidGrant="InvalidGrant";n.invalidResourceUrl="InvalidResourceUrl";n.serverError="ServerError";n.unsupportedUserIdentity="UnsupportedUserIdentity";n.userNotSignedIn="UserNotSignedIn"}(ht=n.ErrorCodes||(n.ErrorCodes={}))}(OfficeCore||(OfficeCore={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){function ct(t,i){var u,r;if(OfficeExtension.Utility.isNullOrUndefined(i))return null;if(typeof i!="object"&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions"),i instanceof n.SearchOptions)return i;u=n.SearchOptions.newObject(t);for(r in i)i.hasOwnProperty(r)&&(u[r]=i[r]);return u}var u="Word",e="WordApi",h=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,r=OfficeExtension.ObjectPathFactory.createMethodObjectPath,et=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,hi=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,nf=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,tf=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,b=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,o=OfficeExtension.ActionFactory.createMethodAction,nt=OfficeExtension.ActionFactory.createEnsureUnchangedAction,s=OfficeExtension.ActionFactory.createSetPropertyAction,c=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,f=OfficeExtension.Utility.throwIfApiNotSupported,y=OfficeExtension.Utility.load,p=OfficeExtension.Utility.retrieve,l=OfficeExtension.Utility.toJson,a=OfficeExtension.Utility.fixObjectPathIfNecessary,w=OfficeExtension.Utility._addActionResultHandler,it=OfficeExtension.Utility._handleNavigationPropertyResults,lt=OfficeExtension.Utility.adjustToDateTime,v=OfficeExtension.Utility.processRetrieveResult,rf="Application",br=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),i.prototype.createDocument=function(t){return new n.DocumentCreated(this.context,r(this.context,this,"CreateDocument",1,[t],!1,!1,null,!1))},i.prototype.getEnterpriseUserInfo=function(){var t=o(this.context,this,"GetEnterpriseUserInfo",1,[],!0),n=new OfficeExtension.ClientResult;return w(this,t,n),n},i.prototype.getMruFriendlyPath=function(n){var i=o(this.context,this,"GetMruFriendlyPath",1,[n],!0),t=new OfficeExtension.ClientResult;return w(this,i,t),t},i.prototype.getSharePointTenantRoot=function(){var t=o(this.context,this,"GetSharePointTenantRoot",1,[],!0),n=new OfficeExtension.ClientResult;return w(this,t,n),n},i.prototype.isTapEnabled=function(){var t=o(this.context,this,"IsTapEnabled",1,[],!0),n=new OfficeExtension.ClientResult;return w(this,t,n),n},i.prototype.launchFileUrlInOfficeApp=function(n,t){var r=o(this.context,this,"LaunchFileUrlInOfficeApp",1,[n,t],!0),i=new OfficeExtension.ClientResult;return w(this,r,i),i},i.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i)}},i.prototype._handleRetrieveResult=function(n,i){t.prototype._handleRetrieveResult.call(this,n,i);v(this,n,i)},i.newObject=function(t){return new n.Application(t,hi(t,"Microsoft.WordServices.Application",!1,!1))},i.prototype.toJSON=function(){return l(this,{},{})},i}(OfficeExtension.ClientObject),at,ci,tt,li,kt,ai,vt,vi,dt,yi,bt,pi,gt,wi,d,bi,rt,ki,ot,di,ni,gi,yt,nr,ti,tr,pt,ir,g,rr,ii,ur,st,fr,ri,er,ht,or,ui,sr,fi,hr,k,cr,ei,lr,ut,ar,oi,vr,ft,yr,si,pr,wt,wr,kr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu,pu,wu,bu,ku,du,gu;n.Application=br;at="Body";ci=function(b){function k(){return b!==null&&b.apply(this,arguments)||this}return __extends(k,b),Object.defineProperty(k.prototype,"_className",{get:function(){return"Body"},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","style","text","type","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_navigationPropertyNames",{get:function(){return["paragraphs","contentControls","parentContentControl","font","inlinePictures","parentBody","lists","tables","parentSection","parentContentControlOrNullObject","parentBodyOrNullObject","parentSectionOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"contentControls",{get:function(){return this._C||(this._C=new n.ContentControlCollection(this.context,h(this.context,this,"ContentControls",!0,!1,!1))),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"font",{get:function(){return this._F||(this._F=new n.Font(this.context,h(this.context,this,"Font",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"inlinePictures",{get:function(){return this._I||(this._I=new n.InlinePictureCollection(this.context,h(this.context,this,"InlinePictures",!0,!1,!1))),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lists",{get:function(){return f("Body.lists",e,"1.3",u),this._L||(this._L=new n.ListCollection(this.context,h(this.context,this,"Lists",!0,!1,!1))),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"paragraphs",{get:function(){return this._P||(this._P=new n.ParagraphCollection(this.context,h(this.context,this,"Paragraphs",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentBody",{get:function(){return f("Body.parentBody",e,"1.3",u),this._Pa||(this._Pa=new n.Body(this.context,h(this.context,this,"ParentBody",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentBodyOrNullObject",{get:function(){return f("Body.parentBodyOrNullObject",e,"1.3",u),this._Par||(this._Par=new n.Body(this.context,h(this.context,this,"ParentBodyOrNullObject",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControl",{get:function(){return this._Pare||(this._Pare=new n.ContentControl(this.context,h(this.context,this,"ParentContentControl",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControlOrNullObject",{get:function(){return f("Body.parentContentControlOrNullObject",e,"1.3",u),this._Paren||(this._Paren=new n.ContentControl(this.context,h(this.context,this,"ParentContentControlOrNullObject",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentSection",{get:function(){return f("Body.parentSection",e,"1.3",u),this._Parent||(this._Parent=new n.Section(this.context,h(this.context,this,"ParentSection",!1,!1,!1))),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentSectionOrNullObject",{get:function(){return f("Body.parentSectionOrNullObject",e,"1.3",u),this._ParentS||(this._ParentS=new n.Section(this.context,h(this.context,this,"ParentSectionOrNullObject",!1,!1,!1))),this._ParentS},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"tables",{get:function(){return f("Body.tables",e,"1.3",u),this._T||(this._T=new n.TableCollection(this.context,h(this.context,this,"Tables",!0,!1,!1))),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"style",{get:function(){return i("style",this._S,at,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this._St,at,this._isNull),f("Body.styleBuiltIn",e,"1.3",u),this._St},set:function(n){this._St=n;s(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return i("text",this._Te,at,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"type",{get:function(){return i("type",this._Ty,at,this._isNull),f("Body.type",e,"1.3",u),this._Ty},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,at,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.clear=function(){o(this.context,this,"Clear",0,[],!1)},k.prototype.getHtml=function(){var t=o(this.context,this,"GetHtml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getOoxml=function(){var t=o(this.context,this,"GetOoxml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getRange=function(t){return f("Body.getRange",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null,!1))},k.prototype.insertBreak=function(n,t){o(this.context,this,"InsertBreak",0,[n,t],!1)},k.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null,!1))},k.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null,!1))},k.prototype.insertInlinePictureFromBase64=function(t,i){return f("Body.insertInlinePictureFromBase64",e,"1.2",u),new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null,!1))},k.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},k.prototype.insertTable=function(t,i,o,s){return f("Body.insertTable",e,"1.3",u),new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,o,s],!1,!0,null,!1))},k.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null,!1))},k.prototype.search=function(t,i){return i=ct(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null,!1))},k.prototype.select=function(n){o(this.context,this,"Select",1,[n],!1)},k.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},k.prototype._handleResult=function(n){if(b.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Style)||(this._S=i.Style);t(i.StyleBuiltIn)||(this._St=i.StyleBuiltIn);t(i.Text)||(this._Te=i.Text);t(i.Type)||(this._Ty=i.Type);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentBodyOrNullObject","ParentBodyOrNullObject","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentSection","ParentSection","parentSectionOrNullObject","ParentSectionOrNullObject","tables","Tables"])}},k.prototype.load=function(n){return y(this,n)},k.prototype.retrieve=function(n){return p(this,n)},k.prototype._handleIdResult=function(n){(b.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){b.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return l(this,{style:this._S,styleBuiltIn:this._St,text:this._Te,type:this._Ty},{contentControls:this._C,font:this._F,inlinePictures:this._I,lists:this._L,paragraphs:this._P,tables:this._T})},k.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Body=ci;tt="ContentControl";li=function(b){function k(){return b!==null&&b.apply(this,arguments)||this}return __extends(k,b),Object.defineProperty(k.prototype,"_className",{get:function(){return"ContentControl"},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyNames",{get:function(){return["id","_ReferenceId","title","tag","placeholderText","type","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","text","subtype","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_navigationPropertyNames",{get:function(){return["font","paragraphs","contentControls","parentContentControl","inlinePictures","lists","tables","parentTableCell","parentTable","parentBody","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"contentControls",{get:function(){return this._Con||(this._Con=new n.ContentControlCollection(this.context,h(this.context,this,"ContentControls",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"font",{get:function(){return this._F||(this._F=new n.Font(this.context,h(this.context,this,"Font",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"inlinePictures",{get:function(){return this._In||(this._In=new n.InlinePictureCollection(this.context,h(this.context,this,"InlinePictures",!0,!1,!1))),this._In},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lists",{get:function(){return f("ContentControl.lists",e,"1.3",u),this._L||(this._L=new n.ListCollection(this.context,h(this.context,this,"Lists",!0,!1,!1))),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"paragraphs",{get:function(){return this._P||(this._P=new n.ParagraphCollection(this.context,h(this.context,this,"Paragraphs",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentBody",{get:function(){return f("ContentControl.parentBody",e,"1.3",u),this._Pa||(this._Pa=new n.Body(this.context,h(this.context,this,"ParentBody",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControl",{get:function(){return this._Par||(this._Par=new n.ContentControl(this.context,h(this.context,this,"ParentContentControl",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControlOrNullObject",{get:function(){return f("ContentControl.parentContentControlOrNullObject",e,"1.3",u),this._Pare||(this._Pare=new n.ContentControl(this.context,h(this.context,this,"ParentContentControlOrNullObject",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTable",{get:function(){return f("ContentControl.parentTable",e,"1.3",u),this._Paren||(this._Paren=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCell",{get:function(){return f("ContentControl.parentTableCell",e,"1.3",u),this._Parent||(this._Parent=new n.TableCell(this.context,h(this.context,this,"ParentTableCell",!1,!1,!1))),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCellOrNullObject",{get:function(){return f("ContentControl.parentTableCellOrNullObject",e,"1.3",u),this._ParentT||(this._ParentT=new n.TableCell(this.context,h(this.context,this,"ParentTableCellOrNullObject",!1,!1,!1))),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableOrNullObject",{get:function(){return f("ContentControl.parentTableOrNullObject",e,"1.3",u),this._ParentTa||(this._ParentTa=new n.Table(this.context,h(this.context,this,"ParentTableOrNullObject",!1,!1,!1))),this._ParentTa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"tables",{get:function(){return f("ContentControl.tables",e,"1.3",u),this._T||(this._T=new n.TableCollection(this.context,h(this.context,this,"Tables",!0,!1,!1))),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"appearance",{get:function(){return i("appearance",this._A,tt,this._isNull),this._A},set:function(n){this._A=n;s(this.context,this,"Appearance",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cannotDelete",{get:function(){return i("cannotDelete",this._C,tt,this._isNull),this._C},set:function(n){this._C=n;s(this.context,this,"CannotDelete",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cannotEdit",{get:function(){return i("cannotEdit",this._Ca,tt,this._isNull),this._Ca},set:function(n){this._Ca=n;s(this.context,this,"CannotEdit",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"color",{get:function(){return i("color",this._Co,tt,this._isNull),this._Co},set:function(n){this._Co=n;s(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"id",{get:function(){return i("id",this._I,tt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"placeholderText",{get:function(){return i("placeholderText",this._Pl,tt,this._isNull),this._Pl},set:function(n){this._Pl=n;s(this.context,this,"PlaceholderText",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"removeWhenEdited",{get:function(){return i("removeWhenEdited",this._R,tt,this._isNull),this._R},set:function(n){this._R=n;s(this.context,this,"RemoveWhenEdited",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"style",{get:function(){return i("style",this._S,tt,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this._St,tt,this._isNull),f("ContentControl.styleBuiltIn",e,"1.3",u),this._St},set:function(n){this._St=n;s(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"subtype",{get:function(){return i("subtype",this._Su,tt,this._isNull),f("ContentControl.subtype",e,"1.3",u),this._Su},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"tag",{get:function(){return i("tag",this._Ta,tt,this._isNull),this._Ta},set:function(n){this._Ta=n;s(this.context,this,"Tag",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return i("text",this._Te,tt,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"title",{get:function(){return i("title",this._Ti,tt,this._isNull),this._Ti},set:function(n){this._Ti=n;s(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"type",{get:function(){return i("type",this._Ty,tt,this._isNull),this._Ty},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,tt,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["title","tag","placeholderText","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.clear=function(){o(this.context,this,"Clear",0,[],!1)},k.prototype.delete=function(n){o(this.context,this,"Delete",0,[n],!1)},k.prototype.getHtml=function(){var t=o(this.context,this,"GetHtml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getOoxml=function(){var t=o(this.context,this,"GetOoxml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getRange=function(t){return f("ContentControl.getRange",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null,!1))},k.prototype.getTextRanges=function(t,i){return f("ContentControl.getTextRanges",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null,!1))},k.prototype.insertBreak=function(n,t){o(this.context,this,"InsertBreak",0,[n,t],!1)},k.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null,!1))},k.prototype.insertInlinePictureFromBase64=function(t,i){return f("ContentControl.insertInlinePictureFromBase64",e,"1.2",u),new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null,!1))},k.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},k.prototype.insertTable=function(t,i,o,s){return f("ContentControl.insertTable",e,"1.3",u),new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,o,s],!1,!0,null,!1))},k.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null,!1))},k.prototype.search=function(t,i){return i=ct(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null,!1))},k.prototype.select=function(n){o(this.context,this,"Select",1,[n],!1)},k.prototype.split=function(t,i,o,s){return f("ContentControl.split",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,o,s],!0,!1,null,!1))},k.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},k.prototype._handleResult=function(n){if(b.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Appearance)||(this._A=i.Appearance);t(i.CannotDelete)||(this._C=i.CannotDelete);t(i.CannotEdit)||(this._Ca=i.CannotEdit);t(i.Color)||(this._Co=i.Color);t(i.Id)||(this._I=i.Id);t(i.PlaceholderText)||(this._Pl=i.PlaceholderText);t(i.RemoveWhenEdited)||(this._R=i.RemoveWhenEdited);t(i.Style)||(this._S=i.Style);t(i.StyleBuiltIn)||(this._St=i.StyleBuiltIn);t(i.Subtype)||(this._Su=i.Subtype);t(i.Tag)||(this._Ta=i.Tag);t(i.Text)||(this._Te=i.Text);t(i.Title)||(this._Ti=i.Title);t(i.Type)||(this._Ty=i.Type);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},k.prototype.load=function(n){return y(this,n)},k.prototype.retrieve=function(n){return p(this,n)},k.prototype._handleIdResult=function(n){(b.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},k.prototype._handleRetrieveResult=function(n,t){b.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return l(this,{appearance:this._A,cannotDelete:this._C,cannotEdit:this._Ca,color:this._Co,id:this._I,placeholderText:this._Pl,removeWhenEdited:this._R,style:this._S,styleBuiltIn:this._St,subtype:this._Su,tag:this._Ta,text:this._Te,title:this._Ti,type:this._Ty},{contentControls:this._Con,font:this._F,inlinePictures:this._In,lists:this._L,paragraphs:this._P,tables:this._T})},k.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.ContentControl=li;kt="ContentControlCollection";ai=function(s){function h(){return s!==null&&s.apply(this,arguments)||this}return __extends(h,s),Object.defineProperty(h.prototype,"_className",{get:function(){return"ContentControlCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,kt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,kt,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getById=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetById",1,[t],!1,!1,null,!1))},h.prototype.getByIdOrNullObject=function(t){return f("ContentControlCollection.getByIdOrNullObject",e,"1.3",u),new n.ContentControl(this.context,r(this.context,this,"GetByIdOrNullObject",1,[t],!1,!1,null,!1))},h.prototype.getByTag=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTag",1,[t],!0,!1,null,!1))},h.prototype.getByTitle=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTitle",1,[t],!0,!1,null,!1))},h.prototype.getByTypes=function(t){return f("ContentControlCollection.getByTypes",e,"1.3",u),new n.ContentControlCollection(this.context,r(this.context,this,"GetByTypes",1,[t],!0,!1,null,!1))},h.prototype.getFirst=function(){return f("ContentControlCollection.getFirst",e,"1.3",u),new n.ContentControl(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},h.prototype.getFirstOrNullObject=function(){return f("ContentControlCollection.getFirstOrNullObject",e,"1.3",u),new n.ContentControl(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},h.prototype.getItem=function(t){return new n.ContentControl(this.context,et(this.context,this,[t]))},h.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,f,u,e;if((s.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],f=r[OfficeExtension.Constants.items],u=0;u<f.length;u++)e=new n.ContentControl(this.context,b(!0,this.context,this,f[u],u)),e._handleResult(f[u]),this.m__items.push(e)},h.prototype.load=function(n){return y(this,n)},h.prototype.retrieve=function(n){return p(this,n)},h.prototype._handleIdResult=function(n){(s.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype._handleRetrieveResult=function(t,i){var r=this;s.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.ContentControl(r.context,b(!0,r.context,r,t,i))})},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return l(this,{},{},this.m__items)},h}(OfficeExtension.ClientObject);n.ContentControlCollection=ai;vt="CustomProperty";vi=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"CustomProperty"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","key","value","type","_Id"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"key",{get:function(){return i("key",this._K,vt,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return i("type",this.m_type,vt,this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return(i("type",this.m_type,"CustomProperty",this._isNull),this.m_type=="Date")?(i("value",this.m_value,"CustomProperty",this._isNull),new Date(this.m_value)):(i("value",this.m_value,vt,this._isNull),this.m_value)},set:function(n){this.m_value=n;s(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_Id",{get:function(){return i("_Id",this.__I,vt,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,vt,this._isNull),this.__R},enumerable:!0,configurable:!0}),r.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},r.prototype.update=function(n){this._recursivelyUpdate(n)},r.prototype.delete=function(){o(this.context,this,"Delete",0,[],!1)},r.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},r.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!c(i)){var r=i;a(this,r);t(r.Key)||(this._K=r.Key);t(r.Type)||(this.m_type=r.Type);t(r.Value)||(this.m_value=r.Value);t(r._Id)||(this.__I=r._Id);t(r._ReferenceId)||(this.__R=r._ReferenceId)}},r.prototype.load=function(n){return y(this,n)},r.prototype.retrieve=function(n){return p(this,n)},r.prototype._handleIdResult=function(i){(n.prototype._handleIdResult.call(this,i),c(i))||(t(i._ReferenceId)||(this.__R=i._ReferenceId),t(i._Id)||(this.__I=i._Id))},r.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i)},r.prototype.track=function(){return this.context.trackedObjects.add(this),this},r.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},r.prototype.toJSON=function(){return l(this,{key:this._K,type:this.m_type,value:this.m_value},{})},r.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},r}(OfficeExtension.ClientObject);n.CustomProperty=vi;dt="CustomPropertyCollection";yi=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"CustomPropertyCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"items",{get:function(){return i("items",this.m__items,dt,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,dt,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.add=function(t,i){return new n.CustomProperty(this.context,r(this.context,this,"Add",0,[t,i],!1,!0,null,!1))},f.prototype.deleteAll=function(){o(this.context,this,"DeleteAll",0,[],!1)},f.prototype.getCount=function(){var t=o(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},f.prototype.getItem=function(t){return new n.CustomProperty(this.context,et(this.context,this,[t]))},f.prototype.getItemOrNullObject=function(t){return new n.CustomProperty(this.context,r(this.context,this,"GetItemOrNullObject",1,[t],!1,!1,null,!1))},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(i){var r,e,f,o;if((u.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f<e.length;f++)o=new n.CustomProperty(this.context,b(!0,this.context,this,e[f],f)),o._handleResult(e[f]),this.m__items.push(o)},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},f.prototype._handleRetrieveResult=function(t,i){var r=this;u.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.CustomProperty(r.context,b(!0,r.context,r,t,i))})},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{},{},this.m__items)},f}(OfficeExtension.ClientObject);n.CustomPropertyCollection=yi;bt="Document";pi=function(b){function k(){return b!==null&&b.apply(this,arguments)||this}return __extends(k,b),Object.defineProperty(k.prototype,"_className",{get:function(){return"Document"},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyNames",{get:function(){return["saved","_ReferenceId","allowCloseOnUntitled"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_navigationPropertyNames",{get:function(){return["sections","body","contentControls","properties"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"body",{get:function(){return this._B||(this._B=new n.Body(this.context,h(this.context,this,"Body",!1,!1,!1))),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"contentControls",{get:function(){return this._C||(this._C=new n.ContentControlCollection(this.context,h(this.context,this,"ContentControls",!0,!1,!1))),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"properties",{get:function(){return f("Document.properties",e,"1.3",u),this._P||(this._P=new n.DocumentProperties(this.context,h(this.context,this,"Properties",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"sections",{get:function(){return this._Se||(this._Se=new n.SectionCollection(this.context,h(this.context,this,"Sections",!0,!1,!1))),this._Se},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"allowCloseOnUntitled",{get:function(){return i("allowCloseOnUntitled",this._A,bt,this._isNull),this._A},set:function(n){this._A=n;s(this.context,this,"AllowCloseOnUntitled",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"saved",{get:function(){return i("saved",this._S,bt,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,bt,this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["allowCloseOnUntitled"],["body","properties"],["contentControls","sections"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.getMetadata=function(n){var i=o(this.context,this,"GetMetadata",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},k.prototype.getNeighborhoodTextAroundSelection=function(n){var i=o(this.context,this,"GetNeighborhoodTextAroundSelection",1,[n],!0),t=new OfficeExtension.ClientResult;return w(this,i,t),t},k.prototype.getSelection=function(){return new n.Range(this.context,r(this.context,this,"GetSelection",1,[],!1,!0,null,!1))},k.prototype.launchTapPane=function(n){o(this.context,this,"LaunchTapPane",1,[n],!0)},k.prototype.save=function(){o(this.context,this,"Save",0,[],!1)},k.prototype.setMetadata=function(n,t){o(this.context,this,"SetMetadata",0,[n,t],!1)},k.prototype.setMetadataOnTile=function(n,t,i){o(this.context,this,"SetMetadataOnTile",0,[n,t,i],!1)},k.prototype._GetObjectByReferenceId=function(n){var i=o(this.context,this,"_GetObjectByReferenceId",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},k.prototype._GetObjectTypeNameByReferenceId=function(n){var i=o(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},k.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},k.prototype._RemoveAllReferences=function(){o(this.context,this,"_RemoveAllReferences",1,[],!1)},k.prototype._RemoveReference=function(n){o(this.context,this,"_RemoveReference",1,[n],!1)},k.prototype._handleResult=function(n){if(b.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.AllowCloseOnUntitled)||(this._A=i.AllowCloseOnUntitled);t(i.Saved)||(this._S=i.Saved);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);it(this,i,["body","Body","contentControls","ContentControls","properties","Properties","sections","Sections"])}},k.prototype.load=function(n){return y(this,n)},k.prototype.retrieve=function(n){return p(this,n)},k.prototype._handleIdResult=function(n){(b.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){b.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return l(this,{allowCloseOnUntitled:this._A,saved:this._S},{body:this._B,contentControls:this._C,properties:this._P,sections:this._Se})},k.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Document=pi;gt="DocumentCreated";wi=function(r){function e(){return r!==null&&r.apply(this,arguments)||this}return __extends(e,r),Object.defineProperty(e.prototype,"_className",{get:function(){return"DocumentCreated"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return["saved","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return["sections","body","contentControls","properties"]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return f("DocumentCreated.body","WordApiHiddenDocument","1.3",u),this._B||(this._B=new n.Body(this.context,h(this.context,this,"Body",!1,!1,!1))),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentControls",{get:function(){return f("DocumentCreated.contentControls","WordApiHiddenDocument","1.3",u),this._C||(this._C=new n.ContentControlCollection(this.context,h(this.context,this,"ContentControls",!0,!1,!1))),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return f("DocumentCreated.properties","WordApiHiddenDocument","1.3",u),this._P||(this._P=new n.DocumentProperties(this.context,h(this.context,this,"Properties",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sections",{get:function(){return f("DocumentCreated.sections","WordApiHiddenDocument","1.3",u),this._Se||(this._Se=new n.SectionCollection(this.context,h(this.context,this,"Sections",!0,!1,!1))),this._Se},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saved",{get:function(){return i("saved",this._S,gt,this._isNull),f("DocumentCreated.saved","WordApiHiddenDocument","1.3",u),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,gt,this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),e.prototype.set=function(n,t){this._recursivelySet(n,t,[],["body","properties"],["contentControls","sections"])},e.prototype.update=function(n){this._recursivelyUpdate(n)},e.prototype.open=function(){o(this.context,this,"Open",1,[],!1)},e.prototype.save=function(){f("DocumentCreated.save","WordApiHiddenDocument","1.3",u);o(this.context,this,"Save",0,[],!1)},e.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},e.prototype._handleResult=function(n){if(r.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Saved)||(this._S=i.Saved);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);it(this,i,["body","Body","contentControls","ContentControls","properties","Properties","sections","Sections"])}},e.prototype.load=function(n){return y(this,n)},e.prototype.retrieve=function(n){return p(this,n)},e.prototype._handleIdResult=function(n){(r.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},e.prototype._handleRetrieveResult=function(n,t){r.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},e.prototype.toJSON=function(){return l(this,{saved:this._S},{body:this._B,contentControls:this._C,properties:this._P,sections:this._Se})},e.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},e}(OfficeExtension.ClientObject);n.DocumentCreated=wi;d="DocumentProperties";bi=function(r){function u(){return r!==null&&r.apply(this,arguments)||this}return __extends(u,r),Object.defineProperty(u.prototype,"_className",{get:function(){return"DocumentProperties"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","title","subject","author","keywords","comments","template","lastAuthor","revisionNumber","applicationName","lastPrintDate","creationDate","lastSaveTime","security","category","format","manager","company"]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_navigationPropertyNames",{get:function(){return["customProperties"]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"customProperties",{get:function(){return this._Cu||(this._Cu=new n.CustomPropertyCollection(this.context,h(this.context,this,"CustomProperties",!0,!1,!1))),this._Cu},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"applicationName",{get:function(){return i("applicationName",this._A,d,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"author",{get:function(){return i("author",this._Au,d,this._isNull),this._Au},set:function(n){this._Au=n;s(this.context,this,"Author",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"category",{get:function(){return i("category",this._C,d,this._isNull),this._C},set:function(n){this._C=n;s(this.context,this,"Category",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"comments",{get:function(){return i("comments",this._Co,d,this._isNull),this._Co},set:function(n){this._Co=n;s(this.context,this,"Comments",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"company",{get:function(){return i("company",this._Com,d,this._isNull),this._Com},set:function(n){this._Com=n;s(this.context,this,"Company",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"creationDate",{get:function(){return i("creationDate",this._Cr,d,this._isNull),this._Cr},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"format",{get:function(){return i("format",this._F,d,this._isNull),this._F},set:function(n){this._F=n;s(this.context,this,"Format",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"keywords",{get:function(){return i("keywords",this._K,d,this._isNull),this._K},set:function(n){this._K=n;s(this.context,this,"Keywords",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"lastAuthor",{get:function(){return i("lastAuthor",this._L,d,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"lastPrintDate",{get:function(){return i("lastPrintDate",this._La,d,this._isNull),this._La},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"lastSaveTime",{get:function(){return i("lastSaveTime",this._Las,d,this._isNull),this._Las},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"manager",{get:function(){return i("manager",this._M,d,this._isNull),this._M},set:function(n){this._M=n;s(this.context,this,"Manager",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"revisionNumber",{get:function(){return i("revisionNumber",this._R,d,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"security",{get:function(){return i("security",this._S,d,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"subject",{get:function(){return i("subject",this._Su,d,this._isNull),this._Su},set:function(n){this._Su=n;s(this.context,this,"Subject",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"template",{get:function(){return i("template",this._T,d,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"title",{get:function(){return i("title",this._Ti,d,this._isNull),this._Ti},set:function(n){this._Ti=n;s(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,d,this._isNull),this.__R},enumerable:!0,configurable:!0}),u.prototype.set=function(n,t){this._recursivelySet(n,t,["title","subject","author","keywords","comments","category","format","manager","company"],[],["customProperties"])},u.prototype.update=function(n){this._recursivelyUpdate(n)},u.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},u.prototype._handleResult=function(n){if(r.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.ApplicationName)||(this._A=i.ApplicationName);t(i.Author)||(this._Au=i.Author);t(i.Category)||(this._C=i.Category);t(i.Comments)||(this._Co=i.Comments);t(i.Company)||(this._Com=i.Company);t(i.CreationDate)||(this._Cr=lt(i.CreationDate));t(i.Format)||(this._F=i.Format);t(i.Keywords)||(this._K=i.Keywords);t(i.LastAuthor)||(this._L=i.LastAuthor);t(i.LastPrintDate)||(this._La=lt(i.LastPrintDate));t(i.LastSaveTime)||(this._Las=lt(i.LastSaveTime));t(i.Manager)||(this._M=i.Manager);t(i.RevisionNumber)||(this._R=i.RevisionNumber);t(i.Security)||(this._S=i.Security);t(i.Subject)||(this._Su=i.Subject);t(i.Template)||(this._T=i.Template);t(i.Title)||(this._Ti=i.Title);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["customProperties","CustomProperties"])}},u.prototype.load=function(n){return y(this,n)},u.prototype.retrieve=function(n){return p(this,n)},u.prototype._handleIdResult=function(n){(r.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},u.prototype._handleRetrieveResult=function(n,i){if(r.prototype._handleRetrieveResult.call(this,n,i),!c(n)){var u=n;t(u.CreationDate)||(u.creationDate=lt(u.creationDate));t(u.LastPrintDate)||(u.lastPrintDate=lt(u.lastPrintDate));t(u.LastSaveTime)||(u.lastSaveTime=lt(u.lastSaveTime));v(this,n,i)}},u.prototype.track=function(){return this.context.trackedObjects.add(this),this},u.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},u.prototype.toJSON=function(){return l(this,{applicationName:this._A,author:this._Au,category:this._C,comments:this._Co,company:this._Com,creationDate:this._Cr,format:this._F,keywords:this._K,lastAuthor:this._L,lastPrintDate:this._La,lastSaveTime:this._Las,manager:this._M,revisionNumber:this._R,security:this._S,subject:this._Su,template:this._T,title:this._Ti},{customProperties:this._Cu})},u.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},u}(OfficeExtension.ClientObject);n.DocumentProperties=bi;rt="Font";ki=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Font"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","name","size","bold","italic","color","underline","subscript","superscript","strikeThrough","doubleStrikeThrough","highlightColor"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bold",{get:function(){return i("bold",this._B,rt,this._isNull),this._B},set:function(n){this._B=n;s(this.context,this,"Bold",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"color",{get:function(){return i("color",this._C,rt,this._isNull),this._C},set:function(n){this._C=n;s(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"doubleStrikeThrough",{get:function(){return i("doubleStrikeThrough",this._D,rt,this._isNull),this._D},set:function(n){this._D=n;s(this.context,this,"DoubleStrikeThrough",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"highlightColor",{get:function(){return i("highlightColor",this._H,rt,this._isNull),this._H},set:function(n){this._H=n;s(this.context,this,"HighlightColor",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"italic",{get:function(){return i("italic",this._I,rt,this._isNull),this._I},set:function(n){this._I=n;s(this.context,this,"Italic",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return i("name",this._N,rt,this._isNull),this._N},set:function(n){this._N=n;s(this.context,this,"Name",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){return i("size",this._S,rt,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"Size",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"strikeThrough",{get:function(){return i("strikeThrough",this._St,rt,this._isNull),this._St},set:function(n){this._St=n;s(this.context,this,"StrikeThrough",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"subscript",{get:function(){return i("subscript",this._Su,rt,this._isNull),this._Su},set:function(n){this._Su=n;s(this.context,this,"Subscript",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"superscript",{get:function(){return i("superscript",this._Sup,rt,this._isNull),this._Sup},set:function(n){this._Sup=n;s(this.context,this,"Superscript",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"underline",{get:function(){return i("underline",this._U,rt,this._isNull),this._U},set:function(n){this._U=n;s(this.context,this,"Underline",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,rt,this._isNull),this.__R},enumerable:!0,configurable:!0}),r.prototype.set=function(n,t){this._recursivelySet(n,t,["name","size","bold","italic","color","underline","subscript","superscript","strikeThrough","doubleStrikeThrough","highlightColor"],[],[])},r.prototype.update=function(n){this._recursivelyUpdate(n)},r.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},r.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!c(i)){var r=i;a(this,r);t(r.Bold)||(this._B=r.Bold);t(r.Color)||(this._C=r.Color);t(r.DoubleStrikeThrough)||(this._D=r.DoubleStrikeThrough);t(r.HighlightColor)||(this._H=r.HighlightColor);t(r.Italic)||(this._I=r.Italic);t(r.Name)||(this._N=r.Name);t(r.Size)||(this._S=r.Size);t(r.StrikeThrough)||(this._St=r.StrikeThrough);t(r.Subscript)||(this._Su=r.Subscript);t(r.Superscript)||(this._Sup=r.Superscript);t(r.Underline)||(this._U=r.Underline);t(r._ReferenceId)||(this.__R=r._ReferenceId)}},r.prototype.load=function(n){return y(this,n)},r.prototype.retrieve=function(n){return p(this,n)},r.prototype._handleIdResult=function(i){(n.prototype._handleIdResult.call(this,i),c(i))||t(i._ReferenceId)||(this.__R=i._ReferenceId)},r.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i)},r.prototype.track=function(){return this.context.trackedObjects.add(this),this},r.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},r.prototype.toJSON=function(){return l(this,{bold:this._B,color:this._C,doubleStrikeThrough:this._D,highlightColor:this._H,italic:this._I,name:this._N,size:this._S,strikeThrough:this._St,subscript:this._Su,superscript:this._Sup,underline:this._U},{})},r.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},r}(OfficeExtension.ClientObject);n.Font=ki;ot="InlinePicture";di=function(b){function k(){return b!==null&&b.apply(this,arguments)||this}return __extends(k,b),Object.defineProperty(k.prototype,"_className",{get:function(){return"InlinePicture"},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","altTextDescription","altTextTitle","height","hyperlink","lockAspectRatio","width"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_navigationPropertyNames",{get:function(){return["parentContentControl","paragraph","parentTableCell","parentTable","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"paragraph",{get:function(){return f("InlinePicture.paragraph",e,"1.2",u),this._P||(this._P=new n.Paragraph(this.context,h(this.context,this,"Paragraph",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=new n.ContentControl(this.context,h(this.context,this,"ParentContentControl",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControlOrNullObject",{get:function(){return f("InlinePicture.parentContentControlOrNullObject",e,"1.3",u),this._Par||(this._Par=new n.ContentControl(this.context,h(this.context,this,"ParentContentControlOrNullObject",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTable",{get:function(){return f("InlinePicture.parentTable",e,"1.3",u),this._Pare||(this._Pare=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCell",{get:function(){return f("InlinePicture.parentTableCell",e,"1.3",u),this._Paren||(this._Paren=new n.TableCell(this.context,h(this.context,this,"ParentTableCell",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCellOrNullObject",{get:function(){return f("InlinePicture.parentTableCellOrNullObject",e,"1.3",u),this._Parent||(this._Parent=new n.TableCell(this.context,h(this.context,this,"ParentTableCellOrNullObject",!1,!1,!1))),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableOrNullObject",{get:function(){return f("InlinePicture.parentTableOrNullObject",e,"1.3",u),this._ParentT||(this._ParentT=new n.Table(this.context,h(this.context,this,"ParentTableOrNullObject",!1,!1,!1))),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"altTextDescription",{get:function(){return i("altTextDescription",this._A,ot,this._isNull),this._A},set:function(n){this._A=n;s(this.context,this,"AltTextDescription",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"altTextTitle",{get:function(){return i("altTextTitle",this._Al,ot,this._isNull),this._Al},set:function(n){this._Al=n;s(this.context,this,"AltTextTitle",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"height",{get:function(){return i("height",this._H,ot,this._isNull),this._H},set:function(n){this._H=n;s(this.context,this,"Height",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hyperlink",{get:function(){return i("hyperlink",this._Hy,ot,this._isNull),this._Hy},set:function(n){this._Hy=n;s(this.context,this,"Hyperlink",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lockAspectRatio",{get:function(){return i("lockAspectRatio",this._L,ot,this._isNull),this._L},set:function(n){this._L=n;s(this.context,this,"LockAspectRatio",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"width",{get:function(){return i("width",this._W,ot,this._isNull),this._W},set:function(n){this._W=n;s(this.context,this,"Width",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_Id",{get:function(){return i("_Id",this.__I,ot,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ot,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["altTextDescription","altTextTitle","height","hyperlink","lockAspectRatio","width"],[],["paragraph","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.delete=function(){f("InlinePicture.delete",e,"1.2",u);o(this.context,this,"Delete",0,[],!1)},k.prototype.getBase64ImageSrc=function(){var t=o(this.context,this,"GetBase64ImageSrc",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getNext=function(){return f("InlinePicture.getNext",e,"1.3",u),new n.InlinePicture(this.context,r(this.context,this,"GetNext",1,[],!1,!1,null,!1))},k.prototype.getNextOrNullObject=function(){return f("InlinePicture.getNextOrNullObject",e,"1.3",u),new n.InlinePicture(this.context,r(this.context,this,"GetNextOrNullObject",1,[],!1,!1,null,!1))},k.prototype.getRange=function(t){return f("InlinePicture.getRange",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null,!1))},k.prototype.insertBreak=function(n,t){f("InlinePicture.insertBreak",e,"1.2",u);o(this.context,this,"InsertBreak",0,[n,t],!1)},k.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null,!1))},k.prototype.insertFileFromBase64=function(t,i){return f("InlinePicture.insertFileFromBase64",e,"1.2",u),new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertHtml=function(t,i){return f("InlinePicture.insertHtml",e,"1.2",u),new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null,!1))},k.prototype.insertInlinePictureFromBase64=function(t,i){return f("InlinePicture.insertInlinePictureFromBase64",e,"1.2",u),new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertOoxml=function(t,i){return f("InlinePicture.insertOoxml",e,"1.2",u),new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null,!1))},k.prototype.insertParagraph=function(t,i){return f("InlinePicture.insertParagraph",e,"1.2",u),new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},k.prototype.insertText=function(t,i){return f("InlinePicture.insertText",e,"1.2",u),new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null,!1))},k.prototype.select=function(n){f("InlinePicture.select",e,"1.2",u);o(this.context,this,"Select",1,[n],!1)},k.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},k.prototype._handleResult=function(n){if(b.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.AltTextDescription)||(this._A=i.AltTextDescription);t(i.AltTextTitle)||(this._Al=i.AltTextTitle);t(i.Height)||(this._H=i.Height);t(i.Hyperlink)||(this._Hy=i.Hyperlink);t(i.LockAspectRatio)||(this._L=i.LockAspectRatio);t(i.Width)||(this._W=i.Width);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["paragraph","Paragraph","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject"])}},k.prototype.load=function(n){return y(this,n)},k.prototype.retrieve=function(n){return p(this,n)},k.prototype._handleIdResult=function(n){(b.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},k.prototype._handleRetrieveResult=function(n,t){b.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return l(this,{altTextDescription:this._A,altTextTitle:this._Al,height:this._H,hyperlink:this._Hy,lockAspectRatio:this._L,width:this._W},{})},k.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.InlinePicture=di;ni="InlinePictureCollection";gi=function(s){function h(){return s!==null&&s.apply(this,arguments)||this}return __extends(h,s),Object.defineProperty(h.prototype,"_className",{get:function(){return"InlinePictureCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ni,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ni,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getFirst=function(){return f("InlinePictureCollection.getFirst",e,"1.3",u),new n.InlinePicture(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},h.prototype.getFirstOrNullObject=function(){return f("InlinePictureCollection.getFirstOrNullObject",e,"1.3",u),new n.InlinePicture(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},h.prototype._GetItem=function(t){return new n.InlinePicture(this.context,et(this.context,this,[t]))},h.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,f,u,e;if((s.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],f=r[OfficeExtension.Constants.items],u=0;u<f.length;u++)e=new n.InlinePicture(this.context,b(!0,this.context,this,f[u],u)),e._handleResult(f[u]),this.m__items.push(e)},h.prototype.load=function(n){return y(this,n)},h.prototype.retrieve=function(n){return p(this,n)},h.prototype._handleIdResult=function(n){(s.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype._handleRetrieveResult=function(t,i){var r=this;s.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.InlinePicture(r.context,b(!0,r.context,r,t,i))})},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return l(this,{},{},this.m__items)},h}(OfficeExtension.ClientObject);n.InlinePictureCollection=gi;yt="List";nr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"List"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["id","_ReferenceId","levelTypes","levelExistences"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_navigationPropertyNames",{get:function(){return["paragraphs"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"paragraphs",{get:function(){return this._P||(this._P=new n.ParagraphCollection(this.context,h(this.context,this,"Paragraphs",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"id",{get:function(){return i("id",this._I,yt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"levelExistences",{get:function(){return i("levelExistences",this._L,yt,this._isNull),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"levelTypes",{get:function(){return i("levelTypes",this._Le,yt,this._isNull),this._Le},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,yt,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.getLevelParagraphs=function(t){return new n.ParagraphCollection(this.context,r(this.context,this,"GetLevelParagraphs",1,[t],!0,!1,null,!1))},f.prototype.getLevelString=function(n){var i=o(this.context,this,"GetLevelString",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},f.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},f.prototype.setLevelAlignment=function(n,t){o(this.context,this,"SetLevelAlignment",0,[n,t],!1)},f.prototype.setLevelBullet=function(n,t,i,r){o(this.context,this,"SetLevelBullet",0,[n,t,i,r],!1)},f.prototype.setLevelIndents=function(n,t,i){o(this.context,this,"SetLevelIndents",0,[n,t,i],!1)},f.prototype.setLevelNumbering=function(n,t,i){o(this.context,this,"SetLevelNumbering",0,[n,t,i],!1)},f.prototype.setLevelStartingNumber=function(n,t){o(this.context,this,"SetLevelStartingNumber",0,[n,t],!1)},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(n){if(u.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Id)||(this._I=i.Id);t(i.LevelExistences)||(this._L=i.LevelExistences);t(i.LevelTypes)||(this._Le=i.LevelTypes);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["paragraphs","Paragraphs"])}},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n.Id)||(this._I=n.Id))},f.prototype._handleRetrieveResult=function(n,t){u.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{id:this._I,levelExistences:this._L,levelTypes:this._Le},{paragraphs:this._P})},f.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},f}(OfficeExtension.ClientObject);n.List=nr;ti="ListCollection";tr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"ListCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"items",{get:function(){return i("items",this.m__items,ti,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ti,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.getById=function(t){return new n.List(this.context,r(this.context,this,"GetById",1,[t],!1,!1,null,!1))},f.prototype.getByIdOrNullObject=function(t){return new n.List(this.context,r(this.context,this,"GetByIdOrNullObject",1,[t],!1,!1,null,!1))},f.prototype.getFirst=function(){return new n.List(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},f.prototype.getFirstOrNullObject=function(){return new n.List(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},f.prototype.getItem=function(t){return new n.List(this.context,et(this.context,this,[t]))},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(i){var r,e,f,o;if((u.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f<e.length;f++)o=new n.List(this.context,b(!0,this.context,this,e[f],f)),o._handleResult(e[f]),this.m__items.push(o)},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},f.prototype._handleRetrieveResult=function(t,i){var r=this;u.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.List(r.context,b(!0,r.context,r,t,i))})},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{},{},this.m__items)},f}(OfficeExtension.ClientObject);n.ListCollection=tr;pt="ListItem";ir=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"ListItem"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","siblingIndex","listString","level"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"level",{get:function(){return i("level",this._L,pt,this._isNull),this._L},set:function(n){this._L=n;s(this.context,this,"Level",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"listString",{get:function(){return i("listString",this._Li,pt,this._isNull),this._Li},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"siblingIndex",{get:function(){return i("siblingIndex",this._S,pt,this._isNull),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,pt,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.set=function(n,t){this._recursivelySet(n,t,["level"],[],[])},f.prototype.update=function(n){this._recursivelyUpdate(n)},f.prototype.getAncestor=function(t){return new n.Paragraph(this.context,r(this.context,this,"GetAncestor",1,[t],!1,!1,null,!1))},f.prototype.getAncestorOrNullObject=function(t){return new n.Paragraph(this.context,r(this.context,this,"GetAncestorOrNullObject",1,[t],!1,!1,null,!1))},f.prototype.getDescendants=function(t){return new n.ParagraphCollection(this.context,r(this.context,this,"GetDescendants",1,[t],!0,!1,null,!1))},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(n){if(u.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Level)||(this._L=i.Level);t(i.ListString)||(this._Li=i.ListString);t(i.SiblingIndex)||(this._S=i.SiblingIndex);t(i._ReferenceId)||(this.__R=i._ReferenceId)}},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},f.prototype._handleRetrieveResult=function(n,t){u.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{level:this._L,listString:this._Li,siblingIndex:this._S},{})},f.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},f}(OfficeExtension.ClientObject);n.ListItem=ir;g="Paragraph";rr=function(b){function k(){return b!==null&&b.apply(this,arguments)||this}return __extends(k,b),Object.defineProperty(k.prototype,"_className",{get:function(){return"Paragraph"},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","style","alignment","firstLineIndent","leftIndent","rightIndent","lineSpacing","outlineLevel","spaceBefore","spaceAfter","lineUnitBefore","lineUnitAfter","text","isListItem","tableNestingLevel","isLastParagraph","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_navigationPropertyNames",{get:function(){return["font","contentControls","parentContentControl","inlinePictures","parentBody","list","parentTableCell","parentTable","listItem","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject","listOrNullObject","listItemOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"contentControls",{get:function(){return this._C||(this._C=new n.ContentControlCollection(this.context,h(this.context,this,"ContentControls",!0,!1,!1))),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"font",{get:function(){return this._Fo||(this._Fo=new n.Font(this.context,h(this.context,this,"Font",!1,!1,!1))),this._Fo},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"inlinePictures",{get:function(){return this._I||(this._I=new n.InlinePictureCollection(this.context,h(this.context,this,"InlinePictures",!0,!1,!1))),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"list",{get:function(){return f("Paragraph.list",e,"1.3",u),this._Lis||(this._Lis=new n.List(this.context,h(this.context,this,"List",!1,!1,!1))),this._Lis},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"listItem",{get:function(){return f("Paragraph.listItem",e,"1.3",u),this._List||(this._List=new n.ListItem(this.context,h(this.context,this,"ListItem",!1,!1,!1))),this._List},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"listItemOrNullObject",{get:function(){return f("Paragraph.listItemOrNullObject",e,"1.3",u),this._ListI||(this._ListI=new n.ListItem(this.context,h(this.context,this,"ListItemOrNullObject",!1,!1,!1))),this._ListI},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"listOrNullObject",{get:function(){return f("Paragraph.listOrNullObject",e,"1.3",u),this._ListO||(this._ListO=new n.List(this.context,h(this.context,this,"ListOrNullObject",!1,!1,!1))),this._ListO},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentBody",{get:function(){return f("Paragraph.parentBody",e,"1.3",u),this._P||(this._P=new n.Body(this.context,h(this.context,this,"ParentBody",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=new n.ContentControl(this.context,h(this.context,this,"ParentContentControl",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControlOrNullObject",{get:function(){return f("Paragraph.parentContentControlOrNullObject",e,"1.3",u),this._Par||(this._Par=new n.ContentControl(this.context,h(this.context,this,"ParentContentControlOrNullObject",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTable",{get:function(){return f("Paragraph.parentTable",e,"1.3",u),this._Pare||(this._Pare=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCell",{get:function(){return f("Paragraph.parentTableCell",e,"1.3",u),this._Paren||(this._Paren=new n.TableCell(this.context,h(this.context,this,"ParentTableCell",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCellOrNullObject",{get:function(){return f("Paragraph.parentTableCellOrNullObject",e,"1.3",u),this._Parent||(this._Parent=new n.TableCell(this.context,h(this.context,this,"ParentTableCellOrNullObject",!1,!1,!1))),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableOrNullObject",{get:function(){return f("Paragraph.parentTableOrNullObject",e,"1.3",u),this._ParentT||(this._ParentT=new n.Table(this.context,h(this.context,this,"ParentTableOrNullObject",!1,!1,!1))),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"alignment",{get:function(){return i("alignment",this._A,g,this._isNull),this._A},set:function(n){this._A=n;s(this.context,this,"Alignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"firstLineIndent",{get:function(){return i("firstLineIndent",this._F,g,this._isNull),this._F},set:function(n){this._F=n;s(this.context,this,"FirstLineIndent",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"isLastParagraph",{get:function(){return i("isLastParagraph",this._Is,g,this._isNull),f("Paragraph.isLastParagraph",e,"1.3",u),this._Is},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"isListItem",{get:function(){return i("isListItem",this._IsL,g,this._isNull),f("Paragraph.isListItem",e,"1.3",u),this._IsL},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"leftIndent",{get:function(){return i("leftIndent",this._L,g,this._isNull),this._L},set:function(n){this._L=n;s(this.context,this,"LeftIndent",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lineSpacing",{get:function(){return i("lineSpacing",this._Li,g,this._isNull),this._Li},set:function(n){this._Li=n;s(this.context,this,"LineSpacing",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lineUnitAfter",{get:function(){return i("lineUnitAfter",this._Lin,g,this._isNull),this._Lin},set:function(n){this._Lin=n;s(this.context,this,"LineUnitAfter",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lineUnitBefore",{get:function(){return i("lineUnitBefore",this._Line,g,this._isNull),this._Line},set:function(n){this._Line=n;s(this.context,this,"LineUnitBefore",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"outlineLevel",{get:function(){return i("outlineLevel",this._O,g,this._isNull),this._O},set:function(n){this._O=n;s(this.context,this,"OutlineLevel",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rightIndent",{get:function(){return i("rightIndent",this._R,g,this._isNull),this._R},set:function(n){this._R=n;s(this.context,this,"RightIndent",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"spaceAfter",{get:function(){return i("spaceAfter",this._S,g,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"SpaceAfter",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"spaceBefore",{get:function(){return i("spaceBefore",this._Sp,g,this._isNull),this._Sp},set:function(n){this._Sp=n;s(this.context,this,"SpaceBefore",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"style",{get:function(){return i("style",this._St,g,this._isNull),this._St},set:function(n){this._St=n;s(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this._Sty,g,this._isNull),f("Paragraph.styleBuiltIn",e,"1.3",u),this._Sty},set:function(n){this._Sty=n;s(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"tableNestingLevel",{get:function(){return i("tableNestingLevel",this._T,g,this._isNull),f("Paragraph.tableNestingLevel",e,"1.3",u),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return i("text",this._Te,g,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_Id",{get:function(){return i("_Id",this.__I,g,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,g,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["style","alignment","firstLineIndent","leftIndent","rightIndent","lineSpacing","outlineLevel","spaceBefore","spaceAfter","lineUnitBefore","lineUnitAfter","styleBuiltIn"],["font","listItem","listItemOrNullObject"],["contentControls","inlinePictures","list","listOrNullObject","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.attachToList=function(t,i){return f("Paragraph.attachToList",e,"1.3",u),new n.List(this.context,r(this.context,this,"AttachToList",0,[t,i],!1,!1,null,!1))},k.prototype.clear=function(){o(this.context,this,"Clear",0,[],!1)},k.prototype.delete=function(){o(this.context,this,"Delete",0,[],!1)},k.prototype.detachFromList=function(){f("Paragraph.detachFromList",e,"1.3",u);o(this.context,this,"DetachFromList",0,[],!1)},k.prototype.getHtml=function(){var t=o(this.context,this,"GetHtml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getMetadata=function(n){var i=o(this.context,this,"GetMetadata",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},k.prototype.getNext=function(){return f("Paragraph.getNext",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetNext",1,[],!1,!1,null,!1))},k.prototype.getNextOrNullObject=function(){return f("Paragraph.getNextOrNullObject",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetNextOrNullObject",1,[],!1,!1,null,!1))},k.prototype.getOoxml=function(){var t=o(this.context,this,"GetOoxml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getPrevious=function(){return f("Paragraph.getPrevious",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetPrevious",1,[],!1,!1,null,!1))},k.prototype.getPreviousOrNullObject=function(){return f("Paragraph.getPreviousOrNullObject",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetPreviousOrNullObject",1,[],!1,!1,null,!1))},k.prototype.getRange=function(t){return f("Paragraph.getRange",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null,!1))},k.prototype.getTextRanges=function(t,i){return f("Paragraph.getTextRanges",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null,!1))},k.prototype.insertBreak=function(n,t){o(this.context,this,"InsertBreak",0,[n,t],!1)},k.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null,!1))},k.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null,!1))},k.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null,!1))},k.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},k.prototype.insertTable=function(t,i,o,s){return f("Paragraph.insertTable",e,"1.3",u),new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,o,s],!1,!0,null,!1))},k.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null,!1))},k.prototype.search=function(t,i){return i=ct(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null,!1))},k.prototype.select=function(n){o(this.context,this,"Select",1,[n],!1)},k.prototype.setMetadata=function(n,t){o(this.context,this,"SetMetadata",0,[n,t],!1)},k.prototype.split=function(t,i,o){return f("Paragraph.split",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,o],!0,!1,null,!1))},k.prototype.startNewList=function(){return f("Paragraph.startNewList",e,"1.3",u),new n.List(this.context,r(this.context,this,"StartNewList",0,[],!1,!1,null,!1))},k.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},k.prototype._handleResult=function(n){if(b.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Alignment)||(this._A=i.Alignment);t(i.FirstLineIndent)||(this._F=i.FirstLineIndent);t(i.IsLastParagraph)||(this._Is=i.IsLastParagraph);t(i.IsListItem)||(this._IsL=i.IsListItem);t(i.LeftIndent)||(this._L=i.LeftIndent);t(i.LineSpacing)||(this._Li=i.LineSpacing);t(i.LineUnitAfter)||(this._Lin=i.LineUnitAfter);t(i.LineUnitBefore)||(this._Line=i.LineUnitBefore);t(i.OutlineLevel)||(this._O=i.OutlineLevel);t(i.RightIndent)||(this._R=i.RightIndent);t(i.SpaceAfter)||(this._S=i.SpaceAfter);t(i.SpaceBefore)||(this._Sp=i.SpaceBefore);t(i.Style)||(this._St=i.Style);t(i.StyleBuiltIn)||(this._Sty=i.StyleBuiltIn);t(i.TableNestingLevel)||(this._T=i.TableNestingLevel);t(i.Text)||(this._Te=i.Text);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","list","List","listItem","ListItem","listItemOrNullObject","ListItemOrNullObject","listOrNullObject","ListOrNullObject","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject"])}},k.prototype.load=function(n){return y(this,n)},k.prototype.retrieve=function(n){return p(this,n)},k.prototype._handleIdResult=function(n){(b.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},k.prototype._handleRetrieveResult=function(n,t){b.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return l(this,{alignment:this._A,firstLineIndent:this._F,isLastParagraph:this._Is,isListItem:this._IsL,leftIndent:this._L,lineSpacing:this._Li,lineUnitAfter:this._Lin,lineUnitBefore:this._Line,outlineLevel:this._O,rightIndent:this._R,spaceAfter:this._S,spaceBefore:this._Sp,style:this._St,styleBuiltIn:this._Sty,tableNestingLevel:this._T,text:this._Te},{font:this._Fo,inlinePictures:this._I,listItem:this._List,listItemOrNullObject:this._ListI})},k.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Paragraph=rr;ii="ParagraphCollection";ur=function(s){function h(){return s!==null&&s.apply(this,arguments)||this}return __extends(h,s),Object.defineProperty(h.prototype,"_className",{get:function(){return"ParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ii,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ii,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getFirst=function(){return f("ParagraphCollection.getFirst",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},h.prototype.getFirstOrNullObject=function(){return f("ParagraphCollection.getFirstOrNullObject",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},h.prototype.getLast=function(){return f("ParagraphCollection.getLast",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetLast",1,[],!1,!1,null,!1))},h.prototype.getLastOrNullObject=function(){return f("ParagraphCollection.getLastOrNullObject",e,"1.3",u),new n.Paragraph(this.context,r(this.context,this,"GetLastOrNullObject",1,[],!1,!1,null,!1))},h.prototype._GetItem=function(t){return new n.Paragraph(this.context,et(this.context,this,[t]))},h.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,f,u,e;if((s.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],f=r[OfficeExtension.Constants.items],u=0;u<f.length;u++)e=new n.Paragraph(this.context,b(!0,this.context,this,f[u],u)),e._handleResult(f[u]),this.m__items.push(e)},h.prototype.load=function(n){return y(this,n)},h.prototype.retrieve=function(n){return p(this,n)},h.prototype._handleIdResult=function(n){(s.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype._handleRetrieveResult=function(t,i){var r=this;s.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.Paragraph(r.context,b(!0,r.context,r,t,i))})},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return l(this,{},{},this.m__items)},h}(OfficeExtension.ClientObject);n.ParagraphCollection=ur;st="Range";fr=function(b){function k(){return b!==null&&b.apply(this,arguments)||this}return __extends(k,b),Object.defineProperty(k.prototype,"_className",{get:function(){return"Range"},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","style","text","isEmpty","hyperlink","styleBuiltIn"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!0,!1,!1,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_navigationPropertyNames",{get:function(){return["font","paragraphs","contentControls","parentContentControl","inlinePictures","lists","tables","parentTableCell","parentTable","parentBody","parentContentControlOrNullObject","parentTableCellOrNullObject","parentTableOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"contentControls",{get:function(){return this._C||(this._C=new n.ContentControlCollection(this.context,h(this.context,this,"ContentControls",!0,!1,!1))),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"font",{get:function(){return this._F||(this._F=new n.Font(this.context,h(this.context,this,"Font",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"inlinePictures",{get:function(){return f("Range.inlinePictures",e,"1.2",u),this._I||(this._I=new n.InlinePictureCollection(this.context,h(this.context,this,"InlinePictures",!0,!1,!1))),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"lists",{get:function(){return f("Range.lists",e,"1.3",u),this._L||(this._L=new n.ListCollection(this.context,h(this.context,this,"Lists",!0,!1,!1))),this._L},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"paragraphs",{get:function(){return this._P||(this._P=new n.ParagraphCollection(this.context,h(this.context,this,"Paragraphs",!0,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentBody",{get:function(){return f("Range.parentBody",e,"1.3",u),this._Pa||(this._Pa=new n.Body(this.context,h(this.context,this,"ParentBody",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControl",{get:function(){return this._Par||(this._Par=new n.ContentControl(this.context,h(this.context,this,"ParentContentControl",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentContentControlOrNullObject",{get:function(){return f("Range.parentContentControlOrNullObject",e,"1.3",u),this._Pare||(this._Pare=new n.ContentControl(this.context,h(this.context,this,"ParentContentControlOrNullObject",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTable",{get:function(){return f("Range.parentTable",e,"1.3",u),this._Paren||(this._Paren=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCell",{get:function(){return f("Range.parentTableCell",e,"1.3",u),this._Parent||(this._Parent=new n.TableCell(this.context,h(this.context,this,"ParentTableCell",!1,!1,!1))),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableCellOrNullObject",{get:function(){return f("Range.parentTableCellOrNullObject",e,"1.3",u),this._ParentT||(this._ParentT=new n.TableCell(this.context,h(this.context,this,"ParentTableCellOrNullObject",!1,!1,!1))),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"parentTableOrNullObject",{get:function(){return f("Range.parentTableOrNullObject",e,"1.3",u),this._ParentTa||(this._ParentTa=new n.Table(this.context,h(this.context,this,"ParentTableOrNullObject",!1,!1,!1))),this._ParentTa},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"tables",{get:function(){return f("Range.tables",e,"1.3",u),this._T||(this._T=new n.TableCollection(this.context,h(this.context,this,"Tables",!0,!1,!1))),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hyperlink",{get:function(){return i("hyperlink",this._H,st,this._isNull),f("Range.hyperlink",e,"1.3",u),this._H},set:function(n){this._H=n;s(this.context,this,"Hyperlink",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"isEmpty",{get:function(){return i("isEmpty",this._Is,st,this._isNull),f("Range.isEmpty",e,"1.3",u),this._Is},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"style",{get:function(){return i("style",this._S,st,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this._St,st,this._isNull),f("Range.styleBuiltIn",e,"1.3",u),this._St},set:function(n){this._St=n;s(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return i("text",this._Te,st,this._isNull),this._Te},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_Id",{get:function(){return i("_Id",this.__I,st,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,st,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["style","hyperlink","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.clear=function(){o(this.context,this,"Clear",0,[],!1)},k.prototype.compareLocationWith=function(n){f("Range.compareLocationWith",e,"1.3",u);var i=o(this.context,this,"CompareLocationWith",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},k.prototype.delete=function(){o(this.context,this,"Delete",0,[],!1)},k.prototype.expandTo=function(t){return f("Range.expandTo",e,"1.3",u),new n.Range(this.context,r(this.context,this,"ExpandTo",0,[t],!1,!1,null,!1))},k.prototype.expandToOrNullObject=function(t){return f("Range.expandToOrNullObject",e,"1.3",u),new n.Range(this.context,r(this.context,this,"ExpandToOrNullObject",0,[t],!1,!1,null,!1))},k.prototype.getHtml=function(){var t=o(this.context,this,"GetHtml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getHyperlinkRanges=function(){return f("Range.getHyperlinkRanges",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"GetHyperlinkRanges",1,[],!0,!1,null,!1))},k.prototype.getNextTextRange=function(t,i){return f("Range.getNextTextRange",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetNextTextRange",1,[t,i],!1,!1,null,!1))},k.prototype.getNextTextRangeOrNullObject=function(t,i){return f("Range.getNextTextRangeOrNullObject",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetNextTextRangeOrNullObject",1,[t,i],!1,!1,null,!1))},k.prototype.getOoxml=function(){var t=o(this.context,this,"GetOoxml",1,[],!1),n=new OfficeExtension.ClientResult;return w(this,t,n),n},k.prototype.getRange=function(t){return f("Range.getRange",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null,!1))},k.prototype.getTextRanges=function(t,i){return f("Range.getTextRanges",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null,!1))},k.prototype.insertBreak=function(n,t){o(this.context,this,"InsertBreak",0,[n,t],!1)},k.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null,!1))},k.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null,!1))},k.prototype.insertInlinePictureFromBase64=function(t,i){return f("Range.insertInlinePictureFromBase64",e,"1.2",u),new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null,!1))},k.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null,!1))},k.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},k.prototype.insertTable=function(t,i,o,s){return f("Range.insertTable",e,"1.3",u),new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,o,s],!1,!0,null,!1))},k.prototype.insertTapObjectFromFileContent=function(t,i,u){return new n.Range(this.context,r(this.context,this,"InsertTapObjectFromFileContent",0,[t,i,u],!1,!0,null,!0))},k.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null,!1))},k.prototype.intersectWith=function(t){return f("Range.intersectWith",e,"1.3",u),new n.Range(this.context,r(this.context,this,"IntersectWith",0,[t],!1,!1,null,!1))},k.prototype.intersectWithOrNullObject=function(t){return f("Range.intersectWithOrNullObject",e,"1.3",u),new n.Range(this.context,r(this.context,this,"IntersectWithOrNullObject",0,[t],!1,!1,null,!1))},k.prototype.search=function(t,i){return i=ct(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null,!1))},k.prototype.select=function(n){o(this.context,this,"Select",1,[n],!1)},k.prototype.split=function(t,i,o,s){return f("Range.split",e,"1.3",u),new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,o,s],!0,!1,null,!1))},k.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},k.prototype._handleResult=function(n){if(b.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Hyperlink)||(this._H=i.Hyperlink);t(i.IsEmpty)||(this._Is=i.IsEmpty);t(i.Style)||(this._S=i.Style);t(i.StyleBuiltIn)||(this._St=i.StyleBuiltIn);t(i.Text)||(this._Te=i.Text);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},k.prototype.load=function(n){return y(this,n)},k.prototype.retrieve=function(n){return p(this,n)},k.prototype._handleIdResult=function(n){(b.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},k.prototype._handleRetrieveResult=function(n,t){b.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return l(this,{hyperlink:this._H,isEmpty:this._Is,style:this._S,styleBuiltIn:this._St,text:this._Te},{font:this._F,inlinePictures:this._I})},k.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Range=fr;ri="RangeCollection";er=function(s){function h(){return s!==null&&s.apply(this,arguments)||this}return __extends(h,s),Object.defineProperty(h.prototype,"_className",{get:function(){return"RangeCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,ri,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ri,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getFirst=function(){return f("RangeCollection.getFirst",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},h.prototype.getFirstOrNullObject=function(){return f("RangeCollection.getFirstOrNullObject",e,"1.3",u),new n.Range(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},h.prototype._GetItem=function(t){return new n.Range(this.context,et(this.context,this,[t]))},h.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,f,u,e;if((s.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],f=r[OfficeExtension.Constants.items],u=0;u<f.length;u++)e=new n.Range(this.context,b(!0,this.context,this,f[u],u)),e._handleResult(f[u]),this.m__items.push(e)},h.prototype.load=function(n){return y(this,n)},h.prototype.retrieve=function(n){return p(this,n)},h.prototype._handleIdResult=function(n){(s.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype._handleRetrieveResult=function(t,i){var r=this;s.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.Range(r.context,b(!0,r.context,r,t,i))})},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return l(this,{},{},this.m__items)},h}(OfficeExtension.ClientObject);n.RangeCollection=er;ht="SearchOptions";or=function(r){function u(){return r!==null&&r.apply(this,arguments)||this}return __extends(u,r),Object.defineProperty(u.prototype,"_className",{get:function(){return"SearchOptions"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_scalarPropertyNames",{get:function(){return["ignorePunct","ignoreSpace","matchCase","matchPrefix","matchSuffix","matchWildcards","matchWholeWord"]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"matchWildCards",{get:function(){return i("matchWildCards",this.m_matchWildcards),this.m_matchWildcards},set:function(n){this.m_matchWildcards=n;s(this.context,this,"MatchWildCards",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"ignorePunct",{get:function(){return i("ignorePunct",this._I,ht,this._isNull),this._I},set:function(n){this._I=n;s(this.context,this,"IgnorePunct",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"ignoreSpace",{get:function(){return i("ignoreSpace",this._Ig,ht,this._isNull),this._Ig},set:function(n){this._Ig=n;s(this.context,this,"IgnoreSpace",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"matchCase",{get:function(){return i("matchCase",this._M,ht,this._isNull),this._M},set:function(n){this._M=n;s(this.context,this,"MatchCase",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"matchPrefix",{get:function(){return i("matchPrefix",this._Ma,ht,this._isNull),this._Ma},set:function(n){this._Ma=n;s(this.context,this,"MatchPrefix",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"matchSuffix",{get:function(){return i("matchSuffix",this._Mat,ht,this._isNull),this._Mat},set:function(n){this._Mat=n;s(this.context,this,"MatchSuffix",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"matchWholeWord",{get:function(){return i("matchWholeWord",this._Matc,ht,this._isNull),this._Matc},set:function(n){this._Matc=n;s(this.context,this,"MatchWholeWord",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"matchWildcards",{get:function(){return i("matchWildcards",this.m_matchWildcards,ht,this._isNull),this.m_matchWildcards},set:function(n){this.m_matchWildcards=n;s(this.context,this,"MatchWildcards",n)},enumerable:!0,configurable:!0}),u.prototype.set=function(n,t){this._recursivelySet(n,t,["ignorePunct","ignoreSpace","matchCase","matchPrefix","matchSuffix","matchWildcards","matchWholeWord"],[],[])},u.prototype.update=function(n){this._recursivelyUpdate(n)},u.prototype._handleResult=function(n){if(r.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.IgnorePunct)||(this._I=i.IgnorePunct);t(i.IgnoreSpace)||(this._Ig=i.IgnoreSpace);t(i.MatchCase)||(this._M=i.MatchCase);t(i.MatchPrefix)||(this._Ma=i.MatchPrefix);t(i.MatchSuffix)||(this._Mat=i.MatchSuffix);t(i.MatchWholeWord)||(this._Matc=i.MatchWholeWord);t(i.MatchWildcards)||(this.m_matchWildcards=i.MatchWildcards)}},u.prototype.load=function(n){return y(this,n)},u.prototype.retrieve=function(n){return p(this,n)},u.prototype._handleRetrieveResult=function(n,t){r.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},u.newObject=function(t){return new n.SearchOptions(t,hi(t,"Microsoft.WordServices.SearchOptions",!1,!1))},u.prototype.toJSON=function(){return l(this,{ignorePunct:this._I,ignoreSpace:this._Ig,matchCase:this._M,matchPrefix:this._Ma,matchSuffix:this._Mat,matchWholeWord:this._Matc,matchWildcards:this.m_matchWildcards},{})},u.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},u}(OfficeExtension.ClientObject);n.SearchOptions=or;ui="Section";sr=function(s){function w(){return s!==null&&s.apply(this,arguments)||this}return __extends(w,s),Object.defineProperty(w.prototype,"_className",{get:function(){return"Section"},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"_navigationPropertyNames",{get:function(){return["body"]},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"body",{get:function(){return this._B||(this._B=new n.Body(this.context,h(this.context,this,"Body",!1,!1,!1))),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"_Id",{get:function(){return i("_Id",this.__I,ui,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ui,this._isNull),this.__R},enumerable:!0,configurable:!0}),w.prototype.set=function(n,t){this._recursivelySet(n,t,[],["body"],[])},w.prototype.update=function(n){this._recursivelyUpdate(n)},w.prototype.getFooter=function(t){return new n.Body(this.context,r(this.context,this,"GetFooter",1,[t],!1,!0,null,!1))},w.prototype.getHeader=function(t){return new n.Body(this.context,r(this.context,this,"GetHeader",1,[t],!1,!0,null,!1))},w.prototype.getNext=function(){return f("Section.getNext",e,"1.3",u),new n.Section(this.context,r(this.context,this,"GetNext",1,[],!1,!1,null,!1))},w.prototype.getNextOrNullObject=function(){return f("Section.getNextOrNullObject",e,"1.3",u),new n.Section(this.context,r(this.context,this,"GetNextOrNullObject",1,[],!1,!1,null,!1))},w.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},w.prototype._handleResult=function(n){if(s.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["body","Body"])}},w.prototype.load=function(n){return y(this,n)},w.prototype.retrieve=function(n){return p(this,n)},w.prototype._handleIdResult=function(n){(s.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},w.prototype._handleRetrieveResult=function(n,t){s.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},w.prototype.track=function(){return this.context.trackedObjects.add(this),this},w.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},w.prototype.toJSON=function(){return l(this,{},{body:this._B})},w.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},w}(OfficeExtension.ClientObject);n.Section=sr;fi="SectionCollection";hr=function(s){function h(){return s!==null&&s.apply(this,arguments)||this}return __extends(h,s),Object.defineProperty(h.prototype,"_className",{get:function(){return"SectionCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,fi,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,fi,this._isNull),this.__R},enumerable:!0,configurable:!0}),h.prototype.getFirst=function(){return f("SectionCollection.getFirst",e,"1.3",u),new n.Section(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},h.prototype.getFirstOrNullObject=function(){return f("SectionCollection.getFirstOrNullObject",e,"1.3",u),new n.Section(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},h.prototype._GetItem=function(t){return new n.Section(this.context,et(this.context,this,[t]))},h.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},h.prototype._handleResult=function(i){var r,f,u,e;if((s.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],f=r[OfficeExtension.Constants.items],u=0;u<f.length;u++)e=new n.Section(this.context,b(!0,this.context,this,f[u],u)),e._handleResult(f[u]),this.m__items.push(e)},h.prototype.load=function(n){return y(this,n)},h.prototype.retrieve=function(n){return p(this,n)},h.prototype._handleIdResult=function(n){(s.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},h.prototype._handleRetrieveResult=function(t,i){var r=this;s.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.Section(r.context,b(!0,r.context,r,t,i))})},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return l(this,{},{},this.m__items)},h}(OfficeExtension.ClientObject);n.SectionCollection=hr;k="Table";cr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"Table"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","isUniform","nestingLevel","values","style","rowCount","headerRowCount","styleTotalRow","styleFirstColumn","styleLastColumn","styleBandedRows","styleBandedColumns","shadingColor","horizontalAlignment","verticalAlignment","width","styleBuiltIn","alignment"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_navigationPropertyNames",{get:function(){return["rows","tables","parentTableCell","parentTable","font","parentContentControl","parentBody","parentTableCellOrNullObject","parentTableOrNullObject","parentContentControlOrNullObject"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"font",{get:function(){return this._F||(this._F=new n.Font(this.context,h(this.context,this,"Font",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentBody",{get:function(){return this._P||(this._P=new n.Body(this.context,h(this.context,this,"ParentBody",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentContentControl",{get:function(){return this._Pa||(this._Pa=new n.ContentControl(this.context,h(this.context,this,"ParentContentControl",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentContentControlOrNullObject",{get:function(){return this._Par||(this._Par=new n.ContentControl(this.context,h(this.context,this,"ParentContentControlOrNullObject",!1,!1,!1))),this._Par},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTable",{get:function(){return this._Pare||(this._Pare=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._Pare},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTableCell",{get:function(){return this._Paren||(this._Paren=new n.TableCell(this.context,h(this.context,this,"ParentTableCell",!1,!1,!1))),this._Paren},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTableCellOrNullObject",{get:function(){return this._Parent||(this._Parent=new n.TableCell(this.context,h(this.context,this,"ParentTableCellOrNullObject",!1,!1,!1))),this._Parent},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTableOrNullObject",{get:function(){return this._ParentT||(this._ParentT=new n.Table(this.context,h(this.context,this,"ParentTableOrNullObject",!1,!1,!1))),this._ParentT},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.TableRowCollection(this.context,h(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"tables",{get:function(){return this._T||(this._T=new n.TableCollection(this.context,h(this.context,this,"Tables",!0,!1,!1))),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"alignment",{get:function(){return i("alignment",this._A,k,this._isNull),this._A},set:function(n){this._A=n;s(this.context,this,"Alignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"headerRowCount",{get:function(){return i("headerRowCount",this._H,k,this._isNull),this._H},set:function(n){this._H=n;s(this.context,this,"HeaderRowCount",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"horizontalAlignment",{get:function(){return i("horizontalAlignment",this._Ho,k,this._isNull),this._Ho},set:function(n){this._Ho=n;s(this.context,this,"HorizontalAlignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isUniform",{get:function(){return i("isUniform",this._I,k,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"nestingLevel",{get:function(){return i("nestingLevel",this._N,k,this._isNull),this._N},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"rowCount",{get:function(){return i("rowCount",this._R,k,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shadingColor",{get:function(){return i("shadingColor",this._S,k,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"ShadingColor",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"style",{get:function(){return i("style",this._St,k,this._isNull),this._St},set:function(n){this._St=n;s(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleBandedColumns",{get:function(){return i("styleBandedColumns",this._Sty,k,this._isNull),this._Sty},set:function(n){this._Sty=n;s(this.context,this,"StyleBandedColumns",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleBandedRows",{get:function(){return i("styleBandedRows",this._Styl,k,this._isNull),this._Styl},set:function(n){this._Styl=n;s(this.context,this,"StyleBandedRows",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this._Style,k,this._isNull),this._Style},set:function(n){this._Style=n;s(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleFirstColumn",{get:function(){return i("styleFirstColumn",this._StyleF,k,this._isNull),this._StyleF},set:function(n){this._StyleF=n;s(this.context,this,"StyleFirstColumn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleLastColumn",{get:function(){return i("styleLastColumn",this._StyleL,k,this._isNull),this._StyleL},set:function(n){this._StyleL=n;s(this.context,this,"StyleLastColumn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleTotalRow",{get:function(){return i("styleTotalRow",this._StyleT,k,this._isNull),this._StyleT},set:function(n){this._StyleT=n;s(this.context,this,"StyleTotalRow",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"values",{get:function(){return i("values",this._V,k,this._isNull),this._V},set:function(n){this._V=n;s(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"verticalAlignment",{get:function(){return i("verticalAlignment",this._Ve,k,this._isNull),this._Ve},set:function(n){this._Ve=n;s(this.context,this,"VerticalAlignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"width",{get:function(){return i("width",this._W,k,this._isNull),this._W},set:function(n){this._W=n;s(this.context,this,"Width",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_Id",{get:function(){return i("_Id",this.__I,k,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,k,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.set=function(n,t){this._recursivelySet(n,t,["values","style","headerRowCount","styleTotalRow","styleFirstColumn","styleLastColumn","styleBandedRows","styleBandedColumns","shadingColor","horizontalAlignment","verticalAlignment","width","styleBuiltIn","alignment"],["font"],["parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","rows","tables"])},f.prototype.update=function(n){this._recursivelyUpdate(n)},f.prototype.addColumns=function(n,t,i){o(this.context,this,"AddColumns",0,[n,t,i],!1)},f.prototype.addRows=function(t,i,u){return new n.TableRowCollection(this.context,r(this.context,this,"AddRows",0,[t,i,u],!0,!1,null,!1))},f.prototype.autoFitWindow=function(){o(this.context,this,"AutoFitWindow",0,[],!1)},f.prototype.clear=function(){o(this.context,this,"Clear",0,[],!1)},f.prototype.delete=function(){o(this.context,this,"Delete",0,[],!1)},f.prototype.deleteColumns=function(n,t){o(this.context,this,"DeleteColumns",0,[n,t],!1)},f.prototype.deleteRows=function(n,t){o(this.context,this,"DeleteRows",0,[n,t],!1)},f.prototype.distributeColumns=function(){o(this.context,this,"DistributeColumns",0,[],!1)},f.prototype.getBorder=function(t){return new n.TableBorder(this.context,r(this.context,this,"GetBorder",1,[t],!1,!1,null,!1))},f.prototype.getCell=function(t,i){return new n.TableCell(this.context,r(this.context,this,"GetCell",1,[t,i],!1,!1,null,!1))},f.prototype.getCellOrNullObject=function(t,i){return new n.TableCell(this.context,r(this.context,this,"GetCellOrNullObject",1,[t,i],!1,!1,null,!1))},f.prototype.getCellPadding=function(n){var i=o(this.context,this,"GetCellPadding",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},f.prototype.getNext=function(){return new n.Table(this.context,r(this.context,this,"GetNext",1,[],!1,!1,null,!1))},f.prototype.getNextOrNullObject=function(){return new n.Table(this.context,r(this.context,this,"GetNextOrNullObject",1,[],!1,!1,null,!1))},f.prototype.getParagraphAfter=function(){return new n.Paragraph(this.context,r(this.context,this,"GetParagraphAfter",1,[],!1,!1,null,!1))},f.prototype.getParagraphAfterOrNullObject=function(){return new n.Paragraph(this.context,r(this.context,this,"GetParagraphAfterOrNullObject",1,[],!1,!1,null,!1))},f.prototype.getParagraphBefore=function(){return new n.Paragraph(this.context,r(this.context,this,"GetParagraphBefore",1,[],!1,!1,null,!1))},f.prototype.getParagraphBeforeOrNullObject=function(){return new n.Paragraph(this.context,r(this.context,this,"GetParagraphBeforeOrNullObject",1,[],!1,!1,null,!1))},f.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null,!1))},f.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null,!1))},f.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null,!1))},f.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null,!1))},f.prototype.search=function(t,i){return i=ct(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null,!1))},f.prototype.select=function(n){o(this.context,this,"Select",1,[n],!1)},f.prototype.setCellPadding=function(n,t){o(this.context,this,"SetCellPadding",0,[n,t],!1)},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(n){if(u.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.Alignment)||(this._A=i.Alignment);t(i.HeaderRowCount)||(this._H=i.HeaderRowCount);t(i.HorizontalAlignment)||(this._Ho=i.HorizontalAlignment);t(i.IsUniform)||(this._I=i.IsUniform);t(i.NestingLevel)||(this._N=i.NestingLevel);t(i.RowCount)||(this._R=i.RowCount);t(i.ShadingColor)||(this._S=i.ShadingColor);t(i.Style)||(this._St=i.Style);t(i.StyleBandedColumns)||(this._Sty=i.StyleBandedColumns);t(i.StyleBandedRows)||(this._Styl=i.StyleBandedRows);t(i.StyleBuiltIn)||(this._Style=i.StyleBuiltIn);t(i.StyleFirstColumn)||(this._StyleF=i.StyleFirstColumn);t(i.StyleLastColumn)||(this._StyleL=i.StyleLastColumn);t(i.StyleTotalRow)||(this._StyleT=i.StyleTotalRow);t(i.Values)||(this._V=i.Values);t(i.VerticalAlignment)||(this._Ve=i.VerticalAlignment);t(i.Width)||(this._W=i.Width);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["font","Font","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","rows","Rows","tables","Tables"])}},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},f.prototype._handleRetrieveResult=function(n,t){u.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{alignment:this._A,headerRowCount:this._H,horizontalAlignment:this._Ho,isUniform:this._I,nestingLevel:this._N,rowCount:this._R,shadingColor:this._S,style:this._St,styleBandedColumns:this._Sty,styleBandedRows:this._Styl,styleBuiltIn:this._Style,styleFirstColumn:this._StyleF,styleLastColumn:this._StyleL,styleTotalRow:this._StyleT,values:this._V,verticalAlignment:this._Ve,width:this._W},{font:this._F,rows:this._Ro,tables:this._T})},f.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},f}(OfficeExtension.ClientObject);n.Table=cr;ei="TableCollection";lr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"TableCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"items",{get:function(){return i("items",this.m__items,ei,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ei,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.getFirst=function(){return new n.Table(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},f.prototype.getFirstOrNullObject=function(){return new n.Table(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},f.prototype._GetItem=function(t){return new n.Table(this.context,et(this.context,this,[t]))},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(i){var r,e,f,o;if((u.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f<e.length;f++)o=new n.Table(this.context,b(!0,this.context,this,e[f],f)),o._handleResult(e[f]),this.m__items.push(o)},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},f.prototype._handleRetrieveResult=function(t,i){var r=this;u.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.Table(r.context,b(!0,r.context,r,t,i))})},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{},{},this.m__items)},f}(OfficeExtension.ClientObject);n.TableCollection=lr;ut="TableRow";ar=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"TableRow"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","cellCount","rowIndex","values","shadingColor","horizontalAlignment","verticalAlignment","isHeader","preferredHeight"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!0,!0,!0,!0,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_navigationPropertyNames",{get:function(){return["cells","parentTable","font"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"cells",{get:function(){return this._Ce||(this._Ce=new n.TableCellCollection(this.context,h(this.context,this,"Cells",!0,!1,!1))),this._Ce},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"font",{get:function(){return this._F||(this._F=new n.Font(this.context,h(this.context,this,"Font",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTable",{get:function(){return this._P||(this._P=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"cellCount",{get:function(){return i("cellCount",this._C,ut,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"horizontalAlignment",{get:function(){return i("horizontalAlignment",this._H,ut,this._isNull),this._H},set:function(n){this._H=n;s(this.context,this,"HorizontalAlignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isHeader",{get:function(){return i("isHeader",this._I,ut,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"preferredHeight",{get:function(){return i("preferredHeight",this._Pr,ut,this._isNull),this._Pr},set:function(n){this._Pr=n;s(this.context,this,"PreferredHeight",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"rowIndex",{get:function(){return i("rowIndex",this._R,ut,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shadingColor",{get:function(){return i("shadingColor",this._S,ut,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"ShadingColor",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"values",{get:function(){return i("values",this._V,ut,this._isNull),this._V},set:function(n){this._V=n;s(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"verticalAlignment",{get:function(){return i("verticalAlignment",this._Ve,ut,this._isNull),this._Ve},set:function(n){this._Ve=n;s(this.context,this,"VerticalAlignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_Id",{get:function(){return i("_Id",this.__I,ut,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ut,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.set=function(n,t){this._recursivelySet(n,t,["values","shadingColor","horizontalAlignment","verticalAlignment","preferredHeight"],["font"],["cells","parentTable"])},f.prototype.update=function(n){this._recursivelyUpdate(n)},f.prototype.clear=function(){o(this.context,this,"Clear",0,[],!1)},f.prototype.delete=function(){o(this.context,this,"Delete",0,[],!1)},f.prototype.getBorder=function(t){return new n.TableBorder(this.context,r(this.context,this,"GetBorder",1,[t],!1,!1,null,!1))},f.prototype.getCellPadding=function(n){var i=o(this.context,this,"GetCellPadding",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},f.prototype.getNext=function(){return new n.TableRow(this.context,r(this.context,this,"GetNext",1,[],!1,!1,null,!1))},f.prototype.getNextOrNullObject=function(){return new n.TableRow(this.context,r(this.context,this,"GetNextOrNullObject",1,[],!1,!1,null,!1))},f.prototype.insertRows=function(t,i,u){return new n.TableRowCollection(this.context,r(this.context,this,"InsertRows",1,[t,i,u],!0,!1,null,!1))},f.prototype.search=function(t,i){return i=ct(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null,!1))},f.prototype.select=function(n){o(this.context,this,"Select",1,[n],!1)},f.prototype.setCellPadding=function(n,t){o(this.context,this,"SetCellPadding",0,[n,t],!1)},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(n){if(u.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.CellCount)||(this._C=i.CellCount);t(i.HorizontalAlignment)||(this._H=i.HorizontalAlignment);t(i.IsHeader)||(this._I=i.IsHeader);t(i.PreferredHeight)||(this._Pr=i.PreferredHeight);t(i.RowIndex)||(this._R=i.RowIndex);t(i.ShadingColor)||(this._S=i.ShadingColor);t(i.Values)||(this._V=i.Values);t(i.VerticalAlignment)||(this._Ve=i.VerticalAlignment);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["cells","Cells","font","Font","parentTable","ParentTable"])}},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},f.prototype._handleRetrieveResult=function(n,t){u.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{cellCount:this._C,horizontalAlignment:this._H,isHeader:this._I,preferredHeight:this._Pr,rowIndex:this._R,shadingColor:this._S,values:this._V,verticalAlignment:this._Ve},{cells:this._Ce,font:this._F})},f.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},f}(OfficeExtension.ClientObject);n.TableRow=ar;oi="TableRowCollection";vr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"TableRowCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"items",{get:function(){return i("items",this.m__items,oi,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,oi,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.getFirst=function(){return new n.TableRow(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},f.prototype.getFirstOrNullObject=function(){return new n.TableRow(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},f.prototype._GetItem=function(t){return new n.TableRow(this.context,et(this.context,this,[t]))},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(i){var r,e,f,o;if((u.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f<e.length;f++)o=new n.TableRow(this.context,b(!0,this.context,this,e[f],f)),o._handleResult(e[f]),this.m__items.push(o)},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},f.prototype._handleRetrieveResult=function(t,i){var r=this;u.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.TableRow(r.context,b(!0,r.context,r,t,i))})},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{},{},this.m__items)},f}(OfficeExtension.ClientObject);n.TableRowCollection=vr;ft="TableCell";yr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"TableCell"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_Id","_ReferenceId","rowIndex","cellIndex","value","shadingColor","horizontalAlignment","verticalAlignment","columnWidth","width"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!0,!0,!0,!0,!0,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_navigationPropertyNames",{get:function(){return["parentTable","parentRow","body"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"body",{get:function(){return this._B||(this._B=new n.Body(this.context,h(this.context,this,"Body",!1,!1,!1))),this._B},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentRow",{get:function(){return this._P||(this._P=new n.TableRow(this.context,h(this.context,this,"ParentRow",!1,!1,!1))),this._P},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTable",{get:function(){return this._Pa||(this._Pa=new n.Table(this.context,h(this.context,this,"ParentTable",!1,!1,!1))),this._Pa},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"cellIndex",{get:function(){return i("cellIndex",this._C,ft,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"columnWidth",{get:function(){return i("columnWidth",this._Co,ft,this._isNull),this._Co},set:function(n){this._Co=n;s(this.context,this,"ColumnWidth",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"horizontalAlignment",{get:function(){return i("horizontalAlignment",this._H,ft,this._isNull),this._H},set:function(n){this._H=n;s(this.context,this,"HorizontalAlignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"rowIndex",{get:function(){return i("rowIndex",this._R,ft,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shadingColor",{get:function(){return i("shadingColor",this._S,ft,this._isNull),this._S},set:function(n){this._S=n;s(this.context,this,"ShadingColor",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"value",{get:function(){return i("value",this._V,ft,this._isNull),this._V},set:function(n){this._V=n;s(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"verticalAlignment",{get:function(){return i("verticalAlignment",this._Ve,ft,this._isNull),this._Ve},set:function(n){this._Ve=n;s(this.context,this,"VerticalAlignment",n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"width",{get:function(){return i("width",this._W,ft,this._isNull),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_Id",{get:function(){return i("_Id",this.__I,ft,this._isNull),this.__I},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,ft,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.set=function(n,t){this._recursivelySet(n,t,["value","shadingColor","horizontalAlignment","verticalAlignment","columnWidth"],["body"],["parentRow","parentTable"])},f.prototype.update=function(n){this._recursivelyUpdate(n)},f.prototype.deleteColumn=function(){o(this.context,this,"DeleteColumn",0,[],!1)},f.prototype.deleteRow=function(){o(this.context,this,"DeleteRow",0,[],!1)},f.prototype.getBorder=function(t){return new n.TableBorder(this.context,r(this.context,this,"GetBorder",1,[t],!1,!1,null,!1))},f.prototype.getCellPadding=function(n){var i=o(this.context,this,"GetCellPadding",1,[n],!1),t=new OfficeExtension.ClientResult;return w(this,i,t),t},f.prototype.getNext=function(){return new n.TableCell(this.context,r(this.context,this,"GetNext",1,[],!1,!1,null,!1))},f.prototype.getNextOrNullObject=function(){return new n.TableCell(this.context,r(this.context,this,"GetNextOrNullObject",1,[],!1,!1,null,!1))},f.prototype.insertColumns=function(n,t,i){o(this.context,this,"InsertColumns",0,[n,t,i],!1)},f.prototype.insertRows=function(t,i,u){return new n.TableRowCollection(this.context,r(this.context,this,"InsertRows",0,[t,i,u],!0,!1,null,!1))},f.prototype.setCellPadding=function(n,t){o(this.context,this,"SetCellPadding",0,[n,t],!1)},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(n){if(u.prototype._handleResult.call(this,n),!c(n)){var i=n;a(this,i);t(i.CellIndex)||(this._C=i.CellIndex);t(i.ColumnWidth)||(this._Co=i.ColumnWidth);t(i.HorizontalAlignment)||(this._H=i.HorizontalAlignment);t(i.RowIndex)||(this._R=i.RowIndex);t(i.ShadingColor)||(this._S=i.ShadingColor);t(i.Value)||(this._V=i.Value);t(i.VerticalAlignment)||(this._Ve=i.VerticalAlignment);t(i.Width)||(this._W=i.Width);t(i._Id)||(this.__I=i._Id);t(i._ReferenceId)||(this.__R=i._ReferenceId);it(this,i,["body","Body","parentRow","ParentRow","parentTable","ParentTable"])}},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||(t(n._ReferenceId)||(this.__R=n._ReferenceId),t(n._Id)||(this.__I=n._Id))},f.prototype._handleRetrieveResult=function(n,t){u.prototype._handleRetrieveResult.call(this,n,t);v(this,n,t)},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{cellIndex:this._C,columnWidth:this._Co,horizontalAlignment:this._H,rowIndex:this._R,shadingColor:this._S,value:this._V,verticalAlignment:this._Ve,width:this._W},{body:this._B})},f.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},f}(OfficeExtension.ClientObject);n.TableCell=yr;si="TableCellCollection";pr=function(u){function f(){return u!==null&&u.apply(this,arguments)||this}return __extends(f,u),Object.defineProperty(f.prototype,"_className",{get:function(){return"TableCellCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId"]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"items",{get:function(){return i("items",this.m__items,si,this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,si,this._isNull),this.__R},enumerable:!0,configurable:!0}),f.prototype.getFirst=function(){return new n.TableCell(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null,!1))},f.prototype.getFirstOrNullObject=function(){return new n.TableCell(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null,!1))},f.prototype._GetItem=function(t){return new n.TableCell(this.context,et(this.context,this,[t]))},f.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},f.prototype._handleResult=function(i){var r,e,f,o;if((u.prototype._handleResult.call(this,i),!c(i))&&(r=i,a(this,r),t(r._ReferenceId)||(this.__R=r._ReferenceId),!c(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f<e.length;f++)o=new n.TableCell(this.context,b(!0,this.context,this,e[f],f)),o._handleResult(e[f]),this.m__items.push(o)},f.prototype.load=function(n){return y(this,n)},f.prototype.retrieve=function(n){return p(this,n)},f.prototype._handleIdResult=function(n){(u.prototype._handleIdResult.call(this,n),c(n))||t(n._ReferenceId)||(this.__R=n._ReferenceId)},f.prototype._handleRetrieveResult=function(t,i){var r=this;u.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i,function(t,i){return new n.TableCell(r.context,b(!0,r.context,r,t,i))})},f.prototype.track=function(){return this.context.trackedObjects.add(this),this},f.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},f.prototype.toJSON=function(){return l(this,{},{},this.m__items)},f}(OfficeExtension.ClientObject);n.TableCellCollection=pr;wt="TableBorder";wr=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"TableBorder"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","color","type","width"]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!0,!0,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"color",{get:function(){return i("color",this._C,wt,this._isNull),this._C},set:function(n){this._C=n;s(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return i("type",this._T,wt,this._isNull),this._T},set:function(n){this._T=n;s(this.context,this,"Type",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return i("width",this._W,wt,this._isNull),this._W},set:function(n){this._W=n;s(this.context,this,"Width",n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.__R,wt,this._isNull),this.__R},enumerable:!0,configurable:!0}),r.prototype.set=function(n,t){this._recursivelySet(n,t,["color","type","width"],[],[])},r.prototype.update=function(n){this._recursivelyUpdate(n)},r.prototype._KeepReference=function(){o(this.context,this,"_KeepReference",1,[],!1)},r.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!c(i)){var r=i;a(this,r);t(r.Color)||(this._C=r.Color);t(r.Type)||(this._T=r.Type);t(r.Width)||(this._W=r.Width);t(r._ReferenceId)||(this.__R=r._ReferenceId)}},r.prototype.load=function(n){return y(this,n)},r.prototype.retrieve=function(n){return p(this,n)},r.prototype._handleIdResult=function(i){(n.prototype._handleIdResult.call(this,i),c(i))||t(i._ReferenceId)||(this.__R=i._ReferenceId)},r.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);v(this,t,i)},r.prototype.track=function(){return this.context.trackedObjects.add(this),this},r.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},r.prototype.toJSON=function(){return l(this,{color:this._C,type:this._T,width:this._W},{})},r.prototype.ensureUnchanged=function(n){nt(this.context,this,n);return},r}(OfficeExtension.ClientObject);n.TableBorder=wr,function(n){n.unknown="Unknown";n.richTextInline="RichTextInline";n.richTextParagraphs="RichTextParagraphs";n.richTextTableCell="RichTextTableCell";n.richTextTableRow="RichTextTableRow";n.richTextTable="RichTextTable";n.plainTextInline="PlainTextInline";n.plainTextParagraph="PlainTextParagraph";n.picture="Picture";n.buildingBlockGallery="BuildingBlockGallery";n.checkBox="CheckBox";n.comboBox="ComboBox";n.dropDownList="DropDownList";n.datePicker="DatePicker";n.repeatingSection="RepeatingSection";n.richText="RichText";n.plainText="PlainText"}(kr=n.ContentControlType||(n.ContentControlType={})),function(n){n.boundingBox="BoundingBox";n.tags="Tags";n.hidden="Hidden"}(dr=n.ContentControlAppearance||(n.ContentControlAppearance={})),function(n){n.mixed="Mixed";n.none="None";n.hidden="Hidden";n.dotLine="DotLine";n.single="Single";n.word="Word";n.double="Double";n.thick="Thick";n.dotted="Dotted";n.dottedHeavy="DottedHeavy";n.dashLine="DashLine";n.dashLineHeavy="DashLineHeavy";n.dashLineLong="DashLineLong";n.dashLineLongHeavy="DashLineLongHeavy";n.dotDashLine="DotDashLine";n.dotDashLineHeavy="DotDashLineHeavy";n.twoDotDashLine="TwoDotDashLine";n.twoDotDashLineHeavy="TwoDotDashLineHeavy";n.wave="Wave";n.waveHeavy="WaveHeavy";n.waveDouble="WaveDouble"}(gr=n.UnderlineType||(n.UnderlineType={})),function(n){n.page="Page";n.next="Next";n.sectionNext="SectionNext";n.sectionContinuous="SectionContinuous";n.sectionEven="SectionEven";n.sectionOdd="SectionOdd";n.line="Line"}(nu=n.BreakType||(n.BreakType={})),function(n){n.before="Before";n.after="After";n.start="Start";n.end="End";n.replace="Replace"}(tu=n.InsertLocation||(n.InsertLocation={})),function(n){n.mixed="Mixed";n.unknown="Unknown";n.left="Left";n.centered="Centered";n.right="Right";n.justified="Justified"}(iu=n.Alignment||(n.Alignment={})),function(n){n.primary="Primary";n.firstPage="FirstPage";n.evenPages="EvenPages"}(ru=n.HeaderFooterType||(n.HeaderFooterType={})),function(n){n.unknown="Unknown";n.mainDoc="MainDoc";n.section="Section";n.header="Header";n.footer="Footer";n.tableCell="TableCell"}(uu=n.BodyType||(n.BodyType={})),function(n){n.select="Select";n.start="Start";n.end="End"}(fu=n.SelectionMode||(n.SelectionMode={})),function(n){n.unsupported="Unsupported";n.undefined="Undefined";n.bmp="Bmp";n.jpeg="Jpeg";n.gif="Gif";n.tiff="Tiff";n.png="Png";n.icon="Icon";n.exif="Exif";n.wmf="Wmf";n.emf="Emf";n.pict="Pict";n.pdf="Pdf";n.svg="Svg"}(eu=n.ImageFormat||(n.ImageFormat={})),function(n){n.whole="Whole";n.start="Start";n.end="End";n.before="Before";n.after="After";n.content="Content"}(ou=n.RangeLocation||(n.RangeLocation={})),function(n){n.unrelated="Unrelated";n.equal="Equal";n.containsStart="ContainsStart";n.containsEnd="ContainsEnd";n.contains="Contains";n.insideStart="InsideStart";n.insideEnd="InsideEnd";n.inside="Inside";n.adjacentBefore="AdjacentBefore";n.overlapsBefore="OverlapsBefore";n.before="Before";n.adjacentAfter="AdjacentAfter";n.overlapsAfter="OverlapsAfter";n.after="After"}(su=n.LocationRelation||(n.LocationRelation={})),function(n){n.top="Top";n.left="Left";n.bottom="Bottom";n.right="Right";n.insideHorizontal="InsideHorizontal";n.insideVertical="InsideVertical";n.inside="Inside";n.outside="Outside";n.all="All"}(hu=n.BorderLocation||(n.BorderLocation={})),function(n){n.top="Top";n.left="Left";n.bottom="Bottom";n.right="Right"}(cu=n.CellPaddingLocation||(n.CellPaddingLocation={})),function(n){n.mixed="Mixed";n.none="None";n.single="Single";n.double="Double";n.dotted="Dotted";n.dashed="Dashed";n.dotDashed="DotDashed";n.dot2Dashed="Dot2Dashed";n.triple="Triple";n.thinThickSmall="ThinThickSmall";n.thickThinSmall="ThickThinSmall";n.thinThickThinSmall="ThinThickThinSmall";n.thinThickMed="ThinThickMed";n.thickThinMed="ThickThinMed";n.thinThickThinMed="ThinThickThinMed";n.thinThickLarge="ThinThickLarge";n.thickThinLarge="ThickThinLarge";n.thinThickThinLarge="ThinThickThinLarge";n.wave="Wave";n.doubleWave="DoubleWave";n.dashedSmall="DashedSmall";n.dashDotStroked="DashDotStroked";n.threeDEmboss="ThreeDEmboss";n.threeDEngrave="ThreeDEngrave"}(lu=n.BorderType||(n.BorderType={})),function(n){n.mixed="Mixed";n.top="Top";n.center="Center";n.bottom="Bottom"}(au=n.VerticalAlignment||(n.VerticalAlignment={})),function(n){n.bullet="Bullet";n.number="Number";n.picture="Picture"}(vu=n.ListLevelType||(n.ListLevelType={})),function(n){n.custom="Custom";n.solid="Solid";n.hollow="Hollow";n.square="Square";n.diamonds="Diamonds";n.arrow="Arrow";n.checkmark="Checkmark"}(yu=n.ListBullet||(n.ListBullet={})),function(n){n.none="None";n.arabic="Arabic";n.upperRoman="UpperRoman";n.lowerRoman="LowerRoman";n.upperLetter="UpperLetter";n.lowerLetter="LowerLetter"}(pu=n.ListNumbering||(n.ListNumbering={})),function(n){n.other="Other";n.normal="Normal";n.heading1="Heading1";n.heading2="Heading2";n.heading3="Heading3";n.heading4="Heading4";n.heading5="Heading5";n.heading6="Heading6";n.heading7="Heading7";n.heading8="Heading8";n.heading9="Heading9";n.toc1="Toc1";n.toc2="Toc2";n.toc3="Toc3";n.toc4="Toc4";n.toc5="Toc5";n.toc6="Toc6";n.toc7="Toc7";n.toc8="Toc8";n.toc9="Toc9";n.footnoteText="FootnoteText";n.header="Header";n.footer="Footer";n.caption="Caption";n.footnoteReference="FootnoteReference";n.endnoteReference="EndnoteReference";n.endnoteText="EndnoteText";n.title="Title";n.subtitle="Subtitle";n.hyperlink="Hyperlink";n.strong="Strong";n.emphasis="Emphasis";n.noSpacing="NoSpacing";n.listParagraph="ListParagraph";n.quote="Quote";n.intenseQuote="IntenseQuote";n.subtleEmphasis="SubtleEmphasis";n.intenseEmphasis="IntenseEmphasis";n.subtleReference="SubtleReference";n.intenseReference="IntenseReference";n.bookTitle="BookTitle";n.bibliography="Bibliography";n.tocHeading="TocHeading";n.tableGrid="TableGrid";n.plainTable1="PlainTable1";n.plainTable2="PlainTable2";n.plainTable3="PlainTable3";n.plainTable4="PlainTable4";n.plainTable5="PlainTable5";n.tableGridLight="TableGridLight";n.gridTable1Light="GridTable1Light";n.gridTable1Light_Accent1="GridTable1Light_Accent1";n.gridTable1Light_Accent2="GridTable1Light_Accent2";n.gridTable1Light_Accent3="GridTable1Light_Accent3";n.gridTable1Light_Accent4="GridTable1Light_Accent4";n.gridTable1Light_Accent5="GridTable1Light_Accent5";n.gridTable1Light_Accent6="GridTable1Light_Accent6";n.gridTable2="GridTable2";n.gridTable2_Accent1="GridTable2_Accent1";n.gridTable2_Accent2="GridTable2_Accent2";n.gridTable2_Accent3="GridTable2_Accent3";n.gridTable2_Accent4="GridTable2_Accent4";n.gridTable2_Accent5="GridTable2_Accent5";n.gridTable2_Accent6="GridTable2_Accent6";n.gridTable3="GridTable3";n.gridTable3_Accent1="GridTable3_Accent1";n.gridTable3_Accent2="GridTable3_Accent2";n.gridTable3_Accent3="GridTable3_Accent3";n.gridTable3_Accent4="GridTable3_Accent4";n.gridTable3_Accent5="GridTable3_Accent5";n.gridTable3_Accent6="GridTable3_Accent6";n.gridTable4="GridTable4";n.gridTable4_Accent1="GridTable4_Accent1";n.gridTable4_Accent2="GridTable4_Accent2";n.gridTable4_Accent3="GridTable4_Accent3";n.gridTable4_Accent4="GridTable4_Accent4";n.gridTable4_Accent5="GridTable4_Accent5";n.gridTable4_Accent6="GridTable4_Accent6";n.gridTable5Dark="GridTable5Dark";n.gridTable5Dark_Accent1="GridTable5Dark_Accent1";n.gridTable5Dark_Accent2="GridTable5Dark_Accent2";n.gridTable5Dark_Accent3="GridTable5Dark_Accent3";n.gridTable5Dark_Accent4="GridTable5Dark_Accent4";n.gridTable5Dark_Accent5="GridTable5Dark_Accent5";n.gridTable5Dark_Accent6="GridTable5Dark_Accent6";n.gridTable6Colorful="GridTable6Colorful";n.gridTable6Colorful_Accent1="GridTable6Colorful_Accent1";n.gridTable6Colorful_Accent2="GridTable6Colorful_Accent2";n.gridTable6Colorful_Accent3="GridTable6Colorful_Accent3";n.gridTable6Colorful_Accent4="GridTable6Colorful_Accent4";n.gridTable6Colorful_Accent5="GridTable6Colorful_Accent5";n.gridTable6Colorful_Accent6="GridTable6Colorful_Accent6";n.gridTable7Colorful="GridTable7Colorful";n.gridTable7Colorful_Accent1="GridTable7Colorful_Accent1";n.gridTable7Colorful_Accent2="GridTable7Colorful_Accent2";n.gridTable7Colorful_Accent3="GridTable7Colorful_Accent3";n.gridTable7Colorful_Accent4="GridTable7Colorful_Accent4";n.gridTable7Colorful_Accent5="GridTable7Colorful_Accent5";n.gridTable7Colorful_Accent6="GridTable7Colorful_Accent6";n.listTable1Light="ListTable1Light";n.listTable1Light_Accent1="ListTable1Light_Accent1";n.listTable1Light_Accent2="ListTable1Light_Accent2";n.listTable1Light_Accent3="ListTable1Light_Accent3";n.listTable1Light_Accent4="ListTable1Light_Accent4";n.listTable1Light_Accent5="ListTable1Light_Accent5";n.listTable1Light_Accent6="ListTable1Light_Accent6";n.listTable2="ListTable2";n.listTable2_Accent1="ListTable2_Accent1";n.listTable2_Accent2="ListTable2_Accent2";n.listTable2_Accent3="ListTable2_Accent3";n.listTable2_Accent4="ListTable2_Accent4";n.listTable2_Accent5="ListTable2_Accent5";n.listTable2_Accent6="ListTable2_Accent6";n.listTable3="ListTable3";n.listTable3_Accent1="ListTable3_Accent1";n.listTable3_Accent2="ListTable3_Accent2";n.listTable3_Accent3="ListTable3_Accent3";n.listTable3_Accent4="ListTable3_Accent4";n.listTable3_Accent5="ListTable3_Accent5";n.listTable3_Accent6="ListTable3_Accent6";n.listTable4="ListTable4";n.listTable4_Accent1="ListTable4_Accent1";n.listTable4_Accent2="ListTable4_Accent2";n.listTable4_Accent3="ListTable4_Accent3";n.listTable4_Accent4="ListTable4_Accent4";n.listTable4_Accent5="ListTable4_Accent5";n.listTable4_Accent6="ListTable4_Accent6";n.listTable5Dark="ListTable5Dark";n.listTable5Dark_Accent1="ListTable5Dark_Accent1";n.listTable5Dark_Accent2="ListTable5Dark_Accent2";n.listTable5Dark_Accent3="ListTable5Dark_Accent3";n.listTable5Dark_Accent4="ListTable5Dark_Accent4";n.listTable5Dark_Accent5="ListTable5Dark_Accent5";n.listTable5Dark_Accent6="ListTable5Dark_Accent6";n.listTable6Colorful="ListTable6Colorful";n.listTable6Colorful_Accent1="ListTable6Colorful_Accent1";n.listTable6Colorful_Accent2="ListTable6Colorful_Accent2";n.listTable6Colorful_Accent3="ListTable6Colorful_Accent3";n.listTable6Colorful_Accent4="ListTable6Colorful_Accent4";n.listTable6Colorful_Accent5="ListTable6Colorful_Accent5";n.listTable6Colorful_Accent6="ListTable6Colorful_Accent6";n.listTable7Colorful="ListTable7Colorful";n.listTable7Colorful_Accent1="ListTable7Colorful_Accent1";n.listTable7Colorful_Accent2="ListTable7Colorful_Accent2";n.listTable7Colorful_Accent3="ListTable7Colorful_Accent3";n.listTable7Colorful_Accent4="ListTable7Colorful_Accent4";n.listTable7Colorful_Accent5="ListTable7Colorful_Accent5";n.listTable7Colorful_Accent6="ListTable7Colorful_Accent6"}(wu=n.Style||(n.Style={})),function(n){n.string="String";n.number="Number";n.date="Date";n.boolean="Boolean"}(bu=n.DocumentPropertyType||(n.DocumentPropertyType={})),function(n){n.chart="Chart";n.smartArt="SmartArt";n.table="Table";n.image="Image";n.slide="Slide";n.ole="OLE";n.text="Text"}(ku=n.TapObjectType||(n.TapObjectType={})),function(n){n.base64="Base64";n.html="Html";n.ooxml="Ooxml"}(du=n.FileContentFormat||(n.FileContentFormat={})),function(n){n.accessDenied="AccessDenied";n.generalException="GeneralException";n.invalidArgument="InvalidArgument";n.itemNotFound="ItemNotFound";n.notImplemented="NotImplemented"}(gu=n.ErrorCodes||(n.ErrorCodes={}))}(Word||(Word={})),function(n){function i(t,i){return OfficeExtension.ClientRequestContext._runBatch("Word.run",arguments,function(){return new n.RequestContext})}var t=function(t){function i(i){var r=t.call(this,i)||this;return r.m_document=new n.Document(r,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(r)),r._rootObject=r.m_document,r}return __extends(i,t),Object.defineProperty(i.prototype,"document",{get:function(){return this.m_document},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"application",{get:function(){return this.m_application==null&&(this.m_application=new n.Application(this,OfficeExtension.ObjectPathFactory.createNewObjectObjectPath(this,"Microsoft.WordServices.Application",!1))),this.m_application},enumerable:!0,configurable:!0}),i}(OfficeCore.RequestContext);n.RequestContext=t;n.run=i}(Word||(Word={}));OfficeExtension.Utility._doApiNotSupportedCheck=!0