new ReverseTemplateList([new ReverseTemplate("alaskaair.com-cancellation-en",function(e){return/^Canceled Reservation: Your .*? Trip|Cancellation Confirmation/.test(e.subject)},function(e){if(int(e.epoch)<1356998400)return CONTINUE;var r=Scanner.fromMessage(e);r.setLocale("en_US");var t,a,i,n,o,p,s,m,u,l,c,d,g,h=[],v={};if(/^Canceled Reservation:|Cancellation Confirmation/.test(e.subject)){var C=/\s($<name>.*)\s+-\s+($<ticketNumber>\d+)/;for(m=r.getSpan().nextText("TRAVELERS - TICKET NUMBERS").withEnd(r.getSpan().nextText("Confirmation Code").getStart());m.innerCapture(C);){n=m.innerCapture(C),o=n.$name;var N=n.$ticketNumber;valid(o,N)&&(v[""+o]={name:o,ticketNumber:N,seats:{},seatingType:{}}),m=m.withStart(n[0].getEnd())}t=r.getSpan().innerCapture(/Confirmation Code: (\w+)/,1);var b=concatRegExp(/($<currentDate>.*)\s+/,/($<airlineName>.*) #($<flightNumber>\d+)\s+/,/Depart: .* \(($<departureCode>[A-Z]{3})\) ($<departureTime>at .*)\s+/,/Arrive: .* \(($<arrivalCode>[A-Z]{3})\)/);m=r.getSpan().nextText("ITINERARY").withEnd(r.getSpan().nextText("FARE SUMMARY").getStart());var S=r.getSpan().innerCapture(/\bFARE SUMMARY \((\w+)\)\s+/,1);for(s=r.getSpan().innerCapture(/\bTotal: .*([\d,.]+)/,1);m.innerCapture(b);)n=m.innerCapture(b),n.$currentDate,u=n.$airlineName,p=n.$flightNumber,c=n.$departureCode,l=getFuzzyDate(n[0]),g=n.$arrivalCode,d=n.$currentDate,ASSERT(u,p,c,l,g,d)&&h.push({airlineName:u,flightNumber:p,totalPrice:s,priceCurrency:S,reservationId:t,reservationStatus:"Cancelled",departureCode:c,departureTime:l,arrivalCode:g,arrivalTime:d,passengers:v}),m=m.withStart(n[0].getEnd())}for(var T=[],f=0;f<h.length;f++)for(var y=h[f],A=Object.keys(y.passengers),R=0;R<A.length;R++){var $=y.passengers[A[R]];/alaska/i.test(y.airlineName)&&(y.airlineCode="AS"),i={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:y.airlineName,airlineCode:y.airlineCode,flightNumber:y.flightNumber,departureAirportFuzzy:y.departureAirport,departureAirportCode:y.departureCode,departureTime:y.departureTime,arrivalAirportFuzzy:y.arrivalAirport,arrivalAirportCode:y.arrivalCode,arrivalTime:y.arrivalTime},underName:{"@type":"http://schema.org/Person",name:$.name},checkinUrl:a,reservationStatus:"http://schema.org/Reservation"+(y.reservationStatus||"Confirmed"),reservationId:valid(y.reservationId)?y.reservationId:t,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:$.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:$.seats[y.flightNumber],seatingType:$.seatingType[y.flightNumber]}},totalPrice:$.totalPrice,priceCurrency:$.priceCurrency},not($.membershipNumber)||(i.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:$.membershipNumber,programName:$.programName}),T.push(i)}return T.length?T:void 0},"0/1/2/3/4/5/6/152/196/565","SGf0a3316e")]);