// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,n,o,p,m=a.getSpan(),u="Confirmed",d=[],l=[];i=""+m.next(t.reservationId_prefix).parentAnyTag("td").tagContents(),i=/: (.*)/.exec(i)[1];var s=t.leg_prefixes;return s.forEach(function(e){var r,i,n,o,p,u,l,s,g,c,h="Volotea",A="V7",v=m.next(e);if(v===a.getNullSpan())return null;var N=v.nextAnyTag("td").nextAnyTag("td"),T=N.nextAnyTag("td"),n=T.nextAnyTag("td"),l=n.nextAnyTag("td"),x=l.nextAnyTag("td");N=/(.*) \xb7 (.*)/.exec(""+N.tagContents()),p=N[1],g=N[2],T=T.nextDate(),n=n.nextDate(),l=l.nextDate(),o=combineDateAndTime(T,n),s=combineDateAndTime(T,l),r=/V7 ([0-9]*)/.exec(""+x)[1];var y=m.next(t.passager);if(""+y!="")for(;""+y!="";){var b=y.nextAnyTag("td").tagContents();d.push({airlineName:h,airlineCode:A,flightNumber:r,departureDateTime:o,departureAirport:p,departureAirportCode:u,arrivalDateTime:s,arrivalAirport:g,arrivalAirportCode:c,ticketNumber:i,underPersonName:b}),y=y.next(t.passager)}else d.push({airlineName:h,airlineCode:A,flightNumber:r,departureDateTime:o,departureAirport:p,departureAirportCode:u,arrivalDateTime:s,arrivalAirport:g,arrivalAirportCode:c,ticketNumber:i})}),d.forEach(function(e){ASSERT(e.departureAirport,e.arrivalAirport,e.flightNumber,e.airlineName,e.arrivalDateTime,e.departureDateTime),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:p,reservationId:i,reservationStatus:"http://schema.org/Reservation"+u,totalPrice:n,priceCurrency:o,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();