// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("livenation.com-en",function(e){return/Your Live Nation (?:Concerts)?\s*Order/.test(e.subject)},function(e){if(/Your Live Nation (?:Concerts)?\s*Order/.test(e.subject)){var t=Scanner.fromMessage(e);t.setLocale("en_US");var n,r,a,s,o,i,p,c,g,u,d,C,S,m,h,x,T,v,$;if(int(e.epoch)>=1420070400)$=t.getSpan().next("Order #:").parentAnyTag("td").tagContents().innerCapture(/Order #:\s+(.*)/,1),n=t.getSpan().innerCapture(/Thanks (.*) -/,1),u=(""+t.getDetachedSpan(e.subject).innerCapture(/Your Live Nation Concerts Order for ([\S\s]+)/i,1)).replace(/(\r\n|\n|\r)/gm,""),h=t.getSpan().next(u).nextAnyTag("td").tagContents(),C=h.nextAnyTag("td").innerDate(),p=C.nextTag("td11").tagContents().innerCapture(/Section (.*?)(?:,|$)/,1),c=C.nextTag("td11").tagContents().innerCapture(/Row (.*?)(?:,|$)/,1),g=C.nextTag("td11").tagContents().innerCapture(/Seat (.*?)(?:,|$)/,1),s=t.getSpan().next("Order #:").parentAnyTag("td").tagContents().innerCapture(/Order #:\s+(.*)/,1),o=C.nextText("Print now").firstLink(),v=C.nextText("Total Charges:").nextTag("td5").tagContents(),r=v.innerCapture(/([\d,.]+)/,1),a=v.innerCapture(/([^\d,.]+)/,1);else{s=t.getSpan().innerCapture(/Your order number for this purchase is (.*?)\./,1);var f=["PRINT YOUR TICKETS","Print my tickets"];for(var l in f)if(t.getSpan().nextText(f[l]).exists()){o=t.getSpan().innerCapture(RegExp(regExpEscape(f[l])+" <(.*)>"),1);break}C=t.getSpan().nextRegExp(/You purchased (.*) to:/).nextDate();var y=concatRegExp(/You purchased ($<numSeats>.*) to:(?:[\s_]+)/,/\b($<eventName>.*)\s/,/\b($<address>.*)\s/,/(?:[\s\S]+)/,/\bOrder for: ($<name>.*)\s/,/\bSeat location: section ($<section>.*?)(, row ($<row>.*?))?(, seats? ($<seat>.*?))?\s/,/\bTotal Charge: ($<priceCurrency>[A-Z]+).*?($<price>[\d,.]+)\s/);T=t.getSpan().innerCapture(y),T&&(i=T.$numSeats,u=T.$eventName,x=T.$address,n=T.$name,p=T.$section,c=T.$row,g=T.$seat,r=T.$price,a=T.$priceCurrency)}if(ASSERT(C,u))return[{"@context":"http://schema.org","@type":"http://schema.org/EventReservation",name:n,totalPrice:r,priceCurrency:a,reservationId:$,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat",seatSection:p,seatRow:c,seatNumber:g},ticketToken:o,ticketNumber:s},reservationFor:{"@type":"http://schema.org/Event",eventStatus:"http://schema.org/EventConfirmed",name:u,url:d,startDate:C,endDate:S,location:{"@type":"http://schema.org/Place",name:h,telephone:m,address:x}}}]}},"0/1/2/3/4/5/1248/1294/1295","SGfcc34856")]);