// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,i,s,o,c,g,p,m,d,l,u,x,h,C;if(!n.emailTitelConfirmation.test(e.subject)&&!n.emailTitelCancelConfirmation.test(e.subject))return CONTINUE;c=a.getSpan().nextRegExp(n.reservationId).parentTag("td2").tagContents(),c=(""+c).replace("\n",""),c=regExpFormatted(/\1(.*)/,n.reservationId).exec(c)[1],r=a.getSpan().nextRegExp(n.guestName).parentTag("td2").tagContents(),r=(""+r).replace("\n",""),r=regExpFormatted(/\1(.*)/,n.guestName).exec(r)[1],p=a.getSpan().next(n.checkInDate).firstDate(),m=a.getSpan().next(n.checkOutDate).firstDate();var f=a.getSpan().nextRegExp(n.price).parentTag("table5").lastInnerTag("td5").tagContents();if(s=f.innerCapture(/([\d,.-]+)/,1),o=f.innerCapture(/([^\d,.-]+)/,1).trim(),x=a.getSpan().nextRegExp(n.address).parentTag("td2").tagContents(),x=(""+x).replace(/\n/g," "),x=regExpFormatted(/\1(.*)/,n.address).exec(x)[1].trim(),n.emailTitelConfirmation.test(e.subject)){if(!ASSERT(r,c,p,m))return CONTINUE;g="Confirmed"}return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:i},totalPrice:s,priceCurrency:o,checkinTime:p,checkoutTime:m,modifyReservationUrl:h,cancelReservationUrl:C,reservationStatus:"http://schema.org/Reservation"+(g||"Confirmed"),reservationId:c,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:l,url:d,telephone:u,address:x}}]}}).call();