(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,s,m,p,g,o,l,d,u,h,c,x,T,C,y,b,f,v,N,A,S,$,D,F,P=[],E={};n=a.getSpan().next(r.reservationId).parentAnyTag("td").tagContents().innerCapture(/(\w+)\s*$/,1),m=a.getSpan().nextText(r.passenger).nextTag("table2").allInnerTags("tr2").map(function(e){return e.allInnerTagsFiltered("td2")}).filter(function(e){if(!r.namesRegexExcludePassengerText.test(e)&&!r.namesRegexExcludeContactText.test(e)&&!r.namesRegexExcludeEmailText.test(e)&&!r.namesRegexExcludeMembershipText.test(e)&&e.length>0)return e}),l=a.getSpan().next(r.totalPrice).nextTag("td3").tagContents(),g=l.innerCapture(/([\d,.\s]+)/,1).trim(),o=l.innerCapture(/([^\d,.\s]+)/,1).trim(),a.getSpan().next(r.membership).exists()&&""!==(y=a.getSpan().nextText(r.membership).nextTag("td3").tagContents())&&(f=y.innerCapture(/(\w+)\s\d+/,1),b=y.innerCapture(/\w+\s(\d+)/,1));for(var R=0,k=m.length;R<k;R++)d=m[R],s=""+d[0],E[s]={name:s,programName:f,membershipNumber:b,ticketNumber:d[2],seats:{},seatingType:{},totalPrice:g,priceCurrency:o};for(D=a.getSpan().allInnerCapture(regExpFormatted(/(\1\s*\d+)/,r.flight),1),S=0;S<D.length;S++)$=D[S],v=$.nextAnyTag("td").tagContents().innerCapture(r.date),A="ja_JP"===t?v.$date+"-"+v.$month+"-"+v.$year:v.$date+" "+v.$month+" "+v.$year,v=N=a.getDetachedSpan(A).innerDate(),c=$.next(r.departure).nextAnyTag("td").tagContents(),x=c.nextAnyTag("td").tagContents(),T=x.next(r.arrival).nextAnyTag("td").tagContents(),C=T.nextAnyTag("td").tagContents(),F=C.next(r.flightInfo).nextAnyTag("td").tagContents().innerCapture(/($<airlineName>\w.*)\s+($<airlineCode>\D+)($<flightNumber>\d+)/),h=F.$airlineCode,p=F.$flightNumber,u=F.$airlineName,C.next(r.seatingType).nextAnyTag("td").tagContents(),c=combineDateAndTime(v,c),T.inner(r.overnight).exists()?(T=combineDateAndTime(N,T.innerDate()),T=modifyDate(T,1,0,0,0)):T=combineDateAndTime(N,T),ASSERT(p,c,x,T,C)&&(0===u.length&&(u="US Airways"),P.push({airlineName:u,airlineCode:h,flightNumber:p,departureAirport:x,departureTime:c,arrivalAirport:C,arrivalTime:T,passengers:E}));for(var z=[],S=0;S<P.length;S++)for(var $=P[S],I=Object.keys($.passengers),w=0;w<I.length;w++){var M=$.passengers[I[w]],U={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:$.airlineName,airlineCode:$.airlineCode,flightNumber:$.flightNumber,departureAirportFuzzy:$.departureAirport,departureAirportCode:$.departureCode,departureTime:$.departureTime,arrivalAirportFuzzy:$.arrivalAirport,arrivalAirportCode:$.arrivalCode,arrivalTime:$.arrivalTime},underName:{"@type":"http://schema.org/Person",name:M.name,email:M.email},checkinUrl:i,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:M.totalPrice,priceCurrency:M.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:M.seats[$.flightNumber],seatingType:M.seatingType[$.flightNumber]}}};M.membershipNumber&&M.programName&&(U.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:M.membershipNumber,programName:M.programName}),z.push(U)}if(z.length)return z}}).call();