// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(t,e,n){if(!n.emailTitelConfirmation.test(t.subject)&&!n.emailTitelCancelConfirmation.test(t.subject))return CONTINUE;if(int(t.epoch)<1356998400)return STOP;var a=Scanner.fromMessage(t);a.setLocale(e);var r,o,g,i,s,x,T,p,d,l,c,m,C,h;x=n.emailTitelConfirmation.test(t.subject)?"Confirmed":"Cancelled",s=a.getSpan().nextText(n.reservationID).nextTag("td1").tagContents(),l=a.getSpan().nextText(n.hotelName).nextTag("td1").tagContents();var u=a.getSpan().nextText(n.hotelAddress).nextTag("td1").tagContents(),S=a.getSpan().nextText(n.hotelAddress).nextTag("td1").nextTag("td1").nextTag("td1").tagContents();m=u+"\n"+S,c=a.getSpan().nextText(n.hotelPhone).nextTag("td1").tagContents(),T=a.getSpan().nextText(n.arrival).nextTag("td1").tagContents(),p=a.getSpan().nextText(n.departure).nextTag("td1").tagContents(),g=a.getSpan().nextText(n.price).nextTag("td1").tagContents().innerCapture(/([\d,.]+)/,1),i=a.getSpan().nextText(n.price).nextTag("td1").tagContents().innerCapture(/([^\d\s,.]+)/,1);var v=a.getSpan().nextText(n.firstNameText).parentTag("td1").tagContents().innerCapture(n.firstNameRegex,1),f=a.getSpan().nextText(n.lastNameText).parentTag("td1").tagContents().innerCapture(n.lastNameRegex,1);return r=v+" "+f,o=a.getSpan().nextText(n.email).nextText(n.email).nextTag("td1").tagContents(),h=a.getSpan().nextText(n.cancellationUrl).parentTag("td1").innerLink(),d=a.getSpan().nextText(n.hotelUrl).parentTag("td1").innerLink(),ASSERT(T,p,m)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:o},totalPrice:g,priceCurrency:i,checkinTime:T,checkoutTime:p,modifyReservationUrl:C,cancelReservationUrl:h,reservationStatus:"http://schema.org/Reservation"+(x||"Confirmed"),reservationId:s,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:l,url:d,telephone:c,address:m}}]:void 0}}).call();