function hasProperty(n){for(var t in n)return!0;return!1}function toNotes(){var n=document.getElementsByClassName("notes")[0].offsetTop;window.scrollTo(0,n)}function toTop(){window.scrollTo(0,0)}function getDataIsReady(){return window.dataIsReady?!0:!1}(function(){window.nspace=function(n){for(var r=n.split("."),i=window,t=0;t<r.length;t++)i[r[t]]=i[r[t]]||{},i=i[r[t]];return i},window.console=window.console||{log:function(){},info:function(){},error:function(){},warn:function(){},debug:function(){}}})(),Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){for(var i=t||0,r=this.length;i<r;i++)if(this[i]===n)return i;return-1}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{enumerable:!1,value:function(n){var t=this.filter(function(t){return t==n});return t.length>0}}),window.validateEmailForm=function(n){if(n.find(".emailText").length===0)return!0;var t=n.find(".emailText")[0].value;return/(.+)@(.+){2,}\.(.+){2,}/.test(t)?!0:(n.find(".emailError").show(),!1)},window.onload=function(){$(".emailSubmit").click(function(){return window.validateEmailForm($(this).closest("form"))})};var extend=function(n,t){var r=this,i,u;return i=n&&_.has(n,"constructor")?n.constructor:function(){return r.apply(this,arguments)},_.extend(i,r,t),u=function(){this.constructor=i},u.prototype=r.prototype,i.prototype=new u,n&&_.extend(i.prototype,n),i.__super__=r.prototype,i};Array.prototype.intersect=function(n){var t=this.slice(0),i=n.slice(0),r,u;for(t.sort(),i.sort(),r=[];t.length>0&&i.length>0;)t[0]<i[0]?t.shift():t[0]>i[0]?i.shift():(u=t.shift(),u&&r.push(u),i.shift());return delete t,delete i,r},Array.prototype.not=function(n){var t=this.slice(0),i=n.slice(0),r,u;for(t.sort(function(n,t){return n-t}),i.sort(function(n,t){return n-t}),r=[];t.length>0&&i.length>0;)t[0]<i[0]?r.push(t.shift()):t[0]>i[0]?i.shift():(t.shift(),i.shift());if(t.length>0)for(u=0;u<t.length;u++)r.push(t.shift());return delete t,delete i,r},$("html").hasClass("ie8")&&(Array.prototype.filter=function(n,t){return _.filter(this,n,t)},Array.prototype.map=function(n,t){return _.map(this,n,t)}),typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.URLify||(String.prototype.slugify=function(){return this.toLocaleLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-")}),nspace("KD").urlUtils={getUrlParam:function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}},nspace("KD").htmlEncode=function(n){return $("<div/>").text(n).html()},nspace("KD").htmlDecode=function(n){return $("<div/>").html(n).text()},function(){"use strict";var n=window.nspace("kd.events");n.EventNames={choropleth:{loading:{name:"choropleth:loading",finished:{name:"choropleth:loading:finished"}}},data:{name:"data",loading:{name:"data.loading"},updated:{name:"data:updated"}},loading:{name:"loading",data:{name:"loading:data",finished:{name:"loading:data:finished"},error:{name:"loading:data:error"}},polygons:{name:"loading:polygons",finished:{name:"loading:polygons:finished"}},legislativePolygons:{name:"loading:legislative-polygons",finished:{name:"loading:legislative-polygons:finished"},drawn:{name:"loading:legislative-polygons:drawn"}}},render:{first:{complete:{name:"render:first:complete"}},complete:{name:"render:complete"},allViewsComplete:{name:"render:allViewsComplete"}},route:{name:"route",hydrate:{name:"route:hydrate"}},sidebar:{toggled:{name:"sidebar:toggled"}},bar:{complex:{name:"bar:complex"},simple:{name:"bar:simple"}}},n.fireDataReady=function(n){(window.dataIsReady=!0,window.triggerScreenshot&&window.triggerScreenshot(),n)&&n.getRenderCompletePromise&&typeof n.getRenderCompletePromise=="function"&&n.getRenderCompletePromise().resolve()}}(),function(){"use strict";var n=window.nspace("kd.viz");n.UrlParams={timeFrame:"tf",indicator:"ind",distribution:"dist",characteristic:"ch",locationType:"loct",location:"loc",category:"cat",dataFormat:"fmt",legislativeDistrict:"leg",legislativeType:"legt",primaryDist:"pdist",demographic:"dem",embeddedDashboard:"edb",originalLocations:"originalLocations",center:"center",zoom:"zoom",filterString:"fs",themeColors:"theme",jump:"jump",entityType:"type",id:"id",subCategory:"sub",summary:"sum",vizType:"vizType",standardEmbed:"std",compactEmbed:"cmp",embed:"embed",showAllYears:"say",stagedLocations:"stagedLocations",distributionOrientation:"do",sort:"sort",sortColumnId:"sortColumnId",sortType:"sortType"}}(),function(n,t){"use strict";var i=nspace("kd.viz");i.vizUtil={removeCharacteristicFromModel:function(i,r,u){var f=n.extend({},i.get("dist")),e=f[r],o;e&&(o=t.filter(e,function(n){return n!=u}),f[r]=o,i.set("dist",f))},addCharacteristicToModel:function(t,i,r){var f=n.extend({},t.get("dist")),u=f[i];u||(u=[]),u.indexOf(r)<0&&(u.push(r),f[i]=u,t.set("dist",f))}}}(jQuery,_)