(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var n,i,o,p,s,h,l,d,m,g,c,u,v,C=[],f=[];s=a.getSpan(),n=s.innerCapture(regExpFormatted(/\1(.+)/,t.reservationId),1);for(var o=[],T=a.getSpan().next(t.firstName).parentAnyTag("table"),y=T.allInnerTags("tr3"),F=1;F<y.length;F++){var A=y[F].allInnerTagsFiltered("td3");o.push(A[0]+" "+A[1]+" "+A[2])}if(t.flightCheck.test(e.plain)){for(var x=a.getSpan().next(t.flightCheck).parentAnyTag("table"),D=x.allInnerTags("tr4"),k=x.allInnerTagsFiltered("th4"),C=[],F=0;F<D.length/2;F++){var b=D[2*F].allInnerTagsFiltered("td4"),S=D[2*F+1].allInnerTagsFiltered("td4"),h=k[F].innerCapture(/($<airlineCode>[A-Z]{2,3})($<flightNumber>\d+)/),l=h.$airlineCode,p=h.$flightNumber,m=S[0],g=b[1],I=b[2].innerDate(),d=b[3].innerDate(),E=combineDateAndTime(I,d),u=S[1],v=b[4],N=b[5].innerDate(),c=b[6].innerDate(),z=combineDateAndTime(N,c);ASSERT(E,z,g,v)&&C.push({departureTime:E,arrivalTime:z,departureAirport:m,arrivalAirport:u,departureCode:g,arrivalCode:v,airlineCode:l,flightNumber:p})}for(var F=0;F<C.length;F++)for(var b=C[F],R=0;R<o.length;R++){var P={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:b.airlineCode,flightNumber:b.flightNumber,departureAirportFuzzy:b.departureAirport,departureAirportCode:b.departureCode,departureTime:b.departureTime,arrivalAirportFuzzy:b.arrivalAirport,arrivalAirportCode:b.arrivalCode,arrivalTime:b.arrivalTime},underName:{"@type":"http://schema.org/Person",name:o[R]},checkinUrl:i,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:null,priceCurrency:null};f.push(P)}}if(t.hotelCheck.test(e.plain)){var L=s.next(t.hotelCheck).nextDate().parentAnyTag("td").tagContents(),$=(""+L.innerCapture(/(.*?)\n/,1)).split(",")[0],j=L.firstDate().innerCapture(regExpFormatted(/\1\s(.+?)\s\2\s(.+)/,t.from,t.to)),O=j[1].innerCapture(/\s(.+)/,1),w=j[2].innerCapture(/\s(.+)/,1),B=L.innerCapture(regExpFormatted(/\1\s+?\n?(.+)/,t.phone),1),M=L.innerCapture(regExpFormatted(/\1\s+?\n?([\w\n\-\s\.]+)/,t.address),1).trim(),M=M.replace(/\n/g,", "),P={"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:o[0]},checkinDate:O,checkoutDate:w,reservationStatus:"http://schema.org/ReservationConfirmed",reservationId:n,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:$,telephone:B,address:M}};f.push(P)}if(t.carCheck.test(e.plain)){var U=s.next(t.carCheck).nextDate().parentAnyTag("td").tagContents(),Z=U.innerCapture(/(.*?)\n/,1),j=U.innerDate().innerCapture(regExpFormatted(/\1\s(.+?)\s\2\s(.+)/,t.from,t.to)),q=j[1].split(" "),G=q[2]+":00",H=q[1].split("/").reverse().join("-"),J=combineDateAndTime(H,a.getDetachedSpan(G)),J=J.replace(/\//g,"-"),K=j[2].split(" "),Q=K[2]+":00",V=K[1].split("/").reverse().join("-"),W=combineDateAndTime(V,a.getDetachedSpan(Q)),X=U.innerCapture(regExpFormatted(/\1\s(.+)/,t.pickup),1),Y=U.innerCapture(regExpFormatted(/\1\s(.+)/,t.dropoff),1),_=a.getSpan().next(t.carCheck).parentAnyTag("td").innerCapture(regExpFormatted(/\1\s(.+)/,t.supplied),1),P={"@type":"http://schema.org/RentalCarReservation","@context":"http://schema.org",provider:{name:_,"@type":"http://schema.org/Organization"},underName:{name:o[0],"@type":"http://schema.org/Person"},pickupTime:J,dropoffTime:W,reservationId:n,pickupLocation:{name:X.trim(),"@type":"http://schema.org/Place",address:X.trim()},reservationFor:{"@type":"http://schema.org/Car",brand:{name:Z,"@type":"http://schema.org/Organization"}},dropoffLocation:{name:Y.trim(),"@type":"http://schema.org/Place",address:Y.trim()},reservationStatus:"http://schema.org/ReservationConfirmed"};f.push(P)}if(f.length)return f}}).call();