function loadPageAndSection(t){t=t.replace("#","");var e=$(".c-event-nav a").filter((function(){return this.href&&this.href.indexOf("#")>-1})).map((function(){return this.href.split("#")[1]})).toArray().filter((function(e){return t.startsWith(e)})).sort((function(t,e){return e.length-t.length}))[0],i=t.replaceAll(e,"").replaceAll("_"," ").replaceAll("-"," ").replaceAll("#","").trim().toLowerCase();$(".c-event-nav a[href='#"+e+"']").tab("show");var n=$("#"+e+" label").filter((function(){return $(this).text().toLowerCase()==i}));return n.length>0&&setTimeout((function(){n[0].scrollIntoView({behavior:"auto",block:"center",inline:"center"})}),500),!0}function updateUrl(t){t&&history.pushState(null,null,t)}!function(t,e,i){"use strict";var n={calc:!1};e.fn.rrssb=function(t){var n=e.extend({description:i,emailAddress:i,emailBody:i,emailSubject:i,image:i,title:i,url:i},t);for(var s in n.emailSubject=n.emailSubject||n.title,n.emailBody=n.emailBody||(n.description?n.description:"")+(n.url?"\n\n"+n.url:""),n)n.hasOwnProperty(s)&&n[s]!==i&&(n[s]=r(n[s]));n.url!==i&&(e(this).find(".rrssb-facebook a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+n.url),e(this).find(".rrssb-tumblr a").attr("href","http://tumblr.com/share/link?url="+n.url+(n.title!==i?"&name="+n.title:"")+(n.description!==i?"&description="+n.description:"")),e(this).find(".rrssb-linkedin a").attr("href","http://www.linkedin.com/shareArticle?mini=true&url="+n.url+(n.title!==i?"&title="+n.title:"")+(n.description!==i?"&summary="+n.description:"")),e(this).find(".rrssb-twitter a").attr("href","https://twitter.com/intent/tweet?text="+(n.description!==i?n.description:"")+"%20"+n.url),e(this).find(".rrssb-hackernews a").attr("href","https://news.ycombinator.com/submitlink?u="+n.url+(n.title!==i?"&text="+n.title:"")),e(this).find(".rrssb-reddit a").attr("href","http://www.reddit.com/submit?url="+n.url+(n.description!==i?"&text="+n.description:"")+(n.title!==i?"&title="+n.title:"")),e(this).find(".rrssb-googleplus a").attr("href","https://plus.google.com/share?url="+(n.description!==i?n.description:"")+"%20"+n.url),e(this).find(".rrssb-pinterest a").attr("href","http://pinterest.com/pin/create/button/?url="+n.url+(n.image!==i?"&amp;media="+n.image:"")+(n.description!==i?"&description="+n.description:"")),e(this).find(".rrssb-pocket a").attr("href","https://getpocket.com/save?url="+n.url),e(this).find(".rrssb-github a").attr("href",n.url),e(this).find(".rrssb-print a").attr("href","javascript:window.print()"),e(this).find(".rrssb-whatsapp a").attr("href","whatsapp://send?text="+(n.description!==i?n.description+"%20":n.title!==i?n.title+"%20":"")+n.url)),(n.emailAddress!==i||n.emailSubject)&&e(this).find(".rrssb-email a").attr("href","mailto:"+(n.emailAddress?n.emailAddress:"")+"?"+(n.emailSubject!==i?"subject="+n.emailSubject:"")+(n.emailBody!==i?"&body="+n.emailBody:""))};var r=function(t){if(t!==i&&null!==t){if(null===t.match(/%[0-9a-f]{2}/i))return encodeURIComponent(t);t=decodeURIComponent(t),r(t)}},s=function(){e(".rrssb-buttons").each((function(t){var i=e(this),n=e("li:visible",i),r=100/n.length;n.css("width",r+"%").attr("data-initwidth",r)}))},o=function(t){e(".rrssb-buttons").each((function(t){var i=e(this),n=e("li",i);e(n.get().reverse()).each((function(t,i){var r=e(this);if(!1===r.hasClass("small")&&parseFloat(r.attr("data-size"))+55>parseFloat(r.width())){var s=n.not(".small").last();e(s).addClass("small"),a()}--i||e(".rrssb-buttons").each((function(t){var i=e(this),n=e("li",i),r=n.filter(".small"),s=0,o=0,l=r.eq(0),c=parseFloat(l.attr("data-size"))+55,h=r.length;if(h===n.length){var d=42*h;i.width()>d+c&&(i.removeClass("small-format"),r.eq(0).removeClass("small"),a())}else n.not(".small").each((function(t){var i=e(this),n=parseFloat(i.attr("data-size"))+55,r=parseFloat(i.width());s+=r,o+=n})),s-o>c&&(l.removeClass("small"),a())}))}))})),!0===t&&c(a)},a=function(){e(".rrssb-buttons").each((function(t){var i,r,o,a,l,c=e(this),h=e("li",c),d=h.filter(".small"),u=d.length;u>0&&u!==h.length?(c.removeClass("small-format"),d.css("width","42px"),o=42*u,r=100/(i=h.not(".small").length),l=o/i,!1===n.calc?(a=(c.innerWidth()-1)/i-l,a=Math.floor(1e3*a)/1e3,a+="px"):a=n.calc+"("+r+"% - "+l+"px)",h.not(".small").css("width",a)):u===h.length?(c.addClass("small-format"),s()):(c.removeClass("small-format"),s())})),e(".rrssb-buttons").each((function(t){var i=e(this),n=i.width(),r=e("li",i).not(".small").eq(0).width(),s=e("li.small",i).length;if(r>170&&1>s){i.addClass("large-format");var o=r/12+"px";i.css("font-size",o)}else i.removeClass("large-format"),i.css("font-size","");25*s>n?i.removeClass("small-format").addClass("tiny-format"):i.removeClass("tiny-format")}))},l=function(){e(".rrssb-buttons").each((function(t){e(this).addClass("rrssb-"+(t+1))})),function(){var t=e("<div>"),i=["calc","-webkit-calc","-moz-calc"];e("body").append(t);for(var r=0;r<i.length;r++)if(t.css("width",i[r]+"(1px)"),1===t.width()){n.calc=i[r];break}t.remove()}(),s(),e(".rrssb-buttons li .rrssb-text").each((function(t){var i=e(this),n=i.width();i.closest("li").attr("data-size",n)})),o(!0)},c=function(t){e(".rrssb-buttons li.small").removeClass("small"),o(),t()},h=function(e,n,r,s){var o=t.screenLeft!==i?t.screenLeft:screen.left,a=t.screenTop!==i?t.screenTop:screen.top,l=(t.innerWidth?t.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width)/2-r/2+o,c=(t.innerHeight?t.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/3-s/3+a,h=t.open(e,n,"scrollbars=yes, width="+r+", height="+s+", top="+c+", left="+l);h&&h.focus&&h.focus()},d=function(){var t={};return function(e,i,n){n||(n="Don't call this twice without a uniqueId"),t[n]&&clearTimeout(t[n]),t[n]=setTimeout(e,i)}}();e(document).ready((function(){try{e(document).on("click",".rrssb-buttons a.popup",{},(function(t){var i=e(this);h(i.attr("href"),i.find(".rrssb-text").html(),580,470),t.preventDefault()}))}catch(t){}e(t).resize((function(){c(a),d((function(){c(a)}),200,"finished resizing")})),l()})),t.rrssbInit=l}(window,jQuery),
/*!
 * imagesLoaded PACKAGED v3.1.8
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,r=this,s=r.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if("object"==typeof t)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},n.addListener=function(t,i){var n,r=this.getListenersAsObject(t),s="object"==typeof i;for(n in r)r.hasOwnProperty(n)&&-1===e(r[n],i)&&r[n].push(s?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,r,s=this.getListenersAsObject(t);for(r in s)s.hasOwnProperty(r)&&(-1!==(n=e(s[r],i))&&s[r].splice(n,1));return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,r,s=t?this.removeListener:this.addListener,o=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)s.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(r=e[n])&&("function"==typeof r?s.call(this,n,r):o.call(this,n,r));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if("object"===i)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(t,e){var i,n,r,s=this.getListenersAsObject(t);for(r in s)if(s.hasOwnProperty(r))for(n=s[r].length;n--;)!0===(i=s[r][n]).once&&this.removeListener(t,i.listener),i.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return r.EventEmitter=s,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],(function(){return t})):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(n=function(t,i,n){t[i+n]=n.handleEvent?function(){var i=e(t);n.handleEvent.call(n,i)}:function(){var i=e(t);n.call(t,i)},t.attachEvent("on"+i,t[i+n])});var r=function(){};i.removeEventListener?r=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(r=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var s={bind:n,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",s):t.eventie=s}(this),function(t,e){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],(function(i,n){return e(t,i,n)})):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("eventie")):t.imagesLoaded=e(t,t.EventEmitter,t.eventie)}(window,(function(t,e,i){function n(t,e){for(var i in e)t[i]=e[i];return t}function r(t){var e=[];if(function(t){return"[object Array]"===d.call(t)}(t))e=t;else if("number"==typeof t.length)for(var i=0,n=t.length;n>i;i++)e.push(t[i]);else e.push(t);return e}function s(t,e,i){if(!(this instanceof s))return new s(t,e);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=r(t),this.options=n({},this.options),"function"==typeof e?i=e:n(this.options,e),i&&this.on("always",i),this.getImages(),l&&(this.jqDeferred=new l.Deferred);var o=this;setTimeout((function(){o.check()}))}function o(t){this.img=t}function a(t){this.src=t,u[t]=this}var l=t.jQuery,c=t.console,h=void 0!==c,d=Object.prototype.toString;s.prototype=new e,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;e>t;t++){var i=this.elements[t];"IMG"===i.nodeName&&this.addImage(i);var n=i.nodeType;if(n&&(1===n||9===n||11===n))for(var r=i.querySelectorAll("img"),s=0,o=r.length;o>s;s++){var a=r[s];this.addImage(a)}}},s.prototype.addImage=function(t){var e=new o(t);this.images.push(e)},s.prototype.check=function(){function t(t,r){return e.options.debug&&h&&c.log("confirm",t,r),e.progress(t),++i===n&&e.complete(),!0}var e=this,i=0,n=this.images.length;if(this.hasAnyBroken=!1,n)for(var r=0;n>r;r++){var s=this.images[r];s.on("confirm",t),s.check()}else this.complete()},s.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded;var e=this;setTimeout((function(){e.emit("progress",e,t),e.jqDeferred&&e.jqDeferred.notify&&e.jqDeferred.notify(e,t)}))},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var e=this;setTimeout((function(){if(e.emit(t,e),e.emit("always",e),e.jqDeferred){var i=e.hasAnyBroken?"reject":"resolve";e.jqDeferred[i](e)}}))},l&&(l.fn.imagesLoaded=function(t,e){return new s(this,t,e).jqDeferred.promise(l(this))}),o.prototype=new e,o.prototype.check=function(){var t=u[this.img.src]||new a(this.img.src);if(t.isConfirmed)this.confirm(t.isLoaded,"cached was confirmed");else if(this.img.complete&&void 0!==this.img.naturalWidth)this.confirm(0!==this.img.naturalWidth,"naturalWidth");else{var e=this;t.on("confirm",(function(t,i){return e.confirm(t.isLoaded,i),!0})),t.check()}},o.prototype.confirm=function(t,e){this.isLoaded=t,this.emit("confirm",this,e)};var u={};return a.prototype=new e,a.prototype.check=function(){if(!this.isChecked){var t=new Image;i.bind(t,"load",this),i.bind(t,"error",this),t.src=this.src,this.isChecked=!0}},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.onload=function(t){this.confirm(!0,"onload"),this.unbindProxyEvents(t)},a.prototype.onerror=function(t){this.confirm(!1,"onerror"),this.unbindProxyEvents(t)},a.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},a.prototype.unbindProxyEvents=function(t){i.unbind(t.target,"load",this),i.unbind(t.target,"error",this)},s})),$((function(){function t(){var t=$(".overlay .contact-info").height(),e=$(".event-logo img").height();t<e&&(t=e);var i=2*parseInt($(".well.box .background .overlay").css("padding-top"));-1==breakpoint().indexOf("phone")?($(".well.box .background").height(t+i),$(".logo-container").height(t)):($(".logo-container").height("auto"),$(".well.box .background").height(t+i+$(".logo-container").height()))}$(".c-member-compass-nav-toggle").click((function(){$(".c-event-nav").slideToggle(),$(".c-member-compass-nav-toggle").toggleClass("c-member-compass-nav-toggle--expanded")})),$(".c-event-nav__item").click((function(){$(".c-member-compass-nav-toggle").is(":visible")&&($(".c-event-nav").slideToggle(),$(".c-member-compass-nav-toggle").toggleClass("c-member-compass-nav-toggle--expanded"))})),$(window).resize((function(){$(window).width()>992&&!$(".c-event-nav").is(":visible")&&$(".c-event-nav").toggle()})),window.location&&window.location.hash&&loadPageAndSection(window.location.hash),$(".event-logo img").length>0?$(".event-logo").imagesLoaded().always((function(e){t()})):t(),$(window).resize(t),$("[data-toggle]").tooltip()})),$(window).on("popstate",(()=>{window.location&&window.location.hash&&loadPageAndSection(window.location.hash)}));var viewModel={Attendees:ko.observableArray([]),Addons:ko.observableArray([]),OverbookedMessage:ko.observable(""),OverbookedShortMessage:ko.observable(""),Tickets:ko.observableArray([]),Errors:ko.observable("").extend({notify:"always"})},ticketModel=function(t,e,i,n,r,s,o,a,l,c,h,d,u,f){var v=this;this.ID=t,this.Name=e,this.Description=i,this.Taxable=n,this.CategoryDisplayOrder=o,this.DisplayOrder=a,this.Price=ko.observable(r),this.Quantity=ko.observable(s),this.Invoicing=ko.observable(l),this.IsDonation=c,this.ContinuingEducationUnits=h,this.AttendeeRequired=ko.observable(d),this.ShowOnForm=ko.observable(u),this.NoGuestsAllowed=ko.observable(f),this.SubTotal=ko.computed((function(){return v.Quantity()*v.Price()}))},addonModel=function(t,e,i,n,r,s,o,a){var l=this;this.ID=t,this.Name=e,this.Description=i,this.Taxable=n,this.Subscription=r,this.Price=ko.observable(s),this.Quantity=ko.observable(o),this.AutoRenew=ko.observable(a),this.SubTotal=ko.computed((function(){return l.Quantity()*l.Price()}))};viewModel.Overbooked=ko.computed((function(){var t=viewModel.Attendees().length,e=eventCapacity-t<0,i=eventCapacity>1?"s":"",n=t>1?"s":"";return e?(viewModel.OverbookedMessage("Event over capacity: The event has capacity for "+eventCapacity+" more attendee"+i+", but you have selected "+t+" ticket"+n+". Please update ticket selections above to reflect the available number."),viewModel.OverbookedShortMessage("Event only has "+eventCapacity+" ticket"+i+" available.")):(viewModel.OverbookedMessage(""),viewModel.OverbookedShortMessage("")),e})),$((function(){var t,e,i;$("#tickets input:last").keydown((function(t){!("Tab"!=t.key||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)})),t=[],e=[],$("table.tickets-table tbody tr").each((function(){var i=$(this).find("input.qty-total");if(0!=i.length){(""==i.val()||isNaN(i.val())||parseInt(i.val())<0)&&i.val("0");var n=Math.max(0,parseInt(i.val())),r=parseInt(i.attr("max"));if($(this).find("td:last > .text-danger.ticket-quantity-error").toggleClass("hide",n<=r),$(this).find("td:last > .text-danger.event-overbook-error").toggleClass("hide",0==n),n>r&&(i.val(r),n=r),n>0){var s=$(this).find("input.donation-price");s.length>0&&""==s.val()&&s.val("0");var o=Math.max(0,parseFloat(s.length>0?s.val():$(this).data("price")));if($(this).data("tiers")){var a=$(this).data("tiers"),l=ko.utils.arrayFirst(a,(function(t){return t.Minimum<=n&&(null==t.Maximum||t.Maximum>=n)}));l&&(o=l.Price),$(this).find(".price-per").html("$"+o.toFixed(2))}for(var c=new ticketModel($(this).data("id"),$(this).find("td:first strong").html(),$(this).find(".description").html(),$(this).data("taxable"),o,n,$(this).closest(".ticket-category").index(),$(this).index(),0!=$(this).data("invoice"),s.length>0,$(this).find(".continuingEducationUnits").html(),$(this).data("attendeerequired"),$(this).data("showonform"),$(this).data("noguestsallowed")),h=parseFloat($(this).data("seats")),d=1;d<=n*h;d++)e.push(new attendeeModel(c,d,$(this).find(".custom-fields").html()));t.push(c)}}})),viewModel.Tickets(t),i=[],$("#products tbody tr").each((function(){var t=$(this).data("id"),e=$(this).find("td:last input.quantity"),n=1;if(e.length>0){var r=e.val(),s=e.data("maxAvailable")?+e.data("maxAvailable"):999;(""===r||isNaN(r))&&e.val("");var o=""===e.val()?-1:parseInt(e.val());o>=0&&e.val(o),parseInt(e.val())>s&&(e.val(s),$("#max-available-msg_"+t).toggleClass("hide",!1)),n=Math.max(0,parseInt(e.val()))}if(n>0){e.attr("max")&&n>1&&(e.val(1),n=1);var a=$(this).find("input.price:visible");a.length>0&&""==a.val()&&a.val("0");var l=Math.max(0,parseFloat(a.length>0?a.val():$(this).data("price")));if(l>0){var c=$(this).find("input[type=checkbox]").length>0&&$(this).find("input[type=checkbox]").is(":checked"),h=new addonModel($(this).data("id"),$(this).find("td:first strong").html(),$(this).find(".description").html(),$(this).data("taxable"),$(this).data("subscription"),l,n,c);i.push(h)}}})),viewModel.Addons(i),$("[data-toggle=popover]").popover()}));
//# sourceMappingURL=eventdetails-bundle.js.map
