// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("thrifty.com-reservation-en",function(e){return/Your Thrifty Car Rental (?:Confirmation|Cancellation|Reservation)/.test(e.subject)},function(e){if(/Your Thrifty Car Rental (?:Confirmation|Cancellation|Reservation)/.test(e.subject)){var t=Scanner.fromMessage(e);t.setLocale("en_US");var n,a,r,o,i,s,p,g,c,T,x,l,m,C,h,y,d,u,f,v;/Your Thrifty Car Rental Cancellation/.test(e.subject)&&(r="Cancelled"),l=t.getSpan().nextText("Name:").parentAnyTag("td").tagContents(),n=l.innerCapture(/Name: (.*)\s/,1).trim(),c=l.innerCapture(/Vehicle Type: (.*)/,1),0===(""+c).length&&(c=l.next("Vehicle Type").nextAnyTag("td").tagContents().trim()),a=t.getSpan().nextText("Confirmation #").parentAnyTag("td").tagContents().innerCapture(/Confirmation # : (.*)/,1);var R=t.getSpan().nextText("VEHICLE PICKUP INFO").nextAnyTag("table");v=R.nextText("Date/Time:").nextAnyTag("td").innerDate(),u=R.nextText("Location:").nextAnyTag("td").tagContents().innerCapture(/(.*)\s(?:Map <)?/,1),f=R.nextText("Phone:").nextAnyTag("td").tagContents();var A=t.getSpan().nextText("VEHICLE RETURN INFO").nextAnyTag("table");if(y=A.nextText("Date/Time:").nextAnyTag("td").innerDate(),C=A.nextText("Location:").nextAnyTag("td").tagContents().innerCapture(/(.*)\s(?:Map <)?/,1),h=A.nextText("Phone:").nextAnyTag("td").tagContents(),p=t.getSpan().nextText("Estimated Grand Total:").nextAnyTag("td").tagContents().innerCapture(/([\d,.]+)/,1),g=t.getSpan().nextText("Currency:").nextAnyTag("td").tagContents(),l=t.getSpan().nextTag("table3").allInnerLinks(),4===l.length&&(i=l[1],s=l[1]),ASSERT(n,c,u,v))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:p,priceCurrency:g,reservationStatus:"http://schema.org/Reservation"+(r||"Confirmed"),reservationId:a,checkinUrl:o,modifyReservationUrl:i,cancelReservationUrl:s,underName:{"@type":"http://schema.org/Person",name:n},provider:{"@type":"http://schema.org/Organization",name:"Thrifty"},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:c},license:T,color:x},pickupTime:v,pickupLocation:{"@type":"http://schema.org/Place",name:d,telephone:f,address:u},dropoffTime:y,dropoffLocation:{"@type":"http://schema.org/Place",name:m,telephone:h,address:C}}]}},"0/1/2/3/4/5/6/220/221","SG358b2b21")]);