// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,_){if(!e||!t||!_)return CONTINUE;var n=Scanner.fromMessage(e);n.setLocale(t);var r,a,o,p,g,i,c,s,x,d,h,m,S,l,u,v,E;r=n.getSpan().innerCapture(regExpFormatted(/\1: (.*)/,_.order),1),p=n.getSpan().innerCapture(regExpFormatted(/\1: (.*)/,_.total),1),a=p.innerCapture(regExpFormatted(/([\d\.,]+)/),1),g=p.innerCapture(regExpFormatted(/([^\d\.,]+)/),1),x=n.getSpan().innerCapture(regExpFormatted(/\1: (.*),?/,_.location),1),h=n.getSpan().innerCapture(regExpFormatted(/\1 (([\w\s\/-]+))\./,_.purchase),1),o=n.getSpan().nextText("_____________________________________________________________________________________________").nextText("\n"),""+n.getSpan().withInterval(o.getEnd(),o.nextText("\n").getStart()).trim()==""&&(o=o.nextText("\n")),c=n.getSpan().withInterval(o.getEnd(),o.nextText("\n").getStart()).trim();var T=n.getSpan().withInterval(c.nextText("\n").nextText("\n").getEnd(),c.nextText(_.order).getStart()),D=T.allInnerDates();if(D.length>0){var C=n.getDetachedSpan(D.join(" "));i=C.innerDate(),n.getDateDD(i).endIso8601?v=n.getDateDD(i).endIso8601:D>1&&(v=T.lastInnerDate())}return l=n.getSpan().withInterval(c.nextText("\n").getEnd(),T.previousText("\n").getStart()),ASSERT(i,c)?[{"@context":"http://schema.org","@type":"http://schema.org/EventReservation",name:r,totalPrice:a,priceCurrency:g,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:s,seatRow:E,seatSection:x},ticketToken:d,ticketNumber:h},reservationFor:{"@type":"http://schema.org/Event",eventStatus:"http://schema.org/EventConfirmed",name:c,url:S,startDate:i,endDate:v,location:{"@type":"http://schema.org/Place",name:l,telephone:u,address:m}}}]:CONTINUE}}).call();