(function(){return function(e,t,r){if(!e||!t||!r)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var i,n,o,p,s,l,m,c,d,u,g,h,T,v,x,C,y,f,A,F,I=a.getSpan(),N=[],P={};for(n=I.nextText(r.reservationId).parentTag("td1").tagContents().innerCapture(regExpFormatted(/\1(.+)/,r.reservationId),1).trim(),a.getSpan().nextText("KAIKKI YHT.").exists()&&(r.totalPrice=r.totalPrice_et),a.getSpan().nextText("Nimi").exists()&&(r.namePrefix=r.namePrefix_et),m=I.nextText(r.totalPrice).nextTag("td1").tagContents().innerCapture(/($<priceCurrency>[\w]+)\s($<totalPrice>[\d,.]+)/),c=m?m.$totalPrice:null,d=m?m.$priceCurrency:null,[,p]=I.nextText(r.namePrefix).nextTag("td1").tagContents().innerCapture(/:\s(.+)\s\(/),P[""+p]={name:p,totalPrice:c,priceCurrency:d},s=I.withInterval(I.nextText("Itinerary").getEnd(),I.nextText("Ok = confirmed").getStart()).allInnerTagsFiltered("tr1"),s.shift(),s.pop(),A=0;A<s.length;A++)if(!(/_/.test(s[A])||/Terminal/.test(s[A])||/Operated by/.test(s[A])||/Frequent flyer number/.test(s[A])||/Arrival Day/.test(s[A])||/Fare Basis/.test(s[A]))){var b=s[A].allInnerTagsFiltered("td1");T=(""+s[A]).match(/(.+)\n/)[0].trim(),C=b[0],[,u,l]=b[1].innerCapture(/([A-Z0-9]{2})(\d+)/),g=b[3],h=b[4],x=b[5],h=combineDateAndTime(g,h),x=combineDateAndTime(g,x),Date.parse(x)<Date.parse(h)&&(x=modifyDate(x,1)),ASSERT(l,h,x)&&N.push({airlineCode:u,flightNumber:l,departureTime:h,departureCode:v,departureAirport:T.trim(),arrivalTime:x,arrivalCode:y,arrivalAirport:C.trim(),passengers:P})}var S=[];for(A=0;A<N.length;A++){var k=N[A],z=Object.keys(k.passengers);for(F=0;F<z.length;F++){f=k.passengers[z[F]];S.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"FINNAIR",airlineCode:k.airlineCode,flightNumber:k.flightNumber,departureAirportFuzzy:k.departureAirport,departureAirportCode:k.departureCode,departureTime:k.departureTime,arrivalAirportFuzzy:k.arrivalAirport,arrivalAirportCode:k.arrivalCode,arrivalTime:k.arrivalTime},underName:{"@type":"http://schema.org/Person",name:f.name},checkinUrl:o,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:f.totalPrice,priceCurrency:f.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:i,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:""}}})}}return S.length?S:void 0}}).call();