// 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,l,u,m,s,d=[],g=[];for(i=a.getSpan().next(t.passenger).nextAnyTag("td").tagContents().innerCapture(/($<name>.*)\n($<reservationId>.*)\n($<ticketNumber>.*)/),n=a.getSpan().next(t.departure).parentAnyTag("table").allInnerTags("tr3"),s=1;s<n.length;s++)p={},o=n[s].allInnerTags("td3"),p.departureAirportFuzzy=o[0].tagContents().innerCapture(/(.*)/,1),p.arrivalAirportFuzzy=o[1].tagContents().innerCapture(/(.*)/,1),p.departureTime=combineDateAndTime(o[2].innerDate(),o[2].lastInnerDate()),p.arrivalTime=combineDateAndTime(o[3].innerDate(),o[3].lastInnerDate()),l=o[4].tagContents().innerCapture(/($<airlineCode>\D{2})($<flightNumber>\d+)/),p.airlineCode=l.$airlineCode,p.flightNumber=l.$flightNumber,p.seatingType=o[5].tagContents(),ASSERT(p.airlineCode,p.flightNumber,p.departureAirportFuzzy,p.arrivalAirportFuzzy,p.departureTime,p.arrivalTime,i.$name)&&d.push(p);for(var h=0;h<d.length;h++){p=d[h];var c={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"Alitalia Linee Aeree Italiane",airlineCode:p.airlineCode,flightNumber:p.flightNumber,departureAirportFuzzy:p.departureAirportFuzzy,departureAirportCode:p.departureAirportCode,departureTime:p.departureTime,arrivalAirportFuzzy:p.arrivalAirportFuzzy,arrivalAirportCode:p.arrivalAirportCode,arrivalTime:p.arrivalTime},underName:{"@type":"http://schema.org/Person",name:i.$name},checkinUrl:"",reservationId:i.$reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:u,priceCurrency:m,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:i.$ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:p.seatingType}}};g.push(c)}if(g.length)return g}}).call();