Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

outlook-15.03.debug.js 190KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749
  1. /* Outlook specific API library */
  2. /* Version: 15.0.4812.3000 */
  3. /*
  4. Copyright (c) Microsoft Corporation. All rights reserved.
  5. */
  6. /*
  7. Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
  8. */
  9. Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");
  10. Microsoft.Office.WebExtension.MailboxEnums.EntityType={
  11. MeetingSuggestion: "meetingSuggestion",
  12. TaskSuggestion: "taskSuggestion",
  13. Address: "address",
  14. EmailAddress: "emailAddress",
  15. Url: "url",
  16. PhoneNumber: "phoneNumber",
  17. Contact: "contact",
  18. FlightReservations: "flightReservations",
  19. ParcelDeliveries: "parcelDeliveries"
  20. };
  21. Microsoft.Office.WebExtension.MailboxEnums.ItemType={
  22. Message: "message",
  23. Appointment: "appointment"
  24. };
  25. Microsoft.Office.WebExtension.MailboxEnums.ResponseType={
  26. None: "none",
  27. Organizer: "organizer",
  28. Tentative: "tentative",
  29. Accepted: "accepted",
  30. Declined: "declined"
  31. };
  32. Microsoft.Office.WebExtension.MailboxEnums.RecipientType={
  33. Other: "other",
  34. DistributionList: "distributionList",
  35. User: "user",
  36. ExternalUser: "externalUser"
  37. };
  38. Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={
  39. File: "file",
  40. Item: "item",
  41. Cloud: "cloud"
  42. };
  43. Microsoft.Office.WebExtension.MailboxEnums.BodyType={
  44. Text: "text",
  45. Html: "html"
  46. };
  47. Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={
  48. ProgressIndicator: "progressIndicator",
  49. InformationalMessage: "informationalMessage",
  50. ErrorMessage: "errorMessage"
  51. };
  52. Microsoft.Office.WebExtension.CoercionType={
  53. Text: "text",
  54. Html: "html"
  55. };
  56. Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={
  57. Office365: "office365",
  58. OutlookCom: "outlookCom",
  59. Enterprise: "enterprise"
  60. };
  61. Microsoft.Office.WebExtension.MailboxEnums.RestVersion={
  62. v1_0: "v1.0",
  63. v2_0: "v2.0",
  64. Beta: "beta"
  65. };
  66. Type.registerNamespace("OSF.DDA");
  67. var OSF=window.OSF || {};
  68. OSF.DDA=OSF.DDA || {};
  69. window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback)
  70. {
  71. this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);
  72. this.$$d_displayContactCardAsync=Function.createDelegate(this,this.displayContactCardAsync);
  73. this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);
  74. this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);
  75. this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);
  76. this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);
  77. this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);
  78. this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);
  79. this.$$d__getItem$p$0=Function.createDelegate(this,this._getItem$p$0);
  80. this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);
  81. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this;
  82. this._officeAppContext$p$0=officeAppContext;
  83. this._appReadyCallback$p$0=appReadyCallback;
  84. var $$t_4=this;
  85. var stringLoadedCallback=function()
  86. {
  87. if(appReadyCallback)
  88. $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0)
  89. };
  90. if(this._areStringsLoaded$p$0())
  91. stringLoadedCallback();
  92. else
  93. this._loadLocalizedScript$p$0(stringLoadedCallback)
  94. };
  95. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel)
  96. {
  97. if(!currentPermissionLevel)
  98. throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]);
  99. };
  100. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName)
  101. {
  102. if(value < minValue || value > maxValue)
  103. throw Error.argumentOutOfRange(argumentName);
  104. };
  105. window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data)
  106. {
  107. var htmlBody="";
  108. if("htmlBody" in data)
  109. {
  110. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]);
  111. htmlBody=data["htmlBody"]
  112. }
  113. return htmlBody
  114. };
  115. window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data)
  116. {
  117. var attachments=[];
  118. if("attachments" in data)
  119. {
  120. attachments=data["attachments"];
  121. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments)
  122. }
  123. return attachments
  124. };
  125. window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data)
  126. {
  127. var args=[];
  128. if("options" in data)
  129. args[0]=data["options"];
  130. if("callback" in data)
  131. args[args.length]=data["callback"];
  132. return args
  133. };
  134. window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments)
  135. {
  136. var attachmentsData=new Array(0);
  137. if(Array.isInstanceOfType(attachments))
  138. for(var i=0; i < attachments["length"]; i++)
  139. if(Object.isInstanceOfType(attachments[i]))
  140. {
  141. var attachment=attachments[i];
  142. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment);
  143. attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment)
  144. }
  145. else
  146. throw Error.argument("attachments");
  147. return attachmentsData
  148. };
  149. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody)
  150. {
  151. if(!String.isInstanceOfType(htmlBody))
  152. throw Error.argument("htmlBody");
  153. if($h.ScriptHelpers.isNullOrUndefined(htmlBody))
  154. throw Error.argument("htmlBody");
  155. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody["length"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody")
  156. };
  157. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments)
  158. {
  159. if(!Array.isInstanceOfType(attachments))
  160. throw Error.argument("attachments");
  161. };
  162. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment)
  163. {
  164. if(!Object.isInstanceOfType(attachment))
  165. throw Error.argument("attachments");
  166. if(!("type" in attachment) || !("name" in attachment))
  167. throw Error.argument("attachments");
  168. if(!("url" in attachment || "itemId" in attachment))
  169. throw Error.argument("attachments");
  170. };
  171. window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment)
  172. {
  173. var attachmentData=null;
  174. if(attachment["type"]==="file")
  175. {
  176. var url=attachment["url"];
  177. var name=attachment["name"];
  178. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name);
  179. attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name)
  180. }
  181. else if(attachment["type"]==="item")
  182. {
  183. var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]);
  184. var name=attachment["name"];
  185. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name);
  186. attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name)
  187. }
  188. else
  189. throw Error.argument("attachments");
  190. return attachmentData
  191. };
  192. window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name)
  193. {
  194. return["file",name,url]
  195. };
  196. window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name)
  197. {
  198. return["item",name,itemId]
  199. };
  200. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name)
  201. {
  202. if(!String.isInstanceOfType(url) || !String.isInstanceOfType(name))
  203. throw Error.argument("attachments");
  204. if(url["length"] > 2048)
  205. throw Error.argumentOutOfRange("attachments",url["length"],window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]);
  206. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name)
  207. };
  208. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name)
  209. {
  210. if(!String.isInstanceOfType(itemId) || !String.isInstanceOfType(name))
  211. throw Error.argument("attachments");
  212. if(itemId["length"] > 200)
  213. throw Error.argumentOutOfRange("attachments",itemId["length"],window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]);
  214. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name)
  215. };
  216. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name)
  217. {
  218. if(name["length"] > 255)
  219. throw Error.argumentOutOfRange("attachments",name["length"],window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]);
  220. };
  221. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion)
  222. {
  223. if(!restVersion)
  224. throw Error.argumentNull("restVersion");
  225. if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"])
  226. throw Error.argument("restVersion");
  227. };
  228. window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId)
  229. {
  230. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0())
  231. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]);
  232. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"])
  233. };
  234. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName)
  235. {
  236. if(Object["getType"](value) !==expectedType)
  237. throw Error.argumentType(argumentName);
  238. };
  239. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name)
  240. {
  241. if($h.ScriptHelpers.isNullOrUndefined(value))
  242. return;
  243. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name);
  244. var stringValue=value;
  245. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue["length"],minLength,maxLength,name)
  246. };
  247. window["OSF"]["DDA"]["OutlookAppOm"]._convertToOutlookParameters$p=function(dispid, data)
  248. {
  249. var executeParameters=null;
  250. switch(dispid)
  251. {
  252. case 1:
  253. case 2:
  254. case 12:
  255. case 3:
  256. case 14:
  257. case 18:
  258. case 26:
  259. case 32:
  260. case 41:
  261. case 34:
  262. break;
  263. case 4:
  264. var jsonProperty=window["JSON"]["stringify"](data["customProperties"]);
  265. executeParameters=[jsonProperty];
  266. break;
  267. case 5:
  268. executeParameters=[data["body"]];
  269. break;
  270. case 8:
  271. case 9:
  272. executeParameters=[data["itemId"]];
  273. break;
  274. case 7:
  275. executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]];
  276. break;
  277. case 44:
  278. executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]];
  279. break;
  280. case 43:
  281. executeParameters=[data["ewsIdOrEmail"]];
  282. break;
  283. case 40:
  284. executeParameters=[data["extensionId"],data["consentState"]];
  285. break;
  286. case 11:
  287. case 10:
  288. executeParameters=[data["htmlBody"]];
  289. break;
  290. case 31:
  291. case 30:
  292. executeParameters=[data["htmlBody"],data["attachments"]];
  293. break;
  294. case 23:
  295. case 13:
  296. case 38:
  297. case 29:
  298. executeParameters=[data["data"],data["coercionType"]];
  299. break;
  300. case 37:
  301. case 28:
  302. executeParameters=[data["coercionType"]];
  303. break;
  304. case 17:
  305. executeParameters=[data["subject"]];
  306. break;
  307. case 15:
  308. executeParameters=[data["recipientField"]];
  309. break;
  310. case 22:
  311. case 21:
  312. executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])];
  313. break;
  314. case 19:
  315. executeParameters=[data["itemId"],data["name"]];
  316. break;
  317. case 16:
  318. executeParameters=[data["uri"],data["name"]];
  319. break;
  320. case 20:
  321. executeParameters=[data["attachmentIndex"]];
  322. break;
  323. case 25:
  324. executeParameters=[data["TimeProperty"],data["time"]];
  325. break;
  326. case 24:
  327. executeParameters=[data["TimeProperty"]];
  328. break;
  329. case 27:
  330. executeParameters=[data["location"]];
  331. break;
  332. case 33:
  333. case 35:
  334. executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]];
  335. break;
  336. case 36:
  337. executeParameters=[data["key"]];
  338. break;
  339. default:
  340. Sys.Debug.fail("Unexpected method dispid");
  341. break
  342. }
  343. return executeParameters
  344. };
  345. window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array)
  346. {
  347. return array ? array["join"](";") : null
  348. };
  349. window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients)
  350. {
  351. if(!recipients)
  352. return null;
  353. var results=new Array(recipients.length);
  354. for(var i=0; i < recipients.length; i++)
  355. results[i]=[recipients[i]["address"],recipients[i]["name"]];
  356. return results
  357. };
  358. window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name)
  359. {
  360. if($h.ScriptHelpers.isNullOrUndefined(emailset))
  361. return null;
  362. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name);
  363. var originalAttendees=emailset;
  364. var updatedAttendees=null;
  365. var normalizationNeeded=false;
  366. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name));
  367. for(var i=0; i < originalAttendees["length"]; i++)
  368. if($h.EmailAddressDetails.isInstanceOfType(originalAttendees[i]))
  369. {
  370. normalizationNeeded=true;
  371. break
  372. }
  373. if(normalizationNeeded)
  374. updatedAttendees=[];
  375. for(var i=0; i < originalAttendees["length"]; i++)
  376. if(normalizationNeeded)
  377. {
  378. updatedAttendees[i]=$h.EmailAddressDetails.isInstanceOfType(originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i];
  379. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i))
  380. }
  381. else
  382. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i));
  383. return updatedAttendees
  384. };
  385. OSF.DDA.OutlookAppOm.prototype={
  386. _initialData$p$0: null,
  387. _item$p$0: null,
  388. _userProfile$p$0: null,
  389. _diagnostics$p$0: null,
  390. _officeAppContext$p$0: null,
  391. _appReadyCallback$p$0: null,
  392. _clientEndPoint$p$0: null,
  393. get_clientEndPoint: function()
  394. {
  395. if(!this._clientEndPoint$p$0)
  396. this._clientEndPoint$p$0=window["OSF"]["_OfficeAppFactory"]["getClientEndPoint"]();
  397. return this._clientEndPoint$p$0
  398. },
  399. set_clientEndPoint: function(value)
  400. {
  401. this._clientEndPoint$p$0=value;
  402. return value
  403. },
  404. get_initialData: function()
  405. {
  406. return this._initialData$p$0
  407. },
  408. get__appName$i$0: function()
  409. {
  410. return this._officeAppContext$p$0["get_appName"]()
  411. },
  412. initialize: function(initialData)
  413. {
  414. var ItemTypeKey="itemType";
  415. this._initialData$p$0=new $h.InitialData(initialData);
  416. if(1===initialData[ItemTypeKey])
  417. this._item$p$0=new $h.Message(this._initialData$p$0);
  418. else if(3===initialData[ItemTypeKey])
  419. this._item$p$0=new $h.MeetingRequest(this._initialData$p$0);
  420. else if(2===initialData[ItemTypeKey])
  421. this._item$p$0=new $h.Appointment(this._initialData$p$0);
  422. else if(4===initialData[ItemTypeKey])
  423. this._item$p$0=new $h.MessageCompose(this._initialData$p$0);
  424. else if(5===initialData[ItemTypeKey])
  425. this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0);
  426. else
  427. Sys.Debug.trace("Unexpected item type was received from the host.");
  428. this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0);
  429. this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]());
  430. this._initializeMethods$p$0();
  431. $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d__getItem$p$0);
  432. $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);
  433. $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);
  434. $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);
  435. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64)
  436. if(this._initialData$p$0.get__overrideWindowOpen$i$0())
  437. window.open=this.$$d_windowOpenOverrideHandler
  438. },
  439. windowOpenOverrideHandler: function(url, targetName, features, replace)
  440. {
  441. this.invokeHostMethod(403,{launchUrl: url},null)
  442. },
  443. makeEwsRequestAsync: function(data)
  444. {
  445. var args=[];
  446. for(var $$pai_5=1; $$pai_5 < arguments.length;++$$pai_5)
  447. args[$$pai_5 - 1]=arguments[$$pai_5];
  448. if($h.ScriptHelpers.isNullOrUndefined(data))
  449. throw Error.argumentNull("data");
  450. if(data["length"] > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p)
  451. throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]);
  452. this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");
  453. var parameters=$h.CommonParameters.parse(args,true,true);
  454. var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0);
  455. var $$t_4=this;
  456. ewsRequest.onreadystatechange=function()
  457. {
  458. if(4===ewsRequest.get__requestState$i$1())
  459. parameters._callback$p$0(ewsRequest._asyncResult$p$0)
  460. };
  461. ewsRequest.send(data)
  462. },
  463. recordDataPoint: function(data)
  464. {
  465. if($h.ScriptHelpers.isNullOrUndefined(data))
  466. throw Error.argumentNull("data");
  467. this.invokeHostMethod(402,data,null)
  468. },
  469. recordTrace: function(data)
  470. {
  471. if($h.ScriptHelpers.isNullOrUndefined(data))
  472. throw Error.argumentNull("data");
  473. this.invokeHostMethod(401,data,null)
  474. },
  475. trackCtq: function(data)
  476. {
  477. if($h.ScriptHelpers.isNullOrUndefined(data))
  478. throw Error.argumentNull("data");
  479. this.invokeHostMethod(400,data,null)
  480. },
  481. convertToLocalClientTime: function(timeValue)
  482. {
  483. var date=new Date(timeValue["getTime"]());
  484. var offset=date["getTimezoneOffset"]() * -1;
  485. if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0())
  486. {
  487. date["setUTCMinutes"](date["getUTCMinutes"]() - offset);
  488. offset=this._findOffset$p$0(date);
  489. date["setUTCMinutes"](date["getUTCMinutes"]()+offset)
  490. }
  491. var retValue=this._dateToDictionary$i$0(date);
  492. retValue["timezoneOffset"]=offset;
  493. return retValue
  494. },
  495. convertToUtcClientTime: function(input)
  496. {
  497. var retValue=this._dictionaryToDate$i$0(input);
  498. if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0())
  499. {
  500. var offset=this._findOffset$p$0(retValue);
  501. retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset);
  502. offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"];
  503. retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset)
  504. }
  505. return retValue
  506. },
  507. convertToRestId: function(itemId, restVersion)
  508. {
  509. if(!itemId)
  510. throw Error.argumentNull("itemId");
  511. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion);
  512. return itemId["replace"](new RegExp("[/]","g"),"-")["replace"](new RegExp("[+]","g"),"_")
  513. },
  514. convertToEwsId: function(itemId, restVersion)
  515. {
  516. if(!itemId)
  517. throw Error.argumentNull("itemId");
  518. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion);
  519. return itemId["replace"](new RegExp("[-]","g"),"/")["replace"](new RegExp("[_]","g"),"+")
  520. },
  521. getUserIdentityTokenAsync: function()
  522. {
  523. var args=[];
  524. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  525. args[$$pai_2]=arguments[$$pai_2];
  526. this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync");
  527. var parameters=$h.CommonParameters.parse(args,true,true);
  528. this._invokeGetTokenMethodAsync$p$0(2,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0)
  529. },
  530. getCallbackTokenAsync: function()
  531. {
  532. var args=[];
  533. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  534. args[$$pai_2]=arguments[$$pai_2];
  535. this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync");
  536. var parameters=$h.CommonParameters.parse(args,true,true);
  537. this._invokeGetTokenMethodAsync$p$0(12,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0)
  538. },
  539. displayMessageForm: function(itemId)
  540. {
  541. if($h.ScriptHelpers.isNullOrUndefined(itemId))
  542. throw Error.argumentNull("itemId");
  543. this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null)
  544. },
  545. displayAppointmentForm: function(itemId)
  546. {
  547. if($h.ScriptHelpers.isNullOrUndefined(itemId))
  548. throw Error.argumentNull("itemId");
  549. this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null)
  550. },
  551. RegisterConsentAsync: function(consentState)
  552. {
  553. if(consentState !==2 && consentState !==1 && consentState)
  554. throw Error.argumentOutOfRange("consentState");
  555. var parameters={};
  556. parameters["consentState"]=consentState["toString"]();
  557. parameters["extensionId"]=this["GetExtensionId"]();
  558. this.invokeHostMethod(40,parameters,null)
  559. },
  560. CloseApp: function()
  561. {
  562. this.invokeHostMethod(42,null,null)
  563. },
  564. GetIsRead: function()
  565. {
  566. return this._initialData$p$0.get__isRead$i$0()
  567. },
  568. GetEndNodeUrl: function()
  569. {
  570. return this._initialData$p$0.get__endNodeUrl$i$0()
  571. },
  572. GetConsentMetadata: function()
  573. {
  574. return this._initialData$p$0.get__consentMetadata$i$0()
  575. },
  576. GetEntryPointUrl: function()
  577. {
  578. return this._initialData$p$0.get__entryPointUrl$i$0()
  579. },
  580. GetMarketplaceContentMarket: function()
  581. {
  582. return this._initialData$p$0.get__marketplaceContentMarket$i$0()
  583. },
  584. GetMarketplaceAssetId: function()
  585. {
  586. return this._initialData$p$0.get__marketplaceAssetId$i$0()
  587. },
  588. GetExtensionId: function()
  589. {
  590. return this._initialData$p$0.get__extensionId$i$0()
  591. },
  592. createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage)
  593. {
  594. var initArgs={};
  595. var errorArgs=null;
  596. initArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["Properties"]["Value"]]=value;
  597. initArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["Properties"]["Context"]]=userContext;
  598. if(0 !==errorCode)
  599. {
  600. errorArgs={};
  601. var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode);
  602. errorArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["ErrorProperties"]["Name"]]=errorProperties["name"];
  603. errorArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["ErrorProperties"]["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage;
  604. errorArgs[window["OSF"]["DDA"]["AsyncResultEnum"]["ErrorProperties"]["Code"]]=detailedErrorCode
  605. }
  606. return new window["OSF"]["DDA"]["AsyncResult"](initArgs,errorArgs)
  607. },
  608. _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName)
  609. {
  610. if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel)
  611. throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName));
  612. },
  613. _displayReplyForm$i$0: function(obj)
  614. {
  615. this._displayReplyFormHelper$p$0(obj,false)
  616. },
  617. _displayReplyAllForm$i$0: function(obj)
  618. {
  619. this._displayReplyFormHelper$p$0(obj,true)
  620. },
  621. _displayReplyFormHelper$p$0: function(obj, isReplyAll)
  622. {
  623. if(String.isInstanceOfType(obj))
  624. this._doDisplayReplyForm$p$0(obj,isReplyAll);
  625. else if(Object.isInstanceOfType(obj) && Object.getTypeName(obj)==="Object")
  626. this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll);
  627. else
  628. throw Error.argumentType();
  629. },
  630. _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll)
  631. {
  632. if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody))
  633. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody["length"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody");
  634. this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null)
  635. },
  636. _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll)
  637. {
  638. var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data);
  639. var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data);
  640. var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false);
  641. var $$t_6=this;
  642. this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{
  643. htmlBody: htmlBody,
  644. attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments)
  645. },function(rawInput)
  646. {
  647. return rawInput
  648. },parameters._asyncContext$p$0,parameters._callback$p$0)
  649. },
  650. _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback)
  651. {
  652. var $$t_B=this;
  653. this.invokeHostMethod(dispid,data,function(resultCode, response)
  654. {
  655. if(callback)
  656. {
  657. var asyncResult=null;
  658. if(Object.isInstanceOfType(response))
  659. {
  660. var responseDictionary=response;
  661. if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary)
  662. if(!responseDictionary["error"])
  663. {
  664. var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"];
  665. asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null)
  666. }
  667. else
  668. {
  669. var errorCode=responseDictionary["errorCode"];
  670. asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null)
  671. }
  672. }
  673. if(!asyncResult && resultCode)
  674. asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null);
  675. callback(asyncResult)
  676. }
  677. })
  678. },
  679. invokeHostMethod: function(dispid, data, responseCallback)
  680. {
  681. if(64===this._officeAppContext$p$0["get_appName"]())
  682. {
  683. var args={ApiParams: data};
  684. args["MethodData"]={
  685. ControlId: window["OSF"]["_OfficeAppFactory"]["getId"](),
  686. DispatchId: dispid
  687. };
  688. if(dispid===1)
  689. this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args);
  690. else
  691. this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args)
  692. }
  693. else if(!this._isOwaOnlyMethod$p$0(dispid))
  694. {
  695. var executeParameters=window["OSF"]["DDA"]["OutlookAppOm"]._convertToOutlookParameters$p(dispid,data);
  696. var $$t_B=this;
  697. window["OSF"]["ClientHostController"]["execute"](dispid,executeParameters,function(nativeData, resultCode)
  698. {
  699. if(responseCallback)
  700. {
  701. var responseData=nativeData.toArray();
  702. var rawData=window["JSON"]["parse"](responseData[0]);
  703. if(Object.isInstanceOfType(rawData))
  704. {
  705. var deserializedData=rawData;
  706. if(responseData["length"] > 1 && responseData[1])
  707. {
  708. deserializedData["error"]=true;
  709. deserializedData["errorCode"]=responseData[1]
  710. }
  711. else
  712. deserializedData["error"]=false;
  713. responseCallback(resultCode,deserializedData)
  714. }
  715. else if(Number.isInstanceOfType(rawData))
  716. {
  717. var returnDict={};
  718. returnDict["error"]=true;
  719. returnDict["errorCode"]=rawData;
  720. responseCallback(resultCode,returnDict)
  721. }
  722. else
  723. throw Error.notImplemented("Return data type from host must be Dictionary or int");
  724. }
  725. })
  726. }
  727. else if(responseCallback)
  728. responseCallback(-2,null)
  729. },
  730. _dictionaryToDate$i$0: function(input)
  731. {
  732. var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]);
  733. if(window["isNaN"](retValue["getTime"]()))
  734. throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]);
  735. return retValue
  736. },
  737. _dateToDictionary$i$0: function(input)
  738. {
  739. var retValue={};
  740. retValue["month"]=input["getMonth"]();
  741. retValue["date"]=input["getDate"]();
  742. retValue["year"]=input["getFullYear"]();
  743. retValue["hours"]=input["getHours"]();
  744. retValue["minutes"]=input["getMinutes"]();
  745. retValue["seconds"]=input["getSeconds"]();
  746. retValue["milliseconds"]=input["getMilliseconds"]();
  747. return retValue
  748. },
  749. _isOwaOnlyMethod$p$0: function(dispId)
  750. {
  751. switch(dispId)
  752. {
  753. case 402:
  754. case 401:
  755. case 400:
  756. case 403:
  757. return true;
  758. default:
  759. return false
  760. }
  761. },
  762. _displayNewAppointmentFormApi$p$0: function(parameters)
  763. {
  764. var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees");
  765. var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees");
  766. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location");
  767. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body");
  768. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject");
  769. if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"]))
  770. {
  771. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start");
  772. var startDateTime=parameters["start"];
  773. parameters["start"]=startDateTime["getTime"]();
  774. if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"]))
  775. {
  776. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end");
  777. var endDateTime=parameters["end"];
  778. if(endDateTime < startDateTime)
  779. throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]);
  780. parameters["end"]=endDateTime["getTime"]()
  781. }
  782. }
  783. var updatedParameters=null;
  784. if(normalizedRequiredAttendees || normalizedOptionalAttendees)
  785. {
  786. updatedParameters={};
  787. var $$dict_7=parameters;
  788. for(var $$key_8 in $$dict_7)
  789. {
  790. var entry={
  791. key: $$key_8,
  792. value: $$dict_7[$$key_8]
  793. };
  794. updatedParameters[entry.key]=entry.value
  795. }
  796. if(normalizedRequiredAttendees)
  797. updatedParameters["requiredAttendees"]=normalizedRequiredAttendees;
  798. if(normalizedOptionalAttendees)
  799. updatedParameters["optionalAttendees"]=normalizedOptionalAttendees
  800. }
  801. this.invokeHostMethod(7,updatedParameters || parameters,null)
  802. },
  803. displayNewMessageFormApi: function(parameters)
  804. {
  805. var updatedParameters={};
  806. if(parameters)
  807. {
  808. var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients");
  809. var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients");
  810. var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients");
  811. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody");
  812. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject");
  813. var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters);
  814. var $$dict_7=parameters;
  815. for(var $$key_8 in $$dict_7)
  816. {
  817. var entry={
  818. key: $$key_8,
  819. value: $$dict_7[$$key_8]
  820. };
  821. updatedParameters[entry.key]=entry.value
  822. }
  823. if(normalizedToRecipients)
  824. updatedParameters["toRecipients"]=normalizedToRecipients;
  825. if(normalizedCcRecipients)
  826. updatedParameters["ccRecipients"]=normalizedCcRecipients;
  827. if(normalizedBccRecipients)
  828. updatedParameters["bccRecipients"]=normalizedBccRecipients;
  829. if(attachments)
  830. updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments)
  831. }
  832. this.invokeHostMethod(44,updatedParameters || parameters,null)
  833. },
  834. displayContactCardAsync: function(ewsIdOrEmail, callback)
  835. {
  836. if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail))
  837. throw Error.argumentNull("ewsIdOrEmail");
  838. var asyncContext=null;
  839. var asyncFunctionCallback=null;
  840. if(callback)
  841. {
  842. var commonParameters=$h.CommonParameters.parse([callback],false);
  843. asyncContext=commonParameters._asyncContext$p$0;
  844. asyncFunctionCallback=commonParameters._callback$p$0
  845. }
  846. this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,asyncContext,asyncFunctionCallback)
  847. },
  848. _initializeMethods$p$0: function()
  849. {
  850. var currentInstance=this;
  851. if($h.Item.isInstanceOfType(this._item$p$0))
  852. {
  853. currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0;
  854. currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi;
  855. currentInstance["displayContactCardAsync"]=this.$$d_displayContactCardAsync
  856. }
  857. },
  858. _getInitialDataResponseHandler$p$0: function(resultCode, data)
  859. {
  860. if(resultCode)
  861. return;
  862. this.initialize(data);
  863. this["displayName"]="mailbox";
  864. window.setTimeout(this.$$d__callAppReadyCallback$p$0,0)
  865. },
  866. _callAppReadyCallback$p$0: function()
  867. {
  868. this._appReadyCallback$p$0()
  869. },
  870. _invokeGetTokenMethodAsync$p$0: function(outlookDispid, methodName, callback, userContext)
  871. {
  872. if($h.ScriptHelpers.isNullOrUndefined(callback))
  873. throw Error.argumentNull("callback");
  874. var $$t_8=this;
  875. this.invokeHostMethod(outlookDispid,null,function(resultCode, response)
  876. {
  877. var asyncResult;
  878. if(resultCode)
  879. asyncResult=$$t_8.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  880. else
  881. {
  882. var responseDictionary=response;
  883. if(responseDictionary["wasSuccessful"])
  884. asyncResult=$$t_8.createAsyncResult(responseDictionary["token"],0,0,userContext,null);
  885. else
  886. asyncResult=$$t_8.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"])
  887. }
  888. callback(asyncResult)
  889. })
  890. },
  891. _getItem$p$0: function()
  892. {
  893. return this._item$p$0
  894. },
  895. _getUserProfile$p$0: function()
  896. {
  897. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  898. return this._userProfile$p$0
  899. },
  900. _getDiagnostics$p$0: function()
  901. {
  902. return this._diagnostics$p$0
  903. },
  904. _getEwsUrl$p$0: function()
  905. {
  906. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  907. return this._initialData$p$0.get__ewsUrl$i$0()
  908. },
  909. _findOffset$p$0: function(value)
  910. {
  911. var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0();
  912. for(var r=0; r < ranges["length"]; r++)
  913. {
  914. var range=ranges[r];
  915. var start=window["parseInt"](range["start"]);
  916. var end=window["parseInt"](range["end"]);
  917. if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0)
  918. return window["parseInt"](range["offset"])
  919. }
  920. throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]);
  921. },
  922. _areStringsLoaded$p$0: function()
  923. {
  924. var stringsLoaded=false;
  925. try
  926. {
  927. stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"])
  928. }
  929. catch($$e_1){}
  930. return stringsLoaded
  931. },
  932. _loadLocalizedScript$p$0: function(stringLoadedCallback)
  933. {
  934. var url=null;
  935. var baseUrl="";
  936. var scripts=document.getElementsByTagName("script");
  937. for(var i=scripts.length - 1; i >=0; i--)
  938. {
  939. var filename=null;
  940. var attributes=scripts[i].attributes;
  941. if(attributes)
  942. {
  943. var attribute=attributes.getNamedItem("src");
  944. if(attribute)
  945. filename=attribute.value;
  946. if(filename)
  947. {
  948. var debug=false;
  949. filename=filename["toLowerCase"]();
  950. var officeIndex=filename["indexOf"]("office_strings.js");
  951. if(officeIndex < 0)
  952. {
  953. officeIndex=filename["indexOf"]("office_strings.debug.js");
  954. debug=true
  955. }
  956. if(officeIndex > 0 && officeIndex < filename["length"])
  957. {
  958. url=filename["replace"](debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js");
  959. var languageUrl=filename["substring"](0,officeIndex);
  960. var lastIndexOfSlash=languageUrl["lastIndexOf"]("/",languageUrl["length"] - 2);
  961. if(lastIndexOfSlash===-1)
  962. lastIndexOfSlash=languageUrl["lastIndexOf"]("\\",languageUrl["length"] - 2);
  963. if(lastIndexOfSlash !==-1 && languageUrl["length"] > lastIndexOfSlash+1)
  964. baseUrl=languageUrl["substring"](0,lastIndexOfSlash+1);
  965. break
  966. }
  967. }
  968. }
  969. }
  970. if(url)
  971. {
  972. var head=document.getElementsByTagName("head")[0];
  973. var scriptElement=null;
  974. var $$t_H=this;
  975. var scriptElementCallback=function()
  976. {
  977. if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete")))
  978. {
  979. scriptElement.onload=null;
  980. scriptElement.onreadystatechange=null;
  981. stringLoadedCallback()
  982. }
  983. };
  984. var $$t_I=this;
  985. var failureCallback=function()
  986. {
  987. if(!$$t_I._areStringsLoaded$p$0())
  988. {
  989. var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js";
  990. scriptElement.onload=null;
  991. scriptElement.onreadystatechange=null;
  992. scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl);
  993. scriptElement.onload=scriptElementCallback;
  994. scriptElement.onreadystatechange=scriptElementCallback;
  995. head.appendChild(scriptElement)
  996. }
  997. };
  998. scriptElement=this._createScriptElement$p$0(url);
  999. scriptElement.onload=scriptElementCallback;
  1000. scriptElement.onreadystatechange=scriptElementCallback;
  1001. window.setTimeout(failureCallback,2e3);
  1002. head.appendChild(scriptElement)
  1003. }
  1004. },
  1005. _createScriptElement$p$0: function(url)
  1006. {
  1007. var scriptElement=document.createElement("script");
  1008. scriptElement.type="text/javascript";
  1009. scriptElement.src=url;
  1010. return scriptElement
  1011. }
  1012. };
  1013. window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data)
  1014. {
  1015. this._rawData$p$0=data
  1016. };
  1017. window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings)
  1018. {
  1019. if(!rawSettings)
  1020. return{};
  1021. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8)
  1022. {
  1023. var outlookSettings=rawSettings["SettingsKey"];
  1024. if(outlookSettings)
  1025. return window["OSF"]["DDA"]["SettingsManager"]["deserializeSettings"](outlookSettings)
  1026. }
  1027. return rawSettings
  1028. };
  1029. OSF.DDA.Settings.prototype={
  1030. _rawData$p$0: null,
  1031. _settingsData$p$0: null,
  1032. get__data$p$0: function()
  1033. {
  1034. if(!this._settingsData$p$0)
  1035. {
  1036. this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0);
  1037. this._rawData$p$0=null
  1038. }
  1039. return this._settingsData$p$0
  1040. },
  1041. get: function(name)
  1042. {
  1043. return this.get__data$p$0()[name]
  1044. },
  1045. set: function(name, value)
  1046. {
  1047. this.get__data$p$0()[name]=value
  1048. },
  1049. remove: function(name)
  1050. {
  1051. delete this.get__data$p$0()[name]
  1052. },
  1053. saveAsync: function()
  1054. {
  1055. var args=[];
  1056. for(var $$pai_4=0; $$pai_4 < arguments.length;++$$pai_4)
  1057. args[$$pai_4]=arguments[$$pai_4];
  1058. var commonParameters=$h.CommonParameters.parse(args,false);
  1059. if(window["JSON"]["stringify"](window["OSF"]["DDA"]["SettingsManager"]["serializeSettings"](this.get__data$p$0()))["length"] > 32768)
  1060. {
  1061. var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,"");
  1062. var $$t_3=this;
  1063. window.setTimeout(function()
  1064. {
  1065. commonParameters._callback$p$0(asyncResult)
  1066. },0);
  1067. return
  1068. }
  1069. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64)
  1070. this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0);
  1071. else
  1072. this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0)
  1073. },
  1074. _saveSettingsForOutlook$p$0: function(callback, userContext)
  1075. {
  1076. var storedException=null;
  1077. try
  1078. {
  1079. var serializedSettings=window["OSF"]["DDA"]["SettingsManager"]["serializeSettings"](this.get__data$p$0());
  1080. var jsonSettings=window["JSON"]["stringify"](serializedSettings);
  1081. var settingsObjectToSave={SettingsKey: jsonSettings};
  1082. window["OSF"]["DDA"]["RichClientSettingsManager"]["write"](settingsObjectToSave)
  1083. }
  1084. catch(ex)
  1085. {
  1086. storedException=ex
  1087. }
  1088. if(callback)
  1089. {
  1090. var asyncResult;
  1091. if(storedException)
  1092. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]);
  1093. else
  1094. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null);
  1095. callback(asyncResult)
  1096. }
  1097. },
  1098. _saveSettingsForOwa$p$0: function(callback, userContext)
  1099. {
  1100. var serializedSettings=window["OSF"]["DDA"]["SettingsManager"]["serializeSettings"](this.get__data$p$0());
  1101. var $$t_7=this;
  1102. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response)
  1103. {
  1104. if(callback)
  1105. {
  1106. var asyncResult;
  1107. if(resultCode)
  1108. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  1109. else
  1110. {
  1111. var responseDictionary=response;
  1112. if(!responseDictionary["error"])
  1113. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null);
  1114. else
  1115. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"])
  1116. }
  1117. callback(asyncResult)
  1118. }
  1119. })
  1120. }
  1121. };
  1122. Type.registerNamespace("$h");
  1123. var $h=window.$h || {};
  1124. Type.registerNamespace("Office.cast");
  1125. var Office=window.Office || {};
  1126. Office.cast=Office.cast || {};
  1127. $h.Appointment=function(dataDictionary)
  1128. {
  1129. this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);
  1130. this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);
  1131. this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);
  1132. this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);
  1133. this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);
  1134. this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);
  1135. this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);
  1136. this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);
  1137. this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);
  1138. $h.Appointment.initializeBase(this,[dataDictionary]);
  1139. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);
  1140. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);
  1141. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);
  1142. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);
  1143. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);
  1144. $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);
  1145. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);
  1146. $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);
  1147. $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)
  1148. };
  1149. $h.Appointment.prototype={
  1150. getEntities: function()
  1151. {
  1152. return this._data$p$0._getEntities$i$0()
  1153. },
  1154. getEntitiesByType: function(entityType)
  1155. {
  1156. return this._data$p$0._getEntitiesByType$i$0(entityType)
  1157. },
  1158. getRegExMatches: function()
  1159. {
  1160. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");
  1161. return this._data$p$0._getRegExMatches$i$0()
  1162. },
  1163. getFilteredEntitiesByName: function(name)
  1164. {
  1165. return this._data$p$0._getFilteredEntitiesByName$i$0(name)
  1166. },
  1167. getRegExMatchesByName: function(name)
  1168. {
  1169. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");
  1170. return this._data$p$0._getRegExMatchesByName$i$0(name)
  1171. },
  1172. displayReplyForm: function(obj)
  1173. {
  1174. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj)
  1175. },
  1176. displayReplyAllForm: function(obj)
  1177. {
  1178. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj)
  1179. },
  1180. getItemType: function()
  1181. {
  1182. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"]
  1183. },
  1184. _getStart$p$2: function()
  1185. {
  1186. return this._data$p$0.get__start$i$0()
  1187. },
  1188. _getEnd$p$2: function()
  1189. {
  1190. return this._data$p$0.get__end$i$0()
  1191. },
  1192. _getLocation$p$2: function()
  1193. {
  1194. return this._data$p$0.get__location$i$0()
  1195. },
  1196. _getOptionalAttendees$p$2: function()
  1197. {
  1198. return this._data$p$0.get__cc$i$0()
  1199. },
  1200. _getRequiredAttendees$p$2: function()
  1201. {
  1202. return this._data$p$0.get__to$i$0()
  1203. },
  1204. _getResources$p$2: function()
  1205. {
  1206. return this._data$p$0.get__resources$i$0()
  1207. },
  1208. _getSubject$p$2: function()
  1209. {
  1210. return this._data$p$0.get__subject$i$0()
  1211. },
  1212. _getNormalizedSubject$p$2: function()
  1213. {
  1214. return this._data$p$0.get__normalizedSubject$i$0()
  1215. },
  1216. _getOrganizer$p$2: function()
  1217. {
  1218. return this._data$p$0.get__organizer$i$0()
  1219. }
  1220. };
  1221. $h.AppointmentCompose=function(data)
  1222. {
  1223. this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);
  1224. this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);
  1225. this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);
  1226. this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);
  1227. this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);
  1228. $h.AppointmentCompose.initializeBase(this,[data]);
  1229. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);
  1230. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);
  1231. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);
  1232. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);
  1233. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)
  1234. };
  1235. $h.AppointmentCompose.prototype={
  1236. _requiredAttendees$p$2: null,
  1237. _optionalAttendees$p$2: null,
  1238. _start$p$2: null,
  1239. _end$p$2: null,
  1240. _location$p$2: null,
  1241. getItemType: function()
  1242. {
  1243. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"]
  1244. },
  1245. _getRequiredAttendees$p$2: function()
  1246. {
  1247. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1248. if(!this._requiredAttendees$p$2)
  1249. this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees");
  1250. return this._requiredAttendees$p$2
  1251. },
  1252. _getOptionalAttendees$p$2: function()
  1253. {
  1254. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1255. if(!this._optionalAttendees$p$2)
  1256. this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees");
  1257. return this._optionalAttendees$p$2
  1258. },
  1259. _getStart$p$2: function()
  1260. {
  1261. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1262. if(!this._start$p$2)
  1263. this._start$p$2=new $h.ComposeTime(1);
  1264. return this._start$p$2
  1265. },
  1266. _getEnd$p$2: function()
  1267. {
  1268. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1269. if(!this._end$p$2)
  1270. this._end$p$2=new $h.ComposeTime(2);
  1271. return this._end$p$2
  1272. },
  1273. _getLocation$p$2: function()
  1274. {
  1275. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1276. if(!this._location$p$2)
  1277. this._location$p$2=new $h.ComposeLocation;
  1278. return this._location$p$2
  1279. }
  1280. };
  1281. $h.AttachmentConstants=function(){};
  1282. $h.AttachmentDetails=function(data)
  1283. {
  1284. this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);
  1285. this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);
  1286. this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);
  1287. this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);
  1288. this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);
  1289. this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);
  1290. this._data$p$0=data;
  1291. $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);
  1292. $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);
  1293. $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);
  1294. $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);
  1295. $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);
  1296. $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)
  1297. };
  1298. $h.AttachmentDetails.prototype={
  1299. _data$p$0: null,
  1300. _getId$p$0: function()
  1301. {
  1302. return this._data$p$0["id"]
  1303. },
  1304. _getName$p$0: function()
  1305. {
  1306. return this._data$p$0["name"]
  1307. },
  1308. _getContentType$p$0: function()
  1309. {
  1310. return this._data$p$0["contentType"]
  1311. },
  1312. _getSize$p$0: function()
  1313. {
  1314. return this._data$p$0["size"]
  1315. },
  1316. _getAttachmentType$p$0: function()
  1317. {
  1318. var response=this._data$p$0["attachmentType"];
  1319. return response < $h.AttachmentDetails._attachmentTypeMap$p.length ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"]
  1320. },
  1321. _getIsInline$p$0: function()
  1322. {
  1323. return this._data$p$0["isInline"]
  1324. }
  1325. };
  1326. $h.Body=function(){};
  1327. $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType)
  1328. {
  1329. hostCoercionType.val=undefined;
  1330. if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"])
  1331. hostCoercionType.val=3;
  1332. else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"])
  1333. hostCoercionType.val=0;
  1334. else
  1335. return false;
  1336. return true
  1337. };
  1338. $h.Body.prototype={getAsync: function(coercionType)
  1339. {
  1340. var args=[];
  1341. for(var $$pai_7=1; $$pai_7 < arguments.length;++$$pai_7)
  1342. args[$$pai_7 - 1]=arguments[$$pai_7];
  1343. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync");
  1344. var commonParameters=$h.CommonParameters.parse(args,true);
  1345. var hostCoercionType;
  1346. var $$t_5,
  1347. $$t_6;
  1348. if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6))
  1349. throw Error.argument("coercionType");
  1350. var dataToHost={coercionType: hostCoercionType};
  1351. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1352. }};
  1353. $h.ComposeBody=function()
  1354. {
  1355. $h.ComposeBody.initializeBase(this)
  1356. };
  1357. $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters)
  1358. {
  1359. var dataToHost={data: data};
  1360. if(parameters._options$p$0 && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"]))
  1361. {
  1362. var hostCoercionType;
  1363. var $$t_4,
  1364. $$t_5;
  1365. if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5))
  1366. {
  1367. if(parameters._callback$p$0)
  1368. parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null));
  1369. return null
  1370. }
  1371. dataToHost["coercionType"]=hostCoercionType
  1372. }
  1373. else
  1374. dataToHost["coercionType"]=0;
  1375. return dataToHost
  1376. };
  1377. $h.ComposeBody.prototype={
  1378. getTypeAsync: function()
  1379. {
  1380. var args=[];
  1381. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1382. args[$$pai_2]=arguments[$$pai_2];
  1383. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync");
  1384. var parameters=$h.CommonParameters.parse(args,true);
  1385. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1386. },
  1387. setSelectedDataAsync: function(data)
  1388. {
  1389. var args=[];
  1390. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1391. args[$$pai_4 - 1]=arguments[$$pai_4];
  1392. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync");
  1393. var parameters=$h.CommonParameters.parse(args,false);
  1394. if(!String.isInstanceOfType(data))
  1395. throw Error.argumentType("data",Object["getType"](data),String);
  1396. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1397. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1398. if(!dataToHost)
  1399. return;
  1400. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1401. },
  1402. prependAsync: function(data)
  1403. {
  1404. var args=[];
  1405. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1406. args[$$pai_4 - 1]=arguments[$$pai_4];
  1407. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync");
  1408. var parameters=$h.CommonParameters.parse(args,false);
  1409. if(!String.isInstanceOfType(data))
  1410. throw Error.argumentType("data",Object["getType"](data),String);
  1411. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1412. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1413. if(!dataToHost)
  1414. return;
  1415. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1416. },
  1417. setAsync: function(data)
  1418. {
  1419. var args=[];
  1420. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1421. args[$$pai_4 - 1]=arguments[$$pai_4];
  1422. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync");
  1423. var parameters=$h.CommonParameters.parse(args,false);
  1424. if(!String.isInstanceOfType(data))
  1425. throw Error.argumentType("data",Object["getType"](data),String);
  1426. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1427. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1428. if(!dataToHost)
  1429. return;
  1430. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1431. }
  1432. };
  1433. $h.ComposeItem=function(data)
  1434. {
  1435. this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);
  1436. this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1);
  1437. $h.ComposeItem.initializeBase(this,[data]);
  1438. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1);
  1439. $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)
  1440. };
  1441. $h.ComposeItem.prototype={
  1442. _subject$p$1: null,
  1443. _body$p$1: null,
  1444. addFileAttachmentAsync: function(uri, attachmentName)
  1445. {
  1446. var args=[];
  1447. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  1448. args[$$pai_5 - 2]=arguments[$$pai_5];
  1449. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync");
  1450. if(!$h.ScriptHelpers.isNonEmptyString(uri))
  1451. throw Error.argument("uri");
  1452. if(!$h.ScriptHelpers.isNonEmptyString(attachmentName))
  1453. throw Error.argument("attachmentName");
  1454. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri["length"],0,2048,"uri");
  1455. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName["length"],0,255,"attachmentName");
  1456. var commonParameters=$h.CommonParameters.parse(args,false);
  1457. var parameters={
  1458. uri: uri,
  1459. name: attachmentName,
  1460. __timeout__: 6e5
  1461. };
  1462. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1463. },
  1464. addItemAttachmentAsync: function(itemId, attachmentName)
  1465. {
  1466. var args=[];
  1467. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  1468. args[$$pai_5 - 2]=arguments[$$pai_5];
  1469. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync");
  1470. if(!$h.ScriptHelpers.isNonEmptyString(itemId))
  1471. throw Error.argument("itemId");
  1472. if(!$h.ScriptHelpers.isNonEmptyString(attachmentName))
  1473. throw Error.argument("attachmentName");
  1474. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId["length"],0,200,"itemId");
  1475. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName["length"],0,255,"attachmentName");
  1476. var commonParameters=$h.CommonParameters.parse(args,false);
  1477. var parameters={
  1478. itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId),
  1479. name: attachmentName,
  1480. __timeout__: 6e5
  1481. };
  1482. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1483. },
  1484. removeAttachmentAsync: function(attachmentId)
  1485. {
  1486. var args=[];
  1487. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1488. args[$$pai_3 - 1]=arguments[$$pai_3];
  1489. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync");
  1490. if(!$h.ScriptHelpers.isNonEmptyString(attachmentId))
  1491. throw Error.argument("attachmentId");
  1492. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId["length"],0,200,"attachmentId");
  1493. var commonParameters=$h.CommonParameters.parse(args,false);
  1494. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1495. },
  1496. getSelectedDataAsync: function(coercionType)
  1497. {
  1498. var args=[];
  1499. for(var $$pai_7=1; $$pai_7 < arguments.length;++$$pai_7)
  1500. args[$$pai_7 - 1]=arguments[$$pai_7];
  1501. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync");
  1502. var commonParameters=$h.CommonParameters.parse(args,true);
  1503. var hostCoercionType;
  1504. var $$t_5,
  1505. $$t_6;
  1506. if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6))
  1507. throw Error.argument("coercionType");
  1508. var dataToHost={coercionType: hostCoercionType};
  1509. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  1510. },
  1511. setSelectedDataAsync: function(data)
  1512. {
  1513. var args=[];
  1514. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  1515. args[$$pai_4 - 1]=arguments[$$pai_4];
  1516. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync");
  1517. var parameters=$h.CommonParameters.parse(args,false);
  1518. if(!String.isInstanceOfType(data))
  1519. throw Error.argumentType("data",Object["getType"](data),String);
  1520. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,1e6,"data");
  1521. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  1522. if(!dataToHost)
  1523. return;
  1524. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1525. },
  1526. close: function()
  1527. {
  1528. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null)
  1529. },
  1530. _getBody$p$1: function()
  1531. {
  1532. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1533. if(!this._body$p$1)
  1534. this._body$p$1=new $h.ComposeBody;
  1535. return this._body$p$1
  1536. },
  1537. _getSubject$p$1: function()
  1538. {
  1539. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  1540. if(!this._subject$p$1)
  1541. this._subject$p$1=new $h.ComposeSubject;
  1542. return this._subject$p$1
  1543. },
  1544. saveAsync: function()
  1545. {
  1546. var args=[];
  1547. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1548. args[$$pai_2]=arguments[$$pai_2];
  1549. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync");
  1550. var parameters=$h.CommonParameters.parse(args,false);
  1551. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1552. }
  1553. };
  1554. $h.ComposeRecipient=function(type, propertyName)
  1555. {
  1556. this._type$p$0=type;
  1557. this._propertyName$p$0=propertyName
  1558. };
  1559. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress)
  1560. {
  1561. if(!displayName && !emailAddress)
  1562. throw Error.argument("recipients");
  1563. if(displayName && displayName["length"] > 255)
  1564. throw Error.argumentOutOfRange("recipients",displayName["length"],window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]);
  1565. if(emailAddress && emailAddress["length"] > 571)
  1566. throw Error.argumentOutOfRange("recipients",emailAddress["length"],window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]);
  1567. };
  1568. $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput)
  1569. {
  1570. var input=rawInput;
  1571. var output=[];
  1572. for(var i=0; i < input["length"]; i++)
  1573. {
  1574. var email=new $h.EmailAddressDetails(input[i]);
  1575. output[i]=email
  1576. }
  1577. return output
  1578. };
  1579. $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name)
  1580. {
  1581. return{
  1582. address: address,
  1583. name: name
  1584. }
  1585. };
  1586. $h.ComposeRecipient.prototype={
  1587. _propertyName$p$0: null,
  1588. _type$p$0: 0,
  1589. getAsync: function()
  1590. {
  1591. var args=[];
  1592. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1593. args[$$pai_2]=arguments[$$pai_2];
  1594. var parameters=$h.CommonParameters.parse(args,true);
  1595. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync");
  1596. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0)
  1597. },
  1598. setAsync: function(recipients)
  1599. {
  1600. var args=[];
  1601. for(var $$pai_2=1; $$pai_2 < arguments.length;++$$pai_2)
  1602. args[$$pai_2 - 1]=arguments[$$pai_2];
  1603. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync");
  1604. this.setAddHelper(recipients,args,true)
  1605. },
  1606. addAsync: function(recipients)
  1607. {
  1608. var args=[];
  1609. for(var $$pai_2=1; $$pai_2 < arguments.length;++$$pai_2)
  1610. args[$$pai_2 - 1]=arguments[$$pai_2];
  1611. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync");
  1612. this.setAddHelper(recipients,args,false)
  1613. },
  1614. setAddHelper: function(recipients, args, isSet)
  1615. {
  1616. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients");
  1617. var parameters=$h.CommonParameters.parse(args,false);
  1618. var recipientData=[];
  1619. if(Array.isInstanceOfType(recipients))
  1620. for(var i=0; i < recipients["length"]; i++)
  1621. if(String.isInstanceOfType(recipients[i]))
  1622. {
  1623. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]);
  1624. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i])
  1625. }
  1626. else if($h.EmailAddressDetails.isInstanceOfType(recipients[i]))
  1627. {
  1628. var address=recipients[i];
  1629. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]);
  1630. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"])
  1631. }
  1632. else if(Object.isInstanceOfType(recipients[i]))
  1633. {
  1634. var input=recipients[i];
  1635. var emailAddress=input["emailAddress"];
  1636. var displayName=input["displayName"];
  1637. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress);
  1638. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName)
  1639. }
  1640. else
  1641. throw Error.argument("recipients");
  1642. else
  1643. throw Error.argument("recipients");
  1644. var $$t_B=this;
  1645. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{
  1646. recipientField: this._type$p$0,
  1647. recipientArray: recipientData
  1648. },function(rawInput)
  1649. {
  1650. return rawInput
  1651. },parameters._asyncContext$p$0,parameters._callback$p$0)
  1652. }
  1653. };
  1654. $h.ComposeRecipient.RecipientField=function(){};
  1655. $h.ComposeRecipient.RecipientField.prototype={
  1656. to: 0,
  1657. cc: 1,
  1658. bcc: 2,
  1659. requiredAttendees: 0,
  1660. optionalAttendees: 1
  1661. };
  1662. $h.ComposeRecipient.RecipientField.registerEnum("$h.ComposeRecipient.RecipientField",false);
  1663. $h.ComposeLocation=function(){};
  1664. $h.ComposeLocation.prototype={
  1665. getAsync: function()
  1666. {
  1667. var args=[];
  1668. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1669. args[$$pai_2]=arguments[$$pai_2];
  1670. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync");
  1671. var parameters=$h.CommonParameters.parse(args,true);
  1672. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1673. },
  1674. setAsync: function(location)
  1675. {
  1676. var args=[];
  1677. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1678. args[$$pai_3 - 1]=arguments[$$pai_3];
  1679. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync");
  1680. var parameters=$h.CommonParameters.parse(args,false);
  1681. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location["length"],0,255,"location");
  1682. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1683. }
  1684. };
  1685. $h.ComposeSubject=function(){};
  1686. $h.ComposeSubject.prototype={
  1687. getAsync: function()
  1688. {
  1689. var args=[];
  1690. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1691. args[$$pai_2]=arguments[$$pai_2];
  1692. var parameters=$h.CommonParameters.parse(args,true);
  1693. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync");
  1694. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1695. },
  1696. setAsync: function(data)
  1697. {
  1698. var args=[];
  1699. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1700. args[$$pai_3 - 1]=arguments[$$pai_3];
  1701. var parameters=$h.CommonParameters.parse(args,false);
  1702. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync");
  1703. if(!String.isInstanceOfType(data))
  1704. throw Error.argument("data");
  1705. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data["length"],0,255,"data");
  1706. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1707. }
  1708. };
  1709. $h.ComposeTime=function(type)
  1710. {
  1711. this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0);
  1712. this._timeType$p$0=type
  1713. };
  1714. $h.ComposeTime.prototype={
  1715. _timeType$p$0: 0,
  1716. getAsync: function()
  1717. {
  1718. var args=[];
  1719. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  1720. args[$$pai_2]=arguments[$$pai_2];
  1721. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync");
  1722. var parameters=$h.CommonParameters.parse(args,true);
  1723. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0)
  1724. },
  1725. setAsync: function(dateTime)
  1726. {
  1727. var args=[];
  1728. for(var $$pai_3=1; $$pai_3 < arguments.length;++$$pai_3)
  1729. args[$$pai_3 - 1]=arguments[$$pai_3];
  1730. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync");
  1731. if(!Date.isInstanceOfType(dateTime))
  1732. throw Error.argumentType("dateTime",Object["getType"](dateTime),Date);
  1733. if(window["isNaN"](dateTime["getTime"]()))
  1734. throw Error.argument("dateTime");
  1735. if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13)
  1736. throw Error.argumentOutOfRange("dateTime");
  1737. var parameters=$h.CommonParameters.parse(args,false);
  1738. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{
  1739. TimeProperty: this._timeType$p$0,
  1740. time: dateTime["getTime"]()
  1741. },null,parameters._asyncContext$p$0,parameters._callback$p$0)
  1742. },
  1743. _ticksToDateFormatter$p$0: function(rawInput)
  1744. {
  1745. var ticks=rawInput;
  1746. return new Date(ticks)
  1747. },
  1748. _getPropertyName$p$0: function()
  1749. {
  1750. return this._timeType$p$0===1 ? "start" : "end"
  1751. }
  1752. };
  1753. $h.ComposeTime.TimeType=function(){};
  1754. $h.ComposeTime.TimeType.prototype={
  1755. start: 1,
  1756. end: 2
  1757. };
  1758. $h.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",false);
  1759. $h.Contact=function(data)
  1760. {
  1761. this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);
  1762. this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);
  1763. this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);
  1764. this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);
  1765. this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);
  1766. this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);
  1767. this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);
  1768. this._data$p$0=data;
  1769. $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);
  1770. $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);
  1771. $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);
  1772. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);
  1773. $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);
  1774. $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);
  1775. $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)
  1776. };
  1777. $h.Contact.prototype={
  1778. _data$p$0: null,
  1779. _phoneNumbers$p$0: null,
  1780. _getPersonName$p$0: function()
  1781. {
  1782. return this._data$p$0["PersonName"]
  1783. },
  1784. _getBusinessName$p$0: function()
  1785. {
  1786. return this._data$p$0["BusinessName"]
  1787. },
  1788. _getAddresses$p$0: function()
  1789. {
  1790. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")
  1791. },
  1792. _getEmailAddresses$p$0: function()
  1793. {
  1794. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")
  1795. },
  1796. _getUrls$p$0: function()
  1797. {
  1798. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")
  1799. },
  1800. _getPhoneNumbers$p$0: function()
  1801. {
  1802. if(!this._phoneNumbers$p$0)
  1803. {
  1804. var $$t_1=this;
  1805. this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data)
  1806. {
  1807. return new $h.PhoneNumber(data)
  1808. })
  1809. }
  1810. return this._phoneNumbers$p$0
  1811. },
  1812. _getContactString$p$0: function()
  1813. {
  1814. return this._data$p$0["ContactString"]
  1815. }
  1816. };
  1817. $h.CustomProperties=function(data)
  1818. {
  1819. if($h.ScriptHelpers.isNullOrUndefined(data))
  1820. throw Error.argumentNull("data");
  1821. if(Array.isInstanceOfType(data))
  1822. {
  1823. var customPropertiesArray=data;
  1824. if(customPropertiesArray.length > 0)
  1825. this._data$p$0=customPropertiesArray[0];
  1826. else
  1827. throw Error.argument("data");
  1828. }
  1829. else
  1830. this._data$p$0=data
  1831. };
  1832. $h.CustomProperties.prototype={
  1833. _data$p$0: null,
  1834. get: function(name)
  1835. {
  1836. var value=this._data$p$0[name];
  1837. if(typeof value==="string")
  1838. {
  1839. var valueString=value;
  1840. if(valueString["length"] > 6 && valueString.startsWith("Date(") && valueString.endsWith(")"))
  1841. {
  1842. var ticksString=valueString["substring"](5,valueString["length"] - 1);
  1843. var ticks=window["parseInt"](ticksString);
  1844. if(!window["isNaN"](ticks))
  1845. {
  1846. var dateTimeValue=new Date(ticks);
  1847. if(dateTimeValue)
  1848. value=dateTimeValue
  1849. }
  1850. }
  1851. }
  1852. return value
  1853. },
  1854. set: function(name, value)
  1855. {
  1856. if(window["OSF"]["OUtil"]["isDate"](value))
  1857. value="Date("+value["getTime"]()+")";
  1858. this._data$p$0[name]=value
  1859. },
  1860. remove: function(name)
  1861. {
  1862. delete this._data$p$0[name]
  1863. },
  1864. saveAsync: function()
  1865. {
  1866. var args=[];
  1867. for(var $$pai_4=0; $$pai_4 < arguments.length;++$$pai_4)
  1868. args[$$pai_4]=arguments[$$pai_4];
  1869. var MaxCustomPropertiesLength=2500;
  1870. if(window["JSON"]["stringify"](this._data$p$0)["length"] > MaxCustomPropertiesLength)
  1871. throw Error.argument();
  1872. var parameters=$h.CommonParameters.parse(args,false,true);
  1873. var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0);
  1874. saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0})
  1875. }
  1876. };
  1877. $h.Diagnostics=function(data, appName)
  1878. {
  1879. this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);
  1880. this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);
  1881. this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);
  1882. this._data$p$0=data;
  1883. this._appName$p$0=appName;
  1884. $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);
  1885. $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);
  1886. if(64===this._appName$p$0)
  1887. $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)
  1888. };
  1889. $h.Diagnostics.prototype={
  1890. _data$p$0: null,
  1891. _appName$p$0: 0,
  1892. _getHostName$p$0: function()
  1893. {
  1894. if(8===this._appName$p$0)
  1895. return"Outlook";
  1896. else if(64===this._appName$p$0)
  1897. return"OutlookWebApp";
  1898. return null
  1899. },
  1900. _getHostVersion$p$0: function()
  1901. {
  1902. return this._data$p$0.get__hostVersion$i$0()
  1903. },
  1904. _getOwaView$p$0: function()
  1905. {
  1906. return this._data$p$0.get__owaView$i$0()
  1907. }
  1908. };
  1909. $h.EmailAddressDetails=function(data)
  1910. {
  1911. this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);
  1912. this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);
  1913. this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);
  1914. this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);
  1915. this._data$p$0=data;
  1916. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);
  1917. $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);
  1918. if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse"))
  1919. $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);
  1920. if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType"))
  1921. $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)
  1922. };
  1923. $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data)
  1924. {
  1925. var emailAddressDetailsDictionary={};
  1926. var displayName=data["Name"];
  1927. var emailAddress=data["UserId"];
  1928. emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p;
  1929. emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p;
  1930. return new $h.EmailAddressDetails(emailAddressDetailsDictionary)
  1931. };
  1932. $h.EmailAddressDetails.prototype={
  1933. _data$p$0: null,
  1934. toJSON: function()
  1935. {
  1936. var result={};
  1937. result["emailAddress"]=this._getEmailAddress$p$0();
  1938. result["displayName"]=this._getDisplayName$p$0();
  1939. if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse"))
  1940. result["appointmentResponse"]=this._getAppointmentResponse$p$0();
  1941. if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType"))
  1942. result["recipientType"]=this._getRecipientType$p$0();
  1943. return result
  1944. },
  1945. _getEmailAddress$p$0: function()
  1946. {
  1947. return this._data$p$0["address"]
  1948. },
  1949. _getDisplayName$p$0: function()
  1950. {
  1951. return this._data$p$0["name"]
  1952. },
  1953. _getAppointmentResponse$p$0: function()
  1954. {
  1955. var response=this._data$p$0["appointmentResponse"];
  1956. return response < $h.EmailAddressDetails._responseTypeMap$p.length ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"]
  1957. },
  1958. _getRecipientType$p$0: function()
  1959. {
  1960. var response=this._data$p$0["recipientType"];
  1961. return response < $h.EmailAddressDetails._recipientTypeMap$p.length ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"]
  1962. }
  1963. };
  1964. $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel)
  1965. {
  1966. this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0);
  1967. this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0);
  1968. this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0);
  1969. this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0);
  1970. this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);
  1971. this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);
  1972. this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);
  1973. this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0);
  1974. this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0);
  1975. this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);
  1976. this._data$p$0=data || {};
  1977. this._filteredData$p$0=filteredEntitiesData || {};
  1978. this._dateTimeSent$p$0=timeSent;
  1979. $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);
  1980. $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0);
  1981. $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0);
  1982. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);
  1983. $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);
  1984. $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);
  1985. $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0);
  1986. $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0);
  1987. $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0);
  1988. this._permissionLevel$p$0=permissionLevel
  1989. };
  1990. $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName)
  1991. {
  1992. var results=null;
  1993. var extractedObjects=data[name];
  1994. if(!extractedObjects)
  1995. return new Array(0);
  1996. if(removeDuplicates)
  1997. extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName);
  1998. results=new Array(extractedObjects.length);
  1999. var count=0;
  2000. for(var $$arr_9=extractedObjects, $$len_A=$$arr_9["length"], $$idx_B=0; $$idx_B < $$len_A;++$$idx_B)
  2001. {
  2002. var extractedObject=$$arr_9[$$idx_B];
  2003. if(creator)
  2004. results[count++]=creator(extractedObject);
  2005. else
  2006. results[count++]=extractedObject
  2007. }
  2008. return results
  2009. };
  2010. $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate)
  2011. {
  2012. var extractedProperties=data[name];
  2013. if(!extractedProperties)
  2014. return new Array(0);
  2015. if(removeDuplicate)
  2016. extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null);
  2017. return extractedProperties
  2018. };
  2019. $h.Entities._createContact$p=function(data)
  2020. {
  2021. return new $h.Contact(data)
  2022. };
  2023. $h.Entities._createTaskSuggestion$p=function(data)
  2024. {
  2025. return new $h.TaskSuggestion(data)
  2026. };
  2027. $h.Entities._createPhoneNumber$p=function(data)
  2028. {
  2029. return new $h.PhoneNumber(data)
  2030. };
  2031. $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier)
  2032. {
  2033. if(dictionary1===dictionary2)
  2034. return true;
  2035. if(!dictionary1 || !dictionary2)
  2036. return false;
  2037. if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier])
  2038. return true;
  2039. return false
  2040. };
  2041. $h.Entities._stringEquals$p=function(string1, string2, entityProperty)
  2042. {
  2043. return string1===string2
  2044. };
  2045. $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier)
  2046. {
  2047. for(var matchIndex1=array.length - 1; matchIndex1 >=0; matchIndex1--)
  2048. {
  2049. var removeMatch=false;
  2050. for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--)
  2051. if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier))
  2052. {
  2053. removeMatch=true;
  2054. break
  2055. }
  2056. if(removeMatch)
  2057. Array.removeAt(array,matchIndex1)
  2058. }
  2059. return array
  2060. };
  2061. $h.Entities.prototype={
  2062. _dateTimeSent$p$0: null,
  2063. _data$p$0: null,
  2064. _filteredData$p$0: null,
  2065. _filteredEntitiesCache$p$0: null,
  2066. _permissionLevel$p$0: 0,
  2067. _taskSuggestions$p$0: null,
  2068. _meetingSuggestions$p$0: null,
  2069. _phoneNumbers$p$0: null,
  2070. _contacts$p$0: null,
  2071. _addresses$p$0: null,
  2072. _emailAddresses$p$0: null,
  2073. _urls$p$0: null,
  2074. _flightReservations$p$0: null,
  2075. _parcelDeliveries$p$0: null,
  2076. _getByType$i$0: function(entityType)
  2077. {
  2078. if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"])
  2079. return this._getMeetingSuggestions$p$0();
  2080. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"])
  2081. return this._getTaskSuggestions$p$0();
  2082. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"])
  2083. return this._getAddresses$p$0();
  2084. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"])
  2085. return this._getPhoneNumbers$p$0();
  2086. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"])
  2087. return this._getEmailAddresses$p$0();
  2088. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"])
  2089. return this._getUrls$p$0();
  2090. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"])
  2091. return this._getContacts$p$0();
  2092. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"])
  2093. return this._getFlightReservations$p$0();
  2094. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"])
  2095. return this._getParcelDeliveries$p$0();
  2096. return null
  2097. },
  2098. _getFilteredEntitiesByName$i$0: function(name)
  2099. {
  2100. if(!this._filteredEntitiesCache$p$0)
  2101. this._filteredEntitiesCache$p$0={};
  2102. if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name))
  2103. {
  2104. var found=false;
  2105. for(var i=0; i < $h.Entities._allEntityKeys$p.length; i++)
  2106. {
  2107. var entityTypeKey=$h.Entities._allEntityKeys$p[i];
  2108. var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey];
  2109. if(!perEntityTypeDictionary)
  2110. continue;
  2111. if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name))
  2112. {
  2113. switch(entityTypeKey)
  2114. {
  2115. case"EmailAddresses":
  2116. case"Urls":
  2117. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name);
  2118. break;
  2119. case"Addresses":
  2120. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true);
  2121. break;
  2122. case"PhoneNumbers":
  2123. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null);
  2124. break;
  2125. case"TaskSuggestions":
  2126. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString");
  2127. break;
  2128. case"MeetingSuggestions":
  2129. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");
  2130. break;
  2131. case"Contacts":
  2132. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString");
  2133. break
  2134. }
  2135. found=true;
  2136. break
  2137. }
  2138. }
  2139. if(!found)
  2140. this._filteredEntitiesCache$p$0[name]=null
  2141. }
  2142. return this._filteredEntitiesCache$p$0[name]
  2143. },
  2144. _createMeetingSuggestion$p$0: function(data)
  2145. {
  2146. return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0)
  2147. },
  2148. _getAddresses$p$0: function()
  2149. {
  2150. if(!this._addresses$p$0)
  2151. this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true);
  2152. return this._addresses$p$0
  2153. },
  2154. _getEmailAddresses$p$0: function()
  2155. {
  2156. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2157. if(!this._emailAddresses$p$0)
  2158. this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false);
  2159. return this._emailAddresses$p$0
  2160. },
  2161. _getUrls$p$0: function()
  2162. {
  2163. if(!this._urls$p$0)
  2164. this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false);
  2165. return this._urls$p$0
  2166. },
  2167. _getPhoneNumbers$p$0: function()
  2168. {
  2169. if(!this._phoneNumbers$p$0)
  2170. this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p);
  2171. return this._phoneNumbers$p$0
  2172. },
  2173. _getTaskSuggestions$p$0: function()
  2174. {
  2175. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2176. if(!this._taskSuggestions$p$0)
  2177. this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString");
  2178. return this._taskSuggestions$p$0
  2179. },
  2180. _getMeetingSuggestions$p$0: function()
  2181. {
  2182. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2183. if(!this._meetingSuggestions$p$0)
  2184. this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");
  2185. return this._meetingSuggestions$p$0
  2186. },
  2187. _getContacts$p$0: function()
  2188. {
  2189. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2190. if(!this._contacts$p$0)
  2191. this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString");
  2192. return this._contacts$p$0
  2193. },
  2194. _getParcelDeliveries$p$0: function()
  2195. {
  2196. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2197. if(!this._parcelDeliveries$p$0)
  2198. this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null);
  2199. return this._parcelDeliveries$p$0
  2200. },
  2201. _getFlightReservations$p$0: function()
  2202. {
  2203. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  2204. if(!this._flightReservations$p$0)
  2205. this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null);
  2206. return this._flightReservations$p$0
  2207. }
  2208. };
  2209. $h.ReplyConstants=function(){};
  2210. $h.AsyncConstants=function(){};
  2211. window["Office"]["cast"]["item"]=Office.cast.item=function(){};
  2212. window["Office"]["cast"]["item"]["toItemRead"]=function(item)
  2213. {
  2214. if($h.Item.isInstanceOfType(item))
  2215. return item;
  2216. throw Error.argumentType();
  2217. };
  2218. window["Office"]["cast"]["item"]["toItemCompose"]=function(item)
  2219. {
  2220. if($h.ComposeItem.isInstanceOfType(item))
  2221. return item;
  2222. throw Error.argumentType();
  2223. };
  2224. window["Office"]["cast"]["item"]["toMessage"]=function(item)
  2225. {
  2226. return window["Office"]["cast"]["item"]["toMessageRead"](item)
  2227. };
  2228. window["Office"]["cast"]["item"]["toMessageRead"]=function(item)
  2229. {
  2230. if($h.Message.isInstanceOfType(item))
  2231. return item;
  2232. throw Error.argumentType();
  2233. };
  2234. window["Office"]["cast"]["item"]["toMessageCompose"]=function(item)
  2235. {
  2236. if($h.MessageCompose.isInstanceOfType(item))
  2237. return item;
  2238. throw Error.argumentType();
  2239. };
  2240. window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item)
  2241. {
  2242. if($h.MeetingRequest.isInstanceOfType(item))
  2243. return item;
  2244. throw Error.argumentType();
  2245. };
  2246. window["Office"]["cast"]["item"]["toAppointment"]=function(item)
  2247. {
  2248. return window["Office"]["cast"]["item"]["toAppointmentRead"](item)
  2249. };
  2250. window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item)
  2251. {
  2252. if($h.Appointment.isInstanceOfType(item))
  2253. return item;
  2254. throw Error.argumentType();
  2255. };
  2256. window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item)
  2257. {
  2258. if($h.AppointmentCompose.isInstanceOfType(item))
  2259. return item;
  2260. throw Error.argumentType();
  2261. };
  2262. $h.Item=function(data)
  2263. {
  2264. this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);
  2265. this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1);
  2266. this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1);
  2267. this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1);
  2268. this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1);
  2269. this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1);
  2270. $h.Item.initializeBase(this,[data]);
  2271. $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1);
  2272. $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1);
  2273. $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1);
  2274. $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1);
  2275. $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1);
  2276. $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)
  2277. };
  2278. $h.Item.prototype={
  2279. _body$p$1: null,
  2280. _getItemId$p$1: function()
  2281. {
  2282. return this._data$p$0.get__itemId$i$0()
  2283. },
  2284. _getItemClass$p$1: function()
  2285. {
  2286. return this._data$p$0.get__itemClass$i$0()
  2287. },
  2288. _getDateTimeCreated$p$1: function()
  2289. {
  2290. return this._data$p$0.get__dateTimeCreated$i$0()
  2291. },
  2292. _getDateTimeModified$p$1: function()
  2293. {
  2294. return this._data$p$0.get__dateTimeModified$i$0()
  2295. },
  2296. _getAttachments$p$1: function()
  2297. {
  2298. return this._data$p$0.get__attachments$i$0()
  2299. },
  2300. _getBody$p$1: function()
  2301. {
  2302. if(!this._body$p$1)
  2303. this._body$p$1=new $h.Body;
  2304. return this._body$p$1
  2305. }
  2306. };
  2307. $h.ItemBase=function(data)
  2308. {
  2309. this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0);
  2310. this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0);
  2311. this.$$d_getItemType=Function.createDelegate(this,this.getItemType);
  2312. this._data$p$0=data;
  2313. $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType);
  2314. $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0)
  2315. };
  2316. $h.ItemBase.prototype={
  2317. _data$p$0: null,
  2318. _notificationMessages$p$0: null,
  2319. get_data: function()
  2320. {
  2321. return this._data$p$0
  2322. },
  2323. loadCustomPropertiesAsync: function()
  2324. {
  2325. var args=[];
  2326. for(var $$pai_3=0; $$pai_3 < arguments.length;++$$pai_3)
  2327. args[$$pai_3]=arguments[$$pai_3];
  2328. var parameters=$h.CommonParameters.parse(args,true,true);
  2329. var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0);
  2330. loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{})
  2331. },
  2332. _createCustomProperties$i$0: function(data)
  2333. {
  2334. return new $h.CustomProperties(data)
  2335. },
  2336. _getNotificationMessages$p$0: function()
  2337. {
  2338. if(!this._notificationMessages$p$0)
  2339. this._notificationMessages$p$0=new $h.NotificationMessages;
  2340. return this._notificationMessages$p$0
  2341. }
  2342. };
  2343. $h.MeetingRequest=function(data)
  2344. {
  2345. this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3);
  2346. this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3);
  2347. this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3);
  2348. this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3);
  2349. this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3);
  2350. $h.MeetingRequest.initializeBase(this,[data]);
  2351. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3);
  2352. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3);
  2353. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3);
  2354. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3);
  2355. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3)
  2356. };
  2357. $h.MeetingRequest.prototype={
  2358. _getStart$p$3: function()
  2359. {
  2360. return this._data$p$0.get__start$i$0()
  2361. },
  2362. _getEnd$p$3: function()
  2363. {
  2364. return this._data$p$0.get__end$i$0()
  2365. },
  2366. _getLocation$p$3: function()
  2367. {
  2368. return this._data$p$0.get__location$i$0()
  2369. },
  2370. _getOptionalAttendees$p$3: function()
  2371. {
  2372. return this._data$p$0.get__cc$i$0()
  2373. },
  2374. _getRequiredAttendees$p$3: function()
  2375. {
  2376. return this._data$p$0.get__to$i$0()
  2377. }
  2378. };
  2379. $h.MeetingSuggestion=function(data, dateTimeSent)
  2380. {
  2381. this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0);
  2382. this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0);
  2383. this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0);
  2384. this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0);
  2385. this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0);
  2386. this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0);
  2387. this._data$p$0=data;
  2388. this._dateTimeSent$p$0=dateTimeSent;
  2389. $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0);
  2390. $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0);
  2391. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0);
  2392. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0);
  2393. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0);
  2394. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0)
  2395. };
  2396. $h.MeetingSuggestion.prototype={
  2397. _dateTimeSent$p$0: null,
  2398. _data$p$0: null,
  2399. _attendees$p$0: null,
  2400. _getMeetingString$p$0: function()
  2401. {
  2402. return this._data$p$0["MeetingString"]
  2403. },
  2404. _getLocation$p$0: function()
  2405. {
  2406. return this._data$p$0["Location"]
  2407. },
  2408. _getSubject$p$0: function()
  2409. {
  2410. return this._data$p$0["Subject"]
  2411. },
  2412. _getStartTime$p$0: function()
  2413. {
  2414. var time=this._createDateTimeFromParameter$p$0("StartTime");
  2415. var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0);
  2416. if(resolvedTime["getTime"]() !==time["getTime"]())
  2417. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime));
  2418. return time
  2419. },
  2420. _getEndTime$p$0: function()
  2421. {
  2422. var time=this._createDateTimeFromParameter$p$0("EndTime");
  2423. var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0);
  2424. if(resolvedTime["getTime"]() !==time["getTime"]())
  2425. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime));
  2426. return time
  2427. },
  2428. _createDateTimeFromParameter$p$0: function(keyName)
  2429. {
  2430. var dateTimeString=this._data$p$0[keyName];
  2431. if(!dateTimeString)
  2432. return null;
  2433. return new Date(dateTimeString)
  2434. },
  2435. _getAttendees$p$0: function()
  2436. {
  2437. if(!this._attendees$p$0)
  2438. {
  2439. var $$t_1=this;
  2440. this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data)
  2441. {
  2442. return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data)
  2443. })
  2444. }
  2445. return this._attendees$p$0
  2446. }
  2447. };
  2448. $h.MeetingSuggestionTimeDecoder=function(){};
  2449. $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime)
  2450. {
  2451. if(!sentTime)
  2452. return inTime;
  2453. try
  2454. {
  2455. var tod;
  2456. var outDate;
  2457. var extractedDate;
  2458. var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0);
  2459. var $$t_7,
  2460. $$t_8,
  2461. $$t_9;
  2462. if(!($$t_9=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,$$t_7={val: extractedDate},$$t_8={val: tod}),extractedDate=$$t_7["val"],tod=$$t_8["val"],$$t_9))
  2463. return inTime;
  2464. else
  2465. {
  2466. if($h._preciseDate.isInstanceOfType(extractedDate))
  2467. outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate);
  2468. else if($h._relativeDate.isInstanceOfType(extractedDate))
  2469. outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate);
  2470. else
  2471. outDate=sentDate;
  2472. if(window["isNaN"](outDate["getTime"]()))
  2473. return sentTime;
  2474. outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod);
  2475. return outDate
  2476. }
  2477. }
  2478. catch($$e_6)
  2479. {
  2480. return sentTime
  2481. }
  2482. };
  2483. $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value)
  2484. {
  2485. return null===value || value===undefined
  2486. };
  2487. $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise)
  2488. {
  2489. var year=precise._year$i$1;
  2490. var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1;
  2491. var day=precise._day$i$1;
  2492. if(!day)
  2493. return sentDate;
  2494. var candidate;
  2495. if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year))
  2496. {
  2497. candidate=new Date(sentDate["getFullYear"](),month,day);
  2498. if(candidate["getTime"]() < sentDate["getTime"]())
  2499. candidate=new Date(sentDate["getFullYear"]()+1,month,day)
  2500. }
  2501. else
  2502. candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day);
  2503. if(candidate["getMonth"]() !==month)
  2504. return sentDate;
  2505. return candidate
  2506. };
  2507. $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative)
  2508. {
  2509. var date;
  2510. switch(relative._unit$i$1)
  2511. {
  2512. case 0:
  2513. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]());
  2514. date["setDate"](date["getDate"]()+relative._offset$i$1);
  2515. return date;
  2516. case 5:
  2517. return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1);
  2518. case 2:
  2519. var days=1;
  2520. switch(relative._modifier$i$1)
  2521. {
  2522. case 1:
  2523. break;
  2524. case 2:
  2525. days=16;
  2526. break;
  2527. default:
  2528. if(!relative._offset$i$1)
  2529. days=sentDate["getDate"]();
  2530. break
  2531. }
  2532. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days);
  2533. date["setMonth"](date["getMonth"]()+relative._offset$i$1);
  2534. if(date["getTime"]() < sentDate["getTime"]())
  2535. date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1);
  2536. return date;
  2537. case 1:
  2538. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]());
  2539. date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1);
  2540. if(relative._modifier$i$1===1 || !relative._modifier$i$1)
  2541. {
  2542. date["setDate"](date["getDate"]()+1 - date["getDay"]());
  2543. if(date["getTime"]() < sentDate["getTime"]())
  2544. return sentDate;
  2545. return date
  2546. }
  2547. else if(relative._modifier$i$1===2)
  2548. {
  2549. date["setDate"](date["getDate"]()+5 - date["getDay"]());
  2550. return date
  2551. }
  2552. break;
  2553. case 4:
  2554. return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative);
  2555. case 3:
  2556. if(relative._offset$i$1 > 0)
  2557. return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1);
  2558. break;
  2559. default:
  2560. break
  2561. }
  2562. return sentDate
  2563. };
  2564. $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag)
  2565. {
  2566. if(offset > -5 && offset < 5)
  2567. {
  2568. var dayOfWeek;
  2569. var days;
  2570. dayOfWeek=(tag+6) % 7+1;
  2571. days=7 * offset+(dayOfWeek - sentDate["getDay"]());
  2572. sentDate["setDate"](sentDate["getDate"]()+days);
  2573. return sentDate
  2574. }
  2575. else
  2576. {
  2577. var days=(tag - sentDate["getDay"]()) % 7;
  2578. if(days < 0)
  2579. days+=7;
  2580. sentDate["setDate"](sentDate["getDate"]()+days);
  2581. return sentDate
  2582. }
  2583. };
  2584. $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative)
  2585. {
  2586. var date;
  2587. var firstDay;
  2588. var newDate;
  2589. date=sentDate;
  2590. if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5)
  2591. return sentDate;
  2592. var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12;
  2593. firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1);
  2594. if(relative._modifier$i$1===1)
  2595. if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]())
  2596. return firstDay;
  2597. else
  2598. {
  2599. newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]());
  2600. newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7);
  2601. if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1)
  2602. newDate["setDate"](newDate["getDate"]() - 7);
  2603. newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1));
  2604. if(newDate["getMonth"]()+1 !==relative._tag$i$1)
  2605. return sentDate;
  2606. return newDate
  2607. }
  2608. else
  2609. {
  2610. newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]()));
  2611. var offset=1 - newDate["getDay"]();
  2612. if(offset > 0)
  2613. offset=offset - 7;
  2614. newDate["setDate"](newDate["getDate"]()+offset);
  2615. newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1));
  2616. if(newDate["getMonth"]()+1 !==relative._tag$i$1)
  2617. if(firstDay["getDay"]() !==6 && firstDay["getDay"]())
  2618. return firstDay;
  2619. else
  2620. return sentDate;
  2621. else
  2622. return newDate
  2623. }
  2624. };
  2625. $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, date, time)
  2626. {
  2627. var DateValueMask=32767;
  2628. date.val=null;
  2629. time.val=0;
  2630. if(!inDate)
  2631. return false;
  2632. time.val=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate);
  2633. var inDateAtMidnight=inDate["getTime"]() - time.val;
  2634. var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5;
  2635. if(value < 0)
  2636. return false;
  2637. else if(value >=262144)
  2638. return false;
  2639. else
  2640. {
  2641. var type=value >> 15;
  2642. value=value & DateValueMask;
  2643. switch(type)
  2644. {
  2645. case 0:
  2646. return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date);
  2647. case 1:
  2648. return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date);
  2649. default:
  2650. return false
  2651. }
  2652. }
  2653. };
  2654. $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date)
  2655. {
  2656. var c_SubTypeMask=7;
  2657. var c_MonthMask=15;
  2658. var c_DayMask=31;
  2659. var c_YearMask=127;
  2660. var year=null;
  2661. var month=0;
  2662. var day=0;
  2663. date.val=null;
  2664. var subType=value >> 12 & c_SubTypeMask;
  2665. if((subType & 4)===4)
  2666. {
  2667. year=value >> 5 & c_YearMask;
  2668. if((subType & 2)===2)
  2669. {
  2670. if((subType & 1)===1)
  2671. return false;
  2672. month=value >> 1 & c_MonthMask
  2673. }
  2674. }
  2675. else
  2676. {
  2677. if((subType & 2)===2)
  2678. month=value >> 8 & c_MonthMask;
  2679. if((subType & 1)===1)
  2680. day=value >> 3 & c_DayMask
  2681. }
  2682. date.val=new $h._preciseDate(day,month,year);
  2683. return true
  2684. };
  2685. $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date)
  2686. {
  2687. var TagMask=15;
  2688. var OffsetMask=63;
  2689. var UnitMask=7;
  2690. var ModifierMask=3;
  2691. var tag=value & TagMask;
  2692. value >>=4;
  2693. var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6);
  2694. value >>=6;
  2695. var unit=value & UnitMask;
  2696. value >>=3;
  2697. var modifier=value & ModifierMask;
  2698. try
  2699. {
  2700. date.val=new $h._relativeDate(modifier,offset,unit,tag);
  2701. return true
  2702. }
  2703. catch($$e_A)
  2704. {
  2705. date.val=null;
  2706. return false
  2707. }
  2708. };
  2709. $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n)
  2710. {
  2711. var signed=1 << n - 1;
  2712. var mask=(1 << n) - 1;
  2713. if((value & signed)===signed)
  2714. return-((value ^ mask)+1);
  2715. else
  2716. return value
  2717. };
  2718. $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year)
  2719. {
  2720. return 32 - new Date(year,month,32)["getDate"]()
  2721. };
  2722. $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime)
  2723. {
  2724. var timeOfDay=0;
  2725. timeOfDay+=inputTime["getUTCHours"]() * 3600;
  2726. timeOfDay+=inputTime["getUTCMinutes"]() * 60;
  2727. timeOfDay+=inputTime["getUTCSeconds"]();
  2728. timeOfDay *=1e3;
  2729. timeOfDay+=inputTime["getUTCMilliseconds"]();
  2730. return timeOfDay
  2731. };
  2732. $h._extractedDate=function(){};
  2733. $h._preciseDate=function(day, month, year)
  2734. {
  2735. $h._preciseDate.initializeBase(this);
  2736. if(day < 0 || day > 31)
  2737. throw Error.argumentOutOfRange("day");
  2738. if(month < 0 || month > 12)
  2739. throw Error.argumentOutOfRange("month");
  2740. this._day$i$1=day;
  2741. this._month$i$1=month;
  2742. if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year))
  2743. {
  2744. if(!month && day)
  2745. throw Error.argument("Invalid arguments");
  2746. if(year < 0 || year > 2099)
  2747. throw Error.argumentOutOfRange("year");
  2748. this._year$i$1=year % 100
  2749. }
  2750. else if(!this._month$i$1 && !this._day$i$1)
  2751. throw Error.argument("Invalid datetime");
  2752. };
  2753. $h._preciseDate.prototype={
  2754. _day$i$1: 0,
  2755. _month$i$1: 0,
  2756. _year$i$1: null
  2757. };
  2758. $h._relativeDate=function(modifier, offset, unit, tag)
  2759. {
  2760. $h._relativeDate.initializeBase(this);
  2761. if(offset < -32 || offset > 31)
  2762. throw Error.argumentOutOfRange("offset");
  2763. if(tag < 0 || tag > 15)
  2764. throw Error.argumentOutOfRange("tag");
  2765. if(!unit && offset < 0)
  2766. throw Error.argument("unit & offset do not form a valid date");
  2767. this._modifier$i$1=modifier;
  2768. this._offset$i$1=offset;
  2769. this._unit$i$1=unit;
  2770. this._tag$i$1=tag
  2771. };
  2772. $h._relativeDate.prototype={
  2773. _modifier$i$1: 0,
  2774. _offset$i$1: 0,
  2775. _unit$i$1: 0,
  2776. _tag$i$1: 0
  2777. };
  2778. $h.Message=function(dataDictionary)
  2779. {
  2780. this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);
  2781. this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2);
  2782. this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);
  2783. this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);
  2784. this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2);
  2785. this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2);
  2786. this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);
  2787. this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);
  2788. $h.Message.initializeBase(this,[dataDictionary]);
  2789. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);
  2790. $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);
  2791. $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2);
  2792. $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2);
  2793. $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);
  2794. $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);
  2795. $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2);
  2796. $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)
  2797. };
  2798. $h.Message.prototype={
  2799. getEntities: function()
  2800. {
  2801. return this._data$p$0._getEntities$i$0()
  2802. },
  2803. getEntitiesByType: function(entityType)
  2804. {
  2805. return this._data$p$0._getEntitiesByType$i$0(entityType)
  2806. },
  2807. getFilteredEntitiesByName: function(name)
  2808. {
  2809. return this._data$p$0._getFilteredEntitiesByName$i$0(name)
  2810. },
  2811. getRegExMatches: function()
  2812. {
  2813. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");
  2814. return this._data$p$0._getRegExMatches$i$0()
  2815. },
  2816. getRegExMatchesByName: function(name)
  2817. {
  2818. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");
  2819. return this._data$p$0._getRegExMatchesByName$i$0(name)
  2820. },
  2821. displayReplyForm: function(obj)
  2822. {
  2823. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj)
  2824. },
  2825. displayReplyAllForm: function(obj)
  2826. {
  2827. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj)
  2828. },
  2829. getItemType: function()
  2830. {
  2831. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"]
  2832. },
  2833. _getSubject$p$2: function()
  2834. {
  2835. return this._data$p$0.get__subject$i$0()
  2836. },
  2837. _getNormalizedSubject$p$2: function()
  2838. {
  2839. return this._data$p$0.get__normalizedSubject$i$0()
  2840. },
  2841. _getSender$p$2: function()
  2842. {
  2843. return this._data$p$0.get__sender$i$0()
  2844. },
  2845. _getFrom$p$2: function()
  2846. {
  2847. return this._data$p$0.get__from$i$0()
  2848. },
  2849. _getTo$p$2: function()
  2850. {
  2851. return this._data$p$0.get__to$i$0()
  2852. },
  2853. _getCc$p$2: function()
  2854. {
  2855. return this._data$p$0.get__cc$i$0()
  2856. },
  2857. _getInternetMessageId$p$2: function()
  2858. {
  2859. return this._data$p$0.get__internetMessageId$i$0()
  2860. },
  2861. _getConversationId$p$2: function()
  2862. {
  2863. return this._data$p$0.get__conversationId$i$0()
  2864. }
  2865. };
  2866. $h.MessageCompose=function(data)
  2867. {
  2868. this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);
  2869. this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2);
  2870. this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);
  2871. this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);
  2872. $h.MessageCompose.initializeBase(this,[data]);
  2873. $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);
  2874. $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);
  2875. $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2);
  2876. $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)
  2877. };
  2878. $h.MessageCompose.prototype={
  2879. _to$p$2: null,
  2880. _cc$p$2: null,
  2881. _bcc$p$2: null,
  2882. getItemType: function()
  2883. {
  2884. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"]
  2885. },
  2886. _getTo$p$2: function()
  2887. {
  2888. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  2889. if(!this._to$p$2)
  2890. this._to$p$2=new $h.ComposeRecipient(0,"to");
  2891. return this._to$p$2
  2892. },
  2893. _getCc$p$2: function()
  2894. {
  2895. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  2896. if(!this._cc$p$2)
  2897. this._cc$p$2=new $h.ComposeRecipient(1,"cc");
  2898. return this._cc$p$2
  2899. },
  2900. _getBcc$p$2: function()
  2901. {
  2902. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  2903. if(!this._bcc$p$2)
  2904. this._bcc$p$2=new $h.ComposeRecipient(2,"bcc");
  2905. return this._bcc$p$2
  2906. },
  2907. _getConversationId$p$2: function()
  2908. {
  2909. return this._data$p$0.get__conversationId$i$0()
  2910. }
  2911. };
  2912. $h.NotificationMessages=function(){};
  2913. $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost)
  2914. {
  2915. var notificationType;
  2916. var hostItemNotificationMessageType;
  2917. notificationType=dataToHost["type"];
  2918. if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"])
  2919. hostItemNotificationMessageType=1;
  2920. else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"])
  2921. hostItemNotificationMessageType=0;
  2922. else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"])
  2923. hostItemNotificationMessageType=2;
  2924. else
  2925. throw Error.argument("type");
  2926. dataToHost["type"]=hostItemNotificationMessageType
  2927. };
  2928. $h.NotificationMessages._validateKey$p=function(key)
  2929. {
  2930. if(!$h.ScriptHelpers.isNonEmptyString(key))
  2931. throw Error.argument("key");
  2932. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key["length"],0,32,"key")
  2933. };
  2934. $h.NotificationMessages._validateDictionary$p=function(dictionary)
  2935. {
  2936. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"]))
  2937. throw Error.argument("type");
  2938. if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"])
  2939. {
  2940. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"]))
  2941. throw Error.argument("icon");
  2942. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"]["length"],0,32,"icon");
  2943. if($h.ScriptHelpers.isUndefined(dictionary["persistent"]))
  2944. throw Error.argument("persistent");
  2945. if(!Boolean.isInstanceOfType(dictionary["persistent"]))
  2946. throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean);
  2947. }
  2948. else
  2949. {
  2950. if(!$h.ScriptHelpers.isUndefined(dictionary["icon"]))
  2951. throw Error.argument("icon");
  2952. if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"]))
  2953. throw Error.argument("persistent");
  2954. }
  2955. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"]))
  2956. throw Error.argument("message");
  2957. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"]["length"],0,150,"message")
  2958. };
  2959. $h.NotificationMessages.prototype={
  2960. addAsync: function(key, dictionary)
  2961. {
  2962. var args=[];
  2963. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  2964. args[$$pai_5 - 2]=arguments[$$pai_5];
  2965. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync");
  2966. var commonParameters=$h.CommonParameters.parse(args,false);
  2967. $h.NotificationMessages._validateKey$p(key);
  2968. $h.NotificationMessages._validateDictionary$p(dictionary);
  2969. var dataToHost={};
  2970. dataToHost=$h.ScriptHelpers.deepClone(dictionary);
  2971. dataToHost["key"]=key;
  2972. $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost);
  2973. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  2974. },
  2975. getAllAsync: function()
  2976. {
  2977. var args=[];
  2978. for(var $$pai_2=0; $$pai_2 < arguments.length;++$$pai_2)
  2979. args[$$pai_2]=arguments[$$pai_2];
  2980. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync");
  2981. var commonParameters=$h.CommonParameters.parse(args,true);
  2982. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  2983. },
  2984. replaceAsync: function(key, dictionary)
  2985. {
  2986. var args=[];
  2987. for(var $$pai_5=2; $$pai_5 < arguments.length;++$$pai_5)
  2988. args[$$pai_5 - 2]=arguments[$$pai_5];
  2989. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync");
  2990. var commonParameters=$h.CommonParameters.parse(args,false);
  2991. $h.NotificationMessages._validateKey$p(key);
  2992. $h.NotificationMessages._validateDictionary$p(dictionary);
  2993. var dataToHost={};
  2994. dataToHost=$h.ScriptHelpers.deepClone(dictionary);
  2995. dataToHost["key"]=key;
  2996. $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost);
  2997. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  2998. },
  2999. removeAsync: function(key)
  3000. {
  3001. var args=[];
  3002. for(var $$pai_4=1; $$pai_4 < arguments.length;++$$pai_4)
  3003. args[$$pai_4 - 1]=arguments[$$pai_4];
  3004. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync");
  3005. var commonParameters=$h.CommonParameters.parse(args,false);
  3006. $h.NotificationMessages._validateKey$p(key);
  3007. var dataToHost={key: key};
  3008. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  3009. }
  3010. };
  3011. $h.OutlookErrorManager=function(){};
  3012. $h.OutlookErrorManager.getErrorArgs=function(errorCode)
  3013. {
  3014. if(!$h.OutlookErrorManager._isInitialized$p)
  3015. $h.OutlookErrorManager._initialize$p();
  3016. return window["OSF"]["DDA"]["ErrorCodeManager"]["getErrorArgs"](errorCode)
  3017. };
  3018. $h.OutlookErrorManager._initialize$p=function()
  3019. {
  3020. $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]);
  3021. $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]);
  3022. $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]);
  3023. $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]);
  3024. $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]);
  3025. $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]);
  3026. $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]);
  3027. $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]);
  3028. $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]);
  3029. $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]);
  3030. $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]);
  3031. $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]);
  3032. $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500));
  3033. $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]);
  3034. $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]);
  3035. $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]);
  3036. $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted","");
  3037. $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError","");
  3038. $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError","");
  3039. $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError","");
  3040. $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]);
  3041. $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]);
  3042. $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]);
  3043. $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]);
  3044. $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]);
  3045. $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]);
  3046. $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]);
  3047. $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]);
  3048. $h.OutlookErrorManager._isInitialized$p=true
  3049. };
  3050. $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage)
  3051. {
  3052. window["OSF"]["DDA"]["ErrorCodeManager"]["addErrorMessage"](errorCode,{
  3053. name: errorName,
  3054. message: errorMessage
  3055. })
  3056. };
  3057. $h.OutlookErrorManager.OutlookErrorCodes=function(){};
  3058. $h.OutlookErrorManager.OsfDdaErrorCodes=function(){};
  3059. $h.PhoneNumber=function(data)
  3060. {
  3061. this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0);
  3062. this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0);
  3063. this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0);
  3064. this._data$p$0=data;
  3065. $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0);
  3066. $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0);
  3067. $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0)
  3068. };
  3069. $h.PhoneNumber.prototype={
  3070. _data$p$0: null,
  3071. _getPhoneString$p$0: function()
  3072. {
  3073. return this._data$p$0["PhoneString"]
  3074. },
  3075. _getOriginalPhoneString$p$0: function()
  3076. {
  3077. return this._data$p$0["OriginalPhoneString"]
  3078. },
  3079. _getPhoneType$p$0: function()
  3080. {
  3081. return this._data$p$0["Type"]
  3082. }
  3083. };
  3084. $h.TaskSuggestion=function(data)
  3085. {
  3086. this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0);
  3087. this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0);
  3088. this._data$p$0=data;
  3089. $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0);
  3090. $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0)
  3091. };
  3092. $h.TaskSuggestion.prototype={
  3093. _data$p$0: null,
  3094. _assignees$p$0: null,
  3095. _getTaskString$p$0: function()
  3096. {
  3097. return this._data$p$0["TaskString"]
  3098. },
  3099. _getAssignees$p$0: function()
  3100. {
  3101. if(!this._assignees$p$0)
  3102. {
  3103. var $$t_1=this;
  3104. this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data)
  3105. {
  3106. return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data)
  3107. })
  3108. }
  3109. return this._assignees$p$0
  3110. }
  3111. };
  3112. $h.UserProfile=function(data)
  3113. {
  3114. this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0);
  3115. this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0);
  3116. this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);
  3117. this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);
  3118. this._data$p$0=data;
  3119. $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);
  3120. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);
  3121. $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0);
  3122. $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0)
  3123. };
  3124. $h.UserProfile.prototype={
  3125. _data$p$0: null,
  3126. _getUserProfileType$p$0: function()
  3127. {
  3128. return this._data$p$0.get__userProfileType$i$0()
  3129. },
  3130. _getDisplayName$p$0: function()
  3131. {
  3132. return this._data$p$0.get__userDisplayName$i$0()
  3133. },
  3134. _getEmailAddress$p$0: function()
  3135. {
  3136. return this._data$p$0.get__userEmailAddress$i$0()
  3137. },
  3138. _getTimeZone$p$0: function()
  3139. {
  3140. return this._data$p$0.get__userTimeZone$i$0()
  3141. }
  3142. };
  3143. $h.OutlookDispid=function(){};
  3144. $h.OutlookDispid.prototype={
  3145. owaOnlyMethod: 0,
  3146. getInitialData: 1,
  3147. getUserIdentityToken: 2,
  3148. loadCustomProperties: 3,
  3149. saveCustomProperties: 4,
  3150. ewsRequest: 5,
  3151. displayNewAppointmentForm: 7,
  3152. displayMessageForm: 8,
  3153. displayAppointmentForm: 9,
  3154. displayReplyForm: 10,
  3155. displayReplyAllForm: 11,
  3156. getCallbackToken: 12,
  3157. bodySetSelectedDataAsync: 13,
  3158. getBodyTypeAsync: 14,
  3159. getRecipientsAsync: 15,
  3160. addFileAttachmentAsync: 16,
  3161. setSubjectAsync: 17,
  3162. getSubjectAsync: 18,
  3163. addItemAttachmentAsync: 19,
  3164. removeAttachmentAsync: 20,
  3165. setRecipientsAsync: 21,
  3166. addRecipientsAsync: 22,
  3167. bodyPrependAsync: 23,
  3168. getTimeAsync: 24,
  3169. setTimeAsync: 25,
  3170. getLocationAsync: 26,
  3171. setLocationAsync: 27,
  3172. getSelectedDataAsync: 28,
  3173. setSelectedDataAsync: 29,
  3174. displayReplyFormWithAttachments: 30,
  3175. displayReplyAllFormWithAttachments: 31,
  3176. saveAsync: 32,
  3177. addNotficationMessageAsync: 33,
  3178. getAllNotficationMessagesAsync: 34,
  3179. replaceNotficationMessageAsync: 35,
  3180. removeNotficationMessageAsync: 36,
  3181. getBodyAsync: 37,
  3182. setBodyAsync: 38,
  3183. appCommands1: 39,
  3184. registerConsentAsync: 40,
  3185. close: 41,
  3186. closeApp: 42,
  3187. displayContactCardAsync: 43,
  3188. displayNewMessageForm: 44,
  3189. appCommands2: 94,
  3190. trackCtq: 400,
  3191. recordTrace: 401,
  3192. recordDataPoint: 402,
  3193. windowOpenOverrideHandler: 403,
  3194. saveSettingsRequest: 404
  3195. };
  3196. $h.OutlookDispid.registerEnum("$h.OutlookDispid",false);
  3197. $h.RequestState=function(){};
  3198. $h.RequestState.prototype={
  3199. unsent: 0,
  3200. opened: 1,
  3201. headersReceived: 2,
  3202. loading: 3,
  3203. done: 4
  3204. };
  3205. $h.RequestState.registerEnum("$h.RequestState",false);
  3206. $h.CommonParameters=function(options, callback, asyncContext)
  3207. {
  3208. this._options$p$0=options;
  3209. this._callback$p$0=callback;
  3210. this._asyncContext$p$0=asyncContext
  3211. };
  3212. $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy)
  3213. {
  3214. var legacyParameters;
  3215. var $$t_8,
  3216. $$t_9;
  3217. if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9))
  3218. return legacyParameters;
  3219. var argsLength=args.length;
  3220. var options=null;
  3221. var callback=null;
  3222. var asyncContext=null;
  3223. if(argsLength===1)
  3224. if(Function.isInstanceOfType(args[0]))
  3225. callback=args[0];
  3226. else if(Object.isInstanceOfType(args[0]))
  3227. options=args[0];
  3228. else
  3229. throw Error.argumentType();
  3230. else if(argsLength===2)
  3231. {
  3232. if(!Object.isInstanceOfType(args[0]))
  3233. throw Error.argument("options");
  3234. if(!Function.isInstanceOfType(args[1]))
  3235. throw Error.argument("callback");
  3236. options=args[0];
  3237. callback=args[1]
  3238. }
  3239. else if(argsLength)
  3240. throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]);
  3241. if(isCallbackRequired && !callback)
  3242. throw Error.argumentNull("callback");
  3243. if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"]))
  3244. asyncContext=options["asyncContext"];
  3245. return new $h.CommonParameters(options,callback,asyncContext)
  3246. };
  3247. $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters)
  3248. {
  3249. commonParameters.val=null;
  3250. var argsLength=args.length;
  3251. var callback=null;
  3252. var userContext=null;
  3253. if(!argsLength || argsLength > 2)
  3254. return false;
  3255. if(!Function.isInstanceOfType(args[0]))
  3256. return false;
  3257. callback=args[0];
  3258. if(argsLength > 1)
  3259. userContext=args[1];
  3260. commonParameters.val=new $h.CommonParameters(null,callback,userContext);
  3261. return true
  3262. };
  3263. $h.CommonParameters.prototype={
  3264. _options$p$0: null,
  3265. _callback$p$0: null,
  3266. _asyncContext$p$0: null,
  3267. get_options: function()
  3268. {
  3269. return this._options$p$0
  3270. },
  3271. get_callback: function()
  3272. {
  3273. return this._callback$p$0
  3274. },
  3275. get_asyncContext: function()
  3276. {
  3277. return this._asyncContext$p$0
  3278. }
  3279. };
  3280. $h.EwsRequest=function(userContext)
  3281. {
  3282. $h.EwsRequest.initializeBase(this,[userContext])
  3283. };
  3284. $h.EwsRequest.prototype={
  3285. readyState: 1,
  3286. status: 0,
  3287. statusText: null,
  3288. onreadystatechange: null,
  3289. responseText: null,
  3290. get__statusCode$i$1: function()
  3291. {
  3292. return this.status
  3293. },
  3294. set__statusCode$i$1: function(value)
  3295. {
  3296. this.status=value;
  3297. return value
  3298. },
  3299. get__statusDescription$i$1: function()
  3300. {
  3301. return this.statusText
  3302. },
  3303. set__statusDescription$i$1: function(value)
  3304. {
  3305. this.statusText=value;
  3306. return value
  3307. },
  3308. get__requestState$i$1: function()
  3309. {
  3310. return this.readyState
  3311. },
  3312. set__requestState$i$1: function(value)
  3313. {
  3314. this.readyState=value;
  3315. return value
  3316. },
  3317. get_hasOnReadyStateChangeCallback: function()
  3318. {
  3319. return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)
  3320. },
  3321. get__response$i$1: function()
  3322. {
  3323. return this.responseText
  3324. },
  3325. set__response$i$1: function(value)
  3326. {
  3327. this.responseText=value;
  3328. return value
  3329. },
  3330. send: function(data)
  3331. {
  3332. this._checkSendConditions$i$1();
  3333. if($h.ScriptHelpers.isNullOrUndefined(data))
  3334. this._throwInvalidStateException$i$1();
  3335. this._sendRequest$i$0(5,"EwsRequest",{body: data})
  3336. },
  3337. _callOnReadyStateChangeCallback$i$1: function()
  3338. {
  3339. if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange))
  3340. this.onreadystatechange()
  3341. },
  3342. _parseExtraResponseData$i$1: function(response){},
  3343. executeExtraFailedResponseSteps: function(){}
  3344. };
  3345. $h.InitialData=function(data)
  3346. {
  3347. this._data$p$0=data;
  3348. this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()
  3349. };
  3350. $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter)
  3351. {
  3352. var propertyDescriptor={
  3353. get: getter,
  3354. configurable: false
  3355. };
  3356. Object.defineProperty(o,methodName,propertyDescriptor)
  3357. };
  3358. $h.InitialData.prototype={
  3359. _toRecipients$p$0: null,
  3360. _ccRecipients$p$0: null,
  3361. _attachments$p$0: null,
  3362. _resources$p$0: null,
  3363. _entities$p$0: null,
  3364. _data$p$0: null,
  3365. _permissionLevel$p$0: 0,
  3366. get__isRestIdSupported$i$0: function()
  3367. {
  3368. return this._data$p$0["isRestIdSupported"]
  3369. },
  3370. get__itemId$i$0: function()
  3371. {
  3372. return this._data$p$0["id"]
  3373. },
  3374. get__itemClass$i$0: function()
  3375. {
  3376. return this._data$p$0["itemClass"]
  3377. },
  3378. get__dateTimeCreated$i$0: function()
  3379. {
  3380. return new Date(this._data$p$0["dateTimeCreated"])
  3381. },
  3382. get__dateTimeModified$i$0: function()
  3383. {
  3384. return new Date(this._data$p$0["dateTimeModified"])
  3385. },
  3386. get__dateTimeSent$i$0: function()
  3387. {
  3388. return new Date(this._data$p$0["dateTimeSent"])
  3389. },
  3390. get__subject$i$0: function()
  3391. {
  3392. this._throwOnRestrictedPermissionLevel$i$0();
  3393. return this._data$p$0["subject"]
  3394. },
  3395. get__normalizedSubject$i$0: function()
  3396. {
  3397. this._throwOnRestrictedPermissionLevel$i$0();
  3398. return this._data$p$0["normalizedSubject"]
  3399. },
  3400. get__internetMessageId$i$0: function()
  3401. {
  3402. return this._data$p$0["internetMessageId"]
  3403. },
  3404. get__conversationId$i$0: function()
  3405. {
  3406. return this._data$p$0["conversationId"]
  3407. },
  3408. get__sender$i$0: function()
  3409. {
  3410. this._throwOnRestrictedPermissionLevel$i$0();
  3411. var sender=this._data$p$0["sender"];
  3412. return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender)
  3413. },
  3414. get__from$i$0: function()
  3415. {
  3416. this._throwOnRestrictedPermissionLevel$i$0();
  3417. var from=this._data$p$0["from"];
  3418. return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from)
  3419. },
  3420. get__to$i$0: function()
  3421. {
  3422. this._throwOnRestrictedPermissionLevel$i$0();
  3423. if(null===this._toRecipients$p$0)
  3424. this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to");
  3425. return this._toRecipients$p$0
  3426. },
  3427. get__cc$i$0: function()
  3428. {
  3429. this._throwOnRestrictedPermissionLevel$i$0();
  3430. if(null===this._ccRecipients$p$0)
  3431. this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc");
  3432. return this._ccRecipients$p$0
  3433. },
  3434. get__attachments$i$0: function()
  3435. {
  3436. this._throwOnRestrictedPermissionLevel$i$0();
  3437. if(null===this._attachments$p$0)
  3438. this._attachments$p$0=this._createAttachmentDetails$p$0();
  3439. return this._attachments$p$0
  3440. },
  3441. get__ewsUrl$i$0: function()
  3442. {
  3443. return this._data$p$0["ewsUrl"]
  3444. },
  3445. get__marketplaceAssetId$i$0: function()
  3446. {
  3447. return this._data$p$0["marketplaceAssetId"]
  3448. },
  3449. get__extensionId$i$0: function()
  3450. {
  3451. return this._data$p$0["extensionId"]
  3452. },
  3453. get__marketplaceContentMarket$i$0: function()
  3454. {
  3455. return this._data$p$0["marketplaceContentMarket"]
  3456. },
  3457. get__consentMetadata$i$0: function()
  3458. {
  3459. return this._data$p$0["consentMetadata"]
  3460. },
  3461. get__isRead$i$0: function()
  3462. {
  3463. return this._data$p$0["isRead"]
  3464. },
  3465. get__endNodeUrl$i$0: function()
  3466. {
  3467. return this._data$p$0["endNodeUrl"]
  3468. },
  3469. get__entryPointUrl$i$0: function()
  3470. {
  3471. return this._data$p$0["entryPointUrl"]
  3472. },
  3473. get__start$i$0: function()
  3474. {
  3475. return new Date(this._data$p$0["start"])
  3476. },
  3477. get__end$i$0: function()
  3478. {
  3479. return new Date(this._data$p$0["end"])
  3480. },
  3481. get__location$i$0: function()
  3482. {
  3483. return this._data$p$0["location"]
  3484. },
  3485. get__userProfileType$i$0: function()
  3486. {
  3487. return this._data$p$0["userProfileType"]
  3488. },
  3489. get__resources$i$0: function()
  3490. {
  3491. this._throwOnRestrictedPermissionLevel$i$0();
  3492. if(null===this._resources$p$0)
  3493. this._resources$p$0=this._createEmailAddressDetails$p$0("resources");
  3494. return this._resources$p$0
  3495. },
  3496. get__organizer$i$0: function()
  3497. {
  3498. this._throwOnRestrictedPermissionLevel$i$0();
  3499. var organizer=this._data$p$0["organizer"];
  3500. return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer)
  3501. },
  3502. get__userDisplayName$i$0: function()
  3503. {
  3504. return this._data$p$0["userDisplayName"]
  3505. },
  3506. get__userEmailAddress$i$0: function()
  3507. {
  3508. return this._data$p$0["userEmailAddress"]
  3509. },
  3510. get__userTimeZone$i$0: function()
  3511. {
  3512. return this._data$p$0["userTimeZone"]
  3513. },
  3514. get__timeZoneOffsets$i$0: function()
  3515. {
  3516. return this._data$p$0["timeZoneOffsets"]
  3517. },
  3518. get__hostVersion$i$0: function()
  3519. {
  3520. return this._data$p$0["hostVersion"]
  3521. },
  3522. get__owaView$i$0: function()
  3523. {
  3524. return this._data$p$0["owaView"]
  3525. },
  3526. get__overrideWindowOpen$i$0: function()
  3527. {
  3528. return this._data$p$0["overrideWindowOpen"]
  3529. },
  3530. _getEntities$i$0: function()
  3531. {
  3532. if(!this._entities$p$0)
  3533. this._entities$p$0=new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0);
  3534. return this._entities$p$0
  3535. },
  3536. _getEntitiesByType$i$0: function(entityType)
  3537. {
  3538. var entites=this._getEntities$i$0();
  3539. return entites._getByType$i$0(entityType)
  3540. },
  3541. _getFilteredEntitiesByName$i$0: function(name)
  3542. {
  3543. var entities=this._getEntities$i$0();
  3544. return entities._getFilteredEntitiesByName$i$0(name)
  3545. },
  3546. _getRegExMatches$i$0: function()
  3547. {
  3548. if(!this._data$p$0["regExMatches"])
  3549. return null;
  3550. return this._data$p$0["regExMatches"]
  3551. },
  3552. _getRegExMatchesByName$i$0: function(regexName)
  3553. {
  3554. var regexMatches=this._getRegExMatches$i$0();
  3555. if(!regexMatches || !regexMatches[regexName])
  3556. return null;
  3557. return regexMatches[regexName]
  3558. },
  3559. _throwOnRestrictedPermissionLevel$i$0: function()
  3560. {
  3561. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)
  3562. },
  3563. _createEmailAddressDetails$p$0: function(key)
  3564. {
  3565. var to=this._data$p$0[key];
  3566. if($h.ScriptHelpers.isNullOrUndefined(to))
  3567. return[];
  3568. var recipients=[];
  3569. for(var i=0; i < to["length"]; i++)
  3570. if(!$h.ScriptHelpers.isNullOrUndefined(to[i]))
  3571. recipients[i]=new $h.EmailAddressDetails(to[i]);
  3572. return recipients
  3573. },
  3574. _createAttachmentDetails$p$0: function()
  3575. {
  3576. var attachments=this._data$p$0["attachments"];
  3577. if($h.ScriptHelpers.isNullOrUndefined(attachments))
  3578. return[];
  3579. var attachmentDetails=[];
  3580. for(var i=0; i < attachments["length"]; i++)
  3581. if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i]))
  3582. attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]);
  3583. return attachmentDetails
  3584. },
  3585. _calculatePermissionLevel$p$0: function()
  3586. {
  3587. var HostReadItem=1;
  3588. var HostReadWriteMailbox=2;
  3589. var HostReadWriteItem=3;
  3590. var permissionLevelFromHost=this._data$p$0["permissionLevel"];
  3591. if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0))
  3592. return 0;
  3593. switch(permissionLevelFromHost)
  3594. {
  3595. case HostReadItem:
  3596. return 1;
  3597. case HostReadWriteItem:
  3598. return 2;
  3599. case HostReadWriteMailbox:
  3600. return 3;
  3601. default:
  3602. return 0
  3603. }
  3604. }
  3605. };
  3606. $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext)
  3607. {
  3608. $h._loadDictionaryRequest.initializeBase(this,[userContext]);
  3609. this._createResultObject$p$1=createResultObject;
  3610. this._dictionaryName$p$1=dictionaryName;
  3611. this._callback$p$1=callback
  3612. };
  3613. $h._loadDictionaryRequest.prototype={
  3614. _dictionaryName$p$1: null,
  3615. _createResultObject$p$1: null,
  3616. _callback$p$1: null,
  3617. handleResponse: function(response)
  3618. {
  3619. if(response["wasSuccessful"])
  3620. {
  3621. var value=response[this._dictionaryName$p$1];
  3622. var responseData=window["JSON"]["parse"](value);
  3623. this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null)
  3624. }
  3625. else
  3626. this.createAsyncResult(null,1,9020,response["errorMessage"]);
  3627. this._callback$p$1(this._asyncResult$p$0)
  3628. }
  3629. };
  3630. $h.ProxyRequestBase=function(userContext)
  3631. {
  3632. $h.ProxyRequestBase.initializeBase(this,[userContext])
  3633. };
  3634. $h.ProxyRequestBase.prototype={
  3635. handleResponse: function(response)
  3636. {
  3637. if(!response["wasProxySuccessful"])
  3638. {
  3639. this.set__statusCode$i$1(500);
  3640. this.set__statusDescription$i$1("Error");
  3641. var errorMessage=response["errorMessage"];
  3642. this.set__response$i$1(errorMessage);
  3643. this.createAsyncResult(null,1,9020,errorMessage)
  3644. }
  3645. else
  3646. {
  3647. this.set__statusCode$i$1(response["statusCode"]);
  3648. this.set__statusDescription$i$1(response["statusDescription"]);
  3649. this.set__response$i$1(response["body"]);
  3650. this.createAsyncResult(this.get__response$i$1(),0,0,null)
  3651. }
  3652. this._parseExtraResponseData$i$1(response);
  3653. this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1()
  3654. },
  3655. _throwInvalidStateException$i$1: function()
  3656. {
  3657. throw Error.create("DOMException",{
  3658. code: 11,
  3659. message: "INVALID_STATE_ERR"
  3660. });
  3661. },
  3662. _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function()
  3663. {
  3664. var $$t_0=this;
  3665. this._changeReadyState$i$1(2,function()
  3666. {
  3667. $$t_0._changeReadyState$i$1(3,function()
  3668. {
  3669. $$t_0._changeReadyState$i$1(4,null)
  3670. })
  3671. })
  3672. },
  3673. _changeReadyState$i$1: function(state, nextStep)
  3674. {
  3675. this.set__requestState$i$1(state);
  3676. var $$t_2=this;
  3677. window.setTimeout(function()
  3678. {
  3679. try
  3680. {
  3681. $$t_2._callOnReadyStateChangeCallback$i$1()
  3682. }
  3683. finally
  3684. {
  3685. if(!$h.ScriptHelpers.isNullOrUndefined(nextStep))
  3686. nextStep()
  3687. }
  3688. },0)
  3689. },
  3690. _checkSendConditions$i$1: function()
  3691. {
  3692. if(this.get__requestState$i$1() !==1)
  3693. this._throwInvalidStateException$i$1();
  3694. if(this._isSent$p$0)
  3695. this._throwInvalidStateException$i$1()
  3696. }
  3697. };
  3698. $h.RequestBase=function(userContext)
  3699. {
  3700. this._userContext$p$0=userContext
  3701. };
  3702. $h.RequestBase.prototype={
  3703. _isSent$p$0: false,
  3704. _asyncResult$p$0: null,
  3705. _userContext$p$0: null,
  3706. get_asyncResult: function()
  3707. {
  3708. return this._asyncResult$p$0
  3709. },
  3710. _sendRequest$i$0: function(dispid, methodName, dataToSend)
  3711. {
  3712. this._isSent$p$0=true;
  3713. var $$t_5=this;
  3714. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response)
  3715. {
  3716. if(resultCode)
  3717. $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  3718. else
  3719. $$t_5.handleResponse(response)
  3720. })
  3721. },
  3722. createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription)
  3723. {
  3724. this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription)
  3725. }
  3726. };
  3727. $h.SaveDictionaryRequest=function(callback, userContext)
  3728. {
  3729. $h.SaveDictionaryRequest.initializeBase(this,[userContext]);
  3730. if(!$h.ScriptHelpers.isNullOrUndefined(callback))
  3731. this._callback$p$1=callback
  3732. };
  3733. $h.SaveDictionaryRequest.prototype={
  3734. _callback$p$1: null,
  3735. handleResponse: function(response)
  3736. {
  3737. if(response["wasSuccessful"])
  3738. this.createAsyncResult(null,0,0,null);
  3739. else
  3740. this.createAsyncResult(null,1,9020,response["errorMessage"]);
  3741. if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1))
  3742. this._callback$p$1(this._asyncResult$p$0)
  3743. }
  3744. };
  3745. $h.ScriptHelpers=function(){};
  3746. $h.ScriptHelpers.isNull=function(value)
  3747. {
  3748. return null===value
  3749. };
  3750. $h.ScriptHelpers.isNullOrUndefined=function(value)
  3751. {
  3752. return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value)
  3753. };
  3754. $h.ScriptHelpers.isUndefined=function(value)
  3755. {
  3756. return value===undefined
  3757. };
  3758. $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName)
  3759. {
  3760. return Object.isInstanceOfType(obj) ? keyName in obj : false
  3761. };
  3762. $h.ScriptHelpers.isNonEmptyString=function(value)
  3763. {
  3764. if(!value)
  3765. return false;
  3766. return String.isInstanceOfType(value)
  3767. };
  3768. $h.ScriptHelpers.deepClone=function(obj)
  3769. {
  3770. return window["JSON"]["parse"](window["JSON"]["stringify"](obj))
  3771. };
  3772. window["OSF"]["DDA"]["OutlookAppOm"].registerClass("OSF.DDA.OutlookAppOm");
  3773. window["OSF"]["DDA"]["Settings"].registerClass("OSF.DDA.Settings");
  3774. $h.ItemBase.registerClass("$h.ItemBase");
  3775. $h.Item.registerClass("$h.Item",$h.ItemBase);
  3776. $h.Appointment.registerClass("$h.Appointment",$h.Item);
  3777. $h.ComposeItem.registerClass("$h.ComposeItem",$h.ItemBase);
  3778. $h.AppointmentCompose.registerClass("$h.AppointmentCompose",$h.ComposeItem);
  3779. $h.AttachmentConstants.registerClass("$h.AttachmentConstants");
  3780. $h.AttachmentDetails.registerClass("$h.AttachmentDetails");
  3781. $h.Body.registerClass("$h.Body");
  3782. $h.ComposeBody.registerClass("$h.ComposeBody",$h.Body);
  3783. $h.ComposeRecipient.registerClass("$h.ComposeRecipient");
  3784. $h.ComposeLocation.registerClass("$h.ComposeLocation");
  3785. $h.ComposeSubject.registerClass("$h.ComposeSubject");
  3786. $h.ComposeTime.registerClass("$h.ComposeTime");
  3787. $h.Contact.registerClass("$h.Contact");
  3788. $h.CustomProperties.registerClass("$h.CustomProperties");
  3789. $h.Diagnostics.registerClass("$h.Diagnostics");
  3790. $h.EmailAddressDetails.registerClass("$h.EmailAddressDetails");
  3791. $h.Entities.registerClass("$h.Entities");
  3792. $h.ReplyConstants.registerClass("$h.ReplyConstants");
  3793. $h.AsyncConstants.registerClass("$h.AsyncConstants");
  3794. window["Office"]["cast"]["item"].registerClass("Office.cast.item");
  3795. $h.Message.registerClass("$h.Message",$h.Item);
  3796. $h.MeetingRequest.registerClass("$h.MeetingRequest",$h.Message);
  3797. $h.MeetingSuggestion.registerClass("$h.MeetingSuggestion");
  3798. $h.MeetingSuggestionTimeDecoder.registerClass("$h.MeetingSuggestionTimeDecoder");
  3799. $h._extractedDate.registerClass("$h._extractedDate");
  3800. $h._preciseDate.registerClass("$h._preciseDate",$h._extractedDate);
  3801. $h._relativeDate.registerClass("$h._relativeDate",$h._extractedDate);
  3802. $h.MessageCompose.registerClass("$h.MessageCompose",$h.ComposeItem);
  3803. $h.NotificationMessages.registerClass("$h.NotificationMessages");
  3804. $h.OutlookErrorManager.registerClass("$h.OutlookErrorManager");
  3805. $h.OutlookErrorManager.OutlookErrorCodes.registerClass("$h.OutlookErrorManager.OutlookErrorCodes");
  3806. $h.OutlookErrorManager.OsfDdaErrorCodes.registerClass("$h.OutlookErrorManager.OsfDdaErrorCodes");
  3807. $h.PhoneNumber.registerClass("$h.PhoneNumber");
  3808. $h.TaskSuggestion.registerClass("$h.TaskSuggestion");
  3809. $h.UserProfile.registerClass("$h.UserProfile");
  3810. $h.CommonParameters.registerClass("$h.CommonParameters");
  3811. $h.RequestBase.registerClass("$h.RequestBase");
  3812. $h.ProxyRequestBase.registerClass("$h.ProxyRequestBase",$h.RequestBase);
  3813. $h.EwsRequest.registerClass("$h.EwsRequest",$h.ProxyRequestBase);
  3814. $h.InitialData.registerClass("$h.InitialData");
  3815. $h._loadDictionaryRequest.registerClass("$h._loadDictionaryRequest",$h.RequestBase);
  3816. $h.SaveDictionaryRequest.registerClass("$h.SaveDictionaryRequest",$h.RequestBase);
  3817. $h.ScriptHelpers.registerClass("$h.ScriptHelpers");
  3818. window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__";
  3819. window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail";
  3820. window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100;
  3821. window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255;
  3822. window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768;
  3823. window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255;
  3824. window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6;
  3825. window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod";
  3826. window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData";
  3827. window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId";
  3828. window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion";
  3829. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null;
  3830. $h.AttachmentConstants.maxAttachmentNameLength=255;
  3831. $h.AttachmentConstants.maxUrlLength=2048;
  3832. $h.AttachmentConstants.maxItemIdLength=200;
  3833. $h.AttachmentConstants.maxRemoveIdLength=200;
  3834. $h.AttachmentConstants.attachmentParameterName="attachments";
  3835. $h.AttachmentConstants.attachmentTypeParameterName="type";
  3836. $h.AttachmentConstants.attachmentUrlParameterName="url";
  3837. $h.AttachmentConstants.attachmentItemIdParameterName="itemId";
  3838. $h.AttachmentConstants.attachmentNameParameterName="name";
  3839. $h.AttachmentConstants.attachmentTypeFileName="file";
  3840. $h.AttachmentConstants.attachmentTypeItemName="item";
  3841. $h.AttachmentDetails._attachmentTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]];
  3842. $h.Body.coercionTypeParameterName="coercionType";
  3843. $h.ComposeRecipient.displayNameLengthLimit=255;
  3844. $h.ComposeRecipient.maxSmtpLength=571;
  3845. $h.ComposeRecipient.recipientsLimit=100;
  3846. $h.ComposeRecipient.totalRecipientsLimit=500;
  3847. $h.ComposeRecipient.addressParameterName="address";
  3848. $h.ComposeRecipient.nameParameterName="name";
  3849. $h.ComposeLocation.locationKey="location";
  3850. $h.ComposeLocation.maximumLocationLength=255;
  3851. $h.ComposeSubject.maximumSubjectLength=255;
  3852. $h.ComposeTime.timeTypeName="TimeProperty";
  3853. $h.ComposeTime.timeDataName="time";
  3854. $h.Diagnostics.outlookAppName="Outlook";
  3855. $h.Diagnostics.outlookWebAppName="OutlookWebApp";
  3856. $h.EmailAddressDetails._emptyString$p="";
  3857. $h.EmailAddressDetails._responseTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]];
  3858. $h.EmailAddressDetails._recipientTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]];
  3859. $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"];
  3860. $h.ReplyConstants.htmlBodyKeyName="htmlBody";
  3861. $h.AsyncConstants.optionsKeyName="options";
  3862. $h.AsyncConstants.callbackKeyName="callback";
  3863. $h.AsyncConstants.asyncResultKeyName="asyncResult";
  3864. $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z");
  3865. $h.NotificationMessages.maximumKeyLength=32;
  3866. $h.NotificationMessages.maximumIconLength=32;
  3867. $h.NotificationMessages.maximumMessageLength=150;
  3868. $h.NotificationMessages.notificationsKeyParameterName="key";
  3869. $h.NotificationMessages.notificationsTypeParameterName="type";
  3870. $h.NotificationMessages.notificationsIconParameterName="icon";
  3871. $h.NotificationMessages.notificationsMessageParameterName="message";
  3872. $h.NotificationMessages.notificationsPersistentParameterName="persistent";
  3873. $h.OutlookErrorManager.errorNameKey="name";
  3874. $h.OutlookErrorManager.errorMessageKey="message";
  3875. $h.OutlookErrorManager._isInitialized$p=false;
  3876. $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3;
  3877. $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001;
  3878. $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002;
  3879. $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003;
  3880. $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004;
  3881. $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005;
  3882. $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006;
  3883. $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007;
  3884. $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008;
  3885. $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009;
  3886. $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010;
  3887. $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011;
  3888. $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012;
  3889. $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013;
  3890. $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014;
  3891. $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016;
  3892. $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017;
  3893. $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018;
  3894. $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019;
  3895. $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020;
  3896. $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021;
  3897. $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022;
  3898. $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023;
  3899. $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024;
  3900. $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025;
  3901. $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026;
  3902. $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027;
  3903. $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028;
  3904. $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006;
  3905. $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3;
  3906. $h.CommonParameters.asyncContextKeyName="asyncContext";
  3907. $h.InitialData.userProfileTypeKey="userProfileType";
  3908. $h.ScriptHelpers.emptyString="";
  3909. OSF.ClientMode={
  3910. ReadWrite: 0,
  3911. ReadOnly: 1
  3912. };
  3913. OSF.DDA.RichInitializationReason={
  3914. 1: Microsoft.Office.WebExtension.InitializationReason.Inserted,
  3915. 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened
  3916. };
  3917. Microsoft.Office.WebExtension.FileType={
  3918. Text: "text",
  3919. Compressed: "compressed"
  3920. };
  3921. OSF.DDA.RichClientSettingsManager={
  3922. read: function OSF_DDA_RichClientSettingsManager$Read(onCalling, onReceiving)
  3923. {
  3924. var keys=[];
  3925. var values=[];
  3926. if(onCalling)
  3927. onCalling();
  3928. window.external.GetContext().GetSettings().Read(keys,values);
  3929. if(onReceiving)
  3930. onReceiving();
  3931. var serializedSettings={};
  3932. for(var index=0; index < keys.length; index++)
  3933. serializedSettings[keys[index]]=values[index];
  3934. return serializedSettings
  3935. },
  3936. write: function OSF_DDA_RichClientSettingsManager$Write(serializedSettings, overwriteIfStale, onCalling, onReceiving)
  3937. {
  3938. var keys=[];
  3939. var values=[];
  3940. for(var key in serializedSettings)
  3941. {
  3942. keys.push(key);
  3943. values.push(serializedSettings[key])
  3944. }
  3945. if(onCalling)
  3946. onCalling();
  3947. window.external.GetContext().GetSettings().Write(keys,values);
  3948. if(onReceiving)
  3949. onReceiving()
  3950. }
  3951. };
  3952. OSF.DDA.DispIdHost.getRichClientDelegateMethods=function(actionId)
  3953. {
  3954. var delegateMethods={};
  3955. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;
  3956. delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;
  3957. delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;
  3958. function getSettingsExecuteMethod(hostDelegateMethod)
  3959. {
  3960. return function(args)
  3961. {
  3962. var status,
  3963. response;
  3964. try
  3965. {
  3966. response=hostDelegateMethod(args.hostCallArgs,args.onCalling,args.onReceiving);
  3967. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess
  3968. }
  3969. catch(ex)
  3970. {
  3971. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  3972. response={
  3973. name: Strings.OfficeOM.L_InternalError,
  3974. message: ex
  3975. }
  3976. }
  3977. if(args.onComplete)
  3978. args.onComplete(status,response)
  3979. }
  3980. }
  3981. function readSerializedSettings(hostCallArgs, onCalling, onReceiving)
  3982. {
  3983. return OSF.DDA.RichClientSettingsManager.read(onCalling,onReceiving)
  3984. }
  3985. function writeSerializedSettings(hostCallArgs, onCalling, onReceiving)
  3986. {
  3987. return OSF.DDA.RichClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving)
  3988. }
  3989. switch(actionId)
  3990. {
  3991. case OSF.DDA.AsyncMethodNames.RefreshAsync.id:
  3992. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=getSettingsExecuteMethod(readSerializedSettings);
  3993. break;
  3994. case OSF.DDA.AsyncMethodNames.SaveAsync.id:
  3995. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=getSettingsExecuteMethod(writeSerializedSettings);
  3996. break;
  3997. default:
  3998. break
  3999. }
  4000. return delegateMethods
  4001. };
  4002. OSF.DDA.DispIdHost.getClientDelegateMethods=function(actionId)
  4003. {
  4004. var delegateMethods={};
  4005. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;
  4006. delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;
  4007. delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;
  4008. if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id)
  4009. {
  4010. var readSerializedSettings=function(hostCallArgs, onCalling, onReceiving)
  4011. {
  4012. return OSF.DDA.RichClientSettingsManager.read(onCalling,onReceiving)
  4013. };
  4014. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.RichClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings)
  4015. }
  4016. if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id)
  4017. {
  4018. var writeSerializedSettings=function(hostCallArgs, onCalling, onReceiving)
  4019. {
  4020. return OSF.DDA.RichClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving)
  4021. };
  4022. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.RichClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings)
  4023. }
  4024. return delegateMethods
  4025. };
  4026. OSF.DDA.File=function OSF_DDA_File(handle, fileSize, sliceSize)
  4027. {
  4028. OSF.OUtil.defineEnumerableProperties(this,{
  4029. size: {value: fileSize},
  4030. sliceCount: {value: Math.ceil(fileSize / sliceSize)}
  4031. });
  4032. var privateState={};
  4033. privateState[OSF.DDA.FileProperties.Handle]=handle;
  4034. privateState[OSF.DDA.FileProperties.SliceSize]=sliceSize;
  4035. var am=OSF.DDA.AsyncMethodNames;
  4036. OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetDocumentCopyChunkAsync,am.ReleaseDocumentCopyAsync],privateState)
  4037. };
  4038. OSF.DDA.FileSliceOffset="fileSliceoffset";
  4039. OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts()
  4040. {
  4041. this._eventDispatches=[];
  4042. var am=OSF.DDA.AsyncMethodNames;
  4043. OSF.DDA.DispIdHost.addAsyncMethods(this,[am.AddDataPartAsync,am.GetDataPartByIdAsync,am.GetDataPartsByNameSpaceAsync])
  4044. };
  4045. OSF.DDA.CustomXmlPart=function OSF_DDA_CustomXmlPart(customXmlParts, id, builtIn)
  4046. {
  4047. OSF.OUtil.defineEnumerableProperties(this,{
  4048. builtIn: {value: builtIn},
  4049. id: {value: id},
  4050. namespaceManager: {value: new OSF.DDA.CustomXmlPrefixMappings(id)}
  4051. });
  4052. var am=OSF.DDA.AsyncMethodNames;
  4053. OSF.DDA.DispIdHost.addAsyncMethods(this,[am.DeleteDataPartAsync,am.GetPartNodesAsync,am.GetPartXmlAsync]);
  4054. var customXmlPartEventDispatches=customXmlParts._eventDispatches;
  4055. var dispatch=customXmlPartEventDispatches[id];
  4056. if(!dispatch)
  4057. {
  4058. var et=Microsoft.Office.WebExtension.EventType;
  4059. dispatch=new OSF.EventDispatch([et.DataNodeDeleted,et.DataNodeInserted,et.DataNodeReplaced]);
  4060. customXmlPartEventDispatches[id]=dispatch
  4061. }
  4062. OSF.DDA.DispIdHost.addEventSupport(this,dispatch)
  4063. };
  4064. OSF.DDA.CustomXmlPrefixMappings=function OSF_DDA_CustomXmlPrefixMappings(partId)
  4065. {
  4066. var am=OSF.DDA.AsyncMethodNames;
  4067. OSF.DDA.DispIdHost.addAsyncMethods(this,[am.AddDataPartNamespaceAsync,am.GetDataPartNamespaceAsync,am.GetDataPartPrefixAsync],partId)
  4068. };
  4069. OSF.DDA.CustomXmlNode=function OSF_DDA_CustomXmlNode(handle, nodeType, ns, baseName)
  4070. {
  4071. OSF.OUtil.defineEnumerableProperties(this,{
  4072. baseName: {value: baseName},
  4073. namespaceUri: {value: ns},
  4074. nodeType: {value: nodeType}
  4075. });
  4076. var am=OSF.DDA.AsyncMethodNames;
  4077. OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetRelativeNodesAsync,am.GetNodeValueAsync,am.GetNodeXmlAsync,am.SetNodeValueAsync,am.SetNodeXmlAsync,am.GetNodeTextAsync,am.SetNodeTextAsync],handle)
  4078. };
  4079. OSF.DDA.NodeInsertedEventArgs=function OSF_DDA_NodeInsertedEventArgs(newNode, inUndoRedo)
  4080. {
  4081. OSF.OUtil.defineEnumerableProperties(this,{
  4082. type: {value: Microsoft.Office.WebExtension.EventType.DataNodeInserted},
  4083. newNode: {value: newNode},
  4084. inUndoRedo: {value: inUndoRedo}
  4085. })
  4086. };
  4087. OSF.DDA.NodeReplacedEventArgs=function OSF_DDA_NodeReplacedEventArgs(oldNode, newNode, inUndoRedo)
  4088. {
  4089. OSF.OUtil.defineEnumerableProperties(this,{
  4090. type: {value: Microsoft.Office.WebExtension.EventType.DataNodeReplaced},
  4091. oldNode: {value: oldNode},
  4092. newNode: {value: newNode},
  4093. inUndoRedo: {value: inUndoRedo}
  4094. })
  4095. };
  4096. OSF.DDA.NodeDeletedEventArgs=function OSF_DDA_NodeDeletedEventArgs(oldNode, oldNextSibling, inUndoRedo)
  4097. {
  4098. OSF.OUtil.defineEnumerableProperties(this,{
  4099. type: {value: Microsoft.Office.WebExtension.EventType.DataNodeDeleted},
  4100. oldNode: {value: oldNode},
  4101. oldNextSibling: {value: oldNextSibling},
  4102. inUndoRedo: {value: inUndoRedo}
  4103. })
  4104. };
  4105. var OSFRichclient;
  4106. (function(OSFRichclient)
  4107. {
  4108. var RichClientHostController=function()
  4109. {
  4110. function RichClientHostController(){}
  4111. RichClientHostController.prototype.execute=function(id, params, callback)
  4112. {
  4113. window.external.Execute(id,params,callback)
  4114. };
  4115. RichClientHostController.prototype.registerEvent=function(id, targetId, handler, callback)
  4116. {
  4117. window.external.RegisterEvent(id,targetId,handler,callback)
  4118. };
  4119. RichClientHostController.prototype.unregisterEvent=function(id, targetId, callback)
  4120. {
  4121. window.external.UnregisterEvent(id,targetId,callback)
  4122. };
  4123. return RichClientHostController
  4124. }();
  4125. OSFRichclient.RichClientHostController=RichClientHostController
  4126. })(OSFRichclient || (OSFRichclient={}));
  4127. OSF.ClientHostController=new OSFRichclient.RichClientHostController;
  4128. var OfficeExt;
  4129. (function(OfficeExt)
  4130. {
  4131. (function(AppCommand)
  4132. {
  4133. var AppCommandManager=function()
  4134. {
  4135. function AppCommandManager()
  4136. {
  4137. var _this=this;
  4138. this._pseudoDocument=null;
  4139. this._eventDispatch=null;
  4140. this._processAppCommandInvocation=function(args)
  4141. {
  4142. var verifyResult=_this._verifyManifestCallback(args.callbackName);
  4143. if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  4144. {
  4145. _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,"");
  4146. return
  4147. }
  4148. var eventObj=_this._constructEventObjectForCallback(args);
  4149. if(eventObj)
  4150. window.setTimeout(function()
  4151. {
  4152. verifyResult.callback(eventObj)
  4153. },0);
  4154. else
  4155. _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")
  4156. }
  4157. }
  4158. AppCommandManager.initializeOsfDda=function()
  4159. {
  4160. OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"});
  4161. OSF.DDA.AsyncMethodCalls.define({
  4162. method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,
  4163. requiredArguments: [{
  4164. name: Microsoft.Office.WebExtension.Parameters.Id,
  4165. types: ["string"]
  4166. },{
  4167. name: Microsoft.Office.WebExtension.Parameters.Status,
  4168. types: ["number"]
  4169. },{
  4170. name: Microsoft.Office.WebExtension.Parameters.Data,
  4171. types: ["string"]
  4172. }]
  4173. });
  4174. OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"});
  4175. OSF.OUtil.setNamespace("AppCommand",OSF.DDA);
  4176. OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs
  4177. };
  4178. AppCommandManager.prototype.initializeAndChangeOnce=function(callback)
  4179. {
  4180. AppCommand.registerDdaFacade();
  4181. this._pseudoDocument={};
  4182. OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);
  4183. this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);
  4184. var onRegisterCompleted=function(result)
  4185. {
  4186. if(callback)
  4187. if(result.status=="succeeded")
  4188. callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);
  4189. else
  4190. callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)
  4191. };
  4192. OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch);
  4193. this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted)
  4194. };
  4195. AppCommandManager.prototype._verifyManifestCallback=function(callbackName)
  4196. {
  4197. var defaultResult={
  4198. callback: null,
  4199. errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback
  4200. };
  4201. callbackName=callbackName.trim();
  4202. try
  4203. {
  4204. var callList=callbackName.split(".");
  4205. var parentObject=window;
  4206. for(var i=0; i < callList.length - 1; i++)
  4207. if(parentObject[callList[i]] && typeof parentObject[callList[i]]=="object")
  4208. parentObject=parentObject[callList[i]];
  4209. else
  4210. return defaultResult;
  4211. var callbackFunc=parentObject[callList[callList.length - 1]];
  4212. if(typeof callbackFunc !="function")
  4213. return defaultResult
  4214. }
  4215. catch(e)
  4216. {
  4217. return defaultResult
  4218. }
  4219. return{
  4220. callback: callbackFunc,
  4221. errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess
  4222. }
  4223. };
  4224. AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data)
  4225. {
  4226. this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data)
  4227. };
  4228. AppCommandManager.prototype._constructEventObjectForCallback=function(args)
  4229. {
  4230. var _this=this;
  4231. var eventObj=new AppCommandCallbackEventArgs;
  4232. try
  4233. {
  4234. var jsonData=JSON.parse(args.eventObjStr);
  4235. this._translateEventObjectInternal(jsonData,eventObj);
  4236. Object.defineProperty(eventObj,"completed",{
  4237. value: function()
  4238. {
  4239. var jsonString=JSON.stringify(eventObj);
  4240. _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString)
  4241. },
  4242. enumerable: true
  4243. })
  4244. }
  4245. catch(e)
  4246. {
  4247. eventObj=null
  4248. }
  4249. return eventObj
  4250. };
  4251. AppCommandManager.prototype._translateEventObjectInternal=function(input, output)
  4252. {
  4253. for(var key in input)
  4254. {
  4255. if(!input.hasOwnProperty(key))
  4256. continue;
  4257. var inputChild=input[key];
  4258. if(typeof inputChild=="object" && inputChild !=null)
  4259. {
  4260. OSF.OUtil.defineEnumerableProperty(output,key,{value: {}});
  4261. this._translateEventObjectInternal(inputChild,output[key])
  4262. }
  4263. else
  4264. Object.defineProperty(output,key,{
  4265. value: inputChild,
  4266. enumerable: true,
  4267. writable: true
  4268. })
  4269. }
  4270. };
  4271. AppCommandManager.prototype._constructObjectByTemplate=function(template, input)
  4272. {
  4273. var output={};
  4274. if(!template || !input)
  4275. return output;
  4276. for(var key in template)
  4277. if(template.hasOwnProperty(key))
  4278. {
  4279. output[key]=null;
  4280. if(input[key] !=null)
  4281. {
  4282. var templateChild=template[key];
  4283. var inputChild=input[key];
  4284. var inputChildType=typeof inputChild;
  4285. if(typeof templateChild=="object" && templateChild !=null)
  4286. output[key]=this._constructObjectByTemplate(templateChild,inputChild);
  4287. else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean")
  4288. output[key]=inputChild
  4289. }
  4290. }
  4291. return output
  4292. };
  4293. AppCommandManager.instance=function()
  4294. {
  4295. if(AppCommandManager._instance==null)
  4296. AppCommandManager._instance=new AppCommandManager;
  4297. return AppCommandManager._instance
  4298. };
  4299. AppCommandManager._instance=null;
  4300. return AppCommandManager
  4301. }();
  4302. AppCommand.AppCommandManager=AppCommandManager;
  4303. var AppCommandInvokedEventArgs=function()
  4304. {
  4305. function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr)
  4306. {
  4307. this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;
  4308. this.appCommandId=appCommandId;
  4309. this.callbackName=callbackName;
  4310. this.eventObjStr=eventObjStr
  4311. }
  4312. AppCommandInvokedEventArgs.create=function(eventProperties)
  4313. {
  4314. return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr])
  4315. };
  4316. return AppCommandInvokedEventArgs
  4317. }();
  4318. AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs;
  4319. var AppCommandCallbackEventArgs=function()
  4320. {
  4321. function AppCommandCallbackEventArgs(){}
  4322. return AppCommandCallbackEventArgs
  4323. }();
  4324. AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs;
  4325. AppCommand.AppCommandInvokedEventEnums={
  4326. AppCommandId: "appCommandId",
  4327. CallbackName: "callbackName",
  4328. EventObjStr: "eventObjStr"
  4329. }
  4330. })(OfficeExt.AppCommand || (OfficeExt.AppCommand={}));
  4331. var AppCommand=OfficeExt.AppCommand
  4332. })(OfficeExt || (OfficeExt={}));
  4333. OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();
  4334. var OfficeExt;
  4335. (function(OfficeExt)
  4336. {
  4337. (function(AppCommand)
  4338. {
  4339. function registerDdaFacade()
  4340. {
  4341. if(OSF.DDA.SafeArray)
  4342. {
  4343. var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap;
  4344. parameterMap.define({
  4345. type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,
  4346. toHost: [{
  4347. name: Microsoft.Office.WebExtension.Parameters.Id,
  4348. value: 0
  4349. },{
  4350. name: Microsoft.Office.WebExtension.Parameters.Status,
  4351. value: 1
  4352. },{
  4353. name: Microsoft.Office.WebExtension.Parameters.Data,
  4354. value: 2
  4355. }]
  4356. });
  4357. parameterMap.define({
  4358. type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,
  4359. fromHost: [{
  4360. name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  4361. value: parameterMap.self
  4362. }],
  4363. isComplexType: true
  4364. });
  4365. parameterMap.define({
  4366. type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  4367. fromHost: [{
  4368. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId,
  4369. value: 0
  4370. },{
  4371. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName,
  4372. value: 1
  4373. },{
  4374. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr,
  4375. value: 2
  4376. }],
  4377. isComplexType: true
  4378. })
  4379. }
  4380. }
  4381. AppCommand.registerDdaFacade=registerDdaFacade
  4382. })(OfficeExt.AppCommand || (OfficeExt.AppCommand={}));
  4383. var AppCommand=OfficeExt.AppCommand
  4384. })(OfficeExt || (OfficeExt={}));
  4385. var OfficeJsClient_OutlookWin32;
  4386. (function(OfficeJsClient_OutlookWin32)
  4387. {
  4388. function prepareRightBeforeWebExtensionInitialize()
  4389. {
  4390. OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap));
  4391. var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance();
  4392. appCommandHandler.initializeAndChangeOnce()
  4393. }
  4394. OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize=prepareRightBeforeWebExtensionInitialize
  4395. })(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32={}));
  4396. OSF.OUtil.setNamespace("SafeArray",OSF.DDA);
  4397. OSF.DDA.SafeArray.Response={
  4398. Status: 0,
  4399. Payload: 1
  4400. };
  4401. OSF.DDA.SafeArray.UniqueArguments={
  4402. Offset: "offset",
  4403. Run: "run",
  4404. BindingSpecificData: "bindingSpecificData",
  4405. MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}"
  4406. };
  4407. OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray);
  4408. OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor()
  4409. {
  4410. function _2DVBArrayToJaggedArray(vbArr)
  4411. {
  4412. var ret;
  4413. try
  4414. {
  4415. var rows=vbArr.ubound(1);
  4416. var cols=vbArr.ubound(2);
  4417. vbArr=vbArr.toArray();
  4418. if(rows==1 && cols==1)
  4419. ret=[vbArr];
  4420. else
  4421. {
  4422. ret=[];
  4423. for(var row=0; row < rows; row++)
  4424. {
  4425. var rowArr=[];
  4426. for(var col=0; col < cols; col++)
  4427. {
  4428. var datum=vbArr[row * cols+col];
  4429. if(datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid)
  4430. rowArr.push(datum)
  4431. }
  4432. if(rowArr.length > 0)
  4433. ret.push(rowArr)
  4434. }
  4435. }
  4436. }
  4437. catch(ex){}
  4438. return ret
  4439. }
  4440. var complexTypes=[OSF.DDA.PropertyDescriptors.FileProperties,OSF.DDA.PropertyDescriptors.FileSliceProperties,OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,OSF.DDA.PropertyDescriptors.BindingProperties,OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,OSF.DDA.SafeArray.UniqueArguments.Offset,OSF.DDA.SafeArray.UniqueArguments.Run,OSF.DDA.PropertyDescriptors.Subset,OSF.DDA.PropertyDescriptors.DataPartProperties,OSF.DDA.PropertyDescriptors.DataNodeProperties,OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,OSF.DDA.EventDescriptors.DataNodeInsertedEvent,OSF.DDA.EventDescriptors.DataNodeReplacedEvent,OSF.DDA.EventDescriptors.DataNodeDeletedEvent,OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,OSF.DDA.EventDescriptors.ActiveViewChangedEvent,OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode,Microsoft.Office.Internal.Parameters.OfficeTheme,Microsoft.Office.Internal.Parameters.DocumentTheme,OSF.DDA.EventDescriptors.AppCommandInvokedEvent];
  4441. var dynamicTypes={};
  4442. dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=function()
  4443. {
  4444. var tableRows=0;
  4445. var tableHeaders=1;
  4446. return{
  4447. toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data)
  4448. {
  4449. if(typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined)
  4450. {
  4451. var tableData=[];
  4452. tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows];
  4453. tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders];
  4454. data=tableData
  4455. }
  4456. return data
  4457. },
  4458. fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs)
  4459. {
  4460. var ret;
  4461. if(hostArgs.toArray)
  4462. {
  4463. var dimensions=hostArgs.dimensions();
  4464. if(dimensions===2)
  4465. ret=_2DVBArrayToJaggedArray(hostArgs);
  4466. else
  4467. {
  4468. var array=hostArgs.toArray();
  4469. if(array.length===2 && (array[0] !=null && array[0].toArray || array[1] !=null && array[1].toArray))
  4470. {
  4471. ret={};
  4472. ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]);
  4473. ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders])
  4474. }
  4475. else
  4476. ret=array
  4477. }
  4478. }
  4479. else
  4480. ret=hostArgs;
  4481. return ret
  4482. }
  4483. }
  4484. }();
  4485. OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes);
  4486. this.pack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$pack(param, arg)
  4487. {
  4488. var value;
  4489. if(this.isDynamicType(param))
  4490. value=dynamicTypes[param].toHost(arg);
  4491. else
  4492. value=arg;
  4493. return value
  4494. };
  4495. this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg)
  4496. {
  4497. var value;
  4498. if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param))
  4499. try
  4500. {
  4501. value=arg.toArray()
  4502. }
  4503. catch(ex)
  4504. {
  4505. value=arg || {}
  4506. }
  4507. else if(this.isDynamicType(param))
  4508. value=dynamicTypes[param].fromHost(arg);
  4509. else
  4510. value=arg;
  4511. return value
  4512. };
  4513. this.dynamicTypes=dynamicTypes
  4514. };
  4515. OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);
  4516. OSF.DDA.SafeArray.Delegate.ParameterMap=function()
  4517. {
  4518. var parameterMap=new OSF.DDA.HostParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor);
  4519. var ns;
  4520. var self=parameterMap.self;
  4521. function createObject(properties)
  4522. {
  4523. var obj=null;
  4524. if(properties)
  4525. {
  4526. obj={};
  4527. var len=properties.length;
  4528. for(var i=0; i < len; i++)
  4529. obj[properties[i].name]=properties[i].value
  4530. }
  4531. return obj
  4532. }
  4533. function define(definition)
  4534. {
  4535. var args={};
  4536. var toHost=createObject(definition.toHost);
  4537. if(definition.invertible)
  4538. args.map=toHost;
  4539. else if(definition.canonical)
  4540. args.toHost=args.fromHost=toHost;
  4541. else
  4542. {
  4543. args.toHost=toHost;
  4544. args.fromHost=createObject(definition.fromHost)
  4545. }
  4546. parameterMap.setMapping(definition.type,args)
  4547. }
  4548. ns=OSF.DDA.FileProperties;
  4549. define({
  4550. type: OSF.DDA.PropertyDescriptors.FileProperties,
  4551. fromHost: [{
  4552. name: ns.Handle,
  4553. value: 0
  4554. },{
  4555. name: ns.FileSize,
  4556. value: 1
  4557. }]
  4558. });
  4559. define({
  4560. type: OSF.DDA.PropertyDescriptors.FileSliceProperties,
  4561. fromHost: [{
  4562. name: Microsoft.Office.WebExtension.Parameters.Data,
  4563. value: 0
  4564. },{
  4565. name: ns.SliceSize,
  4566. value: 1
  4567. }]
  4568. });
  4569. ns=OSF.DDA.FilePropertiesDescriptor;
  4570. define({
  4571. type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,
  4572. fromHost: [{
  4573. name: ns.Url,
  4574. value: 0
  4575. }]
  4576. });
  4577. ns=OSF.DDA.BindingProperties;
  4578. define({
  4579. type: OSF.DDA.PropertyDescriptors.BindingProperties,
  4580. fromHost: [{
  4581. name: ns.Id,
  4582. value: 0
  4583. },{
  4584. name: ns.Type,
  4585. value: 1
  4586. },{
  4587. name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,
  4588. value: 2
  4589. }]
  4590. });
  4591. define({
  4592. type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,
  4593. fromHost: [{
  4594. name: ns.RowCount,
  4595. value: 0
  4596. },{
  4597. name: ns.ColumnCount,
  4598. value: 1
  4599. },{
  4600. name: ns.HasHeaders,
  4601. value: 2
  4602. }]
  4603. });
  4604. ns=OSF.DDA.SafeArray.UniqueArguments;
  4605. define({
  4606. type: OSF.DDA.PropertyDescriptors.Subset,
  4607. toHost: [{
  4608. name: ns.Offset,
  4609. value: 0
  4610. },{
  4611. name: ns.Run,
  4612. value: 1
  4613. }],
  4614. canonical: true
  4615. });
  4616. ns=Microsoft.Office.WebExtension.Parameters;
  4617. define({
  4618. type: OSF.DDA.SafeArray.UniqueArguments.Offset,
  4619. toHost: [{
  4620. name: ns.StartRow,
  4621. value: 0
  4622. },{
  4623. name: ns.StartColumn,
  4624. value: 1
  4625. }],
  4626. canonical: true
  4627. });
  4628. define({
  4629. type: OSF.DDA.SafeArray.UniqueArguments.Run,
  4630. toHost: [{
  4631. name: ns.RowCount,
  4632. value: 0
  4633. },{
  4634. name: ns.ColumnCount,
  4635. value: 1
  4636. }],
  4637. canonical: true
  4638. });
  4639. ns=OSF.DDA.DataPartProperties;
  4640. define({
  4641. type: OSF.DDA.PropertyDescriptors.DataPartProperties,
  4642. fromHost: [{
  4643. name: ns.Id,
  4644. value: 0
  4645. },{
  4646. name: ns.BuiltIn,
  4647. value: 1
  4648. }]
  4649. });
  4650. ns=OSF.DDA.DataNodeProperties;
  4651. define({
  4652. type: OSF.DDA.PropertyDescriptors.DataNodeProperties,
  4653. fromHost: [{
  4654. name: ns.Handle,
  4655. value: 0
  4656. },{
  4657. name: ns.BaseName,
  4658. value: 1
  4659. },{
  4660. name: ns.NamespaceUri,
  4661. value: 2
  4662. },{
  4663. name: ns.NodeType,
  4664. value: 3
  4665. }]
  4666. });
  4667. define({
  4668. type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,
  4669. fromHost: [{
  4670. name: OSF.DDA.PropertyDescriptors.BindingProperties,
  4671. value: 0
  4672. },{
  4673. name: OSF.DDA.PropertyDescriptors.Subset,
  4674. value: 1
  4675. }]
  4676. });
  4677. define({
  4678. type: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,
  4679. fromHost: [{
  4680. name: Microsoft.Office.Internal.Parameters.DocumentTheme,
  4681. value: self
  4682. }]
  4683. });
  4684. define({
  4685. type: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,
  4686. fromHost: [{
  4687. name: Microsoft.Office.Internal.Parameters.OfficeTheme,
  4688. value: self
  4689. }]
  4690. });
  4691. define({
  4692. type: OSF.DDA.EventDescriptors.ActiveViewChangedEvent,
  4693. fromHost: [{
  4694. name: Microsoft.Office.WebExtension.Parameters.ActiveView,
  4695. value: 0
  4696. }]
  4697. });
  4698. ns=OSF.DDA.DataNodeEventProperties;
  4699. define({
  4700. type: OSF.DDA.EventDescriptors.DataNodeInsertedEvent,
  4701. fromHost: [{
  4702. name: ns.InUndoRedo,
  4703. value: 0
  4704. },{
  4705. name: ns.NewNode,
  4706. value: 1
  4707. }]
  4708. });
  4709. define({
  4710. type: OSF.DDA.EventDescriptors.DataNodeReplacedEvent,
  4711. fromHost: [{
  4712. name: ns.InUndoRedo,
  4713. value: 0
  4714. },{
  4715. name: ns.OldNode,
  4716. value: 1
  4717. },{
  4718. name: ns.NewNode,
  4719. value: 2
  4720. }]
  4721. });
  4722. define({
  4723. type: OSF.DDA.EventDescriptors.DataNodeDeletedEvent,
  4724. fromHost: [{
  4725. name: ns.InUndoRedo,
  4726. value: 0
  4727. },{
  4728. name: ns.OldNode,
  4729. value: 1
  4730. },{
  4731. name: ns.NextSiblingNode,
  4732. value: 2
  4733. }]
  4734. });
  4735. define({
  4736. type: ns.OldNode,
  4737. fromHost: [{
  4738. name: OSF.DDA.PropertyDescriptors.DataNodeProperties,
  4739. value: self
  4740. }]
  4741. });
  4742. define({
  4743. type: ns.NewNode,
  4744. fromHost: [{
  4745. name: OSF.DDA.PropertyDescriptors.DataNodeProperties,
  4746. value: self
  4747. }]
  4748. });
  4749. define({
  4750. type: ns.NextSiblingNode,
  4751. fromHost: [{
  4752. name: OSF.DDA.PropertyDescriptors.DataNodeProperties,
  4753. value: self
  4754. }]
  4755. });
  4756. ns=Microsoft.Office.WebExtension.AsyncResultStatus;
  4757. define({
  4758. type: OSF.DDA.PropertyDescriptors.AsyncResultStatus,
  4759. fromHost: [{
  4760. name: ns.Succeeded,
  4761. value: 0
  4762. },{
  4763. name: ns.Failed,
  4764. value: 1
  4765. }]
  4766. });
  4767. ns=Microsoft.Office.WebExtension.CoercionType;
  4768. define({
  4769. type: Microsoft.Office.WebExtension.Parameters.CoercionType,
  4770. toHost: [{
  4771. name: ns.Text,
  4772. value: 0
  4773. },{
  4774. name: ns.Matrix,
  4775. value: 1
  4776. },{
  4777. name: ns.Table,
  4778. value: 2
  4779. },{
  4780. name: ns.Html,
  4781. value: 3
  4782. },{
  4783. name: ns.Ooxml,
  4784. value: 4
  4785. },{
  4786. name: ns.SlideRange,
  4787. value: 7
  4788. },{
  4789. name: ns.Image,
  4790. value: 8
  4791. }]
  4792. });
  4793. ns=Microsoft.Office.WebExtension.GoToType;
  4794. define({
  4795. type: Microsoft.Office.WebExtension.Parameters.GoToType,
  4796. toHost: [{
  4797. name: ns.Binding,
  4798. value: 0
  4799. },{
  4800. name: ns.NamedItem,
  4801. value: 1
  4802. },{
  4803. name: ns.Slide,
  4804. value: 2
  4805. },{
  4806. name: ns.Index,
  4807. value: 3
  4808. }]
  4809. });
  4810. ns=Microsoft.Office.WebExtension.FileType;
  4811. if(ns)
  4812. define({
  4813. type: Microsoft.Office.WebExtension.Parameters.FileType,
  4814. toHost: [{
  4815. name: ns.Text,
  4816. value: 0
  4817. },{
  4818. name: ns.Compressed,
  4819. value: 5
  4820. },{
  4821. name: ns.Pdf,
  4822. value: 6
  4823. }]
  4824. });
  4825. ns=Microsoft.Office.WebExtension.BindingType;
  4826. if(ns)
  4827. define({
  4828. type: Microsoft.Office.WebExtension.Parameters.BindingType,
  4829. toHost: [{
  4830. name: ns.Text,
  4831. value: 0
  4832. },{
  4833. name: ns.Matrix,
  4834. value: 1
  4835. },{
  4836. name: ns.Table,
  4837. value: 2
  4838. }],
  4839. invertible: true
  4840. });
  4841. ns=Microsoft.Office.WebExtension.ValueFormat;
  4842. define({
  4843. type: Microsoft.Office.WebExtension.Parameters.ValueFormat,
  4844. toHost: [{
  4845. name: ns.Unformatted,
  4846. value: 0
  4847. },{
  4848. name: ns.Formatted,
  4849. value: 1
  4850. }]
  4851. });
  4852. ns=Microsoft.Office.WebExtension.FilterType;
  4853. define({
  4854. type: Microsoft.Office.WebExtension.Parameters.FilterType,
  4855. toHost: [{
  4856. name: ns.All,
  4857. value: 0
  4858. },{
  4859. name: ns.OnlyVisible,
  4860. value: 1
  4861. }]
  4862. });
  4863. ns=Microsoft.Office.Internal.OfficeTheme;
  4864. if(ns)
  4865. define({
  4866. type: Microsoft.Office.Internal.Parameters.OfficeTheme,
  4867. fromHost: [{
  4868. name: ns.PrimaryFontColor,
  4869. value: 0
  4870. },{
  4871. name: ns.PrimaryBackgroundColor,
  4872. value: 1
  4873. },{
  4874. name: ns.SecondaryFontColor,
  4875. value: 2
  4876. },{
  4877. name: ns.SecondaryBackgroundColor,
  4878. value: 3
  4879. }]
  4880. });
  4881. ns=Microsoft.Office.WebExtension.ActiveView;
  4882. if(ns)
  4883. define({
  4884. type: Microsoft.Office.WebExtension.Parameters.ActiveView,
  4885. fromHost: [{
  4886. name: 0,
  4887. value: ns.Read
  4888. },{
  4889. name: 1,
  4890. value: ns.Edit
  4891. }]
  4892. });
  4893. ns=Microsoft.Office.Internal.DocumentTheme;
  4894. if(ns)
  4895. define({
  4896. type: Microsoft.Office.Internal.Parameters.DocumentTheme,
  4897. fromHost: [{
  4898. name: ns.PrimaryBackgroundColor,
  4899. value: 0
  4900. },{
  4901. name: ns.PrimaryFontColor,
  4902. value: 1
  4903. },{
  4904. name: ns.SecondaryBackgroundColor,
  4905. value: 2
  4906. },{
  4907. name: ns.SecondaryFontColor,
  4908. value: 3
  4909. },{
  4910. name: ns.Accent1,
  4911. value: 4
  4912. },{
  4913. name: ns.Accent2,
  4914. value: 5
  4915. },{
  4916. name: ns.Accent3,
  4917. value: 6
  4918. },{
  4919. name: ns.Accent4,
  4920. value: 7
  4921. },{
  4922. name: ns.Accent5,
  4923. value: 8
  4924. },{
  4925. name: ns.Accent6,
  4926. value: 9
  4927. },{
  4928. name: ns.Hyperlink,
  4929. value: 10
  4930. },{
  4931. name: ns.FollowedHyperlink,
  4932. value: 11
  4933. },{
  4934. name: ns.HeaderLatinFont,
  4935. value: 12
  4936. },{
  4937. name: ns.HeaderEastAsianFont,
  4938. value: 13
  4939. },{
  4940. name: ns.HeaderScriptFont,
  4941. value: 14
  4942. },{
  4943. name: ns.HeaderLocalizedFont,
  4944. value: 15
  4945. },{
  4946. name: ns.BodyLatinFont,
  4947. value: 16
  4948. },{
  4949. name: ns.BodyEastAsianFont,
  4950. value: 17
  4951. },{
  4952. name: ns.BodyScriptFont,
  4953. value: 18
  4954. },{
  4955. name: ns.BodyLocalizedFont,
  4956. value: 19
  4957. }]
  4958. });
  4959. ns=Microsoft.Office.WebExtension.SelectionMode;
  4960. define({
  4961. type: Microsoft.Office.WebExtension.Parameters.SelectionMode,
  4962. toHost: [{
  4963. name: ns.Default,
  4964. value: 0
  4965. },{
  4966. name: ns.Selected,
  4967. value: 1
  4968. },{
  4969. name: ns.None,
  4970. value: 2
  4971. },]
  4972. });
  4973. ns=Microsoft.Office.WebExtension.Parameters;
  4974. var cns=OSF.DDA.MethodDispId;
  4975. define({
  4976. type: cns.dispidNavigateToMethod,
  4977. toHost: [{
  4978. name: ns.Id,
  4979. value: 0
  4980. },{
  4981. name: ns.GoToType,
  4982. value: 1
  4983. },{
  4984. name: ns.SelectionMode,
  4985. value: 2
  4986. }]
  4987. });
  4988. define({
  4989. type: cns.dispidGetSelectedDataMethod,
  4990. fromHost: [{
  4991. name: ns.Data,
  4992. value: self
  4993. }],
  4994. toHost: [{
  4995. name: ns.CoercionType,
  4996. value: 0
  4997. },{
  4998. name: ns.ValueFormat,
  4999. value: 1
  5000. },{
  5001. name: ns.FilterType,
  5002. value: 2
  5003. }]
  5004. });
  5005. define({
  5006. type: cns.dispidSetSelectedDataMethod,
  5007. toHost: [{
  5008. name: ns.CoercionType,
  5009. value: 0
  5010. },{
  5011. name: ns.Data,
  5012. value: 1
  5013. },{
  5014. name: ns.ImageLeft,
  5015. value: 2
  5016. },{
  5017. name: ns.ImageTop,
  5018. value: 3
  5019. },{
  5020. name: ns.ImageWidth,
  5021. value: 4
  5022. },{
  5023. name: ns.ImageHeight,
  5024. value: 5
  5025. }]
  5026. });
  5027. define({
  5028. type: cns.dispidGetFilePropertiesMethod,
  5029. fromHost: [{
  5030. name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,
  5031. value: self
  5032. }]
  5033. });
  5034. define({
  5035. type: cns.dispidGetDocumentCopyMethod,
  5036. toHost: [{
  5037. name: ns.FileType,
  5038. value: 0
  5039. }],
  5040. fromHost: [{
  5041. name: OSF.DDA.PropertyDescriptors.FileProperties,
  5042. value: self
  5043. }]
  5044. });
  5045. define({
  5046. type: cns.dispidGetDocumentCopyChunkMethod,
  5047. toHost: [{
  5048. name: OSF.DDA.FileProperties.Handle,
  5049. value: 0
  5050. },{
  5051. name: OSF.DDA.FileSliceOffset,
  5052. value: 1
  5053. },{
  5054. name: OSF.DDA.FileProperties.SliceSize,
  5055. value: 2
  5056. }],
  5057. fromHost: [{
  5058. name: OSF.DDA.PropertyDescriptors.FileSliceProperties,
  5059. value: self
  5060. }]
  5061. });
  5062. define({
  5063. type: cns.dispidReleaseDocumentCopyMethod,
  5064. toHost: [{
  5065. name: OSF.DDA.FileProperties.Handle,
  5066. value: 0
  5067. }]
  5068. });
  5069. define({
  5070. type: cns.dispidAddBindingFromSelectionMethod,
  5071. fromHost: [{
  5072. name: OSF.DDA.PropertyDescriptors.BindingProperties,
  5073. value: self
  5074. }],
  5075. toHost: [{
  5076. name: ns.Id,
  5077. value: 0
  5078. },{
  5079. name: ns.BindingType,
  5080. value: 1
  5081. }]
  5082. });
  5083. define({
  5084. type: cns.dispidAddBindingFromPromptMethod,
  5085. fromHost: [{
  5086. name: OSF.DDA.PropertyDescriptors.BindingProperties,
  5087. value: self
  5088. }],
  5089. toHost: [{
  5090. name: ns.Id,
  5091. value: 0
  5092. },{
  5093. name: ns.BindingType,
  5094. value: 1
  5095. },{
  5096. name: ns.PromptText,
  5097. value: 2
  5098. }]
  5099. });
  5100. define({
  5101. type: cns.dispidAddBindingFromNamedItemMethod,
  5102. fromHost: [{
  5103. name: OSF.DDA.PropertyDescriptors.BindingProperties,
  5104. value: self
  5105. }],
  5106. toHost: [{
  5107. name: ns.ItemName,
  5108. value: 0
  5109. },{
  5110. name: ns.Id,
  5111. value: 1
  5112. },{
  5113. name: ns.BindingType,
  5114. value: 2
  5115. },{
  5116. name: ns.FailOnCollision,
  5117. value: 3
  5118. }]
  5119. });
  5120. define({
  5121. type: cns.dispidReleaseBindingMethod,
  5122. toHost: [{
  5123. name: ns.Id,
  5124. value: 0
  5125. }]
  5126. });
  5127. define({
  5128. type: cns.dispidGetBindingMethod,
  5129. fromHost: [{
  5130. name: OSF.DDA.PropertyDescriptors.BindingProperties,
  5131. value: self
  5132. }],
  5133. toHost: [{
  5134. name: ns.Id,
  5135. value: 0
  5136. }]
  5137. });
  5138. define({
  5139. type: cns.dispidGetAllBindingsMethod,
  5140. fromHost: [{
  5141. name: OSF.DDA.ListDescriptors.BindingList,
  5142. value: self
  5143. }]
  5144. });
  5145. define({
  5146. type: cns.dispidGetBindingDataMethod,
  5147. fromHost: [{
  5148. name: ns.Data,
  5149. value: self
  5150. }],
  5151. toHost: [{
  5152. name: ns.Id,
  5153. value: 0
  5154. },{
  5155. name: ns.CoercionType,
  5156. value: 1
  5157. },{
  5158. name: ns.ValueFormat,
  5159. value: 2
  5160. },{
  5161. name: ns.FilterType,
  5162. value: 3
  5163. },{
  5164. name: OSF.DDA.PropertyDescriptors.Subset,
  5165. value: 4
  5166. }]
  5167. });
  5168. define({
  5169. type: cns.dispidSetBindingDataMethod,
  5170. toHost: [{
  5171. name: ns.Id,
  5172. value: 0
  5173. },{
  5174. name: ns.CoercionType,
  5175. value: 1
  5176. },{
  5177. name: ns.Data,
  5178. value: 2
  5179. },{
  5180. name: OSF.DDA.SafeArray.UniqueArguments.Offset,
  5181. value: 3
  5182. }]
  5183. });
  5184. define({
  5185. type: cns.dispidAddRowsMethod,
  5186. toHost: [{
  5187. name: ns.Id,
  5188. value: 0
  5189. },{
  5190. name: ns.Data,
  5191. value: 1
  5192. }]
  5193. });
  5194. define({
  5195. type: cns.dispidAddColumnsMethod,
  5196. toHost: [{
  5197. name: ns.Id,
  5198. value: 0
  5199. },{
  5200. name: ns.Data,
  5201. value: 1
  5202. }]
  5203. });
  5204. define({
  5205. type: cns.dispidClearAllRowsMethod,
  5206. toHost: [{
  5207. name: ns.Id,
  5208. value: 0
  5209. }]
  5210. });
  5211. define({
  5212. type: cns.dispidClearFormatsMethod,
  5213. toHost: [{
  5214. name: ns.Id,
  5215. value: 0
  5216. }]
  5217. });
  5218. define({
  5219. type: cns.dispidSetTableOptionsMethod,
  5220. toHost: [{
  5221. name: ns.Id,
  5222. value: 0
  5223. },{
  5224. name: ns.TableOptions,
  5225. value: 1
  5226. },]
  5227. });
  5228. define({
  5229. type: cns.dispidSetFormatsMethod,
  5230. toHost: [{
  5231. name: ns.Id,
  5232. value: 0
  5233. },{
  5234. name: ns.CellFormat,
  5235. value: 1
  5236. },]
  5237. });
  5238. define({
  5239. type: cns.dispidLoadSettingsMethod,
  5240. fromHost: [{
  5241. name: OSF.DDA.SettingsManager.SerializedSettings,
  5242. value: self
  5243. }]
  5244. });
  5245. define({
  5246. type: cns.dispidSaveSettingsMethod,
  5247. toHost: [{
  5248. name: OSF.DDA.SettingsManager.SerializedSettings,
  5249. value: OSF.DDA.SettingsManager.SerializedSettings
  5250. },{
  5251. name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,
  5252. value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale
  5253. }]
  5254. });
  5255. define({
  5256. type: OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod,
  5257. fromHost: [{
  5258. name: Microsoft.Office.Internal.Parameters.OfficeTheme,
  5259. value: self
  5260. }]
  5261. });
  5262. define({
  5263. type: OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod,
  5264. fromHost: [{
  5265. name: Microsoft.Office.Internal.Parameters.DocumentTheme,
  5266. value: self
  5267. }]
  5268. });
  5269. define({
  5270. type: OSF.DDA.MethodDispId.dispidGetActiveViewMethod,
  5271. fromHost: [{
  5272. name: Microsoft.Office.WebExtension.Parameters.ActiveView,
  5273. value: self
  5274. }]
  5275. });
  5276. define({
  5277. type: cns.dispidAddDataPartMethod,
  5278. fromHost: [{
  5279. name: OSF.DDA.PropertyDescriptors.DataPartProperties,
  5280. value: self
  5281. }],
  5282. toHost: [{
  5283. name: ns.Xml,
  5284. value: 0
  5285. }]
  5286. });
  5287. define({
  5288. type: cns.dispidGetDataPartByIdMethod,
  5289. fromHost: [{
  5290. name: OSF.DDA.PropertyDescriptors.DataPartProperties,
  5291. value: self
  5292. }],
  5293. toHost: [{
  5294. name: ns.Id,
  5295. value: 0
  5296. }]
  5297. });
  5298. define({
  5299. type: cns.dispidGetDataPartsByNamespaceMethod,
  5300. fromHost: [{
  5301. name: OSF.DDA.ListDescriptors.DataPartList,
  5302. value: self
  5303. }],
  5304. toHost: [{
  5305. name: ns.Namespace,
  5306. value: 0
  5307. }]
  5308. });
  5309. define({
  5310. type: cns.dispidGetDataPartXmlMethod,
  5311. fromHost: [{
  5312. name: ns.Data,
  5313. value: self
  5314. }],
  5315. toHost: [{
  5316. name: ns.Id,
  5317. value: 0
  5318. }]
  5319. });
  5320. define({
  5321. type: cns.dispidGetDataPartNodesMethod,
  5322. fromHost: [{
  5323. name: OSF.DDA.ListDescriptors.DataNodeList,
  5324. value: self
  5325. }],
  5326. toHost: [{
  5327. name: ns.Id,
  5328. value: 0
  5329. },{
  5330. name: ns.XPath,
  5331. value: 1
  5332. }]
  5333. });
  5334. define({
  5335. type: cns.dispidDeleteDataPartMethod,
  5336. toHost: [{
  5337. name: ns.Id,
  5338. value: 0
  5339. }]
  5340. });
  5341. define({
  5342. type: cns.dispidGetDataNodeValueMethod,
  5343. fromHost: [{
  5344. name: ns.Data,
  5345. value: self
  5346. }],
  5347. toHost: [{
  5348. name: OSF.DDA.DataNodeProperties.Handle,
  5349. value: 0
  5350. }]
  5351. });
  5352. define({
  5353. type: cns.dispidGetDataNodeXmlMethod,
  5354. fromHost: [{
  5355. name: ns.Data,
  5356. value: self
  5357. }],
  5358. toHost: [{
  5359. name: OSF.DDA.DataNodeProperties.Handle,
  5360. value: 0
  5361. }]
  5362. });
  5363. define({
  5364. type: cns.dispidGetDataNodesMethod,
  5365. fromHost: [{
  5366. name: OSF.DDA.ListDescriptors.DataNodeList,
  5367. value: self
  5368. }],
  5369. toHost: [{
  5370. name: OSF.DDA.DataNodeProperties.Handle,
  5371. value: 0
  5372. },{
  5373. name: ns.XPath,
  5374. value: 1
  5375. }]
  5376. });
  5377. define({
  5378. type: cns.dispidSetDataNodeValueMethod,
  5379. toHost: [{
  5380. name: OSF.DDA.DataNodeProperties.Handle,
  5381. value: 0
  5382. },{
  5383. name: ns.Data,
  5384. value: 1
  5385. }]
  5386. });
  5387. define({
  5388. type: cns.dispidSetDataNodeXmlMethod,
  5389. toHost: [{
  5390. name: OSF.DDA.DataNodeProperties.Handle,
  5391. value: 0
  5392. },{
  5393. name: ns.Xml,
  5394. value: 1
  5395. }]
  5396. });
  5397. define({
  5398. type: cns.dispidAddDataNamespaceMethod,
  5399. toHost: [{
  5400. name: OSF.DDA.DataPartProperties.Id,
  5401. value: 0
  5402. },{
  5403. name: ns.Prefix,
  5404. value: 1
  5405. },{
  5406. name: ns.Namespace,
  5407. value: 2
  5408. }]
  5409. });
  5410. define({
  5411. type: cns.dispidGetDataUriByPrefixMethod,
  5412. fromHost: [{
  5413. name: ns.Data,
  5414. value: self
  5415. }],
  5416. toHost: [{
  5417. name: OSF.DDA.DataPartProperties.Id,
  5418. value: 0
  5419. },{
  5420. name: ns.Prefix,
  5421. value: 1
  5422. }]
  5423. });
  5424. define({
  5425. type: cns.dispidGetDataPrefixByUriMethod,
  5426. fromHost: [{
  5427. name: ns.Data,
  5428. value: self
  5429. }],
  5430. toHost: [{
  5431. name: OSF.DDA.DataPartProperties.Id,
  5432. value: 0
  5433. },{
  5434. name: ns.Namespace,
  5435. value: 1
  5436. }]
  5437. });
  5438. define({
  5439. type: cns.dispidGetDataNodeTextMethod,
  5440. fromHost: [{
  5441. name: ns.Data,
  5442. value: self
  5443. }],
  5444. toHost: [{
  5445. name: OSF.DDA.DataNodeProperties.Handle,
  5446. value: 0
  5447. }]
  5448. });
  5449. define({
  5450. type: cns.dispidSetDataNodeTextMethod,
  5451. toHost: [{
  5452. name: OSF.DDA.DataNodeProperties.Handle,
  5453. value: 0
  5454. },{
  5455. name: ns.Text,
  5456. value: 1
  5457. }]
  5458. });
  5459. define({
  5460. type: cns.dispidGetSelectedTaskMethod,
  5461. fromHost: [{
  5462. name: ns.TaskId,
  5463. value: self
  5464. }]
  5465. });
  5466. define({
  5467. type: cns.dispidGetTaskMethod,
  5468. fromHost: [{
  5469. name: "taskName",
  5470. value: 0
  5471. },{
  5472. name: "wssTaskId",
  5473. value: 1
  5474. },{
  5475. name: "resourceNames",
  5476. value: 2
  5477. }],
  5478. toHost: [{
  5479. name: ns.TaskId,
  5480. value: 0
  5481. }]
  5482. });
  5483. define({
  5484. type: cns.dispidGetTaskFieldMethod,
  5485. fromHost: [{
  5486. name: ns.FieldValue,
  5487. value: self
  5488. }],
  5489. toHost: [{
  5490. name: ns.TaskId,
  5491. value: 0
  5492. },{
  5493. name: ns.FieldId,
  5494. value: 1
  5495. },{
  5496. name: ns.GetRawValue,
  5497. value: 2
  5498. }]
  5499. });
  5500. define({
  5501. type: cns.dispidGetWSSUrlMethod,
  5502. fromHost: [{
  5503. name: ns.ServerUrl,
  5504. value: 0
  5505. },{
  5506. name: ns.ListName,
  5507. value: 1
  5508. }]
  5509. });
  5510. define({
  5511. type: cns.dispidGetSelectedResourceMethod,
  5512. fromHost: [{
  5513. name: ns.ResourceId,
  5514. value: self
  5515. }]
  5516. });
  5517. define({
  5518. type: cns.dispidGetResourceFieldMethod,
  5519. fromHost: [{
  5520. name: ns.FieldValue,
  5521. value: self
  5522. }],
  5523. toHost: [{
  5524. name: ns.ResourceId,
  5525. value: 0
  5526. },{
  5527. name: ns.FieldId,
  5528. value: 1
  5529. },{
  5530. name: ns.GetRawValue,
  5531. value: 2
  5532. }]
  5533. });
  5534. define({
  5535. type: cns.dispidGetProjectFieldMethod,
  5536. fromHost: [{
  5537. name: ns.FieldValue,
  5538. value: self
  5539. }],
  5540. toHost: [{
  5541. name: ns.FieldId,
  5542. value: 0
  5543. },{
  5544. name: ns.GetRawValue,
  5545. value: 1
  5546. }]
  5547. });
  5548. define({
  5549. type: cns.dispidGetSelectedViewMethod,
  5550. fromHost: [{
  5551. name: ns.ViewType,
  5552. value: 0
  5553. },{
  5554. name: ns.ViewName,
  5555. value: 1
  5556. }]
  5557. });
  5558. cns=OSF.DDA.EventDispId;
  5559. define({type: cns.dispidDocumentSelectionChangedEvent});
  5560. define({
  5561. type: cns.dispidBindingSelectionChangedEvent,
  5562. fromHost: [{
  5563. name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,
  5564. value: self
  5565. }]
  5566. });
  5567. define({
  5568. type: cns.dispidBindingDataChangedEvent,
  5569. fromHost: [{
  5570. name: OSF.DDA.PropertyDescriptors.BindingProperties,
  5571. value: self
  5572. }]
  5573. });
  5574. define({type: cns.dispidSettingsChangedEvent});
  5575. define({
  5576. type: cns.dispidDocumentThemeChangedEvent,
  5577. fromHost: [{
  5578. name: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,
  5579. value: self
  5580. }]
  5581. });
  5582. define({
  5583. type: cns.dispidOfficeThemeChangedEvent,
  5584. fromHost: [{
  5585. name: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,
  5586. value: self
  5587. }]
  5588. });
  5589. define({
  5590. type: cns.dispidActiveViewChangedEvent,
  5591. fromHost: [{
  5592. name: OSF.DDA.EventDescriptors.ActiveViewChangedEvent,
  5593. value: self
  5594. }]
  5595. });
  5596. define({
  5597. type: cns.dispidDataNodeAddedEvent,
  5598. fromHost: [{
  5599. name: OSF.DDA.EventDescriptors.DataNodeInsertedEvent,
  5600. value: self
  5601. }]
  5602. });
  5603. define({
  5604. type: cns.dispidDataNodeReplacedEvent,
  5605. fromHost: [{
  5606. name: OSF.DDA.EventDescriptors.DataNodeReplacedEvent,
  5607. value: self
  5608. }]
  5609. });
  5610. define({
  5611. type: cns.dispidDataNodeDeletedEvent,
  5612. fromHost: [{
  5613. name: OSF.DDA.EventDescriptors.DataNodeDeletedEvent,
  5614. value: self
  5615. }]
  5616. });
  5617. define({type: cns.dispidTaskSelectionChangedEvent});
  5618. define({type: cns.dispidResourceSelectionChangedEvent});
  5619. define({type: cns.dispidViewSelectionChangedEvent});
  5620. parameterMap.define=define;
  5621. return parameterMap
  5622. }();
  5623. OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args)
  5624. {
  5625. var status;
  5626. var number=ex.number;
  5627. if(number)
  5628. switch(number)
  5629. {
  5630. case-2146828218:
  5631. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;
  5632. break;
  5633. case-2146827850:
  5634. default:
  5635. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  5636. break
  5637. }
  5638. if(args.onComplete)
  5639. args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)
  5640. };
  5641. OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args)
  5642. {
  5643. try
  5644. {
  5645. if(args.onCalling)
  5646. args.onCalling();
  5647. function toArray(args)
  5648. {
  5649. var arrArgs=args;
  5650. if(OSF.OUtil.isArray(args))
  5651. {
  5652. var len=arrArgs.length;
  5653. for(var i=0; i < len; i++)
  5654. arrArgs[i]=toArray(arrArgs[i])
  5655. }
  5656. else if(OSF.OUtil.isDate(args))
  5657. arrArgs=args.getVarDate();
  5658. else if(typeof args==="object" && !OSF.OUtil.isArray(args))
  5659. {
  5660. arrArgs=[];
  5661. for(var index in args)
  5662. if(!OSF.OUtil.isFunction(args[index]))
  5663. arrArgs[index]=toArray(args[index])
  5664. }
  5665. return arrArgs
  5666. }
  5667. var startTime=(new Date).getTime();
  5668. window.external.Execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs)
  5669. {
  5670. if(args.onReceiving)
  5671. args.onReceiving();
  5672. var result=hostResponseArgs.toArray();
  5673. var status=result[OSF.DDA.SafeArray.Response.Status];
  5674. if(args.onComplete)
  5675. {
  5676. var payload;
  5677. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  5678. if(result.length > 2)
  5679. {
  5680. payload=[];
  5681. for(var i=1; i < result.length; i++)
  5682. payload[i - 1]=result[i]
  5683. }
  5684. else
  5685. payload=result[OSF.DDA.SafeArray.Response.Payload];
  5686. else
  5687. payload=result[OSF.DDA.SafeArray.Response.Payload];
  5688. args.onComplete(status,payload)
  5689. }
  5690. if(OSF.AppTelemetry)
  5691. OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),status)
  5692. })
  5693. }
  5694. catch(ex)
  5695. {
  5696. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  5697. }
  5698. };
  5699. OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args)
  5700. {
  5701. var startTime=(new Date).getTime();
  5702. return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs)
  5703. {
  5704. if(args.onReceiving)
  5705. args.onReceiving();
  5706. var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs;
  5707. if(args.onComplete)
  5708. args.onComplete(status);
  5709. if(OSF.AppTelemetry)
  5710. OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status)
  5711. }
  5712. };
  5713. OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args)
  5714. {
  5715. if(args.onCalling)
  5716. args.onCalling();
  5717. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args);
  5718. try
  5719. {
  5720. window.external.RegisterEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload)
  5721. {
  5722. if(args.onEvent)
  5723. args.onEvent(payload);
  5724. if(OSF.AppTelemetry)
  5725. OSF.AppTelemetry.onEventDone(args.dispId)
  5726. },callback)
  5727. }
  5728. catch(ex)
  5729. {
  5730. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  5731. }
  5732. };
  5733. OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args)
  5734. {
  5735. if(args.onCalling)
  5736. args.onCalling();
  5737. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args);
  5738. try
  5739. {
  5740. window.external.UnregisterEvent(args.dispId,args.targetId,callback)
  5741. }
  5742. catch(ex)
  5743. {
  5744. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  5745. }
  5746. }