// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t){var n=Scanner.fromMessage(e);if(n.setLocale(t),n.getSpan().nextText("View invitation:").nextText("View on map").exists()&&n.getSpan().firstDate().exists()){var a,i,r,s,o,d,g;if(a=n.getSpan().nextText("View invitation:").nextText("View on map").nextTag("td4").tagContents().innerCapture(/($<eventName>.*)\n($<date>.*)\n(?:($<placeName>.*)\n)?($<address>.*)/),not(a))return CONTINUE;if(s=n.getSpan().nextText("View invitation:").nextLink(),i=a.$eventName.trim(),o=a.$date.innerDate(),d=n.getDateDD(o),d&&(d=d.endIso8601),r=a.$placeName.trim(),g=a.$address.trim(),g.innerAddress().exists()&&g.getLength()<=g.innerAddress().getLength()&&(g=g.innerAddress()),ASSERT(s,i,o))return[{"@context":"http://schema.org","@type":"http://schema.org/EventReservation",reservationStatus:"http://schema.org/ReservationPending",reservationFor:{url:s,"@type":"http://schema.org/SocialEvent",name:i,startDate:o,endDate:d,location:valid(r)?{"@type":"http://schema.org/Place",name:r,address:g}:g}}]}}}).call();