// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var i,n,o,p,l,u,g=a.getSpan(),s=[],d=[];i=g.next(r.underName_prefix).nextAnyTag("td").tagContents(),n=g.next(r.reservationId_prefix).nextAnyTag("td").tagContents(),l=g.next(r.ticketNumber_prefix).nextAnyTag("td").tagContents(),s=g.next(r.itinerary_prefix).parentTag("td5").allInnerTags("table6");var c=function(e,t){e.forEach(function(e,r){if(r%2!==1){var i,n,o,p,l,u,g,s,d,c,m,h,v=e.allInnerTags("th6"),f=e.allInnerTags("td6");[,m,h]=/Flight(.*) (.*) /.exec(v[0]),[,p,l]=/ (.*)\((.*)\) /.exec(f[0]),i=f[1].tagContents(),n=f[2].tagContents(),o=getFuzzyDate(a.getDetachedSpan(i+" "+n).firstDate()),[,d,c]=/ (.*)\((.*)\) /.exec(f[3]),u=f[4].tagContents(),g=f[5].tagContents(),s=getFuzzyDate(a.getDetachedSpan(u+" "+g).firstDate()),t({airlineName:"Jeju Air",airlineCode:m,flightNumber:h,departureDateTime:o,departureAirport:p,departureAirportCode:l,arrivalDateTime:s,arrivalAirport:d,arrivalAirportCode:c})}})};return c(s,function(e){ASSERT(e.flightNumber,e.departureAirport,e.arrivalAirport)&&d.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:i},checkinUrl:u,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:o,priceCurrency:p,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:l,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:e.seatNumber,seatingType:e.seatType}}})}),d.length>=1?d:CONTINUE}}).call();