// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("qantas-flight-confirmation-jp",function(e){return/^\u30ab\u30f3\u30bf\u30b9\u822a\u7a7a\u51fa\u767a\u60c5\u5831/.test(e.subject)},function(e){if(/^\u30ab\u30f3\u30bf\u30b9\u822a\u7a7a\u51fa\u767a\u60c5\u5831/.test(e.subject)){var t=Scanner.fromMessage(e);t.setLocale("ja_JP");var r,a,n,i,o,s,p,c,m,u,d,l,g,h,f,v,T,x=t.getSpan(),b=[],C={};for(a=x.nextText("\u3054\u4e88\u7d04\u756a\u53f7").parentTag("td4").tagContents().innerCapture(regExpFormatted(/\1(.+)/,"\u3054\u4e88\u7d04\u756a\u53f7"),1).trim(),o=x.withInterval(x.nextText("\u304a\u540d\u524d").getEnd(),x.nextText("\u51fa\u767a\u5730").getStart()).allInnerTagsFiltered("td6"),[,p,s]=o[o.length-1].innerCapture(/([A-Z0-9]{2})(\d+)/),o.pop(),o.pop(),v=0;v<o.length;v++)i=(""+o[v]).match(/(.+)\s/)[1].trim(),C[""+i]={name:i};c=x.nextText("\u65e5\u4ed8").nextTag("td6").innerDate(),u=(""+x.nextText("\u51fa\u767a\u5730").nextTag("td6").tagContents()).match(/(.+)\s/)[1].trim(),m=x.nextText("\u51fa\u767a\u5730").nextTag("td6").tagContents().innerDate(),m=combineDateAndTime(c,m),g=x.nextText("\u3078").nextTag("td6").tagContents().trim(),ASSERT(s,m)&&b.push({airlineCode:p,flightNumber:s,departureTime:m,departureCode:d,departureAirport:u.trim(),arrivalTime:l,arrivalCode:h,arrivalAirport:g.trim(),passengers:C});var A=[];for(v=0;v<b.length;v++){var j=b[v],y=Object.keys(j.passengers);for(T=0;T<y.length;T++){f=j.passengers[y[T]];var S={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"Qantas",airlineCode:j.airlineCode,flightNumber:j.flightNumber,departureAirportFuzzy:j.departureAirport,departureAirportCode:j.departureCode,departureTime:j.departureTime,arrivalAirportFuzzy:j.arrivalAirport,arrivalAirportCode:j.arrivalCode,arrivalTime:j.arrivalTime},underName:{"@type":"http://schema.org/Person",name:f.name},checkinUrl:n,reservationId:a,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:f.totalPrice,priceCurrency:f.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:r,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:""}}};A.push(S)}}if(A.length)return A}},"0/1/2/3/4/5/240/522/523","SG9678b957"),new ReverseTemplate("quantas.com-confirmation-de",function(e){return/^Abfluginformationen/.test(e.subject)},function(e){if(/^Abfluginformationen/.test(e.subject)){var t="de_DE",r=loadHelper("quantas.com-microdata.js"),a=parseMicrodata(e.html),n=r(a,e,t);return n}},"0/1/2/3/4/5/240/524/525","SG43cd9a3f"),new ReverseTemplate("quantas.com-confirmation-en",function(e){return/^E-ticket/.test(e.subject)},function(e){if(/^E-ticket/.test(e.subject)){var t="en_AU",r=loadHelper("quantas.com-microdata.js"),a=parseMicrodata(e.html),n=r(a,e,t);return n}},"0/1/2/3/4/5/240/524/526","SGca73a52a"),new ReverseTemplate("quantas.com-departure-reminder-en",function(e){return/^Qantas Departure Information/.test(e.subject)},function(e){if(/^Qantas Departure Information/.test(e.subject)){var t="en_AU",r=loadHelper("quantas.com-microdata.js"),a=parseMicrodata(e.html),n=r(a,e,t);return n}},"0/1/2/3/4/5/240/524/527","SG2973b4d2")]);