(function(){return function(e,t){var r=Scanner.fromMessage(e);r.setLocale(t);var a,n,i,o,p=r.getSpan(),g=[],l=[];return a=/- (.*)/.exec(e.subject)[1],p.allInnerTags("table3").filter(function(e){return(""+e).indexOf("Flight")>-1}).forEach(function(e){var t,a,n,i,o,l,s,m,u,d="Singapore Airlines",c="SQ",T=/\((.*)\).*to.*\((.*)\).*\n/.exec(""+e);o=T[1],m=T[2];var h=e.nextAnyTag("table").nextAnyTag("table"),y=/((?:SQ|MI)[0-9]*)/.exec(""+h)[1];c=y.substr(0,2),t=y.substr(2);var b=(""+h.nextAnyTag("table").nextAnyTag("td").tagContents()).split("\n");i=b[0],n=b[1].replace(/[\(\)]/g," "),n=getFuzzyDate(r.getDetachedSpan(n).firstDate());var A=(""+h.nextAnyTag("table").nextAnyTag("table").nextAnyTag("td").tagContents()).split("\n");s=A[0],l=A[1].replace(/[\(\)]/g," "),l=getFuzzyDate(r.getDetachedSpan(l).firstDate()),u=p.next("Passengers").parentTag("table4").allInnerTags("tr4");var v;v=u[1].nextAnyTag("td").nextAnyTag("td").tagContents();var x=h.nextAnyTag("table").nextAnyTag("table").next("Flying time").nextAnyTag("td4").tagContents(),N=h.next("Seat selected:").parentTag("table5").nextTag("table5").allInnerTagsFiltered("td5");x=h.nextAnyTag("table").nextAnyTag("table").next("Flying time").parentTag("td4").nextAnyTag("td").tagContents().getString();var f=N[1];u.shift(),u.forEach(function(){g.push({airlineName:d,airlineCode:c,flightNumber:t,departureDateTime:n,departureAirport:i,departureAirportCode:o,arrivalDateTime:l,arrivalAirport:s,arrivalAirportCode:m,ticketNumber:a,underPersonName:v,seatNumber:f,seatType:x})})}),g.forEach(function(e){ASSERT(e.departureDateTime,e.arrivalDateTime,e.departureAirportCode,e.arrivalAirportCode),l.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:e.airlineName,airlineCode:e.airlineCode,flightNumber:e.flightNumber,departureAirportFuzzy:e.departureAirport,departureAirportCode:e.departureAirportCode,departureTime:e.departureDateTime,arrivalAirportFuzzy:e.arrivalAirport,arrivalAirportCode:e.arrivalAirportCode,arrivalTime:e.arrivalDateTime},underName:{"@type":"http://schema.org/Person",name:e.underPersonName},checkinUrl:o,reservationId:a,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:n,priceCurrency:i,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:e.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:e.seatNumber,seatingType:e.seatType}},programMembershipUsed:{"@type":"http://schema.org/ProgramMembership",membershipNumber:e.membershipNumber,programName:e.programName}})}),l.length>=1?l:CONTINUE}}).call();