// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,i,o=a.getSpan().nextText(n.modifyReservationUrlPrefix).parentTag("td3").innerLink(),g=a.getSpan().nextText(n.hotelInformationHeader).nextTag("table3"),x=g.nextTag("td3").tagContents().innerCapture(/($<name>.*)<($<url>.*)>($<address>[^]*)/),s=x.$name.trim(),d=x.$url.trim(),c=a.getDetachedSpan((""+x.$address).replace(/\|/g,"").replace(/\s+/g," ").trim()),T=d.nextText(n.phoneNumberAndFaxPrefix).nextTag("td3").nextTag("td3").firstPhoneNumber(),m=T.nextText(n.checkInTimePrefix).nextTag("td3").nextTag("td3").tagContents(),p=g.nextText(n.bookingInformationHeader).nextTag("table4").nextTag("table4"),l=p.nextText(n.bookingNumberPrefix).nextTag("td4").nextTag("td4").tagContents().trim(),h=p.nextText(n.guestNamePrefix).nextTag("td4").nextTag("td4").tagContents().trim(),u=p.nextText(n.stayIntervalPrefix).nextTag("td4").nextTag("td4").innerDate(),f=a.getDateDD(u);valid(f)&&(i=a.getDetachedSpan(f.endIso8601),r=a.getDetachedSpan(f.iso8601+" "+m).innerDate());var v=u.nextText(n.totalPricePrefix).nextTag("td4").nextTag("td4").tagContents().innerCapture(regExpFormatted(/($<price>[\d\.,]+)\s($<currency>\w+)/)),P=v.$price.trim(),S=v.$currency.trim();return ASSERT(s,h,r,i)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:h},totalPrice:P,priceCurrency:S,checkinTime:r,checkoutTime:i,modifyReservationUrl:o,cancelReservationUrl:o,reservationStatus:"http://schema.org/ReservationCancelled",reservationId:l,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:s,url:d,telephone:T,address:c}}]:STOP}}).call();