function getCookie(n){for(var r=n+"=",u=document.cookie.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1);if(t.indexOf(r)===0)return t.substring(r.length,t.length)}return""}function setCookie(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toGMTString();document.cookie=n+"="+t+";"+u+";path=/"}function validateEmail(n){return/^([\w-\.]+@([\w-]+\.)+[\w-]{2,10})?$/.test(n)}function HideButton(){var n=$("#hdnTVTotalLoad").val();parseInt(n)>5?($("#backToTop").hide(),$("#loadTV").show()):($("#backToTop").hide(),$("#loadTV").hide())}function ShowLoader(){$(".loader").show()}function HideLoader(){$(".loader").hide()}function stopVideo(){var t=$(event.target).closest("div.reveal-overlay").find(".podcast_iframe"),n,i;t!==null&&(n=document.getElementById(t[0].id),n!==null&&(i=n.src,n.src=i))}function GtmAnalyticsPush(n,t,i){window.dataLayer.push({event:"gtm.event",action:t,category:n,label:i})}function loadGtmInPartialView(){$("a.js-gtm-tag:not(.gtm-bound)").each(function(){$(this).addClass("gtm-bound").on("click",function(){GtmAnalyticsPush($(this).attr("data-gtm-category"),$(this).attr("data-gtm-action"),$(this).attr("data-gtm-label"))})})}function PDFdownload(n){n=window.location.protocol+"//"+location.hostname+n;location.hostname.toLowerCase().toString().indexOf("qa")>-1||location.hostname.toLowerCase().toString().indexOf("uat")>-1||location.hostname.toLowerCase().toString().indexOf("staging")>-1?Munchkin.init("349-BQW-609"):Munchkin.init("325-KYL-599");Munchkin.munchkinFunction("clickLink",{href:n});window.open(n,"methodologyWindow")}$(document).ready(function(){function w(n){var t=window.dataLayer=window.dataLayer||[];t.push({event:n,eventAction:"submit"})}function o(u){GtmAnalyticsPush("Introduction","Search",u);var f=r+"//"+i+t+"/"+n+"/our-methodology/glossary";return $.ajax({type:"post",url:f,dataType:"json",data:{key:u},success:function(n){var t=$.parseJSON(n);$("#glossary").empty();t!=null&&t!=""?$.each(t,function(n,t){var i=' <div class="filterable-list__row"><div class="filterable-list__cell item-type__text">'+t.Key+'<\/div><div class="filterable-list__cell item-type__content"><p class="with-out-weight">'+b(t.Value)+"<\/p><\/div><\/div>";$("#glossary").append(i);$("#glossaryNotFound").css("display","none")}):($("#glossary").empty(),$("#glossary").css({border:"none",outline:"none"}),$("#glossaryNotFound").css("display","block"),$("#glossary").append(row));$("#glossary a.link").on("click",function(){var n=$(this).text().trim();return o(n),!1})},error:function(){}}),!1}function b(n){var t=document.createElement("textarea");return t.innerHTML=n,t.value}function a(u){$(this).attr("data-gtm-label",u);$(this).attr("data-gtm-category","Software & Manuals Feed");$(this).attr("data-gtm-action","Search");GtmAnalyticsPush("Software & Manuals Feed","Search",u);row=24;var f=r+"//"+i+t+"/"+n+"/Content/SearchSoftwareUserManuals";return $.ajax({type:"post",url:f,dataType:"html",indexValue:{value1:row},data:{type:typeFilter,name:u,rows:row},success:function(n,t,i){$("#softwareUserManualResult").empty();$("#softwareUserManualResult").html(n);parseInt(i.getResponseHeader("totalItems"))<=this.indexValue.value1?$("#loadMoreManuals").hide():$("#loadMoreManuals").show();loadGtmInPartialView()},error:function(){}}),!1}function d(u){var f=r+"//"+i+t+"/"+n+"/Methodology/MethodologySearch/";return $.ajax({type:"post",url:f,dataType:"json",data:{title:u},success:function(n){n.Value==null||n.Value==""?($("#NoRecords").show(),$("#EnterKeyWord").hide()):($("p.mserror").hide(),window.location.href=n.Value)},error:function(){}}),!1}function g(u){var f=r+"//"+i+t+"/"+n+"/Methodology/PriceAssessmentSearch/";return $.ajax({type:"post",url:f,dataType:"json",data:{title:u},success:function(n){n.Value==null||n.Value==""?$("#NoRecords").show():($("p.mserror").hide(),window.location.href=n.Value)},error:function(){}}),!1}function h(n,t,i,r,u){return f=parseInt(f)+parseInt(t),$.ajax({type:"Post",dataType:"html",data:{filter:i,rows:f},url:u,success:function(t,i,u){$(".loader").hide();$(n).empty();$(n).html(t);parseInt(u.getResponseHeader("TotalCount"))<f?($(r).hide(),$("#backToTop").show()):($(r).show(),$("#backToTop").hide())},complete:function(n){console.log(n.responseText)},failure:function(n){console.log(n.responseText)},error:function(n){console.log(n.responseText)}}),!1}var t=$("#hdnPath").val(),i=window.location.host,r=window.location.protocol,u="",p=$("#hdnDisplayName").val(),n,c,l,k,e,s,v,y,nt,f;$("#WelcomeUser").text(p);u==""&&window.location.href.toLowerCase().endsWith("#login")!==!1?$("#loginLink")[0].click():u==""&&window.location.href.toLowerCase().endsWith("#forgotpassword")!==!1?$("#forgotPasswordLink")[0].click():u==""&&window.location.href.toLowerCase().endsWith("#register")!==!1&&$("#registerLink")[0].click();n=location.pathname;n=t!=""?n.split("/")[2]:n.split("/")[1];n=typeof n!="undefined"&&n!=""?n:"en";$("#backToTop").click(function(){$("html,body").animate({scrollTop:0},1e3)});$("#notes-wrapper").addClass("pull-left");$("#showMenu:visible").hide();$("#txtUsername").on("change",function(){$(".form__username-error-message").hide();$(".form__login-error-message").hide()});$("#txtPassword").on("change",function(){$(".form__password-error-message").hide();$(".form__login-error-message").hide()});if(document.getElementById("txtUsername").value="",document.getElementById("txtPassword").value="",$("a#liLoggedIn").click(function(){$("#showMenu").toggle()}),u=getCookie("beacon"),u!==""&&u!==null){if($("#ulLogIn").hide(),$("#ulLoggedIn").show(),window.location.href.endsWith("#")){const n=window.location.hash;history.scrollRestoration="manual";window.location.href=n;history.pushState("",document.title,window.location.pathname)}}else $("#ulLogIn").show(),$("#ulLoggedIn").hide(),$("a#liLoggedIn").hide();$("#loginButton").click(function(){var c=performance.now(),u=document.getElementById("txtUsername").value.toString(),f=document.getElementById("txtPassword").value.toString(),o=validateEmail(u),h=r+"//"+i+t+"/"+n+"/Home/Login/",s,e;u!==""&&f!==""&&o?($("#loginButton").fadeTo(1e3,.4),s=$("#formlogin"),e=$('input[name="__RequestVerificationToken"]',s).val(),$.ajax({type:"post",data:{__RequestVerificationToken:e,Email:u,Password:f},cache:"false",headers:{__RequestVerificationToken:e},url:h,accept:"application/json",success:function(n){if(n.Auth!=="false"){$(".button__close").click();$("#ulLogIn").hide();$("#ulLoggedIn").show();$("a#liLoggedIn").show();const n=window.location.hash;history.scrollRestoration="manual";window.location.href=n;history.pushState("",document.title,window.location.pathname);window.location.reload(!0);w("loginUser");$("#loginButton").fadeTo("normal",1)}else $("#loginButton").fadeTo("normal",1),$(".form__login-error-message").show(),n.InvalidLoginAttempts==3?($("#form__login-invalid-attempt3").show(),$("#form__login-invalid-attempt4").hide(),$("#form__login-invalid-attempt5").hide()):n.InvalidLoginAttempts==4?($("#form__login-invalid-attempt3").hide(),$("#form__login-invalid-attempt4").show(),$("#form__login-invalid-attempt5").hide()):n.InvalidLoginAttempts==5&&($("#form__login-invalid-attempt3").hide(),$("#form__login-invalid-attempt4").hide(),$("#form__login-invalid-attempt5").show(),$("#form__login__fields").hide(),$("#form__login-account-locked").show())},failure:function(n){console.log(n.responseText);$("#loginButton").fadeTo("normal",1);$(".form__login-error-message").show()},error:function(n){console.log(n.responseText)}})):u===""?$(".form__username-error-message").show():o?f===""&&$(".form__password-error-message").show():$(".form__username-error-message").show()});$("#liLogout").on("click",function(){var u=r+"//"+i+t+"/"+n+"/Home/LogOff";$.ajax({type:"post",contentType:"application/json; charset=utf-8",url:u,async:!0,dataType:"json",success:function(n){if(n!==null)return $("#ulLogIn").show(),$("#ulLoggedIn").hide(),$("#showMenu:visible").hide(),$("#liLoggedIn").text="",setCookie("FirstLoginHit",1,1),setCookie("FirstHit","true",1),window.location.reload(),!0},failure:function(n){return console.log(n.responseText),!1},error:function(n){return console.log(n.responseText),!1}})});$(".loginbtn").on("click",function(){document.getElementById("txtUsername").value="";document.getElementById("txtPassword").value="";$(".modal").modal({keyboard:!0})});$(".applyFilter a").on("click",function(){$(".table-filter-content").hide()});$("#burger").on("click",function(){var n=$("html").css("width"),t=n.replace("px",""),i=$(this).hasClass("is-selected");i?t>1200?($(".bodyID").show(),$(".footerID").show()):($(".bodyID").hide(),$(".footerID").hide()):($(".bodyID").show(),$(".footerID").show())});c=r+"//"+i+t+"/"+n+"/Methodology/GlossaryKeys/";$("#txtAuto").autocomplete({minLength:1,source:function(n,t){$.ajax({type:"post",url:c,dataType:"json",data:{key:n.term},success:function(n){t(n.slice(0,20))}})},select:function(n,t){var i=t.item.value;o(i)}});$.ui.autocomplete.prototype._renderItem=function(n,t){t.label=t.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(this.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<span style='color:#d6002a;font-weight:bold'>$1<\/span>");var i=t.label;return $("<li><\/li>").data("item.autocomplete",t).append("<strong style='color:#999999'>"+i+"<\/strong>").appendTo(n)};$("#txtAuto").keypress(function(n){if(n.keyCode=="13")return $("#btnFilter").trigger("click"),!1});$("#btnFilter").on("click",function(){var n=$("#txtAuto").val();o(n)});$("#btnFilter").hover(function(){$(this).css("background-color","black");$(this).css("color","white")},function(){$(this).css("background-color","#d6002a");$(this).css("color","white")});$("#glossary a.link").on("click",function(){var n=$(this).text().trim();return o(n),!1});l=r+"//"+i+t+"/"+n+"/Content/SoftwareManualsSearchResult/";$("#txtManuals").autocomplete({minLength:1,source:function(n,t){$.ajax({type:"post",url:l,dataType:"json",data:{Key:n.term},success:function(n){t(n.slice(0,20))}})},select:function(n,t){var i=t.item.value;a(i)}});$("#txtManuals").keypress(function(n){if(n.keyCode=="13")return $("#btnSearch").trigger("click"),!1});$("#btnSearch").on("click",function(){var n=$("#txtManuals").val();a(n)});$("#txtUsername").keypress(function(n){if(n.which&&n.which==13||n.keyCode&&n.keyCode==13)return $("#loginButton").click(),!0});$("#txtPassword").keypress(function(n){if(n.which&&n.which==13||n.keyCode&&n.keyCode==13)return $("#loginButton").click(),!0});$("div.HolidayTop").hide();k=$("div.holidayID").length;sessionStorage.removeItem("page");e=9;$("div.holidayID").hide();$("div.holidayID").slice(0,e).show();s=5;sessionStorage.setItem("page",e);$("#HolidayLoadMore").on("click",function(){var n=sessionStorage.getItem("page"),t=$("div.holidayID").length;return(n===e?(n=parseInt(s)+parseInt(e),sessionStorage.setItem("page",n)):(n=parseInt(sessionStorage.getItem("page"))+s,sessionStorage.setItem("page",n)),n<=t)?($("div.holidayID").slice(0,n).show(),$(this).attr("style","display:block;"),$("div.HolidayTop").hide(),!1):($("div.holidayID").slice(0,n).show(),$(this).attr("style","display:none;"),$("div.HolidayTop").show(),!1)});v=r+"//"+i+t+"/"+n+"/Methodology/MethodologySearchResult/";$("#txtMethodologySearch").autocomplete({minLength:1,source:function(n,t){$.ajax({type:"post",url:v,dataType:"json",data:{key:n.term},success:function(n){t(n.slice(0,20));$("p.mserror").hide()}})},select:function(n,t){if(i!=null&&i!="")var i=t.item.value}});$("#btnmethodologysearch").on("click",function(){var n=$("#txtMethodologySearch").val();$(this).attr("data-gtm-label",n);$(this).attr("data-gtm-category","Introduction");$(this).attr("data-gtm-action","Search");GtmAnalyticsPush("Introduction","Search",n);n!=""?($("p.mserror").hide(),d(n)):($("#EnterKeyWord").show(),$("#NoRecords").hide())});y=r+"//"+i+t+"/"+n+"/Methodology/priceAssessmentSearchResult/";$("#txtPriceAssessmentSearch").autocomplete({minLength:1,source:function(n,t){$.ajax({type:"post",url:y,dataType:"json",data:{key:n.term},success:function(n){t(n.slice(0,20));$("p.mserror").hide()}})},select:function(n,t){var i=t.item.value}});$("#txtPriceAssessmentSearch").on("change",function(){$("p.mserror").hide()});$("#btnPriceAssessmentsearch").on("click",function(){var n=$("#txtPriceAssessmentSearch").val();$(this).attr("data-gtm-label","Find Price Assessment_"+n);$(this).attr("data-gtm-category","Find Price Assessments");$(this).attr("data-gtm-action","Search");GtmAnalyticsPush("Find Price Assessments","Search","Find Price Assessment_"+n);n!=""?($("p.mserror").hide(),g(n)):$("#EnterKeyWord").show()});$(".loader").hide();$(".cls").on("click",function(){$(this).parent("ul.parent").hide()});$(".tab").on("click",function(){var e=$(this).data("value"),f=r+"//"+i+t+"/"+n,u="";switch(e){case"Press Releases":u=f+"/about-platts/media-center/press-releases";break;case"Media Contacts":u=f+"/about-platts/media-center/media-contacts";break;case"News Alerts":u=f+"/about-platts/media-center/news-alerts"}window.location.href=u});nt=$("#hdnLoad").val();f=$("#hdnTVLoad").val();$("#loadPA").on("click",function(){$(".loader").show();var u=$("#hdnLoad").val(),f=r+"//"+i+t+"/"+n+"/Methodology/GetMorePriceAssessments/",e=$("#hdnCommodity").val();h("#PAList",u,e,"#loadPA",f)});$("#loadMS").on("click",function(){$(".loader").show();var u=$("#hdnLoad").val(),f=r+"//"+i+t+"/"+n+"/Methodology/GetMoreMethodologySpecifications/",e=$("#hdnCommodity").val();h("#MSList",u,e,"#loadMS",f)});$(".cls").on("click",function(){f=5});$("#loadTV").on("click",function(){var u=$("#hdnTVLoad").val(),f=r+"//"+i+t+"/"+n+"/support/GetMoreTrainingVideos/",e=$("#hdnTVCommodity").val();return h("#TVList",u,e,"#loadTV",f),!1})});$(document).ready(function(){$(document).on("click","a.fa-print",function(n){var i=$(n.target),t;return $(".article__wrapper").removeClass("print-current"),t=i.parents(".article__wrapper"),t.addClass("print-current"),window.print(),!1});$(".pdfdownload").on().click(function(n){var r=$(n.target),t,i;return $(".article__wrapper").removeClass("download-current"),t=r.parents(".article__wrapper"),t.addClass("download-current"),i=$(".fa-download").attr("st_url")+"?action=pdf",window.open(i),!1});$(".printagenda").on().click(function(n){var i=$(n.target),t=$(".printable-agenda").html();return $("p.printdata").show(),$("p.printdata").append(t),$(".printagenda").hide(),$(".intro-copy").hide(),$(".printdata .accordion__content").css("display","block"),$(".printdata .is-accordion-submenu-parent").attr("aria-expanded","true"),$(".events-detail__second-column").hide(),$(".events-detail__full-columns-wrap").hide(),$(".printable-agenda").hide(),$(".events-detail__first-column").css("width","100%"),$(".events-detail__first-column").css("flex","0 0 100%"),$(".js-event-detail-tabs").hide(),$(".events-detail__hero .card__background-image").hide(),window.print(),$("p.printdata").hide(),$("p.printdata").empty(),$(".printagenda").show(),$(".events-detail__second-column").show(),$(".events-detail__full-columns-wrap").show(),$(".printable-agenda").show(),$(".events-detail__first-column").css("width","62%"),$(".events-detail__first-column").css("flex","0 0 62%"),$(".js-event-detail-tabs").show(),$(".intro-copy").show(),$(".events-detail__hero .card__background-image").show(),!1})});!function(n){var t,i;n.hasInitialised||(t={escapeRegExp:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(n,t){var i=" ";return 1===n.nodeType&&(i+n.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(n,t){n.className+=" "+t},removeClass:function(n,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");n.className=n.className.replace(i,"")},interpolateString:function(n,t){return n.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(){return t(arguments[1])||""})},getCookie:function(n){var i="; "+document.cookie,t=i.split("; "+n+"=");if(2==t.length)return t.pop().split(";").shift()},setCookie:function(n,t,i,r,u){var f=new Date,e;f.setDate(f.getDate()+(i||365));e=[n+"="+t,"expires="+f.toUTCString(),"path="+(u||"/")];r&&e.push("domain="+r);document.cookie=e.join(";")},deepExtend:function(n,t){for(var i in t)t.hasOwnProperty(i)&&(i in n&&this.isPlainObject(n[i])&&this.isPlainObject(t[i])?this.deepExtend(n[i],t[i]):n[i]=t[i]);return n},throttle:function(n,t){var i=!1;return function(){i||(n.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(n){var i,r,u,t=0;if(0===n.length)return t;for(i=0,u=n.length;i<u;++i)r=n.charCodeAt(i),t=(t<<5)-t+r,t|=0;return t},normaliseHex:function(n){return"#"==n[0]&&(n=n.substr(1)),3==n.length&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),n},getContrast:function(n){n=this.normaliseHex(n);var t=parseInt(n.substr(0,2),16),i=parseInt(n.substr(2,2),16),r=parseInt(n.substr(4,2),16),u=(299*t+587*i+114*r)/1e3;return u>=128?"#000":"#fff"},getLuminance:function(n){var t=parseInt(this.normaliseHex(n),16),i=38,r=(t>>16)+i,u=(t>>8&255)+i,f=(255&t)+i,e=(16777216+65536*(r<255?r<1?0:r:255)+256*(u<255?u<1?0:u:255)+(f<255?f<1?0:f:255)).toString(16).slice(1);return"#"+e},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(n){return"object"==typeof n&&null!==n&&n.constructor==Object}},n.status={deny:"deny",allow:"allow",dismiss:"dismiss"},n.transitionEnd=function(){var i=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"},n;for(n in t)if(t.hasOwnProperty(n)&&"undefined"!=typeof i.style[n+"ransition"])return t[n];return""}(),n.hasTransition=!!n.transitionEnd,i=Object.keys(n.status).map(t.escapeRegExp),n.customStyles={},n.Popup=function(){function r(){this.initialise.apply(this,arguments)}function f(n){this.openingTimeout=null;t.removeClass(n,"cc-invisible")}function e(t){t.style.display="none";t.removeEventListener(n.transitionEnd,this.afterTransition);this.afterTransition=null}function h(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(n.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(n.status.allow),!0;var u=Object.keys(n.status),i=this.getStatus(),r=u.indexOf(i)>=0;return r&&t(i),r}function o(){var t=this.options.position.split("-"),n=[];return t.forEach(function(t){n.push("cc-"+t)}),n}function c(){var i=this.options,r="top"==i.position||"bottom"==i.position?"banner":"floating",n;return t.isMobile()&&(r="floating"),n=["cc-"+r,"cc-type-"+i.type,"cc-theme-"+i.theme],i.static&&n.push("cc-static"),n.push.apply(n,o.call(this)),v.call(this,this.options.palette),this.customStyleSelector&&n.push(this.customStyleSelector),n}function l(){var i={},n=this.options,r,u;return n.showLink||(n.elements.link="",n.elements.messagelink=n.elements.message),Object.keys(n.elements).forEach(function(r){i[r]=t.interpolateString(n.elements[r],function(t){var i=n.content[t];return t&&"string"==typeof i&&i.length?i:""})}),r=n.compliance[n.type],r||(r=n.compliance.info),i.compliance=t.interpolateString(r,function(n){return i[n]}),u=n.layouts[n.layout],u||(u=n.layouts.basic),t.interpolateString(u,function(n){return i[n]})}function u(i){var u=this.options,e=document.createElement("div"),f=u.container&&1===u.container.nodeType?u.container:document.body,r;return e.innerHTML=i,r=e.children[0],r.style.display="none",t.hasClass(r,"cc-window")&&n.hasTransition&&t.addClass(r,"cc-invisible"),this.onButtonClick=a.bind(this),r.addEventListener("click",this.onButtonClick),u.autoAttach&&(f.firstChild?f.insertBefore(r,f.firstChild):f.appendChild(r)),r}function a(r){var u=r.target,f,e;t.hasClass(u,"cc-btn")&&(f=u.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),e=f&&f[1]||!1,e&&(this.setStatus(e),this.close(!0)));t.hasClass(u,"cc-close")&&(this.setStatus(n.status.dismiss),this.close(!0));t.hasClass(u,"cc-revoke")&&this.revokeChoice()}function v(n){var r=t.hash(JSON.stringify(n)),u="cc-color-override-"+r,i=t.isPlainObject(n);return this.customStyleSelector=i?u:null,i&&y(r,n,"."+u),i}function y(i,r,u){var h,l,c;if(n.customStyles[i])return void++n.customStyles[i].references;var s={},f=r.popup,e=r.button,o=r.highlight;f&&(f.text=f.text?f.text:t.getContrast(f.background),f.link=f.link?f.link:f.text,s[u+".cc-window"]=["color: "+f.text,"background-color: "+f.background],s[u+".cc-revoke"]=["color: "+f.text,"background-color: "+f.background],s[u+" .cc-link,"+u+" .cc-link:active,"+u+" .cc-link:visited"]=["color: "+f.link],e&&(e.text=e.text?e.text:t.getContrast(e.background),e.border=e.border?e.border:"transparent",s[u+" .cc-btn"]=["color: "+e.text,"border-color: "+e.border,"background-color: "+e.background],"transparent"!=e.background&&(s[u+" .cc-btn:hover, "+u+" .cc-btn:focus"]=["background-color: "+p(e.background)]),o?(o.text=o.text?o.text:t.getContrast(o.background),o.border=o.border?o.border:"transparent",s[u+" .cc-highlight .cc-btn:first-child"]=["color: "+o.text,"border-color: "+o.border,"background-color: "+o.background]):s[u+" .cc-highlight .cc-btn:first-child"]=["color: "+f.text]));h=document.createElement("style");document.head.appendChild(h);n.customStyles[i]={references:1,element:h.sheet};l=-1;for(c in s)s.hasOwnProperty(c)&&h.sheet.insertRule(c+"{"+s[c].join(";")+"}",++l)}function p(n){return n=t.normaliseHex(n),"000000"==n?"#222":t.getLuminance(n)}function w(i){var f,u,r;t.isPlainObject(i)&&(f=t.hash(JSON.stringify(i)),u=n.customStyles[f],u&&!--u.references&&(r=u.element.ownerNode,r&&r.parentNode&&r.parentNode.removeChild(r),n.customStyles[f]=null))}function s(n,t){for(var i,r=0,u=n.length;r<u;++r)if(i=n[r],i instanceof RegExp&&i.test(t)||"string"==typeof i&&i.length&&i===t)return!0;return!1}function b(){var u=this.setStatus.bind(this),r=this.options.dismissOnTimeout,t,i;"number"==typeof r&&r>=0&&(this.dismissTimeout=window.setTimeout(function(){u(n.status.dismiss)},Math.floor(r)));t=this.options.dismissOnScroll;"number"==typeof t&&t>=0&&(i=function(){window.pageYOffset>Math.floor(t)&&(u(n.status.dismiss),window.removeEventListener("scroll",i),this.onWindowScroll=null)},this.onWindowScroll=i,window.addEventListener("scroll",i))}function k(){var i,f,n,r;("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable)&&(i=o.call(this),this.options.animateRevokable&&i.push("cc-animate"),this.customStyleSelector&&i.push(this.customStyleSelector),f=this.options.revokeBtn.replace("{{classes}}",i.join(" ")),this.revokeBtn=u.call(this,f),n=this.revokeBtn,this.options.animateRevokable&&(r=t.throttle(function(i){var r=!1,u=window.innerHeight-20;t.hasClass(n,"cc-top")&&i.clientY<20&&(r=!0);t.hasClass(n,"cc-bottom")&&i.clientY>u&&(r=!0);r?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200),this.onMouseMove=r,window.addEventListener("mousemove",r)))}var d={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(){},onStatusChange:function(){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookiesandyou.com",close:"&#x274c;"},elements:{header:'<span class="cc-header">{{header}}<\/span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}<\/span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}<\/a><\/span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}<\/a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}<\/a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}<\/a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}<\/a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}<\/span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}"><!--googleoff: all-->{{children}}<!--googleon: all--><\/div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy<\/div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}<\/div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}<\/div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}<\/div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};return r.prototype.initialise=function(n){var i,r,f;this.options&&this.destroy();t.deepExtend(this.options={},d);t.isPlainObject(n)&&t.deepExtend(this.options,n);h.call(this)&&(this.options.enabled=!1);s(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1);s(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);i=this.options.window.replace("{{classes}}",c.call(this).join(" ")).replace("{{children}}",l.call(this));r=this.options.overrideHTML;("string"==typeof r&&r.length&&(i=r),this.options.static)?(f=u.call(this,'<div class="cc-grower">'+i+"<\/div>"),f.style.display="",this.element=f.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")):this.element=u.call(this,i);b.call(this);k.call(this);this.options.autoOpen&&this.autoOpen()},r.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null);this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null);this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null);this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null);this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element);this.element=null;this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn);this.revokeBtn=null;w(this.options.palette);this.options=null},r.prototype.open=function(){if(this.element)return this.isOpen()||(n.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},r.prototype.close=function(t){if(this.element)return this.isOpen()&&(n.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},r.prototype.fadeIn=function(){var i=this.element,r,u;n.hasTransition&&i&&(this.afterTransition&&e.call(this,i),t.hasClass(i,"cc-invisible"))&&((i.style.display="",this.options.static)&&(r=this.element.clientHeight,this.element.parentNode.style.maxHeight=r+"px"),u=20,this.openingTimeout=setTimeout(f.bind(this,i),u))},r.prototype.fadeOut=function(){var i=this.element;n.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),f.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=e.bind(this,i),i.addEventListener(n.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},r.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!n.hasTransition||!t.hasClass(this.element,"cc-invisible"))},r.prototype.toggleRevokeButton=function(n){this.revokeBtn&&(this.revokeBtn.style.display=n?"":"none")},r.prototype.revokeChoice=function(n){this.options.enabled=!0;this.clearStatus();this.options.onRevokeChoice.call(this);n||this.autoOpen()},r.prototype.hasAnswered=function(){return Object.keys(n.status).indexOf(this.getStatus())>=0},r.prototype.hasConsented=function(){var t=this.getStatus();return t==n.status.allow||t==n.status.dismiss},r.prototype.autoOpen=function(){!this.hasAnswered()&&this.options.enabled&&this.open()},r.prototype.setStatus=function(i){var r=this.options.cookie,u=t.getCookie(r.name),f=Object.keys(n.status).indexOf(u)>=0;Object.keys(n.status).indexOf(i)>=0?(t.setCookie(r.name,i,r.expiryDays,r.domain,r.path),this.options.onStatusChange.call(this,i,f)):this.clearStatus()},r.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},r.prototype.clearStatus=function(){var n=this.options.cookie;t.setCookie(n.name,"",-1,n.domain,n.path)},r}(),n.Location=function(){function n(n){t.deepExtend(this.options={},f);t.isPlainObject(n)&&t.deepExtend(this.options,n);this.currentServiceIndex=-1}function r(n,t,i){var u,r=document.createElement("script");r.type="text/"+(n.type||"javascript");r.src=n.src||n;r.async=!1;r.onreadystatechange=r.onload=function(){var n=r.readyState;clearTimeout(u);t.done||n&&!/loaded|complete/.test(n)||(t.done=!0,t(),r.onreadystatechange=r.onload=null)};document.body.appendChild(r);u=setTimeout(function(){t.done=!0;t();r.onreadystatechange=r.onload=null},i)}function u(n,t,i,r,u){var f=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0"),e,s,o;if(f.open(r?"POST":"GET",n,1),f.setRequestHeader("X-Requested-With","XMLHttpRequest"),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(u))for(e=0,s=u.length;e<s;++e)o=u[e].split(":",2),f.setRequestHeader(o[0].replace(/^\s+|\s+$/g,""),o[1].replace(/^\s+|\s+$/g,""));"function"==typeof t&&(f.onreadystatechange=function(){f.readyState>3&&t(f)});f.send(r)}function i(n){return new Error("Error ["+(n.code||"UNKNOWN")+"]: "+n.error)}var f={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(n,t){try{var r=JSON.parse(t);return r.error?i(r):{code:r.country_code}}catch(u){return i({error:"Invalid response ("+u+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(n,t){try{var r=JSON.parse(t);return r.error?i(r):{code:r.country}}catch(u){return i({error:"Invalid response ("+u+")"})}}}},ipinfodb:function(){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(n,t){try{var r=JSON.parse(t);return"ERROR"==r.statusCode?i({error:r.statusMessage}):{code:r.countryCode}}catch(u){return i({error:"Invalid response ("+u+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(n){return window.geoip2?void geoip2.country(function(t){try{n({code:t.country.iso_code})}catch(r){n(i(r))}},function(t){n(i(t))}):void n(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};return n.prototype.getNextService=function(){var n;do n=this.getServiceByIdx(++this.currentServiceIndex);while(this.currentServiceIndex<this.options.services.length&&!n);return n},n.prototype.getServiceByIdx=function(n){var i=this.options.services[n],r;return"function"==typeof i?(r=i(),r.name&&t.deepExtend(r,this.options.serviceDefinitions[r.name](r)),r):"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},n.prototype.locate=function(n,t){var i=this.getNextService();return i?(this.callbackComplete=n,this.callbackError=t,void this.runService(i,this.runNextServiceOnError.bind(this))):void t(new Error("No services to run"))},n.prototype.setupUrl=function(n){var t=this.getCurrentServiceOpts();return n.url.replace(/\{(.*?)\}/g,function(i,r){if("callback"===r){var u="callback"+Date.now();return window[u]=function(t){n.__JSONP_DATA=JSON.stringify(t)},u}if(r in t.interpolateUrl)return t.interpolateUrl[r]})},n.prototype.runService=function(n,t){var i=this,f,e;n&&n.url&&n.callback&&(f=n.isScript?r:u,e=this.setupUrl(n),f(e,function(r){var u=r?r.responseText:"";n.__JSONP_DATA&&(u=n.__JSONP_DATA,delete n.__JSONP_DATA);i.runServiceCallback.call(i,t,n,u)},this.options.timeout,n.data,n.headers))},n.prototype.runServiceCallback=function(n,t,i){var u=this,f=function(t){r||u.onServiceResult.call(u,n,t)},r=t.callback(f,i);r&&this.onServiceResult.call(this,n,r)},n.prototype.onServiceResult=function(n,t){t instanceof Error||t&&t.error?n.call(this,t,null):n.call(this,null,t)},n.prototype.runNextServiceOnError=function(n,t){if(n){this.logError(n);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},n.prototype.getCurrentServiceOpts=function(){var n=this.options.services[this.currentServiceIndex];return"string"==typeof n?{name:n}:"function"==typeof n?n():t.isPlainObject(n)?n:{}},n.prototype.completeService=function(n,t){this.currentServiceIndex=-1;n&&n(t)},n.prototype.logError=function(n){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.error("The service["+t+"] ("+i.url+") responded with the following error",n)},n}(),n.Law=function(){function n(){this.initialise.apply(this,arguments)}var i={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};return n.prototype.initialise=function(n){t.deepExtend(this.options={},i);t.isPlainObject(n)&&t.deepExtend(this.options,n)},n.prototype.get=function(n){var t=this.options;return{hasLaw:t.hasLaw.indexOf(n)>=0,revokable:t.revokable.indexOf(n)>=0,explicitAction:t.explicitAction.indexOf(n)>=0}},n.prototype.applyLaw=function(n,t){var i=this.get(t);return i.hasLaw||(n.enabled=!1),this.options.regionalLaw&&(i.revokable&&(n.revokable=!0),i.explicitAction&&(n.dismissOnScroll=!1,n.dismissOnTimeout=!1)),n},n}(),n.initialise=function(t,i,r){var u=new n.Law(t.law);i||(i=function(){});r||(r=function(){});n.getCountryCode(t,function(r){delete t.law;delete t.location;r.code&&(t=u.applyLaw(t,r.code));i(new n.Popup(t))},function(i){delete t.law;delete t.location;r(i,new n.Popup(t))})},n.getCountryCode=function(t,i,r){if(t.law&&t.law.countryCode)return void i({code:t.law.countryCode});if(t.location){var u=new n.Location(t.location);return void u.locate(function(n){i(n||{})},r)}i({})},n.utils=t,n.hasInitialised=!0,window.cookieconsent=n)}(window.cookieconsent||{});!function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=n;t.c=i;t.i=function(n){return n};t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})};t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i};t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};t.p="/";t(t.s=475)}({223:function(n){!function(t,i){var r=i(t,t.document);t.lazySizes=r;"object"==typeof n&&n.exports&&(n.exports=r)}(window,function(n,t){"use strict";if(t.getElementsByClassName){var tt,i,f=t.documentElement,e=n.Date,et=n.HTMLPictureElement,o="addEventListener",r="getAttribute",s=n[o],u=n.setTimeout,ot=n.requestAnimationFrame||u,a=n.requestIdleCallback,it=/^picture$/i,st=["load","error","lazyincluded","_lazyloaded"],v={},ht=Array.prototype.forEach,y=function(n,t){return v[t]||(v[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),v[t].test(n[r]("class")||"")&&v[t]},p=function(n,t){y(n,t)||n.setAttribute("class",(n[r]("class")||"").trim()+" "+t)},d=function(n,t){var i;(i=y(n,t))&&n.setAttribute("class",(n[r]("class")||"").replace(i," "))},h=function(n,t,i){var r=i?o:"removeEventListener";i&&h(n,t);st.forEach(function(i){n[r](i,t)})},w=function(n,i,r,u,f){var e=t.createEvent("CustomEvent");return r||(r={}),r.instance=tt,e.initCustomEvent(i,!u,!f,r),n.dispatchEvent(e),e},g=function(t,r){var u;!et&&(u=n.picturefill||i.pf)?u({reevaluate:!0,elements:[t]}):r&&r.src&&(t.src=r.src)},c=function(n,t){return(getComputedStyle(n,null)||{})[t]},rt=function(n,t,r){for(r=r||n.offsetWidth;r<i.minSize&&t&&!n._lazysizesWidth;)r=t.offsetWidth,t=t.parentNode;return r},l=function(){var n,i,r=[],s=[],f=r,e=function(){var t=f;for(f=r.length?s:r,n=!0,i=!1;t.length;)t.shift()();n=!1},o=function(r,o){n&&!o?r.apply(this,arguments):(f.push(r),i||(i=!0,(t.hidden?u:ot)(e)))};return o._lsFlush=e,o}(),b=function(n,t){return t?function(){l(n)}:function(){var t=this,i=arguments;l(function(){n.apply(t,i)})}},ct=function(n){var i,f=0,r=666,t=r,o=function(){i=!1;f=e.now();n()},s=a?function(){a(o,{timeout:t});t!==r&&(t=r)}:b(function(){u(o)},!0);return function(n){var r;(n=n===!0)&&(t=44);i||(i=!0,r=125-(e.now()-f),r<0&&(r=0),n||r<9&&a?s():u(s,r))}},ut=function(n){var t,r,i=99,f=function(){t=null;n()},o=function(){var n=e.now()-r;n<i?u(o,i-n):(a||f)(f)};return function(){r=e.now();t||(t=u(o,i))}},ft=function(){var a,at,rt,gt,ft,ni,ti,ii,et,ot,st,lt,kt,vt,dt,ei=/^img$/i,oi=/^iframe$/i,si="onscroll"in n&&!/glebot/.test(navigator.userAgent),hi=0,yt=0,k=0,tt=-1,pt=function(n){k--;n&&n.target&&h(n.target,pt);(!n||k<0||!n.target)&&(k=0)},ci=function(n,i){var u,r=n,e="hidden"==c(t.body,"visibility")||"hidden"!=c(n,"visibility");for(et-=i,lt+=i,ot-=i,st+=i;e&&(r=r.offsetParent)&&r!=t.body&&r!=f;)(e=(c(r,"opacity")||1)>0)&&"visible"!=c(r,"overflow")&&(u=r.getBoundingClientRect(),e=st>u.left&&ot<u.right&&lt>u.top-1&&et<u.bottom+1);return e},ri=function(){var v,n,e,o,h,u,l,s,y;if((ft=i.loadMode)&&k<8&&(v=a.length)){for(n=0,tt++,null==vt&&(("expand"in i)||(i.expand=f.clientHeight>500&&f.clientWidth>500?500:370),kt=i.expand,vt=kt*i.expFactor),yt<vt&&k<1&&tt>2&&ft>2&&!t.hidden?(yt=vt,tt=0):yt=ft>1&&tt>1&&k<6?kt:hi;n<v;n++)if(a[n]&&!a[n]._lazyRace)if(si)if((s=a[n][r]("data-expand"))&&(u=1*s)||(u=yt),y!==u&&(ti=innerWidth+u*dt,ii=innerHeight+u,l=u*-1,y=u),e=a[n].getBoundingClientRect(),(lt=e.bottom)>=l&&(et=e.top)<=ii&&(st=e.right)>=l*dt&&(ot=e.left)<=ti&&(lt||st||ot||et)&&(i.loadHidden||"hidden"!=c(a[n],"visibility"))&&(rt&&k<3&&!s&&(ft<3||tt<4)||ci(a[n],u))){if(wt(a[n]),h=!0,k>9)break}else!h&&rt&&!o&&k<4&&tt<4&&ft>2&&(at[0]||i.preloadAfterLoad)&&(at[0]||!s&&(lt||st||ot||et||"auto"!=a[n][r](i.sizesAttr)))&&(o=at[0]||a[n]);else wt(a[n]);o&&!h&&wt(o)}},v=ct(ri),ui=function(n){p(n.target,i.loadedClass);d(n.target,i.loadingClass);h(n.target,fi)},li=b(ui),fi=function(n){li({target:n.target})},ai=function(n,t){try{n.contentWindow.location.replace(t)}catch(i){n.src=t}},vi=function(n){var t,u=n[r](i.srcsetAttr);(t=i.customMedia[n[r]("data-media")||n[r]("media")])&&n.setAttribute("media",t);u&&n.setAttribute("srcset",u)},yi=b(function(n,t,f,e,o){var s,c,v,a,y,b;(y=w(n,"lazybeforeunveil",t)).defaultPrevented||(e&&(f?p(n,i.autosizesClass):n.setAttribute("sizes",e)),c=n[r](i.srcsetAttr),s=n[r](i.srcAttr),o&&(v=n.parentNode,a=v&&it.test(v.nodeName||"")),b=t.firesLoad||"src"in n&&(c||s||a),y={target:n},b&&(h(n,pt,!0),clearTimeout(gt),gt=u(pt,2500),p(n,i.loadingClass),h(n,fi,!0)),a&&ht.call(v.getElementsByTagName("source"),vi),c?n.setAttribute("srcset",c):s&&!a&&(oi.test(n.nodeName)?ai(n,s):n.src=s),o&&(c||a)&&g(n,{src:s}));n._lazyRace&&delete n._lazyRace;d(n,i.lazyClass);l(function(){(!b||n.complete&&n.naturalWidth>1)&&(b?pt(y):k--,ui(y))},!0)}),wt=function(n){var f,t=ei.test(n.nodeName),e=t&&(n[r](i.sizesAttr)||n[r]("sizes")),u="auto"==e;(u||!rt)&&t&&(n.src||n.srcset)&&!n.complete&&!y(n,i.errorClass)||(f=w(n,"lazyunveilread").detail,u&&nt.updateElem(n,!0,n.offsetWidth),n._lazyRace=!0,k++,yi(n,f,u,e,t))},bt=function(){if(!rt){if(e.now()-ni<999)return void u(bt,999);var n=ut(function(){i.loadMode=3;v()});rt=!0;i.loadMode=3;v();s("scroll",function(){3==i.loadMode&&(i.loadMode=2);n()},!0)}};return{_:function(){ni=e.now();a=t.getElementsByClassName(i.lazyClass);at=t.getElementsByClassName(i.lazyClass+" "+i.preloadClass);dt=i.hFac;s("scroll",v,!0);s("resize",v,!0);n.MutationObserver?new MutationObserver(v).observe(f,{childList:!0,subtree:!0,attributes:!0}):(f[o]("DOMNodeInserted",v,!0),f[o]("DOMAttrModified",v,!0),setInterval(v,999));s("hashchange",v,!0);["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(n){t[o](n,v,!0)});/d$|^c/.test(t.readyState)?bt():(s("load",bt),t[o]("DOMContentLoaded",v),u(bt,2e4));a.length?(ri(),l._lsFlush()):v()},checkElems:v,unveil:wt}}(),nt=function(){var n,f=b(function(n,t,i,r){var f,u,e;if(n._lazysizesWidth=r,r+="px",n.setAttribute("sizes",r),it.test(t.nodeName||""))for(f=t.getElementsByTagName("source"),u=0,e=f.length;u<e;u++)f[u].setAttribute("sizes",r);i.detail.dataAttr||g(n,i.detail)}),r=function(n,t,i){var r,u=n.parentNode;u&&(i=rt(n,u,i),r=w(n,"lazybeforesizes",{width:i,dataAttr:!!t}),r.defaultPrevented||(i=r.detail.width)&&i!==n._lazysizesWidth&&f(n,u,r,i))},e=function(){var t,i=n.length;if(i)for(t=0;t<i;t++)r(n[t])},u=ut(e);return{_:function(){n=t.getElementsByClassName(i.autosizesClass);s("resize",u)},checkElems:u,updateElem:r}}(),k=function(){k.i||(k.i=!0,nt._(),ft._())};return function(){var t,r={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0};i=n.lazySizesConfig||n.lazysizesConfig||{};for(t in r)t in i||(i[t]=r[t]);n.lazySizesConfig=i;u(function(){i.init&&k()})}(),tt={cfg:i,autoSizer:nt,loader:ft,init:k,uP:g,aC:p,rC:d,hC:y,fire:w,gW:rt,rAF:l}}})},224:function(n){"use strict";function a(n,t){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+n+"' height='"+t+"'%3E%3C/svg%3E"}function v(n){if(n.srcset&&!d&&window.picturefill){var t=window.picturefill._;n[t.ns]&&n[t.ns].evaled||t.fillImg(n,{reselect:!0});n[t.ns].curSrc||(n[t.ns].supported=!1,t.fillImg(n,{reselect:!0}));n.currentSrc=n[t.ns].curSrc||n.src}}function y(n){for(var t,r=getComputedStyle(n).fontFamily,i={};null!==(t=b.exec(r));)i[t[1]]=t[2];return i}function s(n,t,i){var r=a(t||1,i||0);f.call(n,"src")!==r&&u.call(n,"src",r)}function e(n,t){n.naturalWidth?t(n):setTimeout(e,100,n,t)}function h(n){var r=y(n),i=n[t];if(r["object-fit"]=r["object-fit"]||"fill",!i.img){if("fill"===r["object-fit"])return;if(!i.skipTest&&c&&!r["object-position"])return}if(!i.img){i.img=new Image(n.width,n.height);i.img.srcset=f.call(n,"data-ofi-srcset")||n.srcset;i.img.src=f.call(n,"data-ofi-src")||n.src;u.call(n,"data-ofi-src",n.src);n.srcset&&u.call(n,"data-ofi-srcset",n.srcset);s(n,n.naturalWidth||n.width,n.naturalHeight||n.height);n.srcset&&(n.srcset="");try{p(n)}catch(n){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}v(i.img);n.style.backgroundImage='url("'+(i.img.currentSrc||i.img.src).replace(/"/g,'\\"')+'")';n.style.backgroundPosition=r["object-position"]||"center";n.style.backgroundRepeat="no-repeat";n.style.backgroundOrigin="content-box";/scale-down/.test(r["object-fit"])?e(i.img,function(){n.style.backgroundSize=i.img.naturalWidth>n.width||i.img.naturalHeight>n.height?"contain":"auto"}):n.style.backgroundSize=r["object-fit"].replace("none","auto").replace("fill","100% 100%");e(i.img,function(t){s(n,t.naturalWidth,t.naturalHeight)})}function p(n){var i={get:function(i){return n[t].img[i?i:"src"]},set:function(i,r){return n[t].img[r?r:"src"]=i,u.call(n,"data-ofi-"+r,i),h(n),i}};Object.defineProperty(n,"src",i);Object.defineProperty(n,"currentSrc",{get:function(){return i.get("currentSrc")}});Object.defineProperty(n,"srcset",{get:function(){return i.get("srcset")},set:function(n){return i.set(n,"srcset")}})}function w(){function n(n,i){return n[t]&&n[t].img&&("src"===i||"srcset"===i)?n[t].img:n}o||(HTMLImageElement.prototype.getAttribute=function(t){return f.call(n(this,t),t)},HTMLImageElement.prototype.setAttribute=function(t,i){return u.call(n(this,t),t,String(i))})}function r(n,i){var f=!l&&!n,u;if(i=i||{},n=n||"img",o&&!i.skipTest||!k)return!1;for("img"===n?n=document.getElementsByTagName("img"):"string"==typeof n?n=document.querySelectorAll(n):("length"in n)||(n=[n]),u=0;u<n.length;u++)n[u][t]=n[u][t]||{skipTest:i.skipTest},h(n[u]);f&&(document.body.addEventListener("load",function(n){"IMG"===n.target.tagName&&r(n.target,{skipTest:i.skipTest})},!0),l=!0,n="img");i.watchMQ&&window.addEventListener("resize",r.bind(null,n,{skipTest:i.skipTest}))}var t="bfred-it:object-fit-images",b=/(object-fit|object-position)\s*:\s*([-\w\s%]+)/g,i="undefined"==typeof Image?{style:{"object-position":1}}:new Image,c="object-fit"in i.style,o="object-position"in i.style,k="background-size"in i.style,d="string"==typeof i.currentSrc,f=i.getAttribute,u=i.setAttribute,l=!1;r.supportsObjectFit=c;r.supportsObjectPosition=o;w();n.exports=r},225:function(n,t,i){var r;!function(n){var t=navigator.userAgent;n.HTMLPictureElement&&/ecko/.test(t)&&t.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var r,u=document.createElement("source"),e=function(n){var i,r,t=n.parentNode;"PICTURE"===t.nodeName.toUpperCase()?(i=u.cloneNode(),t.insertBefore(i,t.firstElementChild),setTimeout(function(){t.removeChild(i)})):(!n._pfLastSize||n.offsetWidth>n._pfLastSize)&&(n._pfLastSize=n.offsetWidth,r=n.sizes,n.sizes+=",100vw",setTimeout(function(){n.sizes=r}))},o=function(){for(var t=document.querySelectorAll("picture > img, img[srcset][sizes]"),n=0;n<t.length;n++)e(t[n])},t=function(){clearTimeout(r);r=setTimeout(o,99)},i=n.matchMedia&&matchMedia("(orientation: landscape)"),f=function(){t();i&&i.addListener&&i.addListener(t)};return u.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?f():document.addEventListener("DOMContentLoaded",f),t}())}(window),function(u,f,e){"use strict";function w(n){return" "===n||"\t"===n||"\n"===n||"\f"===n||"\r"===n}function gt(n,t){var i=new u.Image;return i.onerror=function(){l[n]=!1;h()},i.onload=function(){l[n]=1===i.width;h()},i.src=t,"pending"}function ni(){g=!1;p=u.devicePixelRatio;v={};nt={};o.DPR=p||1;s.width=Math.max(u.innerWidth||0,c.clientWidth);s.height=Math.max(u.innerHeight||0,c.clientHeight);s.vw=s.width/100;s.vh=s.height/100;b=[s.height,s.width,p].join("-");s.em=o.getEmValue();s.rem=s.em}function ti(n,t,i,r){var f,o,e,u;return"saveData"===d.algorithm?n>2.7?u=i+1:(o=t-i,f=Math.pow(n-.6,1.5),e=o*f,r&&(e+=.1*f),u=n+e):u=i>1?Math.sqrt(n*t):n,u>i}function ii(n){var i,t=o.getSet(n),r=!1;"pending"!==t&&(r=b,t&&(i=o.setRes(t),o.applySetCandidate(i,n)));n[o.ns].evaled=r}function ri(n,t){return n.res-t.res}function ui(n,t,i){var r;return!i&&t&&(i=n[o.ns].sets,i=i&&i[i.length-1]),r=ct(t,i),r&&(t=o.makeUrl(t),n[o.ns].curSrc=t,n[o.ns].curCan=r,r.res||ht(r,r.set.sizes)),r}function ct(n,t){var i,u,r;if(n&&t)for(r=o.parseSet(t),n=o.makeUrl(n),i=0;i<r.length;i++)if(n===o.makeUrl(r[i].url)){u=r[i];break}return u}function fi(n,t){for(var i,f,e=n.getElementsByTagName("source"),r=0,u=e.length;r<u;r++)i=e[r],i[o.ns]=!0,(f=i.getAttribute("srcset"))&&t.push({srcset:f,media:i.getAttribute("media"),type:i.getAttribute("type"),sizes:i.getAttribute("sizes")})}function ei(n,t){function h(t){var i,r=t.exec(n.substring(e));if(r)return i=r[0],e+=i.length,i}function o(){for(var u,r,e,h,v,o,l,y,n=!1,i={},a=0;a<f.length;a++)h=f[a],v=h[h.length-1],o=h.substring(0,h.length-1),l=parseInt(o,10),y=parseFloat(o),bt.test(o)&&"w"===v?((u||r)&&(n=!0),0===l?n=!0:u=l):pi.test(o)&&"x"===v?((u||r||e)&&(n=!0),y<0?n=!0:r=y):bt.test(o)&&"h"===v?((e||r)&&(n=!0),0===l?n=!0:e=l):n=!0;n||(i.url=s,u&&(i.w=u),r&&(i.d=r),e&&(i.h=e),e||r||u||(i.d=1),1===i.d&&(t.has1x=!0),i.set=t,c.push(i))}function l(){for(h(li),i="",u="in descriptor";;){if(r=n.charAt(e),"in descriptor"===u)if(w(r))i&&(f.push(i),i="",u="after descriptor");else{if(","===r)return e+=1,i&&f.push(i),void o();if("("===r)i+=r,u="in parens";else{if(""===r)return i&&f.push(i),void o();i+=r}}else if("in parens"===u)if(")"===r)i+=r,u="in descriptor";else{if(""===r)return f.push(i),void o();i+=r}else if("after descriptor"===u&&!w(r)){if(""===r)return void o();u="in descriptor";e-=1}e+=1}}for(var s,f,i,u,r,a=n.length,e=0,c=[];;){if(h(ai),e>=a)return c;s=h(vi);f=[];","===s.slice(-1)?(s=s.replace(yi,""),o()):l()}}function oi(n){function s(n){function u(){r&&(f.push(r),r="")}function s(){f[0]&&(h.push(f),f=[])}for(var i,r="",f=[],h=[],e=0,t=0,o=!1;;){if(""===(i=n.charAt(t)))return u(),s(),h;if(o){if("*"===i&&"/"===n[t+1]){o=!1;t+=2;u();continue}t+=1}else{if(w(i)){if(n.charAt(t-1)&&w(n.charAt(t-1))||!r){t+=1;continue}if(0===e){u();t+=1;continue}i=" "}else if("("===i)e+=1;else if(")"===i)e-=1;else{if(","===i){u();s();t+=1;continue}if("/"===i&&"*"===n.charAt(t+1)){o=!0;t+=2;continue}}r+=i;t+=1}}}function h(n){return!!(c.test(n)&&parseFloat(n)>=0)||!!l.test(n)||"0"===n||"-0"===n||"+0"===n}var i,r,f,t,u,e,c=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(r=s(n),f=r.length,i=0;i<f;i++)if((t=r[i],u=t[t.length-1],h(u))&&((e=u,t.pop(),0===t.length)||(t=t.join(" "),o.matchesMedia(t))))return e;return"100vw"}f.createElement("picture");var y,lt,b,o={},tt=!1,k=function(){},a=f.createElement("img"),it=a.getAttribute,at=a.setAttribute,vt=a.removeAttribute,c=f.documentElement,l={},d={algorithm:""},rt="data-pfsrc",yt=rt+"set",ut=navigator.userAgent,si=/rident/.test(ut)||/ecko/.test(ut)&&ut.match(/rv\:(\d+)/)&&RegExp.$1>35,ft="currentSrc",hi=/\s+\+?\d+(e\d+)?w/,ci=/(\([^)]+\))?\s*(.+)/,et=u.picturefillCFG,pt="font-size:100%!important;",g=!0,v={},nt={},p=u.devicePixelRatio,s={px:1,"in":96},wt=f.createElement("a"),ot=!1,li=/^[ \t\n\r\u000c]+/,ai=/^[, \t\n\r\u000c]+/,vi=/^[^ \t\n\r\u000c]+/,yi=/[,]+$/,bt=/^\d+$/,pi=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,kt=function(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent&&n.attachEvent("on"+t,i)},st=function(n){var t={};return function(i){return i in t||(t[i]=n(i)),t[i]}},dt=function(){var n=/^([\d\.]+)(em|vw|px)$/,t=function(){for(var n=arguments,t=0,i=n[0];++t in n;)i=i.replace(n[t],n[++t]);return i},i=st(function(n){return"return "+t((n||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(t,r){var u;if(!(t in v))if(v[t]=!1,r&&(u=t.match(n)))v[t]=u[1]*s[u[2]];else try{v[t]=new Function("e",i(t))(s)}catch(n){}return v[t]}}(),ht=function(n,t){return n.w?(n.cWidth=o.calcListLength(t||"100vw"),n.res=n.w/n.cWidth):n.res=n.d,n},h=function(n){if(tt){var r,i,u,t=n||{};if(t.elements&&1===t.elements.nodeType&&("IMG"===t.elements.nodeName.toUpperCase()?t.elements=[t.elements]:(t.context=t.elements,t.elements=null)),r=t.elements||o.qsa(t.context||f,t.reevaluate||t.reselect?o.sel:o.selShort),u=r.length){for(o.setupRun(t),ot=!0,i=0;i<u;i++)o.fillImg(r[i],t);o.teardownRun(t)}}};for(u.console&&console.warn,(ft in a)||(ft="src"),l["image/jpeg"]=!0,l["image/gif"]=!0,l["image/png"]=!0,l["image/svg+xml"]=f.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),o.ns=("pf"+(new Date).getTime()).substr(0,9),o.supSrcset=("srcset"in a),o.supSizes=("sizes"in a),o.supPicture=!!u.HTMLPictureElement,o.supSrcset&&o.supPicture&&!o.supSizes&&function(n){a.srcset="data:,a";n.src="data:,a";o.supSrcset=a.complete===n.complete;o.supPicture=o.supSrcset&&o.supPicture}(f.createElement("img")),o.supSrcset&&!o.supSizes?function(){var t="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",n=f.createElement("img"),i=function(){2===n.width&&(o.supSizes=!0);lt=o.supSrcset&&!o.supSizes;tt=!0;setTimeout(h)};n.onload=i;n.onerror=i;n.setAttribute("sizes","9px");n.srcset=t+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 9w";n.src=t}():tt=!0,o.selShort="picture>img,img[srcset]",o.sel=o.selShort,o.cfg=d,o.DPR=p||1,o.u=s,o.types=l,o.setSize=k,o.makeUrl=st(function(n){return wt.href=n,wt.href}),o.qsa=function(n,t){return"querySelector"in n?n.querySelectorAll(t):[]},o.matchesMedia=function(){return o.matchesMedia=u.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?function(n){return!n||matchMedia(n).matches}:o.mMQ,o.matchesMedia.apply(this,arguments)},o.mMQ=function(n){return!n||dt(n)},o.calcLength=function(n){var t=dt(n,!0)||!1;return t<0&&(t=!1),t},o.supportsType=function(n){return!n||l[n]},o.parseSize=st(function(n){var t=(n||"").match(ci);return{media:t&&t[1],length:t&&t[2]}}),o.parseSet=function(n){return n.cands||(n.cands=ei(n.srcset,n)),n.cands},o.getEmValue=function(){var n;if(!y&&(n=f.body)){var t=f.createElement("div"),i=c.style.cssText,r=n.style.cssText;t.style.cssText="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)";c.style.cssText=pt;n.style.cssText=pt;n.appendChild(t);y=t.offsetWidth;n.removeChild(t);y=parseFloat(y,10);c.style.cssText=i;n.style.cssText=r}return y||16},o.calcListLength=function(n){if(!(n in nt)||d.uT){var t=o.calcLength(oi(n));nt[n]=t?t:s.width}return nt[n]},o.setRes=function(n){var t,i,r;if(n)for(t=o.parseSet(n),i=0,r=t.length;i<r;i++)ht(t[i],n.sizes);return t},o.setRes.res=ht,o.applySetCandidate=function(n,t){if(n.length){var u,f,e,l,i,s,r,a,v,h=t[o.ns],c=o.DPR;if(s=h.curSrc||t[ft],r=h.curCan||ui(t,s,n[0].set),r&&r.set===n[0].set&&((v=si&&!t.complete&&r.res-.1>c)||(r.cached=!0,r.res>=c&&(i=r))),!i)for(n.sort(ri),l=n.length,i=n[l-1],f=0;f<l;f++)if(u=n[f],u.res>=c){e=f-1;i=n[e]&&(v||s!==o.makeUrl(u.url))&&ti(n[e].res,u.res,c,n[e].cached)?n[e]:u;break}i&&(a=o.makeUrl(i.url),h.curSrc=a,h.curCan=i,a!==s&&o.setSrc(t,i),o.setSize(t))}},o.setSrc=function(n,t){var i;n.src=t.url;"image/svg+xml"===t.set.type&&(i=n.style.width,n.style.width=n.offsetWidth+1+"px",n.offsetWidth+1&&(n.style.width=i))},o.getSet=function(n){for(var t,r,u=!1,f=n[o.ns].sets,i=0;i<f.length&&!u;i++)if(t=f[i],t.srcset&&o.matchesMedia(t.media)&&(r=o.supportsType(t.type))){"pending"===r&&(t=r);u=t;break}return u},o.parseSets=function(n,t,i){var f,u,s,h,c=t&&"PICTURE"===t.nodeName.toUpperCase(),r=n[o.ns];(r.src===e||i.src)&&(r.src=it.call(n,"src"),r.src?at.call(n,rt,r.src):vt.call(n,rt));(r.srcset===e||i.srcset||!o.supSrcset||n.srcset)&&(f=it.call(n,"srcset"),r.srcset=f,h=!0);r.sets=[];c&&(r.pic=!0,fi(t,r.sets));r.srcset?(u={srcset:r.srcset,sizes:it.call(n,"sizes")},r.sets.push(u),(s=(lt||r.src)&&hi.test(r.srcset||""))||!r.src||ct(r.src,u)||u.has1x||(u.srcset+=", "+r.src,u.cands.push({url:r.src,d:1,set:u}))):r.src&&r.sets.push({srcset:r.src,sizes:null});r.curCan=null;r.curSrc=e;r.supported=!(c||u&&!o.supSrcset||s&&!o.supSizes);h&&o.supSrcset&&!r.supported&&(f?(at.call(n,yt,f),n.srcset=""):vt.call(n,yt));r.supported&&!r.srcset&&(!r.src&&n.src||n.src!==o.makeUrl(r.src))&&(null===r.src?n.removeAttribute("src"):n.src=r.src);r.parsed=!0},o.fillImg=function(n,t){var i,r=t.reselect||t.reevaluate;n[o.ns]||(n[o.ns]={});i=n[o.ns];(r||i.evaled!==b)&&(i.parsed&&!t.reevaluate||o.parseSets(n,n.parentNode,t),i.supported?i.evaled=b:ii(n))},o.setupRun=function(){ot&&!g&&p===u.devicePixelRatio||ni()},o.supPicture?(h=k,o.fillImg=k):function(){var t,e=u.attachEvent?/d$|^c/:/d$|^c|^i/,n=function(){var r=f.readyState||"";i=setTimeout(n,"loading"===r?200:999);f.body&&(o.fillImgs(),(t=t||e.test(r))&&clearTimeout(i))},i=setTimeout(n,f.body?9:99),h=function(n,t){var i,r,u=function(){var f=new Date-r;f<t?i=setTimeout(u,t-f):(i=null,n())};return function(){r=new Date;i||(i=setTimeout(u,t))}},r=c.clientHeight;kt(u,"resize",h(function(){g=Math.max(u.innerWidth||0,c.clientWidth)!==s.width||c.clientHeight!==r;r=c.clientHeight;g&&o.fillImgs()},99));kt(f,"readystatechange",n)}(),o.picturefill=h,o.fillImgs=h,o.teardownRun=k,h._=o,u.picturefillCFG={pf:o,push:function(n){var t=n.shift();"function"==typeof o[t]?o[t].apply(o,n):(d[t]=n[0],ot&&o.fillImgs({reselect:!0}))}};et&&et.length;)u.picturefillCFG.push(et.shift());u.picturefill=h;"object"==typeof n&&"object"==typeof n.exports?n.exports=h:(r=function(){return h}.call(t,i,t,n))!==e&&(n.exports=r);o.supPicture||(l["image/webp"]=gt("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document)},475:function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}i(225);i(223);r(i(224)).default({watchMQ:!0})}});!function(n,t){"undefined"!=typeof module&&module.exports?module.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function e(n,t){for(var i=0,r=n.length;i<r;++i)if(!t(n[i]))return p;return 1}function o(n,t){e(n,function(n){return!t(n)})}function n(s,c,l){function p(n){return n.call?n():u[n]}function v(){if(!--k){u[a]=1;b&&b();for(var n in t)e(n.split("|"),p)&&!o(t[n],p)&&(t[n]=[])}}s=s[r]?s:[s];var w=c&&c.call,b=w?c:l,a=w?s.join(""):c,k=s.length;return setTimeout(function(){o(s,function n(t,r){return null===t?v():(r||/^https?:\/\//.test(t)||!i||(t=t.indexOf(".js")===-1?i+t+".js":i+t),f[t]?(a&&(y[a]=1),2==f[t]?v():setTimeout(function(){n(t,!0)},0)):(f[t]=1,a&&(y[a]=1),void h(t,v)))})},0),n}function h(n,t){var r,i=c.createElement("script");i.onload=i.onerror=i[v]=function(){i[a]&&!/^c|loade/.test(i[a])||r||(i.onload=i[v]=null,r=1,f[n]=2,t())};i.async=1;i.src=s?n+(n.indexOf("?")===-1?"?":"&")+s:n;l.insertBefore(i,l.lastChild)}var i,s,c=document,l=c.getElementsByTagName("head")[0],p=!1,r="push",a="readyState",v="onreadystatechange",u={},y={},t={},f={};return n.get=h,n.order=function(t,i,r){!function u(f){f=t.shift();t.length?n(f,u):n(f,i,r)}()},n.path=function(n){i=n},n.urlArgs=function(n){s=n},n.ready=function(i,f,s){i=i[r]?i:[i];var h=[];return!o(i,function(n){u[n]||h[r](n)})&&e(i,function(n){return u[n]})?f():!function(n){t[n]=t[n]||[];t[n][r](f);s&&s(h)}(i.join("|")),n},n.done=function(t){n([null],t)},n});!function(n){var t=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return"string"==typeof n},isNumber:function(n){return"number"==typeof n},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return"undefined"==typeof n},toStr:function(n){return t.isUndefined(n)||null===n?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if(r=i.call(null,u,n,t))return!1}),!!r):r},mixin:n.extend,getUniqueId:function(){var n=0;return function(){return n++}}(),templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f,e,o=this,s=arguments;return f=function(){r=null;i||(u=n.apply(o,s))},e=i&&!r,clearTimeout(r),r=setTimeout(f,t),e&&(u=n.apply(o,s)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,h<=0?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},noop:function(){}}}(),l="0.10.5",a=function(){"use strict";function n(n){return n=t.toStr(n),n?n.split(/\s+/):[]}function i(n){return n=t.toStr(n),n?n.split(/\W+/):[]}function r(n){return function(){var i=[].slice.call(arguments,0);return function(r){var u=[];return t.each(i,function(i){u=u.concat(n(t.toStr(r[i])))}),u}}}return{nonword:i,whitespace:n,obj:{nonword:r(i),whitespace:r(n)}}}(),o=function(){"use strict";function i(i){this.maxSize=t.isNumber(i)?i:100;this.reset();this.maxSize<=0&&(this.set=this.get=n.noop)}function r(){this.head=this.tail=null}function u(n,t){this.key=n;this.val=t;this.prev=this.next=null}return t.mixin(i.prototype,{set:function(n,t){var i,r=this.list.tail;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key]);(i=this.hash[n])?(i.val=t,this.list.moveToFront(i)):(i=new u(n,t),this.list.add(i),this.hash[n]=i,this.size++)},get:function(n){var t=this.hash[n];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0;this.hash={};this.list=new r}}),t.mixin(r.prototype,{add:function(n){this.head&&(n.next=this.head,this.head.prev=n);this.head=n;this.tail=this.tail||n},remove:function(n){n.prev?n.prev.next=n.next:this.head=n.next;n.next?n.next.prev=n.prev:this.tail=n.prev},moveToFront:function(n){this.remove(n);this.add(n)}}),i}(),v=function(){"use strict";function i(n){this.prefix=["__",n,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function r(){return(new Date).getTime()}function u(n){return JSON.stringify(t.isUndefined(n)?null:n)}function f(n){return JSON.parse(n)}var n,e;try{n=window.localStorage;n.setItem("~~~","!");n.removeItem("~~~")}catch(o){n=null}return e=n&&window.JSON?{_prefix:function(n){return this.prefix+n},_ttlKey:function(n){return this._prefix(n)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),f(n.getItem(this._prefix(t)))},set:function(i,f,e){return t.isNumber(e)?n.setItem(this._ttlKey(i),u(r()+e)):n.removeItem(this._ttlKey(i)),n.setItem(this._prefix(i),u(f))},remove:function(t){return n.removeItem(this._ttlKey(t)),n.removeItem(this._prefix(t)),this},clear:function(){for(var r,i=[],u=n.length,t=0;t<u;t++)(r=n.key(t)).match(this.keyMatcher)&&i.push(r.replace(this.keyMatcher,""));for(t=i.length;t--;)this.remove(i[t]);return this},isExpired:function(i){var u=f(n.getItem(this._ttlKey(i)));return!!(t.isNumber(u)&&r()>u)}}:{get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(i.prototype,e),i}(),s=function(){"use strict";function i(t){t=t||{};this.cancelled=!1;this.lastUrl=null;this._send=t.transport?s(t.transport):n.ajax;this._get=t.rateLimiter?t.rateLimiter(this._get):this._get;this._cache=t.cache===!1?new o(0):e}function s(i){return function(r,u){function e(n){t.defer(function(){f.resolve(n)})}function o(n){t.defer(function(){f.reject(n)})}var f=n.Deferred();return i(r,u,e,o),f}}var r=0,u={},f=6,e=new o(10);return i.setMaxPendingRequests=function(n){f=n},i.resetCache=function(){e.reset()},t.mixin(i.prototype,{_get:function(n,t,i){function o(t){i&&i(null,t);e._cache.set(n,t)}function s(){i&&i(!0)}function c(){r--;delete u[n];e.onDeckRequestArgs&&(e._get.apply(e,e.onDeckRequestArgs),e.onDeckRequestArgs=null)}var h,e=this;this.cancelled||n!==this.lastUrl||((h=u[n])?h.done(o).fail(s):r<f?(r++,u[n]=this._send(n,t).done(o).fail(s).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(n,i,r){var u;return t.isFunction(i)&&(r=i,i={}),this.cancelled=!1,this.lastUrl=n,(u=this._cache.get(n))?t.defer(function(){r&&r(null,u)}):this._get(n,i,r),!!u},cancel:function(){this.cancelled=!0}}),i}(),y=function(){"use strict";function i(t){t=t||{};t.datumTokenizer&&t.queryTokenizer||n.error("datumTokenizer and queryTokenizer are both required");this.datumTokenizer=t.datumTokenizer;this.queryTokenizer=t.queryTokenizer;this.reset()}function r(n){return n=t.filter(n,function(n){return!!n}),n=t.map(n,function(n){return n.toLowerCase()})}function u(){return{ids:[],children:{}}}function f(n){for(var i={},r=[],t=0,u=n.length;t<u;t++)i[n[t]]||(i[n[t]]=!0,r.push(n[t]));return r}function e(n,t){function u(n,t){return n-t}var i=0,r=0,f=[],e,o;for(n=n.sort(u),t=t.sort(u),e=n.length,o=t.length;i<e&&r<o;)n[i]<t[r]?i++:n[i]>t[r]?r++:(f.push(n[i]),i++,r++);return f}return t.mixin(i.prototype,{bootstrap:function(n){this.datums=n.datums;this.trie=n.trie},add:function(n){var i=this;n=t.isArray(n)?n:[n];t.each(n,function(n){var f,e;f=i.datums.push(n)-1;e=r(i.datumTokenizer(n));t.each(e,function(n){for(var r,t=i.trie,e=n.split("");r=e.shift();)t=t.children[r]||(t.children[r]=u()),t.ids.push(f)})})},get:function(n){var u,i,o=this;return u=r(this.queryTokenizer(n)),t.each(u,function(n){var t,r,f,u;if(i&&0===i.length)return!1;for(t=o.trie,r=n.split("");t&&(f=r.shift());)t=t.children[f];return t&&0===r.length?(u=t.ids.slice(0),void(i=i?e(i,u):u)):(i=[],!1)}),i?t.map(f(i),function(n){return o.datums[n]}):[]},reset:function(){this.datums=[];this.trie=u()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),i}(),f=function(){"use strict";function i(n){return n.local||null}function r(i){var r,u;return u={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.thumbprint=l+r.thumbprint,r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",!r.url&&n.error("prefetch requires url to be set")),r}function u(i){function f(n){return function(i){return t.debounce(i,n)}}function e(n){return function(i){return t.throttle(i,n)}}var r,u;return u={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(r=i.remote||null)&&(r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.rateLimiter=/^throttle$/i.test(r.rateLimitBy)?e(r.rateLimitWait):f(r.rateLimitWait),r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",delete r.rateLimitBy,delete r.rateLimitWait,!r.url&&n.error("remote requires url to be set")),r}return{local:i,prefetch:r,remote:u}}();!function(i){"use strict";function u(t){t&&(t.local||t.prefetch||t.remote)||n.error("one of local, prefetch, or remote is required");this.limit=t.limit||5;this.sorter=o(t.sorter);this.dupDetector=t.dupDetector||h;this.local=f.local(t);this.prefetch=f.prefetch(t);this.remote=f.remote(t);this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null;this.index=new y({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer});this.storage=this.cacheKey?new v(this.cacheKey):null}function o(n){function i(t){return t.sort(n)}function r(n){return n}return t.isFunction(n)?i:r}function h(){return!1}var e,r;return e=i.Bloodhound,r={data:"data",protocol:"protocol",thumbprint:"thumbprint"},i.Bloodhound=u,u.noConflict=function(){return i.Bloodhound=e,u},u.tokenizers=a,t.mixin(u.prototype,{_loadPrefetch:function(t){function f(n){i.clear();i.add(t.filter?t.filter(n):n);i._saveToStorage(i.index.serialize(),t.thumbprint,t.ttl)}var u,r,i=this;return(u=this._readFromStorage(t.thumbprint))?(this.index.bootstrap(u),r=n.Deferred().resolve()):r=n.ajax(t.url,t.ajax).done(f),r},_getFromRemote:function(n,t){function f(n,i){t(n?[]:u.remote.filter?u.remote.filter(i):i)}var i,r,u=this;if(this.transport)return n=n||"",r=encodeURIComponent(n),i=this.remote.replace?this.remote.replace(this.remote.url,n):this.remote.url.replace(this.remote.wildcard,r),this.transport.get(i,this.remote.ajax,f)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(n,t,i){this.storage&&(this.storage.set(r.data,n,i),this.storage.set(r.protocol,location.protocol,i),this.storage.set(r.thumbprint,t,i))},_readFromStorage:function(n){var i,t={};return this.storage&&(t.data=this.storage.get(r.data),t.protocol=this.storage.get(r.protocol),t.thumbprint=this.storage.get(r.thumbprint)),i=t.thumbprint!==n||t.protocol!==location.protocol,t.data&&!i?t.data:null},_initialize:function(){function u(){f.add(t.isFunction(i)?i():i)}var r,f=this,i=this.local;return r=this.prefetch?this._loadPrefetch(this.prefetch):n.Deferred().resolve(),i&&r.done(u),this.transport=this.remote?new s(this.remote):null,this.initPromise=r.promise()},initialize:function(n){return!this.initPromise||n?this._initialize():this.initPromise},add:function(n){this.index.add(n)},get:function(n,i){function e(n){var f=r.slice(0);t.each(n,function(n){var i;return i=t.some(f,function(t){return u.dupDetector(n,t)}),!i&&f.push(n),f.length<u.limit});i&&i(u.sorter(f))}var u=this,r=[],f=!1;r=this.index.get(n);r=this.sorter(r).slice(0,this.limit);r.length<this.limit?f=this._getFromRemote(n,e):this._cancelLastRemoteRequest();f||(r.length>0||!this.transport)&&i&&i(r)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&s.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}}),u}(this);var r=function(){return{wrapper:'<span class="twitter-typeahead"><\/span>',dropdown:'<span class="tt-dropdown-menu"><\/span>',dataset:'<div class="tt-dataset-%CLASS%"><\/div>',suggestions:'<span class="tt-suggestions"><\/span>',suggestion:'<div class="tt-suggestion"><\/div>'}}(),i=function(){"use strict";var n={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(n.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(n.input,{marginTop:"-1px"}),n}(),h=function(){"use strict";function i(t){t&&t.el||n.error("EventBus initialized without el");this.$el=n(t.el)}var r="typeahead:";return t.mixin(i.prototype,{trigger:function(n){var t=[].slice.call(arguments,1);this.$el.trigger(r+n,t)}}),i}(),e=function(){"use strict";function t(t,i,r,u){var f;if(!r)return this;for(i=i.split(n),r=u?s(r,u):r,this._callbacks=this._callbacks||{};f=i.shift();)this._callbacks[f]=this._callbacks[f]||{sync:[],async:[]},this._callbacks[f][t].push(r);return this}function r(n,i,r){return t.call(this,"async",n,i,r)}function u(n,i,r){return t.call(this,"sync",n,i,r)}function f(t){var i;if(!this._callbacks)return this;for(t=t.split(n);i=t.shift();)delete this._callbacks[i];return this}function e(t){var r,u,f,e,o;if(!this._callbacks)return this;for(t=t.split(n),f=[].slice.call(arguments,1);(r=t.shift())&&(u=this._callbacks[r]);)e=i(u.sync,this,[r].concat(f)),o=i(u.async,this,[r].concat(f)),e()&&h(o);return this}function i(n,t,i){function r(){for(var r,u=0,f=n.length;!r&&u<f;u+=1)r=n[u].apply(t,i)===!1;return!r}return r}function o(){return window.setImmediate?function(n){setImmediate(function(){n()})}:function(n){setTimeout(function(){n()},0)}}function s(n,t){return n.bind?n.bind(t):function(){n.apply(t,[].slice.call(arguments,0))}}var n=/\s+/,h=o();return{onSync:u,onAsync:r,off:f,trigger:e}}(),p=function(n){"use strict";function i(n,i,r){for(var u,f=[],e=0,o=n.length;e<o;e++)f.push(t.escapeRegExChars(n[e]));return u=r?"\\b("+f.join("|")+")\\b":"("+f.join("|")+")",i?new RegExp(u):new RegExp(u,"i")}var r={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(u){function o(t){var i,r,f;return(i=e.exec(t.data))&&(f=n.createElement(u.tagName),u.className&&(f.className=u.className),r=t.splitText(i.index),r.splitText(i[0].length),f.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(f,r)),!!i}function f(n,t){for(var i,r=0;r<n.childNodes.length;r++)i=n.childNodes[r],i.nodeType===3?r+=t(i)?1:0:f(i,t)}var e;u=t.mixin({},r,u);u.node&&u.pattern&&(u.pattern=t.isArray(u.pattern)?u.pattern:[u.pattern],e=i(u.pattern,u.caseSensitive,u.wordsOnly),f(u.node,o))}}(window.document),c=function(){"use strict";function i(i){var r,e,o,s,h=this;i=i||{};i.input||n.error("input is missing");r=t.bind(this._onBlur,this);e=t.bind(this._onFocus,this);o=t.bind(this._onKeydown,this);s=t.bind(this._onInput,this);this.$hint=n(i.hint);this.$input=n(i.input).on("blur.tt",r).on("focus.tt",e).on("keydown.tt",o);0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop);t.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(n){u[n.which||n.keyCode]||t.defer(t.bind(h._onInput,h,n))}):this.$input.on("input.tt",s);this.query=this.$input.val();this.$overflowHelper=f(this.$input)}function f(t){return n('<pre aria-hidden="true"><\/pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function o(n,t){return i.normalizeQuery(n)===i.normalizeQuery(t)}function r(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}var u;return u={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(n){return(n||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,e,{_onBlur:function(){this.resetInputValue();this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(n){var t=u[n.which||n.keyCode];this._managePreventDefault(t,n);t&&this._shouldTrigger(t,n)&&this.trigger(t+"Keyed",n)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(n,t){var i,u,f;switch(n){case"tab":u=this.getHint();f=this.getInputValue();i=u&&u!==f&&!r(t);break;case"up":case"down":i=!r(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(n,t){var i;switch(n){case"tab":i=!r(t);break;default:i=!0}return i},_checkInputValue:function(){var n,t,i;n=this.getInputValue();t=o(n,this.query);i=!!t&&this.query.length!==n.length;this.query=n;t?i&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(n){this.query=n},getInputValue:function(){return this.$input.val()},setInputValue:function(n,t){this.$input.val(n);t?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(n){this.$hint.val(n)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var n,t,i,r;n=this.getInputValue();t=this.getHint();i=n!==t&&0===t.indexOf(n);r=""!==n&&i&&!this.hasOverflow();!r&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var n=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=n},isCursorAtEnd:function(){var n,i,r;return n=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i)?i===n:!document.selection||(r=document.selection.createRange(),r.moveStart("character",-n),n===r.text.length)},destroy:function(){this.$hint.off(".tt");this.$input.off(".tt");this.$hint=this.$input=this.$overflowHelper=null}}),i}(),u=function(){"use strict";function u(i){i=i||{};i.templates=i.templates||{};i.source||n.error("missing source");i.name&&!l(i.name)&&n.error("invalid dataset name: "+i.name);this.query=null;this.highlight=!!i.highlight;this.name=i.name||t.getUniqueId();this.source=i.source;this.displayFn=h(i.display||i.displayKey);this.templates=c(i.templates,this.displayFn);this.$el=n(r.dataset.replace("%CLASS%",this.name))}function h(n){function i(t){return t[n]}return n=n||"value",t.isFunction(n)?n:i}function c(n,i){function r(n){return"<p>"+i(n)+"<\/p>"}return{empty:n.empty&&t.templatify(n.empty),header:n.header&&t.templatify(n.header),footer:n.footer&&t.templatify(n.footer),suggestion:n.suggestion||r}}function l(n){return/^[_a-zA-Z0-9-]+$/.test(n)}var f="ttDataset",o="ttValue",s="ttDatum";return u.extractDatasetName=function(t){return n(t).data(f)},u.extractValue=function(t){return n(t).data(o)},u.extractDatum=function(t){return n(t).data(s)},t.mixin(u.prototype,e,{_render:function(u,e){function v(){return h.templates.empty({query:u,isEmpty:!0})}function y(){function a(t){var u;return u=n(r.suggestion).append(h.templates.suggestion(t)).data(f,h.name).data(o,h.displayFn(t)).data(s,t),u.children().each(function(){n(this).css(i.suggestionChild)}),u}var c,l;return c=n(r.suggestions).css(i.suggestions),l=t.map(e,a),c.append.apply(c,l),h.highlight&&p({className:"tt-highlight",node:c[0],pattern:u}),c}function l(){return h.templates.header({query:u,isEmpty:!c})}function a(){return h.templates.footer({query:u,isEmpty:!c})}if(this.$el){var c,h=this;this.$el.empty();c=e&&e.length;!c&&this.templates.empty?this.$el.html(v()).prepend(h.templates.header?l():null).append(h.templates.footer?a():null):c&&this.$el.html(y()).prepend(h.templates.header?l():null).append(h.templates.footer?a():null);this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(n){function i(i){t.canceled||n!==t.query||t._render(n,i)}var t=this;this.query=n;this.canceled=!1;this.source(n,i)},cancel:function(){this.canceled=!0},clear:function(){this.cancel();this.$el.empty();this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),u}(),w=function(){"use strict";function r(i){var u,e,o,r=this;i=i||{};i.menu||n.error("menu is required");this.isOpen=!1;this.isEmpty=!0;this.datasets=t.map(i.datasets,f);u=t.bind(this._onSuggestionClick,this);e=t.bind(this._onSuggestionMouseEnter,this);o=t.bind(this._onSuggestionMouseLeave,this);this.$menu=n(i.menu).on("click.tt",".tt-suggestion",u).on("mouseenter.tt",".tt-suggestion",e).on("mouseleave.tt",".tt-suggestion",o);t.each(this.datasets,function(n){r.$menu.append(n.getRoot());n.onSync("rendered",r._onRendered,r)})}function f(n){return new u(n)}return t.mixin(r.prototype,e,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",n(t.currentTarget))},_onSuggestionMouseEnter:function(t){this._removeCursor();this._setCursor(n(t.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function n(n){return n.isEmpty()}this.isEmpty=t.every(this.datasets,n);this.isEmpty?this._hide():this.isOpen&&this._show();this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(n,t){n.first().addClass("tt-cursor");t||this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(n){var i,r,t,u;if(this.isOpen){if(r=this._getCursor(),i=this._getSuggestions(),this._removeCursor(),t=i.index(r)+n,t=(t+1)%(i.length+1)-1,t===-1)return void this.trigger("cursorRemoved");t<-1&&(t=i.length-1);this._setCursor(u=i.eq(t));this._ensureVisible(u)}},_ensureVisible:function(n){var t,i,r,u;t=n.position().top;i=t+n.outerHeight(!0);r=this.$menu.scrollTop();u=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10);t<0?this.$menu.scrollTop(r+t):u<i&&this.$menu.scrollTop(r+(i-u))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(n){this.$menu.css("ltr"===n?i.ltr:i.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(n){var t=null;return n.length&&(t={raw:u.extractDatum(n),value:u.extractValue(n),datasetName:u.extractDatasetName(n)}),t},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(n){function i(t){t.update(n)}t.each(this.datasets,i)},empty:function(){function n(n){n.clear()}t.each(this.datasets,n);this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function n(n){n.destroy()}this.$menu.off(".tt");this.$menu=null;t.each(this.datasets,n)}}),r}(),b=function(){"use strict";function f(i){var r,u,f;i=i||{};i.input||n.error("missing input");this.isActivated=!1;this.autoselect=!!i.autoselect;this.minLength=t.isNumber(i.minLength)?i.minLength:1;this.$node=e(i.input,i.withHint);r=this.$node.find(".tt-dropdown-menu");u=this.$node.find(".tt-input");f=this.$node.find(".tt-hint");u.on("blur.tt",function(n){var i,f,e;i=document.activeElement;f=r.is(i);e=r.has(i).length>0;t.isMsie()&&(f||e)&&(n.preventDefault(),n.stopImmediatePropagation(),t.defer(function(){u.focus()}))});r.on("mousedown.tt",function(n){n.preventDefault()});this.eventBus=i.eventBus||new h({el:u});this.dropdown=new w({menu:r,datasets:i.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this);this.input=new c({input:u,hint:f}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this);this._setLanguageDirection()}function e(t,f){var e,h,c,s;e=n(t);h=n(r.wrapper).css(i.wrapper);c=n(r.dropdown).css(i.dropdown);s=e.clone().css(i.hint).css(o(e));s.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1});e.data(u,{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")});e.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(f?i.input:i.inputWithNoHint);try{e.attr("dir")||e.attr("dir","auto")}catch(l){}return e.wrap(h).parent().prepend(f?s:null).append(c)}function o(n){return{backgroundAttachment:n.css("background-attachment"),backgroundClip:n.css("background-clip"),backgroundColor:n.css("background-color"),backgroundImage:n.css("background-image"),backgroundOrigin:n.css("background-origin"),backgroundPosition:n.css("background-position"),backgroundRepeat:n.css("background-repeat"),backgroundSize:n.css("background-size")}}function s(n){var i=n.find(".tt-input");t.each(i.data(u),function(n,r){t.isUndefined(n)?i.removeAttr(r):i.attr(r,n)});i.detach().removeData(u).removeClass("tt-input").insertAfter(n);n.remove()}var u="ttAttrs";return t.mixin(f.prototype,{_onSuggestionClicked:function(n,t){var i;(i=this.dropdown.getDatumForSuggestion(t))&&this._select(i)},_onCursorMoved:function(){var n=this.dropdown.getDatumForCursor();this.input.setInputValue(n.value,!0);this.eventBus.trigger("cursorchanged",n.raw,n.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue();this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint();this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint();this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0;this.dropdown.open()},_onBlurred:function(){this.isActivated=!1;this.dropdown.empty();this.dropdown.close()},_onEnterKeyed:function(n,t){var i,r;i=this.dropdown.getDatumForCursor();r=this.dropdown.getDatumForTopSuggestion();i?(this._select(i),t.preventDefault()):this.autoselect&&r&&(this._select(r),t.preventDefault())},_onTabKeyed:function(n,t){var i;(i=this.dropdown.getDatumForCursor())?(this._select(i),t.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close();this.input.resetInputValue()},_onUpKeyed:function(){var n=this.input.getQuery();this.dropdown.isEmpty&&n.length>=this.minLength?this.dropdown.update(n):this.dropdown.moveCursorUp();this.dropdown.open()},_onDownKeyed:function(){var n=this.input.getQuery();this.dropdown.isEmpty&&n.length>=this.minLength?this.dropdown.update(n):this.dropdown.moveCursorDown();this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(n,t){this.input.clearHintIfInvalid();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty();this.dropdown.open();this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint();this.dropdown.open()},_setLanguageDirection:function(){var n;this.dir!==(n=this.input.getLanguageDirection())&&(this.dir=n,this.$node.css("direction",n),this.dropdown.setLanguageDirection(n))},_updateHint:function(){var n,i,u,f,e,r;n=this.dropdown.getDatumForTopSuggestion();n&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(i=this.input.getInputValue(),u=c.normalizeQuery(i),f=t.escapeRegExChars(u),e=new RegExp("^(?:"+f+")(.+$)","i"),r=e.exec(n.value),r?this.input.setHint(i+r[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(n){var i,r,u,t;i=this.input.getHint();r=this.input.getQuery();u=n||this.input.isCursorAtEnd();i&&r!==i&&u&&(t=this.dropdown.getDatumForTopSuggestion(),t&&this.input.setInputValue(t.value),this.eventBus.trigger("autocompleted",t.raw,t.datasetName))},_select:function(n){this.input.setQuery(n.value);this.input.setInputValue(n.value,!0);this._setLanguageDirection();this.eventBus.trigger("selected",n.raw,n.datasetName);this.dropdown.close();t.defer(t.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(n){n=t.toStr(n);this.isActivated?this.input.setInputValue(n):(this.input.setQuery(n),this.input.setInputValue(n,!0));this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy();this.dropdown.destroy();s(this.$node);this.$node=null}}),f}();!function(){"use strict";var u,i,r;u=n.fn.typeahead;i="ttTypeahead";r={initialize:function(r,u){function f(){var o,e,f=n(this);t.each(u,function(n){n.highlight=!!r.highlight});e=new b({input:f,eventBus:o=new h({el:f}),withHint:!!t.isUndefined(r.hint)||!!r.hint,minLength:r.minLength,autoselect:r.autoselect,datasets:u});f.data(i,e)}return u=t.isArray(u)?u:[].slice.call(arguments,1),r=r||{},this.each(f)},open:function(){function t(){var t,r=n(this);(t=r.data(i))&&t.open()}return this.each(t)},close:function(){function t(){var t,r=n(this);(t=r.data(i))&&t.close()}return this.each(t)},val:function(t){function r(){var r,u=n(this);(r=u.data(i))&&r.setVal(t)}function u(n){var t,r;return(t=n.data(i))&&(r=t.getVal()),r}return arguments.length?this.each(r):u(this.first())},destroy:function(){function t(){var t,r=n(this);(t=r.data(i))&&(t.destroy(),r.removeData(i))}return this.each(t)}};n.fn.typeahead=function(t){var u;return r[t]&&"initialize"!==t?(u=this.filter(function(){return!!n(this).data(i)}),r[t].apply(u,[].slice.call(arguments,1))):r.initialize.apply(this,arguments)};n.fn.typeahead.noConflict=function(){return n.fn.typeahead=u,this}}()}(window.jQuery)