UNPKG

@microsoft/office-js

Version:
11 lines (9 loc) • 76.4 kB
/* Outlook specific API library */ /* Version: 15.0.4726.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ 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"};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"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Type.registerNamespace("OSF.DDA");OSF.DDA.OutlookAppOm=function(n,t,i){this.$$d_$2i_0=Function.createDelegate(this,this.$2i_0);this.$$d_$34_0=Function.createDelegate(this,this.$34_0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d_$3k_0=Function.createDelegate(this,this.$3k_0);this.$$d_$3i_0=Function.createDelegate(this,this.$3i_0);this.$$d_$4C_0=Function.createDelegate(this,this.$4C_0);this.$$d_$3t_0=Function.createDelegate(this,this.$3t_0);this.$$d_$3q_0=Function.createDelegate(this,this.$3q_0);OSF.DDA.OutlookAppOm.$2=this;this.$V_0=n;this.$14_0=i;var u=this;var r=function(){i&&u.$E_0(1,"GetInitialData",null,u.$$d_$3q_0)};this.$1p_0()?r():this.$4J_0(r)};OSF.DDA.OutlookAppOm.$N=function(n){if(!n)throw Error.create(_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};OSF.DDA.OutlookAppOm.$A=function(n,t,i,r){if(n<t||n>i)throw Error.argumentOutOfRange(r);};OSF.DDA.OutlookAppOm.$3o=function(n){var t="";if("htmlBody"in n){OSF.DDA.OutlookAppOm.$4a(n.htmlBody);t=n.htmlBody}return t};OSF.DDA.OutlookAppOm.$2B=function(n){var t=[];if("attachments"in n){t=n.attachments;OSF.DDA.OutlookAppOm.$4Y(t)}return t};OSF.DDA.OutlookAppOm.$3y=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};OSF.DDA.OutlookAppOm.$2q=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t<n.length;t++)if(Object.isInstanceOfType(n[t])){var i=n[t];OSF.DDA.OutlookAppOm.$4W(i);r[t]=OSF.DDA.OutlookAppOm.$2o(i)}else throw Error.argument("attachments");return r};OSF.DDA.OutlookAppOm.$4a=function(n){if(!String.isInstanceOfType(n))throw Error.argument("htmlBody");if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argument("htmlBody");OSF.DDA.OutlookAppOm.$A(n.length,0,OSF.DDA.OutlookAppOm.maxBodyLength,"htmlBody")};OSF.DDA.OutlookAppOm.$4Y=function(n){if(!Array.isInstanceOfType(n))throw Error.argument("attachments");};OSF.DDA.OutlookAppOm.$4W=function(n){if(!Object.isInstanceOfType(n))throw Error.argument("attachments");if(!("type"in n)||!("name"in n))throw Error.argument("attachments");if(!("url"in n||"itemId"in n))throw Error.argument("attachments");};OSF.DDA.OutlookAppOm.$2o=function(n){var t=null;if(n.type==="file"){var u=n.url;var f=n.name;OSF.DDA.OutlookAppOm.$4Z(u,f);t=OSF.DDA.OutlookAppOm.$2s(u,f)}else if(n.type==="item"){var i=n.itemId;var r=n.name;OSF.DDA.OutlookAppOm.$4X(i,r);t=OSF.DDA.OutlookAppOm.$2t(i,r)}else throw Error.argument("attachments");return t};OSF.DDA.OutlookAppOm.$2s=function(n,t){return["file",t,n]};OSF.DDA.OutlookAppOm.$2t=function(n,t){return["item",t,n]};OSF.DDA.OutlookAppOm.$4Z=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>2048)throw Error.argumentOutOfRange("attachments",n.length,_u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);OSF.DDA.OutlookAppOm.$2d(t)};OSF.DDA.OutlookAppOm.$4X=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.$2d(t)};OSF.DDA.OutlookAppOm.$2d=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,_u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};OSF.DDA.OutlookAppOm.$P=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};OSF.DDA.OutlookAppOm.$1n=function(n,t,i,r){if(!$h.ScriptHelpers.isNullOrUndefined(n)){OSF.DDA.OutlookAppOm.$P(n,String,r);var u=n;OSF.DDA.OutlookAppOm.$A(u.length,t,i,r)}};OSF.DDA.OutlookAppOm.$2n=function(n,t){var i=null;switch(n){case 1:case 2:case 12:case 3:case 14:case 18:case 26: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.$18(t.requiredAttendees),OSF.DDA.OutlookAppOm.$18(t.optionalAttendees),t.start,t.end,t.location,OSF.DDA.OutlookAppOm.$18(t.resources),t.subject,t.body];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 23:case 13:case 29:i=[t.data,t.coercionType];break;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.$2l(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;default:break}return i};OSF.DDA.OutlookAppOm.$18=function(n){return n?n.join(";"):null};OSF.DDA.OutlookAppOm.$2l=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t<n.length;t++)i[t]=[n[t].address,n[t].name];return i};OSF.DDA.OutlookAppOm.$2f=function(n,t){if($h.ScriptHelpers.isNullOrUndefined(n))return null;OSF.DDA.OutlookAppOm.$P(n,Array,t);var r=n;var u=null;var f=!1;OSF.DDA.OutlookAppOm.$A(r.length,0,OSF.DDA.OutlookAppOm.$2S,String.format("{0}.length",t));for(var e=0;e<r.length;e++)if($h.EmailAddressDetails.isInstanceOfType(r[e])){f=!0;break}f&&(u=[]);for(var i=0;i<r.length;i++)if(f){u[i]=$h.EmailAddressDetails.isInstanceOfType(r[i])?r[i].emailAddress:r[i];OSF.DDA.OutlookAppOm.$P(u[i],String,String.format("{0}[{1}]",t,i))}else OSF.DDA.OutlookAppOm.$P(r[i],String,String.format("{0}[{1}]",t,i));return u};OSF.DDA.OutlookAppOm.prototype={$6_0:null,$I_0:null,$1m_0:null,$1F_0:null,$V_0:null,$14_0:null,$S_0:null,get_clientEndPoint:function(){this.$S_0||(this.$S_0=OSF._OfficeAppFactory.getClientEndPoint());return this.$S_0},set_clientEndPoint:function(n){this.$S_0=n;return n},get_initialData:function(){return this.$6_0},get_$13_0:function(){return this.$V_0.get_appName()},initialize:function(n){var t="itemType";this.$6_0=new $h.InitialData(n);1===n[t]?this.$I_0=new $h.Message(this.$6_0):3===n[t]?this.$I_0=new $h.MeetingRequest(this.$6_0):2===n[t]?this.$I_0=new $h.Appointment(this.$6_0):4===n[t]?this.$I_0=new $h.MessageCompose(this.$6_0):5===n[t]&&(this.$I_0=new $h.AppointmentCompose(this.$6_0));this.$1m_0=new $h.UserProfile(this.$6_0);this.$1F_0=new $h.Diagnostics(this.$6_0,this.$V_0.get_appName());this.$4F_0();$h.InitialData.$1(this,"item",this.$$d_$3t_0);$h.InitialData.$1(this,"userProfile",this.$$d_$4C_0);$h.InitialData.$1(this,"diagnostics",this.$$d_$3i_0);$h.InitialData.$1(this,"ewsUrl",this.$$d_$3k_0);OSF.DDA.OutlookAppOm.$2.get_$13_0()===64&&this.$6_0.get_$4L_0()&&(window.open=this.$$d_windowOpenOverrideHandler)},windowOpenOverrideHandler:function(n,t,i,r){this.$E_0(0,"LaunchPalUrl",{launchUrl:n},null)},makeEwsRequestAsync:function(n){for(var r=[],i=1;i<arguments.length;++i)r[i-1]=arguments[i];if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(n.length>OSF.DDA.OutlookAppOm.$2Q)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_$1c_1()&&u.$3_0(t.$R_0)};t.send(n)},recordDataPoint:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.$E_0(0,"RecordDataPoint",n,null)},recordTrace:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.$E_0(0,"RecordTrace",n,null)},trackCtq:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.$E_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_$1i_0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this.$22_0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this.$1D_0(t);r.timezoneOffset=i;return r},convertToUtcClientTime:function(n){var t=this.$33_0(n);if(this.$6_0&&this.$6_0.get_$1i_0()){var i=this.$22_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;n<arguments.length;++n)i[n]=arguments[n];this.$5_0(1,"getUserIdentityTokenAsync");var t=$h.CommonParameters.parse(i,!0,!0);this.$2N_0(2,"GetUserIdentityToken",t.$3_0,t.$4_0)},getCallbackTokenAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];this.$5_0(1,"getCallbackTokenAsync");var t=$h.CommonParameters.parse(i,!0,!0);this.$2N_0(12,"GetCallbackToken",t.$3_0,t.$4_0)},displayMessageForm:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("itemId");this.$E_0(8,"DisplayExistingMessageForm",{itemId:n},null)},displayAppointmentForm:function(n){if($h.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("itemId");this.$E_0(9,"DisplayExistingAppointmentForm",{itemId:n},null)},createAsyncResult:function(n,t,i,r){var f={};var u=null;f[OSF.DDA.AsyncResultEnum.Properties.Value]=n;f[OSF.DDA.AsyncResultEnum.Properties.Context]=r;if(0!==t){u={};u[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=t;u[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i}return new OSF.DDA.AsyncResult(f,u)},standardCreateAsyncResult:function(n,t,i,r){var f={};var u=null;f[OSF.DDA.AsyncResultEnum.Properties.Value]=n;f[OSF.DDA.AsyncResultEnum.Properties.Context]=r;if(0!==t){u={};var e=$h.OutlookErrorManager.getErrorArgs(i);u[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=e.name;u[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=e.message;u[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=i}return new OSF.DDA.AsyncResult(f,u)},$5_0:function(n,t){if(this.$6_0.$C_0<n)throw Error.create(String.format(_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text,t));},$1z_0:function(n){this.$20_0(n,!1)},$1y_0:function(n){this.$20_0(n,!0)},$20_0:function(n,t){if(String.isInstanceOfType(n))this.$35_0(n,t);else if(Object.isInstanceOfType(n)&&Object.getTypeName(n)==="Object"){var i={};i=$.extend(!0,i,n);this.$36_0(i,t)}else throw Error.argumentType();},$35_0:function(n,t){$h.ScriptHelpers.isNullOrUndefined(n)||OSF.DDA.OutlookAppOm.$A(n.length,0,OSF.DDA.OutlookAppOm.maxBodyLength,"htmlBody");this.$E_0(t?11:10,t?"DisplayReplyAllForm":"DisplayReplyForm",{htmlBody:n},null)},$36_0:function(n,t){var u=OSF.DDA.OutlookAppOm.$3o(n);var r=OSF.DDA.OutlookAppOm.$2B(n);var i=$h.CommonParameters.parse(OSF.DDA.OutlookAppOm.$3y(n),!1);var f=this;this.$8_0(t?31:30,t?"DisplayReplyAllForm":"DisplayReplyForm",{htmlBody:u,attachments:OSF.DDA.OutlookAppOm.$2q(r)},function(n){return n},i.$4_0,i.$3_0)},$8_0:function(n,t,i,r,u,f){var e=this;this.$E_0(n,t,i,function(n,t){if(f){var o=null;if(Object.isInstanceOfType(t)){var i=t;if("error"in i||"data"in i||"errorCode"in i)if(i.error){var s=i.errorCode;o=e.standardCreateAsyncResult(null,1,s,u)}else{var h=r?r(i.data):i.data;o=e.standardCreateAsyncResult(h,0,0,u)}}!o&&n&&(o=e.standardCreateAsyncResult(null,1,9002,u));f(o)}})},$E_0:function(n,t,i,r){if(64===this.$V_0.get_appName())this.get_clientEndPoint().invoke(t,r,i);else if(n){var u=OSF.DDA.OutlookAppOm.$2n(n,i);var f=this;window.external.execute(n,u,function(n,t){if(r){var f=n.toArray();var u=JSON.parse(f[0]);if(Object.isInstanceOfType(u)){var i=u;if(f.length>1&&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)},$33_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},$1D_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},$34_0:function(n){var u=OSF.DDA.OutlookAppOm.$2f(n.requiredAttendees,"requiredAttendees");var r=OSF.DDA.OutlookAppOm.$2f(n.optionalAttendees,"optionalAttendees");OSF.DDA.OutlookAppOm.$1n(n.location,0,OSF.DDA.OutlookAppOm.$2R,"location");OSF.DDA.OutlookAppOm.$1n(n.body,0,OSF.DDA.OutlookAppOm.maxBodyLength,"body");OSF.DDA.OutlookAppOm.$1n(n.subject,0,OSF.DDA.OutlookAppOm.$2T,"subject");if(!$h.ScriptHelpers.isNullOrUndefined(n.start)){OSF.DDA.OutlookAppOm.$P(n.start,Date,"start");var o=n.start;n.start=o.getTime();if(!$h.ScriptHelpers.isNullOrUndefined(n.end)){OSF.DDA.OutlookAppOm.$P(n.end,Date,"end");var i=n.end;if(i<o)throw Error.argumentOutOfRange("end",i,_u.ExtensibilityStrings.l_InvalidEventDates_Text);n.end=i.getTime()}}var t=null;if(u||r){t={};var s=n;for(var f in s){var e={key:f,value:s[f]};t[e.key]=e.value}u&&(t.requiredAttendees=u);r&&(t.optionalAttendees=r)}this.$E_0(7,"DisplayNewAppointmentForm",t||n,null)},$4F_0:function(){var n=this;$h.Item.isInstanceOfType(this.$I_0)&&(n.displayNewAppointmentForm=this.$$d_$34_0)},$3q_0:function(n,t){if(!n){this.initialize(t);this.displayName="mailbox";window.setTimeout(this.$$d_$2i_0,0)}},$2i_0:function(){this.$14_0()},$2N_0:function(n,t,i,r){if($h.ScriptHelpers.isNullOrUndefined(i))throw Error.argumentNull("callback");var u=this;this.$E_0(n,t,null,function(n,t){var f;if(n)f=u.createAsyncResult(null,1,String.format(_u.ExtensibilityStrings.l_InternalProtocolError_Text,n),r);else{var e=t;f=e.wasSuccessful?u.createAsyncResult(e.token,0,null,r):u.createAsyncResult(null,1,e.errorMessage,r)}i(f)})},$3t_0:function(){return this.$I_0},$4C_0:function(){OSF.DDA.OutlookAppOm.$N(this.$6_0.$C_0);return this.$1m_0},$3i_0:function(){return this.$1F_0},$3k_0:function(){OSF.DDA.OutlookAppOm.$N(this.$6_0.$C_0);return this.$6_0.get_$38_0()},$22_0:function(n){for(var r=this.$6_0.get_$1i_0(),i=0;i<r.length;i++){var t=r[i];var f=parseInt(t.start);var u=parseInt(t.end);if(n.getTime()-f>=0&&n.getTime()-u<0)return parseInt(t.offset)}throw Error.format(_u.ExtensibilityStrings.l_InvalidDate_Text);},$1p_0:function(){var n=!1;try{n=!$h.ScriptHelpers.isNullOrUndefined(_u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},$4J_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&&f<i.length){s=i.replace(y?"office_strings.debug.js":"office_strings.js","outlook_strings.js");var r=i.substring(0,f);var u=r.lastIndexOf("/",r.length-2);u===-1&&(u=r.lastIndexOf("\\",r.length-2));u!==-1&&r.length>u+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.$1p_0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c.$1w_0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this.$1w_0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},$1w_0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};OSF.DDA.Settings=function(n){this.$r_0=n};OSF.DDA.Settings.$2m=function(n){if(!n)return{};if(OSF.DDA.OutlookAppOm.$2.get_$13_0()===8){var t=n.SettingsKey;if(t)return OSF.DDA.SettingsManager.deserializeSettings(t)}return n};OSF.DDA.Settings.prototype={$r_0:null,$u_0:null,get_$T_0:function(){if(!this.$u_0){this.$u_0=OSF.DDA.Settings.$2m(this.$r_0);this.$r_0=null}return this.$u_0},get:function(n){return this.get_$T_0()[n]},set:function(n,t){this.get_$T_0()[n]=t},remove:function(n){delete this.get_$T_0()[n]},saveAsync:function(){for(var i=[],t=0;t<arguments.length;++t)i[t]=arguments[t];var n=$h.CommonParameters.parse(i,!1);OSF.DDA.OutlookAppOm.$2.get_$13_0()===64?this.$4S_0(n.$3_0,n.$4_0):this.$4R_0(n.$3_0,n.$4_0)},$4R_0:function(n,t){var r=null;try{var f=OSF.DDA.SettingsManager.serializeSettings(this.get_$T_0());var e=JSON.stringify(f);var u={SettingsKey:e};OSF.DDA.RichClientSettingsManager.write(u)}catch(o){r=o}if(n){var i;i=r?OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,1,r.message,t):OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,0,null,t);n(i)}},$4S_0:function(n,t){var i=OSF.DDA.SettingsManager.serializeSettings(this.get_$T_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,String.format(_u.ExtensibilityStrings.l_InternalProtocolError_Text,i),t);else{var f=r;u=f.error?OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,1,f.errorMessage,t):OSF.DDA.OutlookAppOm.$2.createAsyncResult(null,0,null,t)}n(u)}},[i])}};Type.registerNamespace("$h");Type.registerNamespace("Office.cast");$h.Appointment=function(n){this.$$d_$3z_2=Function.createDelegate(this,this.$3z_2);this.$$d_$2H_2=Function.createDelegate(this,this.$2H_2);this.$$d_$m_2=Function.createDelegate(this,this.$m_2);this.$$d_$45_2=Function.createDelegate(this,this.$45_2);this.$$d_$1W_2=Function.createDelegate(this,this.$1W_2);this.$$d_$1T_2=Function.createDelegate(this,this.$1T_2);this.$$d_$l_2=Function.createDelegate(this,this.$l_2);this.$$d_$1R_2=Function.createDelegate(this,this.$1R_2);this.$$d_$1X_2=Function.createDelegate(this,this.$1X_2);$h.Appointment.initializeBase(this,[n]);$h.InitialData.$1(this,"start",this.$$d_$1X_2);$h.InitialData.$1(this,"end",this.$$d_$1R_2);$h.InitialData.$1(this,"location",this.$$d_$l_2);$h.InitialData.$1(this,"optionalAttendees",this.$$d_$1T_2);$h.InitialData.$1(this,"requiredAttendees",this.$$d_$1W_2);$h.InitialData.$1(this,"resources",this.$$d_$45_2);$h.InitialData.$1(this,"subject",this.$$d_$m_2);$h.InitialData.$1(this,"normalizedSubject",this.$$d_$2H_2);$h.InitialData.$1(this,"organizer",this.$$d_$3z_2)};$h.Appointment.prototype={getEntities:function(){return this.$0_0.$k_0()},getEntitiesByType:function(n){return this.$0_0.$2F_0(n)},getRegExMatches:function(){OSF.DDA.OutlookAppOm.$2.$5_0(1,"getRegExMatches");return this.$0_0.$1V_0()},getFilteredEntitiesByName:function(n){return this.$0_0.$1S_0(n)},getRegExMatchesByName:function(n){OSF.DDA.OutlookAppOm.$2.$5_0(1,"getRegExMatchesByName");return this.$0_0.$2K_0(n)},displayReplyForm:function(n){OSF.DDA.OutlookAppOm.$2.$1z_0(n)},displayReplyAllForm:function(n){OSF.DDA.OutlookAppOm.$2.$1y_0(n)},getItemType:function(){return Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},$1X_2:function(){return this.$0_0.get_$2Z_0()},$1R_2:function(){return this.$0_0.get_$21_0()},$l_2:function(){return this.$0_0.get_$2P_0()},$1T_2:function(){return this.$0_0.get_$16_0()},$1W_2:function(){return this.$0_0.get_$1j_0()},$45_2:function(){return this.$0_0.get_$4Q_0()},$m_2:function(){return this.$0_0.get_$2c_0()},$2H_2:function(){return this.$0_0.get_$2U_0()},$3z_2:function(){return this.$0_0.get_$4K_0()}};$h.AppointmentCompose=function(n){this.$$d_$l_2=Function.createDelegate(this,this.$l_2);this.$$d_$1R_2=Function.createDelegate(this,this.$1R_2);this.$$d_$1X_2=Function.createDelegate(this,this.$1X_2);this.$$d_$1T_2=Function.createDelegate(this,this.$1T_2);this.$$d_$1W_2=Function.createDelegate(this,this.$1W_2);$h.AppointmentCompose.initializeBase(this,[n]);$h.InitialData.$1(this,"requiredAttendees",this.$$d_$1W_2);$h.InitialData.$1(this,"optionalAttendees",this.$$d_$1T_2);$h.InitialData.$1(this,"start",this.$$d_$1X_2);$h.InitialData.$1(this,"end",this.$$d_$1R_2);$h.InitialData.$1(this,"location",this.$$d_$l_2)};$h.AppointmentCompose.prototype={$s_2:null,$q_2:null,$v_2:null,$i_2:null,$n_2:null,getItemType:function(){return Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},$1W_2:function(){this.$0_0.$7_0();this.$s_2||(this.$s_2=new $h.ComposeRecipient(0,"requiredAttendees"));return this.$s_2},$1T_2:function(){this.$0_0.$7_0();this.$q_2||(this.$q_2=new $h.ComposeRecipient(1,"optionalAttendees"));return this.$q_2},$1X_2:function(){this.$0_0.$7_0();this.$v_2||(this.$v_2=new $h.ComposeTime(1));return this.$v_2},$1R_2:function(){this.$0_0.$7_0();this.$i_2||(this.$i_2=new $h.ComposeTime(2));return this.$i_2},$l_2:function(){this.$0_0.$7_0();this.$n_2||(this.$n_2=new $h.ComposeLocation);return this.$n_2}};$h.AttachmentConstants=function(){};$h.AttachmentDetails=function(n){this.$$d_$3s_0=Function.createDelegate(this,this.$3s_0);this.$$d_$3Y_0=Function.createDelegate(this,this.$3Y_0);this.$$d_$47_0=Function.createDelegate(this,this.$47_0);this.$$d_$3f_0=Function.createDelegate(this,this.$3f_0);this.$$d_$3x_0=Function.createDelegate(this,this.$3x_0);this.$$d_$3p_0=Function.createDelegate(this,this.$3p_0);this.$0_0=n;$h.InitialData.$1(this,"id",this.$$d_$3p_0);$h.InitialData.$1(this,"name",this.$$d_$3x_0);$h.InitialData.$1(this,"contentType",this.$$d_$3f_0);$h.InitialData.$1(this,"size",this.$$d_$47_0);$h.InitialData.$1(this,"attachmentType",this.$$d_$3Y_0);$h.InitialData.$1(this,"isInline",this.$$d_$3s_0)};$h.AttachmentDetails.prototype={$0_0:null,$3p_0:function(){return this.$0_0.id},$3x_0:function(){return this.$0_0.name},$3f_0:function(){return this.$0_0.contentType},$47_0:function(){return this.$0_0.size},$3Y_0:function(){var n=this.$0_0.attachmentType;return n<$h.AttachmentDetails.$15.length?$h.AttachmentDetails.$15[n]:Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.File},$3s_0:function(){return this.$0_0.isInline}};$h.ComposeBody=function(){};$h.ComposeBody.$1B=function(n,t){var r={data:n};if(t.$O_0&&!$h.ScriptHelpers.isNull(t.$O_0.coercionType)){var i;var f,u;if(!(u=$h.ComposeBody.$2e(t.$O_0.coercionType,f={val:i}),i=f.val,u)){t.$3_0&&t.$3_0(OSF.DDA.OutlookAppOm.$2.standardCreateAsyncResult(null,1,1e3,t.$4_0));return null}r.coercionType=i}else r.coercionType=0;return r};$h.ComposeBody.$2e=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.ComposeBody.prototype={getTypeAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];OSF.DDA.OutlookAppOm.$2.$5_0(1,"body.getTypeAsync");var t=$h.CommonParameters.parse(i,!0);OSF.DDA.OutlookAppOm.$2.$8_0(14,"GetBodyTypeAsync",null,null,t.$4_0,t.$3_0)},setSelectedDataAsync:function(n){for(var u=[],t=1;t<arguments.length;++t)u[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,"body.setSelectedDataAsync");var i=$h.CommonParameters.parse(u,!1);if(!String.isInstanceOfType(n))throw Error.argumentType("data",Object.getType(n),String);OSF.DDA.OutlookAppOm.$A(n.length,0,1e6,"data");var r=$h.ComposeBody.$1B(n,i);r&&OSF.DDA.OutlookAppOm.$2.$8_0(13,"BodySetSelectedDataAsync",r,null,i.$4_0,i.$3_0)},prependAsync:function(n){for(var u=[],t=1;t<arguments.length;++t)u[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,"body.prependAsync");var i=$h.CommonParameters.parse(u,!1);if(!String.isInstanceOfType(n))throw Error.argumentType("data",Object.getType(n),String);OSF.DDA.OutlookAppOm.$A(n.length,0,1e6,"data");var r=$h.ComposeBody.$1B(n,i);r&&OSF.DDA.OutlookAppOm.$2.$8_0(23,"BodyPrependAsync",r,null,i.$4_0,i.$3_0)}};$h.ComposeItem=function(n){this.$$d_$3b_1=Function.createDelegate(this,this.$3b_1);this.$$d_$m_1=Function.createDelegate(this,this.$m_1);$h.ComposeItem.initializeBase(this,[n]);$h.InitialData.$1(this,"subject",this.$$d_$m_1);$h.InitialData.$1(this,"body",this.$$d_$3b_1)};$h.ComposeItem.prototype={$w_1:null,$d_1:null,addFileAttachmentAsync:function(n,t){for(var u=[],i=2;i<arguments.length;++i)u[i-2]=arguments[i];OSF.DDA.OutlookAppOm.$2.$5_0(2,"addFileAttachmentAsync");if(!$h.ScriptHelpers.isNonEmptyString(n))throw Error.argument("uri");if(!$h.ScriptHelpers.isNonEmptyString(t))throw Error.argument("attachmentName");OSF.DDA.OutlookAppOm.$A(n.length,0,2048,"uri");OSF.DDA.OutlookAppOm.$A(t.length,0,255,"attachmentName");var r=$h.CommonParameters.parse(u,!1);var f={uri:n,name:t,__timeout__:6e5};OSF.DDA.OutlookAppOm.$2.$8_0(16,"AddFileAttachmentAsync",f,null,r.$4_0,r.$3_0)},addItemAttachmentAsync:function(n,t){for(var u=[],i=2;i<arguments.length;++i)u[i-2]=arguments[i];OSF.DDA.OutlookAppOm.$2.$5_0(2,"addItemAttachmentAsync");if(!$h.ScriptHelpers.isNonEmptyString(n))throw Error.argument("itemId");if(!$h.ScriptHelpers.isNonEmptyString(t))throw Error.argument("attachmentName");OSF.DDA.OutlookAppOm.$A(n.length,0,200,"itemId");OSF.DDA.OutlookAppOm.$A(t.length,0,255,"attachmentName");var r=$h.CommonParameters.parse(u,!1);var f={itemId:n,name:t,__timeout__:6e5};OSF.DDA.OutlookAppOm.$2.$8_0(19,"AddItemAttachmentAsync",f,null,r.$4_0,r.$3_0)},removeAttachmentAsync:function(n){for(var r=[],t=1;t<arguments.length;++t)r[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,"removeAttachmentAsync");if(!$h.ScriptHelpers.isNonEmptyString(n))throw Error.argument("attachmentId");OSF.DDA.OutlookAppOm.$A(n.length,0,200,"attachmentId");var i=$h.CommonParameters.parse(r,!1);OSF.DDA.OutlookAppOm.$2.$8_0(20,"RemoveAttachmentAsync",{attachmentIndex:n},null,i.$4_0,i.$3_0)},getSelectedDataAsync:function(n){for(var f=[],t=1;t<arguments.length;++t)f[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(1,"getSelectedDataAsync");var e=$h.CommonParameters.parse(f,!0);var i;var u,r;if(n!==Microsoft.Office.WebExtension.CoercionType.Html&&n!==Microsoft.Office.WebExtension.CoercionType.Text||!(r=$h.ComposeBody.$2e(n,u={val:i}),i=u.val,r))throw Error.argument("coercionType");var o={coercionType:i};OSF.DDA.OutlookAppOm.$2.$8_0(28,"GetSelectedDataAsync",o,null,e.$4_0,e.$3_0)},setSelectedDataAsync:function(n){for(var u=[],t=1;t<arguments.length;++t)u[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,"setSelectedDataAsync");var i=$h.CommonParameters.parse(u,!1);if(!String.isInstanceOfType(n))throw Error.argumentType("data",Object.getType(n),String);OSF.DDA.OutlookAppOm.$A(n.length,0,1e6,"data");var r=$h.ComposeBody.$1B(n,i);r&&OSF.DDA.OutlookAppOm.$2.$8_0(29,"SetSelectedDataAsync",r,null,i.$4_0,i.$3_0)},$3b_1:function(){this.$0_0.$7_0();this.$d_1||(this.$d_1=new $h.ComposeBody);return this.$d_1},$m_1:function(){this.$0_0.$7_0();this.$w_1||(this.$w_1=new $h.ComposeSubject);return this.$w_1}};$h.ComposeRecipient=function(n,t){this.$10_0=n;this.$W_0=t};$h.ComposeRecipient.$1h=function(n,t){if(!n&&!t)throw Error.argument("recipients");if(n&&n.length>255)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.$3X=function(n){for(var r=n,i=[],t=0;t<r.length;t++){var u=new $h.EmailAddressDetails(r[t]);i[t]=u}return i};$h.ComposeRecipient.$1A=function(n,t){return{address:n,name:t}};$h.ComposeRecipient.prototype={$W_0:null,$10_0:0,getAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];var t=$h.CommonParameters.parse(i,!0);OSF.DDA.OutlookAppOm.$2.$5_0(1,this.$W_0+".getAsync");OSF.DDA.OutlookAppOm.$2.$8_0(15,"GetRecipientsAsync",{recipientField:this.$10_0},$h.ComposeRecipient.$3X,t.$4_0,t.$3_0)},setAsync:function(n){for(var i=[],t=1;t<arguments.length;++t)i[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,this.$W_0+".setAsync");this.setAddHelper(n,i,!0)},addAsync:function(n){for(var i=[],t=1;t<arguments.length;++t)i[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,this.$W_0+".addAsync");this.setAddHelper(n,i,!1)},setAddHelper:function(n,t,i){OSF.DDA.OutlookAppOm.$A(n.length,0,100,"recipients");var s=$h.CommonParameters.parse(t,!1);var f=[];if(Array.isInstanceOfType(n))for(var r=0;r<n.length;r++)if(String.isInstanceOfType(n[r])){$h.ComposeRecipient.$1h(n[r],n[r]);f[r]=$h.ComposeRecipient.$1A(n[r],n[r])}else if($h.EmailAddressDetails.isInstanceOfType(n[r])){var u=n[r];$h.ComposeRecipient.$1h(u.displayName,u.emailAddress);f[r]=$h.ComposeRecipient.$1A(u.emailAddress,u.displayName)}else if(Object.isInstanceOfType(n[r])){var h=n[r];var e=h.emailAddress;var o=h.displayName;$h.ComposeRecipient.$1h(o,e);f[r]=$h.ComposeRecipient.$1A(e,o)}else throw Error.argument("recipients");else throw Error.argument("recipients");var c=this;OSF.DDA.OutlookAppOm.$2.$8_0(i?21:22,i?"SetRecipientsAsync":"AddRecipientsAsync",{recipientField:this.$10_0,recipientArray:f},function(n){return n},s.$4_0,s.$3_0)}};$h.ComposeRecipient.RecipientField=function(){};$h.ComposeRecipient.RecipientField.prototype={to:0,cc:1,bcc:2,requiredAttendees:0,optionalAttendees:1};$h.ComposeRecipient.RecipientField.registerEnum("$h.ComposeRecipient.RecipientField",!1);$h.ComposeLocation=function(){};$h.ComposeLocation.prototype={getAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];OSF.DDA.OutlookAppOm.$2.$5_0(1,"location.getAsync");var t=$h.CommonParameters.parse(i,!0);OSF.DDA.OutlookAppOm.$2.$8_0(26,"GetLocationAsync",null,null,t.$4_0,t.$3_0)},setAsync:function(n){for(var r=[],t=1;t<arguments.length;++t)r[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,"location.setAsync");var i=$h.CommonParameters.parse(r,!1);OSF.DDA.OutlookAppOm.$A(n.length,0,255,"location");OSF.DDA.OutlookAppOm.$2.$8_0(27,"SetLocationAsync",{location:n},null,i.$4_0,i.$3_0)}};$h.ComposeSubject=function(){};$h.ComposeSubject.prototype={getAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];var t=$h.CommonParameters.parse(i,!0);OSF.DDA.OutlookAppOm.$2.$5_0(1,"subject.getAsync");OSF.DDA.OutlookAppOm.$2.$8_0(18,"GetSubjectAsync",null,null,t.$4_0,t.$3_0)},setAsync:function(n){for(var r=[],t=1;t<arguments.length;++t)r[t-1]=arguments[t];var i=$h.CommonParameters.parse(r,!1);OSF.DDA.OutlookAppOm.$2.$5_0(2,"subject.setAsync");if(!String.isInstanceOfType(n))throw Error.argument("data");OSF.DDA.OutlookAppOm.$A(n.length,0,255,"data");OSF.DDA.OutlookAppOm.$2.$8_0(17,"SetSubjectAsync",{subject:n},null,i.$4_0,i.$3_0)}};$h.ComposeTime=function(n){this.$$d_$4b_0=Function.createDelegate(this,this.$4b_0);this.$X_0=n};$h.ComposeTime.prototype={$X_0:0,getAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];OSF.DDA.OutlookAppOm.$2.$5_0(1,this.$2I_0()+".getAsync");var t=$h.CommonParameters.parse(i,!0);OSF.DDA.OutlookAppOm.$2.$8_0(24,"GetTimeAsync",{TimeProperty:this.$X_0},this.$$d_$4b_0,t.$4_0,t.$3_0)},setAsync:function(n){for(var r=[],t=1;t<arguments.length;++t)r[t-1]=arguments[t];OSF.DDA.OutlookAppOm.$2.$5_0(2,this.$2I_0()+".setAsync");if(!Date.isInstanceOfType(n))throw Error.argumentType("dateTime",Object.getType(n),Date);if(isNaN(n.getTime()))throw Error.argument("dateTime");if(n.getTime()<-864e13||n.getTime()>864e13)throw Error.argumentOutOfRange("dateTime");var i=$h.CommonParameters.parse(r,!1);OSF.DDA.OutlookAppOm.$2.$8_0(25,"SetTimeAsync",{TimeProperty:this.$X_0,time:n.getTime()},null,i.$4_0,i.$3_0)},$4b_0:function(n){var t=n;return new Date(t)},$2I_0:function(){return this.$X_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_$3e_0=Function.createDelegate(this,this.$3e_0);this.$$d_$1N_0=Function.createDelegate(this,this.$1N_0);this.$$d_$1Y_0=Function.createDelegate(this,this.$1Y_0);this.$$d_$1Q_0=Function.createDelegate(this,this.$1Q_0);this.$$d_$1U_0=Function.createDelegate(this,this.$1U_0);this.$$d_$3c_0=Function.createDelegate(this,this.$3c_0);this.$$d_$42_0=Function.createDelegate(this,this.$42_0);this.$0_0=n;$h.InitialData.$1(this,"personName",this.$$d_$42_0);$h.InitialData.$1(this,"businessName",this.$$d_$3c_0);$h.InitialData.$1(this,"phoneNumbers",this.$$d_$1U_0);$h.InitialData.$1(this,"emailAddresses",this.$$d_$1Q_0);$h.InitialData.$1(this,"urls",this.$$d_$1Y_0);$h.InitialData.$1(this,"addresses",this.$$d_$1N_0);$h.InitialData.$1(this,"contactString",this.$$d_$3e_0)};$h.Contact.prototype={$0_0:null,$J_0:null,$42_0:function(){return this.$0_0.PersonName},$3c_0:function(){return this.$0_0.BusinessName},$1N_0:function(){return $h.Entities.$H(this.$0_0,"Addresses")},$1Q_0:function(){return $h.Entities.$H(this.$0_0,"EmailAddresses")},$1Y_0:function(){return $h.Entities.$H(this.$0_0,"Urls")},$1U_0:function(){if(!this.$J_0){var n=this;this.$J_0=$h.Entities.$F($h.PhoneNumber,this.$0_0,"PhoneNumbers",function(n){return new $h.PhoneNumber(n)})}return this.$J_0},$3e_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;n<arguments.length;++n)i[n]=arguments[n];var u=2500;if(JSON.stringify(this.$0_0).length>u)throw Error.argument();var t=$h.CommonParameters.parse(i,!1,!0);var r=new $h.SaveDictionaryRequest(t.$3_0,t.$4_0);r.$1f_0(4,"SaveCustomProperties",{customProperties:this.$0_0})}};$h.Diagnostics=function(n,t){this.$$d_$41_0=Function.createDelegate(this,this.$41_0);this.$$d_$3n_0=Function.createDelegate(this,this.$3n_0);this.$$d_$3m_0=Function.createDelegate(this,this.$3m_0);this.$0_0=n;this.$Q_0=t;$h.InitialData.$1(this,"hostName",this.$$d_$3m_0);$h.InitialData.$1(this,"hostVersion",this.$$d_$3n_0);64===this.$Q_0&&$h.InitialData.$1(this,"OWAView",this.$$d_$41_0)};$h.Diagnostics.prototype={$0_0:null,$Q_0:0,$3m_0:function(){if(8===this.$Q_0)return"Outlook";else if(64===this.$Q_0)return"OutlookWebApp";return null},$3n_0:function(){return this.$0_0.get_$4D_0()},$41_0:function(){return this.$0_0.get_$4M_0()}};$h.EmailAddressDetails=function(n){this.$$d_$2J_0=Function.createDelegate(this,this.$2J_0);this.$$d_$2A_0=Function.createDelegate(this,this.$2A_0);this.$$d_$1O_0=Function.createDelegate(this,this.$1O_0);this.$$d_$1P_0=Function.createDelegate(this,this.$1P_0);this.$0_0=n;$h.InitialData.$1(this,"emailAddress",this.$$d_$1P_0);$h.InitialData.$1(this,"displayName",this.$$d_$1O_0);$h.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&$h.InitialData.$1(this,"appointmentResponse",this.$$d_$2A_0);$h.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&$h.InitialData.$1(this,"recipientType",this.$$d_$2J_0)};$h.EmailAddressDetails.$1u=function(n){var t={};var r=n.Name;var i=n.UserId;t.name=r||$h.EmailAddressDetails.$1H;t.address=i||$h.EmailAddressDetails.$1H;return new $h.EmailAddressDetails(t)};$h.EmailAddressDetails.prototype={$0_0:null,toJSON:function(){var n={};n.emailAddress=this.$1P_0();n.displayName=this.$1O_0();$h.ScriptHelpers.dictionaryContainsKey(this.$0_0,"appointmentResponse")&&(n.appointmentResponse=this.$2A_0());$h.ScriptHelpers.dictionaryContainsKey(this.$0_0,"recipientType")&&(n.recipientType=this.$2J_0());return n},$1P_0:function(){return this.$0_0.address},$1O_0:function(){return this.$0_0.name},$2A_0:function(){var n=this.$0_0.appointmentResponse;return n<$h.EmailAddressDetails.$1e.length?$h.EmailAddressDetails.$1e[n]:Microsoft.Office.WebExtension.MailboxEnums.ResponseType.None},$2J_0:function(){var n=this.$0_0.recipientType;return n<$h.EmailAddressDetails.$1b.length?$h.EmailAddressDetails.$1b[n]:Microsoft.Office.WebExtension.MailboxEnums.RecipientType.Other}};$h.Entities=function(n,t,i,r){this.$$d_$2u_0=Function.createDelegate(this,this.$2u_0);this.$$d_$2D_0=Function.createDelegate(this,this.$2D_0);this.$$d_$1U_0=Function.createDelegate(this,this.$1U_0);this.$$d_$1Y_0=Function.createDelegate(this,this.$1Y_0);this.$$d_$1Q_0=Function.createDelegate(this,this.$1Q_0);this.$$d_$2G_0=Function.createDelegate(this,this.$2G_0);this.$$d_$2L_0=Function.createDelegate(this,this.$2L_0);this.$$d_$1N_0=Function.createDelegate(this,this.$1N_0);this.$0_0=n||{};this.$1I_0=t||{};this.$L_0=i;$h.InitialData.$1(this,"addresses",this.$$d_$1N_0);$h.InitialData.$1(this,"taskSuggestions",this.$$d_$2L_0);$h.InitialData.$1(this,"meetingSuggestions",this.$$d_$2G_0);$h.InitialData.$1(this,"emailAddresses",this.$$d_$1Q_0);$h.InitialData.$1(this,"urls",this.$$d_$1Y_0);$h.InitialData.$1(this,"phoneNumbers",this.$$d_$1U_0);$h.InitialData.$1(this,"contacts",this.$$d_$2D_0);this.$C_0=r};$h.Entities.$F=function(n,t,i,r,u,f){var s=null;var e=t[i];if(!e)return new Array(0);u&&(e=$h.Entities.$2V(Object,e,$h.Entities.$37,f));s=new Array(e.length);for(var l=0,h=e,a=h.length,o=0;o<a;++o){var c=h[o];s[l++]=r(c)}return s};$h.Entities.$H=function(n,t,i){var r=n[t];if(!r)return new Array(0);i&&(r=$h.Entities.$2V(String,r,$h.Entities.$4V,null));return r};$h.Entities.$1s=function(n){return new $h.Contact(n)};$h.Entities.$1x=function(n){return new $h.TaskSuggestion(n)};$h.Entities.$1v=function(n){return new $h.PhoneNumber(n)};$h.Entities.$37=function(n,t,i){return n===t?!0:!n||!t?!1:n[i]===t[i]?!0:!1};$h.Entities.$4V=function(n,t,i){return n===t};$h.Entities.$2V=function(n,t,i,r){for(var u=t.length-1;u>=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={$L_0:null,$0_0:null,$1I_0:null,$D_0:null,$C_0:0,$x_0:null,$o_0:null,$J_0:null,$g_0:null,$Y_0:null,$h_0:null,$11_0:null,$3d_0:function(n){if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this.$2G_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this.$2L_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this.$1N_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this.$1U_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this.$1Q_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this.$1Y_0();else if(n===Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this.$2D_0();return null},$1S_0:function(n){this.$D_0||(this.$D_0={});if(!$h.ScriptHelpers.dictionaryContainsKey(this.$D_0,n)){for(var r=!1,i=0;i<$h.Entities.$12.length;i++){var u=$h.Entities.$12[i];var t=this.$1I_0[u];if(t&&$h.ScriptHelpers.dictionaryContainsKey(t,n)){switch(u){case"EmailAddresses":case"Urls":this.$D_0[n]=$h.Entities.$H(t,n);break;case"Addresses":this.$D_0[n]=$h.Entities.$H(t,n,!0);break;case"PhoneNumbers":this.$D_0[n]=$h.Entities.$F($h.PhoneNumber,t,n,$h.Entities.$1v,!1,null);break;case"TaskSuggestions":this.$D_0[n]=$h.Entities.$F($h.TaskSuggestion,t,n,$h.Entities.$1x,!0,"TaskString");break;case"MeetingSuggestions":this.$D_0[n]=$h.Entities.$F($h.MeetingSuggestion,t,n,this.$$d_$2u_0,!0,"MeetingString");break;case"Contacts":this.$D_0[n]=$h.Entities.$F($h.Contact,t,n,$h.Entities.$1s,!0,"ContactString");break}r=!0;break}}r||(this.$D_0[n]=null)}return this.$D_0[n]},$2u_0:function(n){return new $h.MeetingSuggestion(n,this.$L_0)},$1N_0:function(){this.$Y_0||(this.$Y_0=$h.Entities.$H(this.$0_0,"Addresses",!0));return this.$Y_0},$1Q_0:function(){OSF.DDA.OutlookAppOm.$N(this.$C_0);this.$h_0||(this.$h_0=$h.Entities.$H(this.$0_0,"EmailAddresses",!1));return this.$h_0},$1Y_0:function(){this.$11_0||(this.$11_0=$h.Entities.$H(this.$0_0,"Urls",!1));return this.$11_0},$1U_0:function(){this.$J_0||(this.$J_0=$h.Entities.$F($h.PhoneNumber,this.$0_0,"PhoneNumbers",$h.Entities.$1v));return this.$J_0},$2L_0:function(){OSF.DDA.OutlookAppOm.$N(this.$C_0);this.$x_0||(this.$x_0=$h.Entities.$F($h.TaskSuggestion,this.$0_0,"TaskSuggestions",$h.Entities.$1x,!0,"TaskString"));return this.$x_0},$2G_0:function(){OSF.DDA.OutlookAppOm.$N(this.$C_0);this.$o_0||(this.$o_0=$h.Entities.$F($h.MeetingSuggestion,this.$0_0,"MeetingSuggestions",this.$$d_$2u_0,!0,"MeetingString"));return this.$o_0},$2D_0:function(){OSF.DDA.OutlookAppOm.$N(this.$C_0);this.$g_0||(this.$g_0=$h.Entities.$F($h.Contact,this.$0_0,"Contacts",$h.Entities.$1s,!0,"ContactString"));return this.$g_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_$2B_1=Function.createDelegate(this,this.$2B_1);this.$$d_$3u_1=Function.createDelegate(this,this.$3u_1);this.$$d_$3v_1=Function.createDelegate(this,this.$3v_1);this.$$d_$3h_1=Function.createDelegate(this,this.$3h_1);this.$$d_$3g_1=Function.createDelegate(this,this.$3g_1);$h.Item.initializeBase(this,[n]);$h.InitialData.$1(this,"dateTimeCreated",this.$$d_$3g_1);$h.InitialData.$1(this,"dateTimeModified",this.$$d_$3h_1);$h.InitialData.$1(this,"itemId",this.$$d_$3v_1);$h.InitialData.$1(this,"itemClass",this.$$d_$3u_1);$h.InitialData.$1(this,"attachments",this.$$d_$2B_1)};$h.Item.prototype={$3v_1:function(){return this.$0_0.get_$4I_0()},$3u_1:function(){return this.$0_0.get_$4H_0()},$3g_1:function(){return this.$0_0.get_$2w_0()},$3h_1:function(){return this.$0_0.get_$2x_0()},$2B_1:function(){return this.$0_0.get_$2g_0()}};$h.ItemBase=function(n){this.$$d_$2r_0=Function.createDelegate(this,this.$2r_0);this.$$d_getItemType=Function.createDelegate(this,this.getItemType);this.$0_0=n;$h.InitialData.$1(this,"itemType",this.$$d_getItemType)};$h.ItemBase.prototype={$0_0:null,get_data:function(){return this.$0_0},loadCustomPropertiesAsync:function(){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];var t=$h.CommonParameters.parse(i,!0,!0);var r=new $h.LoadDictionaryRequest(this.$$d_$2r_0,"customProperties",t.$3_0,t.$4_0);r.$1f_0(3,"LoadCustomProperties",{})},$2r_0:function(n){return new $h.CustomProperties(n)}};$h.MeetingRequest=function(n){this.$$d_$1W_3=Function.createDelegate(this,this.$1W_3);this.$$d_$1T_3=Function.createDelegate(this,this.$1T_3);this.$$d_$l_3=Function.createDelegate(this,this.$l_3);this.$$d_$1R_3=Function.createDelegate(this,this.$1R_3);this.$$d_$1X_3=Function.createDelegate(this,this.$1X_3);$h.MeetingRequest.initializeBase(this,[n]);$h.InitialData.$1(this,"start",this.$$d_$1X_3);$h.InitialData.$1(this,"end",this.$$d_$1R_3);$h.InitialData.$1(this,"location",this.$$d_$l_3);$h.InitialData.$1(this,"optionalAttendees",this.$$d_$1T_3);$h.InitialData.$1(this,"requiredAttendees",this.$$d_$1W_3)};$h.MeetingRequest.prototype={$1X_3:function(){return this.$0_0.get_$2Z_0()},$1R_3:function(){return this.$0_0.get_$21_0()},$l_3:function(){return this.$0_0.get_$2P_0()},$1T_3:function(){return this.$0_0.get_$16_0()},$1W_3:function(){return this.$0_0.get_$1j_0()}};$h.MeetingSuggestion=function(n,t){this.$$d_$3j_0=Function.createDelegate(this,this.$3j_0);this.$$d_$48_0=Function.createDelegate(this,this.$48_0);this.$$d_$m_0=Function.createDelegate(this,this.$m_0);this.$$d_$l_0=Function.createDelegate(this,this.$l_0);this.$$d_$3Z_0=Function.createDelegate(this,this.$3Z_0);this.$$d_$3w_0=Function.createDelegate(this,this.$3w_0);this.$0_0=n;this.$L_0=t;$h.InitialData.$1(this,"meetingString",this.$$d_$3w_0);$h.InitialData.$1(this,"attendees",this.$$d_$3Z_0);$h.InitialData.$1(this,"location",this.$$d_$l_0);$h.InitialData.$1(this,"subject",this.$$d_$m_0);$h.InitialData.$1(this,"start",this.$$d_$48_0);$h.InitialData.$1(this,"end",this.$$d_$3j_0)};$h.MeetingSuggestion.prototype={$L_0:null,$0_0:null,$b_0:null,$3w_0:function(){return this.$0_0.MeetingString},$l_0:function(){return this.$0_0.Location},$m_0:function(){return this.$0_0.Subject},$48_0:function(){var n=this.$1t_0("StartTime");var t=$h.MeetingSuggestionTimeDecoder.resolve(n,this.$L_0);return t.getTime()!==n.getTime()?OSF.DDA.OutlookAppOm.$2.convertToUtcClientTime(OSF.DDA.OutlookAppOm.$2.$1D_0(t)):n},$3j_0:function(){var n=this.$1t_0("EndTime");var t=$h.MeetingSuggestionTimeDecoder.resolve(n,this.$L_0);return t.getTime()!==n.getTime()?OSF.DDA.OutlookAppOm.$2.convertToUtcClientTime(OSF.DDA.OutlookAppOm.$2.$1D_0(t)):n},$1t_0:function(n){var t=this.$0_0[n];return t?new Date(t):null},$3Z_0:function(){if(!this.$b_0){var n=this;this.$b_0=$h.Entities.$F($h.EmailAddressDetails,this.$0_0,"Attendees",function(n){return $h.EmailAddressDetails.$1u(n)})}return this.$b_0}};$h.MeetingSuggestionTimeDecoder=function(){};$h.MeetingSuggestionTimeDecoder.resolve=function(n,t){if(!t)return n;try{var f;var i;var r;var u=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0);var s,o,e;if(e=$h.MeetingSuggestionTimeDecoder.$30(n,s={val:r},o={val:f}),r=s.val,f=o.val,e){i=$h.PreciseDate.isInstanceOfType(r)?$h.MeetingSuggestionTimeDecoder.$4O(u,r):$h.RelativeDate.isInstanceOfType(r)?$h.MeetingSuggestionTimeDecoder.$4P(u,r):u;if(isNaN(i.getTime()))return t;i.setMilliseconds(i.getMilliseconds()+f);return i}else return n}catch(h){return t}};$h.MeetingSuggestionTimeDecoder.$2O=function(n){return null===n||n===undefined};$h.MeetingSuggestionTimeDecoder.$4O=function(n,t){var r=t.$1o_1;var f=t.$p_1?t.$p_1-1:n.getMonth();var u=t.$1E_1;if(!u)return n;var i;if($h.MeetingSuggestionTimeDecoder.$2O(r)){i=new Date(n.getFullYear(),f,u);i.getTime()<n.getTime()&&(i=new Date(n.getFullYear()+1,f,u))}else i=new Date(r<50?2e3+r:1900+r,f,u);return i.getMonth()!==f?n:i};$h.MeetingSuggestionTimeDecoder.$4P=function(n,t){var i;switch(t.$1k_1){case 0:i=new Date(n.getFullYear(),n.getMonth(),n.getDate());i.setDate(i.getDate()+t.$B_1);return i;case 5:return $h.MeetingSuggestionTimeDecoder.$39(n,t.$B_1,t.$K_1);case 2:var r=1;switch(t.$M_1){case 1:break;case 2:r=16;break;default:t.$B_1||(r=n.getDate());break}i=new Date(n.getFullYear(),n.getMonth(),r);i.setMonth(i.getMonth()+t.$B_1);i.getTime()<n.getTime()&&i.setDate(i.getDate()+n.getDate()-1);return i;case 1:i=new Date(n.getFullYear(),n.getMonth(),n.getDate());i.setDate(n.getDate()+7*t.$B_1);if(t.$M_1!==1&&t.$M_1){if(t.$M_1===2){i.setDate(i.getDate()+5-i.getDay());return i}}else{i.setDate(i.getDate()+1-i.getDay());return i.getTime()<n.getTime()?n:i}break;case 4:return $h.MeetingSuggestionTimeDecoder.$3A(n,t);case 3:if(t.$B_1>0)return new Date(n.getFullYear()+t.$B_1,0,1);break;default:break}return n};$h.MeetingSuggestionTimeDecoder.$39=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.$3A=function(n,t){var f;var i;var r;f=n;if(t.$K_1<=0||t.$K_1>12||t.$B_1<=0||t.$B_1>5)return n;var e=(12+t.$K_1-f.getMonth()-1)%12;i=new Date(f.getFullYear(),f.getMonth()+e,1);if(t.$M_1===1)if(t.$B_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.$B_1-1));return r.getMonth()+1!==t.$K_1?n:r}else{r=new Date(i.getFullYear(),i.getMonth(),$h.MeetingSuggestionTimeDecoder.$2z(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.$B_1));return r.getMonth()+1!==t.$K_1?i.getDay()!==6&&i.getDay()?i:n:r}};$h.MeetingSuggestionTimeDecoder.$30=function(n,t,i){var f=32767;t.val=null;i.val=0;if(!n)return!1;i.val=$h.MeetingSuggestionTimeDecoder.$4A(n);var e=n.getTime()-i.val;var r=(e-$h.MeetingSuggestionTimeDecoder.$1q.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.$31(r,t);case 1:return $h.MeetingSuggestionTimeDecoder.$32(r,t);default:return!1}}};$h.MeetingSuggestionTimeDecoder.$31=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.$32=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.$3C(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}catc