// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,a){var n=Scanner.fromMessage(e);n.setLocale(t);var r,o,p,i,c,s,g,m,d,u,l,h,f,C,S,v,x,y,L,k;if(r=n.getSpan().innerCapture(a.underNameCapture,1).trim(),k=n.getSpan().next(a.pickupDate).nextDate(),v=n.getSpan().next(a.dropoffDate).nextDate(),p=n.getSpan().innerCapture(a.reservationIdCapture,1),s=g=p.nextLink(),u=n.getSpan().next(a.brandLabel).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+([\s\S]+)/,a.brandLabel),1),x=n.getSpan().innerCapture(regExpFormatted(/\1\s+([^\[\]\n]*)/,a.pickupLocation),1),y=n.getSpan().innerCapture(regExpFormatted(/\1\s+([^\[\]]*?)\n\n/,a.pickupLocation),1),f=n.getSpan().innerCapture(regExpFormatted(/\1\s+([^\[\]\n]*)/,a.dropoffLocation),1),C=n.getSpan().innerCapture(regExpFormatted(/\1\s+([^\[\]]+?)\n\n/,a.dropoffLocation),1),a.cancellation.test(e.subject)&&(i="Cancelled"),ASSERT(p,r,y,k)){var b={"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:m,priceCurrency:d,reservationId:p,reservationStatus:"http://schema.org/Reservation"+(i||"Confirmed"),checkinUrl:c,modifyReservationUrl:s,cancelReservationUrl:g,underName:{"@type":"http://schema.org/Person",name:r,email:o},provider:{"@type":"http://schema.org/Organization",name:"Avis"},pickupTime:k,pickupLocation:{"@type":"http://schema.org/Place",name:x,telephone:L,address:y},dropoffTime:v,dropoffLocation:{"@type":"http://schema.org/Place",name:f,telephone:S,address:C}};return u&&(b.reservationFor={"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:u},license:l,color:h}),[b]}}}).call();