{"version":3,"names":[],"mappings":"","sources":["main.js"],"sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o0)&&(_.isEmpty(t)||_.reduce(t,function(e,t){return e||\"0\"!==n.get(\"NAICS\")&&n.get(\"NAICS\").substring(0,t.length)===t},!1))})},getCompaniesByEC:function(e){return _.filter(this.getCurrentCompanies(),function(t){return t.get(\"ec\")===e.id})},fetch:function(e){return _.isUndefined(e.reset)&&(e={reset:!0}),Backbone.Collection.prototype.fetch.call(this,e)}});module.exports=CompaniesCollection;\n},{\"../models/company\":7,\"backbone\":30,\"point-in-polygon\":71,\"underscore\":76}],3:[function(require,module,exports){\n\"use strict\";var _=require(\"underscore\"),Backbone=require(\"backbone\"),NaicsCodeModel=require(\"../models/naics-code.js\"),NaicsCodesCollection=Backbone.Collection.extend({url:\"data/NAICS.json\",model:NaicsCodeModel,initialize:function(e){this.superModel=e.model,this.listenTo(this.superModel,\"change:naicsMode\",function(){this.fetch({reset:!0})})},parse:function(e){return\"ID\"===this.superModel.get(\"naicsMode\")?this.deepMap(e):e},flatten:function(){function e(n){return _.map(n,function(n){return[parseInt(n.id,10),e(n.children)]})}return _.flatten(e(this.toJSON()))},assignBits:function(){var e=_.map(this.superModel.get(\"currentNAICS\"),function(e){return parseInt(e,10)});return _.map(this.flatten(),function(n){return _.contains(e,n)?1:0},this)},deepMap:function(e){if(_.isNull(e))return null;var n=this;return _.map(e,function(e){return{text:e.id,id:e.id,children:n.deepMap(e.children)}})}});module.exports=NaicsCodesCollection;\n},{\"../models/naics-code.js\":9,\"backbone\":30,\"underscore\":76}],4:[function(require,module,exports){\n\"use strict\";var Backbone=require(\"backbone\");window.$=window.jQuery=require(\"jquery\");var Router=require(\"./routes\"),pace=require(\"pace\");pace.start({document:!1}),$(document).ready(function(){$.fn.extend({disable:function(e){return this.each(function(){this.disabled=e})}}),new Router,Backbone.history.start()});\n},{\"./routes\":10,\"backbone\":30,\"jquery\":38,\"pace\":70}],5:[function(require,module,exports){\n\"use strict\";var _=require(\"underscore\"),Backbone=require(\"backbone\"),AppModel=Backbone.Model.extend({url:\"\",initialize:function(e){var t=e.yearParam,i=e.viewModeParam,s=e.compareFieldParam,a=e.employmentCenterParam,n=e.xParam,r=e.yParam,o=e.zParam,l=e.appViewParam,u=e.naicsParam,c=e.naicsModeParam,d=e.router;this.router=d,this.appView=l,!_.isUndefined(t)&&_.contains(_.values(this.get(\"years\")),t)&&this.set(\"currentYear\",t),!_.isNull(i)&&_.contains([\"points\",\"hexagons\"],i)&&this.set(\"viewMode\",i),!_.isNull(s)&&_.contains([\"Emp\",\"Sales\"],s)&&this.set(\"compareField\",s),_.isNull(n)||this.set(\"x\",n),_.isNull(r)||this.set(\"y\",r),_.isNull(o)||this.set(\"z\",o),_.isNull(a)||_.isEmpty(a)||this.set(\"selectedEC\",a),_.isNull(u)||_.isEmpty(u)||this.set(\"NaicsBinary\",this.decodeNAICS(u)),_.isNull(c)||_.isEmpty(c)||this.set(\"naicsMode\",c),_.bindAll(this,\"updateURL\",\"modelToURL\"),this.on(\"change\",this.updateURL)},resetNAICS:function(){this.set(\"currentNAICS\",\"\")},modelToURL:function(){var e=this.urlEncodeBits(this.appView.NAICSCodes.assignBits()),t=\"#year/\"+this.get(\"currentYear\")+(\"/compareField/\"+this.get(\"compareField\"))+(\"/viewMode/\"+this.get(\"viewMode\"))+(\"/naics/\"+e)+(\"/naicsMode/\"+this.get(\"naicsMode\"))+(\"/x/\"+this.get(\"x\"))+(\"/y/\"+this.get(\"y\"))+(\"/z/\"+this.get(\"z\"));return this.get(\"selectedEC\")&&(t+=\"/ec/\"+this.get(\"selectedEC\")),t},decodeNAICS:function(e){var t=_.filter(e.split(/[xz]/),_.negate(_.isEmpty)),i=_.filter(e.split(/[0-9]/),_.negate(_.isEmpty)),s=[];return _.each(_.range(0,i.length),function(e){_.each(_.range(0,t[e]),function(){s.push(this.bitifyChar(i[e]))},this)},this),s},bitifyChar:function(e){return\"x\"===e?1:0},stringifyBit:function(e){return 1===e?\"x\":\"z\"},urlEncodeBits:function(){for(var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=0,i=e,s=null,a=null,n=1,r=\"\";t

Howard County

Employees
Sales
Points
Summary
Not all businesses have sales figures and/or number of employees. Data source: InfoUSA.
';return __p};\n},{\"underscore\":76}],12:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __p=\"\";with(Array.prototype.join,obj||{})__p+='
Sales, Employees, and Businesses by Economic Center by Year
Sales
Employees
Businesses
Hover over any year or economic center to see the estimated annual sales represented by the bubbles on the chart (in billions).
';return __p};\n},{\"underscore\":76}],13:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __t,__p=\"\";with(Array.prototype.join,obj||{})__p+='
'+(null==(__t=ecStats.name)?\"\":__t)+\" Economic Center - \"+(null==(__t=ecStats.year)?\"\":__t)+'
Print
'+(null==(__t=ecStats.countString)?\"\":__t)+'
The estimated total number of businesses in the '+(null==(__t=ecStats.name)?\"\":__t)+' economic center
County Total: '+(null==(__t=countyStats.countString)?\"\":__t)+'
$'+(null==(__t=ecStats.totalSalesString)?\"\":__t)+'
The estimated total sales income in the '+(null==(__t=ecStats.name)?\"\":__t)+' economic center
County Total: $'+(null==(__t=countyStats.totalSalesString)?\"\":__t)+'
'+(null==(__t=ecStats.totalEmployeesString)?\"\":__t)+'
The estimated total number of employees in the '+(null==(__t=ecStats.name)?\"\":__t)+' economic center
County Total: '+(null==(__t=countyStats.totalEmployeesString)?\"\":__t)+\"
\";return __p};\n},{\"underscore\":76}],14:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __t,__p=\"\";with(Array.prototype.join,obj||{})__p+='
',__p+=\"points\"===shape?' ':' ',__p+=\" \",__p+=zeroLabel?' No Data ':' '+(null==(__t=unit)?\"\":__t)+(null==(__t=min)?\"\":__t)+\" - \"+(null==(__t=unit)?\"\":__t)+(null==(__t=max)?\"\":__t)+\" \",__p+=\"
\";return __p};\n},{\"underscore\":76}],15:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __t,__p=\"\";with(Array.prototype.join,obj||{})__p+='
\";return __p};\n},{\"underscore\":76}],16:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __t,__p=\"\";with(Array.prototype.join,obj||{})__p+='
'+(null==(__t=total)?\"\":__t)+'
$'+(null==(__t=sales)?\"\":__t)+'
'+(null==(__t=emp)?\"\":__t)+\"
\";return __p};\n},{\"underscore\":76}],17:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __t,__p=\"\";with(Array.prototype.join,obj||{})__p+='
Year
Legend
Economic Center
Annual '+(null==(__t=compareField)?\"\":__t)+'
Print Map
';return __p};\n},{\"underscore\":76}],18:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __p=\"\";with(Array.prototype.join,obj||{})__p+='
ID
Name
Punchcard
Filter
Clear
';return __p};\n},{\"underscore\":76}],19:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __p=\"\";with(Array.prototype.join,obj||{})__p+='
Welcome to the Howard County Data viewer! This brief guide will introduce you to various navigation tools and how to interpret the various display options available. You may exit the guide at any time by clicking the “I’m done” button along the left side. Let us first take a look at the map. To re-center your map, simply click and drag the map. To retrieve information about an economic center, simply click on the desired economic center. To print the displayed map, click on the \"Print Map\" button located at the bottom of the map. Located in the upper right corner of the viewer are the “Employees” and “Sales” buttons. These buttons represent two variables that you can view about the businesses in Howard County: The total number of employees or estimated annual sales. You can also view these two variables either as a summary of businesses in an area, represented as a hexagon in the “Summary” button, or as dots on the map representing actual businesses, in the “Points” button. Also located in the upper right corner of the viewer are the “Points” and “Summary” buttons. By default, the “Points” button is selected, which displays sales or employment data for individual businesses as a point on the map. Clicking on the “Summary” button produces a map that summarizes business employment or sales data across the county. Above the map there is a time slider. By clicking on the time slider, you can display data for any year between 2009 and 2014. To view an animation that shows change over time, click the “Play” button along the right side. Click the “Pause” button to stop the animation. To the right of the map is the NAICS panel. The NAICS panel allows you to restrict which type of businesses are displayed on the map. By default, the “NAME” button is selected, which displays the NAICS categories by name. To display the NAICS categories by ID, click on the “ID” button. Users can also search for specific NAICS categories by typing a NACIS ID or NAICS name in the filter bar that sits below the “ID” and “Name” buttons. NOTE: Filtering when the “Points” button is selected produces a map that sets a points color according to NAICS code, not sales or employment numbers. The “Punchcard” button in the NAICS pane brings up an interactive visualization of summary information for each economic center and year. Use the \"Sales\", \"Employees\", and \"Businesses\" buttons on the pop-up to switch between views. Use the mouse to hover over the economic center names or year to view the actual amounts. There is a \"Print Map\" button at the bottom of the map. Clicking it will open a print dialog to print the map and legend. If you want a color print, make sure you choose a color printer from the print dialog. OK, we’re done! Have fun! To close the guide, click the “I’m done” button below.
Next
Back
I\\'m done.
';return __p};\n},{\"underscore\":76}],20:[function(require,module,exports){\nvar _=require(\"underscore\");module.exports=function(obj){var __t,__p=\"\";with(Array.prototype.join,obj||{})__p+='
'+(null==(__t=_.keys(years)[0])?\"\":__t)+'
'+(null==(__t=_.keys(years)[_.keys(years).length-1])?\"\":__t)+'
Play
';return __p};\n},{\"underscore\":76}],21:[function(require,module,exports){\n\"use strict\";!function(){d3.hexbin=function(){function u(n){var r={};return n.forEach(function(n,t){var a=s.call(u,n,t)/o,e=Math.round(a),c=h.call(u,n,t)/i-(1&e?.5:0),f=Math.round(c),l=a-e;if(3*Math.abs(l)>1){var v=c-f,M=f+(f>c?-1:1)/2,d=e+(e>a?-1:1),g=c-M,j=a-d;v*v+l*l>g*g+j*j&&(f=M+(1&e?1:-1)/2,e=d)}var m=f+\"-\"+e,p=r[m];p?p.push(n):(p=r[m]=[n],p.i=f,p.j=e,p.x=(f+(1&e?.5:0))*i,p.y=e*o)}),d3.values(r)}function a(r){var t=0,u=0;return n.map(function(n){var a=Math.sin(n)*r,e=-Math.cos(n)*r,i=a-t,o=e-u;return t=a,u=e,[i,o]})}var e,i,o,c=1,f=1,h=r,s=t;return u.x=function(n){return arguments.length?(h=n,u):h},u.y=function(n){return arguments.length?(s=n,u):s},u.hexagon=function(n){return arguments.length<1&&(n=e),\"m\"+a(n).join(\"l\")+\"z\"},u.centers=function(){for(var n=[],r=0,t=!1,u=0;f+e>r;r+=o,t=!t,++u)for(var a=t?i/2:0,h=0;c+i/2>a;a+=i,++h){var s=[a,r];s.i=h,s.j=u,n.push(s)}return n},u.mesh=function(){var n=a(e).slice(0,4).join(\"l\");return u.centers().map(function(r){return\"M\"+r+\"m\"+n}).join(\"\")},u.size=function(n){return arguments.length?(c=+n[0],f=+n[1],u):[c,f]},u.radius=function(n){return arguments.length?(e=+n,i=2*e*Math.sin(Math.PI/3),o=1.5*e,u):e},u.radius(1)};var n=d3.range(0,2*Math.PI,Math.PI/3),r=function(n){return n[0]},t=function(n){return n[1]}}();\n},{}],22:[function(require,module,exports){\n\"use strict\";var $=require(\"jquery\"),_=require(\"underscore\"),Backbone=require(\"backbone\"),AppModel=require(\"../models/app\"),CompaniesCollection=require(\"../collections/companies\"),MapView=require(\"./map\"),CurrentCompanyView=require(\"../models/company\"),YearChooserView=require(\"./year-chooser\"),NaicsChooserView=require(\"./naics-chooser\"),SidebarView=require(\"./sidebar\"),NAICSCodesCollection=require(\"../collections/naics-codes\"),BirthDeathYearsCollection=require(\"../collections/birth-death-years\"),BirthDeathModal=require(\"./birth-death-modal\");require(\"../../../semantic/dist/components/sidebar.js\");var AppView=Backbone.View.extend({template:require(\"../templates/app.ejs\"),tagName:\"div\",id:\"\",className:\"\",events:{\"click .hexagons-button\":\"turnOnHexes\",\"click .points-button\":\"turnOnPoints\",\"click .sales-button\":\"turnOnSales\",\"click .emp-button\":\"turnOnEmp\",\"click .help-button\":\"openHelp\"},initialize:function(e){var i=e.year,t=e.viewMode,s=e.compareField,o=e.employmentCenter,a=e.x,n=e.y,r=e.z,h=e.naics,d=e.naicsMode,l=e.router;_.bindAll(this,\"windowResized\",\"render\"),this.model=new AppModel({yearParam:i,viewModeParam:t,compareFieldParam:s,employmentCenterParam:o,appViewParam:this,naicsParam:h,xParam:a,yParam:n,zParam:r,naicsModeParam:d,router:l}),this.addEvent(window,\"resize\",this.windowResized),$(document).ready(this.windowResized),this.companies=new CompaniesCollection({model:this.model}),this.birthDeathYears=new BirthDeathYearsCollection,this.birthDeathModal=new BirthDeathModal({model:this.model,birthDeathYears:this.birthDeathYears}),this.NAICSCodes=new NAICSCodesCollection({model:this.model}),this.mapView=new MapView({model:this.model,companies:this.companies,naicsCodes:this.NAICSCodes}),this.currentCompanyView=new CurrentCompanyView({model:this.model,companies:this.companies}),this.yearChooser=new YearChooserView({model:this.model}),this.sidebar=new SidebarView({model:this.model}),this.NaicsChooser=new NaicsChooserView({model:this.model,collection:this.NAICSCodes,birthDeathModal:this.birthDeathModal}),this.companies.fetch({success:_.compose(this.sidebar.render,this.NaicsChooser.render,this.yearChooser.render,this.mapView.render,this.render),reset:!1}),this.listenTo(this.model,\"change:compareField\",this.compareFieldChanged),this.listenTo(this.birthDeathYears,\"reset\",this.NaicsChooser.enableBirthDeathButton),this.listenTo(this.model,\"change:viewMode\",this.viewModeChanged)},openHelp:function(){this.sidebar.open()},compareFieldChanged:function(){\"Sales\"===this.model.get(\"compareField\")?($(\".sales-button\").addClass(\"active\"),$(\".emp-button\").removeClass(\"active\")):\"Emp\"===this.model.get(\"compareField\")&&($(\".sales-button\").removeClass(\"active\"),$(\".emp-button\").addClass(\"active\"))},viewModeChanged:function(){\"points\"===this.model.get(\"viewMode\")?($(\".points-button\").addClass(\"active\"),$(\".hexagons-button\").removeClass(\"active\")):\"hexagons\"===this.model.get(\"viewMode\")&&($(\".points-button\").removeClass(\"active\"),$(\".hexagons-button\").addClass(\"active\"))},addEvent:function(e,i,t){null!=e&&\"undefined\"!=typeof e&&(e.addEventListener?e.addEventListener(i,t,!1):e.attachEvent?e.attachEvent(\"on\"+i,t):e[\"on\"+i]=t)},turnOnHexes:function(){this.model.set(\"viewMode\",\"hexagons\")},turnOnPoints:function(){this.model.set(\"viewMode\",\"points\")},turnOnSales:function(){this.model.set(\"compareField\",\"Sales\")},turnOnEmp:function(){this.model.set(\"compareField\",\"Emp\")},windowResized:function(){},render:function(){this.$el.css(\"display\",\"none\"),this.$el.html(this.template()),this.mapView.setElement(\".map\"),this.sidebar.setElement(\".help-bar\"),this.yearChooser.setElement(\".year-chooser\"),this.NaicsChooser.setElement(\".naics-chooser\"),this.birthDeathYears.fetch({reset:!0}),this.birthDeathModal.render(),this.viewModeChanged(),this.compareFieldChanged(),this.$el.css(\"display\",\"block\")}});module.exports=AppView;\n},{\"../../../semantic/dist/components/sidebar.js\":81,\"../collections/birth-death-years\":1,\"../collections/companies\":2,\"../collections/naics-codes\":3,\"../models/app\":5,\"../models/company\":7,\"../templates/app.ejs\":11,\"./birth-death-modal\":23,\"./map\":25,\"./naics-chooser\":26,\"./sidebar\":27,\"./year-chooser\":28,\"backbone\":30,\"jquery\":38,\"underscore\":76}],23:[function(require,module,exports){\n\"use strict\";function _defineProperty(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var $=require(\"jquery\"),_=require(\"underscore\"),Backbone=require(\"backbone\"),transition=require(\"../../../semantic/dist/components/transition\"),modal=require(\"../../../semantic/dist/components/modal\"),dimmer=require(\"../../../semantic/dist/components/dimmer\"),BirthsDeathsModel=require(\"../models/birth-death-year\"),BirthDeathModalView=Backbone.View.extend({template:require(\"../templates/birth-death-modal.ejs\"),tagName:\"div\",id:\"\",className:\"birth-death-modal\",events:{\"click .sales-button\":\"setSales\",\"click .emp-button\":\"setEmp\",\"click .companies-button\":\"setCompanies\",\"click .close.icon\":\"closeIconClicked\"},initialize:function(t){this.model=t.model,this.birthsDeathsModel=new BirthsDeathsModel,this.hintObj=this.birthsDeathsModel.get(\"hintObj\"),this.collection=t.birthDeathYears,this.circleGroups=[],_.bindAll(this,\"updateBirthsDeaths\",\"plotPoints\",\"open\",\"render\"),this.listenTo(this.model,\"change:birthsDeathsField\",this.updateBirthsDeaths),this.listenTo(this.collection,\"reset\",this.render)},closeIconClicked:function(){$(\".ui.modal.birth-death-modal\").modal(\"hide\"),this.model.set(\"birthsDeathsField\",\"Sales\")},setSales:function(){return this.model.set(\"birthsDeathsField\",\"Sales\"),this},setCompanies:function(){return this.model.set(\"birthsDeathsField\",\"Companies\"),this},setEmp:function(){return this.model.set(\"birthsDeathsField\",\"Emp\"),this},getMax:function(t){return _.chain(t).pluck(this.model.get(\"birthsDeathsField\")).map(_.values).map(function(t){return _.map(t,function(t){return parseInt(t)})}).flatten().filter(_.negate(_.isNaN)).max().value()},extractData:function(t,e,a){return _defineProperty({},a,_.chain(t).pluck(a).pluck(e.toString()).zip(_.range(2009,2015)).value())},formatData:function(t){this.max=this.getMax(t);var e=_.range(9),a=_.map(e,function(e){return _.extend(this.extractData(t,e,this.model.get(\"birthsDeathsField\")),{name:_.invert(this.model.ecsDict)[e]})}.bind(this));return a},truncate:function(t,e,a){return t.length>e&&(t=t.substring(0,e+1),t=t.substring(0,Math.min(t.length,t.lastIndexOf(\" \"))),t+=a),t},plotPoints:function(){this.data=this.formatData(this.collection.toJSON());var t=this;_.each(this.data,function(e,a){var i=_.keys(e)[0],s=t.circleGroups[a].selectAll(\"circle\").data(e[t.model.get(\"birthsDeathsField\")]),r=t.circleGroups[a].selectAll(\"text\").data(e[t.model.get(\"birthsDeathsField\")]),n=d3.scale.linear().domain([0,t.max]).range([1,12]);s.attr(\"cx\",function(e){return t.xScale(e[1])}).attr(\"cy\",20*a+20).transition().duration(750).attr(\"r\",function(t){return n(parseInt(t[0]))}).attr(\"data-year\",function(t){return t[1]}).attr(\"class\",\"data-circle\").style(\"fill\",function(e){return t.c(a)}),r.attr(\"y\",20*a+25).attr(\"x\",function(e){return t.xScale(e[1])-5}).attr(\"data-year\",function(t){return t[1]}).attr(\"class\",\"data-text value\").text(function(t){if(\"Sales\"===i)return(parseInt(t[0])/1e12).toFixed(3);var e=parseInt(t[0]);return e.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g,\",\")}).style(\"fill\",function(e){return t.c(a)}).style(\"display\",\"none\")})},startD3:function(){function t(){var t=d3.select(this).node().parentNode;d3.select(t).selectAll(\"circle\").style(\"display\",\"none\"),d3.select(t).selectAll(\"text.value\").style(\"display\",\"block\")}function e(){var t=d3.select(this).node().parentNode;d3.select(t).selectAll(\"circle\").style(\"display\",\"block\"),d3.select(t).selectAll(\"text.value\").style(\"display\",\"none\")}function a(t){var e=f.$('.data-circle[data-year=\"'+t+'\"]'),a=f.$('.data-text[data-year=\"'+t+'\"]');_.each(e,function(t){return f.$(t).css(\"display\",\"none\")}),_.each(a,function(t){return f.$(t).css(\"display\",\"block\")})}function i(t){var e=f.$('.data-circle[data-year=\"'+t+'\"]'),a=f.$('.data-text[data-year=\"'+t+'\"]');_.each(e,function(t){return f.$(t).css(\"display\",\"block\")}),_.each(a,function(t){return f.$(t).css(\"display\",\"none\")})}var s=this,r=this.model.get(\"years\"),n={top:0,right:200,bottom:0,left:10},l={top:50,right:0,bottom:0,left:10};this.width=600;var o=250,c=_.min(_.invert(r)),d=_.max(_.invert(r)),h=_.keys(r).length;this.c=d3.scale.category10();var u=d3.scale.linear().range([0,this.width]),m=d3.svg.axis().scale(u).ticks(h).orient(\"top\"),p=d3.format(\"0000\");m.tickFormat(p),this.svg=d3.select(\".births-deaths-punchcard\").attr(\"width\",this.width+n.left+n.right).attr(\"height\",o+n.top+n.bottom).style(\"margin-left\",n.left+\"px\").style(\"margin-top\",n.top+\"px\").append(\"g\").attr(\"transform\",\"translate(\"+l.left+\",\"+l.top+\")\"),u.domain([c,d]),this.xScale=d3.scale.linear().domain([c,d]).range([0,this.width]),this.svg.append(\"g\").attr(\"class\",\"x axis x-axis\").attr(\"transform\",\"translate(0,0)\").call(m).selectAll(\"text\").style(\"text-anchor\",\"start\").attr(\"dx\",\".75em\").attr(\"dy\",\".65em\").attr(\"class\",\"label\").attr(\"transform\",\"rotate( -65 )\"),this.svg.selectAll(\".tick\").on(\"mouseover\",a).on(\"mouseout\",i);var f=this;this.data=this.formatData(this.collection.toJSON());for(var b=function(a){s.circleGroups[a]=s.svg.append(\"g\").attr(\"data-name\",s.data[a].name),f.circleGroups[a].selectAll(\"circle\").data(s.data[a][f.model.get(\"birthsDeathsField\")]).enter().append(\"circle\"),f.circleGroups[a].selectAll(\"text\").data(s.data[a][f.model.get(\"birthsDeathsField\")]).enter().append(\"text\"),f.circleGroups[a].append(\"text\").attr(\"y\",20*a+25).attr(\"x\",f.width+50).attr(\"class\",\"label\").text(f.truncate(s.data[a].name,30,\"...\")).style(\"fill\",function(t){return f.c(a)}).on(\"mouseover\",t).on(\"mouseout\",e)},g=0;g=.01?t/(e+t):1,d=e/(e+t)>=.01?e/(e+t):0,u=d3.layout.pie().sort(null).padAngle(d>=.01?.05:0)([d,c]),m=(d3.svg.arc().innerRadius(s).outerRadius(o).startAngle(u[0].startAngle).endAngle(u[0].endAngle).padAngle(u[0].padAngle),d3.svg.arc().innerRadius(s).outerRadius(o).startAngle(u[1].startAngle).endAngle(u[1].endAngle).padAngle(u[1].padAngle),d3.svg.arc().innerRadius(s).padRadius(o)),h=d3.select(a+\" svg\");u[0].pathClass=\"ec-path\",u[1].pathClass=\"county-path\",h.attr(\"width\",r+2*l).attr(\"height\",i+2*l),h.selectAll(\"path\").data(u).enter().append(\"path\").each(function(t){t.outerRadius=o}).attr(\"d\",m).attr(\"class\",function(t){return t.pathClass}).attr(\"transform\",\"translate(\"+(r/2+l).toString()+\",\"+(i/2+l).toString()+\")\").on(\"mouseover\",function(t){$(a+\" .chart-label span\").html(Math.round(100*t.data).toString()+\"%\").show(),_.bind(n(10,0),this)(t)}).on(\"mouseout\",function(t){$(a+\" .chart-label span\").html(\"\").hide(),_.bind(n(-10,150),this)(t)}),$(a+\" .chart-label span\").hide()},printButtonClicked:function(){this.$el.removeClass(\"printable\"),this.$el.addClass(\"printable\"),this.$el.attr(\"style\",\"top: 0; left: 0\"),window.print(),this.$el.attr(\"style\",\"\"),this.$el.removeClass(\"printable\")},closeIconClicked:function(){$(\".ui.modal.economic-center-modal\").modal(\"hide\")},open:function(t){var e=this;this.allCompanies=t.allCompanies;var a=this.createStats(t.companies,t.ec.properties.NAME,this.model.get(\"currentYear\")),n=this.createStats(this.allCompanies,\"St. Mary's County\",this.model.get(\"currentYear\"));this.setElement(\".economic-center-modal\"),this.$el.html(this.template({ecStats:a,countyStats:n})),this.drawChart(n.totalSales-a.totalSales,a.totalSales,\".sales-card\"),this.drawChart(n.totalEmployees-a.totalEmployees,a.totalEmployees,\".employees-card\"),this.drawChart(n.count-a.count,a.count,\".companies-card\"),$(\".ui.modal.economic-center-modal\").modal({easing:\"easeOutQuad\",transition:\"vertical flip\",onHidden:function(){return e.model.unset(\"selectedEC\")}}).modal(\"show\")},render:function(t){this.setElement(\".employment-center-modal\"),this.$el.html(\"\")}});module.exports=EcModalView;\n},{\"../../../semantic/dist/components/dimmer\":77,\"../../../semantic/dist/components/modal\":79,\"../../../semantic/dist/components/transition\":82,\"../templates/ec-modal.ejs\":13,\"backbone\":30,\"jquery\":38,\"numeral\":69,\"underscore\":76}],25:[function(require,module,exports){\n\"use strict\";var $=require(\"jquery\"),_=require(\"underscore\"),Backbone=require(\"backbone\"),MapModel=require(\"../models/map\"),d3=require(\"d3\"),q=require(\"q\"),EcModal=require(\"../views/ec-modal\"),L=require(\"leaflet\");L.mapbox=require(\"mapbox.js\"),L.esri=require(\"esri-leaflet\");var d3tip=require(\"d3-tip\");d3tip(d3),require(\"../vendor/d3-hexbin\");var MapView=Backbone.View.extend({template:require(\"../templates/map.ejs\"),legendItemTemplate:require(\"../templates/map-legend-item.ejs\"),legendHexTemplate:require(\"../templates/map-legend-hex.ejs\"),tooltipTemplate:require(\"../templates/map-tooltip.ejs\"),tagName:\"div\",el:\".map\",className:\"\",events:{\"click .print-map-button\":\"printButtonClicked\"},d3Shapes:[],initialize:function(e){var t=this;_.bindAll(this,\"render\",\"buildMap\",\"replot\",\"plotCompanies\",\"getPointColor\",\"getBinColor\",\"plotHexBins\",\"employmentCenterClick\",\"getMaxes\",\"replot\",\"naicsUpdate\",\"createLegend\",\"createLeafletMap\",\"plotShape\",\"createShapes\",\"resetD3\",\"updateModelCenter\"),this.superModel=e.model,this.companies=e.companies,this.naicsCodes=e.naicsCodes,this.model=new MapModel,this.naicsColors=[],this.ecModal=new EcModal({model:this.superModel,companies:this.companies}),this.dragging=!1,this.drag=d3.behavior.drag(),this.drag.on(\"drag\",_.bind(function(){this.dragging=!0},this)),this.listenTo(this.superModel,\"change:currentNAICS\",this.naicsUpdate),this.listenTo(this.superModel,\"change:viewMode\",this.replot),this.listenTo(this.superModel,\"change:compareField\",this.replot),this.listenTo(this.superModel,\"change:selectedEC\",this.updateECModal),this.listenTo(this.companies,\"reset\",this.replot),this.interpolator=_.bind(function(e){var t=_.chain(this.superModel.getColors()).map(function(t,s){return e>=t[0]&&e<=t[1]?s:null}).filter(_.negate(_.isNull)).value();return t.length>0?t[0]:this.superModel.get(\"defaultColor\")},this),this.tip=d3.tip().attr(\"class\",\"map-tooltip\").html(_.bind(function(e){return this.tooltipTemplate({total:this.getBinTotal(e),emp:this.addCommasToInteger(this.getBinSum(e,\"Emp\")),sales:this.addCommasToInteger(this.getBinSum(e,\"Sales\"))})},this)),this.randomColorDictionary={11:\"#FFB300\",21:\"#803E75\",22:\"#FF6800\",23:\"#A6BDD7\",31:\"#C10020\",32:\"#CEA262\",33:\"#817066\",42:\"#007D34\",44:\"#F6768E\",45:\"#00538A\",48:\"#FF7A5C\",49:\"#53377A\",51:\"#FF8E00\",52:\"#B32851\",53:\"#F4C800\",54:\"#7F180D\",55:\"#93AA00\",56:\"#593315\",61:\"#F13A13\",62:\"#232C16\",71:\"#0000FF\",72:\"#FF0000\",81:\"#FF00FF\",92:\"#00FF00\"},d3.json(\"./data/employment-centers.geojson\",function(e,s){t.model.set(\"employmentCenters\",s),t.updateECModal()})},refreshData:function(){this.companies.fetch({reset:!0})},printButtonClicked:function(){this.$el.removeClass(\"ten wide column\");var e=\"fifteen wide column \"+this.$el.attr(\"class\");this.$el.attr(\"class\",e),this.$el.addClass(\"printable\"),window.print(),this.$el.removeClass(\"printable fifteen wide column\"),e=\"ten wide column \"+this.$el.attr(\"class\"),this.$el.attr(\"class\",e)},naicsUpdate:function(){this.naicsColors=_.chain(this.naicsCodes.pluck(\"id\")).uniq().map(function(e){return{code:e,color:this.randomColorDictionary[e]}},this).value(),this.refreshData()},bindings:{\".map-year-label\":{observe:[\"currentYear\"],onGet:function(e){return parseInt(e,10)>80?\"19\"+e:\"20\"+e}},\".maxVal\":{observe:[\"maxValue\"],onGet:function(e){for(var t=/(\\d+)(\\d{3})/,s=e.toString();t.test(s);)s=s.replace(t,\"$1,$2\");return\"Sales\"===this.superModel.get(\"compareField\")?\"$\"+s:s}},\".minVal\":{observe:[\"maxValue\"],onGet:function(e){return\"Sales\"===this.superModel.get(\"compareField\")?\"$0\":\"0\"}},\".center-label\":{observe:[\"maxValue\"],onGet:function(e){return\"Sales\"===this.superModel.get(\"compareField\")?\"Sales\":\"Employees\"}}},getPointColor:function(e){var t=\"white\";if(_.isEmpty(this.superModel.get(\"currentNAICS\"))){var t=e[this.superModel.getCompareIndex()]/this.superModel.getMaxValue();return this.interpolator(t>1?1:t)}var s=e.NAICS.slice(0,2),i=_.findWhere(this.naicsColors,{code:s});return _.isUndefined(i)||(t=i.color),t},getBinColor:function(e){var t=e/this.superModel.getMaxValue();return this.interpolator(t>1?1:t)},buildMap:function(){var e=q.defer();return this.map=d3.select(this.leafletMap.getPanes().overlayPane).append(\"svg\").call(this.tip).attr(\"width\",this.$el.width()).attr(\"height\",this.$el.height()),this.d3MapGroup=this.map.append(\"g\").attr(\"class\",\"leaflet-zoom-hide\").attr(\"class\",\"leaflet-zoom-hide\"),this.d3MapGroup.append(\"g\").attr(\"class\",\"employment-centers\"),this.d3MapGroup.append(\"g\").attr(\"class\",\"county\"),this.d3MapGroup.append(\"g\").attr(\"class\",\"hexagons\"),this.d3MapGroup.append(\"g\").attr(\"class\",\"points\"),e.resolve(),e.promise},plotShape:function(e){function t(e,t){var i=s.latLngToLayerPoint(new L.LatLng(t,e));this.stream.point(i.x,i.y)}var s=this.leafletMap,i=d3.geo.transform({point:t}),a=d3.geo.path().projection(i),o=e.data,n=(e.fill,e.stroke,e.strokeWidth,e.group),r=e.onMouseOver||function(){},l=e.onMouseOut||function(){},p=e.onClick||function(){},d=q.defer(),h=this.d3MapGroup.select(\"g.\"+n).selectAll(\"path\").data(o.features).enter().append(\"path\").attr(\"d\",a).on(\"mouseover\",r).on(\"mouseout\",l).on(\"mouseup\",p);return h.call(this.drag),this.d3Shapes.push(h),d.resolve(),d.promise},resetD3:function(){function e(e,s){var i=t.latLngToLayerPoint(new L.LatLng(s,e));this.stream.point(i.x,i.y)}var t=this.leafletMap,s=d3.geo.transform({point:e}),i=d3.geo.path().projection(s);_.each(this.d3Shapes,function(e){e.attr(\"d\",i)},this);var a=this.d3Shapes[0][0][0].getBBox(),o=a.width+100,n=a.height+100,r=a.x-25,l=a.y-25;d3.select(this.map[0][0]).attr(\"width\",o).attr(\"height\",n).style(\"left\",r+\"px\").style(\"top\",l+\"px\"),d3.select(this.d3MapGroup[0][0]).attr(\"transform\",\"translate(\"+-r+\",\"+-l+\")\"),this.replot()},plotCompanies:function(){function e(e,s){var i=t.latLngToLayerPoint(new L.LatLng(s,e));return[i.x,i.y]}var t=this.leafletMap,s=d3.geo.transform({point:e}),i=(d3.geo.path().projection(s),q.defer()),a=this,o=_.map(this.companies.getCurrentCompanies(),function(e){return e.toJSON()});return this.d3MapGroup.select(\"g.points\").selectAll(\"circle\").data(o).enter().append(\"circle\").attr(\"r\",3).attr(\"class\",\"company-point\").attr(\"data-emp\",function(e){return e.Emp}).attr(\"data-sales\",function(e){return e.Sales}).attr(\"transform\",function(t){return\"translate(\"+e(t.Lon,t.Lat)+\")\"}).attr(\"stroke\",\"#aaaaaa\").attr(\"fill\",a.getPointColor),i.resolve(),i.promise},getBinSum:function(e,t){return _.chain(e).pluck(2).pluck(t).map(parseFloat).filter(function(e){return!_.isNaN(e)}).reduce(function(e,t){return e+t},0).value()},getBinTotal:function(e){return _.pluck(e,2).length},plotHexBins:function(){function e(e,t){var i=s.latLngToLayerPoint(new L.LatLng(t,e));return[i.x,i.y]}var t=this,s=this.leafletMap,i=this,a=d3.hexbin().size([this.superModel.get(\"width\"),this.superModel.get(\"height\")]).radius(12),o=d3.scale.sqrt().domain([0,12]).range([0,8]);this.bins=a(_.map(this.companies.getCurrentCompanies({excludeZeroSales:!0}),function(t){return e(t.get(\"Lon\"),t.get(\"Lat\")).concat([{Emp:t.get(\"Emp\"),Sales:t.get(\"Sales\")}])})),this.d3MapGroup.select(\"g.hexagons\").selectAll(\"path\").data(this.bins).enter().append(\"path\").attr(\"class\",\"hex-bin\").attr(\"transform\",function(e){return\"translate(\"+e.x+\",\"+e.y+\")\"}).attr(\"data-emp\",function(e){return t.getBinSum(e,\"Emp\")}).attr(\"data-sales\",function(e){return t.getBinSum(e,\"Sales\")}).attr(\"data-companies\",this.getBinTotal).style(\"fill\",function(e){return i.getBinSum(e,i.superModel.getCompareIndex()),i.getBinColor(i.getBinSum(e,i.superModel.getCompareIndex()))}).on(\"mouseover\",this.tip.show).on(\"mouseout\",this.tip.hide).attr(\"d\",function(){return a.hexagon(o(0))}).transition().duration(250).attr(\"d\",function(e){return a.hexagon(o(25))})},replot:function(){if(!_.isUndefined(this.d3MapGroup)){var e=q.defer();return this.createLegend(),this.superModel.set(\"maxValue\",_.chain(this.companies.toJSON()).pluck(this.superModel.getCompareIndex()).map(function(e){return parseInt(e,10)}).max().value()),this.d3MapGroup.selectAll(\".hex-bin\").remove(),this.d3MapGroup.selectAll(\".company-point\").remove(),\"points\"===this.superModel.get(\"viewMode\")?(this.plotCompanies(),this.leafletMap.touchZoom.enable(),this.leafletMap.doubleClickZoom.enable(),this.leafletMap.scrollWheelZoom.enable(),this.leafletMap.boxZoom.enable(),$(\".leaflet-control-zoom\").css(\"visibility\",\"visible\")):(this.superModel.setHexBinDefaults(),this.leafletMap.setView([this.superModel.get(\"x\"),this.superModel.get(\"y\")],this.superModel.get(\"z\")),this.leafletMap.touchZoom.disable(),this.leafletMap.doubleClickZoom.disable(),this.leafletMap.scrollWheelZoom.disable(),this.leafletMap.boxZoom.disable(),$(\".leaflet-control-zoom\").css(\"visibility\",\"hidden\"),this.plotHexBins()),e.resolve(),e.promise}return null},createLegend:function(){var e=this;this.$(\".legend .legendVals\").html(\"\"),\"points\"===this.superModel.get(\"viewMode\")&&this.superModel.get(\"currentNAICS\").length>0?(_.chain(this.superModel.get(\"currentNAICS\")).map(function(e){return e.slice(0,2)}).uniq().map(function(t){return{text:e.naicsCodes.findWhere({id:t}).get(\"text\"),id:t,color:e.randomColorDictionary[t]}}).each(function(t){e.$(\".legend .legendVals\").append(e.legendItemTemplate(t))}),this.$(\".legend .legend-hexes\").hide(),this.$(\".legend .legend-hexes-title\").hide()):(\"Emp\"===e.superModel.get(\"compareField\")?this.$(\".legend .legend-hexes-title\").html(\"Annual Employees\"):this.$(\".legend .legend-hexes-title\").html(\"Annual Sales\"),this.$(\".legend .legend-hexes\").html(\"\"),this.$(\".legend .legend-hexes\").append(e.legendHexTemplate({shape:this.superModel.get(\"viewMode\"),color:this.superModel.get(\"defaultColor\"),zeroLabel:!0})),_.each(this.superModel.getColors(),function(t,s){e.$(\".legend .legend-hexes\").append(e.legendHexTemplate({shape:e.superModel.get(\"viewMode\"),unit:\"Sales\"===e.superModel.get(\"compareField\")?\"$\":\"\",color:s,min:e.addCommasToInteger(Math.ceil(t[0]*e.superModel.getMaxValue())),max:e.addCommasToInteger(Math.ceil(t[1]*e.superModel.getMaxValue())),zeroLabel:!1}))}),this.$(\".legend .legend-hexes\").show(),this.$(\".legend .legend-hexes-title\").show())},addCommasToInteger:function(e){return e.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g,\",\")},employmentCenterMouseOver:function(e){d3.select(this).attr(\"stroke-width\",4)},employmentCenterMouseOut:function(e){d3.select(this).attr(\"stroke-width\",2)},updateECModal:function(){var e=this.superModel.get(\"selectedEC\");if(_.isUndefined(e))this.ecModal.close&&this.ecModal.close();else{var t=_.find(this.model.get(\"employmentCenters\").features,function(t){return t.properties.ID===e});_.isNull(t)||this.ecModal.open({allCompanies:this.companies.getCurrentCompanies(),companies:this.companies.getCompaniesByEC(t),ec:t})}},employmentCenterClick:function(e){this.dragging||this.superModel.set(\"selectedEC\",e.properties.ID),this.dragging=!1},createLeafletMap:function(){var e=q.defer();return this.leafletMap=new L.mapbox.Map(\"map\",\"mapbox.streets\"),this.leafletMap.options.minZoom=10,L.mapbox.tileLayer(\"http://{s}.tiles.mapbox.com/v4/cgis-devteam.eb5d19ab/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiY2dpcy1kZXZ0ZWFtIiwiYSI6ImNpZWx5YnBtaTAwNWw4ZGt1ZnN2OXZiYTQifQ.PYZSxzXX8Yi1xUtEKvYHJw\",{attribution:''}).addTo(this.leafletMap),this.leafletMap.setView(new L.LatLng(this.superModel.get(\"x\"),this.superModel.get(\"y\")),this.superModel.get(\"z\")),this.leafletMap.on(\"zoomend\",_.compose(this.resetD3,this.updateModelCenter)),this.leafletMap.on(\"dragend\",this.updateModelCenter),e.resolve(),e.promise},updateModelCenter:function(){var e=this.leafletMap.getCenter().lat,t=this.leafletMap.getCenter().lng,s=this.leafletMap.getZoom();this.superModel.set(\"x\",e),this.superModel.set(\"y\",t),this.superModel.set(\"z\",s)},getMaxes:function(){var e=this,t=\"./data/maxes.json\",s=q.defer();return d3.json(t,function(t,i){e.superModel.set(\"maxes\",i),s.resolve()}),s.promise},getShapes:function(){var e=this,t=\"./data/county-boundary.geojson\",s=\"./data/employment-centers.geojson\",i=q.defer();return d3.json(s,function(s,a){e.model.set(\"ecGeodata\",a),d3.json(t,function(t,s){e.model.set(\"countyGeodata\",s),i.resolve()})}),i.promise},createShapes:function(){this.plotShape({data:this.model.get(\"countyGeodata\"),fill:\"none\",stroke:\"black\",strokeWidth:1,group:\"county\"}),this.plotShape({data:this.model.get(\"ecGeodata\"),fill:\"#00dddd\",stroke:\"#aaaaaa\",strokeWidth:2,group:\"employment-centers\",onMouseOver:this.employmentCenterMouseOver,onMouseOut:this.employmentCenterMouseOut,onClick:this.employmentCenterClick})},render:function(){this.$el.html(\"\"),this.$el.append(this.template({compareField:\"Emp\"===this.superModel.get(\"compareField\")?\"Employees\":\"Sales\"})),this.getShapes().then(this.getMaxes).then(this.createLeafletMap).then(this.buildMap).then(this.createShapes).then(this.resetD3),this.stickit(this.superModel),this.createLegend()}});module.exports=MapView;\n},{\"../models/map\":8,\"../templates/map-legend-hex.ejs\":14,\"../templates/map-legend-item.ejs\":15,\"../templates/map-tooltip.ejs\":16,\"../templates/map.ejs\":17,\"../vendor/d3-hexbin\":21,\"../views/ec-modal\":24,\"backbone\":30,\"d3\":33,\"d3-tip\":32,\"esri-leaflet\":34,\"jquery\":38,\"leaflet\":40,\"mapbox.js\":53,\"q\":73,\"underscore\":76}],26:[function(require,module,exports){\n\"use strict\";var $=require(\"jquery\");window.$=$,window.jQuery=$;var _=require(\"underscore\"),Backbone=require(\"backbone\"),shape=require(\"../../../semantic/dist/components/shape\");require(\"jstree\");var NaicsChooserView=Backbone.View.extend({template:require(\"../templates/naics-chooser.ejs\"),tagName:\"div\",id:\"\",className:\"\",events:{\"keyup .naics-input\":\"updateTree\",\"click .naics-filter-button\":\"searchTree\",\"keypress .naics-filter\":\"searchTree\",\"click .codes\":\"switchNAICSChooser\",\"click .names\":\"switchNAICSChooser\",\"click .id-mode-button\":\"turnOnIdMode\",\"click .name-mode-button\":\"turnOnNameMode\",\"click .naics-clear-button\":\"clearFilter\",\"click .birth-death-button\":\"openBirthDeathModal\"},initialize:function(e){this.model=e.model,this.collection=e.collection,this.birthDeathModal=e.birthDeathModal,this.listenTo(this.collection,\"reset\",_.compose(this.createTree,this.setSelections)),_.bindAll(this,\"createTree\",\"updateTree\",\"turnOnIdMode\",\"turnOnNameMode\",\"clearFilter\",\"enableBirthDeathButton\",\"openBirthDeathModal\",\"render\"),this.listenTo(this.model,\"change:naicsMode\",this.naicsModeChanged)},switchNAICSChooser:function(e){$(\".shape\").shape(\"flip left\")},openBirthDeathModal:function(e){this.birthDeathModal.open()},clearFilter:function(e){this.model.set({currentNAICS:\"\",NaicsBinary:[]}),this.render(),this.enableBirthDeathButton()},turnOnIdMode:function(e){this.model.set(\"naicsMode\",\"ID\")},turnOnNameMode:function(e){this.model.set(\"naicsMode\",\"Name\")},enableBirthDeathButton:function(){this.$(\".birth-death-button\").removeClass(\"disabled\")},naicsModeChanged:function(){\"ID\"===this.model.get(\"naicsMode\")?($(\".id-mode-button\").addClass(\"active\"),$(\".name-mode-button\").removeClass(\"active\"),$(\".naics-filter\").attr(\"placeholder\",\"Enter NAICS ID\")):\"Name\"===this.model.get(\"naicsMode\")&&($(\".id-mode-button\").removeClass(\"active\"),$(\".name-mode-button\").addClass(\"active\"),$(\".naics-filter\").attr(\"placeholder\",\"Enter NAICS Industry\")),$(\".naics-filter\").val(\"\")},searchTree:function(e){(_.isUndefined(e.keyCode)||13===e.keyCode)&&$(\".naics-tree\").jstree(\"search\",$(\".naics-filter\").val(),!0,!0)},bindings:{\".naics-input\":\"currentNAICS\"},setSelections:function(){var e=this.model.get(\"NaicsBinary\"),t=this.collection.flatten(),i=[];_.each(e,function(e,s){1===e&&i.push(t[s].toString())}),this.model.set(\"currentNAICS\",i,{silent:!0}),this.model.trigger(\"change:currentNAICS\")},updateTree:function(e){this.tree.jstree(\"deselect_all\"),this.tree.jstree(\"select_node\",this.model.get(\"currentNAICS\"))},createTree:function(){var e=this;this.tree=$(\".naics-tree\").jstree(\"destroy\").jstree({core:{animation:1,check_callback:!0,themes:{stripes:!1,icons:!1,dots:!1},data:this.collection.toJSON()},plugins:[\"search\",\"checkbox\"]}).on(\"click.jstree\",function(t,i){$(t.currentTarget).attr(\"aria-activedescendant\"),e.model.set(\"currentNAICS\",_.isEmpty(e.tree.jstree().get_selected())?\"\":e.tree.jstree().get_selected()),e.model.set(\"NaicsBinary\",e.model.appView.NAICSCodes.assignBits())}).on(\"ready.jstree\",this.updateTree)},render:function(){this.$el.html(this.template()),this.collection.fetch({reset:!0}),this.stickit(this.model),$(\".shape\").shape(),this.naicsModeChanged()}});module.exports=NaicsChooserView;\n},{\"../../../semantic/dist/components/shape\":80,\"../templates/naics-chooser.ejs\":18,\"backbone\":30,\"jquery\":38,\"jstree\":39,\"underscore\":76}],27:[function(require,module,exports){\n\"use strict\";var $=require(\"jquery\");require(\"malihu-custom-scrollbar-plugin\")($);var _=require(\"underscore\"),Backbone=require(\"backbone\"),SidebarView=Backbone.View.extend({template:require(\"../templates/sidebar.ejs\"),tagName:\"div\",id:\"\",className:\"\",openTopic:1,topicsDict:{1:\"\",2:\".map\",3:\".sales-emp-toggle\",4:\".map-toggle\",5:\".year-chooser\",6:\".naics-chooser\",7:\".birth-death-button\",8:\".print-map-button\",9:\"\"},events:{\"click .next-button\":\"forward\",\"click .prev-button\":\"backward\",\"click .close-button\":\"close\"},initialize:function(i){this.model=i.model,_.bindAll(this,\"render\")},backward:function(){this.openTopic>_.min(_.keys(this.topicsDict))&&($(this.topicsDict[this.openTopic]).transition(\"remove looping\"),this.$(\".topic-\"+this.openTopic).removeClass(\"active\"),this.openTopic--,this.$(\".topic-\"+this.openTopic).addClass(\"active\"),$(this.topicsDict[this.openTopic]).transition(\"set looping\").transition(\"pulse\",\"1000ms\"))},forward:function(){this.openTopic<_.max(_.keys(this.topicsDict))?($(this.topicsDict[this.openTopic]).transition(\"remove looping\"),this.$(\".topic-\"+this.openTopic).removeClass(\"active\"),this.openTopic++,this.$(\".topic-\"+this.openTopic).addClass(\"active\"),$(this.topicsDict[this.openTopic]).transition(\"set looping\").transition(\"pulse\",\"2000ms\")):this.close()},open:function(){this.$(\"span\").removeClass(\"active\"),this.$(\".topic-1\").addClass(\"active\"),this.openTopic=1,this.$el.sidebar(\"setting\",\"transition\",\"scale down\").sidebar(\"setting\",\"dimPage\",!1).sidebar(\"setting\",\"closable\",!1).sidebar(\"toggle\")},close:function(){this.$el.sidebar(\"toggle\"),_.each(this.topicsDict,function(i,t){$(i).transition(\"remove looping\")})},render:function(){this.$el.html(this.template()),$(\".help-topics > span\").mCustomScrollbar({theme:\"light-3\"})}});module.exports=SidebarView;\n},{\"../templates/sidebar.ejs\":19,\"backbone\":30,\"jquery\":38,\"malihu-custom-scrollbar-plugin\":41,\"underscore\":76}],28:[function(require,module,exports){\n\"use strict\";var $=require(\"jquery\"),_=require(\"underscore\"),Backbone=require(\"backbone\"),shape=require(\"../../../semantic/dist/components/shape\");require(\"../../../semantic/dist/components/dropdown\"),require(\"jquery-nstSlider\"),require(\"backbone.stickit\");var YearChooserView=Backbone.View.extend({template:require(\"../templates/year-chooser.ejs\"),tagName:\"div\",id:\"\",className:\"\",events:{\"click .play-button\":\"togglePlaying\"},initialize:function(e){this.model=e.model,_.bindAll(this,\"advanceYear\",\"togglePlaying\",\"createTickMarks\",\"updateSlider\",\"render\"),this.listenTo(this.model,\"change:currentYear\",this.updateSlider)},advanceYear:function(){var e=_.values(this.model.get(\"years\")),t=this.model.get(\"currentYear\"),i=_.indexOf(e,t);i-1?\"prop\":\"attr\",o=u(a,c,l,e);\"class\"===l.name?(n.removeClass(h).addClass(o),h=o):n[i](l.name,o)},t.each(t.flatten([c]),function(t){s(a,e,\"change:\"+t,i,d)}),d()})},h=function(e,n,i,o,r){if(null!=i.visible){var l=function(){var s=i.visible,l=i.visibleFn,c=u(o,r,i,e),d=!!c;(t.isFunction(s)||t.isString(s))&&(d=!!a(e,s,c,i)),l?a(e,l,n,d,i):n.toggle(d)};t.each(t.flatten([r]),function(t){s(o,e,\"change:\"+t,i,l)}),l()}},p=function(t,e,n,i,o,s){r(t,n.updateView,i,n)&&(a(t,n.update,e,i,o,n),s||a(t,n.afterUpdate,e,i,n))};return n.addHandler([{selector:'[contenteditable=\"true\"]',updateMethod:\"html\",events:[\"input\",\"change\"]},{selector:\"input\",events:[\"propertychange\",\"input\",\"change\"],update:function(t,e){t.val(e)},getVal:function(t){return t.val()}},{selector:\"textarea\",events:[\"propertychange\",\"input\",\"change\"],update:function(t,e){t.val(e)},getVal:function(t){return t.val()}},{selector:'input[type=\"radio\"]',events:[\"change\"],update:function(t,e){t.filter('[value=\"'+e+'\"]').prop(\"checked\",!0)},getVal:function(t){return t.filter(\":checked\").val()}},{selector:'input[type=\"checkbox\"]',events:[\"change\"],update:function(n,i,a,o){if(n.length>1)i||(i=[]),n.each(function(n,a){var o=e.$(a),r=t.contains(i,o.val());o.prop(\"checked\",r)});else{var r=t.isBoolean(i)?i:i===n.val();n.prop(\"checked\",r)}},getVal:function(n){var i;if(n.length>1)i=t.reduce(n,function(t,n){var i=e.$(n);return i.prop(\"checked\")&&t.push(i.val()),t},[]);else{i=n.prop(\"checked\");var a=n.val();\"on\"!==a&&null!=a&&(i=i?n.val():null)}return i}},{selector:\"select\",events:[\"change\"],update:function(n,o,r,s){var l,u=s.selectOptions,c=u&&u.collection||void 0,d=n.prop(\"multiple\");if(!u){u={};var h=function(t){return t.map(function(){return{value:this.value,label:this.text}}).get()};n.find(\"optgroup\").length?(c={opt_labels:[]},n.find(\"> option\").length&&(c.opt_labels.push(void 0),t.each(n.find(\"> option\"),function(t){c[void 0]=h(e.$(t))})),t.each(n.find(\"optgroup\"),function(t){var n=e.$(t).attr(\"label\");c.opt_labels.push(n),c[n]=h(e.$(t).find(\"option\"))})):c=h(n.find(\"option\"))}u.valuePath=u.valuePath||\"value\",u.labelPath=u.labelPath||\"label\";var p=function(n,a,o){t.each(n,function(n){var r=e.$(\"\").attr(\"label\",t);p(l[t],i,o),n.append(i)});else{var v,g=[];for(var b in l)v={},v[u.valuePath]=b,v[u.labelPath]=l[b],g.push(v);p(t.sortBy(g,u.comparator||u.labelPath),n,o)}},getVal:function(t){var n;return n=t.prop(\"multiple\")?e.$(o(t).map(function(){return e.$(this).data(\"stickit_bind_val\")})).get():o(t).data(\"stickit_bind_val\")}}]),e.Stickit=n,e.Stickit});\n},{\"backbone\":30,\"underscore\":76}],30:[function(require,module,exports){\n(function (global){\n!function(t){var e=\"object\"==typeof self&&self.self===self&&self||\"object\"==typeof global&&global.global===global&&global;if(\"function\"==typeof define&&define.amd)define([\"underscore\",\"jquery\",\"exports\"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if(\"undefined\"!=typeof exports){var i,n=require(\"underscore\");try{i=require(\"jquery\")}catch(s){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,r=Array.prototype.slice;e.VERSION=\"1.3.3\",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],h(t,this),s)};case 4:return function(t,s,r){return i[e](this[n],h(t,this),s,r)};default:return function(){var t=r.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},o=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=a(e,s,n))})},h=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?u(t):i.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},l=/\\s+/,d=function(t,e,n,s,r){var a,o=0;if(n&&\"object\"==typeof n){void 0!==s&&\"context\"in r&&void 0===r.context&&(r.context=s);for(a=i.keys(n);on;n++)i[n]=arguments[n+1];return d(m,this._events,t,void 0,i),this};var m=function(t,e,i,n){if(t){var s=t[e],r=t.all;s&&r&&(r=r.slice()),s&&_(s,n),r&&_(r,[e].concat(n))}return t},_=function(t,e){var i,n=-1,s=t.length,r=e[0],a=e[1],o=e[2];switch(e.length){case 0:for(;++nn;n++)t[n+i]=e[n];for(n=0;nthis.length&&(s=this.length),0>s&&(s+=this.length+1);var r,a,o=[],h=[],u=[],c=[],l={},d=e.add,f=e.merge,g=e.remove,v=!1,p=this.comparator&&null==s&&e.sort!==!1,m=i.isString(this.comparator)?this.comparator:null;for(a=0;at&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?\"find\":\"filter\"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error(\"Cannot sort a set without a comparator\");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger(\"sort\",this,t),this},pluck:function(t){return this.map(t+\"\")},fetch:function(t){t=i.extend({parse:!0},t);var e=t.success,n=this;return t.success=function(i){var s=t.reset?\"reset\":\"set\";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger(\"sync\",n,i,t)},B(this,t),this.sync(\"read\",this,t)},create:function(t,e){e=e?i.clone(e):{};var n=e.wait;if(t=this._prepareModel(t,e),!t)return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&s.add(t,i),r&&r.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||\"id\"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger(\"invalid\",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=(\"/\"+this.root+\"/\").replace(O,\"/\"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||\"/\";return this.location.replace(e+\"#\"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement(\"iframe\"),this.iframe.src=\"javascript:0\",this.iframe.style.display=\"none\",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash=\"#\"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent(\"on\"+t,e)};return this._usePushState?r(\"popstate\",this.checkUrl,!1):this._useHashChange&&!this.iframe?r(\"hashchange\",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent(\"on\"+t,e)};this._usePushState?t(\"popstate\",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t(\"hashchange\",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),N.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!N.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||\"\");var i=this.root;\"\"!==t&&\"?\"!==t.charAt(0)||(i=i.slice(0,-1)||\"/\");var n=i+t;if(t=this.decodeFragment(t.replace(U,\"\")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?\"replaceState\":\"pushState\"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,\"\");t.replace(n+\"#\"+e)}else t.hash=\"#\"+e}}),e.history=new N;var q=function(t,e){var n,s=this;return n=t&&i.has(t,\"constructor\")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};y.extend=x.extend=$.extend=k.extend=N.extend=q;var F=function(){throw new Error('A \"url\" property or function must be specified')},B=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger(\"error\",t,n,e)}};return e});\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"jquery\":38,\"underscore\":76}],31:[function(require,module,exports){\nfunction corslite(n,t,o){function e(n){return n>=200&&300>n||304===n}function i(){void 0===r.status||e(r.status)?t.call(r,null,r):t.call(r,r,null)}var l=!1;if(\"undefined\"==typeof window.XMLHttpRequest)return t(Error(\"Browser not supported\"));if(\"undefined\"==typeof o){var u=n.match(/^\\s*https?:\\/\\/[^\\/]*/);o=u&&u[0]!==location.protocol+\"//\"+location.domain+(location.port?\":\"+location.port:\"\")}var r=new window.XMLHttpRequest;if(o&&!(\"withCredentials\"in r)){r=new window.XDomainRequest;var a=t;t=function(){if(l)a.apply(this,arguments);else{var n=this,t=arguments;setTimeout(function(){a.apply(n,t)},0)}}}return\"onload\"in r?r.onload=i:r.onreadystatechange=function(){4===r.readyState&&i()},r.onerror=function(n){t.call(this,n||!0,null),t=function(){}},r.onprogress=function(){},r.ontimeout=function(n){t.call(this,n,null),t=function(){}},r.onabort=function(n){t.call(this,n,null),t=function(){}},r.open(\"GET\",n,!0),r.send(null),l=!0,r}\"undefined\"!=typeof module&&(module.exports=corslite);\n},{}],32:[function(require,module,exports){\n!function(t,e){\"function\"==typeof define&&define.amd?define([\"d3\"],e):\"object\"==typeof module&&module.exports?module.exports=function(t){return t.tip=e(t),t.tip}:t.d3.tip=e(t.d3)}(this,function(t){return function(){function e(t){w=d(t),T=w.createSVGPoint(),document.body.appendChild(g)}function n(){return\"n\"}function r(){return[0,0]}function o(){return\" \"}function f(){var t=m();return{top:t.n.y-g.offsetHeight,left:t.n.x-g.offsetWidth/2}}function i(){var t=m();return{top:t.s.y,left:t.s.x-g.offsetWidth/2}}function l(){var t=m();return{top:t.e.y-g.offsetHeight/2,left:t.e.x}}function s(){var t=m();return{top:t.w.y-g.offsetHeight/2,left:t.w.x-g.offsetWidth}}function u(){var t=m();return{top:t.nw.y-g.offsetHeight,left:t.nw.x-g.offsetWidth}}function c(){var t=m();return{top:t.ne.y-g.offsetHeight,left:t.ne.x}}function a(){var t=m();return{top:t.sw.y,left:t.sw.x-g.offsetWidth}}function p(){var t=m();return{top:t.se.y,left:t.e.x}}function y(){var e=t.select(document.createElement(\"div\"));return e.style({position:\"absolute\",top:0,opacity:0,\"pointer-events\":\"none\",\"box-sizing\":\"border-box\"}),e.node()}function d(t){return t=t.node(),\"svg\"===t.tagName.toLowerCase()?t:t.ownerSVGElement}function m(){for(var e=b||t.event.target;\"undefined\"==typeof e.getScreenCTM&&\"undefined\"===e.parentNode;)e=e.parentNode;var n={},r=e.getScreenCTM(),o=e.getBBox(),f=o.width,i=o.height,l=o.x,s=o.y;return T.x=l,T.y=s,n.nw=T.matrixTransform(r),T.x+=f,n.ne=T.matrixTransform(r),T.y+=i,n.se=T.matrixTransform(r),T.x-=f,n.sw=T.matrixTransform(r),T.y-=i/2,n.w=T.matrixTransform(r),T.x+=f,n.e=T.matrixTransform(r),T.x-=f/2,T.y-=i/2,n.n=T.matrixTransform(r),T.y+=i,n.s=T.matrixTransform(r),n}var h=n,x=r,v=o,g=y(),w=null,T=null,b=null;e.show=function(){var n=Array.prototype.slice.call(arguments);n[n.length-1]instanceof SVGElement&&(b=n.pop());var r,o=v.apply(this,n),f=x.apply(this,n),i=h.apply(this,n),l=t.select(g),s=H.length,u=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;for(l.html(o).style({opacity:1,\"pointer-events\":\"all\"});s--;)l.classed(H[s],!1);return r=E.get(i).apply(this),l.classed(i,!0).style({top:r.top+f[0]+u+\"px\",left:r.left+f[1]+c+\"px\"}),e},e.hide=function(){var n=t.select(g);return n.style({opacity:0,\"pointer-events\":\"none\"}),e},e.attr=function(n,r){if(arguments.length<2&&\"string\"==typeof n)return t.select(g).attr(n);var o=Array.prototype.slice.call(arguments);return t.selection.prototype.attr.apply(t.select(g),o),e},e.style=function(n,r){if(arguments.length<2&&\"string\"==typeof n)return t.select(g).style(n);var o=Array.prototype.slice.call(arguments);return t.selection.prototype.style.apply(t.select(g),o),e},e.direction=function(n){return arguments.length?(h=null==n?n:t.functor(n),e):h},e.offset=function(n){return arguments.length?(x=null==n?n:t.functor(n),e):x},e.html=function(n){return arguments.length?(v=null==n?n:t.functor(n),e):v};var E=t.map({n:f,s:i,e:l,w:s,nw:u,ne:c,sw:a,se:p}),H=E.keys();return e}});\n},{}],33:[function(require,module,exports){\n!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function f(n){return(n+=\"\")===go||n[0]===vo?vo+n:n}function s(n){return(n+=\"\")[0]===vo?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=yo.length;r>e;++e){var i=yo[e]+t;if(i in n)return i}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,i=-1,u=r.length;++ie;e++)for(var i,u=n[e],o=0,a=u.length;a>o;o++)(i=u[o])&&t(i,o,e);return n}function Z(n){return Mo(n,ko),n}function V(n){var t,e;return function(r,i,u){var o,a=n[u].update,c=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var l=No.get(n);return l&&(n=l,c=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=to.event;to.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{to.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=\".dragsuppress-\"+ ++Ao,i=\"click\"+r,u=to.select(t(e)).on(\"touchmove\"+r,S).on(\"dragstart\"+r,S).on(\"selectstart\"+r,S);if(null==Eo&&(Eo=\"onselectstart\"in e?!1:x(e.style,\"userSelect\")),Eo){var o=n(e).style,a=o[Eo];o[Eo]=\"none\"}return function(n){if(u.on(r,null),Eo&&(o[Eo]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Co){var u=t(n);if(u.scrollX||u.scrollY){r=to.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\");var o=r[0][0].getScreenCTM();Co=!(o.f||o.e),r.remove()}}return Co?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return to.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Lo:Math.acos(n)}function tn(n){return n>1?Do:-1>n?-Do:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function cn(n,t,e){return this instanceof cn?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof cn?new cn(n.h,n.s,n.l):_n(\"\"+n,wn,cn):new cn(n,t,e)}function ln(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(o-u)*n/60:180>n?o:240>n?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=to.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Po)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*$o,r=vn(r)*Bo,u=vn(u)*Wo,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Uo,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(\"\"+n,mn,ln):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+\"\"}function bn(n){return 16>n?\"0\"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){n=n.toLowerCase();var r,i,u,o=0,a=0,c=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n))switch(i=r[2].split(\",\"),r[1]){case\"hsl\":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case\"rgb\":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=Ko.get(n))?t(u.r,u.g,u.b):(null==n||\"#\"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,c=15&u,c=c<<4|c):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,c=255&u)),t(o,a,c))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,c=(o+u)/2;return a?(i=.5>c?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=c>0&&1>c?0:r),new cn(r,i,c)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/$o),i=dn((.2126729*n+.7151522*t+.072175*e)/Bo),u=dn((.0193339*n+.119192*t+.9503041*e)/Wo);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return\"%\"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return\"function\"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&\"function\"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=c.status;if(!t&&qn(c)||t>=200&&300>t||304===t){try{n=e.call(u,c)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,c)}var u={},o=to.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),a={},c=new XMLHttpRequest,l=null;return!this.XDomainRequest||\"withCredentials\"in c||!/^(http(s)?:)?\\/\\//.test(n)||(c=new XDomainRequest),\"onload\"in c?c.onload=c.onerror=i:c.onreadystatechange=function(){c.readyState>3&&i()},c.onprogress=function(n){var t=to.event;to.event=n;try{o.progress.call(u,c)}finally{to.event=t}},u.header=function(n,t){return n=(n+\"\").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+\"\",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+\"\",u):t},u.responseType=function(n){return arguments.length?(l=n,u):l},u.response=function(n){return e=n,u},[\"get\",\"post\"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(ro(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&\"function\"==typeof r&&(i=r,r=null),c.open(e,n,!0),null==t||\"accept\"in a||(a.accept=t+\",*/*\"),c.setRequestHeader)for(var f in a)c.setRequestHeader(f,a[f]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=i&&u.on(\"error\",i).on(\"load\",function(n){i(null,n)}),o.beforesend.call(u,c),c.send(null==r?null:r),u},u.abort=function(){return c.abort(),u},to.rebind(u,o,\"on\"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qn(n){var t=n.responseType;return t&&\"text\"!==t?n.response:n.responseText}function Ln(){var n=Tn(),t=Rn()-n;t>24?(isFinite(t)&&(clearTimeout(ea),ea=setTimeout(Ln,t)),ta=0):(ta=1,ia(Ln))}function Tn(){var n=Date.now();for(ra=Qo;ra;)n>=ra.t&&(ra.f=ra.c(n-ra.t)),ra=ra.n;return n}function Rn(){for(var n,t=Qo,e=1/0;t;)t.f?t=n?n.n=t.n:Qo=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Un(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],c=0;i>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),u.push(n.substring(i-=a,i+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=oa.exec(n),r=e[1]||\" \",o=e[2]||\">\",a=e[3]||\"-\",c=e[4]||\"\",l=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v=\"\",d=\"\",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(l||\"0\"===r&&\"=\"===o)&&(l=r=\"0\",o=\"=\"),p){case\"n\":s=!0,p=\"g\";break;case\"%\":g=100,d=\"%\",p=\"f\";break;case\"p\":g=100,d=\"%\",p=\"r\";break;case\"b\":case\"o\":case\"x\":case\"X\":\"#\"===c&&(v=\"0\"+p.toLowerCase());case\"c\":m=!1;case\"d\":y=!0,h=0;break;case\"s\":g=-1,p=\"r\"}\"$\"===c&&(v=i[0],d=i[1]),\"r\"!=p||h||(p=\"g\"),null!=h&&(\"g\"==p?h=Math.max(1,Math.min(21,h)):\"e\"!=p&&\"f\"!=p||(h=Math.max(0,Math.min(20,h)))),p=aa.get(p)||jn;var M=l&&s;return function(n){var e=d;if(y&&n%1)return\"\";var i=0>n||0===n&&0>1/n?(n=-n,\"-\"):\"-\"===a?\"\":a;if(0>g){var c=to.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(\".\");if(0>_){var w=m?n.lastIndexOf(\"e\"):-1;0>w?(x=n,b=\"\"):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=f>S?new Array(S=f-S+1).join(r):\"\";return M&&(x=u(k+x,k.length?f-b.length:1/0)),i+=v,n=x+b,(\"<\"===o?i+n+k:\">\"===o?k+i+n:\"^\"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function jn(n){return n+\"\"}function Fn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Hn(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new la(e-1)),1),e}function u(n,e){return t(n=new la(+n),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;r>o;)e(o)%u||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{la=Fn;var r=new Fn;return r._=n,o(r,t,e)}finally{la=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var c=n.utc=On(n);return c.floor=c,c.round=On(r),c.ceil=On(i),c.offset=On(u),c.range=a,n}function On(n){return function(t,e){try{la=Fn;var r=new Fn;return r._=t,n(r,e)._}finally{la=Date}}}function In(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,c=0;++aa;){if(r>=l)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in sa?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function c(n,t,r){return e(n,A.x.toString(),t,r)}function l(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{la=Fn;var t=new la;return t._=n,r(t)}finally{la=Date}}var r=t(n);return e.parse=function(n){try{la=Fn;var t=r.parse(n);return t&&t._}finally{la=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=to.map(),x=Zn(v),b=Vn(v),_=Zn(d),w=Vn(d),S=Zn(y),k=Vn(y),N=Zn(m),E=Vn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Yn(n.getDate(),t,2)},e:function(n,t){return Yn(n.getDate(),t,2)},H:function(n,t){return Yn(n.getHours(),t,2)},I:function(n,t){return Yn(n.getHours()%12||12,t,2)},j:function(n,t){return Yn(1+ca.dayOfYear(n),t,3)},L:function(n,t){return Yn(n.getMilliseconds(),t,3)},m:function(n,t){return Yn(n.getMonth()+1,t,2)},M:function(n,t){return Yn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Yn(n.getSeconds(),t,2)},U:function(n,t){return Yn(ca.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Yn(ca.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Yn(n.getFullYear()%100,t,2)},Y:function(n,t){return Yn(n.getFullYear()%1e4,t,4)},Z:ot,\"%\":function(){return\"%\"}},C={a:r,A:i,b:u,B:o,c:a,d:nt,e:nt,H:et,I:et,j:tt,L:ut,m:Qn,M:rt,p:f,S:it,U:$n,w:Xn,W:Bn,x:c,X:l,y:Jn,Y:Wn,Z:Gn,\"%\":at};return t}function Yn(n,t,e){var r=0>n?\"-\":\"\",i=(r?-n:n)+\"\",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Zn(n){return new RegExp(\"^(?:\"+n.map(to.requote).join(\"|\")+\")\",\"i\")}function Vn(n){for(var t=new l,e=-1,r=n.length;++e68?1900:2e3)}function Qn(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function nt(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function tt(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function et(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function rt(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ut(n,t,e){ha.lastIndex=0;var r=ha.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?\"-\":\"+\",r=po(t)/60|0,i=po(t)%60;return e+Yn(r,\"0\",2)+Yn(i,\"0\",2)}function at(n,t,e){pa.lastIndex=0;var r=pa.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),f=u*l,s=i*c+f*Math.cos(a),h=f*o*Math.sin(a);Ma.add(Math.atan2(h,s)),r=n,i=c,u=l}var t,e,r,i,u;xa.point=function(o,a){xa.point=n,r=(t=o)*Po,i=Math.cos(a=(e=a)*Po/2+Lo/4),u=Math.sin(a)},xa.lineEnd=function(){n(t,e)}}function vt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function dt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Mt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function bt(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function _t(n,t){return po(n[0]-t[0])a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var c=new Lt(e,n,null,!0),l=new Lt(e,null,c,!1);c.o=l,u.push(c),o.push(l),c=new Lt(r,n,null,!1),l=new Lt(r,null,c,!0),c.o=l,u.push(c),o.push(l)}}),o.sort(t),qt(u),qt(o),u.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,l=f.length;l>a;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Rt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:c,lineEnd:l,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=c,m.lineEnd=l,p=to.merge(p);var n=Ht(y,g);p.length?(b||(u.polygonStart(),b=!0),zt(p,Pt,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Dt(),x=t(M),b=!1;return m}}function Rt(n){return n.length>1}function Dt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pt(n,t){return((n=n.x)[0]<0?n[1]-Do-zo:Do-n[1])-((t=t.x)[0]<0?t[1]-Do-zo:Do-t[1])}function Ut(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Lo:-Lo,c=po(u-e);po(c-Lo)0?Do:-Do),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&c>=Lo&&(po(e-i)zo?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ft(n,t,e,r){var i;if(null==n)i=e*Do,r.point(-Lo,i),r.point(0,i),r.point(Lo,i),r.point(Lo,0),r.point(Lo,-i),r.point(0,-i),r.point(-Lo,-i),r.point(-Lo,0),r.point(-Lo,i);else if(po(n[0]-t[0])>zo){var u=n[0]a;++a){var l=t[a],f=l.length;if(f)for(var s=l[0],h=s[0],p=s[1]/2+Lo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=l[d];var y=n[0],m=n[1]/2+Lo/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=b>=0?1:-1,w=_*b,S=w>Lo,k=g*M;if(Ma.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*To:b,S^h>=e^y>=e){var N=yt(vt(s),vt(n));xt(N);var E=yt(i,N);xt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(-zo>u||zo>u&&0>Ma)^1&o}function Ot(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,c,l,f;return{lineStart:function(){l=c=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(0>s?Lo:-Lo),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(p=r(e,g),(_t(e,p)||_t(g,p))&&(g[0]+=zo,g[1]+=zo,v=t(g[0],g[1]))),v!==c)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&_t(e,g)||n.point(g[0],g[1]),e=g,c=v,u=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return f|(l&&c)<<1}}}function r(n,t,e){var r=vt(n),i=vt(t),o=[1,0,0],a=yt(r,i),c=dt(a,a),l=a[0],f=c-l*l;if(!f)return!e&&n;var s=u*c/f,h=-u*l/f,p=yt(o,a),g=Mt(o,s),v=Mt(a,h);mt(g,v);var d=p,y=dt(g,d),m=dt(d,d),M=y*y-m*(dt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=Mt(d,(-y-x)/m);if(mt(b,g),b=bt(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=po(E-Lo)E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(po(b[0]-w)Lo^(w<=b[0]&&b[0]<=S)){var z=Mt(d,(-y+x)/m);return mt(z,g),[b,bt(z)]}}}function i(t,e){var r=o?n:Lo-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=po(u)>zo,c=ge(n,6*Po);return Tt(t,e,c,o?[0,-n]:[-Lo,n-Lo])}function It(n,t,e,r){return function(i){var u,o=i.a,a=i.b,c=o.x,l=o.y,f=a.x,s=a.y,h=0,p=1,g=f-c,v=s-l;if(u=n-c,g||!(u>0)){if(u/=g,0>g){if(h>u)return;p>u&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-c,g||!(0>u)){if(u/=g,0>g){if(u>p)return;u>h&&(h=u)}else if(g>0){if(h>u)return;p>u&&(p=u)}if(u=t-l,v||!(u>0)){if(u/=v,0>v){if(h>u)return;p>u&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-l,v||!(0>u)){if(u/=v,0>v){if(u>p)return;u>h&&(h=u)}else if(v>0){if(h>u)return;p>u&&(p=u)}return h>0&&(i.a={x:c+h*g,y:l+h*v}),1>p&&(i.b={x:c+p*g,y:l+p*v}),i}}}}}}function Yt(n,t,e,r){function i(r,i){return po(r[0]-n)0?0:3:po(r[0]-e)0?2:1:po(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],i=0;e>i;++i)for(var u,o=1,a=d[i],c=a.length,l=a[0];c>o;++o)u=a[o],l[1]<=r?u[1]>r&&Q(l,u,n)>0&&++t:u[1]<=r&&Q(l,u,n)<0&&--t,l=u;return 0!==t}function l(u,a,c,l){var f=0,s=0;if(null==u||(f=i(u,c))!==(s=i(a,c))||o(u,a)<0^c>0){do l.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+c+4)%4)!==s)}else l.point(a[0],a[1])}function f(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Ra,Math.min(Ra,n)),t=Math.max(-Ra,Math.min(Ra,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Dt(),A=It(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=to.merge(v);var t=c([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),i&&zt(v,u,t,l,a),a.polygonEnd()),v=d=y=null}};return C}}function Zt(n){var t=0,e=Lo/3,r=oe(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Lo/180,e=n[1]*Lo/180):[t/Lo*180,e/Lo*180]},i}function Vt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function Xt(){function n(n,t){Pa+=i*n-r*t,r=n,i=t}var t,e,r,i;Oa.point=function(u,o){Oa.point=n,t=r=u,e=i=o},Oa.lineEnd=function(){n(t,e)}}function $t(n,t){Ua>n&&(Ua=n),n>Fa&&(Fa=n),ja>t&&(ja=t),t>Ha&&(Ha=t)}function Bt(){function n(n,t){o.push(\"M\",n,\",\",t,u)}function t(n,t){o.push(\"M\",n,\",\",t),a.point=e}function e(n,t){o.push(\"L\",n,\",\",t)}function r(){a.point=n}function i(){o.push(\"Z\")}var u=Wt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Wt(n),a},result:function(){if(o.length){var n=o.join(\"\");return o=[],n}}};return a}function Wt(n){return\"m0,\"+n+\"a\"+n+\",\"+n+\" 0 1,1 0,\"+-2*n+\"a\"+n+\",\"+n+\" 0 1,1 0,\"+2*n+\"z\"}function Jt(n,t){wa+=n,Sa+=t,++ka}function Gt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);Na+=o*(t+n)/2,Ea+=o*(e+r)/2,Aa+=o,Jt(t=n,e=r)}var t,e;Ya.point=function(r,i){Ya.point=n,Jt(t=r,e=i)}}function Kt(){Ya.point=Jt}function Qt(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);Na+=o*(r+n)/2,Ea+=o*(i+t)/2,Aa+=o,o=i*n-r*t,Ca+=o*(r+n),za+=o*(i+t),qa+=3*o,Jt(r=n,i=t)}var t,e,r,i;Ya.point=function(u,o){Ya.point=n,Jt(t=r=u,e=i=o)},Ya.lineEnd=function(){n(t,e)}}function ne(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,To)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function te(n){function t(n){return(a?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=vt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=f}function l(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){\nt.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,c,l,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=c+g,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=po(po(w)-1)u||po((m*z+M*q)/x-.5)>.3||o>a*p+c*g+l*v)&&(i(t,e,r,a,c,l,A,C,N,b/=S,_/=S,w,d,y),y.point(A,C),i(A,C,N,b,_,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Po),a=16;return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function ee(n){var t=te(function(t,e){return n([t*Uo,e*Uo])});return function(n){return ae(t(n))}}function re(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ue(n){return oe(function(){return n})()}function oe(n){function t(n){return n=a(n[0]*Po,n[1]*Po),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Uo,n[1]*Uo]}function r(){a=At(o=fe(y,M,x),u);var n=u(v,d);return c=p-n[0]*h,l=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,c,l,f,s=te(function(n,t){return n=u(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Ta,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=ae(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Ta):Ot((w=+n)*Po),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Yt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Po,d=n[1]%360*Po,r()):[v*Uo,d*Uo]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Po,M=n[1]%360*Po,x=n.length>2?n[2]%360*Po:0,r()):[y*Uo,M*Uo,x*Uo]},to.rebind(t,s,\"precision\"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function ae(n){return ie(n,function(t,e){n.point(t*Po,e*Po)})}function ce(n,t){return[n,t]}function le(n,t){return[n>Lo?n-To:-Lo>n?n+To:n,t]}function fe(n,t,e){return n?t||e?At(he(n),pe(t,e)):he(n):t||e?pe(t,e):le}function se(n){return function(t,e){return t+=n,[t>Lo?t-To:-Lo>t?t+To:t,e]}}function he(n){var t=se(n);return t.invert=se(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),f=l*r+a*i;return[Math.atan2(c*u-f*o,a*r-l*i),tn(f*u+c*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),f=l*u-c*o;return[Math.atan2(c*u+l*o,a*r+f*i),tn(f*r-a*i)]},e}function ge(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var c=o*t;null!=i?(i=ve(e,i),u=ve(e,u),(o>0?u>i:i>u)&&(i+=o*To)):(i=n+o*To,u=n-.5*c);for(var l,f=i;o>0?f>u:u>f;f-=c)a.point((l=bt([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],l[1])}}function ve(n,t){var e=vt(t);e[0]-=n,xt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-zo)%(2*Math.PI)}function de(n,t,e){var r=to.range(n,t-zo,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=to.range(n,t-zo,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function me(n){return n.source}function Me(n){return n.target}function xe(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=i*Math.cos(n),l=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(on(r-t)+i*o*on(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*c+t*f,i=e*l+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Uo,Math.atan2(o,Math.sqrt(r*r+i*i))*Uo]}:function(){return[n*Uo,t*Uo]};return g.distance=h,g}function be(){function n(n,i){var u=Math.sin(i*=Po),o=Math.cos(i),a=po((n*=Po)-t),c=Math.cos(a);Za+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*c)*a),e*u+r*o*c),t=n,e=u,r=o}var t,e,r;Va.point=function(i,u){t=i*Po,e=Math.sin(u*=Po),r=Math.cos(u),Va.point=n},Va.lineEnd=function(){Va.point=Va.lineEnd=b}}function _e(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function we(n,t){function e(n,t){o>0?-Do+zo>t&&(t=-Do+zo):t>Do-zo&&(t=Do-zo);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Lo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Do]},e):ke}function Se(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return po(i)i;i++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Le(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Te(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,c=n[1],l=e[1],f=t[1]-c,s=r[1]-l,h=(a*(c-l)-s*(i-u))/(s*o-a*f);return[i+h*o,c+h*f]}function Re(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function De(){er(this),this.edge=this.site=this.circle=null}function Pe(n){var t=rc.pop()||new De;return t.site=n,t}function Ue(n){$e(n),nc.remove(n),rc.push(n),er(n)}function je(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];Ue(n);for(var c=u;c.circle&&po(e-c.circle.x)f;++f)l=a[f],c=a[f-1],Qe(l.edge,c.site,l.site,i);c=a[0],l=a[s-1],l.edge=Ge(c.site,l.site,null,i),Xe(c),Xe(l)}function Fe(n){for(var t,e,r,i,u=n.x,o=n.y,a=nc._;a;)if(r=He(a,o)-u,r>zo)a=a.L;else{if(i=u-Oe(a,o),!(i>zo)){r>-zo?(t=a.P,e=a):i>-zo?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pe(n);if(nc.insert(t,c),t||e){if(t===e)return $e(t),e=Pe(t.site),nc.insert(c,e),c.edge=e.edge=Ge(t.site,c.site),Xe(t),void Xe(e);if(!e)return void(c.edge=Ge(t.site,c.site));$e(t),$e(e);var l=t.site,f=l.x,s=l.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};Qe(e.edge,l,g,x),c.edge=Ge(l,n,null,x),e.edge=Ge(n,g,null,x),Xe(t),Xe(e)}}function He(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var f=a-r,s=1/u-1/l,h=f/l;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*l)-c+l/2+i-u/2)))/s+r:(r+a)/2}function Oe(n,t){var e=n.N;if(e)return He(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ie(n){this.site=n,this.edges=[]}function Ye(n){for(var t,e,r,i,u,o,a,c,l,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=Qa,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,c=a.length,o=0;c>o;)f=a[o].end(),r=f.x,i=f.y,l=a[++o%c].start(),t=l.x,e=l.y,(po(r-t)>zo||po(i-e)>zo)&&(a.splice(o,0,new nr(Ke(u.site,f,po(r-s)zo?{x:s,y:po(t-s)zo?{x:po(e-g)zo?{x:h,y:po(t-h)zo?{x:po(e-p)=-qo)){var p=c*c+l*l,g=f*f+s*s,v=(s*p-l*g)/h,d=(c*g-f*p)/h,s=d+a,y=ic.pop()||new Ve;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=ec._;M;)if(y.yd||d>=a)return;if(h>g){if(u){if(u.y>=l)return}else u={x:d,y:c};e={x:d,y:l}}else{if(u){if(u.yr||r>1)if(h>g){if(u){if(u.y>=l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else{if(u){if(u.yp){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||r>h||i>p)){if(g=n.point){var g,v=t-n.x,d=e-n.y,y=v*v+d*d;if(c>y){var m=Math.sqrt(c=y);r=t-m,i=e-m,u=t+m,o=e+m,a=g}}for(var M=n.nodes,x=.5*(f+h),b=.5*(s+p),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,f,s,x,b);break;case 1:l(n,x,s,h,b);break;case 2:l(n,f,b,x,p);break;case 3:l(n,x,b,h,p)}}}(n,r,i,u,o),a}function gr(n,t){n=to.rgb(n),t=to.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return\"#\"+bn(Math.round(e+u*n))+bn(Math.round(r+o*n))+bn(Math.round(i+a*n))}}function vr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=mr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function dr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,i,u=oc.lastIndex=ac.lastIndex=0,o=-1,a=[],c=[];for(n+=\"\",t+=\"\";(e=oc.exec(n))&&(r=ac.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:dr(e,r)})),u=ac.lastIndex;return ur;++r)a[(e=c[r]).i]=e.x(n);return a.join(\"\")})}function mr(n,t){for(var e,r=to.interpolators.length;--r>=0&&!(e=to.interpolators[r](n,t)););return e}function Mr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(mr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;o>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function xr(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function br(n){return function(t){return 1-n(1-t)}}function _r(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wr(n){return n*n}function Sr(n){return n*n*n}function kr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Nr(n){return function(t){return Math.pow(t,n)}}function Er(n){return 1-Math.cos(n*Do)}function Ar(n){return Math.pow(2,10*(n-1))}function Cr(n){return 1-Math.sqrt(1-n*n)}function zr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/To*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*To/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tr(n,t){n=to.hcl(n),t=to.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+\"\"}}function Rr(n,t){n=to.hsl(n),t=to.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return ln(e+u*n,r+o*n,i+a*n)+\"\"}}function Dr(n,t){n=to.lab(n),t=to.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+\"\"}}function Pr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Ur(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fr(t),i=jr(t,e),u=Fr(Hr(e,t,-i))||0;t[0]*e[1]180?f+=360:f-l>180&&(l+=360),i.push({i:r.push(r.pop()+\"rotate(\",null,\")\")-2,x:dr(l,f)})):f&&r.push(r.pop()+\"rotate(\"+f+\")\"),s!=h?i.push({i:r.push(r.pop()+\"skewX(\",null,\")\")-2,x:dr(s,h)}):h&&r.push(r.pop()+\"skewX(\"+h+\")\"),p[0]!=g[0]||p[1]!=g[1]?(e=r.push(r.pop()+\"scale(\",null,\",\",null,\")\"),i.push({i:e-4,x:dr(p[0],g[0])},{i:e-2,x:dr(p[1],g[1])})):1==g[0]&&1==g[1]||r.push(r.pop()+\"scale(\"+g+\")\"),e=i.length,function(n){for(var t,u=-1;++u=0;)e.push(i[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oe;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function si(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function pi(n,t){return gi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function gi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function vi(n){return[to.min(n),to.max(n)]}function di(n,t){return n.value-t.value}function yi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function mi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function xi(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(l=e.length)){var e,r,i,u,o,a,c,l,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(i=e[1],i.x=i.r,i.y=0,t(i),l>2))for(u=e[2],Si(r,i,u),t(u),yi(r,u),r._pack_prev=u,yi(u,i),i=r._pack_next,o=3;l>o;o++){Si(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(Mi(a,u)){g=1;break}if(1==g)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,u);c=c._pack_prev,d++);g?(d>v||v==d&&i.ro;o++)u=e[o],u.x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+to.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Hi(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return u>o&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:mc}function Ii(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Ii:Fi,c=r?Yr:Ir;return o=i(n,t,c,e),a=i(t,n,c,mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Pr)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return $i(n,t)},u.tickFormat=function(t,e){return Bi(n,t,e)},u.nice=function(t){return Vi(n,t),i()},u.copy=function(){return Yi(n,t,e,r)},i()}function Zi(n,t){return to.rebind(n,t,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function $i(n,t){return to.range.apply(to,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var i=oa.exec(e);if(i.shift(),\"s\"===i[8]){var u=to.formatPrefix(Math.max(po(r[0]),po(r[1])));return i[7]||(i[7]=\".\"+Wi(u.scale(r[2]))),i[8]=\"f\",e=to.format(i.join(\"\")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]=\".\"+Ji(i[8],r)),e=i.join(\"\")}else e=\",.\"+Wi(r[2])+\"f\";return to.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in Mc?Math.abs(e-Wi(Math.max(po(t[0]),po(t[1]))))+ +(\"e\"!==n):e-2*(\"%\"===n)}function Gi(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Hi(r.map(i),e?Math:bc);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(i(a)),f=Math.ceil(i(c)),s=t%1?2:t;if(isFinite(f-l)){if(e){for(;f>l;l++)for(var h=1;s>h;h++)o.push(u(l)*h);o.push(u(l))}else for(o.push(u(l));l++0;h--)o.push(u(l)*h);for(l=0;o[l]c;f--);o=o.slice(l,f)}return o},o.tickFormat=function(n,t){if(!arguments.length)return xc;arguments.length<2?t=xc:\"function\"!=typeof t&&(t=to.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/u(c(i(n)+r))<=a?t(n):\"\"}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(i(t))}var i=Qi(t),u=Qi(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(i=Qi(t=o),u=Qi(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function nu(n,t){function e(e){return u[((i.get(e)||(\"range\"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return to.range(n.length).map(function(n){return t+e*n})}var i,u,o;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new l;for(var u,o=-1,a=r.length;++oe?[NaN,NaN]:[e>0?a[e-1]:n[0],et?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return eu(n,t,e)},i()}function ru(n,t){function e(e){return e>=e?t[to.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ru(n,t)},e}function iu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return iu(n)},t}function uu(){return 0}function ou(n){return n.innerRadius}function au(n){return n.outerRadius}function cu(n){return n.startAngle}function lu(n){return n.endAngle}function fu(n){return n&&n.padAngle}function su(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function hu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),c=a*o,l=-a*u,f=n[0]+c,s=n[1]+l,h=t[0]+c,p=t[1]+l,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(0>y?-1:1)*Math.sqrt(M*M*m-x*x),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function pu(n){function t(t){function o(){l.push(\"M\",u(n(f),a))}for(var c,l=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1&&i.push(\"H\",r[0]),i.join(\"\")}function yu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],\",\",r[1]];++t1){a=t[1],u=n[c],c++,r+=\"C\"+(i[0]+o[0])+\",\"+(i[1]+o[1])+\",\"+(u[0]-a[0])+\",\"+(u[1]-a[1])+\",\"+u[0]+\",\"+u[1];for(var l=2;l9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=c;)i=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Tu(n){return n.length<3?gu(n):n[0]+_u(n,Lu(n))}function Ru(n){for(var t,e,r,i=-1,u=n.length;++ir)return f();var i=u[u.active];i&&(--u.count,delete u[u.active],i.event&&i.event.interrupt.call(n,n.__data__,i.index)),u.active=r,o.event&&o.event.start.call(n,n.__data__,t),o.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&v.push(r)}),h=o.ease,s=o.duration,to.timer(function(){return g.c=l(e||1)?Ct:l,1},0,a)}function l(e){if(u.active!==r)return 1;for(var i=e/s,a=h(i),c=v.length;c>0;)v[--c].call(n,a);return i>=1?(o.event&&o.event.end.call(n,n.__data__,t),f()):void 0}function f(){return--u.count?delete u[r]:delete n[e],1}var s,h,p=o.delay,g=ra,v=[];return g.t=p+a,i>=p?c(i-p):void(g.c=c)},0,a)}}function Bu(n,t,e){n.attr(\"transform\",function(n){var r=t(n);return\"translate(\"+(isFinite(r)?r:e(n))+\",0)\"})}function Wu(n,t,e){n.attr(\"transform\",function(n){var r=t(n);return\"translate(0,\"+(isFinite(r)?r:e(n))+\")\"})}function Ju(n){return n.toISOString()}function Gu(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=to.bisect(Xc,i);return u==Xc.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Xc[u-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Ku(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ku(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),u=null==n?i(e,10):\"number\"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],Ku(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Gu(n.copy(),t,e)},Zi(r,n)}function Ku(n){return new Date(n)}function Qu(n){return JSON.parse(n.responseText)}function no(n){var t=io.createRange();return t.selectNode(io.body),t.createContextualFragment(n.responseText)}var to={version:\"3.5.6\"},eo=[].slice,ro=function(n){return eo.call(n)},io=this.document;if(io)try{ro(io.documentElement.childNodes)[0].nodeType}catch(uo){ro=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),io)try{io.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(oo){var ao=this.Element.prototype,co=ao.setAttribute,lo=ao.setAttributeNS,fo=this.CSSStyleDeclaration.prototype,so=fo.setProperty;ao.setAttribute=function(n,t){co.call(this,n,t+\"\")},ao.setAttributeNS=function(n,t,e){lo.call(this,n,t,e+\"\")},fo.setProperty=function(n,t,e){so.call(this,n,t+\"\",e)}}to.ascending=e,to.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},to.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},to.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},to.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),r>i&&(i=r))}else{for(;++u=r){e=i=r;break}for(;++ur&&(e=r),r>i&&(i=r))}return[e,i]},to.sum=function(n,t){var e,r=0,u=n.length,o=-1;if(1===arguments.length)for(;++o1?c/(f-1):void 0},to.deviation=function(){var n=to.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ho=u(e);to.bisectLeft=ho.left,to.bisect=to.bisectRight=ho.right,to.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},to.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},to.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},to.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},to.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=to.min(arguments,o),e=new Array(t);++n=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var po=Math.abs;to.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error(\"infinite range\");var r,i=[],u=a(po(e)),o=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var c,f,s,h,p=-1,g=o.length,v=u[a++],d=new l;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(to.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},to.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},c(y,{has:h,add:function(n){return this._[f(n+=\"\")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t))}}),to.behavior={},to.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},to.event=null,to.requote=function(n){return n.replace(mo,\"\\\\$&\")};var mo=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Mo={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},xo=function(n,t){return t.querySelector(n)},bo=function(n,t){return t.querySelectorAll(n)},_o=function(n,t){var e=n.matches||n[x(n,\"matchesSelector\")];return(_o=function(n,t){return e.call(n,t)})(n,t)};\"function\"==typeof Sizzle&&(xo=function(n,t){return Sizzle(n,t)[0]||null},bo=Sizzle,_o=Sizzle.matchesSelector),to.selection=function(){return to.select(io.documentElement)};var wo=to.selection.prototype=[];wo.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&(e=n.slice(0,t),n=n.slice(t+1)),So.hasOwnProperty(e)?{space:So[e],local:n}:n}},wo.attr=function(n,t){if(arguments.length<2){if(\"string\"==typeof n){var e=this.node();return n=to.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},wo.classed=function(n,t){if(arguments.length<2){if(\"string\"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++ii){if(\"string\"!=typeof n){2>i&&(e=\"\");for(r in n)this.each(P(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=\"\"}return this.each(P(n,e,r))},wo.property=function(n,t){if(arguments.length<2){if(\"string\"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},wo.text=function(n){return arguments.length?this.each(\"function\"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?\"\":t}:null==n?function(){this.textContent=\"\"}:function(){this.textContent=n}):this.node().textContent},wo.html=function(n){return arguments.length?this.each(\"function\"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?\"\":t}:null==n?function(){this.innerHTML=\"\"}:function(){this.innerHTML=n}):this.node().innerHTML},wo.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},wo.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},wo.remove=function(){return this.each(F)},wo.data=function(n,t){function e(n,e){var r,i,u,o=n.length,s=e.length,h=Math.min(o,s),p=new Array(s),g=new Array(s),v=new Array(o);if(t){var d,y=new l,m=new Array(o);for(r=-1;++rr;++r)g[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,a.push(g),c.push(p),f.push(v)}var r,i,u=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++uu;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return E(i)},wo.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},wo.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},wo.size=function(){var n=0;return Y(this,function(){++n}),n};var ko=[];to.selection.enter=Z,to.selection.enter.prototype=ko,ko.append=wo.append,ko.empty=wo.empty,ko.node=wo.node,ko.call=wo.call,ko.size=wo.size,ko.select=function(n){for(var t,e,r,i,u,o=[],a=-1,c=this.length;++ar){if(\"string\"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()[\"__on\"+n])&&r._;e=!1}return this.each(X(n,t,e))};var No=to.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});io&&No.forEach(function(n){\"on\"+n in io&&No.remove(n)});var Eo,Ao=0;to.mouse=function(n){return J(n,k())};var Co=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;to.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return J(n,r)},to.behavior.drag=function(){function n(){this.on(\"mousedown.drag\",u).on(\"touchstart.drag\",o)}function e(n,t,e,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:\"drag\",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g&&to.event.target===s),p({type:\"dragend\"}))}var l,f=this,s=to.event.target,h=f.parentNode,p=r.of(f,arguments),g=0,v=n(),d=\".drag\"+(null==v?\"\":\"-\"+v),y=to.select(e(s)).on(u+d,a).on(o+d,c),m=W(s),M=t(h,v);i?(l=i.apply(f,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],p({type:\"dragstart\"})}}var r=N(n,\"drag\",\"dragstart\",\"dragend\"),i=null,u=e(b,to.mouse,t,\"mousemove\",\"mouseup\"),o=e(G,to.touch,m,\"touchmove\",\"touchend\");return n.origin=function(t){return arguments.length?(i=t,n):i},to.rebind(n,r,\"on\")},to.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ro(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var zo=1e-6,qo=zo*zo,Lo=Math.PI,To=2*Lo,Ro=To-zo,Do=Lo/2,Po=Lo/180,Uo=180/Lo,jo=Math.SQRT2,Fo=2,Ho=4;to.interpolateZoom=function(n,t){function e(n){var t=n*m;if(y){var e=rn(v),o=u/(Fo*h)*(e*un(jo*t+v)-en(v));return[r+o*l,i+o*f,u*e/rn(jo*t+v)]}return[r+n*l,i+n*f,u*Math.exp(jo*t)]}var r=n[0],i=n[1],u=n[2],o=t[0],a=t[1],c=t[2],l=o-r,f=a-i,s=l*l+f*f,h=Math.sqrt(s),p=(c*c-u*u+Ho*s)/(2*u*Fo*h),g=(c*c-u*u-Ho*s)/(2*c*Fo*h),v=Math.log(Math.sqrt(p*p+1)-p),d=Math.log(Math.sqrt(g*g+1)-g),y=d-v,m=(y||Math.log(c/u))/jo;return e.duration=1e3*m,e},to.behavior.zoom=function(){function n(n){n.on(q,s).on(Io+\".zoom\",p).on(\"dblclick.zoom\",g).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,o)),u(d=e,r),t=to.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function c(n){z++||n({type:\"zoomstart\"})}function l(n){a(),n({type:\"zoom\",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:\"zoomend\"}),d=null)}function s(){function n(){s=1,u(to.mouse(i),p),l(a)}function r(){h.on(L,null).on(T,null),g(s&&to.event.target===o),f(a)}var i=this,o=to.event.target,a=D.of(i,arguments),s=0,h=to.select(t(i)).on(L,n).on(T,r),p=e(to.mouse(i)),g=W(i);Pc.call(i),c(a)}function h(){function n(){var n=to.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=to.event.target;to.select(t).on(x,r).on(b,a),_.push(t);for(var e=to.event.changedTouches,i=0,u=e.length;u>i;++i)d[e[i].identifier]=null;var c=n(),l=Date.now();if(1===c.length){if(500>l-M){var f=c[0];o(g,f,d[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=l}else if(c.length>1){var f=c[0],s=c[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=to.touches(g);Pc.call(g);for(var a=0,c=o.length;c>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=y&&Math.sqrt(f/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(s*p)}M=null,u(n,t),l(v)}function a(){if(to.event.touches.length){for(var t=to.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var i in d)return void n()}to.selectAll(_).on(m,null),w.on(q,s).on(R,h),N(),f(v)}var p,g=this,v=D.of(g,arguments),d={},y=0,m=\".zoom-\"+to.event.changedTouches[0].identifier,x=\"touchmove\"+m,b=\"touchend\"+m,_=[],w=to.select(g),N=W(g);t(),c(v),w.on(q,null).on(R,t)}function p(){var n=D.of(this,arguments);m?clearTimeout(m):(Pc.call(this),v=e(d=y||to.mouse(this)),c(n)),m=setTimeout(function(){m=null,f(n)},50),S(),i(Math.pow(2,.002*Oo())*k.k),u(d,v),l(n)}function g(){var n=to.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),to.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,y,m,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Yo,C=250,z=0,q=\"mousedown.zoom\",L=\"mousemove.zoom\",T=\"mouseup.zoom\",R=\"touchstart.zoom\",D=N(n,\"zoomstart\",\"zoom\",\"zoomend\");return Io||(Io=\"onwheel\"in io?(Oo=function(){return-to.event.deltaY*(to.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in io?(Oo=function(){return to.event.wheelDelta},\"mousewheel\"):(Oo=function(){return-to.event.detail},\"MozMousePixelScroll\")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Rc?to.select(this).transition().each(\"start.zoom\",function(){k=this.__chart__||{x:0,y:0,k:1},c(n)}).tween(\"zoom:zoom\",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,u=d?d[1]:r/2,o=to.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:u-r[1]*a,k:a},l(n)}}).each(\"interrupt.zoom\",function(){f(n)}).each(\"end.zoom\",function(){f(n)}):(this.__chart__=k,c(n),l(n),f(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Yo:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},to.rebind(n,D,\"on\")};var Oo,Io,Yo=[0,1/0];to.color=an,an.prototype.toString=function(){return this.rgb()+\"\"},to.hsl=cn;var Zo=cn.prototype=new an;Zo.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,this.l/n)},Zo.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,n*this.l)},Zo.rgb=function(){return ln(this.h,this.s,this.l)},to.hcl=fn;var Vo=fn.prototype=new an;Vo.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Xo*(arguments.length?n:1)))},Vo.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Xo*(arguments.length?n:1)))},Vo.rgb=function(){return sn(this.h,this.c,this.l).rgb()},to.lab=hn;var Xo=18,$o=.95047,Bo=1,Wo=1.08883,Jo=hn.prototype=new an;Jo.brighter=function(n){return new hn(Math.min(100,this.l+Xo*(arguments.length?n:1)),this.a,this.b)},Jo.darker=function(n){return new hn(Math.max(0,this.l-Xo*(arguments.length?n:1)),this.a,this.b)},Jo.rgb=function(){return pn(this.l,this.a,this.b)},to.rgb=mn;var Go=mn.prototype=new an;Go.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mn(i,i,i)},Go.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mn(n*this.r,n*this.g,n*this.b)},Go.hsl=function(){return wn(this.r,this.g,this.b)},Go.toString=function(){return\"#\"+bn(this.r)+bn(this.g)+bn(this.b)};var Ko=to.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ko.forEach(function(n,t){Ko.set(n,Mn(t))}),to.functor=En,to.xhr=An(m),to.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Cn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'\"'+n.replace(/\\\"/g,'\"\"')+'\"':n}var a=new RegExp('[\"'+n+\"\\n]\"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function(\"d\",\"return {\"+n.map(function(n,t){return JSON.stringify(n)+\": d[\"+t+\"]\"}).join(\",\")+\"}\");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=l)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++f;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==c)continue;return n.slice(t,f-a)}return n.slice(t)}for(var r,i,u={},o={},a=[],l=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new y,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join(\"\\n\")},e.formatRows=function(n){return n.map(u).join(\"\\n\")},e},to.csv=to.dsv(\",\",\"text/csv\"),to.tsv=to.dsv(\"\t\",\"text/tab-separated-values\");var Qo,na,ta,ea,ra,ia=this[x(this,\"requestAnimationFrame\")]||function(n){setTimeout(n,17)};to.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,f:!1,n:null};na?na.n=u:Qo=u,na=u,ta||(ea=clearTimeout(ea),ta=1,ia(Ln))},to.timer.flush=function(){Tn(),Rn()},to.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var ua=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"].map(Pn);to.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=to.round(n,Dn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),ua[8+e/3]};var oa=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,aa=to.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=to.round(n,Dn(n,t))).toFixed(Math.max(0,Math.min(20,Dn(n*(1+1e-15),t))))}}),ca=to.time={},la=Date;Fn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){fa.setUTCDate.apply(this._,arguments)},setDay:function(){fa.setUTCDay.apply(this._,arguments)},setFullYear:function(){fa.setUTCFullYear.apply(this._,arguments)},setHours:function(){fa.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){fa.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){fa.setUTCMinutes.apply(this._,arguments)},setMonth:function(){fa.setUTCMonth.apply(this._,arguments)},setSeconds:function(){fa.setUTCSeconds.apply(this._,arguments)},setTime:function(){fa.setTime.apply(this._,arguments)}};var fa=Date.prototype;ca.year=Hn(function(n){return n=ca.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ca.years=ca.year.range,ca.years.utc=ca.year.utc.range,ca.day=Hn(function(n){var t=new la(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ca.days=ca.day.range,ca.days.utc=ca.day.utc.range,ca.dayOfYear=function(n){var t=ca.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},[\"sunday\",\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\"].forEach(function(n,t){t=7-t;var e=ca[n]=Hn(function(n){return(n=ca.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ca.year(n).getDay();return Math.floor((ca.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ca[n+\"s\"]=e.range,ca[n+\"s\"].utc=e.utc.range,ca[n+\"OfYear\"]=function(n){var e=ca.year(n).getDay();return Math.floor((ca.dayOfYear(n)+(e+t)%7)/7)}}),ca.week=ca.sunday,ca.weeks=ca.sunday.range,ca.weeks.utc=ca.sunday.utc.range,ca.weekOfYear=ca.sundayOfYear;var sa={\"-\":\"\",_:\" \",0:\"0\"},ha=/^\\s*\\d+/,pa=/^%/;to.locale=function(n){return{numberFormat:Un(n),timeFormat:In(n)}};var ga=to.locale({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],dateTime:\"%a %b %e %X %Y\",date:\"%m/%d/%Y\",time:\"%H:%M:%S\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});to.format=ga.numberFormat,to.geo={},lt.prototype={s:0,t:0,add:function(n){\nft(n,this.t,va),ft(va.s,this.s,this),this.s?this.t+=va.t:this.s=va.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var va=new lt;to.geo.stream=function(n,t){n&&da.hasOwnProperty(n.type)?da[n.type](n,t):st(n,t)};var da={Feature:function(n,t){st(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rn?4*Lo+n:n,xa.lineStart=xa.lineEnd=xa.point=b}};to.geo.bounds=function(){function n(n,t){M.push(x=[f=n,h=n]),s>t&&(s=t),t>p&&(p=t)}function t(t,e){var r=vt([t*Po,e*Po]);if(y){var i=yt(y,r),u=[i[1],-i[0],0],o=yt(u,i);xt(o),o=bt(o);var c=t-g,l=c>0?1:-1,v=o[0]*Uo*l,d=po(c)>180;if(d^(v>l*g&&l*t>v)){var m=o[1]*Uo;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(v>l*g&&l*t>v)){var m=-o[1]*Uo;s>m&&(s=m)}else s>e&&(s=e),e>p&&(p=e);d?g>t?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(f>t&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=po(r)>180?r+(r>0?360:-360):r}else v=n,d=e;xa.point(n,e),t(n,e)}function u(){xa.lineStart()}function o(){i(v,d),xa.lineEnd(),po(m)>zo&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nMa?(f=-(h=180),s=-(p=90)):m>zo?p=90:-zo>m&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],to.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,i=M[0],u=[i];t>r;++r)e=M[r],l(e[0],i)||l(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),to.geo.centroid=function(n){ba=_a=wa=Sa=ka=Na=Ea=Aa=Ca=za=qa=0,to.geo.stream(n,La);var t=Ca,e=za,r=qa,i=t*t+e*e+r*r;return qo>i&&(t=Na,e=Ea,r=Aa,zo>_a&&(t=wa,e=Sa,r=ka),i=t*t+e*e+r*r,qo>i)?[NaN,NaN]:[Math.atan2(e,t)*Uo,tn(r/Math.sqrt(i))*Uo]};var ba,_a,wa,Sa,ka,Na,Ea,Aa,Ca,za,qa,La={sphere:b,point:wt,lineStart:kt,lineEnd:Nt,polygonStart:function(){La.lineStart=Et},polygonEnd:function(){La.lineStart=kt}},Ta=Tt(Ct,Ut,Ft,[-Lo,-Lo/2]),Ra=1e9;to.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=Yt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(to.geo.conicEqualArea=function(){return Zt(Vt)}).raw=Vt,to.geo.albers=function(){return to.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},to.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=to.geo.albers(),o=to.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=to.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var l=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*l,s-.238*l],[f+.455*l,s+.238*l]]).stream(c).point,r=o.translate([f-.307*l,s+.201*l]).clipExtent([[f-.425*l+zo,s+.12*l+zo],[f-.214*l-zo,s+.234*l-zo]]).stream(c).point,i=a.translate([f-.205*l,s+.212*l]).clipExtent([[f-.214*l+zo,s+.166*l+zo],[f-.115*l-zo,s+.234*l-zo]]).stream(c).point,n},n.scale(1070)};var Da,Pa,Ua,ja,Fa,Ha,Oa={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Pa=0,Oa.lineStart=Xt},polygonEnd:function(){Oa.lineStart=Oa.lineEnd=Oa.point=b,Da+=po(Pa/2)}},Ia={point:$t,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Ya={point:Jt,lineStart:Gt,lineEnd:Kt,polygonStart:function(){Ya.lineStart=Qt},polygonEnd:function(){Ya.point=Jt,Ya.lineStart=Gt,Ya.lineEnd=Kt}};to.geo.path=function(){function n(n){return n&&(\"function\"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),to.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Da=0,to.geo.stream(n,i(Oa)),Da},n.centroid=function(n){return wa=Sa=ka=Na=Ea=Aa=Ca=za=qa=0,to.geo.stream(n,i(Ya)),qa?[Ca/qa,za/qa]:Aa?[Na/Aa,Ea/Aa]:ka?[wa/ka,Sa/ka]:[NaN,NaN]},n.bounds=function(n){return Fa=Ha=-(Ua=ja=1/0),to.geo.stream(n,i(Ia)),[[Ua,ja],[Fa,Ha]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||ee(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Bt:new ne(n),\"function\"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a=\"function\"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(to.geo.albersUsa()).context(null)},to.geo.transform=function(n){return{stream:function(t){var e=new re(t);for(var r in n)e[r]=n[r];return e}}},re.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},to.geo.projection=ue,to.geo.projectionMutator=oe,(to.geo.equirectangular=function(){return ue(ce)}).raw=ce.invert=ce,to.geo.rotation=function(n){function t(t){return t=n(t[0]*Po,t[1]*Po),t[0]*=Uo,t[1]*=Uo,t}return n=fe(n[0]%360*Po,n[1]*Po,n.length>2?n[2]*Po:0),t.invert=function(t){return t=n.invert(t[0]*Po,t[1]*Po),t[0]*=Uo,t[1]*=Uo,t},t},le.invert=ce,to.geo.circle=function(){function n(){var n=\"function\"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Po,-n[1]*Po,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Uo,n[1]*=Uo}}),{type:\"Polygon\",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ge((t=+r)*Po,i*Po),n):t},n.precision=function(r){return arguments.length?(e=ge(t*Po,(i=+r)*Po),n):i},n.angle(90)},to.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Po,i=n[1]*Po,u=t[1]*Po,o=Math.sin(r),a=Math.cos(r),c=Math.sin(i),l=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=l*f-c*s*a)*e),c*f+l*s*a)},to.geo.graticule=function(){function n(){return{type:\"MultiLineString\",coordinates:t()}}function t(){return to.range(Math.ceil(u/d)*d,i,d).map(h).concat(to.range(Math.ceil(l/y)*y,c,y).map(p)).concat(to.range(Math.ceil(r/g)*g,e,g).filter(function(n){return po(n%d)>zo}).map(f)).concat(to.range(Math.ceil(a/v)*v,o,v).filter(function(n){return po(n%y)>zo}).map(s))}var e,r,i,u,o,a,c,l,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:\"LineString\",coordinates:n}})},n.outline=function(){return{type:\"Polygon\",coordinates:[h(u).concat(p(c).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],l=+t[0][1],c=+t[1][1],u>i&&(t=u,u=i,i=t),l>c&&(t=l,l=c,c=t),n.precision(m)):[[u,l],[i,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=de(a,o,90),s=ye(r,e,m),h=de(l,c,90),p=ye(u,i,m),n):m},n.majorExtent([[-180,-90+zo],[180,90-zo]]).minorExtent([[-180,-80-zo],[180,80+zo]])},to.geo.greatArc=function(){function n(){return{type:\"LineString\",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=me,i=Me;return n.distance=function(){return to.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t=\"function\"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e=\"function\"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},to.geo.interpolate=function(n,t){return xe(n[0]*Po,n[1]*Po,t[0]*Po,t[1]*Po)},to.geo.length=function(n){return Za=0,to.geo.stream(n,Va),Za};var Za,Va={sphere:b,point:b,lineStart:be,lineEnd:b,polygonStart:b,polygonEnd:b},Xa=_e(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(to.geo.azimuthalEqualArea=function(){return ue(Xa)}).raw=Xa;var $a=_e(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(to.geo.azimuthalEquidistant=function(){return ue($a)}).raw=$a,(to.geo.conicConformal=function(){return Zt(we)}).raw=we,(to.geo.conicEquidistant=function(){return Zt(Se)}).raw=Se;var Ba=_e(function(n){return 1/n},Math.atan);(to.geo.gnomonic=function(){return ue(Ba)}).raw=Ba,ke.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Do]},(to.geo.mercator=function(){return Ne(ke)}).raw=ke;var Wa=_e(function(){return 1},Math.asin);(to.geo.orthographic=function(){return ue(Wa)}).raw=Wa;var Ja=_e(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(to.geo.stereographic=function(){return ue(Ja)}).raw=Ja,Ee.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Do]},(to.geo.transverseMercator=function(){var n=Ne(Ee),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ee,to.geom={},to.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(qe),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=ze(a),f=ze(c),s=f[0]===l[0],h=f[f.length-1]===l[l.length-1],p=[];for(t=l.length-1;t>=0;--t)p.push(n[a[l[t]][2]]);for(t=+s;t=r&&l.x<=u&&l.y>=i&&l.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/zo)*zo,y:Math.round(o(n,t)/zo)*zo,i:t}})}var r=Ae,i=Ce,u=r,o=i,a=uc;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Ze),c=-1,l=a.length,f=a[l-1].edge,s=f.l===o?f.r:f.l;++c=l,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=sr()),s?i=l:a=l,h?o=f:c=f,u(n,t,e,r,i,o,a,c)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(c);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;g>p;++p)f=n[p],f.xy&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;g>p;++p){var b=+M(f=n[p],p),_=+x(f,p);v>b&&(v=b),d>_&&(d=_),b>y&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=sr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){hr(n,k,v,d,y,m)},k.find=function(n){return pr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):\"in\";return e=lc.get(e)||cc,r=fc.get(r)||m,xr(r(e.apply(null,eo.call(arguments,1))))},to.interpolateHcl=Tr,to.interpolateHsl=Rr,to.interpolateLab=Dr,to.interpolateRound=Pr,to.transform=function(n){var t=io.createElementNS(to.ns.prefix.svg,\"g\");return(to.transform=function(n){if(null!=n){t.setAttribute(\"transform\",n);var e=t.transform.baseVal.consolidate()}return new Ur(e?e.matrix:sc)})(n)},Ur.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};var sc={a:1,b:0,c:0,d:1,e:0,f:0};to.interpolateTransform=Or,to.layout={},to.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++ea*a/d){if(g>c){var l=t.charge/c;n.px-=u*l,n.py-=o*l}return!0}if(t.point&&c&&g>c){var l=t.pointCharge/c;n.px-=u*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=to.event.x,n.py=to.event.y,a.resume()}var e,r,i,u,o,a={},c=to.dispatch(\"start\",\"tick\",\"end\"),l=[1,1],f=.9,s=hc,h=pc,p=-30,g=gc,v=.1,d=.64,y=[],M=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:\"end\",alpha:r=0}),!0;var t,e,a,s,h,g,d,m,x,b=y.length,_=M.length;for(e=0;_>e;++e)a=M[e],s=a.source,h=a.target,m=h.x-s.x,x=h.y-s.y,(g=m*m+x*x)&&(g=r*u[e]*((g=Math.sqrt(g))-i[e])/g,m*=g,x*=g,h.x-=m*(d=s.weight/(h.weight+s.weight)),h.y-=x*d,s.x+=m*(d=1-d),s.y+=x*d);if((d=r*v)&&(m=l[0]/2,x=l[1]/2,e=-1,d))for(;++e0?n:0:n>0&&(c.start({type:\"start\",alpha:r=n}),to.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;f>a;++a){var i=M[a];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var u,o=e[t],a=-1,l=o.length;++at;++t)(r=y[t]).index=t,r.weight=0;for(t=0;f>t;++t)r=M[t],\"number\"==typeof r.source&&(r.source=y[r.source]),\"number\"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=y[t],isNaN(r.x)&&(r.x=n(\"x\",g)),isNaN(r.y)&&(r.y=n(\"y\",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],\"function\"==typeof s)for(t=0;f>t;++t)i[t]=+s.call(this,M[t],t);else for(t=0;f>t;++t)i[t]=s;if(u=[],\"function\"==typeof h)for(t=0;f>t;++t)u[t]=+h.call(this,M[t],t);else for(t=0;f>t;++t)u[t]=h;if(o=[],\"function\"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,y[t],t);else for(t=0;c>t;++t)o[t]=p;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=to.behavior.drag().origin(m).on(\"dragstart.force\",$r).on(\"drag.force\",t).on(\"dragend.force\",Br)),arguments.length?void this.on(\"mouseover.force\",Wr).on(\"mouseout.force\",Jr).call(e):e},to.rebind(a,c,\"on\")};var hc=20,pc=1,gc=1/0;to.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(l=e.call(n,u,u.depth))&&(c=l.length)){for(var c,l,f;--c>=0;)o.push(f=l[c]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=l}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return ni(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qr(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},to.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++ls?-1:1),g=(s-c*p)/to.sum(l),v=to.range(c),d=[];return null!=e&&v.sort(e===vc?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:f,endAngle:f+=a*g+p,padAngle:h}}),d}var t=Number,e=vc,r=0,i=To,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var vc={};to.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),f=l.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,c);l=to.permute(l,s),f=to.permute(f,s);var h,p,g,v,d=r.call(n,f,c),y=l[0].length;for(g=0;y>g;++g)for(i.call(n,l[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,l[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=ci,r=li,i=ai,u=ui,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e=\"function\"==typeof t?t:dc.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r=\"function\"==typeof t?t:yc.get(t)||li,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var dc=to.map({\"inside-out\":function(n){var t,e,r=n.length,i=n.map(fi),u=n.map(si),o=to.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,c=0,l=[],f=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=u[e],l.push(e)):(c+=u[e],f.push(e));return f.reverse().concat(l)},reverse:function(n){return to.range(n.length).reverse()},\"default\":ci}),yc=to.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,c=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,i,u,o,a,c,l,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=c=l=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=c-=i?u/i*a:0,l>c&&(l=c)}for(e=0;h>e;++e)p[e]-=l;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:li});to.layout.histogram=function(){function n(n,u){for(var o,a,c=[],l=n.map(e,this),f=r.call(this,l,u),s=i.call(this,f,l,u),u=-1,h=l.length,p=s.length-1,g=t?1:1/h;++u0)for(u=-1;++u=f[0]&&a<=f[1]&&(o=c[to.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return c}var t=!0,e=Number,r=vi,i=pi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i=\"number\"==typeof t?function(n){return gi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},to.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],c=i[0],l=i[1],f=null==t?Math.sqrt:\"function\"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+f(n.value)}),ni(a,xi),r){var s=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=s}),ni(a,xi),ni(a,function(n){n.r-=s})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=to.layout.hierarchy().sort(di),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||\"function\"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Kr(n,e)},to.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(ni(h,e),h.parent.m=-h.z,Qr(h,r),l)Qr(s,u);else{var p=s,g=s,v=s;Qr(s,function(n){n.xg.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=c[0]/(g.x+a(g,p)/2+d),m=c[1]/(v.depth||1);Qr(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,c=i.parent.children[0],l=i.m,f=u.m,s=o.m,h=c.m;o=Ei(o),i=Ni(i),o&&i;)c=Ni(c),u=Ei(u),u.a=n,r=o.z+s-i.z-l+a(o._,i._),r>0&&(Ai(zi(o,n,e),n,r),l+=r,f+=r),s+=o.m,l+=i.m,h+=c.m,f+=u.m;o&&!Ei(u)&&(u.t=o,u.m+=s-f),i&&!Ni(c)&&(c.t=i,c.m+=l-h,e=n)}return e}function u(n){n.x*=c[0],n.y=n.depth*c[1]}var o=to.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?u:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:u,n):l?c:null},Kr(n,o)},to.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var f=Ti(c),s=Ri(c),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return ni(c,i?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=to.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},Kr(n,t)},to.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++it?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,c,l=s(e),f=[],h=u.slice(),g=1/0,v=\"slice\"===p?l.dx:\"dice\"===p?l.dy:\"slice-dice\"===p?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),f.area=0;(c=h.length)>0;)f.push(o=h[c-1]),f.area+=o.area,\"squarify\"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,l,!1),v=Math.min(l.dx,l.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,l,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;u=a.pop();)c.push(u),c.area+=u.area,null!=u.z&&(i(c,u.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oe&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,l=e.y,f=t?c(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++ue&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=to.random.normal.apply(to,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=to.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},to.scale={};var mc={floor:m,ceil:m};to.scale.linear=function(){return Yi([0,1],[0,1],mr,!1)};var Mc={s:1,g:1,p:1,r:1,e:1};to.scale.log=function(){return Gi(to.scale.linear().domain([0,1]),10,!0,[1,10])};var xc=to.format(\".0e\"),bc={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};to.scale.pow=function(){return Ki(to.scale.linear(),1,[0,1])},to.scale.sqrt=function(){return to.scale.pow().exponent(.5)},to.scale.ordinal=function(){return nu([],{t:\"range\",a:[[]]})},to.scale.category10=function(){return to.scale.ordinal().range(_c)},to.scale.category20=function(){return to.scale.ordinal().range(wc)},to.scale.category20b=function(){return to.scale.ordinal().range(Sc)},to.scale.category20c=function(){return to.scale.ordinal().range(kc)};var _c=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),wc=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),Sc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),kc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);to.scale.quantile=function(){return tu([],[])},to.scale.quantize=function(){return eu(0,1,[0,1])},to.scale.threshold=function(){return ru([.5],[0,1])},to.scale.identity=function(){return iu([0,1])},to.svg={},to.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Do,s=a.apply(this,arguments)-Do,h=Math.abs(s-f),p=f>s?0:1;if(n>l&&(g=l,l=n,n=g),h>=Ro)return t(l,p)+(n?t(n,1-p):\"\")+\"Z\";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+c.apply(this,arguments)||0)/2)&&(d=u===Nc?Math.sqrt(n*n+l*l):+u.apply(this,arguments),p||(E*=-1),l&&(E=tn(d/l*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),l){m=l*Math.cos(f+E),M=l*Math.sin(f+E),x=l*Math.cos(s-E),b=l*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Lo?0:1;if(E&&su(m,M,x,b)===p^C){var z=(f+s)/2;m=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var q=Math.abs(f-s+2*N)<=Lo?0:1;if(N&&su(_,w,S,k)===1-p^q){var L=(f+s)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((g=Math.min(Math.abs(l-n)/2,+i.apply(this,arguments)))>.001){v=l>n^p?0:1;var T=null==S?[_,w]:null==x?[m,M]:Te([m,M],[S,k],[x,b],[_,w]),R=m-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(g,(l-F)/(j+1)),O=hu(null==S?[_,w]:[S,k],[m,M],l,H,p),I=hu([x,b],[_,w],l,H,p);g===H?A.push(\"M\",O[0],\"A\",H,\",\",H,\" 0 0,\",v,\" \",O[1],\"A\",l,\",\",l,\" 0 \",1-p^su(O[1][0],O[1][1],I[1][0],I[1][1]),\",\",p,\" \",I[1],\"A\",H,\",\",H,\" 0 0,\",v,\" \",I[0]):A.push(\"M\",O[0],\"A\",H,\",\",H,\" 0 1,\",v,\" \",I[0])}else A.push(\"M\",m,\",\",M);if(null!=S){var Y=Math.min(g,(n-F)/(j-1)),Z=hu([m,M],[S,k],n,-Y,p),V=hu([_,w],null==x?[m,M]:[x,b],n,-Y,p);g===Y?A.push(\"L\",V[0],\"A\",Y,\",\",Y,\" 0 0,\",v,\" \",V[1],\"A\",n,\",\",n,\" 0 \",p^su(V[1][0],V[1][1],Z[1][0],Z[1][1]),\",\",1-p,\" \",Z[1],\"A\",Y,\",\",Y,\" 0 0,\",v,\" \",Z[0]):A.push(\"L\",V[0],\"A\",Y,\",\",Y,\" 0 0,\",v,\" \",Z[0])}else A.push(\"L\",_,\",\",w)}else A.push(\"M\",m,\",\",M),null!=x&&A.push(\"A\",l,\",\",l,\" 0 \",C,\",\",p,\" \",x,\",\",b),A.push(\"L\",_,\",\",w),null!=S&&A.push(\"A\",n,\",\",n,\" 0 \",q,\",\",1-p,\" \",S,\",\",k);return A.push(\"Z\"),A.join(\"\")}function t(n,t){return\"M0,\"+n+\"A\"+n+\",\"+n+\" 0 1,\"+t+\" 0,\"+-n+\"A\"+n+\",\"+n+\" 0 1,\"+t+\" 0,\"+n}var e=ou,r=au,i=uu,u=Nc,o=cu,a=lu,c=fu;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==Nc?Nc:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(c=En(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Do;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Nc=\"auto\";to.svg.line=function(){return pu(m)};var Ec=to.map({linear:gu,\"linear-closed\":vu,step:du,\"step-before\":yu,\"step-after\":mu,basis:Su,\"basis-open\":ku,\"basis-closed\":Nu,bundle:Eu,cardinal:bu,\"cardinal-open\":Mu,\"cardinal-closed\":xu,monotone:Tu});Ec.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Ac=[0,2/3,1/3,0],Cc=[0,1/3,2/3,0],zc=[0,1/6,2/3,1/6];to.svg.line.radial=function(){var n=pu(Ru);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yu.reverse=mu,mu.reverse=yu,to.svg.area=function(){return Du(m)},to.svg.area.radial=function(){var n=Du(Ru);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},to.svg.chord=function(){function n(n,a){var c=t(this,u,n,a),l=t(this,o,n,a);return\"M\"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?i(c.r,c.p1,c.r,c.p0):i(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+i(l.r,l.p1,c.r,c.p0))+\"Z\"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=c.call(n,i,r)-Do,f=l.call(n,i,r)-Do;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return\"A\"+n+\",\"+n+\" 0 \"+ +(e>Lo)+\",1 \"+t}function i(n,t,e,r){return\"Q 0,0 \"+r}var u=me,o=Me,a=Pu,c=cu,l=lu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(c=En(t),n):c},n.endAngle=function(t){return arguments.length?(l=En(t),n):l},n},to.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,c=[u,{x:u.x,y:a},{x:o.x,y:a},o];return c=c.map(r),\"M\"+c[0]+\"C\"+c[1]+\" \"+c[2]+\" \"+c[3]}var t=me,e=Me,r=Uu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},to.svg.diagonal.radial=function(){var n=to.svg.diagonal(),t=Uu,e=n.projection;return n.projection=function(n){return arguments.length?e(ju(t=n)):t},n},to.svg.symbol=function(){function n(n,r){return(qc.get(t.call(this,n,r))||Ou)(e.call(this,n,r))}var t=Hu,e=Fu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var qc=to.map({circle:Ou,cross:function(n){var t=Math.sqrt(n/5)/2;return\"M\"+-3*t+\",\"+-t+\"H\"+-t+\"V\"+-3*t+\"H\"+t+\"V\"+-t+\"H\"+3*t+\"V\"+t+\"H\"+t+\"V\"+3*t+\"H\"+-t+\"V\"+t+\"H\"+-3*t+\"Z\"},diamond:function(n){var t=Math.sqrt(n/(2*Tc)),e=t*Tc;return\"M0,\"+-t+\"L\"+e+\",0 0,\"+t+\" \"+-e+\",0Z\"},square:function(n){var t=Math.sqrt(n)/2;return\"M\"+-t+\",\"+-t+\"L\"+t+\",\"+-t+\" \"+t+\",\"+t+\" \"+-t+\",\"+t+\"Z\"},\"triangle-down\":function(n){var t=Math.sqrt(n/Lc),e=t*Lc/2;return\"M0,\"+e+\"L\"+t+\",\"+-e+\" \"+-t+\",\"+-e+\"Z\"},\"triangle-up\":function(n){var t=Math.sqrt(n/Lc),e=t*Lc/2;return\"M0,\"+-e+\"L\"+t+\",\"+e+\" \"+-t+\",\"+e+\"Z\"}});to.svg.symbolTypes=qc.keys();var Lc=Math.sqrt(3),Tc=Math.tan(30*Po);wo.transition=function(n){for(var t,e,r=Rc||++jc,i=Xu(n),u=[],o=Dc||{time:Date.now(),ease:kr,delay:0,duration:250},a=-1,c=this.length;++au;u++){i.push(t=[]);for(var e=this[u],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Yu(i,this.namespace,this.id)},Uc.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Uc.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+=\"\",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+=\"\",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o=\"transform\"==n?Or:mr,a=to.ns.qualify(n);return Zu(this,\"attr.\"+n,t,a.local?u:i)},Uc.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=to.ns.qualify(n);return this.tween(\"attr.\"+n,i.local?r:e)},Uc.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+=\"\",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if(\"string\"!=typeof n){2>o&&(e=\"\");for(r in n)this.style(r,n[r],e);return this}r=\"\"}return Zu(this,\"style.\"+n,e,u)},Uc.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=\"\"),this.tween(\"style.\"+n,i)},Uc.text=function(n){return Zu(this,\"text\",n,Vu)},Uc.remove=function(){var n=this.namespace;return this.each(\"end.transition\",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Uc.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:(\"function\"!=typeof n&&(n=to.ease.apply(to,arguments)),Y(this,function(r){r[e][t].ease=n}))},Uc.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,\"function\"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Uc.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,\"function\"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Uc.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Dc,u=Rc;try{Rc=e,Y(this,function(t,i,u){Dc=t[r][e],n.call(t,t.__data__,i,u)})}finally{Dc=i,Rc=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=to.dispatch(\"start\",\"end\",\"interrupt\"))).on(n,t)});return this},Uc.transition=function(){for(var n,t,e,r,i=this.id,u=++jc,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],$u(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Yu(a,o,u)},to.svg.axis=function(){function n(n){n.each(function(){var n,l=to.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==c?s.ticks?s.ticks.apply(s,a):s.domain():c,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=l.selectAll(\".tick\").data(h,s),v=g.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",zo),d=to.transition(g.exit()).style(\"opacity\",zo).remove(),y=to.transition(g.order()).style(\"opacity\",1),M=Math.max(i,0)+o,x=ji(s),b=l.selectAll(\".domain\").data([0]),_=(b.enter().append(\"path\").attr(\"class\",\"domain\"),to.transition(b));v.append(\"line\"),v.append(\"text\");var w,S,k,N,E=v.select(\"line\"),A=y.select(\"line\"),C=g.select(\"text\").text(p),z=v.select(\"text\"),q=y.select(\"text\"),L=\"top\"===r||\"left\"===r?-1:1;if(\"bottom\"===r||\"top\"===r?(n=Bu,w=\"x\",k=\"y\",S=\"x2\",N=\"y2\",C.attr(\"dy\",0>L?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),_.attr(\"d\",\"M\"+x[0]+\",\"+L*u+\"V0H\"+x[1]+\"V\"+L*u)):(n=Wu,w=\"y\",k=\"x\",S=\"y2\",N=\"x2\",C.attr(\"dy\",\".32em\").style(\"text-anchor\",0>L?\"end\":\"start\"),_.attr(\"d\",\"M\"+L*u+\",\"+x[0]+\"H0V\"+x[1]+\"H\"+L*u)),E.attr(N,L*i),z.attr(k,L*M),A.attr(S,0).attr(N,L*i),q.attr(w,0).attr(k,L*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=to.scale.linear(),r=Fc,i=6,u=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Hc?t+\"\":Fc,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Fc=\"bottom\",Hc={top:1,right:1,bottom:1,left:1};to.svg.brush=function(){function n(t){t.each(function(){var t=to.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",u).on(\"touchstart.brush\",u),o=t.selectAll(\".background\").data([0]);o.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),t.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var a=t.selectAll(\".resize\").data(v,m);a.exit().remove(),a.enter().append(\"g\").attr(\"class\",function(n){return\"resize \"+n}).style(\"cursor\",function(n){return Oc[n]}).append(\"rect\").attr(\"x\",function(n){return/[ew]$/.test(n)?-3:null}).attr(\"y\",function(n){return/^[ns]/.test(n)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),a.style(\"display\",n.empty()?\"none\":null);var c,s=to.transition(t),h=to.transition(o);l&&(c=ji(l),h.attr(\"x\",c[0]).attr(\"width\",c[1]-c[0]),r(s)),f&&(c=ji(f),h.attr(\"y\",c[0]).attr(\"height\",c[1]-c[0]),i(s)),e(s)})}function e(n){n.selectAll(\".resize\").attr(\"transform\",function(n){return\"translate(\"+s[+/e$/.test(n)]+\",\"+h[+/^s/.test(n)]+\")\"})}function r(n){n.select(\".extent\").attr(\"x\",s[0]),n.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",s[1]-s[0])}function i(n){n.select(\".extent\").attr(\"y\",h[0]),n.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",h[1]-h[0])}function u(){function u(){32==to.event.keyCode&&(C||(M=null,q[0]-=s[1],q[1]-=h[1],C=2),S())}function v(){32==to.event.keyCode&&2==C&&(q[0]+=s[1],q[1]+=h[1],C=0,S())}function d(){var n=to.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(to.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),q[0]=s[+(n[0]f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",n.empty()?\"none\":null),to.select(\"body\").style(\"cursor\",null),L.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),z(),w({type:\"brushend\"})}var M,x,b=this,_=to.select(to.event.target),w=c.of(b,arguments),k=to.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&l,A=!/^(e|w)$/.test(N)&&f,C=_.classed(\"extent\"),z=W(b),q=to.mouse(b),L=to.select(t(b)).on(\"keydown.brush\",u).on(\"keyup.brush\",v);if(to.event.changedTouches?L.on(\"touchmove.brush\",d).on(\"touchend.brush\",m):L.on(\"mousemove.brush\",d).on(\"mouseup.brush\",m),k.interrupt().selectAll(\"*\").interrupt(),C)q[0]=s[0]-q[0],q[1]=h[0]-q[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-q[0],h[1-R]-q[1]],q[0]=s[T],q[1]=h[R]}else to.event.altKey&&(M=q.slice());k.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),to.select(\"body\").style(\"cursor\",_.style(\"cursor\")),w({type:\"brushstart\"}),d()}var o,a,c=N(n,\"brushstart\",\"brush\",\"brushend\"),l=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Ic[0];return n.event=function(n){n.each(function(){var n=c.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Rc?to.select(this).transition().each(\"start.brush\",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var e=Mr(s,t.x),r=Mr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){o=t.i,a=t.j,n({type:\"brush\",mode:\"resize\"}),n({type:\"brushend\"})}):(n({type:\"brushstart\"}),n({type:\"brush\",mode:\"resize\"}),n({type:\"brushend\"}))})},n.x=function(t){return arguments.length?(l=t,v=Ic[!l<<1|!f],n):l},n.y=function(t){return arguments.length?(f=t,v=Ic[!l<<1|!f],n):f},n.clamp=function(t){return arguments.length?(l&&f?(p=!!t[0],g=!!t[1]):l?p=!!t:f&&(g=!!t),n):l&&f?[p,g]:l?p:f?g:null},n.extent=function(t){var e,r,i,u,c;return arguments.length?(l&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(c=e,e=r,r=c),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],l&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(c=i,i=u,u=c),i==h[0]&&u==h[1]||(h=[i,u])),n):(l&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(c=e,e=r,r=c))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(c=i,i=u,u=c))),l&&f?[[e,i],[r,u]]:l?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!l&&s[0]==s[1]||!!f&&h[0]==h[1]},to.rebind(n,c,\"on\")};var Oc={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},Ic=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]],Yc=ca.format=ga.timeFormat,Zc=Yc.utc,Vc=Zc(\"%Y-%m-%dT%H:%M:%S.%LZ\");Yc.iso=Date.prototype.toISOString&&+new Date(\"2000-01-01T00:00:00.000Z\")?Ju:Vc,Ju.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Ju.toString=Vc.toString,ca.second=Hn(function(n){return new la(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ca.seconds=ca.second.range,ca.seconds.utc=ca.second.utc.range,ca.minute=Hn(function(n){return new la(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ca.minutes=ca.minute.range,ca.minutes.utc=ca.minute.utc.range,ca.hour=Hn(function(n){var t=n.getTimezoneOffset()/60;return new la(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ca.hours=ca.hour.range,ca.hours.utc=ca.hour.utc.range,ca.month=Hn(function(n){return n=ca.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ca.months=ca.month.range,ca.months.utc=ca.month.utc.range;var Xc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],$c=[[ca.second,1],[ca.second,5],[ca.second,15],[ca.second,30],[ca.minute,1],[ca.minute,5],[ca.minute,15],[ca.minute,30],[ca.hour,1],[ca.hour,3],[ca.hour,6],[ca.hour,12],[ca.day,1],[ca.day,2],[ca.week,1],[ca.month,1],[ca.month,3],[ca.year,1]],Bc=Yc.multi([[\".%L\",function(n){return n.getMilliseconds()}],[\":%S\",function(n){return n.getSeconds()}],[\"%I:%M\",function(n){return n.getMinutes()}],[\"%I %p\",function(n){return n.getHours()}],[\"%a %d\",function(n){return n.getDay()&&1!=n.getDate()}],[\"%b %d\",function(n){return 1!=n.getDate()}],[\"%B\",function(n){return n.getMonth()}],[\"%Y\",Ct]]),Wc={range:function(n,t,e){return to.range(Math.ceil(n/e)*e,+t,e).map(Ku)},floor:m,ceil:m};$c.year=ca.year,ca.scale=function(){return Gu(to.scale.linear(),$c,Bc)};var Jc=$c.map(function(n){return[n[0].utc,n[1]]}),Gc=Zc.multi([[\".%L\",function(n){return n.getUTCMilliseconds()}],[\":%S\",function(n){return n.getUTCSeconds()}],[\"%I:%M\",function(n){return n.getUTCMinutes()}],[\"%I %p\",function(n){return n.getUTCHours()}],[\"%a %d\",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],[\"%b %d\",function(n){return 1!=n.getUTCDate()}],[\"%B\",function(n){return n.getUTCMonth()}],[\"%Y\",Ct]]);Jc.year=ca.year.utc,ca.scale.utc=function(){return Gu(to.scale.linear(),Jc,Gc)},to.text=An(function(n){return n.responseText}),to.json=function(n,t){return Cn(n,\"application/json\",Qu,t)},to.html=function(n,t){return Cn(n,\"text/html\",no,t)},to.xml=An(function(n){return n.responseXML}),\"function\"==typeof define&&define.amd?define(to):\"object\"==typeof module&&module.exports&&(module.exports=to),this.d3=to}();\n},{}],34:[function(require,module,exports){\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports,require(\"leaflet\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"leaflet\"],e):e((t.L=t.L||{},t.L.esri=t.L.esri||{}),t.L)}(this,function(t,e){\"use strict\";function i(t,e){for(var i=0;is;s++)e=t[s+1],i+=(e[0]-o[0])*(e[1]+o[1]),o=e;return i>=0}function o(t,e,i,s){var r=(s[0]-i[0])*(t[1]-i[1])-(s[1]-i[1])*(t[0]-i[0]),o=(e[0]-t[0])*(t[1]-i[1])-(e[1]-t[1])*(t[0]-i[0]),n=(s[1]-i[1])*(e[0]-t[0])-(s[0]-i[0])*(e[1]-t[1]);if(0!==n){var a=r/n,l=o/n;if(a>=0&&1>=a&&l>=0&&1>=l)return!0}return!1}function n(t,e){for(var i=0;i=0;e--)if(i=a[e][0],l(i,o)){a[e].push(o),m=!0;break}m||d.push(o)}for(;d.length;){o=d.pop();var f=!1;for(e=a.length-1;e>=0;e--)if(i=a[e][0],n(i,o)){a[e].push(o),f=!0;break}f||a.push([o.reverse()])}return 1===a.length?{type:\"Polygon\",coordinates:a[0]}:{type:\"MultiPolygon\",coordinates:a}}function h(t){var e=[],i=t.slice(0),o=s(i.shift().slice(0));if(o.length>=4){r(o)||o.reverse(),e.push(o);for(var n=0;n=4&&(r(a)&&a.reverse(),e.push(a))}}return e}function c(t){for(var e=[],i=0;i=0;r--){var o=s[r].slice(0);e.push(o)}return e}function p(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function d(t,e){var i={};return\"number\"==typeof t.x&&\"number\"==typeof t.y&&(i.type=\"Point\",i.coordinates=[t.x,t.y]),t.points&&(i.type=\"MultiPoint\",i.coordinates=t.points.slice(0)),t.paths&&(1===t.paths.length?(i.type=\"LineString\",i.coordinates=t.paths[0].slice(0)):(i.type=\"MultiLineString\",i.coordinates=t.paths.slice(0))),t.rings&&(i=u(t.rings.slice(0))),(t.geometry||t.attributes)&&(i.type=\"Feature\",i.geometry=t.geometry?d(t.geometry):null,i.properties=t.attributes?p(t.attributes):null,t.attributes&&(i.id=t.attributes[e]||t.attributes.OBJECTID||t.attributes.FID)),i}function m(t,e){e=e||\"OBJECTID\";var i,s={wkid:4326},r={};switch(t.type){case\"Point\":r.x=t.coordinates[0],r.y=t.coordinates[1],r.spatialReference=s;break;case\"MultiPoint\":r.points=t.coordinates.slice(0),r.spatialReference=s;break;case\"LineString\":r.paths=[t.coordinates.slice(0)],r.spatialReference=s;break;case\"MultiLineString\":r.paths=t.coordinates.slice(0),r.spatialReference=s;break;case\"Polygon\":r.rings=h(t.coordinates.slice(0)),r.spatialReference=s;break;case\"MultiPolygon\":r.rings=c(t.coordinates.slice(0)),r.spatialReference=s;break;case\"Feature\":t.geometry&&(r.geometry=m(t.geometry,e)),r.attributes=t.properties?p(t.properties):{},t.id&&(r.attributes[e]=t.id);break;case\"FeatureCollection\":for(r=[],i=0;i=0;n--){var a=g(o[n],i);r.features.push(a)}return r}function L(t){return t=e.Util.trim(t),\"/\"!==t[t.length-1]&&(t+=\"/\"),t}function x(t){return/\\.arcgis\\.com.*?FeatureServer/g.test(t)}function S(t){var e;switch(t){case\"Point\":e=\"esriGeometryPoint\";break;case\"MultiPoint\":e=\"esriGeometryMultipoint\";break;case\"LineString\":e=\"esriGeometryPolyline\";break;case\"MultiLineString\":e=\"esriGeometryPolyline\";break;case\"Polygon\":e=\"esriGeometryPolygon\";break;case\"MultiPolygon\":e=\"esriGeometryPolygon\"}return e}function T(){console&&console.warn&&console.warn.apply(console,arguments)}function I(t){var e=\"\";t.f=t.f||\"json\";for(var i in t)if(t.hasOwnProperty(i)){var s,r=t[i],o=Object.prototype.toString.call(r);e.length&&(e+=\"&\"),s=\"[object Array]\"===o?\"[object Object]\"===Object.prototype.toString.call(r[0])?JSON.stringify(r):r.join(\",\"):\"[object Object]\"===o?JSON.stringify(r):\"[object Date]\"===o?r.valueOf():r,e+=encodeURIComponent(i)+\"=\"+encodeURIComponent(s)}return e}function w(t,i){var s=new window.XMLHttpRequest;return s.onerror=function(r){s.onreadystatechange=e.Util.falseFn,t.call(i,{error:{code:500,message:\"XMLHttpRequest error\"}},null)},s.onreadystatechange=function(){var r,o;if(4===s.readyState){try{r=JSON.parse(s.responseText)}catch(n){r=null,o={code:500,message:\"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error.\"}}!o&&r.error&&(o=r.error,r=null),s.onerror=e.Util.falseFn,t.call(i,o,r)}},s.ontimeout=function(){this.onerror()},s}function P(t,e,i,s){var r=w(i,s);return\"undefined\"!=typeof s&&null!==s&&\"undefined\"!=typeof s.options&&(r.timeout=s.options.timeout),r.open(\"POST\",t),r.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\"),r.send(I(e)),r}function R(t,e,i,s){var r=w(i,s);return\"undefined\"!=typeof s&&null!==s&&\"undefined\"!=typeof s.options&&(r.timeout=s.options.timeout),r.open(\"GET\",t+\"?\"+I(e),!0),r.send(null),r}function C(t,e,i,s){var r=I(e),o=w(i,s);\"undefined\"!=typeof s&&null!==s&&\"undefined\"!=typeof s.options&&(o.timeout=s.options.timeout);var n=(t+\"?\"+r).length;if(2e3>=n&&X.cors)o.open(\"GET\",t+\"?\"+r),o.send(null);else{if(!(n>2e3&&X.cors))return 2e3>=n&&!X.cors?O(t,e,i,s):void T(\"a request to \"+t+\" was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html\");o.open(\"POST\",t),o.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\"),o.send(r)}return o}function O(t,i,s,r){window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{};var o=\"c\"+Y;i.callback=\"window._EsriLeafletCallbacks.\"+o;var n=e.DomUtil.create(\"script\",null,document.body);return n.type=\"text/javascript\",n.src=t+\"?\"+I(i),n.id=o,window._EsriLeafletCallbacks[o]=function(t){if(window._EsriLeafletCallbacks[o]!==!0){var e,i=Object.prototype.toString.call(t);\"[object Object]\"!==i&&\"[object Array]\"!==i&&(e={error:{code:500,message:\"Expected array or object as JSONP response\"}},t=null),!e&&t.error&&(e=t,t=null),s.call(r,e,t),window._EsriLeafletCallbacks[o]=!0}},Y++,{id:o,url:n.src,abort:function(){window._EsriLeafletCallbacks._callback[o]({code:0,message:\"Request aborted.\"})}}}function F(t){return new it(t)}function k(t){return new st(t)}function M(t){return new rt(t)}function E(t){return new ot(t)}function G(t){return new nt(t)}function q(t){return new at(t)}function A(t){return new lt(t)}function U(t){return new ut(t)}function D(t){return new ht(t)}function B(t){return new ct(t)}function z(t){return new pt(t)}function j(t,e){return new mt(t,e)}function Z(t,e){return new ft(t,e)}function N(t,e){return new _t(t,e)}function W(t,e){return new vt(t,e)}function J(t){this.values=[].concat(t||[])}function Q(t){return new xt(t)}e=\"default\"in e?e[\"default\"]:e;var H=\"2.0.0-beta.8\",K=window.XMLHttpRequest&&\"withCredentials\"in new window.XMLHttpRequest,V=\"\"===document.documentElement.style.pointerEvents,X={cors:K,pointerEvents:V},$={shallowClone:y,warn:T,cleanUrl:L,isArcgisOnline:x,geojsonTypeToArcGIS:S,responseToFeatureCollection:b,geojsonToArcGIS:f,arcgisToGeoJSON:g,boundsToExtent:v,extentToBounds:_},Y=0,tt=X.cors?R:O;tt.CORS=R,tt.JSONP=O;var et={request:C,get:tt,post:P},it=e.Class.extend({options:{proxy:!1,useCors:K},generateSetter:function(t,i){return e.Util.bind(function(e){return this.params[t]=e,this},i)},initialize:function(t){if(t.request&&t.options?(this._service=t,e.Util.setOptions(this,t.options)):(e.Util.setOptions(this,t),this.options.url=L(t.url)),this.params=e.Util.extend({},this.params||{}),this.setters)for(var i in this.setters){var s=this.setters[i];this[i]=this.generateSetter(s,this)}},token:function(t){return this._service?this._service.authenticate(t):this.params.token=t,this},request:function(t,e){return this._service?this._service.request(this.path,this.params,t,e):this._request(\"request\",this.path,this.params,t,e)},_request:function(t,e,i,s,r){var o=this.options.proxy?this.options.proxy+\"?\"+this.options.url+e:this.options.url+e;return\"get\"!==t&&\"request\"!==t||this.options.useCors?et[t](o,i,s,r):et.get.JSONP(o,i,s,r)}}),st=it.extend({setters:{offset:\"offset\",limit:\"limit\",fields:\"outFields\",precision:\"geometryPrecision\",featureIds:\"objectIds\",returnGeometry:\"returnGeometry\",token:\"token\"},path:\"query\",params:{returnGeometry:!0,where:\"1=1\",outSr:4326,outFields:\"*\"},within:function(t){return this._setGeometry(t),this.params.spatialRel=\"esriSpatialRelContains\",this},intersects:function(t){return this._setGeometry(t),this.params.spatialRel=\"esriSpatialRelIntersects\",this},contains:function(t){return this._setGeometry(t),this.params.spatialRel=\"esriSpatialRelWithin\",this},crosses:function(t){return this._setGeometry(t),this.params.spatialRel=\"esriSpatialRelCrosses\",this},touches:function(t){return this._setGeometry(t),this.params.spatialRel=\"esriSpatialRelTouches\",this},overlaps:function(t){return this._setGeometry(t),this.params.spatialRel=\"esriSpatialRelOverlaps\",this},nearby:function(t,i){return t=e.latLng(t),this.params.geometry=[t.lng,t.lat],this.params.geometryType=\"esriGeometryPoint\",this.params.spatialRel=\"esriSpatialRelIntersects\",this.params.units=\"esriSRUnit_Meter\",this.params.distance=i,this.params.inSr=4326,this},where:function(t){return this.params.where=t,this},between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},orderBy:function(t,e){return e=e||\"ASC\",this.params.orderByFields=this.params.orderByFields?this.params.orderByFields+\",\":\"\",this.params.orderByFields+=[t,e].join(\" \"),this},run:function(t,e){return this._cleanParams(),$.isArcgisOnline(this.options.url)?(this.params.f=\"geojson\",this.request(function(i,s){this._trapSQLerrors(i),t.call(e,i,s,s)},this)):this.request(function(i,s){this._trapSQLerrors(i),t.call(e,i,s&&$.responseToFeatureCollection(s),s)},this)},count:function(t,e){return this._cleanParams(),this.params.returnCountOnly=!0,this.request(function(e,i){t.call(this,e,i&&i.count,i)},e)},ids:function(t,e){return this._cleanParams(),this.params.returnIdsOnly=!0,this.request(function(e,i){t.call(this,e,i&&i.objectIds,i)},e)},bounds:function(t,e){return this._cleanParams(),this.params.returnExtentOnly=!0,this.request(function(i,s){t.call(e,i,s&&s.extent&&$.extentToBounds(s.extent),s)},e)},pixelSize:function(t){return t=e.point(t),this.params.pixelSize=[t.x,t.y],this},layer:function(t){return this.path=t+\"/query\",this},_trapSQLerrors:function(t){t&&\"400\"===t.code&&$.warn(\"one common syntax error in query requests is encasing string values in double quotes instead of single quotes\")},_cleanParams:function(){delete this.params.returnIdsOnly,delete this.params.returnExtentOnly,delete this.params.returnCountOnly},_setGeometry:function(t){return this.params.inSr=4326,t instanceof e.LatLngBounds?(this.params.geometry=$.boundsToExtent(t),void(this.params.geometryType=\"esriGeometryEnvelope\")):(t.getLatLng&&(t=t.getLatLng()),t instanceof e.LatLng&&(t={type:\"Point\",coordinates:[t.lng,t.lat]}),t instanceof e.GeoJSON&&(t=t.getLayers()[0].feature.geometry,this.params.geometry=$.geojsonToArcGIS(t),this.params.geometryType=$.geojsonTypeToArcGIS(t.type)),t.toGeoJSON&&(t=t.toGeoJSON()),\"Feature\"===t.type&&(t=t.geometry),\"Point\"===t.type||\"LineString\"===t.type||\"Polygon\"===t.type?(this.params.geometry=$.geojsonToArcGIS(t),void(this.params.geometryType=$.geojsonTypeToArcGIS(t.type))):void $.warn(\"invalid geometry passed to spatial query. Should be an L.LatLng, L.LatLngBounds or L.Marker or a GeoJSON Point Line or Polygon object\"))}}),rt=it.extend({setters:{contains:\"contains\",text:\"searchText\",fields:\"searchFields\",spatialReference:\"sr\",sr:\"sr\",layers:\"layers\",returnGeometry:\"returnGeometry\",maxAllowableOffset:\"maxAllowableOffset\",precision:\"geometryPrecision\",dynamicLayers:\"dynamicLayers\",returnZ:\"returnZ\",returnM:\"returnM\",gdbVersion:\"gdbVersion\",token:\"token\"},path:\"find\",params:{sr:4326,contains:!0,returnGeometry:!0,returnZ:!0,returnM:!1},layerDefs:function(t,e){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+\";\":\"\",this.params.layerDefs+=[t,e].join(\":\"),this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},run:function(t,e){return this.request(function(i,s){t.call(e,i,s&&$.responseToFeatureCollection(s),s)},e)}}),ot=it.extend({path:\"identify\",between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this}}),nt=ot.extend({setters:{layers:\"layers\",precision:\"geometryPrecision\",tolerance:\"tolerance\",returnGeometry:\"returnGeometry\"},params:{sr:4326,layers:\"all\",tolerance:3,returnGeometry:!0},on:function(t){var e=$.boundsToExtent(t.getBounds()),i=t.getSize();return this.params.imageDisplay=[i.x,i.y,96],this.params.mapExtent=[e.xmin,e.ymin,e.xmax,e.ymax],this},at:function(t){return t=e.latLng(t),this.params.geometry=[t.lng,t.lat],this.params.geometryType=\"esriGeometryPoint\",this},layerDef:function(t,e){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+\";\":\"\",this.params.layerDefs+=[t,e].join(\":\"),this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*(1-e),this},run:function(t,e){return this.request(function(i,s){if(i)return void t.call(e,i,void 0,s);var r=$.responseToFeatureCollection(s);s.results=s.results.reverse();for(var o=0;o=0;o--)r.catalogItems.features[o].properties.catalogItemVisibility=s[o];return r}}),lt=e.Evented.extend({options:{proxy:!1,useCors:K,timeout:0},initialize:function(t){t=t||{},this._requestQueue=[],this._authenticating=!1,e.Util.setOptions(this,t),this.options.url=L(this.options.url)},get:function(t,e,i,s){return this._request(\"get\",t,e,i,s)},post:function(t,e,i,s){return this._request(\"post\",t,e,i,s)},request:function(t,e,i,s){return this._request(\"request\",t,e,i,s)},metadata:function(t,e){return this._request(\"get\",\"\",{},t,e)},authenticate:function(t){return this._authenticating=!1,this.options.token=t,this._runQueue(),this},getTimeout:function(){return this.options.timeout},setTimeout:function(t){this.options.timeout=t},_request:function(t,e,i,s,r){this.fire(\"requeststart\",{url:this.options.url+e,params:i,method:t},!0);var o=this._createServiceCallback(t,e,i,s,r);if(this.options.token&&(i.token=this.options.token),this._authenticating)return void this._requestQueue.push([t,e,i,s,r]);var n=this.options.proxy?this.options.proxy+\"?\"+this.options.url+e:this.options.url+e;return\"get\"!==t&&\"request\"!==t||this.options.useCors?et[t](n,i,o,r):et.get.JSONP(n,i,o,r)},_createServiceCallback:function(t,i,s,r,o){return e.Util.bind(function(n,a){!n||499!==n.code&&498!==n.code||(this._authenticating=!0,this._requestQueue.push([t,i,s,r,o]),this.fire(\"authenticationrequired\",{authenticate:e.Util.bind(this.authenticate,this)},!0),n.authenticate=e.Util.bind(this.authenticate,this)),r.call(o,n,a),n?this.fire(\"requesterror\",{url:this.options.url+i,params:s,message:n.message,code:n.code,method:t},!0):this.fire(\"requestsuccess\",{url:this.options.url+i,params:s,response:a,method:t},!0),this.fire(\"requestend\",{url:this.options.url+i,params:s,method:t},!0)},this)},_runQueue:function(){for(var t=this._requestQueue.length-1;t>=0;t--){var e=this._requestQueue[t],i=e.shift();this[i].apply(this,e)}this._requestQueue=[]}}),ut=lt.extend({identify:function(){return G(this)},find:function(){return M(this)},query:function(){return k(this)}}),ht=lt.extend({query:function(){return k(this)},identify:function(){return q(this)}}),ct=lt.extend({options:{idAttribute:\"OBJECTID\"},query:function(){return k(this)},addFeature:function(t,e,i){return delete t.id,t=f(t),this.post(\"addFeatures\",{features:[t]},function(t,s){var r=s&&s.addResults?s.addResults[0]:void 0;e&&e.call(i,t||s.addResults[0].error,r)},i)},updateFeature:function(t,e,i){return t=f(t,this.options.idAttribute),this.post(\"updateFeatures\",{features:[t]},function(t,s){var r=s&&s.updateResults?s.updateResults[0]:void 0;e&&e.call(i,t||s.updateResults[0].error,r)},i)},deleteFeature:function(t,e,i){return this.post(\"deleteFeatures\",{objectIds:t},function(t,s){var r=s&&s.deleteResults?s.deleteResults[0]:void 0;e&&e.call(i,t||s.deleteResults[0].error,r)},i)},deleteFeatures:function(t,e,i){return this.post(\"deleteFeatures\",{objectIds:t},function(t,s){var r=s&&s.deleteResults?s.deleteResults:void 0;e&&e.call(i,t||s.deleteResults[0].error,r)},i)}}),pt=e.Control.extend({options:{position:\"bottomright\",marginTop:0,marginLeft:0,marginBottom:0,marginRight:0},onAdd:function(){var t=e.DomUtil.create(\"div\",\"esri-leaflet-logo\");return t.style.marginTop=this.options.marginTop,t.style.marginLeft=this.options.marginLeft,t.style.marginBottom=this.options.marginBottom,t.style.marginRight=this.options.marginRight,t.innerHTML='\"Powered',t}}),dt=\"https:\"!==window.location.protocol?\"http:\":\"https:\",mt=e.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}\",attributionUrl:\"https://static.arcgis.com/attribution/World_Street_Map\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:19,subdomains:[\"server\",\"services\"],attribution:\"Esri\"}},Topographic:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}\",attributionUrl:\"https://static.arcgis.com/attribution/World_Topo_Map\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:19,subdomains:[\"server\",\"services\"],attribution:\"Esri\"}},Oceans:{urlTemplate:dt+\"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}\",attributionUrl:\"https://static.arcgis.com/attribution/Ocean_Basemap\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],attribution:\"Esri\"}},OceansLabels:{urlTemplate:dt+\"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}},NationalGeographic:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],attribution:\"National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.\"}},DarkGray:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],attribution:\"Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors\"}},DarkGrayLabels:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}},Gray:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],attribution:\"Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors\"}},GrayLabels:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:16,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}},Imagery:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:19,subdomains:[\"server\",\"services\"],attribution:\"Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community\"}},ImageryLabels:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:19,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}},ImageryTransportation:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:19,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}},ShadedRelief:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:13,subdomains:[\"server\",\"services\"],attribution:\"Esri, USGS\"}},ShadedReliefLabels:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:12,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}},Terrain:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!1,logoPosition:\"bottomright\",minZoom:1,maxZoom:13,subdomains:[\"server\",\"services\"],attribution:\"Esri, USGS, NOAA\"}},TerrainLabels:{urlTemplate:dt+\"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}\",options:{hideLogo:!0,logoPosition:\"bottomright\",minZoom:1,maxZoom:13,subdomains:[\"server\",\"services\"],pane:V?\"esri-labels\":\"tilePane\"}}}},initialize:function(t,i){var s;if(\"object\"==typeof t&&t.urlTemplate&&t.options)s=t;else{if(\"string\"!=typeof t||!mt.TILES[t])throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of \"Streets\", \"Topographic\", \"Oceans\", \"OceansLabels\", \"NationalGeographic\", \"Gray\", \"GrayLabels\", \"DarkGray\", \"DarkGrayLabels\", \"Imagery\", \"ImageryLabels\", \"ImageryTransportation\", \"ShadedRelief\", \"ShadedReliefLabels\", \"Terrain\" or \"TerrainLabels\"');s=mt.TILES[t]}var r=e.Util.extend(s.options,i);e.Util.setOptions(this,r),e.TileLayer.prototype.initialize.call(this,s.urlTemplate,r),s.attributionUrl&&this._getAttributionData(s.attributionUrl),this._logo=z({position:this.options.logoPosition})},onAdd:function(t){this.options.hideLogo||t._hasEsriLogo||(this._logo.addTo(t),t._hasEsriLogo=!0),\"esri-labels\"===this.options.pane&&this._initPane(),t.on(\"moveend\",this._updateMapAttribution,this),e.TileLayer.prototype.onAdd.call(this,t)},onRemove:function(t){this._logo&&this._logo._container&&(t.removeControl(this._logo),t._hasEsriLogo=!1),t.off(\"moveend\",this._updateMapAttribution,this),e.TileLayer.prototype.onRemove.call(this,t)},getAttribution:function(){if(this.options.attribution)var t=''+this.options.attribution+\"\";return t},_initPane:function(){if(!this._map.getPane(this.options.pane)){var t=this._map.createPane(this.options.pane);t.style.pointerEvents=\"none\",t.style.zIndex=500}},_getAttributionData:function(t){O(t,{},e.Util.bind(function(t,i){if(!t){this._attributions=[];for(var s=0;s=r.minZoom&&i<=r.maxZoom&&(t+=\", \"+o)}t=t.substr(2);var n=this._map.attributionControl._container.querySelector(\".esri-attributions\");n.innerHTML=t,n.style.maxWidth=.65*this._map.getSize().x+\"px\",this.fire(\"attributionupdated\",{attribution:t})}}}),ft=e.TileLayer.extend({options:{zoomOffsetAllowance:.1},statics:{MercatorZoomLevels:{0:156543.033928,1:78271.5169639999,2:39135.7584820001,3:19567.8792409999,4:9783.93962049996,5:4891.96981024998,6:2445.98490512499,7:1222.99245256249,8:611.49622628138,9:305.748113140558,10:152.874056570411,11:76.4370282850732,12:38.2185141425366,13:19.1092570712683,14:9.55462853563415,15:4.77731426794937,16:2.38865713397468,17:1.19432856685505,18:.597164283559817,19:.298582141647617,20:.14929107082381,21:.07464553541191,22:.0373227677059525,23:.0186613838529763}},initialize:function(t){t.url=L(t.url),t=e.Util.setOptions(this,t),this.tileUrl=t.url+\"tile/{z}/{y}/{x}\",this.service=U(t),this.service.addEventParent(this);var i=new RegExp(/tiles.arcgis(online)?\\.com/g);i.test(t.url)&&(this.tileUrl=this.tileUrl.replace(\"://tiles\",\"://tiles{s}\"),t.subdomains=[\"1\",\"2\",\"3\",\"4\"]),this.options.token&&(this.tileUrl+=\"?token=\"+this.options.token),e.TileLayer.prototype.initialize.call(this,this.tileUrl,t)},getTileUrl:function(t){return e.Util.template(this.tileUrl,e.extend({s:this._getSubdomain(t),z:this._lodMap&&this._lodMap[t.z]?this._lodMap[t.z]:t.z,x:t.x,y:t.y},this.options))},createTile:function(t,i){var s=document.createElement(\"img\");return e.DomEvent.on(s,\"load\",e.bind(this._tileOnLoad,this,i,s)),e.DomEvent.on(s,\"error\",e.bind(this._tileOnError,this,i,s)),this.options.crossOrigin&&(s.crossOrigin=\"\"),s.alt=\"\",!this._lodMap||this._lodMap&&this._lodMap[t.z]?s.src=this.getTileUrl(t):this.once(\"lodmap\",function(){s.src=this.getTileUrl(t)},this),s},onAdd:function(t){t.options.crs!==e.CRS.EPSG3857||this._lodMap||(this._lodMap={},this.metadata(function(t,e){if(!t){var i=e.spatialReference.latestWkid||e.spatialReference.wkid;if(102100===i||3857===i){for(var s=e.tileInfo.lods,r=ft.MercatorZoomLevels,o=0;os}}),gt=e.ImageOverlay.extend({onAdd:function(t){this._topLeft=t.getPixelBounds().min,e.ImageOverlay.prototype.onAdd.call(this,t)},_reset:function(){this._map.options.crs===e.CRS.EPSG3857?e.ImageOverlay.prototype._reset.call(this):e.DomUtil.setPosition(this._image,this._topLeft.subtract(this._map.getPixelOrigin()))}}),yt=e.Layer.extend({options:{opacity:1,position:\"front\",f:\"image\",useCors:K,attribution:null,interactive:!1,alt:\"\"},onAdd:function(t){this._update=e.Util.throttle(this._update,this.options.updateInterval,this),t.on(\"moveend\",this._update,this),this._currentImage&&this._currentImage._bounds.equals(this._map.getBounds())?t.addLayer(this._currentImage):this._currentImage&&(this._map.removeLayer(this._currentImage),this._currentImage=null),this._update(),this._popup&&(this._map.on(\"click\",this._getPopupData,this),this._map.on(\"dblclick\",this._resetPopupState,this))},onRemove:function(t){this._currentImage&&this._map.removeLayer(this._currentImage),this._popup&&(this._map.off(\"click\",this._getPopupData,this),this._map.off(\"dblclick\",this._resetPopupState,this)),this._map.off(\"moveend\",this._update,this)},bindPopup:function(t,i){return this._shouldRenderPopup=!1,this._lastClick=!1,this._popup=e.popup(i),this._popupFunction=t,this._map&&(this._map.on(\"click\",this._getPopupData,this),this._map.on(\"dblclick\",this._resetPopupState,this)),this},unbindPopup:function(){return this._map&&(this._map.closePopup(this._popup),this._map.off(\"click\",this._getPopupData,this),this._map.off(\"dblclick\",this._resetPopupState,this)),this._popup=!1,this},bringToFront:function(){return this.options.position=\"front\",this._currentImage&&this._currentImage.bringToFront(),this},bringToBack:function(){return this.options.position=\"back\",this._currentImage&&this._currentImage.bringToBack(),this},getAttribution:function(){return this.options.attribution},getOpacity:function(){return this.options.opacity},setOpacity:function(t){return this.options.opacity=t,this._currentImage.setOpacity(t),this},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(t,e){return this.options.from=t,this.options.to=e,this._update(),this},metadata:function(t,e){return this.service.metadata(t,e),this},authenticate:function(t){return this.service.authenticate(t),this},_renderImage:function(t,e){if(this._map){var i=new gt(t,e,{opacity:0,crossOrigin:this.options.useCors,\nalt:this.options.alt,pane:this.options.pane||this.getPane(),interactive:this.options.interactive}).addTo(this._map);i.once(\"load\",function(t){if(this._map){var i=t.target,s=this._currentImage;i._bounds.equals(e)&&i._bounds.equals(this._map.getBounds())?(this._currentImage=i,\"front\"===this.options.position?this.bringToFront():this.bringToBack(),this._map&&this._currentImage._map?this._currentImage.setOpacity(this.options.opacity):this._currentImage._map.removeLayer(this._currentImage),s&&this._map&&this._map.removeLayer(s),s&&s._map&&s._map.removeLayer(s)):this._map.removeLayer(i)}this.fire(\"load\",{bounds:e})},this),this.fire(\"loading\",{bounds:e})}},_update:function(){if(this._map){var t=this._map.getZoom(),e=this._map.getBounds();if(!(this._animatingZoom||this._map._panTransition&&this._map._panTransition._inProgress)){if(t>this.options.maxZoom||t0||n.ys;s++)this._addCell(o[s])},_isValidCell:function(t){var i=this._map.options.crs;if(!i.infinite){var s=this._cellNumBounds;if(!i.wrapLng&&(t.xs.max.x)||!i.wrapLat&&(t.ys.max.y))return!1}if(!this.options.bounds)return!0;var r=this._cellCoordsToBounds(t);return e.latLngBounds(this.options.bounds).intersects(r)},_cellCoordsToBounds:function(t){var i=this._map,s=this.options.cellSize,r=t.multiplyBy(s),o=r.add([s,s]),n=i.wrapLatLng(i.unproject(r,t.z)),a=i.wrapLatLng(i.unproject(o,t.z));return e.latLngBounds(n,a)},_cellCoordsToKey:function(t){return t.x+\":\"+t.y},_keyToCellCoords:function(t){var i=t.split(\":\"),s=parseInt(i[0],10),r=parseInt(i[1],10);return e.point(s,r)},_removeOtherCells:function(t){for(var e in this._cells)t.contains(this._keyToCellCoords(e))||this._removeCell(e)},_removeCell:function(t){var e=this._activeCells[t];e&&(delete this._activeCells[t],this.cellLeave&&this.cellLeave(e.bounds,e.coords),this.fire(\"cellleave\",{bounds:e.bounds,coords:e.coords}))},_removeCells:function(){for(var t in this._cells){var e=this._cells[t].bounds,i=this._cells[t].coords;this.cellLeave&&this.cellLeave(e,i),this.fire(\"cellleave\",{bounds:e,coords:i})}},_addCell:function(t){this._wrapCoords(t);var e=this._cellCoordsToKey(t),i=this._cells[e];i&&!this._activeCells[e]&&(this.cellEnter&&this.cellEnter(i.bounds,t),this.fire(\"cellenter\",{bounds:i.bounds,coords:t}),this._activeCells[e]=i),i||(i={coords:t,bounds:this._cellCoordsToBounds(t)},this._cells[e]=i,this._activeCells[e]=i,this.createCell&&this.createCell(i.bounds,t),this.fire(\"cellcreate\",{bounds:i.bounds,coords:t}))},_wrapCoords:function(t){t.x=this._wrapLng?e.Util.wrapNum(t.x,this._wrapLng):t.x,t.y=this._wrapLat?e.Util.wrapNum(t.y,this._wrapLat):t.y},_getCellNumBounds:function(){var t=this._map.getPixelWorldBounds(),i=this._getCellSize();return t?e.bounds(t.min.divideBy(i).floor(),t.max.divideBy(i).ceil().subtract([1,1])):null}});J.prototype.query=function(t){var e=this.getIndex(t);return this.values[e]},J.prototype.getIndex=function(t){this.dirty&&this.sort();for(var e,i,s=0,r=this.values.length-1;r>=s;)if(e=(s+r)/2|0,i=this.values[Math.round(e)],+i.value<+t)s=e+1;else{if(!(+i.value>+t))return e;r=e-1}return Math.abs(~r)},J.prototype.between=function(t,e){var i=this.getIndex(t),s=this.getIndex(e);if(0===i&&0===s)return[];for(;this.values[i-1]&&this.values[i-1].value===t;)i--;for(;this.values[s+1]&&this.values[s+1].value===e;)s++;return this.values[s]&&this.values[s].value===e&&this.values[s+1]&&s++,this.values.slice(i,s)},J.prototype.insert=function(t){return this.values.splice(this.getIndex(t.value),0,t),this},J.prototype.bulkAdd=function(t,e){return this.values=this.values.concat([].concat(t||[])),e?this.sort():this.dirty=!0,this},J.prototype.sort=function(){return this.values.sort(function(t,e){return+e.value-+t.value}).reverse(),this.dirty=!1,this};var Lt=bt.extend({options:{attribution:null,where:\"1=1\",fields:[\"*\"],from:!1,to:!1,timeField:!1,timeFilterMode:\"server\",simplifyFactor:0,precision:6},initialize:function(t){if(bt.prototype.initialize.call(this,t),t.url=L(t.url),t=e.setOptions(this,t),this.service=B(t),this.service.addEventParent(this),\"*\"!==this.options.fields[0]){for(var i=!1,s=0;s=0;s--){var r=t[s].id;this._currentSnapshot.push(r),this._cache[i].push(r)}this.options.timeField&&this._buildTimeIndexes(t),this.createLayers(t)},_buildQuery:function(t){var e=this.service.query().intersects(t).where(this.options.where).fields(this.options.fields).precision(this.options.precision);return this.options.simplifyFactor&&e.simplify(this._map,this.options.simplifyFactor),\"server\"===this.options.timeFilterMode&&this.options.from&&this.options.to&&e.between(this.options.from,this.options.to),e},setWhere:function(t,i,s){this.options.where=t&&t.length?t:\"1=1\";for(var r=[],o=[],n=0,a=null,l=e.Util.bind(function(t,l){if(t&&(a=t),l)for(var u=l.features.length-1;u>=0;u--)o.push(l.features[u].id);n--,0>=n&&(this._currentSnapshot=o,e.Util.requestAnimFrame(e.Util.bind(function(){this.removeLayers(r),this.addLayers(o),i&&i.call(s,a)},this)))},this),u=this._currentSnapshot.length-1;u>=0;u--)r.push(this._currentSnapshot[u]);for(var h in this._activeCells){n++;var c=this._keyToCellCoords(h),p=this._cellCoordsToBounds(c);this._requestFeatures(p,h,l)}return this},getWhere:function(){return this.options.where},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(t,i,s,r){var o=this.options.from,n=this.options.to,a=0,l=null,u=e.Util.bind(function(e){e&&(l=e),this._filterExistingFeatures(o,n,t,i),a--,s&&0>=a&&s.call(r,l)},this);if(this.options.from=t,this.options.to=i,this._filterExistingFeatures(o,n,t,i),\"server\"===this.options.timeFilterMode)for(var h in this._activeCells){a++;var c=this._keyToCellCoords(h),p=this._cellCoordsToBounds(c);this._requestFeatures(p,h,u)}return this},refresh:function(){for(var t in this._activeCells){var e=this._keyToCellCoords(t),i=this._cellCoordsToBounds(e);this._requestFeatures(i,t)}this.redraw&&this.once(\"load\",function(){this.eachFeature(function(t){this._redraw(t.feature.id)},this)},this)},_filterExistingFeatures:function(t,i,s,r){var o=t&&i?this._getFeaturesInTimeRange(t,i):this._currentSnapshot,n=this._getFeaturesInTimeRange(s,r);if(n.indexOf)for(var a=0;a=0&&o.splice(l,1)}e.Util.requestAnimFrame(e.Util.bind(function(){this.removeLayers(o),this.addLayers(n)},this))},_getFeaturesInTimeRange:function(t,e){var i,s=[];if(this.options.timeField.start&&this.options.timeField.end){var r=this._startTimeIndex.between(t,e),o=this._endTimeIndex.between(t,e);i=r.concat(o)}else i=this._timeIndex.between(t,e);for(var n=i.length-1;n>=0;n--)s.push(i[n].id);return s},_buildTimeIndexes:function(t){var e,i;if(this.options.timeField.start&&this.options.timeField.end){var s=[],r=[];for(e=t.length-1;e>=0;e--)i=t[e],s.push({id:i.id,value:new Date(i.properties[this.options.timeField.start])}),r.push({id:i.id,value:new Date(i.properties[this.options.timeField.end])});this._startTimeIndex.bulkAdd(s),this._endTimeIndex.bulkAdd(r)}else{var o=[];for(e=t.length-1;e>=0;e--)i=t[e],o.push({id:i.id,value:new Date(i.properties[this.options.timeField])});this._timeIndex.bulkAdd(o)}},_featureWithinTimeRange:function(t){if(!this.options.from||!this.options.to)return!0;var e=+this.options.from.valueOf(),i=+this.options.to.valueOf();if(\"string\"==typeof this.options.timeField){var s=+t.properties[this.options.timeField];return s>=e&&i>=s}if(this.options.timeField.start&&this.options.timeField.end){var r=+t.properties[this.options.timeField.start],o=+t.properties[this.options.timeField.end];return r>=e&&i>=r||o>=e&&i>=o}},_visibleZoom:function(){if(!this._map)return!1;var t=this._map.getZoom();return!(t>this.options.maxZoom||t0)for(var r=0;r=0;e--){var i,s=t[e],r=this._layers[s.id];this._visibleZoom()&&r&&!this._map.hasLayer(r)&&this._map.addLayer(r),r&&this.options.simplifyFactor>0&&(r.setLatLngs||r.setLatLng)&&this._updateLayer(r,s),r||(i=this.createNewLayer(s),i.feature=s,i.addEventParent(this),this.options.onEachFeature&&this.options.onEachFeature(i.feature,i),this._layers[i.feature.id]=i,this.setFeatureStyle(i.feature.id,this.options.style),this.fire(\"createfeature\",{feature:i.feature},!0),this._visibleZoom()&&(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(s))&&this._map.addLayer(i))}},addLayers:function(t){for(var e=t.length-1;e>=0;e--){var i=this._layers[t[e]];i&&(this.fire(\"addfeature\",{feature:i.feature},!0),this._map.addLayer(i))}},removeLayers:function(t,e){for(var i=t.length-1;i>=0;i--){var s=t[i],r=this._layers[s];r&&(this.fire(\"removefeature\",{feature:r.feature,permanent:e},!0),this._map.removeLayer(r)),r&&e&&delete this._layers[s]}},cellEnter:function(t,i){!this._zooming&&this._map&&e.Util.requestAnimFrame(e.Util.bind(function(){var t=this._cacheKey(i),e=this._cellCoordsToKey(i),s=this._cache[t];this._activeCells[e]&&s&&this.addLayers(s)},this))},cellLeave:function(t,i){this._zooming||e.Util.requestAnimFrame(e.Util.bind(function(){if(this._map){var t=this._cacheKey(i),e=this._cellCoordsToKey(i),s=this._cache[t],r=this._map.getBounds();if(!this._activeCells[e]&&s){for(var o=!0,n=0;nc)&&(l=c,n(s,c)&&(l/=40)),n(s,c)&&(r/=40,f/=40,d/=40),r=Math[r>=1?\"floor\":\"ceil\"](r/l),f=Math[f>=1?\"floor\":\"ceil\"](f/l),d=Math[d>=1?\"floor\":\"ceil\"](d/l),u.settings.normalizeOffset&&this.getBoundingClientRect){var p=this.getBoundingClientRect();m=t.clientX-p.left,g=t.clientY-p.top}return t.deltaX=f,t.deltaY=d,t.deltaFactor=l,t.offsetX=m,t.offsetY=g,t.deltaMode=0,a.unshift(t,r,f,d),o&&clearTimeout(o),o=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function i(){l=null}function n(e,t){return u.settings.adjustOldDeltas&&\"mousewheel\"===e.type&&t%120===0}var o,l,s=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],a=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],h=Array.prototype.slice;if(e.event.fixHooks)for(var r=s.length;r;)e.event.fixHooks[s[--r]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:\"3.1.12\",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],t,!1);else this.onmousewheel=t;e.data(this,\"mousewheel-line-height\",u.getLineHeight(this)),e.data(this,\"mousewheel-page-height\",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],t,!1);else this.onmousewheel=null;e.removeData(this,\"mousewheel-line-height\"),e.removeData(this,\"mousewheel-page-height\")},getLineHeight:function(t){var i=e(t),n=i[\"offsetParent\"in e.fn?\"offsetParent\":\"parent\"]();return n.length||(n=e(\"body\")),parseInt(n.css(\"fontSize\"),10)||parseInt(i.css(\"fontSize\"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind(\"mousewheel\",e):this.trigger(\"mousewheel\")},unmousewheel:function(e){return this.unbind(\"mousewheel\",e)}})});\n},{}],37:[function(require,module,exports){\n\"use strict\";!function(t){var a,e,r,i,n,l,_,d,o,s={getSliderValuesAtPositionPx:function(t,a){var e,r,i=this,n=i.data(\"pixel_to_value_mapping\");if(\"undefined\"!=typeof n)e=n(t),r=n(a);else{var l=s.getSliderWidthPx.call(i)-i.data(\"left_grip_width\");e=s.inverse_rangemap_0_to_n.call(i,t,l),r=s.inverse_rangemap_0_to_n.call(i,a,l)}return[e,r]},validateAndMoveGripsToPx:function(t,a){var e=this,r=s.getSliderWidthPx.call(e)-e.data(\"left_grip_width\");if(r>=a&&t>=0&&r>=t&&(!e.data(\"has_right_grip\")||a>=t)){var i=e.data(\"cur_min\"),n=e.data(\"cur_max\");s.set_position_from_px.call(e,t,a),s.refresh_grips_style.call(e),s.notify_changed_implicit.call(e,\"drag_move\",i,n)}return e},updateAriaAttributes:function(){var t=this,a=t.data(\"settings\"),e=t.find(a.left_grip_selector);if(t.data(\"has_right_grip\")){var r=t.find(a.right_grip_selector);e.attr(\"aria-valuemin\",t.data(\"range_min\")).attr(\"aria-valuenow\",c.get_current_min_value.call(t)).attr(\"aria-valuemax\",c.get_current_max_value.call(t)),r.attr(\"aria-valuemin\",c.get_current_min_value.call(t)).attr(\"aria-valuenow\",c.get_current_max_value.call(t)).attr(\"aria-valuemax\",t.data(\"range_max\"))}else e.attr(\"aria-valuemin\",t.data(\"range_min\")).attr(\"aria-valuenow\",c.get_current_min_value.call(t)).attr(\"aria-valuemax\",t.data(\"range_max\"));return t},getSliderWidthPx:function(){var t=this;return Math.round(t.width())},getGripPositionPx:function(t){return parseInt(t.css(\"left\").replace(\"px\",\"\"),10)},getLeftGripPositionPx:function(){var t=this,a=t.data(\"settings\"),e=t.find(a.left_grip_selector);return s.getGripPositionPx.call(t,e)},getRightGripPositionPx:function(){var t=this,a=t.data(\"settings\");if(t.data(\"has_right_grip\"))return s.getGripPositionPx.call(t,t.find(a.right_grip_selector));var e=s.getSliderWidthPx.call(t)-t.data(\"left_grip_width\");return s.rangemap_0_to_n.call(t,t.data(\"cur_max\"),e)},getLeftGripWidth:function(){var t=this,a=t.data(\"settings\"),e=t.find(a.left_grip_selector);return Math.round(e.width())},getRightGripWidth:function(){var t=this,a=t.data(\"settings\"),e=t.find(a.right_grip_selector);return Math.round(e.width())},binarySearch:function(t,a,e,r){for(var i,n,l=0,_=t.length-1;_>=l;){i=(l+_)/2|0,n=e(t,i);var d=r(a,t,i);if(d>0)l=i+1;else{if(!(0>d))return i;_=i-1}}return-1},haveLimits:function(){var t=this,a=t.data(\"lower-limit\"),e=t.data(\"upper-limit\"),r=!1;return\"undefined\"!=typeof a&&\"undefined\"!=typeof e&&(r=!0),r},refresh_grips_style:function(){var t=this,a=t.data(\"settings\");if(\"undefined\"!=typeof a.highlight){var e=t.data(\"highlightedRangeMin\");if(\"undefined\"!=typeof e){var r=t.find(a.left_grip_selector),i=t.find(a.right_grip_selector),n=t.data(\"highlightedRangeMax\"),l=t.data(\"cur_min\"),_=t.data(\"cur_max\"),d=a.highlight.grip_class;e>l||l>n?r.removeClass(d):r.addClass(d),e>_||_>n?i.removeClass(d):i.addClass(d)}}},set_position_from_val:function(t,a){var e=this,r=e.data(\"range_min\"),i=e.data(\"range_max\");r>t&&(t=r),t>i&&(t=i),e.data(\"has_right_grip\")?(a>i&&(a=i),r>a&&(a=r)):a=e.data(\"cur_max\");var n,l,_=e.data(\"value_to_pixel_mapping\");if(\"undefined\"!=typeof _)n=_(t),l=_(a);else{var d=s.getSliderWidthPx.call(e)-e.data(\"left_grip_width\");n=s.rangemap_0_to_n.call(e,t,d),l=s.rangemap_0_to_n.call(e,a,d)}return s.set_handles_at_px.call(e,n,l),e.data(\"cur_min\",t),e.data(\"has_right_grip\")&&e.data(\"cur_max\",a),e},set_position_from_px:function(t,a){var e=this;s.set_handles_at_px.call(e,t,a);var r=s.getSliderValuesAtPositionPx.call(e,t,a),i=r[0],n=r[1];return e.data(\"cur_min\",i),e.data(\"has_right_grip\")&&e.data(\"cur_max\",n),e},set_handles_at_px:function(t,a){var e=this,r=e.data(\"settings\"),i=r.left_grip_selector,n=r.right_grip_selector,l=r.value_bar_selector,_=e.data(\"left_grip_width\"),d=_/2;return e.data(\"has_right_grip\")?(e.find(l).css(\"left\",t+d+\"px\").css(\"width\",a-t+d+\"px\"),e.find(i).css(\"left\",t+\"px\")):(a>t?e.find(l).css(\"left\",t+d+\"px\").css(\"width\",a-t+d+\"px\"):e.find(l).css(\"left\",a+d+\"px\").css(\"width\",t-a+d+\"px\"),e.find(i).css(\"left\",t+\"px\")),e.find(n).css(\"left\",a+\"px\"),e},drag_start_func_touch:function(t,a,e,i,n){var l=this,_=t.originalEvent,d=_.touches[0],o=d.pageY,c=d.pageX,u=Math.abs(l.offset().top-o),g=l.offset().left,f=g-c,h=c-(g+l.width());u>a.touch_tolerance_value_bar_y||f>a.touch_tolerance_value_bar_x||h>a.touch_tolerance_value_bar_x||(_.preventDefault(),r=d.pageX,s.drag_start_func.call(l,d,a,e,i,n))},drag_start_func:function(r,i,l,_,d){var o=this;if(o.find(i.left_grip_selector+\",\"+i.value_bar_selector+\",\"+i.right_grip_selector).removeClass(i.animating_css_class),c.is_enabled.call(o)){var u=t(r.target),g=!1;if(\"object\"==typeof i.highlight&&(g=u.is(i.highlight.panel_selector)),d!==!1||u.is(i.left_grip_selector)||u.is(i.right_grip_selector)||u.is(i.value_bar_selector)||g||u.is(o)){a=o;var f,h,p,v,m,x,b=s.getGripPositionPx.call(o,l),y=s.getSliderWidthPx.call(o)-o.data(\"left_grip_width\"),P=l.offset().left,w=s.getRightGripPositionPx.call(o);h=r.pageX-o.data(\"left_grip_width\")/2,p=Math.abs(P-h),m=h-P,o.data(\"has_right_grip\")?(f=_.offset().left,v=Math.abs(f-h),x=h-f):(v=2*p,x=2*m),i.user_drag_start_callback.call(o,r),p===v?P>h?(b+=m,n=!0):(w+=x,n=!1):v>p?(b+=m,n=!0):(w+=x,n=!1),o.data(\"has_right_grip\")?w>y&&(w=y):b>y&&(b=y),0>b&&(b=0),e=!0;var S=o.data(\"cur_min\"),G=o.data(\"cur_max\");s.set_position_from_px.call(o,b,w),s.refresh_grips_style.call(o),s.notify_changed_implicit.call(o,\"drag_start\",S,G)}}},drag_move_func_touch:function(t){if(e===!0){var a=t.originalEvent;a.preventDefault();var r=a.touches[0];s.drag_move_func(r)}},drag_move_func:function(t){if(e){var i=a,l=s.getSliderWidthPx.call(i)-i.data(\"left_grip_width\"),_=s.getLeftGripPositionPx.call(i),d=s.getRightGripPositionPx.call(i),o=t.pageX,c=o-r,u=i.offset().left+i.data(\"left_grip_width\"),g=u+l,f=0,h=0;u>o&&(f=1,h=0),o>g&&(h=1,f=0),i.data(\"has_right_grip\")&&(n?l>=d&&_+c>d&&(n=!1,_=d):_>=0&&_>d+c&&(n=!0,d=_));var p=_,v=d;(c>0&&!f||0>c&&!h)&&(n?p+=c:v+=c),s.validateAndMoveGripsToPx.call(i,p,v),r=o}},drag_end_func_touch:function(t){var a=t.originalEvent;a.preventDefault();var e=a.touches[0];s.drag_end_func(e)},drag_end_func:function(){var t=a;if(\"undefined\"!=typeof t){e=!1,r=void 0,s.notify_mouse_up_implicit.call(t,n),a=void 0;var i=t.data(\"settings\");t.find(i.left_grip_selector+\",\"+i.value_bar_selector+\",\"+i.right_grip_selector).addClass(i.animating_css_class)}},get_rounding_for_value:function(t){var a=this,e=a.data(\"rounding\"),r=a.data(\"rounding_ranges\");if(\"object\"==typeof r){var i=s.binarySearch.call(a,r,t,function(t,a){return t[a].range},function(t,a,e){return t0?t>=a[e-1].range?0:-1:0:1});if(e=1,i>-1)e=parseInt(r[i].value,10);else{var n=r.length-1;t>=r[n].range&&(e=r[n].value)}}return e},notify_mouse_up_implicit:function(t){var a=this,e=c.get_current_min_value.call(a),r=c.get_current_max_value.call(a),n=!1;return(a.data(\"beforestart_min\")!==e||a.data(\"beforestart_max\")!==r)&&(n=!0,a.data(\"beforestart_min\",e),a.data(\"beforestart_max\",r)),i.call(a,c.get_current_min_value.call(a),c.get_current_max_value.call(a),t,n),a},notify_changed_implicit:function(t,a,e){var r=this,i=!1;(\"init\"===t||\"refresh\"===t)&&(i=!0);var n=c.get_current_min_value.call(r),l=c.get_current_max_value.call(r);return i||(a=c.round_value_according_to_rounding.call(r,a),e=c.round_value_according_to_rounding.call(r,e)),(i||n!==a||l!==e)&&(s.notify_changed_explicit.call(r,t,a,e,n,l),i=1),i},notify_changed_explicit:function(t,a,e,r,i){var n=this,l=n.data(\"settings\");return n.data(\"aria_enabled\")&&s.updateAriaAttributes.call(n),l.value_changed_callback.call(n,t,r,i,a,e),n},validate_params:function(a){var e=this,r=e.data(\"range_min\"),i=e.data(\"range_max\"),n=e.data(\"cur_min\"),l=e.data(\"lower-limit\"),_=e.data(\"upper-limit\"),d=s.haveLimits.call(e);\"undefined\"==typeof r&&t.error(\"the data-range_min attribute was not defined\"),\"undefined\"==typeof i&&t.error(\"the data-range_max attribute was not defined\"),\"undefined\"==typeof n&&t.error(\"the data-cur_min attribute must be defined\"),r>i&&t.error(\"Invalid input parameter. must be min < max\"),d&&l>_&&t.error(\"Invalid data-lower-limit or data-upper-limit\"),0===e.find(a.left_grip_selector).length&&t.error(\"Cannot find element pointed by left_grip_selector: \"+a.left_grip_selector),\"undefined\"!=typeof a.right_grip_selector&&0===e.find(a.right_grip_selector).length&&t.error(\"Cannot find element pointed by right_grip_selector: \"+a.right_grip_selector),\"undefined\"!=typeof a.value_bar_selector&&0===e.find(a.value_bar_selector).length&&t.error(\"Cannot find element pointed by value_bar_selector\"+a.value_bar_selector)},rangemap_0_to_n:function(t,a){var e=this,r=e.data(\"range_min\"),i=e.data(\"range_max\");return r>=t?0:t>=i?a:Math.floor((a*t-a*r)/(i-r))},inverse_rangemap_0_to_n:function(t,a){var e=this,r=e.data(\"range_min\"),i=e.data(\"range_max\");if(0>=t)return r;if(t>=a)return i;var n=(i-r)*t/a;return n+r}},c={teardown:function(){var a=this;return a.removeData(),t(document).unbind(\"mousemove.nstSlider\").unbind(\"mouseup.nstSlider\"),a.parent().unbind(\"mousedown.nstSlider\").unbind(\"touchstart.nstSlider\").unbind(\"touchmove.nstSlider\").unbind(\"touchend.nstSlider\"),a.unbind(\"keydown.nstSlider\").unbind(\"keyup.nstSlider\"),a},init:function(a){var e=t.extend({animating_css_class:\"nst-animating\",touch_tolerance_value_bar_y:30,touch_tolerance_value_bar_x:15,left_grip_selector:\".nst-slider-grip-left\",right_grip_selector:void 0,highlight:void 0,rounding:void 0,value_bar_selector:void 0,value_changed_callback:function(){},user_mouseup_callback:function(){},user_drag_start_callback:function(){}},a),r=t(document);return r.unbind(\"mouseup.nstSlider\"),r.unbind(\"mousemove.nstSlider\"),r.bind(\"mousemove.nstSlider\",s.drag_move_func),r.bind(\"mouseup.nstSlider\",s.drag_end_func),i=e.user_mouseup_callback,this.each(function(){var a=t(this),r=a.parent();a.data(\"enabled\",!0);var i=a.data(\"range_min\"),u=a.data(\"range_max\"),g=a.data(\"cur_min\"),f=a.data(\"cur_max\");\"undefined\"==typeof f&&(f=g),\"\"===i&&(i=0),\"\"===u&&(u=0),\"\"===g&&(g=0),\"\"===f&&(f=0),a.data(\"range_min\",i),a.data(\"range_max\",u),a.data(\"cur_min\",g),a.data(\"cur_max\",f),s.validate_params.call(a,e),a.data(\"settings\",e),\"undefined\"!=typeof e.rounding?c.set_rounding.call(a,e.rounding):\"undefined\"!=typeof a.data(\"rounding\")?c.set_rounding.call(a,a.data(\"rounding\")):c.set_rounding.call(a,1);var h=a.find(e.left_grip_selector)[0],p=t(h),v=t(a.find(e.right_grip_selector)[0]);\"undefined\"==typeof p.attr(\"tabindex\")&&p.attr(\"tabindex\",0);var m=!1;a.find(e.right_grip_selector).length>0&&(m=!0,\"undefined\"==typeof v.attr(\"tabindex\")&&v.attr(\"tabindex\",0)),a.data(\"has_right_grip\",m),a.data(\"aria_enabled\")===!0&&(p.attr(\"role\",\"slider\").attr(\"aria-disabled\",\"false\"),m&&v.attr(\"role\",\"slider\").attr(\"aria-disabled\",\"false\")),a.bind(\"keyup.nstSlider\",function(t){if(a.data(\"enabled\")){switch(t.which){case 37:case 38:case 39:case 40:if(l===d){var e,r,i,u=s.getSliderWidthPx.call(a);if(0>_-o){for(r=o;u>=r;r++)if(e=c.round_value_according_to_rounding.call(a,s.getSliderValuesAtPositionPx.call(a,r,r)[1]),e!==d){i=r;break}}else for(r=o;r>=0;r--)if(e=c.round_value_according_to_rounding.call(a,s.getSliderValuesAtPositionPx.call(a,r,r)[1]),e!==d){i=r;break}n?s.validateAndMoveGripsToPx.call(a,i,s.getRightGripPositionPx.call(a)):s.validateAndMoveGripsToPx.call(a,s.getLeftGripPositionPx.call(a),i),s.notify_mouse_up_implicit.call(a,n)}}l=void 0,_=void 0,d=void 0,o=void 0}}),a.bind(\"keydown.nstSlider\",function(t){if(a.data(\"enabled\")){var e=function(t,e){var r=s.getLeftGripPositionPx.call(a),i=s.getRightGripPositionPx.call(a);switch(\"undefined\"==typeof l&&(_=n?r:i,l=n?c.get_current_min_value.call(a):c.get_current_max_value.call(a)),e.which){case 37:case 40:n?r--:i--,e.preventDefault();break;case 38:case 39:n?r++:i++,e.preventDefault()}o=n?r:i,s.validateAndMoveGripsToPx.call(a,r,i),d=n?c.get_current_min_value.call(a):c.get_current_max_value.call(a)};m&&a.find(\":focus\").is(v)?(n=!1,e.call(a,v,t)):(n=!0,e.call(a,p,t))}});var x=s.getLeftGripWidth.call(a),b=m?s.getRightGripWidth.call(a):x;a.data(\"left_grip_width\",x),a.data(\"right_grip_width\",b),a.data(\"value_bar_selector\",e.value_bar_selector),i===u||g===f?c.set_range.call(a,i,u):s.set_position_from_val.call(a,a.data(\"cur_min\"),a.data(\"cur_max\")),s.notify_changed_implicit.call(a,\"init\"),a.data(\"beforestart_min\",c.get_current_min_value.call(a)),a.data(\"beforestart_max\",c.get_current_max_value.call(a)),r.bind(\"mousedown.nstSlider\",function(t){s.drag_start_func.call(a,t,e,p,v,!1)}),r.bind(\"touchstart.nstSlider\",function(t){s.drag_start_func_touch.call(a,t,e,p,v,!0)}),r.bind(\"touchend.nstSlider\",function(t){s.drag_end_func_touch.call(a,t)}),r.bind(\"touchmove.nstSlider\",function(t){s.drag_move_func_touch.call(a,t)});var y=a.data(\"histogram\");\"undefined\"!=typeof y&&c.set_step_histogram.call(a,y)})},get_range_min:function(){var t=this;return t.data(\"range_min\")},get_range_max:function(){var t=this;return t.data(\"range_max\")},get_current_min_value:function(){var a,e=t(this),r=c.get_range_min.call(e),i=c.get_range_max.call(e),n=e.data(\"cur_min\");if(a=r>=n?r:c.round_value_according_to_rounding.call(e,n),s.haveLimits.call(e)){if(r>=a)return e.data(\"lower-limit\");if(a>=i)return e.data(\"upper-limit\")}else{if(r>=a)return r;if(a>=i)return i}return a},get_current_max_value:function(){var a,e=t(this),r=c.get_range_min.call(e),i=c.get_range_max.call(e),n=e.data(\"cur_max\");if(a=n>=i?i:c.round_value_according_to_rounding.call(e,n),s.haveLimits.call(e)){if(a>=i)return e.data(\"upper-limit\");if(r>=a)return e.data(\"lower-limit\")}else{if(a>=i)return i;if(r>=a)return r}return a},is_handle_to_left_extreme:function(){var t=this;return s.haveLimits.call(t)?t.data(\"lower-limit\")===c.get_current_min_value.call(t):c.get_range_min.call(t)===c.get_current_min_value.call(t)},is_handle_to_right_extreme:function(){var t=this;return s.haveLimits.call(t)?t.data(\"upper-limit\")===c.get_current_max_value.call(t):c.get_range_max.call(t)===c.get_current_max_value.call(t)},refresh:function(){var t=this,a=t.data(\"last_step_histogram\");return\"undefined\"!=typeof a&&c.set_step_histogram.call(t,a),s.set_position_from_val.call(t,c.get_current_min_value.call(t),c.get_current_max_value.call(t)),s.notify_changed_implicit.call(t,\"refresh\"),t},disable:function(){var t=this,a=t.data(\"settings\");return t.data(\"enabled\",!1).find(a.left_grip_selector).attr(\"aria-disabled\",\"true\").end().find(a.right_grip_selector).attr(\"aria-disabled\",\"true\"),t},enable:function(){var t=this,a=t.data(\"settings\");return t.data(\"enabled\",!0).find(a.left_grip_selector).attr(\"aria-disabled\",\"false\").end().find(a.right_grip_selector).attr(\"aria-disabled\",\"false\"),t},is_enabled:function(){var t=this;return t.data(\"enabled\")},set_position:function(t,a){var e=this,r=e.data(\"cur_min\"),i=e.data(\"cur_max\");t>a?s.set_position_from_val.call(e,a,t):s.set_position_from_val.call(e,t,a),s.refresh_grips_style.call(e),s.notify_changed_implicit.call(e,\"set_position\",r,i),e.data(\"beforestart_min\",t),e.data(\"beforestart_max\",a)},set_step_histogram:function(a){var e=this;e.data(\"last_step_histogram\",a),\"undefined\"==typeof a&&(t.error(\"got an undefined histogram in set_step_histogram\"),s.unset_step_histogram.call(e));var r=s.getSliderWidthPx.call(e)-e.data(\"left_grip_width\"),i=a.length;if(!(0>=r)){var n,l=0;for(n=0;i>n;n++)l+=a[n];if(0===l)return c.unset_step_histogram.call(e),e;var _=parseFloat(l)/r;for(n=0;i>n;n++)a[n]=a[n]/_;var d=[a[0]];for(n=1;i>n;n++){var o=d[n-1]+a[n];d.push(o)}d.push(r);for(var u=[e.data(\"range_min\")],g=0,f=u[0],h=0;r>=g;){var p=parseInt(d.shift(),10),v=s.inverse_rangemap_0_to_n.call(e,h+1,i+1);h++;var m=p-g,x=v-f;for(n=g;p>n;n++){var b=f+x*(n-g+1)/m;u.push(b),g++,f=b}if(g===r)break}u[u.length-1]=e.data(\"range_max\");var y=function(t){return u[parseInt(t,10)]},P=function(a){var r=s.binarySearch.call(e,u,a,function(t,a){return t[a]},function(a,e,r){return a===e[r]?0:ae[r]?1:a<=e[r-1]?-1:void t.error(\"cannot compare s: \"+a+\" with a[\"+r+\"]. a is: \"+e.join(\",\"))});return r};return e.data(\"pixel_to_value_mapping\",y),e.data(\"value_to_pixel_mapping\",P),e}},unset_step_histogram:function(){var t=this;return t.removeData(\"pixel_to_value_mapping\"),t.removeData(\"value_to_pixel_mapping\"),t.removeData(\"last_step_histogram\"),t},set_range:function(t,a){var e=this,r=c.get_current_min_value.call(e),i=c.get_current_max_value.call(e);return e.data(\"range_min\",t),e.data(\"range_max\",a),s.set_position_from_val.call(e,r,i),s.notify_changed_implicit.call(e,\"set_range\",r,i),e},highlight_range:function(a,e){var r=this,i=r.data(\"settings\");\"undefined\"==typeof i.highlight&&t.error('you cannot call highlight_range if you haven\\' specified the \"highlight\" parameter in construction!'),a||(a=0),e||(e=0);var n=s.getSliderWidthPx.call(r),l=s.rangemap_0_to_n.call(r,a,n),_=s.rangemap_0_to_n.call(r,e,n),d=_-l,o=r.find(i.highlight.panel_selector);return o.css(\"left\",l+\"px\"),o.css(\"width\",d+\"px\"),r.data(\"highlightedRangeMin\",a),r.data(\"highlightedRangeMax\",e),s.refresh_grips_style.call(r),r},set_rounding:function(a){var e=this;\"string\"==typeof a&&a.indexOf(\"{\")>-1&&(a=t.parseJSON(a)),e.data(\"rounding\",a);var r=[];if(\"object\"==typeof a){var i;for(i in a)if(a.hasOwnProperty(i)){var n=a[i];r.push({range:n,value:i})}r.sort(function(t,a){return t.range-a.range}),e.data(\"rounding_ranges\",r)}else e.removeData(\"rounding_ranges\");return e},get_rounding:function(){var t=this;return t.data(\"rounding\")},round_value_according_to_rounding:function(a){var e=this,r=s.get_rounding_for_value.call(e,a);if(r>0){var i=a/r,n=parseInt(i,10),l=i-n;l>.5&&n++;var _=n*r;return _}return t.error(\"rounding must be > 0, got \"+r+\" instead\"),a}},u=\"nstSlider\";t.fn[u]=function(a){if(c[a]){if(this.data(\"initialized\")===!0)return c[a].apply(this,Array.prototype.slice.call(arguments,1));throw new Error(\"method \"+a+\" called on an uninitialized instance of \"+u)}return\"object\"!=typeof a&&a?void t.error(\"Cannot call method \"+a):(this.data(\"initialized\",!0),c.init.apply(this,arguments))}}(jQuery);\n},{}],38:[function(require,module,exports){\n!function(e,t){\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return t(e)}:t(e)}(\"undefined\"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&\"length\"in e&&e.length,n=oe.type(e);return\"function\"===n||oe.isWindow(e)?!1:\"array\"===n||0===t||\"number\"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(oe.isFunction(t))return oe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return oe.grep(e,function(e){return e===t!==n});if(\"string\"==typeof t){if(ge.test(t))return oe.filter(t,e,n);t=oe.filter(t,e)}return oe.grep(e,function(e){return Z.call(t,e)>-1!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t={};return oe.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function s(){G.removeEventListener(\"DOMContentLoaded\",s),e.removeEventListener(\"load\",s),oe.ready()}function a(){this.expando=oe.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r=\"data-\"+t.replace(De,\"-$&\").toLowerCase(),n=e.getAttribute(r),\"string\"==typeof n){try{n=\"true\"===n?!0:\"false\"===n?!1:\"null\"===n?null:+n+\"\"===n?+n:Se.test(n)?oe.parseJSON(n):n}catch(i){}Ne.set(e,t,n)}else n=void 0;return n}function l(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return oe.css(e,t,\"\")},u=a(),l=n&&n[3]||(oe.cssNumber[t]?\"\":\"px\"),c=(oe.cssNumber[t]||\"px\"!==l&&+u)&&Ae.exec(oe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||\".5\",c/=o,oe.style(e,t,c+l);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function c(e,t){var n=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[];return void 0===t||t&&oe.nodeName(e,t)?oe.merge([e],n):n}function f(e,t){for(var n=0,r=e.length;r>n;n++)Ee.set(e[n],\"globalEval\",!t||Ee.get(t[n],\"globalEval\"))}function p(e,t,n,r,i){for(var o,s,a,u,l,p,d=t.createDocumentFragment(),h=[],g=0,v=e.length;v>g;g++)if(o=e[g],o||0===o)if(\"object\"===oe.type(o))oe.merge(h,o.nodeType?[o]:o);else if(Re.test(o)){for(s=s||d.appendChild(t.createElement(\"div\")),a=(Oe.exec(o)||[\"\",\"\"])[1].toLowerCase(),u=Pe[a]||Pe._default,s.innerHTML=u[1]+oe.htmlPrefilter(o)+u[2],p=u[0];p--;)s=s.lastChild;oe.merge(h,s.childNodes),s=d.firstChild,s.textContent=\"\"}else h.push(t.createTextNode(o));for(d.textContent=\"\",g=0;o=h[g++];)if(r&&oe.inArray(o,r)>-1)i&&i.push(o);else if(l=oe.contains(o.ownerDocument,o),s=c(d.appendChild(o),\"script\"),l&&f(s),n)for(p=0;o=s[p++];)Fe.test(o.type||\"\")&&n.push(o);return d}function d(){return!0}function h(){return!1}function g(){try{return G.activeElement}catch(e){}}function v(e,t,n,r,i,o){var s,a;if(\"object\"==typeof t){\"string\"!=typeof n&&(r=r||n,n=void 0);for(a in t)v(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&(\"string\"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=h;else if(!i)return e;return 1===o&&(s=i,i=function(e){return oe().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=oe.guid++)),e.each(function(){oe.event.add(this,t,i,r,n)})}function m(e,t){return oe.nodeName(e,\"table\")&&oe.nodeName(11!==t.nodeType?t:t.firstChild,\"tr\")?e.getElementsByTagName(\"tbody\")[0]||e.appendChild(e.ownerDocument.createElement(\"tbody\")):e}function y(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function x(e){var t=Xe.exec(e.type);return t?e.type=t[1]:e.removeAttribute(\"type\"),e}function b(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(Ee.hasData(e)&&(o=Ee.access(e),s=Ee.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)oe.event.add(t,i,l[i][n])}Ne.hasData(e)&&(a=Ne.access(e),u=oe.extend({},a),Ne.set(t,u))}}function w(e,t){var n=t.nodeName.toLowerCase();\"input\"===n&&He.test(e.type)?t.checked=e.checked:\"input\"!==n&&\"textarea\"!==n||(t.defaultValue=e.defaultValue)}function T(e,t,n,r){t=J.apply([],t);var i,o,s,a,u,l,f=0,d=e.length,h=d-1,g=t[0],v=oe.isFunction(g);if(v||d>1&&\"string\"==typeof g&&!re.checkClone&&_e.test(g))return e.each(function(i){var o=e.eq(i);v&&(t[0]=g.call(this,i,o.html())),T(o,t,n,r)});if(d&&(i=p(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=oe.map(c(i,\"script\"),y),a=s.length;d>f;f++)u=i,f!==h&&(u=oe.clone(u,!0,!0),a&&oe.merge(s,c(u,\"script\"))),n.call(e[f],u,f);if(a)for(l=s[s.length-1].ownerDocument,oe.map(s,x),f=0;a>f;f++)u=s[f],Fe.test(u.type||\"\")&&!Ee.access(u,\"globalEval\")&&oe.contains(l,u)&&(u.src?oe._evalUrl&&oe._evalUrl(u.src):oe.globalEval(u.textContent.replace(ze,\"\")))}return e}function C(e,t,n){for(var r,i=t?oe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||oe.cleanData(c(r)),r.parentNode&&(n&&oe.contains(r.ownerDocument,r)&&f(c(r,\"script\")),r.parentNode.removeChild(r));return e}function k(e,t){var n=oe(t.createElement(e)).appendTo(t.body),r=oe.css(n[0],\"display\");return n.detach(),r}function E(e){var t=G,n=Ve[e];return n||(n=k(e,t),\"none\"!==n&&n||(Ue=(Ue||oe(\"',h=\"Copy and paste this HTML code into documents to embed this map on web pages.\";L.DomUtil.addClass(this._modal,\"active\"),this._sharing=L.DomUtil.create(\"div\",\"mapbox-modal-body\",this._content);var p=e(\"mapbox-button mapbox-button-icon mapbox-icon-twitter\",s,\"Twitter\"),d=e(\"mapbox-button mapbox-button-icon mapbox-icon-facebook\",l,\"Facebook\"),u=e(\"mapbox-button mapbox-button-icon mapbox-icon-pinterest\",m,\"Pinterest\"),b=document.createElement(\"h3\"),_=document.createTextNode(\"Share this map\");b.appendChild(_);var v=document.createElement(\"div\");v.setAttribute(\"class\",\"mapbox-share-buttons\"),v.appendChild(d),v.appendChild(p),v.appendChild(u),this._sharing.appendChild(b),this._sharing.appendChild(v);var x=L.DomUtil.create(\"input\",\"mapbox-embed\",this._sharing);x.type=\"text\",x.value=c;var f=L.DomUtil.create(\"label\",\"mapbox-embed-description\",this._sharing);f.innerHTML=h;var g=L.DomUtil.create(\"a\",\"leaflet-popup-close-button\",this._sharing);g.href=\"#\",L.DomEvent.disableClickPropagation(this._sharing),L.DomEvent.addListener(g,\"click\",this._clickOut,this),L.DomEvent.addListener(x,\"click\",function(t){t.target.focus(),t.target.select()})}});module.exports.ShareControl=ShareControl,module.exports.shareControl=function(t,e){return new ShareControl(t,e)};\n},{\"./format_url\":47,\"./load_tilejson\":57}],64:[function(require,module,exports){\n\"use strict\";function fallback(t,l){var i={};for(var r in l)void 0===t[r]?i[r]=l[r]:i[r]=t[r];return i}function remap(t){for(var l={},i=0;i/g,\"\")},lbounds:function(n){return new L.LatLngBounds([[n[1],n[0]],[n[3],n[2]]])}};\n},{}],68:[function(require,module,exports){\n!function(e,t){\"object\"==typeof exports&&exports&&\"string\"!=typeof exports.nodeName?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):(e.Mustache={},t(e.Mustache))}(this,function(e){function t(e){return\"function\"==typeof e}function n(e){return g(e)?\"array\":typeof e}function r(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}function i(e,t){return null!=e&&\"object\"==typeof e&&t in e}function o(e,t){return v.call(e,t)}function s(e){return!o(w,e)}function a(e){return String(e).replace(/[&<>\"'`=\\/]/g,function(e){return y[e]})}function u(t,n){function i(){if(w&&!y)for(;v.length;)delete d[v.pop()];else v=[];w=!1,y=!1}function o(e){if(\"string\"==typeof e&&(e=e.split(k,2)),!g(e)||2!==e.length)throw new Error(\"Invalid tags: \"+e);a=new RegExp(r(e[0])+\"\\\\s*\"),u=new RegExp(\"\\\\s*\"+r(e[1])),h=new RegExp(\"\\\\s*\"+r(\"}\"+e[1]))}if(!t)return[];var a,u,h,f=[],d=[],v=[],w=!1,y=!1;o(n||e.tags);for(var U,T,j,S,V,C,A=new l(t);!A.eos();){if(U=A.pos,j=A.scanUntil(a))for(var I=0,R=j.length;R>I;++I)S=j.charAt(I),s(S)?v.push(d.length):y=!0,d.push([\"text\",S,U,U+1]),U+=1,\"\\n\"===S&&i();if(!A.scan(a))break;if(w=!0,T=A.scan(E)||\"name\",A.scan(x),\"=\"===T?(j=A.scanUntil(b),A.scan(b),A.scanUntil(u)):\"{\"===T?(j=A.scanUntil(h),A.scan(m),A.scanUntil(u),T=\"&\"):j=A.scanUntil(u),!A.scan(u))throw new Error(\"Unclosed tag at \"+A.pos);if(V=[T,j,U,A.pos],d.push(V),\"#\"===T||\"^\"===T)f.push(V);else if(\"/\"===T){if(C=f.pop(),!C)throw new Error('Unopened section \"'+j+'\" at '+U);if(C[1]!==j)throw new Error('Unclosed section \"'+C[1]+'\" at '+U)}else\"name\"===T||\"{\"===T||\"&\"===T?y=!0:\"=\"===T&&o(j)}if(C=f.pop())throw new Error('Unclosed section \"'+C[1]+'\" at '+A.pos);return p(c(d))}function c(e){for(var t,n,r=[],i=0,o=e.length;o>i;++i)t=e[i],t&&(\"text\"===t[0]&&n&&\"text\"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}function p(e){for(var t,n,r=[],i=r,o=[],s=0,a=e.length;a>s;++s)switch(t=e[s],t[0]){case\"#\":case\"^\":i.push(t),o.push(t),i=t[4]=[];break;case\"/\":n=o.pop(),n[5]=t[2],i=o.length>0?o[o.length-1][4]:r;break;default:i.push(t)}return r}function l(e){this.string=e,this.tail=e,this.pos=0}function h(e,t){this.view=e,this.cache={\".\":this.view},this.parent=t}function f(){this.cache={}}var d=Object.prototype.toString,g=Array.isArray||function(e){return\"[object Array]\"===d.call(e)},v=RegExp.prototype.test,w=/\\S/,y={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"/\":\"/\",\"`\":\"`\",\"=\":\"=\"},x=/\\s*/,k=/\\s+/,b=/\\s*=/,m=/\\s*\\}/,E=/#|\\^|\\/|>|\\{|&|=|!/;l.prototype.eos=function(){return\"\"===this.tail},l.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return\"\";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},l.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail=\"\";break;case 0:t=\"\";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},h.prototype.push=function(e){return new h(e,this)},h.prototype.lookup=function(e){var n,r=this.cache;if(r.hasOwnProperty(e))n=r[e];else{for(var o,s,a=this,u=!1;a;){if(e.indexOf(\".\")>0)for(n=a.view,o=e.split(\".\"),s=0;null!=n&&su;++u)s=void 0,i=e[u],o=i[0],\"#\"===o?s=this.renderSection(i,t,n,r):\"^\"===o?s=this.renderInverted(i,t,n,r):\">\"===o?s=this.renderPartial(i,t,n,r):\"&\"===o?s=this.unescapedValue(i,t):\"name\"===o?s=this.escapedValue(i,t):\"text\"===o&&(s=this.rawValue(i)),void 0!==s&&(a+=s);return a},f.prototype.renderSection=function(e,n,r,i){function o(e){return s.render(e,n,r)}var s=this,a=\"\",u=n.lookup(e[1]);if(u){if(g(u))for(var c=0,p=u.length;p>c;++c)a+=this.renderTokens(e[4],n.push(u[c]),r,i);else if(\"object\"==typeof u||\"string\"==typeof u||\"number\"==typeof u)a+=this.renderTokens(e[4],n.push(u),r,i);else if(t(u)){if(\"string\"!=typeof i)throw new Error(\"Cannot use higher-order sections without the original template\");u=u.call(n.view,i.slice(e[3],e[5]),o),null!=u&&(a+=u)}else a+=this.renderTokens(e[4],n,r,i);return a}},f.prototype.renderInverted=function(e,t,n,r){var i=t.lookup(e[1]);return!i||g(i)&&0===i.length?this.renderTokens(e[4],t,n,r):void 0},f.prototype.renderPartial=function(e,n,r){if(r){var i=t(r)?r(e[1]):r[e[1]];return null!=i?this.renderTokens(this.parse(i),n,r,i):void 0}},f.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);return null!=n?n:void 0},f.prototype.escapedValue=function(t,n){var r=n.lookup(t[1]);return null!=r?e.escape(r):void 0},f.prototype.rawValue=function(e){return e[1]},e.name=\"mustache.js\",e.version=\"2.2.1\",e.tags=[\"{{\",\"}}\"];var U=new f;e.clearCache=function(){return U.clearCache()},e.parse=function(e,t){return U.parse(e,t)},e.render=function(e,t,r){if(\"string\"!=typeof e)throw new TypeError('Invalid template! Template should be a \"string\" but \"'+n(e)+'\" was given as the first argument for mustache#render(template, view, partials)');return U.render(e,t,r)},e.to_html=function(n,r,i,o){var s=e.render(n,r,i);return t(o)?void o(s):s},e.escape=a,e.Scanner=l,e.Context=h,e.Writer=f});\n},{}],69:[function(require,module,exports){\n(function(){function e(e){this._value=e}function n(e,n,t,r){var i,a,u=Math.pow(10,n);return a=(t(e*u)/u).toFixed(n),r&&(i=new RegExp(\"0{1,\"+r+\"}$\"),a=a.replace(i,\"\")),a}function t(e,n,t){var r;return r=n.indexOf(\"$\")>-1?i(e,n,t):n.indexOf(\"%\")>-1?a(e,n,t):n.indexOf(\":\")>-1?u(e,n):o(e._value,n,t)}function r(e,n){var t,r,i,a,u,o=n,f=[\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],c=!1;if(n.indexOf(\":\")>-1)e._value=l(n);else if(n===b)e._value=0;else{for(\".\"!==p[v].delimiters.decimal&&(n=n.replace(/\\./g,\"\").replace(p[v].delimiters.decimal,\".\")),t=new RegExp(\"[^a-zA-Z]\"+p[v].abbreviations.thousand+\"(?:\\\\)|(\\\\\"+p[v].currency.symbol+\")?(?:\\\\))?)?$\"),r=new RegExp(\"[^a-zA-Z]\"+p[v].abbreviations.million+\"(?:\\\\)|(\\\\\"+p[v].currency.symbol+\")?(?:\\\\))?)?$\"),i=new RegExp(\"[^a-zA-Z]\"+p[v].abbreviations.billion+\"(?:\\\\)|(\\\\\"+p[v].currency.symbol+\")?(?:\\\\))?)?$\"),a=new RegExp(\"[^a-zA-Z]\"+p[v].abbreviations.trillion+\"(?:\\\\)|(\\\\\"+p[v].currency.symbol+\")?(?:\\\\))?)?$\"),u=0;u<=f.length&&!(c=n.indexOf(f[u])>-1?Math.pow(1024,u+1):!1);u++);e._value=(c?c:1)*(o.match(t)?Math.pow(10,3):1)*(o.match(r)?Math.pow(10,6):1)*(o.match(i)?Math.pow(10,9):1)*(o.match(a)?Math.pow(10,12):1)*(n.indexOf(\"%\")>-1?.01:1)*((n.split(\"-\").length+Math.min(n.split(\"(\").length-1,n.split(\")\").length-1))%2?1:-1)*Number(n.replace(/[^0-9\\.]+/g,\"\")),e._value=c?Math.ceil(e._value):e._value}return e._value}function i(e,n,t){var r,i,a=n.indexOf(\"$\"),u=n.indexOf(\"(\"),l=n.indexOf(\"-\"),f=\"\";return n.indexOf(\" $\")>-1?(f=\" \",n=n.replace(\" $\",\"\")):n.indexOf(\"$ \")>-1?(f=\" \",n=n.replace(\"$ \",\"\")):n=n.replace(\"$\",\"\"),i=o(e._value,n,t),1>=a?i.indexOf(\"(\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),r=1,(u>a||l>a)&&(r=0),i.splice(r,0,p[v].currency.symbol+f),i=i.join(\"\")):i=p[v].currency.symbol+f+i:i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,f+p[v].currency.symbol),i=i.join(\"\")):i=i+f+p[v].currency.symbol,i}function a(e,n,t){var r,i=\"\",a=100*e._value;return n.indexOf(\" %\")>-1?(i=\" \",n=n.replace(\" %\",\"\")):n=n.replace(\"%\",\"\"),r=o(a,n,t),r.indexOf(\")\")>-1?(r=r.split(\"\"),r.splice(-1,0,i+\"%\"),r=r.join(\"\")):r=r+i+\"%\",r}function u(e){var n=Math.floor(e._value/60/60),t=Math.floor((e._value-60*n*60)/60),r=Math.round(e._value-60*n*60-60*t);return n+\":\"+(10>t?\"0\"+t:t)+\":\"+(10>r?\"0\"+r:r)}function l(e){var n=e.split(\":\"),t=0;return 3===n.length?(t+=60*Number(n[0])*60,t+=60*Number(n[1]),t+=Number(n[2])):2===n.length&&(t+=60*Number(n[0]),t+=Number(n[1])),Number(t)}function o(e,t,r){var i,a,u,l,o,f,c=!1,s=!1,h=!1,d=\"\",m=!1,y=!1,g=!1,x=!1,w=!1,O=\"\",M=\"\",_=Math.abs(e),B=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],N=\"\",$=!1;if(0===e&&null!==b)return b;if(t.indexOf(\"(\")>-1?(c=!0,t=t.slice(1,-1)):t.indexOf(\"+\")>-1&&(s=!0,t=t.replace(/\\+/g,\"\")),t.indexOf(\"a\")>-1&&(m=t.indexOf(\"aK\")>=0,y=t.indexOf(\"aM\")>=0,g=t.indexOf(\"aB\")>=0,x=t.indexOf(\"aT\")>=0,w=m||y||g||x,t.indexOf(\" a\")>-1?(d=\" \",t=t.replace(\" a\",\"\")):t=t.replace(\"a\",\"\"),_>=Math.pow(10,12)&&!w||x?(d+=p[v].abbreviations.trillion,e/=Math.pow(10,12)):_=Math.pow(10,9)&&!w||g?(d+=p[v].abbreviations.billion,e/=Math.pow(10,9)):_=Math.pow(10,6)&&!w||y?(d+=p[v].abbreviations.million,e/=Math.pow(10,6)):(_=Math.pow(10,3)&&!w||m)&&(d+=p[v].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf(\"b\")>-1)for(t.indexOf(\" b\")>-1?(O=\" \",t=t.replace(\" b\",\"\")):t=t.replace(\"b\",\"\"),u=0;u<=B.length;u++)if(i=Math.pow(1024,u),a=Math.pow(1024,u+1),e>=i&&a>e){O+=B[u],i>0&&(e/=i);break}return t.indexOf(\"o\")>-1&&(t.indexOf(\" o\")>-1?(M=\" \",t=t.replace(\" o\",\"\")):t=t.replace(\"o\",\"\"),M+=p[v].ordinal(e)),t.indexOf(\"[.]\")>-1&&(h=!0,t=t.replace(\"[.]\",\".\")),l=e.toString().split(\".\")[0],o=t.split(\".\")[1],f=t.indexOf(\",\"),o?(o.indexOf(\"[\")>-1?(o=o.replace(\"]\",\"\"),o=o.split(\"[\"),N=n(e,o[0].length+o[1].length,r,o[1].length)):N=n(e,o.length,r),l=N.split(\".\")[0],N=N.split(\".\")[1].length?p[v].delimiters.decimal+N.split(\".\")[1]:\"\",h&&0===Number(N.slice(1))&&(N=\"\")):l=n(e,null,r),l.indexOf(\"-\")>-1&&(l=l.slice(1),$=!0),f>-1&&(l=l.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+p[v].delimiters.thousands)),0===t.indexOf(\".\")&&(l=\"\"),(c&&$?\"(\":\"\")+(!c&&$?\"-\":\"\")+(!$&&s?\"+\":\"\")+l+N+(M?M:\"\")+(d?d:\"\")+(O?O:\"\")+(c&&$?\")\":\"\")}function f(e,n){p[e]=n}function c(e){var n=e.toString().split(\".\");return n.length<2?1:Math.pow(10,n[1].length)}function s(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,n){var t=c(e),r=c(n);return t>r?t:r},-(1/0))}var h,d=\"1.5.3\",p={},v=\"en\",b=null,m=\"0,0\",y=\"undefined\"!=typeof module&&module.exports;h=function(n){return h.isNumeral(n)?n=n.value():0===n||\"undefined\"==typeof n?n=0:Number(n)||(n=h.fn.unformat(n)),new e(Number(n))},h.version=d,h.isNumeral=function(n){return n instanceof e},h.language=function(e,n){if(!e)return v;if(e&&!n){if(!p[e])throw new Error(\"Unknown language : \"+e);v=e}return!n&&p[e]||f(e,n),h},h.languageData=function(e){if(!e)return p[v];if(!p[e])throw new Error(\"Unknown language : \"+e);return p[e]},h.language(\"en\",{delimiters:{thousands:\",\",decimal:\".\"},abbreviations:{thousand:\"k\",million:\"m\",billion:\"b\",trillion:\"t\"},ordinal:function(e){var n=e%10;return 1===~~(e%100/10)?\"th\":1===n?\"st\":2===n?\"nd\":3===n?\"rd\":\"th\"},currency:{symbol:\"$\"}}),h.zeroFormat=function(e){b=\"string\"==typeof e?e:null},h.defaultFormat=function(e){m=\"string\"==typeof e?e:\"0.0\"},\"function\"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,n){\"use strict\";if(null===this||\"undefined\"==typeof this)throw new TypeError(\"Array.prototype.reduce called on null or undefined\");if(\"function\"!=typeof e)throw new TypeError(e+\" is not a function\");var t,r,i=this.length>>>0,a=!1;for(1t;++t)this.hasOwnProperty(t)&&(a?r=e(r,this[t],t,this):(r=this[t],a=!0));if(!a)throw new TypeError(\"Reduce of empty array with no initial value\");return r}),h.fn=e.prototype={clone:function(){return h(this)},format:function(e,n){return t(this,e?e:m,void 0!==n?n:Math.round)},unformat:function(e){return\"[object Number]\"===Object.prototype.toString.call(e)?e:r(this,e?e:m)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function n(e,n,r,i){return e+t*n}var t=s.call(null,this._value,e);return this._value=[this._value,e].reduce(n,0)/t,this},subtract:function(e){function n(e,n,r,i){return e-t*n}var t=s.call(null,this._value,e);return this._value=[e].reduce(n,this._value*t)/t,this},multiply:function(e){function n(e,n,t,r){var i=s(e,n);return e*i*(n*i)/(i*i)}return this._value=[this._value,e].reduce(n,1),this},divide:function(e){function n(e,n,t,r){var i=s(e,n);return e*i/(n*i)}return this._value=[this._value,e].reduce(n),this},difference:function(e){return Math.abs(h(this._value).subtract(e).value())}},y&&(module.exports=h),\"undefined\"==typeof ender&&(this.numeral=h),\"function\"==typeof define&&define.amd&&define([],function(){return h})}).call(this);\n},{}],70:[function(require,module,exports){\n(function(){var t,e,n,r,s,o,i,u,a,c,l,p,h,f,d,g,m,y,v,w,b,k,S,q,L,x,P,T,R,j,E,O,M,A,N,_,F,C,U,W,X,D,H,I,z,G,B,J,K,Q=[].slice,V={}.hasOwnProperty,Y=function(t,e){function n(){this.constructor=t}for(var r in e)V.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},Z=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};for(b={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:\"body\",elements:{checkInterval:100,selectors:[\"body\"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:[\"GET\"],trackWebSockets:!0,ignoreURLs:[]}},R=function(){var t;return null!=(t=\"undefined\"!=typeof performance&&null!==performance&&\"function\"==typeof performance.now?performance.now():void 0)?t:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,w=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(t){return setTimeout(t,50)},w=function(t){return clearTimeout(t)}),M=function(t){var e,n;return e=R(),(n=function(){var r;return r=R()-e,r>=33?(e=R(),t(r,function(){return E(n)})):setTimeout(n,33-r)})()},O=function(){var t,e,n;return n=arguments[0],e=arguments[1],t=3<=arguments.length?Q.call(arguments,2):[],\"function\"==typeof n[e]?n[e].apply(n,t):n[e]},k=function(){var t,e,n,r,s,o,i;for(e=arguments[0],r=2<=arguments.length?Q.call(arguments,1):[],o=0,i=r.length;i>o;o++)if(n=r[o])for(t in n)V.call(n,t)&&(s=n[t],null!=e[t]&&\"object\"==typeof e[t]&&null!=s&&\"object\"==typeof s?k(e[t],s):e[t]=s);return e},m=function(t){var e,n,r,s,o;for(n=e=0,s=0,o=t.length;o>s;s++)r=t[s],n+=Math.abs(r),e++;return n/e},q=function(t,e){var n,r,s;if(null==t&&(t=\"options\"),null==e&&(e=!0),s=document.querySelector(\"[data-pace-\"+t+\"]\")){if(n=s.getAttribute(\"data-pace-\"+t),!e)return n;try{return JSON.parse(n)}catch(o){return r=o,\"undefined\"!=typeof console&&null!==console?console.error(\"Error parsing inline pace options\",r):void 0}}},i=function(){function t(){}return t.prototype.on=function(t,e,n,r){var s;return null==r&&(r=!1),null==this.bindings&&(this.bindings={}),null==(s=this.bindings)[t]&&(s[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:r})},t.prototype.once=function(t,e,n){return this.on(t,e,n,!0)},t.prototype.off=function(t,e){var n,r,s;if(null!=(null!=(r=this.bindings)?r[t]:void 0)){if(null==e)return delete this.bindings[t];for(n=0,s=[];nH;H++)F=B[H],j[F]===!0&&(j[F]=b[F]);a=function(t){function e(){return J=e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(Error),e=function(){function t(){this.progress=0}return t.prototype.getElement=function(){var t;if(null==this.el){if(t=document.querySelector(j.target),!t)throw new a;this.el=document.createElement(\"div\"),this.el.className=\"pace pace-active\",document.body.className=document.body.className.replace(/pace-done/g,\"\"),document.body.className+=\" pace-running\",this.el.innerHTML='
\\n
\\n
\\n
',null!=t.firstChild?t.insertBefore(this.el,t.firstChild):t.appendChild(this.el)}return this.el},t.prototype.finish=function(){var t;return t=this.getElement(),t.className=t.className.replace(\"pace-active\",\"\"),t.className+=\" pace-inactive\",document.body.className=document.body.className.replace(\"pace-running\",\"\"),document.body.className+=\" pace-done\"},t.prototype.update=function(t){return this.progress=t,this.render()},t.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(t){a=t}return this.el=void 0},t.prototype.render=function(){var t,e,n,r,s,o,i;if(null==document.querySelector(j.target))return!1;for(t=this.getElement(),r=\"translate3d(\"+this.progress+\"%, 0, 0)\",i=[\"webkitTransform\",\"msTransform\",\"transform\"],s=0,o=i.length;o>s;s++)e=i[s],t.children[0].style[e]=r;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(t.children[0].setAttribute(\"data-progress-text\",\"\"+(0|this.progress)+\"%\"),this.progress>=100?n=\"99\":(n=this.progress<10?\"0\":\"\",n+=0|this.progress),t.children[0].setAttribute(\"data-progress\",\"\"+n)),this.lastRenderedProgress=this.progress},t.prototype.done=function(){return this.progress>=100},t}(),u=function(){function t(){this.bindings={}}return t.prototype.trigger=function(t,e){var n,r,s,o,i;if(null!=this.bindings[t]){for(o=this.bindings[t],i=[],r=0,s=o.length;s>r;r++)n=o[r],i.push(n.call(this,e));return i}},t.prototype.on=function(t,e){var n;return null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push(e)},t}(),D=window.XMLHttpRequest,X=window.XDomainRequest,W=window.WebSocket,S=function(t,e){var n,r,s;s=[];for(r in e.prototype)try{null==t[r]&&\"function\"!=typeof e[r]?\"function\"==typeof Object.defineProperty?s.push(Object.defineProperty(t,r,{get:function(){return e.prototype[r]},configurable:!0,enumerable:!0})):s.push(t[r]=e.prototype[r]):s.push(void 0)}catch(o){n=o}return s},P=[],c.ignore=function(){var t,e,n;return e=arguments[0],t=2<=arguments.length?Q.call(arguments,1):[],P.unshift(\"ignore\"),n=e.apply(null,t),P.shift(),n},c.track=function(){var t,e,n;return e=arguments[0],t=2<=arguments.length?Q.call(arguments,1):[],P.unshift(\"track\"),n=e.apply(null,t),P.shift(),n},_=function(t){var e;if(null==t&&(t=\"GET\"),\"track\"===P[0])return\"force\";if(!P.length&&j.ajax){if(\"socket\"===t&&j.ajax.trackWebSockets)return!0;if(e=t.toUpperCase(),Z.call(j.ajax.trackMethods,e)>=0)return!0}return!1},l=function(t){function e(){var t,n=this;e.__super__.constructor.apply(this,arguments),t=function(t){var e;return e=t.open,t.open=function(r,s,o){return _(r)&&n.trigger(\"request\",{type:r,url:s,request:t}),e.apply(t,arguments)}},window.XMLHttpRequest=function(e){var n;return n=new D(e),t(n),n};try{S(window.XMLHttpRequest,D)}catch(r){}if(null!=X){window.XDomainRequest=function(){var e;return e=new X,t(e),e};try{S(window.XDomainRequest,X)}catch(r){}}if(null!=W&&j.ajax.trackWebSockets){window.WebSocket=function(t,e){var r;return r=null!=e?new W(t,e):new W(t),_(\"socket\")&&n.trigger(\"request\",{type:\"socket\",url:t,protocols:e,request:r}),r};try{S(window.WebSocket,W)}catch(r){}}}return Y(e,t),e}(u),I=null,L=function(){return null==I&&(I=new l),I},N=function(t){var e,n,r,s;for(s=j.ajax.ignoreURLs,n=0,r=s.length;r>n;n++)if(e=s[n],\"string\"==typeof e){if(-1!==t.indexOf(e))return!0}else if(e.test(t))return!0;return!1},L().on(\"request\",function(e){var n,r,s,o,i;return o=e.type,s=e.request,i=e.url,N(i)?void 0:c.running||j.restartOnRequestAfter===!1&&\"force\"!==_(o)?void 0:(r=arguments,n=j.restartOnRequestAfter||0,\"boolean\"==typeof n&&(n=0),setTimeout(function(){var e,n,i,u,a,l;if(e=\"socket\"===o?s.readyState<2:0<(u=s.readyState)&&4>u){for(c.restart(),a=c.sources,l=[],n=0,i=a.length;i>n;n++){if(F=a[n],F instanceof t){F.watch.apply(F,r);break}l.push(void 0)}return l}},n))}),t=function(){function t(){var t=this;this.elements=[],L().on(\"request\",function(){return t.watch.apply(t,arguments)})}return t.prototype.watch=function(t){var e,n,r,s;return r=t.type,e=t.request,s=t.url,N(s)?void 0:(n=\"socket\"===r?new f(e):new d(e),this.elements.push(n))},t}(),d=function(){function t(t){var e,n,r,s,o,i,u=this;if(this.progress=0,null!=window.ProgressEvent)for(n=null,t.addEventListener(\"progress\",function(t){return t.lengthComputable?u.progress=100*t.loaded/t.total:u.progress=u.progress+(100-u.progress)/2},!1),i=[\"load\",\"abort\",\"timeout\",\"error\"],r=0,s=i.length;s>r;r++)e=i[r],t.addEventListener(e,function(){return u.progress=100},!1);else o=t.onreadystatechange,t.onreadystatechange=function(){var e;return 0===(e=t.readyState)||4===e?u.progress=100:3===t.readyState&&(u.progress=50),\"function\"==typeof o?o.apply(null,arguments):void 0}}return t}(),f=function(){function t(t){var e,n,r,s,o=this;for(this.progress=0,s=[\"error\",\"open\"],n=0,r=s.length;r>n;n++)e=s[n],t.addEventListener(e,function(){return o.progress=100},!1)}return t}(),r=function(){function t(t){var e,n,r,o;for(null==t&&(t={}),this.elements=[],null==t.selectors&&(t.selectors=[]),o=t.selectors,n=0,r=o.length;r>n;n++)e=o[n],this.elements.push(new s(e))}return t}(),s=function(){function t(t){this.selector=t,this.progress=0,this.check()}return t.prototype.check=function(){var t=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return t.check()},j.elements.checkInterval)},t.prototype.done=function(){return this.progress=100},t}(),n=function(){function t(){var t,e,n=this;this.progress=null!=(e=this.states[document.readyState])?e:100,t=document.onreadystatechange,document.onreadystatechange=function(){return null!=n.states[document.readyState]&&(n.progress=n.states[document.readyState]),\"function\"==typeof t?t.apply(null,arguments):void 0}}return t.prototype.states={loading:0,interactive:50,complete:100},t}(),o=function(){function t(){var t,e,n,r,s,o=this;this.progress=0,t=0,s=[],r=0,n=R(),e=setInterval(function(){var i;return i=R()-n-50,n=R(),s.push(i),s.length>j.eventLag.sampleCount&&s.shift(),t=m(s),++r>=j.eventLag.minSamples&&t=100&&(this.done=!0),e===this.last?this.sinceLastUpdate+=t:(this.sinceLastUpdate&&(this.rate=(e-this.last)/this.sinceLastUpdate),this.catchup=(e-this.progress)/j.catchupTime,this.sinceLastUpdate=0,this.last=e),e>this.progress&&(this.progress+=this.catchup*t),n=1-Math.pow(this.progress/100,j.easeFactor),this.progress+=n*this.rate*t,this.progress=Math.min(this.lastProgress+j.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},t}(),C=null,A=null,y=null,U=null,g=null,v=null,c.running=!1,x=function(){return j.restartOnPushState?c.restart():void 0},null!=window.history.pushState&&(G=window.history.pushState,window.history.pushState=function(){return x(),G.apply(window.history,arguments)}),null!=window.history.replaceState&&(K=window.history.replaceState,window.history.replaceState=function(){return x(),K.apply(window.history,arguments)}),p={ajax:t,elements:r,document:n,eventLag:o},(T=function(){var t,n,r,s,o,i,u,a;for(c.sources=C=[],i=[\"ajax\",\"elements\",\"document\",\"eventLag\"],n=0,s=i.length;s>n;n++)t=i[n],j[t]!==!1&&C.push(new p[t](j[t]));for(a=null!=(u=j.extraSources)?u:[],r=0,o=a.length;o>r;r++)F=a[r],C.push(new F(j));return c.bar=y=new e,A=[],U=new h})(),c.stop=function(){return c.trigger(\"stop\"),c.running=!1,y.destroy(),v=!0,null!=g&&(\"function\"==typeof w&&w(g),g=null),T()},c.restart=function(){return c.trigger(\"restart\"),c.stop(),c.start()},c.go=function(){var t;return c.running=!0,y.render(),t=R(),v=!1,g=M(function(e,n){var r,s,o,i,u,a,l,p,f,d,g,m,w,b,k,S;for(p=100-y.progress,s=g=0,o=!0,a=m=0,b=C.length;b>m;a=++m)for(F=C[a],d=null!=A[a]?A[a]:A[a]=[],u=null!=(S=F.elements)?S:[F],l=w=0,k=u.length;k>w;l=++w)i=u[l],f=null!=d[l]?d[l]:d[l]=new h(i),o&=f.done,f.done||(s++,g+=f.tick(e));return r=g/s,y.update(U.tick(e,r)),y.done()||o||v?(y.update(100),c.trigger(\"done\"),setTimeout(function(){return y.finish(),c.running=!1,c.trigger(\"hide\")},Math.max(j.ghostTime,Math.max(j.minTime-(R()-t),0)))):n()})},c.start=function(t){k(j,t),c.running=!0;try{y.render()}catch(e){a=e}return document.querySelector(\".pace\")?(c.trigger(\"start\"),c.go()):setTimeout(c.start,50)},\"function\"==typeof define&&define.amd?define([\"pace\"],function(){return c}):\"object\"==typeof exports?module.exports=c:j.startOnPageLoad&&c.start()}).call(this);\n},{}],71:[function(require,module,exports){\nmodule.exports=function(r,e){for(var n=r[0],t=r[1],o=!1,l=0,u=e.length-1;lt!=h>t&&(g-a)*(t-f)/(h-f)+a>n;v&&(o=!o)}return o};\n},{}],72:[function(require,module,exports){\nfunction cleanUpNextTick(){draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue()}function drainQueue(){if(!draining){var e=setTimeout(cleanUpNextTick);draining=!0;for(var n=queue.length;n;){for(currentQueue=queue,queue=[];++queueIndex1)for(var r=1;r=q&&ft>=r}function f(){if(V)try{throw new Error}catch(t){var n=t.stack.split(\"\\n\"),e=n[0].indexOf(\"@\")>0?n[1]:n[2],r=u(e);if(!r)return;return H=r[0],r[1]}}function s(t,n,e){return function(){return\"undefined\"!=typeof console&&\"function\"==typeof console.warn&&console.warn(n+\" is deprecated, use \"+e+\" instead.\",new Error(\"\").stack),t.apply(t,arguments)}}function p(t){return t instanceof h?t:k(t)?O(t):E(t)}function a(){function t(t){n=t,i.source=t,W(e,function(n,e){p.nextTick(function(){t.promiseDispatch.apply(t,e)})},void 0),e=void 0,r=void 0}var n,e=[],r=[],o=Z(a.prototype),i=Z(h.prototype);if(i.promiseDispatch=function(t,o,i){var u=L(arguments);e?(e.push(u),\"when\"===o&&i[1]&&r.push(i[1])):p.nextTick(function(){n.promiseDispatch.apply(n,u)})},i.valueOf=function(){if(e)return i;var t=v(n);return m(t)&&(n=t),t},i.inspect=function(){return n?n.inspect():{state:\"pending\"}},p.longStackSupport&&V)try{throw new Error}catch(u){i.stack=u.stack.substring(u.stack.indexOf(\"\\n\")+1)}return o.promise=i,o.resolve=function(e){n||t(p(e))},o.fulfill=function(e){n||t(E(e))},o.reject=function(e){n||t(R(e))},o.notify=function(t){n||W(r,function(n,e){p.nextTick(function(){e(t)})},void 0)},o}function l(t){if(\"function\"!=typeof t)throw new TypeError(\"resolver must be a function.\");var n=a();try{t(n.resolve,n.reject,n.notify)}catch(e){n.reject(e)}return n.promise}function d(t){return l(function(n,e){for(var r=0,o=t.length;o>r;r++)p(t[r]).then(n,e)})}function h(t,n,e){void 0===n&&(n=function(t){return R(new Error(\"Promise does not support operation: \"+t))}),void 0===e&&(e=function(){return{state:\"unknown\"}});var r=Z(h.prototype);if(r.promiseDispatch=function(e,o,i){var u;try{u=t[o]?t[o].apply(r,i):n.call(r,o,i)}catch(c){u=R(c)}e&&e(u)},r.inspect=e,e){var o=e();\"rejected\"===o.state&&(r.exception=o.reason),r.valueOf=function(){var t=e();return\"pending\"===t.state||\"rejected\"===t.state?r:t.value}}return r}function y(t,n,e,r){return p(t).then(n,e,r)}function v(t){if(m(t)){var n=t.inspect();if(\"fulfilled\"===n.state)return n.value}return t}function m(t){return t instanceof h}function k(t){return n(t)&&\"function\"==typeof t.then}function j(t){return m(t)&&\"pending\"===t.inspect().state}function w(t){return!m(t)||\"fulfilled\"===t.inspect().state}function g(t){return m(t)&&\"rejected\"===t.inspect().state}function b(){ot.length=0,it.length=0,ct||(ct=!0)}function x(t,n){ct&&(\"object\"==typeof process&&\"function\"==typeof process.emit&&p.nextTick.runAfter(function(){-1!==X(it,t)&&(process.emit(\"unhandledRejection\",n,t),ut.push(t))}),it.push(t),n&&\"undefined\"!=typeof n.stack?ot.push(n.stack):ot.push(\"(no stack) \"+n))}function T(t){if(ct){var n=X(it,t);-1!==n&&(\"object\"==typeof process&&\"function\"==typeof process.emit&&p.nextTick.runAfter(function(){var e=X(ut,t);-1!==e&&(process.emit(\"rejectionHandled\",ot[n],t),ut.splice(e,1))}),it.splice(n,1),ot.splice(n,1))}}function R(t){var n=h({when:function(n){return n&&T(this),n?n(t):this}},function(){return this},function(){return{state:\"rejected\",reason:t}});return x(n,t),n}function E(t){return h({when:function(){return t},get:function(n){return t[n]},set:function(n,e){t[n]=e},\"delete\":function(n){delete t[n]},post:function(n,e){return null===n||void 0===n?t.apply(void 0,e):t[n].apply(t,e)},apply:function(n,e){return t.apply(n,e)},keys:function(){return nt(t)}},void 0,function(){return{state:\"fulfilled\",value:t}})}function O(t){var n=a();return p.nextTick(function(){try{t.then(n.resolve,n.reject,n.notify)}catch(e){n.reject(e)}}),n.promise}function S(t){return h({isDef:function(){}},function(n,e){return A(t,n,e)},function(){return p(t).inspect()})}function N(t,n,e){return p(t).spread(n,e)}function D(t){return function(){function n(t,n){var u;if(\"undefined\"==typeof StopIteration){try{u=r[t](n)}catch(c){return R(c)}return u.done?p(u.value):y(u.value,o,i)}try{u=r[t](n)}catch(c){return e(c)?p(c.value):R(c)}return y(u,o,i)}var r=t.apply(this,arguments),o=n.bind(n,\"next\"),i=n.bind(n,\"throw\");return o()}}function P(t){p.done(p.async(t)())}function C(t){throw new _(t)}function Q(t){return function(){return N([this,I(arguments)],function(n,e){return t.apply(n,e)})}}function A(t,n,e){return p(t).dispatch(n,e)}function I(t){return y(t,function(t){var n=0,e=a();return W(t,function(r,o,i){var u;m(o)&&\"fulfilled\"===(u=o.inspect()).state?t[i]=u.value:(++n,y(o,function(r){t[i]=r,0===--n&&e.resolve(t)},e.reject,function(t){e.notify({index:i,value:t})}))},void 0),0===n&&e.resolve(t),e.promise})}function U(t){if(0===t.length)return p.resolve();var n=p.defer(),e=0;return W(t,function(r,o,i){function u(t){n.resolve(t)}function c(){e--,0===e&&n.reject(new Error(\"Can't get fulfillment value from any promise, all promises were rejected.\"))}function f(t){n.notify({index:i,value:t})}var s=t[i];e++,y(s,u,c,f)},void 0),n.promise}function F(t){return y(t,function(t){return t=Y(t,p),y(I(Y(t,function(t){return y(t,z,z)})),function(){return t})})}function M(t){return p(t).allSettled()}function B(t,n){return p(t).then(void 0,void 0,n)}function $(t,n){return p(t).nodeify(n)}var V=!1;try{throw new Error}catch(G){V=!!G.stack}var H,_,q=f(),z=function(){},J=function(){function t(){for(var t,r;e.next;)e=e.next,t=e.task,e.task=void 0,r=e.domain,r&&(e.domain=void 0,r.enter()),n(t,r);for(;c.length;)t=c.pop(),n(t);o=!1}function n(n,e){try{n()}catch(r){if(u)throw e&&e.exit(),setTimeout(t,0),e&&e.enter(),r;setTimeout(function(){throw r},0)}e&&e.exit()}var e={task:void 0,next:null},r=e,o=!1,i=void 0,u=!1,c=[];if(J=function(t){r=r.next={task:t,domain:u&&process.domain,next:null},o||(o=!0,i())},\"object\"==typeof process&&\"[object process]\"===process.toString()&&process.nextTick)u=!0,i=function(){process.nextTick(t)};else if(\"function\"==typeof setImmediate)i=\"undefined\"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if(\"undefined\"!=typeof MessageChannel){var f=new MessageChannel;f.port1.onmessage=function(){i=s,f.port1.onmessage=t,t()};var s=function(){f.port2.postMessage(0)};i=function(){setTimeout(t,0),s()}}else i=function(){setTimeout(t,0)};return J.runAfter=function(t){c.push(t),o||(o=!0,i())},J}(),K=Function.call,L=t(Array.prototype.slice),W=t(Array.prototype.reduce||function(t,n){var e=0,r=this.length;if(1===arguments.length)for(;;){if(e in this){n=this[e++];break}if(++e>=r)throw new TypeError}for(;r>e;e++)e in this&&(n=t(n,this[e],e));return n}),X=t(Array.prototype.indexOf||function(t){for(var n=0;n2?t.resolve(L(arguments,1)):t.resolve(e)}},p.Promise=l,p.promise=l,l.race=d,l.all=I,l.reject=R,l.resolve=p,p.passByCopy=function(t){return t},h.prototype.passByCopy=function(){return this},p.join=function(t,n){return p(t).join(n)},h.prototype.join=function(t){return p([this,t]).spread(function(t,n){if(t===n)return t;throw new Error(\"Can't join: not the same: \"+t+\" \"+n)})},p.race=d,h.prototype.race=function(){return this.then(p.race)},p.makePromise=h,h.prototype.toString=function(){return\"[object Promise]\"},h.prototype.then=function(t,n,e){function o(n){try{return\"function\"==typeof t?t(n):n}catch(e){return R(e)}}function i(t){if(\"function\"==typeof n){r(t,c);try{return n(t)}catch(e){return R(e)}}return R(t)}function u(t){return\"function\"==typeof e?e(t):t}var c=this,f=a(),s=!1;return p.nextTick(function(){c.promiseDispatch(function(t){s||(s=!0,f.resolve(o(t)))},\"when\",[function(t){s||(s=!0,f.resolve(i(t)))}])}),c.promiseDispatch(void 0,\"when\",[void 0,function(t){var n,e=!1;try{n=u(t)}catch(r){if(e=!0,!p.onerror)throw r;p.onerror(r)}e||f.notify(n)}]),f.promise},p.tap=function(t,n){return p(t).tap(n)},h.prototype.tap=function(t){return t=p(t),this.then(function(n){return t.fcall(n).thenResolve(n)})},p.when=y,h.prototype.thenResolve=function(t){return this.then(function(){return t})},p.thenResolve=function(t,n){return p(t).thenResolve(n)},h.prototype.thenReject=function(t){return this.then(function(){throw t})},p.thenReject=function(t,n){return p(t).thenReject(n)},p.nearer=v,p.isPromise=m,p.isPromiseAlike=k,p.isPending=j,h.prototype.isPending=function(){return\"pending\"===this.inspect().state},p.isFulfilled=w,h.prototype.isFulfilled=function(){return\"fulfilled\"===this.inspect().state},p.isRejected=g,h.prototype.isRejected=function(){return\"rejected\"===this.inspect().state};var ot=[],it=[],ut=[],ct=!0;p.resetUnhandledRejections=b,p.getUnhandledReasons=function(){return ot.slice()},p.stopUnhandledRejectionTracking=function(){b(),ct=!1},b(),p.reject=R,p.fulfill=E,p.master=S,p.spread=N,h.prototype.spread=function(t,n){return this.all().then(function(n){return t.apply(void 0,n)},n)},p.async=D,p.spawn=P,p[\"return\"]=C,p.promised=Q,p.dispatch=A,h.prototype.dispatch=function(t,n){var e=this,r=a();return p.nextTick(function(){e.promiseDispatch(r.resolve,t,n)}),r.promise},p.get=function(t,n){return p(t).dispatch(\"get\",[n])},h.prototype.get=function(t){return this.dispatch(\"get\",[t])},p.set=function(t,n,e){return p(t).dispatch(\"set\",[n,e])},h.prototype.set=function(t,n){return this.dispatch(\"set\",[t,n])},p.del=p[\"delete\"]=function(t,n){return p(t).dispatch(\"delete\",[n])},h.prototype.del=h.prototype[\"delete\"]=function(t){return this.dispatch(\"delete\",[t])},p.mapply=p.post=function(t,n,e){return p(t).dispatch(\"post\",[n,e])},h.prototype.mapply=h.prototype.post=function(t,n){return this.dispatch(\"post\",[t,n])},p.send=p.mcall=p.invoke=function(t,n){return p(t).dispatch(\"post\",[n,L(arguments,2)])},h.prototype.send=h.prototype.mcall=h.prototype.invoke=function(t){return this.dispatch(\"post\",[t,L(arguments,1)])},p.fapply=function(t,n){return p(t).dispatch(\"apply\",[void 0,n])},h.prototype.fapply=function(t){return this.dispatch(\"apply\",[void 0,t])},p[\"try\"]=p.fcall=function(t){return p(t).dispatch(\"apply\",[void 0,L(arguments,1)])},h.prototype.fcall=function(){return this.dispatch(\"apply\",[void 0,L(arguments)])},p.fbind=function(t){var n=p(t),e=L(arguments,1);return function(){return n.dispatch(\"apply\",[this,e.concat(L(arguments))])}},h.prototype.fbind=function(){var t=this,n=L(arguments);return function(){return t.dispatch(\"apply\",[this,n.concat(L(arguments))])}},p.keys=function(t){return p(t).dispatch(\"keys\",[])},h.prototype.keys=function(){return this.dispatch(\"keys\",[])},p.all=I,h.prototype.all=function(){return I(this)},p.any=U,h.prototype.any=function(){return U(this)},p.allResolved=s(F,\"allResolved\",\"allSettled\"),h.prototype.allResolved=function(){return F(this)},p.allSettled=M,h.prototype.allSettled=function(){return this.then(function(t){return I(Y(t,function(t){function n(){return t.inspect()}return t=p(t),t.then(n,n)}))})},p.fail=p[\"catch\"]=function(t,n){return p(t).then(void 0,n)},h.prototype.fail=h.prototype[\"catch\"]=function(t){return this.then(void 0,t)},p.progress=B,h.prototype.progress=function(t){return this.then(void 0,void 0,t)},p.fin=p[\"finally\"]=function(t,n){return p(t)[\"finally\"](n)},h.prototype.fin=h.prototype[\"finally\"]=function(t){return t=p(t),this.then(function(n){return t.fcall().then(function(){return n})},function(n){return t.fcall().then(function(){throw n})})},p.done=function(t,n,e,r){return p(t).done(n,e,r)},h.prototype.done=function(t,n,e){var o=function(t){p.nextTick(function(){if(r(t,i),!p.onerror)throw t;p.onerror(t)})},i=t||n||e?this.then(t,n,e):this;\"object\"==typeof process&&process&&process.domain&&(o=process.domain.bind(o)),i.then(void 0,o)},p.timeout=function(t,n,e){return p(t).timeout(n,e)},h.prototype.timeout=function(t,n){var e=a(),r=setTimeout(function(){n&&\"string\"!=typeof n||(n=new Error(n||\"Timed out after \"+t+\" ms\"),n.code=\"ETIMEDOUT\"),e.reject(n)},t);return this.then(function(t){clearTimeout(r),e.resolve(t)},function(t){clearTimeout(r),e.reject(t)},e.notify),e.promise},p.delay=function(t,n){return void 0===n&&(n=t,t=void 0),p(t).delay(n)},h.prototype.delay=function(t){return this.then(function(n){var e=a();return setTimeout(function(){e.resolve(n)},t),e.promise})},p.nfapply=function(t,n){return p(t).nfapply(n)},h.prototype.nfapply=function(t){var n=a(),e=L(t);return e.push(n.makeNodeResolver()),this.fapply(e).fail(n.reject),n.promise},p.nfcall=function(t){var n=L(arguments,1);return p(t).nfapply(n)},h.prototype.nfcall=function(){var t=L(arguments),n=a();return t.push(n.makeNodeResolver()),this.fapply(t).fail(n.reject),n.promise},p.nfbind=p.denodeify=function(t){var n=L(arguments,1);return function(){var e=n.concat(L(arguments)),r=a();return e.push(r.makeNodeResolver()),p(t).fapply(e).fail(r.reject),r.promise}},h.prototype.nfbind=h.prototype.denodeify=function(){var t=L(arguments);return t.unshift(this),p.denodeify.apply(void 0,t)},p.nbind=function(t,n){var e=L(arguments,2);return function(){function r(){return t.apply(n,arguments)}var o=e.concat(L(arguments)),i=a();return o.push(i.makeNodeResolver()),p(r).fapply(o).fail(i.reject),i.promise}},h.prototype.nbind=function(){var t=L(arguments,0);return t.unshift(this),p.nbind.apply(void 0,t)},p.nmapply=p.npost=function(t,n,e){return p(t).npost(n,e)},h.prototype.nmapply=h.prototype.npost=function(t,n){var e=L(n||[]),r=a();return e.push(r.makeNodeResolver()),this.dispatch(\"post\",[t,e]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(t,n){var e=L(arguments,2),r=a();return e.push(r.makeNodeResolver()),p(t).dispatch(\"post\",[n,e]).fail(r.reject),r.promise},h.prototype.nsend=h.prototype.nmcall=h.prototype.ninvoke=function(t){var n=L(arguments,1),e=a();return n.push(e.makeNodeResolver()),this.dispatch(\"post\",[t,n]).fail(e.reject),e.promise},p.nodeify=$,h.prototype.nodeify=function(t){return t?void this.then(function(n){p.nextTick(function(){t(null,n)})},function(n){p.nextTick(function(){t(n)})}):this},p.noConflict=function(){throw new Error(\"Q.noConflict only works when Q is used as a global\")};var ft=f();return p});\n}).call(this,require('_process'))\n\n},{\"_process\":72}],74:[function(require,module,exports){\nfunction cleanUrl(t){\"use strict\";return/^https?/.test(t.getScheme())?t.toString():/^mailto?/.test(t.getScheme())?t.toString():\"data\"==t.getScheme()&&/^image/.test(t.getPath())?t.toString():void 0}function cleanId(t){return t}var html_sanitize=require(\"./sanitizer-bundle.js\");module.exports=function(t){return t?html_sanitize(t,cleanUrl,cleanId):\"\"};\n},{\"./sanitizer-bundle.js\":75}],75:[function(require,module,exports){\nvar URI=function(){function e(e){var t=(\"\"+e).match(p);return t?new s(c(t[1]),c(t[2]),c(t[3]),c(t[4]),c(t[5]),c(t[6]),c(t[7])):null}function t(e,t,o,i,l,c,m){var u=new s(n(e,d),n(t,d),a(o),i>0?i.toString():null,n(l,f),null,a(m));return c&&(\"string\"==typeof c?u.setRawQuery(c.replace(/[^?&=0-9A-Za-z_\\-~.%]/g,r)):u.setAllParameters(c)),u}function a(e){return\"string\"==typeof e?encodeURIComponent(e):null}function n(e,t){return\"string\"==typeof e?encodeURI(e).replace(t,r):null}function r(e){var t=e.charCodeAt(0);return\"%\"+\"0123456789ABCDEF\".charAt(t>>4&15)+\"0123456789ABCDEF\".charAt(15&t)}function o(e){return e.replace(/(^|\\/)\\.(?:\\/|$)/g,\"$1\").replace(/\\/{2,}/g,\"/\")}function i(e){if(null===e)return null;for(var t,a=o(e),n=u;(t=a.replace(n,\"$1\"))!=a;a=t);return a}function l(e,t){var a=e.clone(),n=t.hasScheme();n?a.setRawScheme(t.getRawScheme()):n=t.hasCredentials(),n?a.setRawCredentials(t.getRawCredentials()):n=t.hasDomain(),n?a.setRawDomain(t.getRawDomain()):n=t.hasPort();var r=t.getRawPath(),o=i(r);if(n)a.setPort(t.getPort()),o=o&&o.replace(h,\"\");else if(n=!!r){if(47!==o.charCodeAt(0)){var l=i(a.getRawPath()||\"\").replace(h,\"\"),s=l.lastIndexOf(\"/\")+1;o=i((s?l.substring(0,s):\"\")+i(r)).replace(h,\"\")}}else o=o&&o.replace(h,\"\"),o!==r&&a.setRawPath(o);return n?a.setRawPath(o):n=t.hasQuery(),n?a.setRawQuery(t.getRawQuery()):n=t.hasFragment(),n&&a.setRawFragment(t.getRawFragment()),a}function s(e,t,a,n,r,o,i){this.scheme_=e,this.credentials_=t,this.domain_=a,this.port_=n,this.path_=r,this.query_=o,this.fragment_=i,this.paramCache_=null}function c(e){return\"string\"==typeof e&&e.length>0?e:null}var m=new RegExp(\"(/|^)(?:[^./][^/]*|\\\\.{2,}(?:[^./][^/]*)|\\\\.{3,}[^/]*)/\\\\.\\\\.(?:/|$)\"),u=new RegExp(m),h=/^(?:\\.\\.\\/)*(?:\\.\\.$)?/;s.prototype.toString=function(){var e=[];return null!==this.scheme_&&e.push(this.scheme_,\":\"),null!==this.domain_&&(e.push(\"//\"),null!==this.credentials_&&e.push(this.credentials_,\"@\"),e.push(this.domain_),null!==this.port_&&e.push(\":\",this.port_.toString())),null!==this.path_&&e.push(this.path_),null!==this.query_&&e.push(\"?\",this.query_),null!==this.fragment_&&e.push(\"#\",this.fragment_),e.join(\"\")},s.prototype.clone=function(){return new s(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)},s.prototype.getScheme=function(){return this.scheme_&&decodeURIComponent(this.scheme_).toLowerCase()},s.prototype.getRawScheme=function(){return this.scheme_},s.prototype.setScheme=function(e){return this.scheme_=n(e,d),this},s.prototype.setRawScheme=function(e){return this.scheme_=e?e:null,this},s.prototype.hasScheme=function(){return null!==this.scheme_},s.prototype.getCredentials=function(){return this.credentials_&&decodeURIComponent(this.credentials_)},s.prototype.getRawCredentials=function(){return this.credentials_},s.prototype.setCredentials=function(e){return this.credentials_=n(e,d),this},s.prototype.setRawCredentials=function(e){return this.credentials_=e?e:null,this},s.prototype.hasCredentials=function(){return null!==this.credentials_},s.prototype.getDomain=function(){return this.domain_&&decodeURIComponent(this.domain_)},s.prototype.getRawDomain=function(){return this.domain_},s.prototype.setDomain=function(e){return this.setRawDomain(e&&encodeURIComponent(e))},s.prototype.setRawDomain=function(e){return this.domain_=e?e:null,this.setRawPath(this.path_)},s.prototype.hasDomain=function(){return null!==this.domain_},s.prototype.getPort=function(){return this.port_&&decodeURIComponent(this.port_)},s.prototype.setPort=function(e){if(e){if(e=Number(e),e!==(65535&e))throw new Error(\"Bad port number \"+e);this.port_=\"\"+e}else this.port_=null;return this},s.prototype.hasPort=function(){return null!==this.port_},s.prototype.getPath=function(){return this.path_&&decodeURIComponent(this.path_)},s.prototype.getRawPath=function(){return this.path_},s.prototype.setPath=function(e){return this.setRawPath(n(e,f))},s.prototype.setRawPath=function(e){return e?(e=String(e),this.path_=!this.domain_||/^\\//.test(e)?e:\"/\"+e):this.path_=null,this},s.prototype.hasPath=function(){return null!==this.path_},s.prototype.getQuery=function(){return this.query_&&decodeURIComponent(this.query_).replace(/\\+/g,\" \")},s.prototype.getRawQuery=function(){return this.query_},s.prototype.setQuery=function(e){return this.paramCache_=null,this.query_=a(e),this},s.prototype.setRawQuery=function(e){return this.paramCache_=null,this.query_=e?e:null,this},s.prototype.hasQuery=function(){return null!==this.query_},s.prototype.setAllParameters=function(e){if(\"object\"==typeof e&&!(e instanceof Array)&&(e instanceof Object||\"[object Array]\"!==Object.prototype.toString.call(e))){var t=[],a=-1;for(var n in e){var r=e[n];\"string\"==typeof r&&(t[++a]=n,t[++a]=r)}e=t}this.paramCache_=null;for(var o=[],i=\"\",l=0;lm;){var f=a[m++],g=a[m];switch(f){case\"&\":O.test(g)?(t.pcdata&&t.pcdata(\"&\"+g,o,Y,c(t,a,m,r,o)),m++):t.pcdata&&t.pcdata(\"&\",o,Y,c(t,a,m,r,o));break;case\"\"===a[m+1]?(m+=2,s=i[1].toLowerCase(),t.endTag&&t.endTag(s,o,Y,c(t,a,m,r,o))):m=h(a,m,t,o,Y,r):t.pcdata&&t.pcdata(\"</\",o,Y,c(t,a,m,r,o));break;case\"<\":if(i=/^([-\\w:]+)\\s*\\/?/.exec(g))if(i[0].length===g.length&&\">\"===a[m+1]){m+=2,s=i[1].toLowerCase(),t.startTag&&t.startTag(s,[],o,Y,c(t,a,m,r,o));var E=e.ELEMENTS[s];if(E&j){var T={name:s,next:m,eflags:E};m=d(a,T,t,o,Y,r)}}else m=p(a,m,t,o,Y,r);else t.pcdata&&t.pcdata(\"<\",o,Y,c(t,a,m,r,o));break;case\"