// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,o,i,x,g,s,p,d,c,T,h,m,l,f,C,y=r.getSpan(),u="Confirmed";o=y.innerCapture(n.reservationIdRegExp,1),i=y.nextText(n.carBrandPrefix).nextAnyTag("td").tagContents();var P=y.nextText(n.pickUpBlockHeader);p=P.nextText(n.dateTimePrefix).nextAnyTag("td").tagContents(),0===(""+p).length&&(p=p.nextAnyTag("td").tagContents()),p=p.innerDate(),s=P.nextText(n.addressPrefix).nextAnyTag("td").tagContents(),0===(""+s).length&&(s=s.nextAnyTag("td").tagContents()),s=s.innerCapture(/(.+)\b/,1),g=P.nextText(n.telephonePrefix).nextAnyTag("td").tagContents();var v=y.nextText(n.dropOffBlockHeader);h=v.nextText(n.dateTimePrefix).nextAnyTag("td").tagContents(),0===(""+h).length&&(h=h.nextAnyTag("td").tagContents()),h=h.innerDate(),T=v.nextText(n.addressPrefix).nextAnyTag("td").tagContents(),0===(""+T).length&&(T=T.nextAnyTag("td").tagContents()),T=T.innerCapture(/(.+)\b/,1),c=v.nextText(n.telephonePrefix).nextAnyTag("td").tagContents(),m=l=y.nextText(n.modifyReservationUrl).nextLink(),a=r.getSpan().next(n.underPersonNamePrefix).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.+)/,n.underPersonNamePrefix),1);var A=y.nextText(n.pricePrefix).nextAnyTag("td").tagContents().innerCapture(/(\D)([\d,.]+)/);if(A&&A!==r.getNullSpan()?[,C,f]=A:(A=y.innerCapture(regExpFormatted(/\1\s(\D)\s?([\d,.]+)/,n.pricePrefix)),A&&3===A.length?[,C,f]=A:(A=y.innerCapture(regExpFormatted(/\1\s??([\d,.]+)\s(\D)/,n.pricePrefix)),A&&3===A.length&&([,C,f]=A))),ASSERT(o,p,OR(h,s)))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:f,priceCurrency:C,reservationStatus:"http://schema.org/Reservation"+u,reservationId:o,modifyReservationUrl:m,cancelReservationUrl:l,underName:{"@type":"http://schema.org/Person",name:a},provider:{"@type":"http://schema.org/Organization",name:"Dollar Rent A Car"},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:i}},pickupTime:p,pickupLocation:{"@type":"http://schema.org/Place",name:x,telephone:g,address:s},dropoffTime:h,dropoffLocation:{"@type":"http://schema.org/Place",name:d,telephone:c,address:T}}]}}).call();