/* 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 */ // Sources: // osfweb: 16.0\14621.10000 // runtime: 16.0\14621.10000 // core: 16.0\14621.10000 // host: 16.0\14621.10000 var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!==typeof Sys&&"undefined"!==typeof Type&&Sys.StringBuilder&&"function"===typeof Sys.StringBuilder&&Type.registerNamespace&&"function"===typeof Type.registerNamespace&&Type.registerClass&&"function"===typeof Type.registerClass&&"function"===typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"===typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,r=0;r0?i.push(n):0===n.tabIndex&&r.push(n):r.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,r)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(r,!0),t[n]=r}catch(e){}}return t},loadScript:function(e,t,r){if(e&&t){var i=window.document,o=n[e];if(o)o.loaded?t():o.pendingCallbacks.push(t);else{var a=i.createElement("script");a.type="text/javascript",o={loaded:!1,pendingCallbacks:[t],timer:null},n[e]=o;var s=function(){null!=o.timer&&(clearTimeout(o.timer),delete o.timer),o.loaded=!0;for(var e=o.pendingCallbacks.length,t=0;t0?l(null):l(new Event("Script load timed out"))}),r),a.setAttribute("crossOrigin","anonymous"),a.src=e,i.getElementsByTagName("head")[0].appendChild(a)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if("undefined"==typeof n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var r=parseInt(n,10)+1;return void 0===e[r]?"{"+n+"}":e[r]}))},generateConversationId:function(){return[a(),a(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return"_xdm_"+e+this.generateConversationId()},addXdmInfoAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_xdm_Info=",t,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_serializer_version=",t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,"&_flights=",t,!0)},addInfoAsHash:function(e,n,r,i){var o,a=(e=e.trim()||"").split(t),s=a.shift(),l=a.join(t);return o=i?[n,encodeURIComponent(r),l].join(""):[l,n,r].join(""),[s,t,o].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,t){return OSF.OUtil.parseInfoWithGivenFragment("&_xdm_Info=","_xdm_",!1,e,t)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment("&_serializer_version=","_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"===typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"===typeof e[t]&&e[t]);return void 0!==n&&n},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment("&_flights=","_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var r=JSON.parse(t),i=null!=r?r[n]:null,o=s();if(!e&&o&&null!=r){var a=r[OSF.WindowNameItemKeys.BaseFrameName]+n;i?o.setItem(a,i):i=o.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,r,i){var o=i.split(e),a=o.length>1?o[o.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var l=s();if(!r&&l){var u=window.name.indexOf(t);if(u>-1){var c=window.name.indexOf(";",u);-1==c&&(c=window.name.length);var p=window.name.substring(u,c);a?l.setItem(p,a):a=l.getItem(p)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return"undefined"==typeof t[1]&&(t=e.split("|")),"undefined"==typeof t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",r=OSF.OUtil.parseXdmInfo(t);if(r){var i=OSF.OUtil.getInfoItems(r);if(void 0!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var r=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(r)throw r;for(var i in t)if(r=Function._validateParameter(e[i],t[i],i))throw r},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){"undefined"!==typeof OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,r){for(var i in n=n||{},r){var o=r[i];void 0==n[o]&&(n[o]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var r in t=t||{})OSF.OUtil.defineNondefaultProperty(e,r,t[r],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),r=n.length,i=0;i>8,a=255&n,c[s++]=i>>2,c[s++]=(3&i)<<4|o>>4,c[s++]=(15&o)<<2|a>>6,c[s++]=63&a,isNaN(n)||(i=n>>8,o=255&r,a=r>>8,c[s++]=i>>2,c[s++]=(3&i)<<4|o>>4,c[s++]=(15&o)<<2|a>>6,c[s++]=63&a),isNaN(n)?c[s-1]=64:isNaN(r)&&(c[s-2]=64,c[s-1]=64);for(var f=0;f=2?n[r-2]+"."+n[r-1]:1==r?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},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},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,r){return this.startsWith(e,t+"//"+n+":"+r,!0)||this.startsWith(e,n+":"+r,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof e&&e){var n=this.isIE(),r={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(n){var i=document.createElement("a");if(i.href=e,!i||!i.protocol||!i.host||!i.hostname||!i.href||this.cleanUrl(i.href).toLowerCase()!==this.cleanUrl(e).toLowerCase())throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=i.protocol)throw new Error("NotHttps");var o=this.getRedundandPortString(e,i);r.protocol=i.protocol,r.hostname=i.hostname,r.port=""==o?i.port:"",r.host=""!=o?i.hostname:i.host,r.pathname=(n?"/":"")+i.pathname,r.search=i.search,r.hash=i.hash,r.isPortPartOfUrl=this.containsPort(e,i.protocol,i.hostname,i.port)}else{var a=new URL(e);if(a&&a.protocol&&a.host&&a.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=a.protocol)throw new Error("NotHttps");r.protocol=a.protocol,r.hostname=a.hostname,r.port=a.port,r.host=a.host,r.pathname=a.pathname,r.search=a.search,r.hash=a.hash,r.isPortPartOfUrl=a.host.lastIndexOf(":"+a.port)==a.host.length-a.port.length-1}}}catch(e){if("NotHttps"===e.message)throw e}return r}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=l(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&ne||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(r=function(e,t){for(var n=0;n=0&&ie.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,r=e.length;n0;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;r<32;r++)8!=r&&12!=r&&16!=r&&20!=r||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{!function(){OSF.Flights=OSF.OUtil.parseFlights(!0)}()}catch(e){}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,Visio:8388615,OneNoteAndroid:4194305},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,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,r,i,o,a,s,l,u,c,p,h,f,d,y,m,g,_,b,O,v,C,S,P,A,R){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=r,this._dataLocale=i,this._docUrl=o,this._clientMode=a,this._settings=s,this._reason=l,this._osfControlType=u,this._eToken=c,this._correlationId=p,this._appInstanceId=h,this._touchEnabled=f,this._commerceAllowed=d,this._appMinorVersion=y,this._requirementMatrix=m,this._hostCustomMessage=g,this._hostFullVersion=_,this._isDialog=!1,this._clientWindowHeight=b,this._clientWindowWidth=O,this._addinName=v,this._appDomains=C,this._dialogRequirementMatrix=S,this._featureGates=P,this._officeTheme=A,this._initialDisplayMode=R,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},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",ControlActivation:"controlActivation"},Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"},Microsoft.Office.WebExtension.FilterType={All:"all"},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",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",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",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",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(e,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?e+"_"+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,dispidGetAuthContextMethod:99,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,dispidExecuteFeature:146,dispidQueryFeature:147,dispidMethodMax:147},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,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},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,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,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,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){return function(){}}();e.RequirementVersion=t;var n=function(){return function(e){this.isSetSupported=function(e,t){if(void 0==e)return!1;void 0==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var r=n[e.toLowerCase()];try{var i=this._getVersion(r);t+="";var o=this._getVersion(t);if(i.major>0&&i.major>o.major)return!0;if(i.major>0&&i.minor>=0&&i.major==o.major&&i.minor>=o.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,r=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(n)||isNaN(r))throw"version format incorrect";return{minor:r,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)}}();e.RequirementMatrix=n;var r=function(){return function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e}}();e.DefaultSetRequirement=r;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(r);e.DefaultRequiredDialogSetRequirement=i;var o=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(r);e.DefaultOptionalDialogSetRequirement=o;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var l=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookClientDefaultSetRequirement=l;var u=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(r);e.WordClientDefaultSetRequirement=u;var c=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(u);e.WordClientV1DefaultSetRequirement=c;var p=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointClientDefaultSetRequirement=p;var h=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(p);e.PowerpointClientV1DefaultSetRequirement=h;var f=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ProjectClientDefaultSetRequirement=f;var d=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(r);e.ExcelWebDefaultSetRequirement=d;var y=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordWebDefaultSetRequirement=y;var m=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(r);e.PowerpointWebDefaultSetRequirement=m;var g=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(r);e.OutlookWebDefaultSetRequirement=g;var _=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.SwayWebDefaultSetRequirement=_;var b=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(r);e.AccessWebDefaultSetRequirement=b;var O=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.ExcelIOSDefaultSetRequirement=O;var v=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(r);e.WordIOSDefaultSetRequirement=v;var C=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(v);e.WordIOSV1DefaultSetRequirement=C;var S=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(r);e.PowerpointIOSDefaultSetRequirement=S;var P=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(r);e.OutlookIOSDefaultSetRequirement=P;var A=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,o=t.get_requirementMatrix();if(void 0!=o&&o.length>0&&"undefined"!==typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());i=new n(new r(a))}else{var s=e.getClientFullVersionString(t);i=void 0!=e.DefaultSetArrayMatrix&&void 0!=e.DefaultSetArrayMatrix[s]?new n(e.DefaultSetArrayMatrix[s]):new n(new r({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(void 0!=a&&a.length>0&&"undefined"!==typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new r(s)}else{t=new i;var l=e.get_requirementMatrix();if(void 0!=l&&l.length>0&&"undefined"!==typeof JSON){s=JSON.parse(l.toLowerCase());for(var u in t._sets)s.hasOwnProperty(u)&&(t._sets[u]=s[u]);var c=new o;for(var u in c._sets)s.hasOwnProperty(u)&&(t._sets[u]=s[u])}}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",r="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?r=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?r=e.get_appVersion():(n=t<10?"0"+t:""+t,r=e.get_appVersion()+"."+n),e.get_appName()+"-"+r},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new u,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new c,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new h,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new d,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new y,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new g,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new f,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new b,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new O,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new _,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new v,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new C,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new S,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new P},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=A}(e.Requirement||(e.Requirement={}))}(OfficeExt||(OfficeExt={})),OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"},Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"},OSF.NamespaceManager=function(){var e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var r=e.indexOf("#");if(-1!=r){var i=e.substring(0,r),o=e.substring(r+1);switch(i){case"binding":case"bindings":o&&(n=new OSF.DDA.BindingPromise(o))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,r,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),r){var a=r.displayName||"appOM";delete r.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:r})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});o=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:o})}},OSF.DDA.OutlookContext=function(e,t,n,r,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,r,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetSelectedDataAsync,r.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,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 e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,r,i){var o=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var r=e[n],i=t[n];if(r.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(r.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(r.types&&!OSF.OUtil.listContainsValue(r.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,a,u=e.length-1;u>=s;u--){var c=e[u];switch(typeof c){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);o=c;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(o=l.fillOptions(o,n,r,i),a){if(o[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;o[Microsoft.Office.WebExtension.Parameters.Callback]=a}return l.verifyArguments(t,o),o}(e,i,n,r);return l.constructCallArgs(i,o,n,r)},this.processResponse=function(e,t,n,o){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,n,o):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,r=e.length-1;r>=s;r--){var i=e[r];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[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(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Callback];if(r){var i,o={};o[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),r(new OSF.DDA.AsyncResult(o,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,r,i){var o=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,r,i);this.verifyAndExtractCall=function(e,n,r){var i=a.extractRequiredArguments(e,n,r),s=function(e,n,r,i){if(e.length>o+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,l=e.length-1;l>=o;l--){var u=e[l];switch(typeof u){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=u;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,r,i),a.verifyArguments(t,s),s}(e,i,n,r);return a.constructCallArgs(i,s,n,r)}},OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}}}(),OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n={};function r(i,o){var a=i?{}:void 0;for(var s in i){var l,u=i[s];if(OSF.DDA.ListType.isListType(s))for(var c in l=[],u)l.push(r(u[c],o));else if(OSF.OUtil.listContainsKey(n,s))l=n[s][o](u);else if("fromHost"==o&&e.preserveNesting(s))l=r(u,o);else{var p=t[s];if(p){var h=p[o];h&&void 0===(l=h[u])&&(l=u)}else l=u}a[s]=l}return a}function i(n,i,o){var a,s=t[n][o];if("toHost"==o)a=function n(r,i){var o;for(var a in i){var s;if(void 0!=(s=e.isComplexType(a)?n(r,t[a].toHost):r[a])){o||(o={});var l=i[a];"self"==l&&(l=a),o[l]=e.pack(a,s)}}return o}(r(i,o),s);else if("fromHost"==o){a=r(function n(r,i,o){for(var a in o||(o={}),i){var s,l,u=i[a];if("self"==u)s=r;else{if("sourceData"==u){o[a]=r.toArray();continue}s=r[u]}if(null===s||void 0===s)o[a]=void 0;else if(s=e.unpack(a,s),e.isComplexType(a))l=t[a].fromHost,e.preserveNesting(a)?o[a]=n(s,l):n(s,l,o);else if(OSF.DDA.ListType.isListType(a)){(l={})[OSF.DDA.ListType.getDescriptor(a)]="self";var c=new Array(s.length);for(var p in s)c[p]=n(s[p],l);o[a]=c}else o[a]=s}return o}(i,s),o)}return a}n[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},n[Microsoft.Office.WebExtension.Parameters.SampleData]=n[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var r,i;if(n.map)for(var o in i={},r=n.map){var a=r[o];"self"==a&&(a=o),i[a]=o}else r=n.toHost,i=n.fromHost;var s=t[e];if(s){var l=s.toHost;for(var u in l)r[u]=l[u];for(var c in l=s.fromHost)i[c]=l[c]}else s=t[e]={};s.toHost=r,s.fromHost=i},this.toHost=function(e,t){return i(e,t,"toHost")},this.fromHost=function(e,t){return i(e,t,"fromHost")},this.self="self",this.sourceData="sourceData",this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=n,this.doMapValues=function(e,t){return r(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){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,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function r(e){var t=null;if(e){t={};for(var n=e.length,r=0;r0){for(var r=[],i=0;i=i)break;if(r=Function._validateParameter(e[o],s,l))return r.popStackFrame(),r}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,r){var i,o,a=t.length,s=e.length;if(sa)for(o=!0,i=0;i0&&t.push(o)}}}catch(e){}return t}var t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){return{toHost:function(e){if(OSF.DDA.TableDataProperties&&"string"!=typeof e&&void 0!==e[OSF.DDA.TableDataProperties.TableRows]){var t=[];t[0]=e[OSF.DDA.TableDataProperties.TableRows],t[1]=e[OSF.DDA.TableDataProperties.TableHeaders],e=t}return e},fromHost:function(t){var n;if(t.toArray)if(2===t.dimensions())n=e(t);else{var r=t.toArray();2===r.length&&(null!=r[0]&&r[0].toArray||null!=r[1]&&r[1].toArray)?((n={})[OSF.DDA.TableDataProperties.TableRows]=e(r[0]),n[OSF.DDA.TableDataProperties.TableHeaders]=e(r[1])):n=r}else n=t;return n}}}(),OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,[],t),this.unpack=function(e,n){var r;this.isComplexType(e)||OSF.DDA.ListType.isListType(e)?r=void 0!==n&&void 0!==n.toArray?n.toArray():n||{}:r=this.isDynamicType(e)?t[e].fromHost(n):n;return r}},OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor),OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]}),OSF.DDA.SafeArray.Delegate.executeAsync=function(e){function t(e){var n=e;if(null!=e&&e.toArray){var r=e.toArray();n=new Array(r.length);for(var i=0;i2){a=[];for(var s=1;s=2){t[0];n=t[1]}if(r)return r(new e.WebViewSafeArray(n))}))},t.prototype.registerEvent=function(t,n,r,i){this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,n,(function(t){var n=t,i=0;OSF.OUtil.isArray(t)&&t.length>=2&&(i=t[0],n=t[1]),r&&r(i,new e.WebViewSafeArray(n))}),(function(t){if(i)return i(new e.WebViewSafeArray(t))}))},t.prototype.unregisterEvent=function(t,n,r){this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,n,(function(t){return r(new e.WebViewSafeArray(t))}))},t.prototype.messageParent=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageToParent],n=e[Microsoft.Office.WebExtension.Parameters.TargetOrigin];n||(n=window.location.origin);var r={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(r),n)},t.prototype.openDialog=function(e,n,r,i){var o=JSON.parse(n),a=o.url;if(a){var s=a.split("#"),l="?";a.indexOf("?")>-1&&(l="&");var u="width="+screen.width*o.width/100+", height="+screen.height*o.height/100;s[0]=s[0].concat(l).concat("action=displayDialog");var c,p=s.join("#");t.popup=window.open(p,"",u),window.addEventListener("message",(function(n){if(n.source==t.popup)try{var i=JSON.parse(n.data);i.dialogMessage&&r(e,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent,n.origin])}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handled. Message:"+n.data)}})),c=window.setInterval((function(){try{(null==t.popup||t.popup.closed)&&(window.clearInterval(c),r(e,[OSF.DialogMessageType.DialogClosed]))}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}),1e3),i(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}},t.prototype.closeDialog=function(e,n,r){t.popup?(t.popup.close(),t.popup=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(e){var t=e[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString()),this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t}();e.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(e){!function(e){e[e.MethodCallback=0]="MethodCallback",e[e.EventCallback=1]="EventCallback"}(e.CallbackType||(e.CallbackType={}));var t=function(){return function(e,t,n){this.callbackType=e,this.callbackId=t,this.params=n}}();e.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(e){var t=function(){function e(){}return e.getInstance=function(){return null==e.uniqueInstance&&(e.uniqueInstance=new e),e.uniqueInstance},e.prototype.postMessage=function(e,t){agaveHost.postMessage(t)},e.prototype.ReceiveMessage=function(e){switch(e.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(e.callbackId,e.params);break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(e.callbackId,e.params)}},e}();e.Poster=t}(Android||(Android={})),OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(e){return function(t){var n=function(e,n){t.onReceiving&&t.onReceiving(),t.onComplete&&t.onComplete(e,n)};try{e(t.hostCallArgs,t.onCalling,n)}catch(e){n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,{name:Strings.OfficeOM.L_InternalError,message:e})}}},read:function(e,t){e&&e();OSF._OfficeAppFactory.getInitializationHelper().getAppContext(null,(function(e){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,e.get_settings())}))},write:function(e,t,n,r){var i={},o=[],a=[];for(var s in e)o.push(s),a.push(e[s]);i.keys=o,i.values=a,n&&n();OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,i,(function(e){r&&r(e[0],null)}))}},OSF.InitializationHelper.prototype.initializeSettings=function(e,t){var n=e.get_settings();return this.deserializeSettings(n,t)},OSF.InitializationHelper.prototype.getAppContext=function(e,t){var n;n=this._hostInfo.isDialog?OSF.WebView.PopupMessageHandlerName:OSF.WebView.MessageHandlerName,OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(n,OSF.WebView.MethodId.GetContext,[],(function(e){var n,r=OSF.WebView.AppContextProperties,i=e[r.AppType],o=!1;for(var a in OSF.AppName)if(OSF.AppName[a]==i){o=!0;break}if(!o)throw"Unsupported client type "+i;for(var s=e[r.Settings],l={},u=s[0],c=s[1],p=0;pn[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&"undefined"!==typeof window.external.GetContext&&"undefined"!==typeof window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var r in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==r.toLowerCase()&&e.setProperty(r,n[r]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=o}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),r="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");e.enableTelemetry=!0;var o=function(){return function(){}}();e.AppInfo=o;var a=function(){return function(e,t){this.name=e,this.handler=t}}(),s=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var r=n.split(";");for(var i in r){var o=r[i],a=this.getValue(o);a&&(e&&e(o,a),t&&this.remove(o))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),l=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function u(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function c(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=u(r),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new l).LogData(i)}function p(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&f(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function h(e,t){return p()||t!==e?t:"PRIVATE"}function f(e,t){var n=!1,r=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(o<52||52==o&&a<808))&&(n=!0)}return n}e.initialize=function(r){if(e.enableTelemetry&&!t){t=new o,r.get_hostFullVersion()?t.hostVersion=r.get_hostFullVersion():t.hostVersion=r.get_appVersion(),t.appId=p()?r.get_id():"PRIVATE",t.browser=window.navigator.userAgent,t.correlationId=u(r.get_correlationId()),t.clientId=(new s).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=u(t.appInstanceId),t.appInstanceId=h(r.get_id(),t.appInstanceId)),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="16.0.14621.10000",r._wacHostEnvironment&&(t.wacHostEnvironment=r._wacHostEnvironment),void 0!==r._isFromWacAutomation&&null!==r._isFromWacAutomation&&(t.isFromWacAutomation=r._isFromWacAutomation.toString().toLowerCase());var l=r.get_docUrl();t.docUrl=i.test(l)?l:"";var c=location.href;c&&(c=c.split("?")[0].split("#")[0]),t.appURL="",function(e,t){var n,r;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(r=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),o=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:o&&o.nodeValue&&(t.userId=o.nodeValue),t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,r=null,null}}(r.get_eToken(),t),t.sessionId=n,"undefined"!==typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,r=0,i=!1,o=function(){document.hasFocus()?null==n&&(n=new Date):n&&(r+=Math.abs((new Date).getTime()-n.getTime()),n=null)},s=[];s.push(new a("focus",o)),s.push(new a("blur",o)),s.push(new a("focusout",o)),s.push(new a("focusin",o));var l=function(){for(var o=0;o0)for(var r=0;r0)for(var r=0;r0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return void 0!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(void 0==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],r=0;r0){for(var r=t[0];n.length>0;){r(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var r;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,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(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n);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(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[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(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(r.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(r.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));r=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}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(e,t,n){return n.supportsEvent(e)}},{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(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),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",MessageOrigin:"messageOrigin"}),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",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]);var 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,e,n)}}),OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[r]||"undefined"==typeof OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})},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}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(e,t,n){var r=e[Microsoft.Office.WebExtension.Parameters.Id],i=e[Microsoft.Office.WebExtension.Parameters.Data],o=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(o,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,r,i,o)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(o,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,o,i),n=t[Microsoft.Office.WebExtension.Parameters.EventType],r=t[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(n,r)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var l=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(o,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var u=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(o,u,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,o)}})}return o},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}}),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:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{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:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.DDA.SafeArray.Delegate.openDialog=function(e){try{e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,e);OSF.ClientHostController.openDialog(e.dispId,e.targetId,(function(t,n){e.onEvent&&e.onEvent(n),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.closeDialog=function(e){e.onCalling&&e.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,e);try{OSF.ClientHostController.closeDialog(e.dispId,e.targetId,t)}catch(t){OSF.DDA.SafeArray.Delegate._onException(t,e)}},OSF.DDA.SafeArray.Delegate.messageParent=function(e){try{e.onCalling&&e.onCalling();var t=(new Date).getTime(),n=OSF.ClientHostController.messageParent(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(e.dispId,e.hostCallArgs,Math.abs((new Date).getTime()-t),n),n}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:2}],isComplexType:!0}),OSF.DDA.SafeArray.Delegate.sendMessage=function(e){try{e.onCalling&&e.onCalling();(new Date).getTime();var t=OSF.ClientHostController.sendMessage(e.hostCallArgs);return e.onReceiving&&e.onReceiving(),t}catch(e){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(e)}},Microsoft.Office.WebExtension.TableData=function(e,t){function n(e){if(null==e||void 0==e)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(e,2);t<2;t++)e=[e];return e}catch(e){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(e){t=n(e)}},rows:{get:function(){return e},set:function(t){e=null==t||OSF.OUtil.isArray(t)&&0==t.length?[]:n(t)}}}),this.headers=t,this.rows=e},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureTableData=function(e){return new Microsoft.Office.WebExtension.TableData(e[OSF.DDA.TableDataProperties.TableRows],e[OSF.DDA.TableDataProperties.TableHeaders])},Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"},OSF.DDA.DataCoercion=function(){return{findArrayDimensionality:function(e){if(OSF.OUtil.isArray(e)){for(var t=0,n=0;n=0&&(e=e.substring(t+5,e.length))<"14.14393"}()?e.PromiseImpl.Init():window.Promise:e.PromiseImpl.Init()}()}(t=e._Internal||(e._Internal={}));var n=t.OfficePromise;e.Promise=n}(OfficeExtension||(OfficeExtension={})),function(e){var t=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return u._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(e.prototype,"eventRegistration",{get:function(){return null},enumerable:!0,configurable:!0}),e}();e.SessionBase=t;var n=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return u.createPromise((function(t,n){var i=new XMLHttpRequest;if(i.open(e.method,e.url),i.onload=function(){var e={statusCode:i.status,headers:u._parseHttpResponseHeaders(i.getAllResponseHeaders()),body:i.responseText};t(e)},i.onerror=function(){n(new r.RuntimeError({code:o.connectionFailure,httpStatusCode:i.status,message:u._getResourceString(a.connectionFailureWithStatus,i.statusText)}))},e.headers)for(var s in e.headers)i.setRequestHeader(s,e.headers[s]);i.send(u._getRequestBodyText(e))}))},e.fetchSendRequestFunc=function(e){var t=u._getRequestBodyText(e);return""===t&&(t=void 0),fetch(e.url,{method:e.method,headers:e.headers,body:t}).then((function(e){return e.text().then((function(t){var n=e.status,r={};return e.headers.forEach((function(e,t){r[t]=e})),{statusCode:n,headers:r,body:t}}))}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n="undefined"!==typeof fetch?e.fetchSendRequestFunc:e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=u._validateLocalDocumentRequest(e);var t=u._buildRequestMessageSafeArray(e);return u.createPromise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:l.getResponseStatusCode(t),headers:l.getResponseHeaders(t),body:l.getResponseBody(t)}:l.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),u.log("Response:"),u.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(u.isNullOrUndefined(e))throw r.RuntimeError._createInvalidArgError({argumentName:"request"});u.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase()},e.logRequest=function(t){if(u._logEnabled){if(u.log("---HTTP Request---"),u.log(t.method+" "+t.url),t.headers)for(var n in t.headers)u.log(n+": "+t.headers[n]);e._logBodyEnabled&&u.log(u._getRequestBodyText(t))}},e.logResponse=function(t){if(u._logEnabled){if(u.log("---HTTP Response---"),u.log(""+t.statusCode),t.headers)for(var n in t.headers)u.log(n+": "+t.headers[n]);e._logBodyEnabled&&u.log(t.body)}},e._logBodyEnabled=!1,e}();e.HttpUtility=n;var r,i=function(){function e(e){var t=this;this.m_bridge=e,this.m_promiseResolver={},this.m_handlers=[],this.m_bridge.onMessageFromHost=function(e){var n=JSON.parse(e);if(3==n.type){var r=n.message;if(r&&r.entries)for(var i=0;i=0){var o=t.url.substr(i+1),a=u._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags)}"string"===typeof t.body&&(t.body=JSON.parse(t.body));var s={id:e.nextId(),type:1,flags:n,message:t};return r.sendMessageToHostAndExpectResponse(s).then((function(e){return e.message}))}));for(var i=0;i=0&&this.m_handlers.splice(t,1)},e.onInited=function(t){e.s_onInitedHandlers.push(t),e.s_instance&&t(e.s_instance)},e.prototype.dispatchMessage=function(e){if("number"===typeof e.id){var t=this.m_promiseResolver[e.id];if(t)return t(e),void delete this.m_promiseResolver[e.id]}for(var n=0;n0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r0){var o=t.url.substr(i+1),a=e._parseRequestFlagsAndCustomDataFromQueryStringIfAny(o);a.flags>=0&&(n=a.flags),r=a.customData}}return l.buildRequestMessageSafeArray(r,n,t.method,t.url,t.headers,e._getRequestBodyText(t))},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),i=t.split(r),o=0;o0){var l=a.substr(0,s),u=a.substr(s+1);l=e.trim(l),u=e.trim(u),n[l.toUpperCase()]=u}}}return n},e._parseErrorResponse=function(t){var n=e._parseErrorResponseBody(t),r=t.statusCode.toString();if(e.isNullOrUndefined(n)||"object"!==typeof n||!n.error)return e._createDefaultErrorResponse(r);var i=n.error,o=i.innerError;return o&&o.code?e._createErrorResponse(o.code,r,o.message):i.code?e._createErrorResponse(i.code,r,i.message):e._createDefaultErrorResponse(r)},e._parseErrorResponseBody=function(t){if(e.isPlainJsonObject(t.body))return t.body;if(!e.isNullOrEmptyString(t.body)){var n=e.trim(t.body);try{return JSON.parse(n)}catch(t){e.log("Error when parse "+n)}}},e._createDefaultErrorResponse=function(t){return{errorCode:o.connectionFailure,errorMessage:e._getResourceString(a.connectionFailureWithStatus,t)}},e._createErrorResponse=function(t,n,r){return{errorCode:t,errorMessage:e._getResourceString(a.connectionFailureWithDetails,[n,t,r])}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e.addResourceStringValues=function(t){for(var n in t)e.s_resourceStringValues[n]=t[n]},e._logEnabled=!1,e.s_resourceStringValues={ApiNotFoundDetails:"The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",ConnectionFailureWithStatus:"The request failed with status code of {0}.",ConnectionFailureWithDetails:"The request failed with status code of {0}, error code {1} and the following error message: {2}",InvalidArgument:"The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",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.',InvalidRequestContext:"Cannot use the object across different request contexts.",Timeout:"The operation has timed out.",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.'},e}();e.CoreUtility=u;var c=function(){function e(){}return e.setMock=function(t){e.s_isMock=t},e.isMock=function(){return e.s_isMock},e}();e.TestUtility=c,e._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0,appendTypeNameToObjectPathInfo:!1,enablePreviewExecution:!1},e.config={extendedErrorLogging:!1};var p=function(){function t(){}return t.createSetPropertyAction=function(t,n,r,i,o){C.validateObjectPath(n);var a={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:n._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[i],l=C.setMethodArguments(t,a.ArgumentInfo,s);C.validateReferencedObjectPaths(l);var u=new f(a,0,o);if(u.referencedObjectPath=n._objectPath,u.referencedArgumentObjectPaths=l,e._internalConfig.enablePreviewExecution&&0!==(16&o)){var c={Id:t._nextId(),ActionType:4,Name:r,ObjectId:"",ObjectType:"",Arguments:[i]};n._addPreviewExecutionAction(c)}return n._addAction(u)},t.createQueryAction=function(e,t,n,r){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new f(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createQueryAsJsonAction=function(e,t,n,r){C.validateObjectPath(t);var i={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,QueryInfo:n},o=new f(i,1,4);return o.referencedObjectPath=t._objectPath,t._addAction(o,r)},t.createUpdateAction=function(e,t,n){C.validateObjectPath(t);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},i=new f(r,0,0);return i.referencedObjectPath=t._objectPath,t._addAction(i)},t}();e.CommonActionFactory=p;var h=function(){function t(e,t){this.m_contextBase=e,this.m_objectPath=t}return Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_context",{get:function(){return this.m_contextBase},enumerable:!0,configurable:!0}),t.prototype._addAction=function(e,t){var n=this;return void 0===t&&(t=null),u.createPromise((function(r,i){n._context._addServiceApiAction(e,t,r,i)}))},t.prototype._addPreviewExecutionAction=function(e){},t.prototype._retrieve=function(t,n){var r=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;r||(r=!C.isSetSupported("RichApiRuntime","1.1"));var i=y._parseQueryOption(t);return r?p.createQueryAction(this._context,this,i,n):p.createQueryAsJsonAction(this._context,this,i,n)},t.prototype._recursivelyUpdate=function(t){var n=e._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!C.isSetSupported("RichApiRuntime","1.2"));try{var i=this[v.scalarPropertyNames];i||(i=[]);var s=this[v.scalarPropertyUpdateable];if(!s){s=[];for(var l=0;l=0){if(!s[m])throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:u._getResourceString(S.attemptingToSetReadOnlyProperty,y),debugInfo:{errorLocation:y}});h[y]=t[y],++d}else{if(!(c.indexOf(y)>=0))throw new r.RuntimeError({code:o.invalidArgument,httpStatusCode:400,message:u._getResourceString(S.propertyDoesNotExist,y),debugInfo:{errorLocation:y}});f[y]=t[y]}}if(d>0)if(n)for(l=0;l0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Top=s}else if("$skip"===a){if("number"!==typeof s||n.length>0)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});t.Skip=s}else if("boolean"===typeof s)s&&t.Select.push(e.combineQueryPath(n,a,"/"));else{if("object"!==typeof s)throw r.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(i,a,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,a,"/"),e.combineQueryPath(i,a,"."),s)}}},e}();e.ClientRequestContextBase=y;var m=function(){function e(e){this.m_objectPath=e}return e.prototype._handleResult=function(e){u.isNullOrUndefined(e)?this.m_objectPath._updateAsNullObject():this.m_objectPath.updateUsingObjectData(e,null)},e}(),g=function(){function t(e){this.m_contextBase=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_preSyncPromises=[],this.m_previewExecutionActions=[]}return t.prototype.addAction=function(e){this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},t.prototype.addPreviewExecutionAction=function(e){this.m_previewExecutionActions.push(e)},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.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_contextBase._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new f(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n);var r=new m(e);this.addActionResultHandler(n,r)}}},t.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t0&&(u.PreviewExecutionActions=this.m_previewExecutionActions,n|=4096),{body:u,flags:n}},t.prototype.processResponse=function(e){if(e)for(var t=0;t=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===v.keepReference){this.m_actions.splice(t,1);break}}},t._updateLastUsedActionIdOfObjectPathId=function(e,n,r){for(;n;){if(e[n.objectPathInfo.Id])return;e[n.objectPathInfo.Id]=r;var i=n.argumentObjectPaths;if(i)for(var o=i.length,a=0;a=0;--i){var o=(h=e[i]).actionInfo.Id;h.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(n,h.referencedObjectPath,o);var a=h.referencedArgumentObjectPaths;if(a)for(var s=a.length,l=0;l0?h.actionInfo.L=f:h.actionInfo.L&&delete h.actionInfo.L}},t}();e.ClientRequestBase=g;var _=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new r.RuntimeError({code:o.valueNotLoaded,httpStatusCode:400,message:u._getResourceString(a.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"===typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=C.adjustToDateTime(e):this.m_value=e)},e}();e.ClientResult=_;var b=function(){function e(e){this.m_context=e,this.m_actions=[]}return e.prototype.add=function(e,t,n,r){var i=this;this.m_actions.push({action:e,resultHandler:t,resolve:n,reject:r}),1===this.m_actions.length&&setTimeout((function(){return i.processActions()}),0)},e.prototype.processActions=function(){var e=this;if(0!==this.m_actions.length){var t=this.m_actions;this.m_actions=[];for(var n=new g(this.m_context),r=0;r=65&&e.charCodeAt(t)<=90;)t++;return t0?".":"")+n;break;case 3:n=t.normalizeName(e.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=t.normalizeName(e.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}e=e.parentObjectPath}return n},t.setMethodArguments=function(e,n,r){if(u.isNullOrUndefined(r))return null;var i=new Array,o=new Array,a=t.collectObjectPathInfos(e,r,i,o);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=o),i},t.validateContext=function(e,t){if(e&&t&&t._context!==e)throw new r.RuntimeError({code:o.invalidRequestContext,httpStatusCode:400,message:u._getResourceString(a.invalidRequestContext)})},t.isSetSupported=function(e,t){return!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,t)},t.throwIfApiNotSupported=function(e,n,i,s){if(t._doApiNotSupportedCheck&&!t.isSetSupported(n,i)){var l=u._getResourceString(a.apiNotFoundDetails,[e,n+" "+i,s]);throw new r.RuntimeError({code:o.apiNotFound,httpStatusCode:404,message:l,debugInfo:{errorLocation:e}})}},t.calculateApiFlags=function(e,n,r){return t.isSetSupported(n,r)||(e&=-3),e},t._parseSelectExpand=function(e){var t=[];if(!u.isNullOrEmptyString(e))for(var n=e.split(","),r=0;r0&&t.push(i)}return t;function o(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},t.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var n=[],r=0;r=0){var a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!0),s=a.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:s.statement,surroundingStatements:s.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},e.config.extendedErrorLogging&&(a=new Y(this._rootObjectPropertyName,t._objectPaths,t._actions,!1,!1),o.fullStatements=a.process())}var l=null;if(n.Body.Results?l=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(l=n.Body.ProcessedResults.Results),l){this._processingResult=!0;try{t.processResponse(l)}finally{this._processingResult=!1}}}if(!$.isNullOrEmptyString(n.ErrorCode))return new r.RuntimeError({code:n.ErrorCode,httpStatusCode:n.HttpStatusCode,message:n.ErrorMessage,traceMessages:i});if(n.Body&&n.Body.Error){var u={errorLocation:n.Body.Error.Location};return o&&(u.statement=o.statement,u.surroundingStatements=o.surroundingStatements,u.fullStatements=o.fullStatements),new r.RuntimeError({code:n.Body.Error.Code,httpStatusCode:n.Body.Error.HttpStatusCode,message:n.Body.Error.Message,traceMessages:i,debugInfo:u})}return null},i.prototype.processPendingEventHandlers=function(e){for(var t=$._createPromiseFromResult(null),n=0;n0)if(i.isValidRequestInfo(n[0]))h=n[0],d=1;else if($.isPlainJsonObject(n[0])){if(null!=(h=(y=n[0]).session)&&!i.isValidRequestInfo(h))return i.createErrorPromise(t);f=y.previousObjects,d=1}if(n.length==d+1)p=n[d+0];else{if(null!=y||n.length!=d+2)return i.createErrorPromise(t);f=n[d+0],p=n[d+1]}if(null!=f)if(f instanceof w)c=function(){return f.context};else if(f instanceof i)c=function(){return f};else{if(!Array.isArray(f))return i.createErrorPromise(t);var m=f;if(0==m.length)return i.createErrorPromise(t);for(var g=0;g0&&d._onRunFinishedNotifiers.shift()();if(_)return y;throw y}))},i}(y);e.ClientRequestContext=U;var L=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[B.scalarPropertyNames],r=e[B.navigationPropertyNames],i=e[B.className],o=e[B.isCollection];if(n)for(var a=0;a=0;s--)if(i[s]===r[o].handler){i.splice(s,1);break}break;case 2:i=[]}return a&&(!this.m_registered&&i.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==i.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){u.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=i}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n0},e.prototype.register=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});var i=this.getHandlers(e,t);return i.push(n),1===i.length?this.m_registerEventImpl(e,t):$._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw r.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var i=this.getHandlers(e,t),o=i.length-1;o>=0;o--)if(i[o]===n){i.splice(o,1);break}return 0===i.length?this.m_unregisterEventImpl(e,t):$._createPromiseFromResult(null)},e}();e.EventRegistration=G;var z=function(){function e(){this.m_eventRegistration=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):i.instance?this.m_ready=$._createPromiseFromResult(null).then((function(){t.m_isReady=!0})):this.m_ready=r.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return $._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return $._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t=0;r--)if(n[r]===e){n.splice(r,1);break}0==n.length&&z.getGenericEventRegistration().unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(W);e.GenericEventHandlers=q;var J=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}(),Q=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new d(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var i={Id:e._nextId(),ObjectPathType:2,Name:t};return new d(i,null,n,!1,1,$._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,i,o){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new d(a,t._objectPath,r,i,1,$._fixupApiFlags(o))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new d(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new d(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,i,o,a,s,l){var u={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},c=$.setMethodArguments(e,u.ArgumentInfo,i),p=new d(u,t._objectPath,o,a,r,$._fixupApiFlags(l));return p.argumentObjectPaths=c,p.getByIdMethodName=s,p},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new d(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,i,o){var a=$.tryGetObjectIdFromLoadOrRetrieveResult(i);return t&&!$.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,i):e.createChildItemObjectPathUsingGetItemAt(n,r,i,o)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=$.tryGetObjectIdFromLoadOrRetrieveResult(n),i=i={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new d(i,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var i=n[B.index];i&&(r=i);var o={Id:e._nextId(),ObjectPathType:3,Name:B.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new d(o,t._objectPath,!1,!1,1,4)},e}();e.ObjectPathFactory=Q;var K=function(){function t(e){this.m_context=e}return t.prototype.executeAsync=function(n,r,i){var o=this,a=l.buildMessageArrayForIRequestExecutor(n,r,i,t.SourceLibHeaderValue);return new e.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(a,(function(t){var n;u.log("Response:"),u.log(JSON.stringify(t)),"succeeded"==t.status?n=l.buildResponseOnSuccess(l.getResponseBody(t),l.getResponseHeaders(t)):(n=l.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},t.SourceLibHeaderValue="officejs",t}(),X=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[B.isTracked]&&e!==this.m_context._rootObject&&t&&!$.isNullOrEmptyString(t[B.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[B.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[B.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[B.referenceId];if(e._objectPath.objectPathInfo[B.objectPathInfoDoNotKeepReferenceFieldName])throw $.createRuntimeError(o.generalException,u._getResourceString(Z.objectIsUntracked),null);$.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),j.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[B.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[B.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[B.referenceId];if(!$.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[B.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();e.TrackedObjects=X;var Y=function(){function t(e,t,n,r,i){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=i}return t.prototype.process=function(){this.m_showDispose&&H._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var i=t+1+5;i>this.m_statements.length&&(i=this.m_statements.length);var o=[];0!=r&&o.push("...");for(var a=r;a>>>>"),o.push(this.m_statements[t]),o.push("// <<<<<");for(var s=t+1;s0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},t.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,"undefined"===typeof t.top&&"undefined"===typeof t.skip&&"undefined"===typeof t.expand?"undefined"===typeof t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},t.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},t.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return $._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return $._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},t.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return"undefined"===typeof e.Arguments[0]?t:"...";for(var n=0;n0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},t.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},t.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=$._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=$._toCamelLowerCase(r);break;case 5:var i=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===i.charAt(i.length-1)?i.substr(0,i.length-1):i+"Item"}return t},t.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},t}(),Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.cannotRegisterEvent="CannotRegisterEvent",t.connectionFailureWithStatus="ConnectionFailureWithStatus",t.connectionFailureWithDetails="ConnectionFailureWithDetails",t.propertyNotLoaded="PropertyNotLoaded",t.runMustReturnPromise="RunMustReturnPromise",t.moreInfoInnerError="MoreInfoInnerError",t.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",t.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",t.objectIsUntracked="ObjectIsUntracked",t.customFunctionDefintionMissing="CustomFunctionDefintionMissing",t.customFunctionImplementationMissing="CustomFunctionImplementationMissing",t.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",t.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",t.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",t.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",t.customFunctionInvalidFunction="CustomFunctionInvalidFunction",t.customFunctionInvalidFunctionMapping="CustomFunctionInvalidFunctionMapping",t.customFunctionWindowMissing="CustomFunctionWindowMissing",t.customFunctionDefintionMissingOnWindow="CustomFunctionDefintionMissingOnWindow",t.pendingBatchInProgress="PendingBatchInProgress",t.notInsideBatch="NotInsideBatch",t.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",t}(S);e.ResourceStrings=Z,u.addResourceStringValues({CannotRegisterEvent:"The event handler cannot be registered.",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.",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()".',InvalidOrTimedOutSessionMessage:"Your Office Online session has expired or is invalid. To continue, refresh the page.",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.",InvalidSheetName:"The request cannot be processed because the specified worksheet cannot be found. Please try again.",CustomFunctionDefintionMissing:"A property with the name '{0}' that represents the function's definition must exist on Excel.Script.CustomFunctions.",CustomFunctionDefintionMissingOnWindow:"A property with the name '{0}' that represents the function's definition must exist on the window object.",CustomFunctionImplementationMissing:"The property with the name '{0}' on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",CustomFunctionNameContainsBadChars:"The function name may only contain letters, digits, underscores, and periods.",CustomFunctionNameCannotSplit:"The function name must contain a non-empty namespace and a non-empty short name.",CustomFunctionUnexpectedNumberOfEntriesInResultBatch:"The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",CustomFunctionCancellationHandlerMissing:"The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",CustomFunctionInvalidFunction:"The property with the name '{0}' that represents the function's definition is not a valid function.",CustomFunctionInvalidFunctionMapping:"The property with the name '{0}' on CustomFunctionMappings that represents the function's definition is not a valid function.",CustomFunctionWindowMissing:"The window object was not found.",PendingBatchInProgress:"There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",NotInsideBatch:"Operations may not be invoked outside of a batch method.",CannotUpdateReadOnlyProperty:"The property '{0}' is read-only and it cannot be updated.",ObjectIsUntracked:"The object is untracked."});var $=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},n.load=function(e,t){return e.context.load(e,t),e},n.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},n.retrieve=function(t,r){var i=e._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;i||(i=!n.isSetSupported("RichApiRuntime","1.1"));var o=new L(t,i);return t._retrieve(r,o),o},n.retrieveAndSync=function(e,t){var r=n.retrieve(e,t);return e.context.sync().then((function(){return r}))},n.toJson=function(e,t,r,i){var o={};for(var a in t){"undefined"!==typeof(s=t[a])&&(o[a]=s)}for(var a in r){var s;"undefined"!==typeof(s=r[a])&&(s[n.fieldName_isCollection]&&"undefined"!==typeof s[n.fieldName_m__items]?o[a]=s.toJSON().items:o[a]=s.toJSON())}return i&&(o.items=i.map((function(e){return e.toJSON()}))),o},n.throwError=function(e,t,n){throw new r.RuntimeError({code:e,httpStatusCode:400,message:u._getResourceString(e,t),debugInfo:n?{errorLocation:n}:void 0})},n.createRuntimeError=function(e,t,n,i,o){return new r.RuntimeError({code:e,httpStatusCode:i,message:t,debugInfo:{errorLocation:n},data:o})},n.throwIfNotLoaded=function(e,t,r,i){if(!i&&u.isUndefined(t)&&e.charCodeAt(0)!=n.s_underscoreCharCode&&!n.s_suppressPropertyNotLoadedException)throw n.createPropertyNotLoadedException(r,e)},n._getPropertyValueWithoutCheckLoaded=function(e,t){n.s_suppressPropertyNotLoadedException=!0;try{return e[t]}finally{n.s_suppressPropertyNotLoadedException=!1}},n.createPropertyNotLoadedException=function(e,t){return new r.RuntimeError({code:N.propertyNotLoaded,httpStatusCode:400,message:u._getResourceString(Z.propertyNotLoaded,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.createCannotUpdateReadOnlyPropertyException=function(e,t){return new r.RuntimeError({code:N.cannotUpdateReadOnlyProperty,httpStatusCode:400,message:u._getResourceString(Z.cannotUpdateReadOnlyProperty,t),debugInfo:e?{errorLocation:e+"."+t}:void 0})},n.promisify=function(t){return new e.Promise((function(e,n){t((function(t){"failed"==t.status?n(t.error):e(t.value)}))}))},n._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},n._handleNavigationPropertyResults=function(e,t,n){for(var r=0;r0;)e.push(0),n--},t.prototype.getString=function(e){return"number"===typeof e?e>0?this.m_strings[e-1]:null:e},t.prototype.buildEnumType=function(e){var t;if(Array.isArray(e)){(t={name:e[0],fields:e[2]}).fields||(t.fields={});var n=e[1];if(Array.isArray(n))for(var r=0;rn)return!1;return!0},t.prototype.evaluateEventType=function(t){if($.isNullOrEmptyString(t))return 0;if(this.isAllDigits(t))return parseInt(t);var n=this.resolveObjectByFullName(t);if("number"!==typeof n)throw new e.Error("Invalid event type: "+t);return n},t.prototype.buildPrototype=function(e,t){this.buildScalarProperties(e,t),this.buildNavigationProperties(e,t),this.buildScalarMethods(e,t),this.buildNavigationMethods(e,t),this.buildEvents(e,t),this.buildHandleResult(e,t),this.buildHandleIdResult(e,t),this.buildHandleRetrieveResult(e,t),this.buildLoad(e,t),this.buildRetrieve(e,t),this.buildSetMockData(e,t),this.buildEnsureUnchanged(e,t),this.buildUpdate(e,t),this.buildSet(e,t),this.buildToJSON(e,t),this.buildItems(e,t),this.buildTypeMetadataInfo(e,t),this.buildTrackUntrack(e,t),this.buildMixin(e,t)},t.prototype.toSimpleCamelUpperCase=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)},t.prototype.ensureOriginalName=function(e){null===e.originalName&&(e.originalName=this.toSimpleCamelUpperCase(e.name))},t.prototype.getFieldName=function(e){return"m_"+e.name},t.prototype.throwIfApiNotSupported=function(e,t){if(this.m_apiSets&&t.apiSetInfoOrdinal>0){var n=this.m_apiSets[t.apiSetInfoOrdinal-1];n&&$.throwIfApiNotSupported(e.name+"."+t.name,n.name,n.version,this.m_hostName)}},t.prototype.buildScalarProperties=function(e,t){if(Array.isArray(t.scalarProperties))for(var n=0;n0){var n=this.m_apiSets[t-1];n&&(e=C.calculateApiFlags(e,n.name,n.version))}return e},t.prototype.buildScalarProperty=function(e,n,r){this.ensureOriginalName(r);var i=this,o=this.getFieldName(r),a={get:function(){return $.throwIfNotLoaded(r.name,this[o],n.name,this._isNull),i.throwIfApiNotSupported(n,r),this[o]},enumerable:!0,configurable:!0};0===(2&r.behaviorFlags)&&(a.set=function(e){if(4&r.behaviorFlags&&i.getFunction(t.CustomizationCodeNamespace+"."+n.name+"_"+r.originalName+"_Set").call(this,this,e).handled)return;this[o]=e;var a=i.calculateApiFlags(r.setMethodApiFlags,r.undoableApiSetInfoOrdinal);ee.invokeSetProperty(this,r.originalName,e,a)}),Object.defineProperty(e.prototype,r.name,a)},t.prototype.buildNavigationProperties=function(e,t){if(Array.isArray(t.navigationProperties))for(var n=0;n0){for(var o=0;o0){for(var o=0;o0&&(Object.defineProperty(e.prototype,"_scalarPropertyNames",{get:function(){return this.m__scalarPropertyNames||(this.m__scalarPropertyNames=t.scalarProperties.map((function(e){return e.name}))),this.m__scalarPropertyNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyOriginalNames",{get:function(){return this.m__scalarPropertyOriginalNames||(this.m__scalarPropertyOriginalNames=t.scalarProperties.map((function(e){return e.originalName}))),this.m__scalarPropertyOriginalNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_scalarPropertyUpdateable",{get:function(){return this.m__scalarPropertyUpdateable||(this.m__scalarPropertyUpdateable=t.scalarProperties.map((function(e){return 0===(2&e.behaviorFlags)}))),this.m__scalarPropertyUpdateable},enumerable:!0,configurable:!0})),t.navigationProperties&&t.navigationProperties.length>0&&Object.defineProperty(e.prototype,"_navigationPropertyNames",{get:function(){return this.m__navigationPropertyNames||(this.m__navigationPropertyNames=t.navigationProperties.map((function(e){return e.name}))),this.m__navigationPropertyNames},enumerable:!0,configurable:!0})},t.prototype.buildTrackUntrack=function(e,t){2&t.behaviorFlags&&(e.prototype.track=function(){return this.context.trackedObjects.add(this),this},e.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this})},t.prototype.buildMixin=function(e,t){if(4&t.behaviorFlags){var n=this.getFunction(t.name+"Custom");$.applyMixin(e,n)}},t.prototype.getOnEventName=function(e){return"_"===e[0]?"_on"+e.substr(1):"on"+e},t.prototype.buildEvents=function(e,t){if(t.events)for(var n=0;n0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var i=ae.embeddingPageOrigin+"="+e+"&"+ae.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+ae.sessionContext+"="+encodeURIComponent(i):r.search=r.search+"&"+ae.sessionContext+"="+encodeURIComponent(i)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return u.createPromise((function(n,r){var i=document.createElement("iframe");if(e.m_options.id&&(i.id=e.m_options.id,i.name=e.m_options.id),i.style.height=e.m_options.height,i.style.width=e.m_options.width,e.m_options.webApplication){var s=document.createElement("form");s.setAttribute("action",t),s.setAttribute("method","post"),s.setAttribute("target",i.name),e.m_options.container.appendChild(s);var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","access_token"),l.setAttribute("value",e.m_options.webApplication.accessToken),s.appendChild(l);var c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","access_token_ttl"),c.setAttribute("value",e.m_options.webApplication.accessTokenTtl),s.appendChild(c),e.m_options.container.appendChild(i),s.submit()}else i.src=t,e.m_options.container.appendChild(i);e.m_timeoutId=window.setTimeout((function(){e.close();var t=$.createRuntimeError(o.timeout,u._getResourceString(a.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(ie&&(n=ie(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){oe&&(e=oe(e));var n=e.Error;delete e.Error,t(n||0,e)}))):t(5001,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new G(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),t.prototype._createRequestExecutorOrNull=function(){return new le(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return u._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return u.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return u.createPromise((function(r,i){n._sendMessageWithCallback(n.m_id++,ne.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[ne.CommandKey]===ne.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[ne.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,ne.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[ne.CommandKey]===ne.FireEventCommand){var r=n[ne.ParamsKey],i=r.EventId,o=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(i,o),l=0;l0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=2){var s=t[n].message[1];s&&(r=a(s)?JSON.parse(s):s)}"undefined"!==typeof OSF&&OSF.AppTelemetry&&OSF.AppTelemetry.CallOnAppActivatedIfPending&&OSF.AppTelemetry.CallOnAppActivatedIfPending(),o.apply(null,[r])}else OfficeExtension.Utility.log("ActionProxy._handleMessage unknown message type "+t[n].messageType)}catch(e){throw function(e){var t=function(e){var t="Unknown Error";if(e)try{e.toString&&(t=e.toString()),t=t+" "+JSON.stringify(e)}catch(e){t="Unexpected Error"}return t}(e);OfficeExtension.Utility.log(t)}(e),e}return OfficeExtension.Utility._createPromiseFromResult(null)}function a(e){return"string"===typeof e&&"{"===e[0]}function s(){try{Microsoft.Office.WebExtension.onReadyInternal().then((function(){return function(){if("undefined"!==typeof OSF&&OSF.DDA&&OSF.DDA.RichApi&&OSF.DDA.RichApi.richApiMessageManager)return(new OfficeExtension.ClientRequestContext).eventRegistration.register(5,"",o)}()})).then((function(){var e=OSF._OfficeAppFactory.getHostInfo();return"web"===e.hostPlatform&&"word"!==e.hostType&&"excel"!==e.hostType?void 0:function(){var e=new OfficeExtension.ClientRequestContext,t=OfficeCore.AddinInternalService.newObject(e);return e._customData="WacPartition",t.notifyActionHandlerReady(),e.sync()}()}))}catch(e){}}!function(){OfficeExtension.Utility.log("ActionProxy.initOnce"),"undefined"!=typeof e.actions&&function(e){n=e}(e.actions._association),"undefined"!==typeof document&&(document.readyState&&"loading"!==document.readyState?(OfficeExtension.Utility.log("ActionProxy.initOnce: document.readyState is not loading state"),s()):document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){OfficeExtension.Utility.log("ActionProxy.initOnce: DOMContentLoaded event triggered"),s()}))),OfficeExtension.HostBridge.onInited((function(e){!function(e){e.addHostMessageHandler((function(e){3===e.type&&o(e.message)}))}(e)}))}()}(t||(t={}))}(Office||(Office={})),function(e){!function(e){function t(){var e=new OfficeCore.RequestContext;return"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(e._customData="WacPartition"),e}e.areShortcutsInUse=function(e){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,a;return __generator(this,(function(s){switch(s.label){case 0:return n=t(),r=OfficeCore.ActionService.newObject(n),i=r.areShortcutsInUse(e),[4,n.sync()];case 1:for(s.sent(),o=[],a=0;a0&&Array.isArray(n[0])&&n.length*n[0].length>1500&&p()){var r=Math.max(1,Math.round(1500/n[0].length));e._ValidateArraySize(n.length,n[0].length);for(var i=0;in.length&&(o=n.length-i);var a=e.getRow(i).untrack().getBoundingRect(e.getRow(i+o-1).untrack()).untrack(),s=n.slice(i,i+o);I(a,t,s,0)}return!0}return!1}function c(e){return OfficeExtension.Utility.isSetSupported("ExcelApi",e.toString())}function p(){return c(1.3)}function h(e){return!("undefined"===typeof window||!window.Office||!window.Office.context)&&window.Office.context.platform===e}e.icons={},["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"].map((function(t,n){var r=i(t);e.icons[r]=[],l[n].map((function(n,o){n=i(n);var a={set:t,index:o};e.icons[r].push(a),e.icons[r][n]=a}))})),function(e){e.NotStarted="notStarted",e.Running="running",e.Succeeded="succeeded",e.Failed="failed"}(o||(o={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NoContent=204]="NoContent",e[e.HighestSuccessCode=299]="HighestSuccessCode",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"}(a||(a={})),function(e){e.Close="Session.close",e.CommitChanges="Session.commitChanges",e.Create="Session.resolveRequestUrlAndHeaderInfo",e.Refresh="Session.refreshSession"}(s=e.SessionOperation||(e.SessionOperation={}));var f=function(){function e(e,t,n){var r=void 0===n?{}:n,i=r.persistChanges,o=void 0===i||i,a=r.commitExplicitly,s=void 0===a||a;this.m_requestId="",this.m_workbookUrl=e?this.ensureUrlFormatEndWithSlash(e):"",this.m_requestHeaders=t||{},this.m_persistChanges=o,this.m_commitExplicitly=s}return Object.defineProperty(e.prototype,"requestId",{get:function(){return this.m_requestId},enumerable:!0,configurable:!0}),e.prototype.close=function(){var t=this;if(this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)){var n={method:"POST",url:this.ensureUrlFormatEndWithSlash(this.m_requestUrlAndHeaderInfo.url)+e.CLOSE_SESSION,headers:this.m_requestUrlAndHeaderInfo.headers,body:""};return OfficeExtension.HttpUtility.sendRequest(n).then((function(n){if(n.statusCode!==a.NoContent)throw t.createErrorFromResponseInfo(n,s.Close);for(var r in t.m_requestUrlAndHeaderInfo=null,t.m_requestHeaders)if(r.toLowerCase()===e.WorkbookSessionIdHeaderNameLower){delete t.m_requestHeaders[r];break}}))}return OfficeExtension.Utility._createPromiseFromResult(null)},e.prototype.commitChanges=function(t){var n=this;if(void 0===t&&(t={}),!this.m_commitExplicitly)throw this.createError(a.InternalServerError,"Can not call commitChanges() if commitExplicitly is not set.",s.CommitChanges);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.CommitChanges);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.CommitChanges);var r=this.createCommitChangesRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){var i=r.statusCode;if(i===a.Accepted)return n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.CommitChanges,t)})).then((function(e){if(JSON.parse(e.body).status===o.Failed)throw n.createErrorFromResponseInfo(e,s.CommitChanges);return n.parseCooldownTime(e)}));if(i>=a.OK&&i<=a.HighestSuccessCode)return n.parseCooldownTime(r);throw n.createErrorFromResponseInfo(r,s.CommitChanges)}))},e.prototype._resolveRequestUrlAndHeaderInfo=function(t){var n=this;if(void 0===t&&(t={}),this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(this.getHeaderIgnoreCase(this.m_requestHeaders,e.WorkbookSessionIdHeaderNameLower))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);var r=this.createAsyncGraphSessionRequestInfo(t);return OfficeExtension.HttpUtility.sendRequest(r).then((function(r){if(n.m_requestId=n.getHeaderIgnoreCase(r.headers,e.REQUEST_ID_HEADER),r.statusCode!==a.Accepted&&r.statusCode!==a.Created)throw n.createErrorFromResponseInfo(r,s.Create);return r.statusCode===a.Created?(n.formatRequestUrlAndHeaderInfo(r),n.m_requestUrlAndHeaderInfo):n.delay(e.POLL_DELAY).then((function(i){return n.pollResourceLocation(n.getHeaderIgnoreCase(r.headers,e.LOCATION_HEADER),s.Create,t)})).then((function(r){var i=JSON.parse(r.body);if(i.status===o.Failed)throw n.createErrorFromResponseInfo(r,s.Create);var a={method:"GET",url:i.resourceLocation,headers:__assign({},t,{Authorization:n.getHeaderIgnoreCase(n.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(a).then((function(e){return n.formatRequestUrlAndHeaderInfo(e),n.m_requestUrlAndHeaderInfo}))}))}))},e.prototype.refreshSession=function(){var e=this;if(!this.m_workbookUrl||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))throw this.createError(a.InternalServerError,"Not supported for local documents.",s.Refresh);if(!this.m_requestUrlAndHeaderInfo)throw this.createError(a.InternalServerError,"Need to call this._resolveRequestUrlAndHeaderInfo() to get the session id first.",s.Refresh);var t=this.createRefreshSessionRequestInfo();return OfficeExtension.HttpUtility.sendRequest(t).then((function(t){if(t.statusCode!=a.NoContent)throw e.createErrorFromResponseInfo(t,s.Refresh);return OfficeExtension.Utility._createPromiseFromResult(null)}))},e.prototype.getHeaderIgnoreCase=function(e,t){var n=Object.keys(e).filter((function(e){return e.toLowerCase()===t.toLowerCase()}));return n.length>0?e[n[0]]:void 0},e.prototype.createCommitChangesRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.COMMIT_CHANGES,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{}}},e.prototype.createAsyncGraphSessionRequestInfo=function(t){void 0===t&&(t={});var n=this.getCorrectGraphVersionUrl()+e.CREATE_SESSION,r={};return OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),OfficeExtension.Utility._copyHeaders(t,r),r[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,r[e.PREFER_HEADER]=e.PREFER_HEADER_VAL,{url:n,method:"POST",headers:r,body:{persistChanges:this.m_persistChanges,commitExplicitly:this.m_commitExplicitly}}},e.prototype.createRefreshSessionRequestInfo=function(){var t=this.getCorrectGraphVersionUrl()+e.REFRESH_SESSION,n={};return OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,n),n[e.CONTENT_TYPE_HEADER]=e.CONTENT_TYPE_HEADER_VAL,{url:t,method:"POST",headers:n,body:{}}},e.prototype.getCorrectGraphVersionUrl=function(){return this.m_workbookUrl.replace(new RegExp("graph.microsoft.com/.*?/"),"graph.microsoft.com/"+e.ASYNC_API_GRAPH_VERSION+"/")},e.prototype.pollResourceLocation=function(t,n,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=0),i>=e.MAX_POLL_ATTEMPTS)throw this.createError(a.InternalServerError,"Timout while polling for the resource location.",n);var l={method:"GET",url:t,headers:__assign({},r,{Authorization:this.getHeaderIgnoreCase(this.m_requestHeaders,e.AUTHORIZATION_HEADER)}),body:void 0};return OfficeExtension.HttpUtility.sendRequest(l).then((function(l){if(l.statusCode!==a.OK)return s.pollResourceLocation(t,n,r,i+1);switch(JSON.parse(l.body).status){case o.Succeeded:case o.Failed:return l;case o.NotStarted:case o.Running:return s.delay(e.POLL_DELAY).then((function(e){return s.pollResourceLocation(t,n,r,i+1)}));default:throw s.createErrorFromResponseInfo(l,n)}}))},e.prototype.parseCooldownTime=function(t){var n=this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER);return n?1e3*parseInt(n):e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER},e.prototype.formatRequestUrlAndHeaderInfo=function(t){if(t.statusCode!==a.OK&&t.statusCode!==a.Created)throw this.createErrorFromResponseInfo(t,s.Create);var n=JSON.parse(t.body).id,r={};OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,r),r[e.WorkbookSessionIdHeaderName]=n,this.m_requestUrlAndHeaderInfo={url:this.getCorrectGraphVersionUrl(),headers:r}},e.prototype.ensureUrlFormatEndWithSlash=function(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e},e.prototype.delay=function(e){return new OfficeExtension.CoreUtility.Promise((function(t,n){return setTimeout((function(){return t()}),e)}))},e.prototype.createErrorFromResponseInfo=function(t,n){var r=OfficeExtension.Utility._parseErrorResponse(t),i={retryAfter:this.getHeaderIgnoreCase(t.headers,e.RETRY_AFTER_HEADER),responseBody:OfficeExtension.Utility._parseErrorResponseBody(t)};return OfficeExtension.Utility.createRuntimeError(r.errorCode,r.errorMessage,n,t.statusCode,i)},e.prototype.createError=function(e,t,n){return OfficeExtension.Utility.createRuntimeError(""+e,t,n)},e.WorkbookSessionIdHeaderName="Workbook-Session-Id",e.WorkbookSessionIdHeaderNameLower="workbook-session-id",e.ASYNC_API_GRAPH_VERSION="beta",e.POLL_DELAY=1e4,e.MAX_POLL_ATTEMPTS=10,e.DEFAULT_COMMIT_CHANGES_RETRY_AFTER=1e4,e.LOCATION_HEADER="location",e.AUTHORIZATION_HEADER="authorization",e.REQUEST_ID_HEADER="request-id",e.RETRY_AFTER_HEADER="retry-after",e.PREFER_HEADER="Prefer",e.PREFER_HEADER_VAL="respond-async",e.CONTENT_TYPE_HEADER="Content-Type",e.CONTENT_TYPE_HEADER_VAL="application/json",e.CLOSE_SESSION="closeSession",e.COMMIT_CHANGES="commitChanges",e.CREATE_SESSION="createSession",e.REFRESH_SESSION="refreshSession",e}();e.Session=f;var d=function(t){function n(n){var r=t.call(this,n)||this;return r.m_workbook=A(e.Workbook,r),r._rootObject=r.m_workbook,r._rootObjectPropertyName="workbook",r}return __extends(n,t),n.prototype._processOfficeJsErrorResponse=function(e,t){5004===e&&(t.ErrorCode=Cr.invalidOperationInCellEditMode,t.HttpStatusCode=400,t.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode))},Object.defineProperty(n.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"runtime",{get:function(){return this.workbook._Runtime},enumerable:!0,configurable:!0}),n}(OfficeCore.RequestContext);function y(e,t){var n=e;n.delayForCellEdit&&OfficeExtension.CommonUtility.isSetSupported("DelayForCellEdit")?t._requestFlagModifier|=64:t._requestFlagModifier&=-65,n._makerSafe&&(t._requestFlagModifier|=1024)}function m(e){var t={BindingColumnCount:e.bindingColumnCount,BindingId:e.bindingId,BindingRowCount:e.bindingRowCount,bindingType:e.bindingType,HasHeaders:e.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function g(e,t){var n;return n=null==e.headers?e.rows:e,void 0===(n=window.OSF.DDA.DataCoercion.coerceData(n,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]))?null:n}function _(e){if(!("undefined"!==typeof window&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version))return!1;var t=window.Office.context.diagnostics.platform.toLowerCase();if("officeonline"===t)return!1;var n=e[t];null==n&&(n=e.general);var r=window.Office.context.diagnostics.version,i=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(i){var o=parseInt(i[1]),a=parseInt(i[2]),s=parseInt(i[3]);if(o0?o=n.getOffsetRange(r,i):(o=n,a=r,s=i),1===Math.abs(t)?o:o.getBoundingRect(n.getOffsetRange(r*t+a,i*t+s))},t}();e.RangeCustom=oe,OfficeExtension.Utility.applyMixin(ie,oe),function(t){t.Range_HandleResult=function(e,t){N(t.isEntireColumn)||(e.m_isEntireColumn=t.isEntireColumn),N(t.isEntireRow)||(e.m_isEntireRow=t.isEntireRow)},t.Range_GetColumnsAfter=function(t,n){return p()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsAfter",n,t.getLastColumn(),0,1)})},t.Range_GetColumnsBefore=function(t,n){return p()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getColumnsBefore",n,t.getColumn(0),0,-1)})},t.Range_GetResizedRange=function(e,t,n){return p()?{handled:!1,result:null}:(e._ensureInteger(t,"getResizedRange"),e._ensureInteger(n,"getResizedRange"),{handled:!0,result:(t>=0&&n>=0?e:e.getCell(0,0)).getBoundingRect(e.getLastCell().getOffsetRange(t,n))})},t.Range_GetRowsAbove=function(t,n){return p()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:t._getAdjacentRange("getRowsAbove",n,t.getRow(0),-1,0)})},t.Range_GetRowsBelow=function(t,n){return p()?{handled:!1,result:null}:(null==n&&(n=1),t._ensureInteger(n,"RowsAbove"),0===n&&OfficeExtension.Utility.throwError(e.ErrorCodes.invalidArgument,"count","RowsAbove"),{handled:!0,result:this._getAdjacentRange("getRowsBelow",n,t.getLastRow(),1,0)})},t.Range_Formulas_Set=function(e,t){return e.m_formulas=t,u(e,"Formulas",t)?{handled:!0}:{handled:!1}},t.Range_FormulasLocal_Set=function(e,t){return e.m_formulasLocal=t,u(e,"FormulasLocal",t)?{handled:!0}:{handled:!1}},t.Range_FormulasR1C1_Set=function(e,t){return e.m_formulasR1C1=t,u(e,"FormulasR1C1",t)?{handled:!0}:{handled:!1}},t.Range_NumberFormat_Set=function(e,t){return e.m_numberFormat=t,u(e,"NumberFormat",t)?{handled:!0}:{handled:!1}},t.Range_Values_Set=function(e,t){return e.m_values=t,u(e,"Values",t)?{handled:!0}:{handled:!1}}}(b=e._CC||(e._CC={}));var ae=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RangeAreas"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","address","addressLocal","areaCount","cellCount","isEntireColumn","isEntireRow","style"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Address","AddressLocal","AreaCount","CellCount","IsEntireColumn","IsEntireRow","Style"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!1,!1,!1,!1,!1,!1,!1,!0]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["areas","conditionalFormats","format","dataValidation","worksheet"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"areas",{get:function(){return this._Are||(this._Are=C(e.RangeCollection,this,"Areas",!0,4)),this._Are},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"conditionalFormats",{get:function(){return this._Co||(this._Co=C(e.ConditionalFormatCollection,this,"ConditionalFormats",!0,4)),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dataValidation",{get:function(){return this._D||(this._D=C(e.DataValidation,this,"DataValidation",!1,4)),this._D},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"format",{get:function(){return this._F||(this._F=C(e.RangeFormat,this,"Format",!1,4)),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"worksheet",{get:function(){return this._W||(this._W=C(e.Worksheet,this,"Worksheet",!1,4)),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"address",{get:function(){return T("address",this._A,"RangeAreas",this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addressLocal",{get:function(){return T("addressLocal",this._Ad,"RangeAreas",this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"areaCount",{get:function(){return T("areaCount",this._Ar,"RangeAreas",this._isNull),this._Ar},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cellCount",{get:function(){return T("cellCount",this._C,"RangeAreas",this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEntireColumn",{get:function(){return T("isEntireColumn",this.m_isEntireColumn,"RangeAreas",this._isNull),this.m_isEntireColumn},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEntireRow",{get:function(){return T("isEntireRow",this.m_isEntireRow,"RangeAreas",this._isNull),this.m_isEntireRow},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return T("style",this._S,"RangeAreas",this._isNull),this._S},set:function(e){this._S=e,I(this,"Style",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return T("_ReferenceId",this.__R,"RangeAreas",this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["style"],["format","dataValidation"],["areas","conditionalFormats","worksheet"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.calculate=function(){D(this,"Calculate",0,[],0,0)},n.prototype.clear=function(e){D(this,"Clear",0,[e],0,0)},n.prototype.convertDataTypeToText=function(){D(this,"ConvertDataTypeToText",0,[],0,0)},n.prototype.convertToLinkedDataType=function(e,t){D(this,"ConvertToLinkedDataType",0,[e,t],0,0)},n.prototype.copyFrom=function(e,t,n,r){D(this,"CopyFrom",0,[e,t,n,r],0,0)},n.prototype.getEntireColumn=function(){return S(e.RangeAreas,this,"GetEntireColumn",1,[],!1,!0,null,4)},n.prototype.getEntireRow=function(){return S(e.RangeAreas,this,"GetEntireRow",1,[],!1,!0,null,4)},n.prototype.getIntersection=function(t){return S(e.RangeAreas,this,"GetIntersection",1,[t],!1,!0,null,4)},n.prototype.getIntersectionOrNullObject=function(t){return S(e.RangeAreas,this,"GetIntersectionOrNullObject",1,[t],!1,!0,null,4)},n.prototype.getOffsetRangeAreas=function(t,n){return S(e.RangeAreas,this,"GetOffsetRangeAreas",1,[t,n],!1,!0,null,4)},n.prototype.getSpecialCells=function(t,n){return S(e.RangeAreas,this,"GetSpecialCells",1,[t,n],!1,!0,null,4)},n.prototype.getSpecialCellsOrNullObject=function(t,n){return S(e.RangeAreas,this,"GetSpecialCellsOrNullObject",1,[t,n],!1,!0,null,4)},n.prototype.getTables=function(t){return S(e.TableScopedCollection,this,"GetTables",1,[t],!0,!1,null,4)},n.prototype.getUsedRangeAreas=function(t){return S(e.RangeAreas,this,"GetUsedRangeAreas",1,[t],!1,!0,null,4)},n.prototype.getUsedRangeAreasOrNullObject=function(t){return S(e.RangeAreas,this,"GetUsedRangeAreasOrNullObject",1,[t],!1,!0,null,4)},n.prototype.setDirty=function(){D(this,"SetDirty",0,[],0,0)},n.prototype._KeepReference=function(){D(this,"_KeepReference",1,[],0,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!x(e)){var n=e;U(this,n),N(n.Address)||(this._A=n.Address),N(n.AddressLocal)||(this._Ad=n.AddressLocal),N(n.AreaCount)||(this._Ar=n.AreaCount),N(n.CellCount)||(this._C=n.CellCount),N(n.IsEntireColumn)||(this.m_isEntireColumn=n.IsEntireColumn),N(n.IsEntireRow)||(this.m_isEntireRow=n.IsEntireRow),N(n.Style)||(this._S=n.Style),N(n._ReferenceId)||(this.__R=n._ReferenceId),L(this,n,["areas","Areas","conditionalFormats","ConditionalFormats","dataValidation","DataValidation","format","Format","worksheet","Worksheet"])}},n.prototype.load=function(e){return w(this,e)},n.prototype.retrieve=function(e){return M(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),x(e)||N(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),H(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return k(this,{address:this._A,addressLocal:this._Ad,areaCount:this._Ar,cellCount:this._C,isEntireColumn:this.m_isEntireColumn,isEntireRow:this.m_isEntireRow,style:this._S},{areas:this._Are,conditionalFormats:this._Co,dataValidation:this._D,format:this._F})},n.prototype.setMockData=function(e){W(this,e)},n.prototype.ensureUnchanged=function(e){E(this,e)},n}(OfficeExtension.ClientObject);e.RangeAreas=ae;var se=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"WorkbookRangeAreas"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["_ReferenceId","addresses"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["_ReferenceId","Addresses"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["ranges","areas"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"areas",{get:function(){return this._Ar||(this._Ar=C(e.RangeAreasCollection,this,"Areas",!0,4)),this._Ar},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ranges",{get:function(){return this._R||(this._R=C(e.RangeCollection,this,"Ranges",!0,4)),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addresses",{get:function(){return T("addresses",this._A,"WorkbookRangeAreas",this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_ReferenceId",{get:function(){return T("_ReferenceId",this.__R,"WorkbookRangeAreas",this._isNull),this.__R},enumerable:!0,configurable:!0}),n.prototype.getRangeAreasBySheet=function(t){return S(e.RangeAreas,this,"GetRangeAreasBySheet",1,[t],!1,!0,null,4)},n.prototype.getRangeAreasOrNullObjectBySheet=function(t){return S(e.RangeAreas,this,"GetRangeAreasOrNullObjectBySheet",1,[t],!1,!0,null,4)},n.prototype._KeepReference=function(){D(this,"_KeepReference",1,[],0,0)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!x(e)){var n=e;U(this,n),N(n.Addresses)||(this._A=n.Addresses),N(n._ReferenceId)||(this.__R=n._ReferenceId),L(this,n,["areas","Areas","ranges","Ranges"])}},n.prototype.load=function(e){return w(this,e)},n.prototype.retrieve=function(e){return M(this,e)},n.prototype._handleIdResult=function(e){t.prototype._handleIdResult.call(this,e),x(e)||N(e._ReferenceId)||(this.__R=e._ReferenceId)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),H(this,e,n)},n.prototype.track=function(){return this.context.trackedObjects.add(this),this},n.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},n.prototype.toJSON=function(){return k(this,{addresses:this._A},{areas:this._Ar,ranges:this._R})},n.prototype.setMockData=function(e){W(this,e)},n.prototype.ensureUnchanged=function(e){E(this,e)},n}(OfficeExtension.ClientObject);e.WorkbookRangeAreas=se;var le=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyNames",{get:function(){return["numberFormat","values","text","formulas","formulasLocal","formulasR1C1","valueTypes","rowCount","columnCount","cellAddresses","index"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyOriginalNames",{get:function(){return["NumberFormat","Values","Text","Formulas","FormulasLocal","FormulasR1C1","ValueTypes","RowCount","ColumnCount","CellAddresses","Index"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!1,!0,!0,!0,!1,!1,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_navigationPropertyNames",{get:function(){return["rows"]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rows",{get:function(){return this._Ro||(this._Ro=C(e.RangeViewCollection,this,"Rows",!0,4)),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cellAddresses",{get:function(){return T("cellAddresses",this._C,"RangeView",this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"columnCount",{get:function(){return T("columnCount",this._Co,"RangeView",this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formulas",{get:function(){return T("formulas",this._F,"RangeView",this._isNull),this._F},set:function(e){this._F=e,I(this,"Formulas",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formulasLocal",{get:function(){return T("formulasLocal",this._Fo,"RangeView",this._isNull),this._Fo},set:function(e){this._Fo=e,I(this,"FormulasLocal",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formulasR1C1",{get:function(){return T("formulasR1C1",this._For,"RangeView",this._isNull),this._For},set:function(e){this._For=e,I(this,"FormulasR1C1",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"index",{get:function(){return T("index",this._I,"RangeView",this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"numberFormat",{get:function(){return T("numberFormat",this._N,"RangeView",this._isNull),this._N},set:function(e){this._N=e,I(this,"NumberFormat",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowCount",{get:function(){return T("rowCount",this._R,"RangeView",this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return T("text",this._T,"RangeView",this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"valueTypes",{get:function(){return T("valueTypes",this._Va,"RangeView",this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"values",{get:function(){return T("values",this._V,"RangeView",this._isNull),this._V},set:function(e){this._V=e,I(this,"Values",e,0)},enumerable:!0,configurable:!0}),n.prototype.set=function(e,t){this._recursivelySet(e,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},n.prototype.update=function(e){this._recursivelyUpdate(e)},n.prototype.getRange=function(){return S(e.Range,this,"GetRange",1,[],!1,!0,null,4)},n.prototype._handleResult=function(e){if(t.prototype._handleResult.call(this,e),!x(e)){var n=e;U(this,n),N(n.CellAddresses)||(this._C=n.CellAddresses),N(n.ColumnCount)||(this._Co=n.ColumnCount),N(n.Formulas)||(this._F=n.Formulas),N(n.FormulasLocal)||(this._Fo=n.FormulasLocal),N(n.FormulasR1C1)||(this._For=n.FormulasR1C1),N(n.Index)||(this._I=n.Index),N(n.NumberFormat)||(this._N=n.NumberFormat),N(n.RowCount)||(this._R=n.RowCount),N(n.Text)||(this._T=n.Text),N(n.ValueTypes)||(this._Va=n.ValueTypes),N(n.Values)||(this._V=n.Values),L(this,n,["rows","Rows"])}},n.prototype.load=function(e){return w(this,e)},n.prototype.retrieve=function(e){return M(this,e)},n.prototype._handleRetrieveResult=function(e,n){t.prototype._handleRetrieveResult.call(this,e,n),H(this,e,n)},n.prototype.toJSON=function(){return k(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},n.prototype.setMockData=function(e){W(this,e)},n.prototype.ensureUnchanged=function(e){E(this,e)},n}(OfficeExtension.ClientObject);e.RangeView=le;var ue=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return T("items",this.m__items,"RangeViewCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),n.prototype.getCount=function(){return j("RangeViewCollection.getCount",v,"1.4",O),D(this,"GetCount",1,[],4,0)},n.prototype.getItemAt=function(t){return S(e.RangeView,this,"GetItemAt",1,[t],!1,!1,null,4)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!x(n)){var r=n;if(U(this,r),!x(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o6&&"Date("===t.slice(0,5)&&")"===t.slice(-1)&&(n=new Date(parseInt(t.slice(5,-1))))?n:t}))}(t.Value))},e.Setting_Value_Set=function(e,n){if(!x(n)){e.m_value=n;var r=t(n);return I(e,"Value",r,0),{handled:!0}}return{handled:!1}}}(b=e._CC||(e._CC={}));var he=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"items",{get:function(){return T("items",this.m__items,"NamedItemCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),n.prototype.add=function(t,n,r){return j("NamedItemCollection.add",v,"1.4",O),S(e.NamedItem,this,"Add",0,[t,n,r],!1,!0,null,0)},n.prototype.addFormulaLocal=function(t,n,r){return j("NamedItemCollection.addFormulaLocal",v,"1.4",O),S(e.NamedItem,this,"AddFormulaLocal",0,[t,n,r],!1,!1,null,0)},n.prototype.getCount=function(){return j("NamedItemCollection.getCount",v,"1.4",O),D(this,"GetCount",1,[],4,0)},n.prototype.getItem=function(t){return P(e.NamedItem,this,[t])},n.prototype.getItemOrNullObject=function(t){return j("NamedItemCollection.getItemOrNullObject",v,"1.4",O),S(e.NamedItem,this,"GetItemOrNullObject",1,[t],!1,!1,null,4)},n.prototype._handleResult=function(n){if(t.prototype._handleResult.call(this,n),!x(n)){var r=n;if(U(this,r),!x(r[OfficeExtension.Constants.items])){this.m__items=[];for(var i=r[OfficeExtension.Constants.items],o=0;o"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["error","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyOriginalNames",{get:function(){return["Error","Value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return T("error",this._E,"FunctionResult",this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return T("value",this._V,"FunctionResult",this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(e.prototype._handleResult.call(this,t),!x(t)){var n=t;U(this,n),N(n.Error)||(this._E=n.Error),N(n.Value)||(this._V=n.Value)}},t.prototype.load=function(e){return w(this,e)},t.prototype.retrieve=function(e){return M(this,e)},t.prototype._handleRetrieveResult=function(t,n){e.prototype._handleRetrieveResult.call(this,t,n),H(this,t,n)},t.prototype.toJSON=function(){return k(this,{error:this._E,value:this._V},{})},t.prototype.setMockData=function(e){W(this,e)},t.prototype.ensureUnchanged=function(e){E(this,e)},t}(OfficeExtension.ClientObject);e.FunctionResult=vr;var Cr,Sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),t.prototype.abs=function(e){return S(vr,this,"Abs",0,[e],!1,!0,null,0)},t.prototype.accrInt=function(e,t,n,r,i,o,a,s){return S(vr,this,"AccrInt",0,[e,t,n,r,i,o,a,s],!1,!0,null,0)},t.prototype.accrIntM=function(e,t,n,r,i){return S(vr,this,"AccrIntM",0,[e,t,n,r,i],!1,!0,null,0)},t.prototype.acos=function(e){return S(vr,this,"Acos",0,[e],!1,!0,null,0)},t.prototype.acosh=function(e){return S(vr,this,"Acosh",0,[e],!1,!0,null,0)},t.prototype.acot=function(e){return S(vr,this,"Acot",0,[e],!1,!0,null,0)},t.prototype.acoth=function(e){return S(vr,this,"Acoth",0,[e],!1,!0,null,0)},t.prototype.amorDegrc=function(e,t,n,r,i,o,a){return S(vr,this,"AmorDegrc",0,[e,t,n,r,i,o,a],!1,!0,null,0)},t.prototype.amorLinc=function(e,t,n,r,i,o,a){return S(vr,this,"AmorLinc",0,[e,t,n,r,i,o,a],!1,!0,null,0)},t.prototype.and=function(){for(var e=[],t=0;t