// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,i,o,s,p,c,g,d,m,u,h,l,x,C,v,S,T,A,y,f,D;if(c=r.getSpan().next(n.reservationId).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*(.*)/,n.reservationId),1),o=r.getSpan().next(n.arrivalDate).parentAnyTag("td").tagContents(),m=o.innerCapture(regExpFormatted(/\1\s*(.*)/,n.arrivalDate),1),l=o.innerCapture(regExpFormatted(/\1\s*(.*)/,n.departureDate),1),d=o.innerCapture(regExpFormatted(/\1\s*(.*)/,n.checkInTime),1),h=o.innerCapture(regExpFormatted(/\1\s*(.*)/,n.checkOutTime),1),d.exists()?(d=r.getDetachedSpan((""+d).replace(/([AP])\.M\./,"$1M")),u=combineDateAndTime(m,d)):u=m,h.exists()?(h=r.getDetachedSpan((""+h).replace(/([AP])\.M\./,"$1M")),x=combineDateAndTime(l,h)):x=l,f=r.getSpan().next(n.hotelInfo).nextAnyTag("td").tagContents(),v=f.innerCapture(/(.*)/,1),T=f.innerAddress(),S=(""+f.innerPhoneNumber()).replace(n.phone,""),a=r.getSpan().innerCapture(regExpFormatted(/\1\s*(.*)/,n.name),1),D=r.getSpan().next(n.price).nextAnyTag("td").tagContents(),s=D.innerCapture(/([\d,.]+)/,1),p=D.innerCapture(/([^\d,.]+)/,1).trim(),g=n.reservationStatus,ASSERT(a,v,u,x))return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:a,email:i},totalPrice:s,priceCurrency:p,checkinTime:u,checkoutTime:x,modifyReservationUrl:A,cancelReservationUrl:y,reservationStatus:"http://schema.org/Reservation"+(g||"Confirmed"),reservationId:c,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:v,url:C,telephone:S,address:T}}]}}).call();