(function(){return function(e,t,n){if(!e||!t||!n)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var r,i,s,c,l,o,d,p,g,h,v,D,u;r=a.getSpan().nextText(n.reservedFor).nextAnyTag("td").tagContents(),""+r==""&&(r=r.nextAnyTag("td").tagContents()),r=r.innerCapture(/(.*)\s+\d/,1).trim(),s=a.getSpan().innerCapture(regExpFormatted(/\s\1 (\d+)/,n.reservationId),1),i=s.parentAnyTag("table");var T,m=a.getSpan().next(n.check).parentAnyTag("table");do{if(""!==(T=m.allInnerTagsFiltered("td5")[0])&&void 0!==T){v=T;break}m=m.previousAnyTag("table")}while(m.exists());if(valid(i)){if(i=i.allInnerTagsFiltered("td"+i.getTagNumber()),i.length>=2)if(d=a.getDateDD(i[1].innerDate()),valid(d)&&"fr_FR"!==t)g=a.getDetachedSpan(d.endIso8601),p=a.getDetachedSpan(d.iso8601);else if(i[1].innerText("/").exists()){var k,f,S=i[1].innerCapture(/($<checkInDate>\d{4}\/\w+\/\d+).+($<checkOutDate>\d{4}\/\w+\/\d+)/);S&&S.$checkInDate&&S.$checkOutDate?(k=(""+S.$checkInDate).split("/"),k.length>=3&&(p=a.getDetachedSpan(k[1]+"/"+k[2]+"/"+k[3]).innerDate()),f=(""+S.$checkOutDate).split("/"),f.length>=3&&(g=a.getDetachedSpan(f[1]+"/"+f[2]+"/"+f[3]).innerDate())):(S=i[1].innerCapture(/($<checkInDate>\d+\/\w+\/\d{4}).+($<checkOutDate>\d+\/\w+\/\d{4})/))&&S.$checkInDate&&S.$checkOutDate&&(p=a.getDetachedSpan((""+S.$checkInDate).replace("/"," ")).innerDate(),g=a.getDetachedSpan((""+S.$checkOutDate).replace("/"," ")).innerDate())}else{var $=(""+i[1]).replace(/\,/g,"").split("-");p=a.getDetachedSpan($[0]).innerDate(),g=a.getDetachedSpan($[1]).innerDate()}}if("ja_JP"===t){for(var x=a.getSpan().next("\u30db\u30c6\u30eb\u306e\u8a73\u7d30\u3092\u8868\u793a\u3059\u308b"),y=x.allInnerAbsoluteDates();!x.isNullSpan_&&0===y.length;)x=x.previousAnyTag("td"),y=x.allInnerAbsoluteDates();var C=y[0].innerCapture(/($<first>[\d\,\-\\\/ ]+)\s-\s($<second>[\d\,\-\\\/ ]+)/);g=C?C.$second:null,p=C?C.$first:null}if(h=a.getSpan().next(n.hotelDetails).nextLink(),i=h.parentAnyTag("td").tagContents(),u=i.innerCapture(regExpFormatted(/\1.*?>\s+(.*)[<|\n]/,n.hotelDetails),1).trim(),/Gracias por reservar con Travelocity/i.test(e.plain)||/Gracias por realizar tu reserva con Travelocity/i.test(e.plain)||/Thanks!/.test(e.plain)||/Thank you for booking with Travelocity!/.test(e.plain)||/Merci\sd\u2019avoir\sr\xe9serv\xe9\svotre\svoyage\savec\sTravelocity\s!/i.test(e.plain)||/Grazie\sper\saver\sscelto\sdi\sprenotare\scon\sTravelocity!/i.test(e.plain)||/\u30a8\u30af\u30b9\u30da\u30c7\u30a3\u30a2 \u3067\u3054\u4e88\u7d04\u3044\u305f\u3060\u304d\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002/.test(e.plain)){var A=u.innerCapture(/($<first>.*)\s<($<second>.*)>/),I=A?A.$second:null,b=A?A.$first:null;I=" <https:"+I+">",u=a.getDetachedSpan(""+b+I)}i.innerAddress().getLength()>=u.getLength()&&(u=i.innerAddress()),D=i.innerCapture(regExpFormatted(/\b\1 ([-\d\(\) ]+),/,n.telephone),1),o=a.getSpan().next(n.checkin).next(n.checkinTime).parentAnyTag("td").innerCapture(regExpFormatted(/(\1\s*.*)/,n.checkinTime),1),o=o.innerDate().exists()?o.innerDate():o,valid(p,o)&&(p=combineDateAndTime(p,o));var F="Confirmed";return n.cancelled.test(e.plain)&&(F="Cancelled"),e.to,ASSERT(u,p)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r},checkinTime:p,checkoutTime:g,modifyReservationUrl:c,cancelReservationUrl:l,reservationStatus:"http://schema.org/Reservation"+F,reservationId:s,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:v,url:h,telephone:D,address:u}}]:void 0}}).call();