(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,l,d,p,u,o,m,s,g,A,c=a.getSpan(),C=[],T=[],h=c.next(r.dates).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+($<firstDate>.*)\s-\s($<secondDate>.*)/,r.dates)),$=h?h.$firstDate:null;c.next(r.itNum).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+(.*)/,r.itNum),1);i=r.cancelled.test(e.plain)?"Cancelled":"Confirmed",h=c.next(r.confirmation).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+($<confirm>.*)\s*\(($<airlineName>.*)\)/,r.confirmation)),n=h?h.$confirm:null,l=h?h.airlineName:null,null===n&&(n=c.next(r.itNum).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+(\d+)/,r.itNum),1));var v=(""+c.next(r.ticket).parentAnyTag("td").tagContents()).split("\n").filter(function(e){return e.length>0}).map(function(e){return e.replace(/(\d+)\s*\((.*)\)/,"$1")}),f=(""+c.next(r.ticket).parentAnyTag("td").tagContents()).split("\n").filter(function(e){return e.length>0}).map(function(e){return e.replace(/(\d+)\s*\((.*)\)/,"$2")});h=a.getSpan().next(r.departure).parentAnyTag("td").nextAnyTag("td").tagContents().innerCapture(/[a-zA-Z ]+($<flightNumber>\d+)\s(?:\1.*)?/);for(var x=1;x<v.length;x++)C.push({name:f[x],ticketNumber:v[x]});void 0!==v&&0!==v.length||C.push({name:a.getSpan().next(r.traveler).nextAnyTag("td").tagContents().innerCapture(/([^\n]+)\s[\n]+/,1).trim(),ticketNumber:null});var b=c.next(r.dep).parentAnyTag("table"),N=c.next(r.ari).parentAnyTag("table"),y=function(e,t){for(var n,i=e.allInnerTagsFiltered("table8"),l=a.getDetachedSpan(""+c.next(t).parentAnyTag("table").innerDate()),A=!1,C=0;C<i.length;C+=2){var h=c.next(t).parentAnyTag("table").allInnerTagsFiltered("table8")[C].innerCapture(/($<dep>[a-zA-Z ]+)\s\(($<depCode>\w+)\)\s[\n]+\s*\[.*\]\s($<time>\d?\d:\d\d(?:am|pm)?)($<day>\s\+\d\s\w+)?/i);u=h?h.$dep:null,p=h?h.$time:null,o=h?h.$depCode:null,p=combineDateAndTime(l,p);var $=c.next(t).parentAnyTag("table").allInnerTagsFiltered("table8")[C+1].innerCapture(/($<dep>[a-zA-Z ]+)\s\(($<depCode>\w+)\)\s[\n]+\s*\[.*\]\s($<time>\d?\d:\d\d(?:am|pm)?)($<day>\s\+\d\s\w+)?/i);s=$?$.$dep:null,m=$?$.$time:null,g=$?$.$depCode:null;($?$.$day:null).isNullSpan_?m=combineDateAndTime(l,m):(l=modifyDate(l,1),m=combineDateAndTime(l,m)),C>1&&(A=!0),n=A?c.next(u).next(u).next(u):c.next(u);var v=n.parentAnyTag("td").previousTag("td6").tagContents().innerCapture(regExpFormatted(/[a-zA-Z ]+($<flightNumber>\d+)\s?(?:\1.*)?/,r.op));d=v?v.$flightNumber:null,ASSERT(u,p,s,m)&&T.push({departureAirport:u,departureCode:o,departureTime:p,arrivalTime:m,arrivalAirport:s,flightNumber:d,arrivalCode:g})}};if(y(b,r.dep),y(N,r.ari),0===T.length)for(var F=c.next(r.departure).nextTag("table7"),S=c.next(r.departure).nextTag("table7").allInnerTagsFiltered("td8");!F.isNullSpan_&&0!==S.length;){h=S[0].innerCapture(/($<airlineName>[a-zA-Z\s]+)\s\(($<airlineCode>[\d\w]+)\)/),u=h?h.$airlineName:null,o=h?h.$airlineCode:null,p=S[1];var z=F.previousAnyTag("td").tagContents().innerCapture(regExpFormatted(/[a-zA-Z ]+($<flightNumber>\d+)\s?(?:\1.*)?/,r.op));d=z?z.$flightNumber:null,p=combineDateAndTime(a.getDetachedSpan(""+$),p),h=S[2].innerCapture(/($<airlineName>[a-zA-Z]+)\s\(($<airlineCode>[\d\w]+)\)/),s=h?h.$airlineName:null,g=h?h.$airlineCode:null,m=S[3],/\d?\d:\d{2}(?:AM|PM)?/i.test(m)||(m=S[4]),m=combineDateAndTime(a.getDetachedSpan(""+$),m),ASSERT(u,p,s,m)&&T.push({departureAirport:u,departureCode:o,departureTime:p,arrivalTime:m,arrivalAirport:s,flightNumber:d,arrivalCode:g}),F=F.nextTag("table7"),S=F.allInnerTagsFiltered("td8")}for(var D=[],A=0;A<T.length;A++)for(var E=T[A],Z=0;Z<C.length;Z++){var k={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:l,flightNumber:E.flightNumber,departureAirportFuzzy:E.departureAirport,departureAirportCode:E.departureCode,departureTime:E.departureTime,arrivalAirportFuzzy:E.arrivalAirport,arrivalAirportCode:E.arrivalCode,arrivalTime:E.arrivalTime},underName:{"@type":"http://schema.org/Person",name:C[Z].name},reservationId:n,ticketNumber:C[Z].ticketNumber,reservationStatus:"http://schema.org/Reservation"+i};D.push(k)}return D}}).call();