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