// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(t,e,n){var a=Scanner.fromMessage(t);a.setLocale(e);var r,o,i,p,x,g,s,c,f,d,m,T,l,h,P,u,S,v,C="Confirmed";i=(""+a.getSpan().innerCapture(regExpFormatted(/\b\1(.*)\n/,n.carReservationIdPrefix),1)).trim();var y=""+a.getSpan().nextText(n.pickupLocationPrefix).nextTag("td4").tagContents();y=y.split("\n"),s=y[0],c=y[1],f=y[3];var D=""+a.getSpan().nextText(n.pickupDatePrefix).nextTag("td4").tagContents(),L=""+a.getSpan().nextText(n.pickupTimePrefix).nextTag("td4").tagContents();d=getFuzzyDate(a.getDetachedSpan(D+" "+L).firstDate());var R=""+a.getSpan().nextText(n.dropoffLocationPrefix).nextTag("td4").tagContents();R=R.split("\n"),m=R[0],T=R[1],l=R[3];var z=""+a.getSpan().nextText(n.dropoffLocationPrefix).nextText(n.dropoffDatePrefix).nextTag("td4").tagContents(),k=""+a.getSpan().nextText(n.dropoffLocationPrefix).nextText(n.dropoffTimePrefix).nextTag("td4").tagContents();h=getFuzzyDate(a.getDetachedSpan(z+" "+k).firstDate());var F=""+a.getSpan().nextText(n.carBrandPrefix).nextTag("td4").tagContents();p=F.substring(F.indexOf(")")+1,F.lastIndexOf(n.carBrandSuffix)).trim();var O=a.getSpan().nextText(n.totalPricePrefix).nextTag("td4").tagContents();if(S=O.split(" ")[0],v=O.split(" ")[1],r=a.getSpan().nextText(n.underPersonNamePrefix).nextTag("td4").tagContents(),o=a.getSpan().nextText(n.underPersonEmailPrefix).nextTag("td4").tagContents(),ASSERT(i,f,d))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:S,priceCurrency:v,reservationStatus:"http://schema.org/Reservation"+C,reservationId:i,modifyReservationUrl:P,cancelReservationUrl:u,underName:{"@type":"http://schema.org/Person",name:r,email:o},provider:{"@type":"http://schema.org/Organization",name:"Solmar"},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:p},license:x,color:g},pickupTime:d,pickupLocation:{"@type":"http://schema.org/Place",name:s,telephone:c,address:f},dropoffTime:h,dropoffLocation:{"@type":"http://schema.org/Place",name:m,telephone:T,address:l}}]}}).call();