(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,i,g,o,s,c,p,m,l,x,u,d,C,h,T,E,S,f;if(/(Bus|Event|Flight|FoodEstablishment|Lodging|RentalCar|Train)Reservation/.test(e.html))return CONTINUE;if(!n.emailTitelConfirmation.test(e.subject)&&!n.emailTitelCancelConfirmation.test(e.subject))return CONTINUE;s=a.getSpan().innerCapture(n.reservationId,1),r=a.getSpan().nextRegExp(n.guestName).nextAnyTag("td").tagContents(),i=a.getSpan().nextRegExp(n.guestEmail).nextAnyTag("td").tagContents(),m=a.getSpan().nextRegExp(n.checkInDate).nextAnyTag("td").tagContents(),p=a.getSpan().nextRegExp(n.checkInTime).nextAnyTag("td").tagContents().innerDate(),u=a.getSpan().nextRegExp(n.checkOutDate).nextAnyTag("td").tagContents(),x=a.getSpan().nextRegExp(n.checkOutTime).nextAnyTag("td").tagContents().innerDate(),u=modifyDate(m,u,0,0,0),l=getFuzzyDate(a.getDetachedSpan(m+" "+p).innerDate()),d=getFuzzyDate(a.getDetachedSpan(u+" "+x).innerDate());var R=a.getSpan().nextRegExp(n.price).nextAnyTag("td").tagContents();g=R.innerCapture(/([\d,.]+)/,1),o=R.innerCapture(/([^\d,.]+)/,1).trim(),h=a.getSpan().nextRegExp(n.hotelName).nextAnyTag("td").tagContents();var y=a.getSpan().nextRegExp(n.hotelInfo).parentAnyTag("td").tagContents();if(E=y.innerCapture(regExpFormatted(/.+\n.+\n([\s\S]*)\1/,n.hotelPhone),1),T=y.innerPhoneNumber(),f=a.getSpan().nextRegExp(n.cancelUrl).nextLink(),n.emailTitelConfirmation.test(e.subject)){if(!ASSERT(r,s,l,d,h))return CONTINUE;c="Confirmed"}if(n.emailTitelCancelConfirmation.test(e.subject)){if(!ASSERT(r,s,l,d,h))return CONTINUE;c="Cancelled"}return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:i},totalPrice:g,priceCurrency:o,checkinTime:l,checkoutTime:d,modifyReservationUrl:S,cancelReservationUrl:f,reservationStatus:"http://schema.org/Reservation"+(c||"Confirmed"),reservationId:s,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:h,url:C,telephone:T,address:E}}]}}).call();