// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,o,g,i,s,p,c,d,u,h,m,l,x,y;y=a.getSpan().next(n.checkin).parentAnyTag("td").nextAnyTag("td").tagContents(),d=getFuzzyDate(a.getDetachedSpan(""+y.innerCapture(n.dates).$checkin)),u=getFuzzyDate(a.getDetachedSpan(""+y.innerCapture(n.dates).$checkout)),p=a.getSpan().next(n.confirmation).innerCapture(regExpFormatted(n.confirmation),1),g=a.getSpan().next(n.totalPrice).parentAnyTag("td").nextAnyTag("td").tagContents(),i=g.innerCapture(/([\d,.]+)/,1),s=g.innerCapture(/([^\d,.]+)/,1).trim(),r=a.getSpan().next(n.guestDetails).next(n.guestName).parentAnyTag("td").nextAnyTag("td").tagContents(),o=a.getSpan().next(n.guestDetails).next(n.guestEmail).parentAnyTag("td").nextAnyTag("td").tagContents();var S=a.getSpan().next(n.bookingDetails);if(h=S.next(n.hotelName).parentAnyTag("td").nextAnyTag("td").tagContents(),l=a.getSpan().next(n.bookingDetails).nextAddress(),m=a.getSpan().next(n.hotelPhone).innerCapture(n.hotelPhone,1),ASSERT(r,d,u,l))return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:o},totalPrice:i,priceCurrency:s,checkinTime:d,checkoutTime:u,modifyReservationUrl:x,reservationStatus:"http://schema.org/Reservation"+(c||"Confirmed"),reservationId:p,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:h,url:null,telephone:m,address:l}}]}}).call();