// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("hainanairlines-confirmation-2-zh",function(e){return/\u5c0a\u656c\u7684\u7528\u6237\uff1a\u60a8\u5728\u6d77\u822a\u7f51\u7ad9\u8ba2\u8d2d\u7684/.test(e.plain)},function(e){if(!/\u5c0a\u656c\u7684\u7528\u6237\uff1a\u60a8\u5728\u6d77\u822a\u7f51\u7ad9\u8ba2\u8d2d\u7684/.test(e.plain))return CONTINUE;var t=Scanner.fromMessage(e);t.setLocale("zh_Hans_CN");var r,a,n,i,o,p,s,h,l,m,c=[],d=t.getSpan().innerCapture(/\u6d77\u822a\u7f51\u7ad9\u8ba2\u8d2d\u7684(.+)\u7684\u673a\u7968\u8ba2\u5355\u4ea4\u6613\u7f16\u53f7\u4e3a(.+)\uff0c\u6211\u4eec\u5c06/);d&&3===d.length&&([,r,n]=d,a=r.split("\u3001"));for(var g=0;g<a.length;g++){var v=a[g].innerCapture(/(\d+\u6708\d+\u65e5)(\w{2})(\d+)(.+) - (.+)(\d{2}:\d{2})\u8d77\u98de(\d{2}:\d{2})\u5230\u8fbe/);[,i,o,p,s,h,l,m]=v;var u=combineDateAndTime(i,l),T=combineDateAndTime(i,m);if(ASSERT(d,v)){var f={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:o,flightNumber:p,departureAirportFuzzy:s,departureTime:u,arrivalAirportFuzzy:h,arrivalTime:T},underName:{"@type":"http://schema.org/Person"},reservationId:n,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat"}},reservationStatus:"http://schema.org/ReservationConfirmed"};c.push(f)}}return c.length?c:void 0},"0/1/2/3/4/5/240/450/452","SG703474a9"),new ReverseTemplate("hainanairlines-confirmation-3-zh",function(e){return/\u6d77\u822a\u7f51\u7ad9\u4e0a\u9884\u5b9a\u7684\u673a\u7968\u5df2\u6210\u529f\u5b8c\u6210\u51fa\u7968/.test(e.plain)},function(e){if(!/\u6d77\u822a\u7f51\u7ad9\u4e0a\u9884\u5b9a\u7684\u673a\u7968\u5df2\u6210\u529f\u5b8c\u6210\u51fa\u7968/.test(e.plain))return CONTINUE;var t=Scanner.fromMessage(e);t.setLocale("zh_Hans_CN");for(var r=[],a=t.getSpan().innerCapture(/\u4ea4\u6613\u7f16\u53f7 (\d+)/,1),n=t.getSpan().nextText("\u884c\u7a0b\u4fe1\u606f").nextTag("table5").allInnerTagsFiltered("td5"),i=0;i<(n.length-10)/8;i++){var o,p,s=8*i+8,h=n[s],l=n[s+1],m=n[s+2],c=n[s+3],d=n[s+4],g=n[s+7];[o,p]=h.split(" - ");var v,u;[,v,u]=l.innerCapture(/(\w{2})(\d+)/);var T,f,S=combineDateAndTime(m,c),C=combineDateAndTime(m,d);[,f,T]=g.innerCapture(/([A-Z]+)(\d+)/);for(var y=t.getSpan().nextText("\u4e58\u5ba2\u4fe1\u606f").nextTag("table5").allInnerTags("td5"),z=0;z<(y.length-3)/3;z++){var A=3*z+3,F=y[A].tagContents();if(ASSERT(h,l,S,C,F)){var N={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:v,flightNumber:u,departureAirportCode:o,departureTime:c,arrivalAirportCode:p,arrivalTime:C},underName:{"@type":"http://schema.org/Person",name:F},reservationId:a,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat"}},totalPrice:T,priceCurrency:f,reservationStatus:"http://schema.org/ReservationConfirmed"};r.push(N)}}}return r.length?r:void 0},"0/1/2/3/4/5/240/450/453","SG082180de")]);