// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,n,a,r){if(!e||!n||!a)return CONTINUE;e.plain=e.plain.replace(/(\d{1,2})\s+?(\d{1,2})\s+?(\d{4})/g,function(e,n,a,r){return[n,a,r].join("/")}),e.plain=e.plain.replace(/(\d{1,2}),?\s+?([a-zA-Z]+?)\.?\s+?(\d{4})/g,function(e,n,a,r){return[n,a,r].join(" ")}),scanner=Scanner.fromMessage(e),scanner.setLocale(n);var s,t,o,c,l,i,d,p;s=loadHelper("undername.js")(e.to,a,scanner),/@/.test(s)&&(t=s,s=null),i=loadHelper("hotelname.js")(scanner),p=loadHelper("address.js")(a,scanner),l=loadHelper("reservationId.js")(a,scanner);var m=scanner.getSpan().allDates(),u=loadHelper("CheckInDate.js")(a,scanner,m),h=loadHelper("CheckInTime.js")(a,scanner,m);o=combineDateAndTime(u,h);var g=loadHelper("CheckOutDate.js")(a,scanner,m,u),j=loadHelper("CheckOutTime.js")(a,scanner,m);return c=combineDateAndTime(g,j),d=loadHelper("phone.js")(a,scanner),(""+d).includes(""+l)&&(d=null),ASSERT(o,OR(c,p))?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:s,email:t},checkinTime:o,checkoutTime:c,reservationStatus:r,reservationId:l,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:i,telephone:d,address:p}}]:void 0}}).call();