/*! Copyright (c) Microsoft Corporation. All rights reserved. */ /*! Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ var __extends=this.__extends||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);function r(){this.constructor=n}r.prototype=t.prototype;n.prototype=new r},OfficeExt;(function(n){var t=function(){var i=null,n=!0;function t(){}t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t?n:!1};t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)};Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;n._msAjaxError==i&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error);return n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxSerializer",{get:function(){var n=this;n._msAjaxSerializer==i&&n.isMsAjaxLoaded()&&(n._msAjaxSerializer=Sys.Serialization.JavaScriptSerializer);return n._msAjaxSerializer},set:function(n){this._msAjaxSerializer=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;n._msAjaxString==i&&n.isMsAjaxLoaded()&&(n._msAjaxSerializer=String);return n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;n._msAjaxDebug==i&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug);return n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n});return t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(n){var t=function(){function n(n){this._internalStorage=n}n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}};n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}};n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}};n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}};n.prototype.getKeysWithPrefix=function(n){var i=[];try{for(var u=this._internalStorage&&this._internalStorage.length||0,t=0;t1?s[s.length-1]:t,h=v();if(!r&&h){var e=window.name.indexOf(i);if(e>-1){var o=window.name.indexOf(";",e);o==-1&&(o=window.name.length);var c=window.name.substring(e,o);f?h.setItem(c,f):f=h.getItem(c)}}return f},getConversationId:function(){var i=window.location.search,n=t;if(i){var r=i.indexOf("&");n=r>0?i.substring(1,r):i.substr(1);if(n&&n.charAt(n.length-1)==="="){n=n.substring(0,n.length-1);n&&(n=decodeURIComponent(n))}}return n},getInfoItems:function(n){var t=n.split("$");typeof t[1]==c&&(t=n.split("|"));return t},getConversationUrl:function(){var t="",r=OSF.OUtil.parseXdmInfo(i);if(r){var n=OSF.OUtil.getInfoItems(r);n!=undefined&&n.length>=3&&(t=n[2])}return t},validateParamObject:function(t,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:n},{name:"expectedProperties",type:Object,mayBeNull:n},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(t[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof Sys!==c&&Sys&&Sys.Debug&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[f])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[f])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[b,f,p])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[b,f,p])},finalizeProperties:function(t,r){r=r||{};for(var o=Object.getOwnPropertyNames(t),s=o.length,f=0;f>8;f=e&255;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63;if(!isNaN(e)){r=e>>8;u=s&255;f=s>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63}if(isNaN(e))i[t-1]=64;else if(isNaN(s)){i[t-2]=64;i[t-1]=64}for(var h=0;h0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.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};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};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){var b=this;b._id=n;b._appName=t;b._appVersion=i;b._appUILocale=r;b._dataLocale=u;b._docUrl=f;b._clientMode=e;b._settings=o;b._reason=s;b._osfControlType=h;b._eToken=c;b._correlationId=l;b._appInstanceId=a;b._touchEnabled=v;b._commerceAllowed=y;b._appMinorVersion=p;b._requirementMatrix=w;b.get_id=function(){return this._id};b.get_appName=function(){return this._appName};b.get_appVersion=function(){return this._appVersion};b.get_appUILocale=function(){return this._appUILocale};b.get_dataLocale=function(){return this._dataLocale};b.get_docUrl=function(){return this._docUrl};b.get_clientMode=function(){return this._clientMode};b.get_bindings=function(){return this._bindings};b.get_settings=function(){return this._settings};b.get_reason=function(){return this._reason};b.get_osfControlType=function(){return this._osfControlType};b.get_eToken=function(){return this._eToken};b.get_correlationId=function(){return this._correlationId};b.get_appInstanceId=function(){return this._appInstanceId};b.get_touchEnabled=function(){return this._touchEnabled};b.get_commerceAllowed=function(){return this._commerceAllowed};b.get_appMinorVersion=function(){return this._appMinorVersion};b.get_requirementMatrix=function(){return this._requirementMatrix}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.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",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",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"};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.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,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,dispidMethodMax:141,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};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,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){return n[t]||n[this.errorCodes.ooeInternalError]},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported}}}}();var OfficeExt;(function(n){(function(n){var t=1.1,r=function(){function n(n){this.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var u=this._setMap,i=u._sets;if(i.hasOwnProperty(n.toLowerCase())){var r=i[n.toLowerCase()];return r>0&&r>=t}else return!1};this._setMap=n}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._sets=n}return n}();n.DefaultSetRequirement=i;var w=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=w;var b=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,imagecoercion:t})}return i}(i);n.ExcelClientV1DefaultSetRequirement=b;var y=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=y;var p=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=p;var k=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:1.2,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:1.2,imagecoercion:t})}return i}(i);n.WordClientV1DefaultSetRequirement=k;var nt=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=nt;var tt=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t,imagecoercion:t})}return i}(i);n.PowerpointClientV1DefaultSetRequirement=tt;var d=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=d;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var v=function(n){__extends(i,n);function i(){n.call(this,{customxmlparts:t,documentevents:t,file:t,ooxmlcoercion:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.WordWebDefaultSetRequirement=v;var o=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=o;var u=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=u;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=e;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=f;var s=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=l;var a=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:1.2,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:1.2})}return i}(i);n.WordIOSV1DefaultSetRequirement=a;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=h;var c=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=c;var it=function(){function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var e=undefined;if(t.get_requirementMatrix()!=undefined&&typeof JSON!="undefined"){var c=JSON.parse(t.get_requirementMatrix());e=new r(new i(c))}else{var o=t.get_appMinorVersion(),s="",u="",f=t.get_appName(),l=f==1024||f==4096||f==8192||f==65536;if(l&&t.get_appVersion()==1)u=f==4096&&o>=15?"16.001":"16.00";else if(t.get_appName()==64)u=t.get_appVersion();else{s=o<10?"0"+o:""+o;u=t.get_appVersion()+"."+s}var h=t.get_appName()+"-"+u;e=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[h]!=undefined?new r(n.DefaultSetArrayMatrix[h]):new r(new i({}))}return e};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new nt;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new k;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new v;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new u;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new u;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new d;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new e;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new h;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new c};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.00";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.01";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.001";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=it})(n.Requirement||(n.Requirement={}));var t=n.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 t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()}});t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});if(r){var o=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,o,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,"requirements",{value:e})};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};OSF.DDA.AsyncMethodNames={};OSF.DDA.AsyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.AsyncMethodNames[t]=i}};OSF.DDA.AsyncMethodCall=function(n,t,i,r,u,f,e){var c="function",o=n.length,s=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,e)});function h(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;break;default:throw s();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw s();}}function a(t,i,r){if(t.lengtho+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,l,v=n.length-1;v>=o;v--){var a=n[v];switch(typeof a){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=a;break;case c:if(l)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else l=a;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=f||{};for(var y in t)if(!OSF.OUtil.listContainsKey(f,y)){var e=undefined,s=t[y];s.calculate&&i&&(e=s.calculate(i,r,u));e||s.defaultValue===undefined||(e=s.defaultValue);f[y]=e}if(l)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=l;h(t,f);return f}this.verifyAndExtractCall=function(n,t,r){var e=a(n,t,r),h=l(n,e,t,r),u={};for(var c in e)u[c]=e[c];for(var o in h)u[o]=h[o];for(var s in i)u[s]=i[s](t,r);f&&(u=f(u,t,r));return u};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=o;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case c:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){function n(n){var i=null;if(n){i={};for(var r=n.length,t=0;t=1)return!0;t=n.deserialize;n.deserialize=function(n){return e(n,!0,t)};n.__patchVersion=1;return!0}i()||u(n,"load",function(){i()})})(window);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(n,t,i){this._method=n;this._invokeType=t;this._blockingOthers=i};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(n,t){this._registerMethodObject=n;this._unregisterMethodObject=t};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(n){var t=this,i=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(i)throw i;t._methodObjectList={};t._eventHandlerProxyList={};t._Id=n;t._conversations={};t._policyManager=null;t._appDomains={}};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(n,t,i,r){var e="invokeType",u=!1,f=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:u},{name:"method",type:Function,mayBeNull:u},{name:e,type:Number,mayBeNull:u},{name:"blockingOthers",type:Boolean,mayBeNull:u}]);if(f)throw f;if(i!==Microsoft.Office.Common.InvokeType.async&&i!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(e);var o=new Microsoft.Office.Common.MethodObject(t,i,r);this._methodObjectList[n]=o},unregisterMethod:function(n){var t=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1}]);if(t)throw t;delete this._methodObjectList[n]},registerEvent:function(n,t,i){var r=!1,u=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:r},{name:"registerMethod",type:Function,mayBeNull:r},{name:"unregisterMethod",type:Function,mayBeNull:r}]);if(u)throw u;var f=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,Microsoft.Office.Common.InvokeType.syncRegisterEvent,r),new Microsoft.Office.Common.MethodObject(i,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,r));this._methodObjectList[n]=f},registerEventEx:function(n,t,i,r,u){var f=!1,e=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:f},{name:"registerMethod",type:Function,mayBeNull:f},{name:"registerMethodInvokeType",type:Number,mayBeNull:f},{name:"unregisterMethod",type:Function,mayBeNull:f},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:f}]);if(e)throw e;var o=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,i,f),new Microsoft.Office.Common.MethodObject(r,u,f));this._methodObjectList[n]=o},unregisterEvent:function(n){var t=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1}]);if(t)throw t;this.unregisterMethod(n)},registerConversation:function(n,t,i,r){var e="appDomains",u=!0,f=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"conversationUrl",type:String,mayBeNull:!1,optional:u},{name:e,type:Object,mayBeNull:u,optional:u},{name:"serializerVersion",type:Number,mayBeNull:u,optional:u}]);if(f)throw f;if(i){if(!(i instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument(e);this._appDomains[n]=i}this._conversations[n]={url:t,serializerVersion:r}},unregisterConversation:function(n){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete this._conversations[n]},setPolicyManager:function(n){var i="policyManager",t=Function._validateParams(arguments,[{name:i,type:Object,mayBeNull:!1}]);if(t)throw t;if(!n.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(i);this._policyManager=n},getPolicyManager:function(){return this._policyManager}};Microsoft.Office.Common.ClientEndPoint=function(n,t,i,r){var e="targetWindow",u=this,f=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:e,mayBeNull:!1},{name:"targetUrl",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(f)throw f;if(!t.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(e);u._conversationId=n;u._targetWindow=t;u._targetUrl=i;u._callingIndex=0;u._callbackList={};u._eventHandlerList={};u._serializerVersion=r!=null?r:OSF.SerializerVersion.MsAjax};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(n,t,i){var r=this,e=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"param",mayBeNull:!0}]);if(e)throw e;var u=r._callingIndex++,h=new Date,f={callback:t,createdOn:h.getTime()};if(i&&typeof i=="object"&&typeof i.__timeout__=="number"){f.timeout=i.__timeout__;delete i.__timeout__}r._callbackList[u]=f;try{var s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.invoke,r._conversationId,u,i),o=Microsoft.Office.Common.MessagePackager.envelope(s,r._serializerVersion);r._targetWindow.postMessage(o,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(c){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete r._callbackList[u]}}},registerForEvent:function(n,t,i,r){var u=this,e=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"eventHandler",type:Function,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(e)throw e;var f=u._callingIndex++,h=new Date;u._callbackList[f]={callback:i,createdOn:h.getTime()};try{var s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.registerEvent,u._conversationId,f,r),o=Microsoft.Office.Common.MessagePackager.envelope(s,u._serializerVersion);u._targetWindow.postMessage(o,u._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();u._eventHandlerList[n]=t}catch(c){try{i!==null&&i(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete u._callbackList[f]}}},unregisterForEvent:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(f)throw f;var u=r._callingIndex++,s=new Date;r._callbackList[u]={callback:t,createdOn:s.getTime()};try{var o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.unregisterEvent,r._conversationId,u,i),e=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(e,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(h){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete r._callbackList[u]}}finally{delete r._eventHandlerList[n]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var e=!0,w="channel is not ready.",s="conversationId",b="Unknown conversation Id.",t=!1,n=null,c=[],h=n,r=n,k=10,o=t,f=n,ht=2e3,d=65e3,g=d,u={},i={},l=t;function ot(n){for(var t in u)if(u[t]._conversations[n])return u[t];OsfMsAjaxFactory.msAjaxDebug.trace(b);throw OsfMsAjaxFactory.msAjaxError.argument(s);}function it(n){var t=i[n];if(!t){OsfMsAjaxFactory.msAjaxDebug.trace(b);throw OsfMsAjaxFactory.msAjaxError.argument(s);}return t}function et(t,i){var u=t._methodObjectList[i._actionName];if(!u){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+i._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject");}var r=n;r=i._actionType===Microsoft.Office.Common.ActionType.invoke?u:i._actionType===Microsoft.Office.Common.ActionType.registerEvent?u.getRegisterMethodObject():u.getUnregisterMethodObject();return r}function ft(n){c.push(n)}function ct(){if(r!==n){if(!o)if(c.length>0){var t=c.shift();p(t)}else{clearInterval(r);r=n}}else OsfMsAjaxFactory.msAjaxDebug.trace(w)}function p(n){o=n.getInvokeBlockingFlag();n.invoke();h=+new Date}function st(){if(f){var r,o=0,s=new Date,u;for(var h in i){r=i[h];for(var e in r._callbackList){var t=r._callbackList[e];u=t.timeout?t.timeout:g;if(u>=0&&Math.abs(s.getTime()-t.createdOn)>=u)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[e]}else o++}}if(o===0){clearInterval(f);f=n}}else OsfMsAjaxFactory.msAjaxDebug.trace(w)}function ut(){o=t}function nt(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function a(n,i){var f=t;if(n===e)return e;if(!n||!i||!n.length||!i.length)return f;var r,u;r=document.createElement("a");u=document.createElement("a");r.href=n;u.href=i;f=y(r,u);delete r,u;return f}function tt(n,i){var u=t;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;var f=document.createElement("a"),e=document.createElement("a");f.href=i;for(var r=0;rk)&&!o){p(g);w=t}else r=setInterval(ct,k);w&&ft(g)}catch(yt){var b=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;yt==st&&(b=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var vt=new Microsoft.Office.Common.Response(u._actionName,u._conversationId,u._correlationId,b,Microsoft.Office.Common.ResponseType.forCalling,yt),ht=Microsoft.Office.Common.MessagePackager.envelope(vt,f);i.source&&i.source.postMessage&&i.source.postMessage(ht,d)}}else if(u._messageType===Microsoft.Office.Common.MessageType.response){var c=it(u._conversationId);c._serializerVersion=f;if(!a(c._targetUrl,i.origin))throw"Failed orgin check";if(u._responseType===Microsoft.Office.Common.ResponseType.forCalling){var v=c._callbackList[u._correlationId];if(v)try{v.callback&&v.callback(u._errorCode,u._data)}finally{delete c._callbackList[u._correlationId]}}else{var y=c._eventHandlerList[u._actionName];y!==undefined&&y!==n&&y(u._data)}}else return}}function v(){if(!l){nt(rt);l=e}}return{connect:function(n,t,r,u){var f=i[n];if(!f){v();f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u);i[n]=f}return f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){v();var t=new Microsoft.Office.Common.ServiceEndPoint(n);u[n]=t;return t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:t}]);if(i)throw i;return u[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;g=n<=0?d:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(st,ht))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n,t){if(t==OSF.SerializerVersion.Browser&&typeof JSON!="undefined"){typeof n=="object"&&(n._serializerVersion=t);return JSON.stringify(n)}else{typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.MsAjax);return OsfMsAjaxFactory.msAjaxSerializer.serialize(n)}},unenvelope:function(n,t){return t==OSF.SerializerVersion.Browser&&typeof JSON!="undefined"?JSON.parse(n):OsfMsAjaxFactory.msAjaxSerializer.deserialize(n,!0)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]);if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;var s=o;o._send=function(n){try{var i=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),t=Microsoft.Office.Common.MessagePackager.envelope(i,e);s._requesterWindow.postMessage(t,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;var o=s;s._send=function(n){try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),t=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(t,o._requesterUrl);o._postCallbackHandler()}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+r.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var h=!0,s=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:s},{name:"paramValue",mayBeNull:h},{name:"invokeCompleteCallback",mayBeNull:s},{name:"eventHandlerProxyList",mayBeNull:h},{name:"conversationId",type:String,mayBeNull:s},{name:"eventName",type:String,mayBeNull:s},{name:"serializerVersion",type:Number,mayBeNull:h,optional:h}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this;try{var t;switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(r.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=r.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var f=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(f,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(i.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=i.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var u=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(u,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var t=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],n={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,t,n)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync;n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync;n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync;return n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();var t=+new Date;OSF.getClientEndPoint().invoke("executeMethod",function(i,r){n.onReceiving&&n.onReceiving();var u;if(i==Microsoft.Office.Common.InvokeResultCode.noError){OSF.DDA.WAC.Delegate.version=r.Version;u=r.Error}else switch(i){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(u,r);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,null,Math.abs(+new Date-t),u)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=+new Date;return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs(+new Date-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,r):null,i=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;i=i&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl;return i};OSF.InitializationHelper=function(n,t,i,r,u){var f=this;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._initializeSettings=function(n,t){var o="undefined",f,r=n.get_settings(),u=OSF.OUtil.getSessionStorage();if(u){var i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(i)r=typeof JSON!==o?JSON.parse(i):OsfMsAjaxFactory.msAjaxSerializer.deserialize(i,!0);else{i=typeof JSON!==o?JSON.stringify(r):OsfMsAjaxFactory.msAjaxSerializer.serialize(r);u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i)}}var e=OSF.DDA.SettingsManager.deserializeSettings(r);f=t?new OSF.DDA.RefreshableSettings(e):new OSF.DDA.Settings(e);return f};var e=function(n){var t=window.open;n.open=function(n,i,r){var u=null;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}if(!u){var f={strUrl:n,strWindowName:i,strWindowFeatures:r};OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)}return u}};e(window)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=function(n,i){var r;if(i._appName===OSF.AppName.ExcelWebApp){var s=i._settings;r={};for(var l in s){var h=s[l];r[h[0]]=h[1]}}else r=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){var c=i._id,v=!1,a=!0,u=0;i._appMinorVersion!=undefined&&(u=i._appMinorVersion);var f=undefined;i._requirementMatrix!=undefined&&(f=i._requirementMatrix);var e=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,r,i._reason,i._osfControlType,i._eToken,i._correlationId,c,v,a,u,f);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(e);t(e)}else{var o="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(o);throw o;}};try{this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",i,this._webAppState.id)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+r+"]");throw r;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var r="ContextActivationManager_notifyHost",t=!1;try{var n=this,u=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash());if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3){n._webAppState.conversationID=i[0];n._webAppState.id=i[1];n._webAppState.webAppUrl=i[2]}}n._webAppState.serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash());n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);var o=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(o,n._webAppState.webAppUrl);var e=function(){if(!n._webAppState.focused){n._webAppState.focused=!0;for(var r=document.querySelectorAll("input,a,button"),t=0;t=3){u=n[0];f=n[2];t=Microsoft.Office.Common.XdmCommunicationManager.connect(u,window.parent,f)}}var i=null;if(t)try{t.invoke("getCustomizedScriptPathAsync",function(n,t){e(n===0?t:null)},{__timeout__:1e3})}catch(o){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{typeof window.external.getCustomizedScriptPath!="undefined"&&(i=window.external.getCustomizedScriptPath())}catch(o){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}e(i)}};OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n)})();var OSFLog;(function(n){var u="ResponseTime",i="SessionId",r="CorrelationId",t=!0,f=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=f;var h=function(n){var y="AppSizeHeight",l="AppSizeWidth",c="ClientId",a="HostVersion",s="Host",v="UserId",e="Browser",f="AssetId",o="AppURL",h="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.AppId);n.SetSerializedField(o,n.AppURL);n.SetSerializedField(f,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(v,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(a,n.HostVersion);n.SetSerializedField(c,n.ClientId);n.SetSerializedField(l,n.AppSizeWidth);n.SetSerializedField(y,n.AppSizeHeight)};return u}(f);n.AppActivatedUsageData=h;var c=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(f);n.ScriptLoadUsageData=c;var s=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(f);n.AppClosedUsageData=s;var e=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(f);n.APIUsageUsageData=e;var o=function(n){var f="Message",e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(f);n.AppInitializationUsageData=o})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(n){var t=this;t.proxyFrameReady===!0?t.proxyFrame.contentWindow.postMessage(n,"*"):t.buffer.length<128&&t.buffer.push(n)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(n){var t=this,f=t;if(n.data==="ProxyFrameReadyToLog"){t.proxyFrameReady=!0;for(var i=0;i40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var r=this,i=r.getValue(r.logIdSetKey);i=(i&&i.length>0?i+";":"")+n;r.setValue(r.logIdSetKey,i);r.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t="";i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),f=function(){function n(){}n.prototype.LogData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none)};n.prototype.LogRawData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none)};return n}();function w(u){if(OSF.Logger&&!t){t=new b;t.hostVersion=u.get_appVersion();t.appId=u.get_id();t.host=u.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u.get_correlationId();t.clientId=(new s).getClientId();var f=location.href.indexOf("?");t.appURL=f==-1?location.href:location.href.substring(0,f);(function(n,t){var f,u,r;t.assetId="";t.userId="";try{f=decodeURIComponent(n);u=new DOMParser;r=u.parseFromString(f,"text/xml");t.userId=r.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue;t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{f=i;r=i;u=i}})(u.get_eToken(),t);(function(){var c=new Date,u=i,o=0,h=!1,f=function(){if(document.hasFocus())u==i&&(u=new Date);else if(u){o+=Math.abs(+new Date-u.getTime());u=i}},t=[];t.push(new r("focus",f));t.push(new r("blur",f));t.push(new r("focusout",f));t.push(new r("focusin",f));var s=function(){for(var r=0;r6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Type.registerNamespace("OSF.DDA");OSF.DDA.OutlookAppOm=function(n,t,i){this.$$d_$2s_0=Function.createDelegate(this,this.$2s_0);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d_$3E_0=Function.createDelegate(this,this.$3E_0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d_$44_0=Function.createDelegate(this,this.$44_0);this.$$d_$42_0=Function.createDelegate(this,this.$42_0);this.$$d_$4X_0=Function.createDelegate(this,this.$4X_0);this.$$d_$4D_0=Function.createDelegate(this,this.$4D_0);this.$$d_$4A_0=Function.createDelegate(this,this.$4A_0);OSF.DDA.OutlookAppOm.$2=this;this.$X_0=n;this.$1B_0=i;var u=this;var r=function(){i&&u.$C_0(1,"GetInitialData",null,u.$$d_$4A_0)};this.$1x_0()?r():this.$4g_0(r)};OSF.DDA.OutlookAppOm.$G=function(n){if(!n)throw Error.create(_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};OSF.DDA.OutlookAppOm.$9=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};OSF.DDA.OutlookAppOm.$48=function(n){var t="";if("htmlBody"in n){OSF.DDA.OutlookAppOm.$4z(n.htmlBody);t=n.htmlBody}return t};OSF.DDA.OutlookAppOm.$1T=function(n){var t=[];if("attachments"in n){t=n.attachments;OSF.DDA.OutlookAppOm.$4x(t)}return t};OSF.DDA.OutlookAppOm.$4J=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};OSF.DDA.OutlookAppOm.$20=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,_u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);OSF.DDA.OutlookAppOm.$2o(t)};OSF.DDA.OutlookAppOm.$4w=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,_u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);OSF.DDA.OutlookAppOm.$2o(t)};OSF.DDA.OutlookAppOm.$2o=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,_u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};OSF.DDA.OutlookAppOm.$U=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};OSF.DDA.OutlookAppOm.$b=function(n,t,i,r){if(!$h.ScriptHelpers.isNullOrUndefined(n)){OSF.DDA.OutlookAppOm.$U(n,String,r);var u=n;OSF.DDA.OutlookAppOm.$9(u.length,t,i,r)}};OSF.DDA.OutlookAppOm.$2y=function(n,t){var i=null;switch(n){case 1:case 2:case 12:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 4:var r=JSON.stringify(t.customProperties);i=[r];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[OSF.DDA.OutlookAppOm.$Q(t.requiredAttendees),OSF.DDA.OutlookAppOm.$Q(t.optionalAttendees),t.start,t.end,t.location,OSF.DDA.OutlookAppOm.$Q(t.resources),t.subject,t.body];break;case 44:i=[OSF.DDA.OutlookAppOm.$Q(t.toRecipients),OSF.DDA.OutlookAppOm.$Q(t.ccRecipients),OSF.DDA.OutlookAppOm.$Q(t.bccRecipients),t.subject,t.body,t.attachments];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,OSF.DDA.OutlookAppOm.$2w(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];break;case 36:i=[t.key];break;default:break}return i};OSF.DDA.OutlookAppOm.$Q=function(n){return n?n.join(";"):null};OSF.DDA.OutlookAppOm.$2w=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;tOSF.DDA.OutlookAppOm.$2c)throw Error.argument("data",_u.ExtensibilityStrings.l_EwsRequestOversized_Text);this.$5_0(3,"makeEwsRequestAsync");var u=$h.CommonParameters.parse(r,!0,!0);var t=new $h.EwsRequest(u.$4_0);var f=this;t.onreadystatechange=function(){4===t.get_$1j_1()&&u.$3_0(t.$P_0)};t.send(n)},recordDataPoint:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.$C_0(0,"RecordDataPoint",n,null)},recordTrace:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.$C_0(0,"RecordTrace",n,null)},trackCtq:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.$C_0(0,"TrackCtq",n,null)},convertToLocalClientTime:function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this.$6_0&&this.$6_0.get_$1p_0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this.$2B_0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this.$1I_0(t);r.timezoneOffset=i;return r},convertToUtcClientTime:function(n){var t=this.$3D_0(n);if(this.$6_0&&this.$6_0.get_$1p_0()){var i=this.$2B_0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t},getUserIdentityTokenAsync:function(){for(var i=[],n=0;n1&&f[1]){i.error=!0;i.errorCode=f[1]}else i.error=!1;r(t,i)}else if(Number.isInstanceOfType(u)){var e={};e.error=!0;e.errorCode=u;r(t,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}else r&&r(-2,null)},$3D_0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(isNaN(t.getTime()))throw Error.format(_u.ExtensibilityStrings.l_InvalidDate_Text);return t},$1I_0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},$3E_0:function(n){var u=OSF.DDA.OutlookAppOm.$a(n.requiredAttendees,"requiredAttendees");var r=OSF.DDA.OutlookAppOm.$a(n.optionalAttendees,"optionalAttendees");OSF.DDA.OutlookAppOm.$b(n.location,0,OSF.DDA.OutlookAppOm.$2d,"location");OSF.DDA.OutlookAppOm.$b(n.body,0,OSF.DDA.OutlookAppOm.maxBodyLength,"body");OSF.DDA.OutlookAppOm.$b(n.subject,0,OSF.DDA.OutlookAppOm.$1h,"subject");if(!$h.ScriptHelpers.isNullOrUndefined(n.start)){OSF.DDA.OutlookAppOm.$U(n.start,Date,"start");var o=n.start;n.start=o.getTime();if(!$h.ScriptHelpers.isNullOrUndefined(n.end)){OSF.DDA.OutlookAppOm.$U(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return parseInt(t.offset)}throw Error.format(_u.ExtensibilityStrings.l_InvalidDate_Text);},$1x_0:function(){var n=!1;try{n=!$h.ScriptHelpers.isNullOrUndefined(_u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},$4g_0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c.$1x_0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c.$25_0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this.$25_0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},$25_0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};OSF.DDA.Settings=function(n){this.$y_0=n};OSF.DDA.Settings.$2x=function(n){if(!n)return{};if(OSF.DDA.OutlookAppOm.$2.get_$1A_0()===8){var t=n.SettingsKey;if(t)return OSF.DDA.SettingsManager.deserializeSettings(t)}return n};OSF.DDA.Settings.prototype={$y_0:null,$11_0:null,get_$R_0:function(){if(!this.$11_0){this.$11_0=OSF.DDA.Settings.$2x(this.$y_0);this.$y_0=null}return this.$11_0},get:function(n){return this.get_$R_0()[n]},set:function(n,t){this.get_$R_0()[n]=t},remove:function(n){delete this.get_$R_0()[n]},saveAsync:function(){for(var i=[],t=0;t32768){var r=OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,1,9019,n.$4_0,"");var u=this;window.setTimeout(function(){n.$3_0(r)},0);return}OSF.DDA.OutlookAppOm.$2.get_$1A_0()===64?this.$4r_0(n.$3_0,n.$4_0):this.$4q_0(n.$3_0,n.$4_0)},$4q_0:function(n,t){var r=null;try{var f=OSF.DDA.SettingsManager.serializeSettings(this.get_$R_0());var e=JSON.stringify(f);var u={SettingsKey:e};OSF.DDA.ClientSettingsManager.write(u)}catch(o){r=o}if(n){var i;i=r?OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,1,9019,t,r.message):OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,0,0,t,null);n(i)}},$4r_0:function(n,t){var i=OSF.DDA.SettingsManager.serializeSettings(this.get_$R_0());var r=this;OSF._OfficeAppFactory.getClientEndPoint().invoke("saveSettingsAsync",function(i,r){if(n){var u;if(i)u=OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,1,9017,t,String.format(_u.ExtensibilityStrings.l_InternalProtocolError_Text,i));else{var f=r;u=f.error?OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,1,9019,t,f.errorMessage):OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,0,0,t,null)}n(u)}},[i])}};Type.registerNamespace("$h");Type.registerNamespace("Office.cast");$h.Appointment=function(n){this.$$d_$4K_2=Function.createDelegate(this,this.$4K_2);this.$$d_$2R_2=Function.createDelegate(this,this.$2R_2);this.$$d_$r_2=Function.createDelegate(this,this.$r_2);this.$$d_$4Q_2=Function.createDelegate(this,this.$4Q_2);this.$$d_$1c_2=Function.createDelegate(this,this.$1c_2);this.$$d_$1Z_2=Function.createDelegate(this,this.$1Z_2);this.$$d_$q_2=Function.createDelegate(this,this.$q_2);this.$$d_$1X_2=Function.createDelegate(this,this.$1X_2);this.$$d_$1d_2=Function.createDelegate(this,this.$1d_2);$h.Appointment.initializeBase(this,[n]);$h.InitialData.$1(this,"start",this.$$d_$1d_2);$h.InitialData.$1(this,"end",this.$$d_$1X_2);$h.InitialData.$1(this,"location",this.$$d_$q_2);$h.InitialData.$1(this,"optionalAttendees",this.$$d_$1Z_2);$h.InitialData.$1(this,"requiredAttendees",this.$$d_$1c_2);$h.InitialData.$1(this,"resources",this.$$d_$4Q_2);$h.InitialData.$1(this,"subject",this.$$d_$r_2);$h.InitialData.$1(this,"normalizedSubject",this.$$d_$2R_2);$h.InitialData.$1(this,"organizer",this.$$d_$4K_2)};$h.Appointment.prototype={getEntities:function(){return this.$0_0.$p_0()},getEntitiesByType:function(n){return this.$0_0.$2O_0(n)},getRegExMatches:function(){OSF.DDA.OutlookAppOm.$2.$5_0(1,"getRegExMatches");return this.$0_0.$1b_0()},getFilteredEntitiesByName:function(n){return this.$0_0.$1Y_0(n)},getRegExMatchesByName:function(n){OSF.DDA.OutlookAppOm.$2.$5_0(1,"getRegExMatchesByName");return this.$0_0.$2V_0(n)},displayReplyForm:function(n){OSF.DDA.OutlookAppOm.$2.$28_0(n)},displayReplyAllForm:function(n){OSF.DDA.OutlookAppOm.$2.$27_0(n)},getItemType:function(){return Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},$1d_2:function(){return this.$0_0.get_$2k_0()},$1X_2:function(){return this.$0_0.get_$2A_0()},$q_2:function(){return this.$0_0.get_$2a_0()},$1Z_2:function(){return this.$0_0.get_$1D_0()},$1c_2:function(){return this.$0_0.get_$1q_0()},$4Q_2:function(){return this.$0_0.get_$4p_0()},$r_2:function(){return this.$0_0.get_$2n_0()},$2R_2:function(){return this.$0_0.get_$2f_0()},$4K_2:function(){return this.$0_0.get_$4j_0()}};$h.AppointmentCompose=function(n){this.$$d_$q_2=Function.createDelegate(this,this.$q_2);this.$$d_$1X_2=Function.createDelegate(this,this.$1X_2);this.$$d_$1d_2=Function.createDelegate(this,this.$1d_2);this.$$d_$1Z_2=Function.createDelegate(this,this.$1Z_2);this.$$d_$1c_2=Function.createDelegate(this,this.$1c_2);$h.AppointmentCompose.initializeBase(this,[n]);$h.InitialData.$1(this,"requiredAttendees",this.$$d_$1c_2);$h.InitialData.$1(this,"optionalAttendees",this.$$d_$1Z_2);$h.InitialData.$1(this,"start",this.$$d_$1d_2);$h.InitialData.$1(this,"end",this.$$d_$1X_2);$h.InitialData.$1(this,"location",this.$$d_$q_2)};$h.AppointmentCompose.prototype={$z_2:null,$w_2:null,$12_2:null,$m_2:null,$s_2:null,getItemType:function(){return Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},$1c_2:function(){this.$0_0.$A_0();this.$z_2||(this.$z_2=new $h.ComposeRecipient(0,"requiredAttendees"));return this.$z_2},$1Z_2:function(){this.$0_0.$A_0();this.$w_2||(this.$w_2=new $h.ComposeRecipient(1,"optionalAttendees"));return this.$w_2},$1d_2:function(){this.$0_0.$A_0();this.$12_2||(this.$12_2=new $h.ComposeTime(1));return this.$12_2},$1X_2:function(){this.$0_0.$A_0();this.$m_2||(this.$m_2=new $h.ComposeTime(2));return this.$m_2},$q_2:function(){this.$0_0.$A_0();this.$s_2||(this.$s_2=new $h.ComposeLocation);return this.$s_2}};$h.AttachmentConstants=function(){};$h.AttachmentDetails=function(n){this.$$d_$4C_0=Function.createDelegate(this,this.$4C_0);this.$$d_$3t_0=Function.createDelegate(this,this.$3t_0);this.$$d_$4S_0=Function.createDelegate(this,this.$4S_0);this.$$d_$3z_0=Function.createDelegate(this,this.$3z_0);this.$$d_$4H_0=Function.createDelegate(this,this.$4H_0);this.$$d_$49_0=Function.createDelegate(this,this.$49_0);this.$0_0=n;$h.InitialData.$1(this,"id",this.$$d_$49_0);$h.InitialData.$1(this,"name",this.$$d_$4H_0);$h.InitialData.$1(this,"contentType",this.$$d_$3z_0);$h.InitialData.$1(this,"size",this.$$d_$4S_0);$h.InitialData.$1(this,"attachmentType",this.$$d_$3t_0);$h.InitialData.$1(this,"isInline",this.$$d_$4C_0)};$h.AttachmentDetails.prototype={$0_0:null,$49_0:function(){return this.$0_0.id},$4H_0:function(){return this.$0_0.name},$3z_0:function(){return this.$0_0.contentType},$4S_0:function(){return this.$0_0.size},$3t_0:function(){var n=this.$0_0.attachmentType;return n<$h.AttachmentDetails.$1C.length?$h.AttachmentDetails.$1C[n]:Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.File},$4C_0:function(){return this.$0_0.isInline}};$h.Body=function(){};$h.Body.$1r=function(n,t){t.val=undefined;if(n===Microsoft.Office.WebExtension.CoercionType.Html)t.val=3;else if(n===Microsoft.Office.WebExtension.CoercionType.Text)t.val=0;else return!1;return!0};$h.Body.prototype={getAsync:function(n){for(var f=[],t=1;t255)throw Error.argumentOutOfRange("recipients",n.length,_u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,_u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};$h.ComposeRecipient.$3s=function(n){for(var r=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=$h.CommonParameters.parse(r,!1);OSF.DDA.OutlookAppOm.$2.$8_0(25,"SetTimeAsync",{TimeProperty:this.$Z_0,time:n.getTime()},null,i.$4_0,i.$3_0)},$50_0:function(n){var t=n;return new Date(t)},$2T_0:function(){return this.$Z_0===1?"start":"end"}};$h.ComposeTime.TimeType=function(){};$h.ComposeTime.TimeType.prototype={start:1,end:2};$h.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);$h.Contact=function(n){this.$$d_$3y_0=Function.createDelegate(this,this.$3y_0);this.$$d_$1S_0=Function.createDelegate(this,this.$1S_0);this.$$d_$1e_0=Function.createDelegate(this,this.$1e_0);this.$$d_$1W_0=Function.createDelegate(this,this.$1W_0);this.$$d_$1a_0=Function.createDelegate(this,this.$1a_0);this.$$d_$3w_0=Function.createDelegate(this,this.$3w_0);this.$$d_$4N_0=Function.createDelegate(this,this.$4N_0);this.$0_0=n;$h.InitialData.$1(this,"personName",this.$$d_$4N_0);$h.InitialData.$1(this,"businessName",this.$$d_$3w_0);$h.InitialData.$1(this,"phoneNumbers",this.$$d_$1a_0);$h.InitialData.$1(this,"emailAddresses",this.$$d_$1W_0);$h.InitialData.$1(this,"urls",this.$$d_$1e_0);$h.InitialData.$1(this,"addresses",this.$$d_$1S_0);$h.InitialData.$1(this,"contactString",this.$$d_$3y_0)};$h.Contact.prototype={$0_0:null,$K_0:null,$4N_0:function(){return this.$0_0.PersonName},$3w_0:function(){return this.$0_0.BusinessName},$1S_0:function(){return $h.Entities.$I(this.$0_0,"Addresses")},$1W_0:function(){return $h.Entities.$I(this.$0_0,"EmailAddresses")},$1e_0:function(){return $h.Entities.$I(this.$0_0,"Urls")},$1a_0:function(){if(!this.$K_0){var n=this;this.$K_0=$h.Entities.$E($h.PhoneNumber,this.$0_0,"PhoneNumbers",function(n){return new $h.PhoneNumber(n)})}return this.$K_0},$3y_0:function(){return this.$0_0.ContactString}};$h.CustomProperties=function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this.$0_0=t[0];else throw Error.argument("data");}else this.$0_0=n};$h.CustomProperties.prototype={$0_0:null,get:function(n){var i=this.$0_0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=parseInt(f);if(!isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i},set:function(n,t){OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this.$0_0[n]=t},remove:function(n){delete this.$0_0[n]},saveAsync:function(){for(var i=[],n=0;nu)throw Error.argument();var t=$h.CommonParameters.parse(i,!1,!0);var r=new $h.SaveDictionaryRequest(t.$3_0,t.$4_0);r.$1m_0(4,"SaveCustomProperties",{customProperties:this.$0_0})}};$h.Diagnostics=function(n,t){this.$$d_$4M_0=Function.createDelegate(this,this.$4M_0);this.$$d_$47_0=Function.createDelegate(this,this.$47_0);this.$$d_$46_0=Function.createDelegate(this,this.$46_0);this.$0_0=n;this.$V_0=t;$h.InitialData.$1(this,"hostName",this.$$d_$46_0);$h.InitialData.$1(this,"hostVersion",this.$$d_$47_0);64===this.$V_0&&$h.InitialData.$1(this,"OWAView",this.$$d_$4M_0)};$h.Diagnostics.prototype={$0_0:null,$V_0:0,$46_0:function(){if(8===this.$V_0)return"Outlook";else if(64===this.$V_0)return"OutlookWebApp";return null},$47_0:function(){return this.$0_0.get_$4Z_0()},$4M_0:function(){return this.$0_0.get_$4l_0()}};$h.EmailAddressDetails=function(n){this.$$d_$2U_0=Function.createDelegate(this,this.$2U_0);this.$$d_$2J_0=Function.createDelegate(this,this.$2J_0);this.$$d_$1U_0=Function.createDelegate(this,this.$1U_0);this.$$d_$1V_0=Function.createDelegate(this,this.$1V_0);this.$0_0=n;$h.InitialData.$1(this,"emailAddress",this.$$d_$1V_0);$h.InitialData.$1(this,"displayName",this.$$d_$1U_0);$h.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&$h.InitialData.$1(this,"appointmentResponse",this.$$d_$2J_0);$h.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&$h.InitialData.$1(this,"recipientType",this.$$d_$2U_0)};$h.EmailAddressDetails.$23=function(n){var t={};var r=n.Name;var i=n.UserId;t.name=r||$h.EmailAddressDetails.$1M;t.address=i||$h.EmailAddressDetails.$1M;return new $h.EmailAddressDetails(t)};$h.EmailAddressDetails.prototype={$0_0:null,toJSON:function(){var n={};n.emailAddress=this.$1V_0();n.displayName=this.$1U_0();$h.ScriptHelpers.dictionaryContainsKey(this.$0_0,"appointmentResponse")&&(n.appointmentResponse=this.$2J_0());$h.ScriptHelpers.dictionaryContainsKey(this.$0_0,"recipientType")&&(n.recipientType=this.$2U_0());return n},$1V_0:function(){return this.$0_0.address},$1U_0:function(){return this.$0_0.name},$2J_0:function(){var n=this.$0_0.appointmentResponse;return n<$h.EmailAddressDetails.$1l.length?$h.EmailAddressDetails.$1l[n]:Microsoft.Office.WebExtension.MailboxEnums.ResponseType.None},$2U_0:function(){var n=this.$0_0.recipientType;return n<$h.EmailAddressDetails.$1i.length?$h.EmailAddressDetails.$1i[n]:Microsoft.Office.WebExtension.MailboxEnums.RecipientType.Other}};$h.Entities=function(n,t,i,r){this.$$d_$34_0=Function.createDelegate(this,this.$34_0);this.$$d_$2S_0=Function.createDelegate(this,this.$2S_0);this.$$d_$2P_0=Function.createDelegate(this,this.$2P_0);this.$$d_$2M_0=Function.createDelegate(this,this.$2M_0);this.$$d_$1a_0=Function.createDelegate(this,this.$1a_0);this.$$d_$1e_0=Function.createDelegate(this,this.$1e_0);this.$$d_$1W_0=Function.createDelegate(this,this.$1W_0);this.$$d_$2Q_0=Function.createDelegate(this,this.$2Q_0);this.$$d_$2W_0=Function.createDelegate(this,this.$2W_0);this.$$d_$1S_0=Function.createDelegate(this,this.$1S_0);this.$0_0=n||{};this.$1N_0=t||{};this.$N_0=i;$h.InitialData.$1(this,"addresses",this.$$d_$1S_0);$h.InitialData.$1(this,"taskSuggestions",this.$$d_$2W_0);$h.InitialData.$1(this,"meetingSuggestions",this.$$d_$2Q_0);$h.InitialData.$1(this,"emailAddresses",this.$$d_$1W_0);$h.InitialData.$1(this,"urls",this.$$d_$1e_0);$h.InitialData.$1(this,"phoneNumbers",this.$$d_$1a_0);$h.InitialData.$1(this,"contacts",this.$$d_$2M_0);$h.InitialData.$1(this,"flightReservations",this.$$d_$2P_0);$h.InitialData.$1(this,"parcelDeliveries",this.$$d_$2S_0);this.$B_0=r};$h.Entities.$E=function(n,t,i,r,u,f){var o=null;var e=t[i];if(!e)return new Array(0);u&&(e=$h.Entities.$2g(Object,e,$h.Entities.$3I,f));o=new Array(e.length);for(var c=0,l=e,a=l.length,s=0;s=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};$h.Entities.prototype={$N_0:null,$0_0:null,$1N_0:null,$F_0:null,$B_0:0,$14_0:null,$t_0:null,$K_0:null,$j_0:null,$c_0:null,$l_0:null,$18_0:null,$o_0:null,$x_0:null,$3x_0:function(n){if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this.$2Q_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this.$2W_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this.$1S_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this.$1a_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this.$1W_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this.$1e_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this.$2M_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this.$2P_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this.$2S_0();return null},$1Y_0:function(n){this.$F_0||(this.$F_0={});if(!$h.ScriptHelpers.dictionaryContainsKey(this.$F_0,n)){for(var r=!1,i=0;i<$h.Entities.$19.length;i++){var u=$h.Entities.$19[i];var t=this.$1N_0[u];if(t&&$h.ScriptHelpers.dictionaryContainsKey(t,n)){switch(u){case"EmailAddresses":case"Urls":this.$F_0[n]=$h.Entities.$I(t,n);break;case"Addresses":this.$F_0[n]=$h.Entities.$I(t,n,!0);break;case"PhoneNumbers":this.$F_0[n]=$h.Entities.$E($h.PhoneNumber,t,n,$h.Entities.$24,!1,null);break;case"TaskSuggestions":this.$F_0[n]=$h.Entities.$E($h.TaskSuggestion,t,n,$h.Entities.$26,!0,"TaskString");break;case"MeetingSuggestions":this.$F_0[n]=$h.Entities.$E($h.MeetingSuggestion,t,n,this.$$d_$34_0,!0,"MeetingString");break;case"Contacts":this.$F_0[n]=$h.Entities.$E($h.Contact,t,n,$h.Entities.$21,!0,"ContactString");break}r=!0;break}}r||(this.$F_0[n]=null)}return this.$F_0[n]},$34_0:function(n){return new $h.MeetingSuggestion(n,this.$N_0)},$1S_0:function(){this.$c_0||(this.$c_0=$h.Entities.$I(this.$0_0,"Addresses",!0));return this.$c_0},$1W_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0);this.$l_0||(this.$l_0=$h.Entities.$I(this.$0_0,"EmailAddresses",!1));return this.$l_0},$1e_0:function(){this.$18_0||(this.$18_0=$h.Entities.$I(this.$0_0,"Urls",!1));return this.$18_0},$1a_0:function(){this.$K_0||(this.$K_0=$h.Entities.$E($h.PhoneNumber,this.$0_0,"PhoneNumbers",$h.Entities.$24));return this.$K_0},$2W_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0);this.$14_0||(this.$14_0=$h.Entities.$E($h.TaskSuggestion,this.$0_0,"TaskSuggestions",$h.Entities.$26,!0,"TaskString"));return this.$14_0},$2Q_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0);this.$t_0||(this.$t_0=$h.Entities.$E($h.MeetingSuggestion,this.$0_0,"MeetingSuggestions",this.$$d_$34_0,!0,"MeetingString"));return this.$t_0},$2M_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0);this.$j_0||(this.$j_0=$h.Entities.$E($h.Contact,this.$0_0,"Contacts",$h.Entities.$21,!0,"ContactString"));return this.$j_0},$2S_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0);this.$x_0||(this.$x_0=$h.Entities.$E(Object,this.$0_0,"ParcelDeliveries",null));return this.$x_0},$2P_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0);this.$o_0||(this.$o_0=$h.Entities.$E(Object,this.$0_0,"FlightReservations",null));return this.$o_0}};$h.ReplyConstants=function(){};$h.AsyncConstants=function(){};Office.cast.item=function(){};Office.cast.item.toItemRead=function(n){if($h.Item.isInstanceOfType(n))return n;throw Error.argumentType();};Office.cast.item.toItemCompose=function(n){if($h.ComposeItem.isInstanceOfType(n))return n;throw Error.argumentType();};Office.cast.item.toMessage=function(n){return Office.cast.item.toMessageRead(n)};Office.cast.item.toMessageRead=function(n){if($h.Message.isInstanceOfType(n))return n;throw Error.argumentType();};Office.cast.item.toMessageCompose=function(n){if($h.MessageCompose.isInstanceOfType(n))return n;throw Error.argumentType();};Office.cast.item.toMeetingRequest=function(n){if($h.MeetingRequest.isInstanceOfType(n))return n;throw Error.argumentType();};Office.cast.item.toAppointment=function(n){return Office.cast.item.toAppointmentRead(n)};Office.cast.item.toAppointmentRead=function(n){if($h.Appointment.isInstanceOfType(n))return n;throw Error.argumentType();};Office.cast.item.toAppointmentCompose=function(n){if($h.AppointmentCompose.isInstanceOfType(n))return n;throw Error.argumentType();};$h.Item=function(n){this.$$d_$2K_1=Function.createDelegate(this,this.$2K_1);this.$$d_$1T_1=Function.createDelegate(this,this.$1T_1);this.$$d_$4E_1=Function.createDelegate(this,this.$4E_1);this.$$d_$4F_1=Function.createDelegate(this,this.$4F_1);this.$$d_$41_1=Function.createDelegate(this,this.$41_1);this.$$d_$40_1=Function.createDelegate(this,this.$40_1);$h.Item.initializeBase(this,[n]);$h.InitialData.$1(this,"dateTimeCreated",this.$$d_$40_1);$h.InitialData.$1(this,"dateTimeModified",this.$$d_$41_1);$h.InitialData.$1(this,"itemId",this.$$d_$4F_1);$h.InitialData.$1(this,"itemClass",this.$$d_$4E_1);$h.InitialData.$1(this,"attachments",this.$$d_$1T_1);$h.InitialData.$1(this,"body",this.$$d_$2K_1)};$h.Item.prototype={$H_1:null,$4F_1:function(){return this.$0_0.get_$4f_0()},$4E_1:function(){return this.$0_0.get_$4e_0()},$40_1:function(){return this.$0_0.get_$36_0()},$41_1:function(){return this.$0_0.get_$37_0()},$1T_1:function(){return this.$0_0.get_$2q_0()},$2K_1:function(){this.$H_1||(this.$H_1=new $h.Body);return this.$H_1}};$h.ItemBase=function(n){this.$$d_$31_0=Function.createDelegate(this,this.$31_0);this.$$d_$4I_0=Function.createDelegate(this,this.$4I_0);this.$$d_getItemType=Function.createDelegate(this,this.getItemType);this.$0_0=n;$h.InitialData.$1(this,"itemType",this.$$d_getItemType);$h.InitialData.$1(this,"notificationMessages",this.$$d_$4I_0)};$h.ItemBase.prototype={$0_0:null,$v_0:null,get_data:function(){return this.$0_0},loadCustomPropertiesAsync:function(){for(var i=[],n=0;n0)return new Date(n.getFullYear()+t.$D_1,0,1);break;default:break}return n};$h.MeetingSuggestionTimeDecoder.$3M=function(n,t,i){if(t>-5&&t<5){var u;var f;u=(i+6)%7+1;f=7*t+(u-n.getDay());n.setDate(n.getDate()+f);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};$h.MeetingSuggestionTimeDecoder.$3N=function(n,t){var f;var i;var r;f=n;if(t.$L_1<=0||t.$L_1>12||t.$D_1<=0||t.$D_1>5)return n;var e=(12+t.$L_1-f.getMonth()-1)%12;i=new Date(f.getFullYear(),f.getMonth()+e,1);if(t.$O_1===1)if(t.$D_1===1&&i.getDay()!==6&&i.getDay())return i;else{r=new Date(i.getFullYear(),i.getMonth(),i.getDate());r.setDate(r.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&r.setDate(r.getDate()-7);r.setDate(r.getDate()+7*(t.$D_1-1));return r.getMonth()+1!==t.$L_1?n:r}else{r=new Date(i.getFullYear(),i.getMonth(),$h.MeetingSuggestionTimeDecoder.$39(i.getMonth(),i.getFullYear()));var u=1-r.getDay();u>0&&(u=u-7);r.setDate(r.getDate()+u);r.setDate(r.getDate()+7*(1-t.$D_1));return r.getMonth()+1!==t.$L_1?i.getDay()!==6&&i.getDay()?i:n:r}};$h.MeetingSuggestionTimeDecoder.$3A=function(n,t,i){var f=32767;t.val=null;i.val=0;if(!n)return!1;i.val=$h.MeetingSuggestionTimeDecoder.$4V(n);var e=n.getTime()-i.val;var r=(e-$h.MeetingSuggestionTimeDecoder.$1y.getTime())/864e5;if(r<0)return!1;else if(r>=262144)return!1;else{var u=r>>15;r=r&f;switch(u){case 0:return $h.MeetingSuggestionTimeDecoder.$3B(r,t);case 1:return $h.MeetingSuggestionTimeDecoder.$3C(r,t);default:return!1}}};$h.MeetingSuggestionTimeDecoder.$3B=function(n,t){var h=7;var e=15;var o=31;var s=127;var u=null;var r=0;var f=0;t.val=null;var i=n>>12&h;if((i&4)==4){u=n>>5&s;if((i&2)==2){if((i&1)==1)return!1;r=n>>1&e}}else{(i&2)==2&&(r=n>>8&e);(i&1)==1&&(f=n>>3&o)}t.val=new $h.PreciseDate(f,r,u);return!0};$h.MeetingSuggestionTimeDecoder.$3C=function(n,t){var o=15;var e=63;var h=7;var s=3;var r=n&o;n>>=4;var i=$h.MeetingSuggestionTimeDecoder.$3P(n&e,6);n>>=6;var f=n&h;n>>=3;var u=n&s;try{t.val=new $h.RelativeDate(u,i,f,r);return!0}catch(c){t.val=null;return!1}};$h.MeetingSuggestionTimeDecoder.$3P=function(n,t){var i=1<2||!Function.isInstanceOfType(n[0]))return!1;u=n[0];i>1&&(r=n[1]);t.val=new $h.CommonParameters(null,u,r);return!0};$h.CommonParameters.prototype={$T_0:null,$3_0:null,$4_0:null,get_options:function(){return this.$T_0},get_callback:function(){return this.$3_0},get_asyncContext:function(){return this.$4_0}};$h.EwsRequest=function(n){$h.EwsRequest.initializeBase(this,[n])};$h.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get_$2l_1:function(){return this.status},set_$2l_1:function(n){this.status=n;return n},get_$2m_1:function(){return this.statusText},set_$2m_1:function(n){this.statusText=n;return n},get_$1j_1:function(){return this.readyState},set_$1j_1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get_$1k_1:function(){return this.responseText},set_$1k_1:function(n){this.responseText=n;return n},send:function(n){this.$2u_1();$h.ScriptHelpers.isNullOrUndefined(n)&&this.$1n_1();this.$1m_0(5,"EwsRequest",{body:n})},$2t_1:function(){$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},$4m_1:function(n){},executeExtraFailedResponseSteps:function(){}};$h.InitialData=function(n){this.$0_0=n;this.$B_0=this.$2r_0()};$h.InitialData.$1=function(n,t,i){var r={get:i,configurable:!1};Object.defineProperty(n,t,r)};$h.InitialData.prototype={$16_0:null,$i_0:null,$e_0:null,$10_0:null,$n_0:null,$0_0:null,$B_0:0,get_$4f_0:function(){return this.$0_0.id},get_$4e_0:function(){return this.$0_0.itemClass},get_$36_0:function(){return new Date(this.$0_0.dateTimeCreated)},get_$37_0:function(){return new Date(this.$0_0.dateTimeModified)},get_$38_0:function(){return new Date(this.$0_0.dateTimeSent)},get_$2n_0:function(){this.$A_0();return this.$0_0.subject},get_$2f_0:function(){this.$A_0();return this.$0_0.normalizedSubject},get_$4c_0:function(){return this.$0_0.internetMessageId},get_$1z_0:function(){return this.$0_0.conversationId},get_$4s_0:function(){this.$A_0();var n=this.$0_0.sender;return $h.ScriptHelpers.isNullOrUndefined(n)?null:new $h.EmailAddressDetails(n)},get_$3O_0:function(){this.$A_0();var n=this.$0_0.from;return $h.ScriptHelpers.isNullOrUndefined(n)?null:new $h.EmailAddressDetails(n)},get_$1q_0:function(){this.$A_0();null===this.$16_0&&(this.$16_0=this.$1F_0("to"));return this.$16_0},get_$1D_0:function(){this.$A_0();null===this.$i_0&&(this.$i_0=this.$1F_0("cc"));return this.$i_0},get_$2q_0:function(){this.$A_0();null===this.$e_0&&(this.$e_0=this.$30_0());return this.$e_0},get_$3K_0:function(){return this.$0_0.ewsUrl},get_$4h_0:function(){return this.$0_0.marketplaceAssetId},get_$3L_0:function(){return this.$0_0.extensionId},get_$4i_0:function(){return this.$0_0.marketplaceContentMarket},get_$2v_0:function(){return this.$0_0.consentMetadata},get_$4d_0:function(){return this.$0_0.isRead},get_$3H_0:function(){return this.$0_0.endNodeUrl},get_$3J_0:function(){return this.$0_0.entryPointUrl},get_$2k_0:function(){return new Date(this.$0_0.start)},get_$2A_0:function(){return new Date(this.$0_0.end)},get_$2a_0:function(){return this.$0_0.location},get_$54_0:function(){return this.$0_0.userProfileType},get_$4p_0:function(){this.$A_0();null===this.$10_0&&(this.$10_0=this.$1F_0("resources"));return this.$10_0},get_$4j_0:function(){this.$A_0();var n=this.$0_0.organizer;return $h.ScriptHelpers.isNullOrUndefined(n)?null:new $h.EmailAddressDetails(n)},get_$52_0:function(){return this.$0_0.userDisplayName},get_$53_0:function(){return this.$0_0.userEmailAddress},get_$55_0:function(){return this.$0_0.userTimeZone},get_$1p_0:function(){return this.$0_0.timeZoneOffsets},get_$4Z_0:function(){return this.$0_0.hostVersion},get_$4l_0:function(){return this.$0_0.owaView},get_$4k_0:function(){return this.$0_0.overrideWindowOpen},$p_0:function(){this.$n_0||(this.$n_0=new $h.Entities(this.$0_0.entities,this.$0_0.filteredEntities,this.get_$38_0(),this.$B_0));return this.$n_0},$2O_0:function(n){var t=this.$p_0();return t.$3x_0(n)},$1Y_0:function(n){var t=this.$p_0();return t.$1Y_0(n)},$1b_0:function(){return this.$0_0.regExMatches?this.$0_0.regExMatches:null},$2V_0:function(n){var t=this.$1b_0();return!t||!t[n]?null:t[n]},$A_0:function(){OSF.DDA.OutlookAppOm.$G(this.$B_0)},$1F_0:function(n){var i=this.$0_0[n];if($h.ScriptHelpers.isNullOrUndefined(i))return[];for(var r=[],t=0;t