// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,x,p,g,i,o,s,d,T,f="Goldcar",c="Cancelled",m=!0;r=a.getSpan().nextText(n.underPersonNamePrefix).nextTag("td4").tagContents(),x=a.getSpan().innerCapture(regExpFormatted(/\1\s([0-9]+)/,n.carReservationIdPrefix),1),p=a.getSpan().nextText(n.carBrandSuffix).parentTag("td3").tagContents().innerCapture(/(.*?),\s/,1),p===a.getNullSpan()&&(p=a.getSpan().nextText(n.carBrandSuffix).parentTag("td3").tagContents().innerCapture(regExpFormatted(/(.*)\s\1/,n.carBrandSuffix),1)),m=a.getSpan().nextText(n.isSamePickUpDropOff)!==a.getNullSpan();var S,P,C,h;m?(pickUpAddress=(""+a.getSpan().nextText(n.addressPrefix).nextTag("td4").tagContents()).replace(/\n+/g," "),S=""+a.getSpan().nextText(n.isSamePickUpDropOff).nextText(n.pickUpDatePrefix).nextTag("td4").tagContents(),P=""+a.getSpan().nextText(n.isSamePickUpDropOff).nextText(n.pickUpTimePrefix).nextTag("td4").tagContents(),i=a.getDetachedSpan(S+" "+P).innerDate(),g=a.getSpan().nextText(n.namePrefix).nextTag("td4").tagContents(),o=g,C=""+a.getSpan().nextText(n.dropOffDatePrefix).nextTag("td4").tagContents(),h=""+a.getSpan().nextText(n.dropOffTimePrefix).nextTag("td4").tagContents(),s=a.getDetachedSpan(C+" "+h).innerDate()):(g=a.getSpan().nextText(n.namePrefix).nextTag("td4").tagContents(),S=""+a.getSpan().nextText(n.namePrefix).nextText(n.datePrefix).nextTag("td4").tagContents(),P=""+a.getSpan().nextText(n.namePrefix).nextText(n.timePrefix).nextTag("td4").tagContents(),i=a.getDetachedSpan(S+" "+P).innerDate(),o=a.getSpan().nextText(n.namePrefix).nextText(n.namePrefix).nextTag("td4").tagContents(),C=""+a.getSpan().nextText(n.datePrefix).nextText(n.datePrefix).nextTag("td4").tagContents(),h=""+a.getSpan().nextText(n.timePrefix).nextText(n.timePrefix).nextTag("td4").tagContents(),s=a.getDetachedSpan(C+" "+h).innerDate());var u=a.getSpan().nextText(n.pricePrefix).nextTag("td5").tagContents();if(T=""+u.innerCapture(/\d+\s+?(.)/,1),d=(""+u.tagContents()).replace(""+T,"").trim(),ASSERT(x,g,i))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:d,priceCurrency:T,reservationStatus:"http://schema.org/Reservation"+c,reservationId:x,underName:{"@type":"http://schema.org/Person",name:r},provider:{"@type":"http://schema.org/Organization",name:f},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:p}},pickupTime:i,pickupLocation:{"@type":"http://schema.org/Place",name:g},dropoffTime:s,dropoffLocation:{"@type":"http://schema.org/Place",name:o}}]}}).call();