diff --git a/docs/assets/AboutView-BC-NYkeb.js b/docs/assets/AboutView-ChuzRpxH.js similarity index 96% rename from docs/assets/AboutView-BC-NYkeb.js rename to docs/assets/AboutView-ChuzRpxH.js index 20f5dc2..d2a452a 100644 --- a/docs/assets/AboutView-BC-NYkeb.js +++ b/docs/assets/AboutView-ChuzRpxH.js @@ -1 +1 @@ -import{_ as o,c as t,a as e,b as a,o as i}from"./index-BFsNrzX2.js";const r={},s={class:"about"};function l(d,n){return i(),t("div",s,n[0]||(n[0]=[e("div",{class:"container"},[e("h1",null,"More about the Vermont Zoning Atlas"),e("h3",null,"Team"),e("p",null," Inspired by Sara Bronin’s keynote speech at the 2022 Vermont Statewide Housing Conference, University of Vermont students Yoshi Bird and Michael Arnold approached the state and other partners about creating a dataset that could visualize geospatial distributions of land use regulations across Vermont down to the individual district level. Emily Sun, a planner from New York City and Middlebury graduate, volunteered as the founding Zoning Analyst Team Lead, supported by Dr. William Hegman of Middlebury College, while Colin Dowey, former of the Agency of Commerce and Community Development, acted as the consulting Geospatial Lead. "),e("p",null," Key partners who provided additional staffing to organize and lead sub-teams included Kendall Fortney of the Vermont Open Source Research Office (UVM VERSO), Catherine Dimitruk of the Northwest Regional Planning Commission, and Leslie Black-Plumeau of the Vermont Housing Finance Agency. Significant funding for student interns was provided by the University of Vermont Geography and Geosciences Department, Gund Fund for the Environment, and College of Arts & Sciences Fellowship program. "),e("p",null," In August 2024, the project officially transferred ownership to VERSO and the University of Vermont’s Open Source Programs Office under the leadership of Director Kendall Fortney, which will continue to coordinate the ongoing collection of a custom data subset in partnership with the Regional Planning Commissions, Town Planners, the Agency of Commerce and Community Development, and the Vermont Center for Geographic Information. "),e("img",{alt:"Vue logo",class:"logo",src:a,width:"45",height:"45"})],-1)]))}const u=o(r,[["render",l]]);export{u as default}; +import{_ as o,c as t,a as e,b as a,o as i}from"./index-c6WmwPhX.js";const r={},s={class:"about"};function l(d,n){return i(),t("div",s,n[0]||(n[0]=[e("div",{class:"container"},[e("h1",null,"More about the Vermont Zoning Atlas"),e("h3",null,"Team"),e("p",null," Inspired by Sara Bronin’s keynote speech at the 2022 Vermont Statewide Housing Conference, University of Vermont students Yoshi Bird and Michael Arnold approached the state and other partners about creating a dataset that could visualize geospatial distributions of land use regulations across Vermont down to the individual district level. Emily Sun, a planner from New York City and Middlebury graduate, volunteered as the founding Zoning Analyst Team Lead, supported by Dr. William Hegman of Middlebury College, while Colin Dowey, former of the Agency of Commerce and Community Development, acted as the consulting Geospatial Lead. "),e("p",null," Key partners who provided additional staffing to organize and lead sub-teams included Kendall Fortney of the Vermont Open Source Research Office (UVM VERSO), Catherine Dimitruk of the Northwest Regional Planning Commission, and Leslie Black-Plumeau of the Vermont Housing Finance Agency. Significant funding for student interns was provided by the University of Vermont Geography and Geosciences Department, Gund Fund for the Environment, and College of Arts & Sciences Fellowship program. "),e("p",null," In August 2024, the project officially transferred ownership to VERSO and the University of Vermont’s Open Source Programs Office under the leadership of Director Kendall Fortney, which will continue to coordinate the ongoing collection of a custom data subset in partnership with the Regional Planning Commissions, Town Planners, the Agency of Commerce and Community Development, and the Vermont Center for Geographic Information. "),e("img",{alt:"Vue logo",class:"logo",src:a,width:"45",height:"45"})],-1)]))}const u=o(r,[["render",l]]);export{u as default}; diff --git a/docs/assets/index-BFsNrzX2.js b/docs/assets/index-c6WmwPhX.js similarity index 95% rename from docs/assets/index-BFsNrzX2.js rename to docs/assets/index-c6WmwPhX.js index be1748c..4a5dd28 100644 --- a/docs/assets/index-BFsNrzX2.js +++ b/docs/assets/index-c6WmwPhX.js @@ -2186,4 +2186,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var s0=function(l,u){return s0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,A){_.__proto__=A}||function(_,A){for(var P in A)A.hasOwnProperty(P)&&(_[P]=A[P])},s0(l,u)};function vR(l,u){s0(l,u);function _(){this.constructor=l}l.prototype=u===null?Object.create(u):(_.prototype=u.prototype,new _)}function nh(l,u,_,A){function P(L){return L instanceof _?L:new _(function(B){B(L)})}return new(_||(_=Promise))(function(L,B){function q(Q){try{W(A.next(Q))}catch(ie){B(ie)}}function n(Q){try{W(A.throw(Q))}catch(ie){B(ie)}}function W(Q){Q.done?L(Q.value):P(Q.value).then(q,n)}W((A=A.apply(l,[])).next())})}function ml(l,u){var _={label:0,sent:function(){if(L[0]&1)throw L[1];return L[1]},trys:[],ops:[]},A,P,L,B;return B={next:q(0),throw:q(1),return:q(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function q(W){return function(Q){return n([W,Q])}}function n(W){if(A)throw new TypeError("Generator is already executing.");for(;_;)try{if(A=1,P&&(L=W[0]&2?P.return:W[0]?P.throw||((L=P.return)&&L.call(P),0):P.next)&&!(L=L.call(P,W[1])).done)return L;switch(P=0,L&&(W=[W[0]&2,L.value]),W[0]){case 0:case 1:L=W;break;case 4:return _.label++,{value:W[1],done:!1};case 5:_.label++,P=W[1],W=[0];continue;case 7:W=_.ops.pop(),_.trys.pop();continue;default:if(L=_.trys,!(L=L.length>0&&L[L.length-1])&&(W[0]===6||W[0]===2)){_=0;continue}if(W[0]===3&&(!L||W[1]>L[0]&&W[1]=l.length&&(l=void 0),{value:l&&l[A++],done:!l}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ef(l){return this instanceof Ef?(this.v=l,this):new Ef(l)}function bR(l,u,_){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=_.apply(l,u||[]),P,L=[];return P={},B("next"),B("throw"),B("return"),P[Symbol.asyncIterator]=function(){return this},P;function B(de){A[de]&&(P[de]=function(ve){return new Promise(function(Je,it){L.push([de,ve,Je,it])>1||q(de,ve)})})}function q(de,ve){try{n(A[de](ve))}catch(Je){ie(L[0][3],Je)}}function n(de){de.value instanceof Ef?Promise.resolve(de.value.v).then(W,Q):ie(L[0][2],de)}function W(de){q("next",de)}function Q(de){q("throw",de)}function ie(de,ve){de(ve),L.shift(),L.length&&q(L[0][0],L[0][1])}}var wE=function(l){vR(u,l);function u(_){var A=l.call(this,_)||this;return Object.defineProperty(A,"name",{value:"RepeaterOverflowError",enumerable:!1}),typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(A,A.constructor.prototype):A.__proto__=A.constructor.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(A,A.constructor),A}return u}(Error);(function(){function l(u){if(u<0)throw new RangeError("Capacity may not be less than 0");this._c=u,this._q=[]}return Object.defineProperty(l.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"full",{get:function(){return this._q.length>=this._c},enumerable:!1,configurable:!0}),l.prototype.add=function(u){if(this.full)throw new Error("Buffer full");this._q.push(u)},l.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},l})();(function(){function l(u){if(u<1)throw new RangeError("Capacity may not be less than 1");this._c=u,this._q=[]}return Object.defineProperty(l.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),l.prototype.add=function(u){for(;this._q.length>=this._c;)this._q.shift();this._q.push(u)},l.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},l})();(function(){function l(u){if(u<1)throw new RangeError("Capacity may not be less than 1");this._c=u,this._q=[]}return Object.defineProperty(l.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),l.prototype.add=function(u){this._q.length=Jm;return Promise.resolve(u).then(function(A){return!_&&l.state>=a0?Ju(l).then(function(P){return{value:P,done:!0}}):{value:A,done:_}})}function U0(l,u){var _,A;if(!(l.state>=yc))if(l.state=yc,l.onnext(),l.onstop(),l.err==null&&(l.err=u),l.pushes.length===0&&(typeof l.buffer>"u"||l.buffer.empty))pf(l);else try{for(var P=lh(l.pushes),L=P.next();!L.done;L=P.next()){var B=L.value;B.resolve()}}catch(q){_={error:q}}finally{try{L&&!L.done&&(A=P.return)&&A.call(P)}finally{if(_)throw _.error}}}function pf(l){var u,_;if(!(l.state>=Jm)){l.state=a0||(l.state=Qm)throw new wE("No more than "+Qm+" pending calls to push are allowed on a single repeater.");if(l.state>=yc)return Promise.resolve(void 0);var _=l.pending===void 0?Promise.resolve(u):l.pending.then(function(){return u});_=_.catch(function(n){l.state=_w)){l.state=_w;var u=wR.bind(null,l),_=TR(l);l.execution=new Promise(function(A){return A(l.executor(u,_))}),l.execution.catch(function(){return U0(l)})}}var Cm=new WeakMap,zf=function(){function l(u,_){Cm.set(this,{executor:u,buffer:_,err:void 0,state:Fy,pushes:[],nexts:[],pending:void 0,execution:void 0,onnext:e_,onstop:e_})}return l.prototype.next=function(u){o0(u);var _=Cm.get(this);if(_===void 0)throw new Error("WeakMap error");if(_.nexts.length>=Qm)throw new wE("No more than "+Qm+" pending calls to next are allowed on a single repeater.");if(_.state<=Fy&&ER(_),_.onnext(u),typeof _.buffer<"u"&&!_.buffer.empty){var A=dc(_,_.buffer.remove());if(_.pushes.length){var P=_.pushes.shift();_.buffer.add(P.value),_.onnext=P.resolve}return A}else if(_.pushes.length){var L=_.pushes.shift();return _.onnext=L.resolve,dc(_,L.value)}else if(_.state>=yc)return pf(_),dc(_,Ju(_));return new Promise(function(B){return _.nexts.push({resolve:B,value:u})})},l.prototype.return=function(u){o0(u);var _=Cm.get(this);if(_===void 0)throw new Error("WeakMap error");return pf(_),_.execution=Promise.resolve(_.execution).then(function(){return u}),dc(_,Ju(_))},l.prototype.throw=function(u){var _=Cm.get(this);if(_===void 0)throw new Error("WeakMap error");return _.state<=Fy||_.state>=yc||typeof _.buffer<"u"&&!_.buffer.empty?(pf(_),_.err==null&&(_.err=u),dc(_,Ju(_))):this.next(Promise.reject(u))},l.prototype[Symbol.asyncIterator]=function(){return this},l.race=SR,l.merge=MR,l.zip=AR,l.latest=IR,l}();function C_(l,u){var _,A,P=[],L=function(W){W!=null&&typeof W[Symbol.asyncIterator]=="function"?P.push(W[Symbol.asyncIterator]()):W!=null&&typeof W[Symbol.iterator]=="function"?P.push(W[Symbol.iterator]()):P.push(function(){return bR(this,arguments,function(){return ml(this,function(de){switch(de.label){case 0:return u.yieldValues?[4,Ef(W)]:[3,3];case 1:return[4,de.sent()];case 2:de.sent(),de.label=3;case 3:return u.returnValues?[4,Ef(W)]:[3,5];case 4:return[2,de.sent()];case 5:return[2]}})})}())};try{for(var B=lh(l),q=B.next();!q.done;q=B.next()){var n=q.value;L(n)}}catch(W){_={error:W}}finally{try{q&&!q.done&&(A=B.return)&&A.call(B)}finally{if(_)throw _.error}}return P}function SR(l){var u=this,_=C_(l,{returnValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n,W,Q;return ml(this,function(ie){switch(ie.label){case 0:if(!_.length)return P(),[2];B=!1,P.then(function(){L(),B=!0}),ie.label=1;case 1:ie.trys.push([1,,5,7]),n=void 0,W=0,Q=function(){var de,ve,Je,it,gt,Bt;return ml(this,function(Ye){switch(Ye.label){case 0:de=W;try{for(ve=(gt=void 0,lh(_)),Je=ve.next();!Je.done;Je=ve.next())it=Je.value,Promise.resolve(it.next()).then(function(St){St.done?(P(),q===void 0&&(q=St)):W===de&&(W++,L(St))},function(St){return P(St)})}catch(St){gt={error:St}}finally{try{Je&&!Je.done&&(Bt=ve.return)&&Bt.call(ve)}finally{if(gt)throw gt.error}}return[4,new Promise(function(St){return L=St})];case 1:return n=Ye.sent(),n===void 0?[3,3]:[4,A(n.value)];case 2:Ye.sent(),Ye.label=3;case 3:return[2]}})},ie.label=2;case 2:return B?[3,4]:[5,Q()];case 3:return ie.sent(),[3,2];case 4:return[2,q&&q.value];case 5:return P(),[4,Promise.race(_.map(function(de){return de.return&&de.return()}))];case 6:return ie.sent(),[7];case 7:return[2]}})})})}function MR(l){var u=this,_=C_(l,{yieldValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n=this;return ml(this,function(W){switch(W.label){case 0:if(!_.length)return P(),[2];L=[],B=!1,P.then(function(){var Q,ie;B=!0;try{for(var de=lh(L),ve=de.next();!ve.done;ve=de.next()){var Je=ve.value;Je()}}catch(it){Q={error:it}}finally{try{ve&&!ve.done&&(ie=de.return)&&ie.call(de)}finally{if(Q)throw Q.error}}}),W.label=1;case 1:return W.trys.push([1,,3,4]),[4,Promise.all(_.map(function(Q,ie){return nh(n,void 0,void 0,function(){var de,ve;return ml(this,function(Je){switch(Je.label){case 0:Je.trys.push([0,,6,9]),Je.label=1;case 1:return B?[3,5]:(Promise.resolve(Q.next()).then(function(it){return L[ie](it)},function(it){return P(it)}),[4,new Promise(function(it){L[ie]=it})]);case 2:return de=Je.sent(),de===void 0?[3,4]:de.done?(q=de,[2]):[4,A(de.value)];case 3:Je.sent(),Je.label=4;case 4:return[3,1];case 5:return[3,9];case 6:return ve=Q.return,ve?[4,Q.return()]:[3,8];case 7:ve=Je.sent(),Je.label=8;case 8:return[7];case 9:return[2]}})})}))];case 2:return W.sent(),[2,q&&q.value];case 3:return P(),[7];case 4:return[2]}})})})}function AR(l){var u=this,_=C_(l,{returnValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n;return ml(this,function(W){switch(W.label){case 0:if(!_.length)return P(),[2,[]];B=!1,P.then(function(){L(),B=!0}),W.label=1;case 1:W.trys.push([1,,6,8]),W.label=2;case 2:return B?[3,5]:(Promise.all(_.map(function(Q){return Q.next()})).then(function(Q){return L(Q)},function(Q){return P(Q)}),[4,new Promise(function(Q){return L=Q})]);case 3:return q=W.sent(),q===void 0?[2]:(n=q.map(function(Q){return Q.value}),q.some(function(Q){return Q.done})?[2,n]:[4,A(n)]);case 4:return W.sent(),[3,2];case 5:return[3,8];case 6:return P(),[4,Promise.all(_.map(function(Q){return Q.return&&Q.return()}))];case 7:return W.sent(),[7];case 8:return[2]}})})})}function IR(l){var u=this,_=C_(l,{yieldValues:!0,returnValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n,W,Q=this;return ml(this,function(ie){switch(ie.label){case 0:if(!_.length)return P(),[2,[]];B=[],q=!1,P.then(function(){var de,ve;L();try{for(var Je=lh(B),it=Je.next();!it.done;it=Je.next()){var gt=it.value;gt()}}catch(Bt){de={error:Bt}}finally{try{it&&!it.done&&(ve=Je.return)&&ve.call(Je)}finally{if(de)throw de.error}}q=!0}),ie.label=1;case 1:return ie.trys.push([1,,5,7]),Promise.all(_.map(function(de){return de.next()})).then(function(de){return L(de)},function(de){return P(de)}),[4,new Promise(function(de){return L=de})];case 2:return n=ie.sent(),n===void 0?[2]:(W=n.map(function(de){return de.value}),n.every(function(de){return de.done})?[2,W]:[4,A(W.slice())]);case 3:return ie.sent(),[4,Promise.all(_.map(function(de,ve){return nh(Q,void 0,void 0,function(){var Je;return ml(this,function(it){switch(it.label){case 0:if(n[ve].done)return[2,n[ve].value];it.label=1;case 1:return q?[3,4]:(Promise.resolve(de.next()).then(function(gt){return B[ve](gt)},function(gt){return P(gt)}),[4,new Promise(function(gt){return B[ve]=gt})]);case 2:return Je=it.sent(),Je===void 0?[2,n[ve].value]:Je.done?[2,Je.value]:(W[ve]=Je.value,[4,A(W.slice())]);case 3:return it.sent(),[3,1];case 4:return[2]}})})}))];case 4:return[2,ie.sent()];case 5:return P(),[4,Promise.all(_.map(function(de){return de.return&&de.return()}))];case 6:return ie.sent(),[7];case 7:return[2]}})})})}const f_=class f_{constructor(){Er(this,"_extraRequestThreshold",262144)}extraRequestThreshold(){return this._extraRequestThreshold}setExtraRequestThreshold(u){if(u<0)throw Error("extraRequestThreshold cannot be negative");this._extraRequestThreshold=u}};Er(f_,"global",new f_);let t_=f_;const CR=40,PR=16;function j0(l,u){u=Math.min(Math.max(+u,2),65535);let _=l,A=_;do A+=_=Math.ceil(_/u);while(_!==1);return 40*A}function RR(l,u){if(u<2)throw Error("Node size must be at least 2");if(l===0)throw Error("Number of items must be greater than 0");let _=l,A=_,P=[_];do A+=_=Math.ceil(_/u),P.push(_);while(_!==1);let L=[];for(let q of(_=A,P))L.push(_-q),_-=q;let B=[];for(let q=0;q=Q,it=(()=>{let[,Ye]=W[de.level()],St=Math.min(de.endNodeIdx()+u,Ye);return Je&&StBt.getFloat64(Dt+16,!0)||B>Bt.getFloat64(Dt+24,!0))continue;let _t=Bt.getBigUint64(Dt+32,!0);if(Je){let dr=(()=>{if(!(Ye{let dr=de.level()-1;return new P([Number(_t),Number(_t)+1],dr)})();di!==void 0&&(di.level(),Ot.level()),ie.push(Ot)}}}const fc=new Uint8Array([102,103,98,3,102,103,98,0]),sa=4;class G0{constructor(u,_,A,P,L){Er(this,"headerClient");Er(this,"header");Er(this,"headerLength");Er(this,"indexLength");Er(this,"nocache");this.headerClient=u,this.header=_,this.headerLength=A,this.indexLength=P,this.nocache=L}static async open(u,_){let A,P=new yw(u,_),L=2024+(()=>{let W,Q=0;for(W=0;W<3;W++)Q+=PR**W*CR;return Q})();if(!new Uint8Array(await P.getRange(0,8,L,"header")).subarray(0,3).every((W,Q)=>fc[Q]===W))throw Error("Not a FlatGeobuf file");if((A=new DataView(await P.getRange(8,4,L,"header")).getUint32(0,!0))>10485760||A<8)throw Error("Invalid header size");let B=await P.getRange(12,A,L,"header"),q=V0(new aa(new Uint8Array(B))),n=j0(q.featuresCount,q.indexNodeSize);return new G0(P,q,A,n,_)}async*selectBbox(u){let _=this.lengthBeforeTree(),A=this.headerClient,P=async function(n,W){return A.getRange(_+n,W,0,"index")},L=[],B=[];for await(let n of zR(this.header.featuresCount,this.header.indexNodeSize,u,P)){let[W,Q]=n,[,,ie]=n;if(ie||(ie=4),B.length==0){B.push([W,ie,Q]);continue}let de=B[B.length-1];W-(de[0]+de[1])>t_.global.extraRequestThreshold()&&(L.push(B),B=[]),B.push([W,ie,Q])}this.headerClient.logUsage("header+index"),B.length>0&&L.push(B);let q=L.flatMap(n=>this.readFeatureBatch(n,this.nocache));yield*zf.merge(q)}lengthBeforeTree(){return fc.length+sa+this.headerLength}lengthBeforeFeatures(){return this.lengthBeforeTree()+this.indexLength}buildFeatureClient(u){return new yw(this.headerClient.httpClient,u)}async*readFeatureBatch(u,_){let[A]=u[0],[P,L]=u[u.length-1],B=this.buildFeatureClient(_),q=P+L-A;for(let[n,,W]of u){let Q=await this.readFeature(B,n,q);yield{id:W,feature:Q},q=0}B.logUsage("feature")}async readFeature(u,_,A){let P,L=_+this.lengthBeforeFeatures();P=new DataView(await u.getRange(L,4,A,"feature length")).getUint32(0,!0);let B=new Uint8Array(await u.getRange(L+4,P,A,"feature data")),q=new Uint8Array(P+sa);q.set(B,sa);let n=new aa(q);return n.setPosition(sa),to.getRootAsFeature(n)}}class yw{constructor(u,_){Er(this,"httpClient");Er(this,"bytesEverUsed",0);Er(this,"bytesEverFetched",0);Er(this,"buffer",new ArrayBuffer(0));Er(this,"head",0);if(typeof u=="string")this.httpClient=new xw(u,_);else if(u instanceof xw)this.httpClient=u;else throw Error("Unknown source ")}async getRange(u,_,A,P){this.bytesEverUsed+=_;let L=u-this.head,B=L+_;if(L>=0&&B<=this.buffer.byteLength)return this.buffer.slice(L,B);let q=Math.max(_,A);return this.bytesEverFetched+=q,this.buffer=await this.httpClient.getRange(u,q,P),this.head=u,this.buffer.slice(0,_)}logUsage(u){u.split(" ")[0],(100*this.bytesEverUsed/this.bytesEverFetched).toFixed(2)}}class xw{constructor(u,_){Er(this,"url");Er(this,"nocache");Er(this,"requestsEverMade",0);Er(this,"bytesEverRequested",0);this.url=u,this.nocache=_}async getRange(u,_,A){this.requestsEverMade+=1,this.bytesEverRequested+=_;let P={Range:`bytes=${u}-${u+_-1}`};return this.nocache&&(P["Cache-Control"]="no-cache, no-store"),(await fetch(this.url,{headers:P})).arrayBuffer()}}function DR(l,u,_){if(!l.subarray(0,3).every((Q,ie)=>fc[ie]===Q))throw Error("Not a FlatGeobuf file");let A=new aa(l),P=A.readUint32(fc.length);A.setPosition(fc.length+sa);let L=V0(A),B=fc.length+sa+P,{indexNodeSize:q,featuresCount:n}=L;q>0&&(B+=j0(n,q));let W=[];for(;Bawait P.slice(ve),B=new Uint8Array(await L(8));if(!B.subarray(0,3).every((ve,Je)=>fc[Je]===ve))throw Error("Not a FlatGeobuf file");B=new Uint8Array(await L(4));let q=new aa(B),n=q.readUint32(0);B=new Uint8Array(await L(n));let W=V0(q=new aa(B)),{indexNodeSize:Q,featuresCount:ie}=W;if(Q>0){let ve=j0(ie,Q);await L(ve)}let de=0;for(;A=await OR(L,W,u,de++);)yield A}async function*kR(l,u,_,A,P=!1){let L=await G0.open(l,P);for await(let B of L.selectBbox(u))yield _(B.id,B.feature,L.header)}async function OR(l,u,_,A){let P=new Uint8Array(await l(4,"feature length"));if(P.byteLength===0)return;let L=new aa(P),B=L.readUint32(0);P=new Uint8Array(await l(B,"feature data"));let q=new Uint8Array(B+4);return q.set(P,4),(L=new aa(q)).setPosition(sa),_(A,to.getRootAsFeature(L),u)}const FR={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class TE{constructor(u){this.code_=u.code,this.units_=u.units,this.extent_=u.extent!==void 0?u.extent:null,this.worldExtent_=u.worldExtent!==void 0?u.worldExtent:null,this.axisOrientation_=u.axisOrientation!==void 0?u.axisOrientation:"enu",this.global_=u.global!==void 0?u.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=u.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=u.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||FR[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(u){this.global_=u,this.canWrapX_=!!(u&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(u){this.defaultTileGrid_=u}setExtent(u){this.extent_=u,this.canWrapX_=!!(this.global_&&u)}setWorldExtent(u){this.worldExtent_=u}setGetPointResolution(u){this.getPointResolutionFunc_=u}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Df=6378137,ju=Math.PI*Df,BR=[-ju,-ju,ju,ju],NR=[-180,-85,180,85],Pm=Df*Math.log(Math.tan(Math.PI/2));class Bu extends TE{constructor(u){super({code:u,units:"m",extent:BR,global:!0,worldExtent:NR,getPointResolution:function(_,A){return _/Math.cosh(A[1]/Df)}})}}const vw=[new Bu("EPSG:3857"),new Bu("EPSG:102100"),new Bu("EPSG:102113"),new Bu("EPSG:900913"),new Bu("http://www.opengis.net/def/crs/EPSG/0/3857"),new Bu("http://www.opengis.net/gml/srs/epsg.xml#3857")];function VR(l,u,_,A){const P=l.length;_=_>1?_:2,A=A??_,u===void 0&&(_>2?u=l.slice():u=new Array(P));for(let L=0;LPm?B=Pm:B<-Pm&&(B=-Pm),u[L+1]=B}return u}function UR(l,u,_,A){const P=l.length;_=_>1?_:2,A=A??_,u===void 0&&(_>2?u=l.slice():u=new Array(P));for(let L=0;LL.coordinates)}}let A=function(P,L){let B=P.xyArray(),q=P.zArray();switch(L){case xn.Point:{let n=Array.from(B);return q&&n.push(q[0]),n}case xn.MultiPoint:case xn.LineString:return Oy(B,q);case xn.MultiLineString:case xn.Polygon:return function(n,W,Q){let ie;if(!Q||Q.length===0)return[Oy(n,W)];let de=0,ve=Array.from(Q).map(Je=>n.slice(de,de=Je<<1));return W&&(de=0,ie=Array.from(Q).map(Je=>W.slice(de,de=Je))),ve.map((Je,it)=>Oy(Je,ie?ie[it]:void 0))}(B,q,P.endsArray())}}(l,_);return{type:xn[_],coordinates:A}}function q0(l,u,_){let A=_.columns;return{type:"Feature",id:l,geometry:l0(u.geometry(),_.geometryType),properties:xR(u,A)}}function WR(l,u){return{type:"FeatureCollection",features:DR(l,q0)}}function XR(l,u){return LR(l,q0)}function YR(l,u,_,A=!1){return kR(l,u,q0,_,A)}function SE(l,u,_,A=!1){return l instanceof Uint8Array?WR(l):l instanceof ReadableStream?XR(l):YR(l,u,_,A)}const KR={class:"map-container"},JR={__name:"MontpelierMap",props:{mapboxToken:{type:String,required:!0},fgbPath:{type:String,required:!0},initialCenter:{type:Array,default:()=>[-72.575,44.2601],required:!1},initialZoom:{type:Number,default:9},layerToHighlight:{type:String,default:"Nonresidential",requred:!1}},setup(l){const u=l,_=oo([]),A=oo(!1);Yu(u,q=>{console.log("props changed",q.layerToHighlight),q.layerToHighlight==2&&P()},{deep:!1});const P=()=>{console.log("toggle",L),L&&(A.value=!A.value,A.value?(L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",["==",["get","Type_of_Zoning_District"],"Nonresidential"]),L.setPaintProperty("fgb-layer","fill-opacity",.9)},300)):(L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",null),L.setPaintProperty("fgb-layer","fill-opacity",.9)},100)))};let L;const B=()=>{L=new Ku.Map({accessToken:u.mapboxToken,container:"map",style:"mapbox://styles/mapbox/light-v11",center:u.initialCenter,zoom:12});const q=document.getElementById("loading"),n=document.getElementById("progress"),W=document.getElementById("legend");let Q=0,ie=null;const de=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999","#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3","#7fc97f","#beaed4","#fdc086"],ve=new Map;let Je=0;function it(Ye){return ve.has(Ye)||(ve.set(Ye,de[Je%de.length]),Je++,gt()),ve.get(Ye)}function gt(){const Ye=document.createElement("div");for(Array.from(ve.entries()).sort((St,Dt)=>St[0].localeCompare(Dt[0])).forEach(([St,Dt])=>{const _t=document.createElement("div");_t.innerHTML=`
${St}`,Ye.appendChild(_t)});W.childNodes.length>2;)W.removeChild(W.lastChild);W.appendChild(Ye)}function Bt(Ye){Q=Ye,n.textContent=`Loaded ${Ye} features`}L.on("load",async()=>{try{q.style.display="block",n.style.display="block",console.log("Starting to load FlatGeoBuf data..."),L.addSource("fgb-data",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),L.addLayer({id:"fgb-layer",type:"fill",source:"fgb-data",paint:{"fill-color":"#ccc","fill-opacity":.7,"fill-outline-color":"#000"}}),ie=L.getSource("fgb-data");let Ye=[];const St=await fetch("../data/vt-zoning-spatial-index.fgb");if(!St.ok)throw new Error(`HTTP error! status: ${St.status}`);for await(const _t of SE(St.body)){const Ai=_t.properties.Type_of_Zoning_District||"Unknown";if(it(Ai),Ye.push(_t),Q++,Q%100===0&&(Bt(Q),ie.setData({type:"FeatureCollection",features:Ye}),ve.size>0)){const di=["match",["get","Type_of_Zoning_District"]];for(const[Ot,dr]of ve)di.push(Ot),di.push(dr);di.push("#ccc"),L.setPaintProperty("fgb-layer","fill-color",di)}}ie.setData({type:"FeatureCollection",features:Ye}),_.value=Ye;const Dt=new Ku.LngLatBounds;Ye.forEach(_t=>{if(_t.geometry){const Ai=_t.geometry.coordinates;_t.geometry.type==="Polygon"?Ai[0].forEach(di=>Dt.extend(di)):_t.geometry.type==="Point"&&Dt.extend(Ai)}}),L.fitBounds(Dt,{padding:50}),L.setZoom(11),console.log("Map visualization complete")}catch(Ye){console.error("Error loading FlatGeoBuf data:",Ye),q.textContent="Error loading data"}finally{q.style.display="none",n.style.display="none"}}),L.on("click","fgb-layer",Ye=>{if(!Ye.features.length)return;const St=Ye.features[0],Dt=Ye.lngLat,_t=Object.entries(St.properties).map(([Ai,di])=>`${Ai}: ${di}`).join("
");new Ku.Popup().setLngLat(Dt).setHTML(_t).addTo(L)}),L.on("mouseenter","fgb-layer",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","fgb-layer",()=>{L.getCanvas().style.cursor=""})};return Cf(()=>{B()}),E_(()=>{L.value&&L.value.remove()}),(q,n)=>(Ro(),fl("div",KR,[ci("button",{onClick:P,class:x_([{active:A.value},"filter-button"])},$m(A.value?"Show All":"Show Nonresidential"),3),n[0]||(n[0]=ci("div",{id:"map"},null,-1)),n[1]||(n[1]=ci("div",{id:"loading",class:"loading"},"Loading data...",-1)),n[2]||(n[2]=ci("div",{id:"progress"},null,-1)),n[3]||(n[3]=ci("div",{id:"legend",class:"legend"},[ci("h4",null,"Primary zoning classification")],-1))]))}},QR={class:"map-container"},ez={__name:"ZoningMap",props:{mapboxToken:{type:String,required:!0},initialCenter:{type:Array,default:()=>[-72.5778,44.4688]},initialZoom:{type:Number,default:6},layerToHighlight:{type:String,default:"Nonresidential",requred:!1}},setup(l){const u=l,_=oo([]);oo(!1),Yu(u,q=>{console.log("props changed",q.layerToHighlight),q.layerToHighlight==2?A("Primarily Residential"):q.layerToHighlight==3?A("Nonresidential"):P()},{deep:!1});const A=q=>{console.log("toggle",L),L&&(L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",["==",["get","Type_of_Zoning_District"],q]),L.setPaintProperty("fgb-layer","fill-opacity",.9)},300))},P=()=>{L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",null),L.setPaintProperty("fgb-layer","fill-opacity",.9)},100)};let L;const B=()=>{L=new Ku.Map({accessToken:u.mapboxToken,container:"zoning-map",style:"mapbox://styles/mapbox/light-v11",center:u.initialCenter,zoom:u.initialZoom});const q=document.getElementById("zoning-map-loading"),n=document.getElementById("zoning-map-progress"),W=document.getElementById("zoning-map-legend");let Q=0,ie=null;const de=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999","#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3","#7fc97f","#beaed4","#fdc086"],ve=new Map;let Je=0;function it(Ye){return ve.has(Ye)||(ve.set(Ye,de[Je%de.length]),Je++,gt()),ve.get(Ye)}function gt(){const Ye=document.createElement("div");for(Array.from(ve.entries()).sort((St,Dt)=>St[0].localeCompare(Dt[0])).forEach(([St,Dt])=>{const _t=document.createElement("div");_t.className="legend-item",_t.innerHTML=`
${St}`,Ye.appendChild(_t)});W.childNodes.length>2;)W.removeChild(W.lastChild);W.appendChild(Ye)}function Bt(Ye){Q=Ye,n.textContent=`Loaded ${Ye} features`}L.on("load",async()=>{try{q.style.display="block",n.style.display="block",console.log("Starting to load FlatGeoBuf data..."),L.addSource("fgb-data",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),L.addLayer({id:"fgb-layer",type:"fill",source:"fgb-data",paint:{"fill-color":"#ccc","fill-opacity":.7,"fill-outline-color":"#000"}}),ie=L.getSource("fgb-data");let Ye=[];const St="https://verso-uvm.github.io/Vermont-Livability-Map/data/vt-zoning-spatial-index.fgb",Dt=await fetch("public/data/vt-zoning-spatial-index.fgb");if(!Dt.ok)throw new Error(`HTTP error! status: ${Dt.status}`);for await(const Ai of SE(Dt.body)){const di=Ai.properties.Type_of_Zoning_District||"Unknown";if(it(di),Ye.push(Ai),Q++,Q%100===0&&(Bt(Q),ie.setData({type:"FeatureCollection",features:Ye}),ve.size>0)){const Ot=["match",["get","Type_of_Zoning_District"]];for(const[dr,mr]of ve)Ot.push(dr),Ot.push(mr);Ot.push("#ccc"),L.setPaintProperty("fgb-layer","fill-color",Ot)}}ie.setData({type:"FeatureCollection",features:Ye}),_.value=Ye;const _t=new Ku.LngLatBounds;Ye.forEach(Ai=>{if(Ai.geometry){const di=Ai.geometry.coordinates;Ai.geometry.type==="Polygon"?di[0].forEach(Ot=>_t.extend(Ot)):Ai.geometry.type==="Point"&&_t.extend(di)}}),L.fitBounds(_t,{padding:50}),console.log("Map visualization complete")}catch(Ye){console.error("Error loading FlatGeoBuf data:",Ye),q.textContent="Error loading data"}finally{q.style.display="none",n.style.display="none"}}),L.on("click","fgb-layer",Ye=>{if(!Ye.features.length)return;const St=Ye.features[0],Dt=Ye.lngLat,_t=Object.entries(St.properties).map(([Ai,di])=>`${Ai}: ${di}`).join("
");new Ku.Popup().setLngLat(Dt).setHTML(_t).addTo(L)}),L.on("mouseenter","fgb-layer",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","fgb-layer",()=>{L.getCanvas().style.cursor=""})};return Cf(()=>{B()}),E_(()=>{L.value&&L.value.remove()}),(q,n)=>(Ro(),fl("div",QR,n[0]||(n[0]=[ci("div",{id:"zoning-map"},null,-1),ci("div",{id:"zoning-map-loading",class:"loading"},"Loading data...",-1),ci("div",{id:"zoning-map-progress"},null,-1),ci("div",{id:"zoning-map-legend",class:"legend"},[ci("h4",null,"Primary zoning classification")],-1)])))}};function Vm(l,u){return l==null||u==null?NaN:lu?1:l>=u?0:NaN}function tz(l,u){return l==null||u==null?NaN:ul?1:u>=l?0:NaN}function ME(l){let u,_,A;l.length!==2?(u=Vm,_=(q,n)=>Vm(l(q),n),A=(q,n)=>l(q)-n):(u=l===Vm||l===tz?l:iz,_=l,A=l);function P(q,n,W=0,Q=q.length){if(W>>1;_(q[ie],n)<0?W=ie+1:Q=ie}while(W>>1;_(q[ie],n)<=0?W=ie+1:Q=ie}while(WW&&A(q[ie-1],n)>-A(q[ie],n)?ie-1:ie}return{left:P,center:B,right:L}}function iz(){return 0}function rz(l){return l===null?NaN:+l}const nz=ME(Vm),sz=nz.right;ME(rz).center;class Ew extends Map{constructor(u,_=lz){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:_}}),u!=null)for(const[A,P]of u)this.set(A,P)}get(u){return super.get(Sw(this,u))}has(u){return super.has(Sw(this,u))}set(u,_){return super.set(oz(this,u),_)}delete(u){return super.delete(az(this,u))}}function Sw({_intern:l,_key:u},_){const A=u(_);return l.has(A)?l.get(A):_}function oz({_intern:l,_key:u},_){const A=u(_);return l.has(A)?l.get(A):(l.set(A,_),_)}function az({_intern:l,_key:u},_){const A=u(_);return l.has(A)&&(_=l.get(A),l.delete(A)),_}function lz(l){return l!==null&&typeof l=="object"?l.valueOf():l}const cz=Math.sqrt(50),uz=Math.sqrt(10),hz=Math.sqrt(2);function r_(l,u,_){const A=(u-l)/Math.max(0,_),P=Math.floor(Math.log10(A)),L=A/Math.pow(10,P),B=L>=cz?10:L>=uz?5:L>=hz?2:1;let q,n,W;return P<0?(W=Math.pow(10,-P)/B,q=Math.round(l*W),n=Math.round(u*W),q/Wu&&--n,W=-W):(W=Math.pow(10,P)*B,q=Math.round(l/W),n=Math.round(u/W),q*Wu&&--n),n0))return[];if(l===u)return[l];const A=u=P))return[];const q=L-P+1,n=new Array(q);if(A)if(B<0)for(let W=0;W{}};function AE(){for(var l=0,u=arguments.length,_={},A;l=0&&(A=_.slice(P+1),_=_.slice(0,P)),_&&!u.hasOwnProperty(_))throw new Error("unknown type: "+_);return{type:_,name:A}})}Um.prototype=AE.prototype={constructor:Um,on:function(l,u){var _=this._,A=mz(l+"",_),P,L=-1,B=A.length;if(arguments.length<2){for(;++L0)for(var _=new Array(P),A=0,P,L;A=0&&(u=l.slice(0,_))!=="xmlns"&&(l=l.slice(_+1)),Aw.hasOwnProperty(u)?{space:Aw[u],local:l}:l}function gz(l){return function(){var u=this.ownerDocument,_=this.namespaceURI;return _===u0&&u.documentElement.namespaceURI===u0?u.createElement(l):u.createElementNS(_,l)}}function yz(l){return function(){return this.ownerDocument.createElementNS(l.space,l.local)}}function IE(l){var u=P_(l);return(u.local?yz:gz)(u)}function xz(){}function $0(l){return l==null?xz:function(){return this.querySelector(l)}}function vz(l){typeof l!="function"&&(l=$0(l));for(var u=this._groups,_=u.length,A=new Array(_),P=0;P<_;++P)for(var L=u[P],B=L.length,q=A[P]=new Array(B),n,W,Q=0;Q=St&&(St=Ye+1);!(_t=gt[St])&&++St=0;)(B=A[P])&&(L&&B.compareDocumentPosition(L)^4&&L.parentNode.insertBefore(B,L),L=B);return this}function $z(l){l||(l=Hz);function u(ie,de){return ie&&de?l(ie.__data__,de.__data__):!ie-!de}for(var _=this._groups,A=_.length,P=new Array(A),L=0;Lu?1:l>=u?0:NaN}function Zz(){var l=arguments[0];return arguments[0]=this,l.apply(null,arguments),this}function Wz(){return Array.from(this)}function Xz(){for(var l=this._groups,u=0,_=l.length;u<_;++u)for(var A=l[u],P=0,L=A.length;P1?this.each((u==null?oD:typeof u=="function"?lD:aD)(l,u,_??"")):sh(this.node(),l)}function sh(l,u){return l.style.getPropertyValue(u)||DE(l).getComputedStyle(l,null).getPropertyValue(u)}function uD(l){return function(){delete this[l]}}function hD(l,u){return function(){this[l]=u}}function dD(l,u){return function(){var _=u.apply(this,arguments);_==null?delete this[l]:this[l]=_}}function fD(l,u){return arguments.length>1?this.each((u==null?uD:typeof u=="function"?dD:hD)(l,u)):this.node()[l]}function LE(l){return l.trim().split(/^|\s+/)}function H0(l){return l.classList||new kE(l)}function kE(l){this._node=l,this._names=LE(l.getAttribute("class")||"")}kE.prototype={add:function(l){var u=this._names.indexOf(l);u<0&&(this._names.push(l),this._node.setAttribute("class",this._names.join(" ")))},remove:function(l){var u=this._names.indexOf(l);u>=0&&(this._names.splice(u,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(l){return this._names.indexOf(l)>=0}};function OE(l,u){for(var _=H0(l),A=-1,P=u.length;++A=0&&(_=u.slice(A+1),u=u.slice(0,A)),{type:u,name:_}})}function UD(l){return function(){var u=this.__on;if(u){for(var _=0,A=-1,P=u.length,L;_>8&15|u>>4&240,u>>4&15|u&240,(u&15)<<4|u&15,1):_===8?Rm(u>>24&255,u>>16&255,u>>8&255,(u&255)/255):_===4?Rm(u>>12&15|u>>8&240,u>>8&15|u>>4&240,u>>4&15|u&240,((u&15)<<4|u&15)/255):null):(u=KD.exec(l))?new os(u[1],u[2],u[3],1):(u=JD.exec(l))?new os(u[1]*255/100,u[2]*255/100,u[3]*255/100,1):(u=QD.exec(l))?Rm(u[1],u[2],u[3],u[4]):(u=eL.exec(l))?Rm(u[1]*255/100,u[2]*255/100,u[3]*255/100,u[4]):(u=tL.exec(l))?Lw(u[1],u[2]/100,u[3]/100,1):(u=iL.exec(l))?Lw(u[1],u[2]/100,u[3]/100,u[4]):Iw.hasOwnProperty(l)?Rw(Iw[l]):l==="transparent"?new os(NaN,NaN,NaN,0):null}function Rw(l){return new os(l>>16&255,l>>8&255,l&255,1)}function Rm(l,u,_,A){return A<=0&&(l=u=_=NaN),new os(l,u,_,A)}function sL(l){return l instanceof kf||(l=xc(l)),l?(l=l.rgb(),new os(l.r,l.g,l.b,l.opacity)):new os}function h0(l,u,_,A){return arguments.length===1?sL(l):new os(l,u,_,A??1)}function os(l,u,_,A){this.r=+l,this.g=+u,this.b=+_,this.opacity=+A}Z0(os,h0,VE(kf,{brighter(l){return l=l==null?s_:Math.pow(s_,l),new os(this.r*l,this.g*l,this.b*l,this.opacity)},darker(l){return l=l==null?Sf:Math.pow(Sf,l),new os(this.r*l,this.g*l,this.b*l,this.opacity)},rgb(){return this},clamp(){return new os(_c(this.r),_c(this.g),_c(this.b),o_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zw,formatHex:zw,formatHex8:oL,formatRgb:Dw,toString:Dw}));function zw(){return`#${pc(this.r)}${pc(this.g)}${pc(this.b)}`}function oL(){return`#${pc(this.r)}${pc(this.g)}${pc(this.b)}${pc((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dw(){const l=o_(this.opacity);return`${l===1?"rgb(":"rgba("}${_c(this.r)}, ${_c(this.g)}, ${_c(this.b)}${l===1?")":`, ${l})`}`}function o_(l){return isNaN(l)?1:Math.max(0,Math.min(1,l))}function _c(l){return Math.max(0,Math.min(255,Math.round(l)||0))}function pc(l){return l=_c(l),(l<16?"0":"")+l.toString(16)}function Lw(l,u,_,A){return A<=0?l=u=_=NaN:_<=0||_>=1?l=u=NaN:u<=0&&(l=NaN),new no(l,u,_,A)}function UE(l){if(l instanceof no)return new no(l.h,l.s,l.l,l.opacity);if(l instanceof kf||(l=xc(l)),!l)return new no;if(l instanceof no)return l;l=l.rgb();var u=l.r/255,_=l.g/255,A=l.b/255,P=Math.min(u,_,A),L=Math.max(u,_,A),B=NaN,q=L-P,n=(L+P)/2;return q?(u===L?B=(_-A)/q+(_0&&n<1?0:B,new no(B,q,n,l.opacity)}function aL(l,u,_,A){return arguments.length===1?UE(l):new no(l,u,_,A??1)}function no(l,u,_,A){this.h=+l,this.s=+u,this.l=+_,this.opacity=+A}Z0(no,aL,VE(kf,{brighter(l){return l=l==null?s_:Math.pow(s_,l),new no(this.h,this.s,this.l*l,this.opacity)},darker(l){return l=l==null?Sf:Math.pow(Sf,l),new no(this.h,this.s,this.l*l,this.opacity)},rgb(){var l=this.h%360+(this.h<0)*360,u=isNaN(l)||isNaN(this.s)?0:this.s,_=this.l,A=_+(_<.5?_:1-_)*u,P=2*_-A;return new os(Ny(l>=240?l-240:l+120,P,A),Ny(l,P,A),Ny(l<120?l+240:l-120,P,A),this.opacity)},clamp(){return new no(kw(this.h),zm(this.s),zm(this.l),o_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const l=o_(this.opacity);return`${l===1?"hsl(":"hsla("}${kw(this.h)}, ${zm(this.s)*100}%, ${zm(this.l)*100}%${l===1?")":`, ${l})`}`}}));function kw(l){return l=(l||0)%360,l<0?l+360:l}function zm(l){return Math.max(0,Math.min(1,l||0))}function Ny(l,u,_){return(l<60?u+(_-u)*l/60:l<180?_:l<240?u+(_-u)*(240-l)/60:u)*255}const W0=l=>()=>l;function lL(l,u){return function(_){return l+_*u}}function cL(l,u,_){return l=Math.pow(l,_),u=Math.pow(u,_)-l,_=1/_,function(A){return Math.pow(l+A*u,_)}}function uL(l){return(l=+l)==1?jE:function(u,_){return _-u?cL(u,_,l):W0(isNaN(u)?_:u)}}function jE(l,u){var _=u-l;return _?lL(l,_):W0(isNaN(l)?u:l)}const a_=function l(u){var _=uL(u);function A(P,L){var B=_((P=h0(P)).r,(L=h0(L)).r),q=_(P.g,L.g),n=_(P.b,L.b),W=jE(P.opacity,L.opacity);return function(Q){return P.r=B(Q),P.g=q(Q),P.b=n(Q),P.opacity=W(Q),P+""}}return A.gamma=l,A}(1);function hL(l,u){u||(u=[]);var _=l?Math.min(u.length,l.length):0,A=u.slice(),P;return function(L){for(P=0;P<_;++P)A[P]=l[P]*(1-L)+u[P]*L;return A}}function dL(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function fL(l,u){var _=u?u.length:0,A=l?Math.min(_,l.length):0,P=new Array(A),L=new Array(_),B;for(B=0;B_&&(L=u.slice(_,L),q[B]?q[B]+=L:q[++B]=L),(A=A[0])===(P=P[0])?q[B]?q[B]+=P:q[++B]=P:(q[++B]=null,n.push({i:B,x:io(A,P)})),_=Vy.lastIndex;return _180?Q+=360:Q-W>180&&(W+=360),de.push({i:ie.push(P(ie)+"rotate(",null,A)-2,x:io(W,Q)})):Q&&ie.push(P(ie)+"rotate("+Q+A)}function q(W,Q,ie,de){W!==Q?de.push({i:ie.push(P(ie)+"skewX(",null,A)-2,x:io(W,Q)}):Q&&ie.push(P(ie)+"skewX("+Q+A)}function n(W,Q,ie,de,ve,Je){if(W!==ie||Q!==de){var it=ve.push(P(ve)+"scale(",null,",",null,")");Je.push({i:it-4,x:io(W,ie)},{i:it-2,x:io(Q,de)})}else(ie!==1||de!==1)&&ve.push(P(ve)+"scale("+ie+","+de+")")}return function(W,Q){var ie=[],de=[];return W=l(W),Q=l(Q),L(W.translateX,W.translateY,Q.translateX,Q.translateY,ie,de),B(W.rotate,Q.rotate,ie,de),q(W.skewX,Q.skewX,ie,de),n(W.scaleX,W.scaleY,Q.scaleX,Q.scaleY,ie,de),W=Q=null,function(ve){for(var Je=-1,it=de.length,gt;++Je=0&&l._call.call(void 0,u),l=l._next;--oh}function Fw(){vc=(c_=Af.now())+R_,oh=nf=0;try{EL()}finally{oh=0,ML(),vc=0}}function SL(){var l=Af.now(),u=l-c_;u>HE&&(R_-=u,c_=l)}function ML(){for(var l,u=l_,_,A=1/0;u;)u._call?(A>u._time&&(A=u._time),l=u,u=u._next):(_=u._next,u._next=null,u=l?l._next=_:l_=_);sf=l,p0(A)}function p0(l){if(!oh){nf&&(nf=clearTimeout(nf));var u=l-vc;u>24?(l<1/0&&(nf=setTimeout(Fw,l-Af.now()-R_)),ef&&(ef=clearInterval(ef))):(ef||(c_=Af.now(),ef=setInterval(SL,HE)),oh=1,ZE(Fw))}}function Bw(l,u,_){var A=new u_;return u=u==null?0:+u,A.restart(P=>{A.stop(),l(P+u)},u,_),A}var AL=AE("start","end","cancel","interrupt"),IL=[],XE=0,Nw=1,m0=2,jm=3,Vw=4,_0=5,Gm=6;function z_(l,u,_,A,P,L){var B=l.__transition;if(!B)l.__transition={};else if(_ in B)return;CL(l,_,{name:u,index:A,group:P,on:AL,tween:IL,time:L.time,delay:L.delay,duration:L.duration,ease:L.ease,timer:null,state:XE})}function K0(l,u){var _=lo(l,u);if(_.state>XE)throw new Error("too late; already scheduled");return _}function Lo(l,u){var _=lo(l,u);if(_.state>jm)throw new Error("too late; already running");return _}function lo(l,u){var _=l.__transition;if(!_||!(_=_[u]))throw new Error("transition not found");return _}function CL(l,u,_){var A=l.__transition,P;A[u]=_,_.timer=WE(L,0,_.time);function L(W){_.state=Nw,_.timer.restart(B,_.delay,_.time),_.delay<=W&&B(W-_.delay)}function B(W){var Q,ie,de,ve;if(_.state!==Nw)return n();for(Q in A)if(ve=A[Q],ve.name===_.name){if(ve.state===jm)return Bw(B);ve.state===Vw?(ve.state=Gm,ve.timer.stop(),ve.on.call("interrupt",l,l.__data__,ve.index,ve.group),delete A[Q]):+Qm0&&A.state<_0,A.state=Gm,A.timer.stop(),A.on.call(P?"interrupt":"cancel",l,l.__data__,A.index,A.group),delete _[B]}L&&delete l.__transition}}function RL(l){return this.each(function(){PL(this,l)})}function zL(l,u){var _,A;return function(){var P=Lo(this,l),L=P.tween;if(L!==_){A=_=L;for(var B=0,q=A.length;B=0&&(u=u.slice(0,_)),!u||u==="start"})}function ok(l,u,_){var A,P,L=sk(u)?K0:Lo;return function(){var B=L(this,l),q=B.on;q!==A&&(P=(A=q).copy()).on(u,_),B.on=P}}function ak(l,u){var _=this._id;return arguments.length<2?lo(this.node(),_).on.on(l):this.each(ok(_,l,u))}function lk(l){return function(){var u=this.parentNode;for(var _ in this.__transition)if(+_!==l)return;u&&u.removeChild(this)}}function ck(){return this.on("end.remove",lk(this._id))}function uk(l){var u=this._name,_=this._id;typeof l!="function"&&(l=$0(l));for(var A=this._groups,P=A.length,L=new Array(P),B=0;B=1e21?l.toLocaleString("en").replace(/,/g,""):l.toString(10)}function h_(l,u){if((_=(l=u?l.toExponential(u-1):l.toExponential()).indexOf("e"))<0)return null;var _,A=l.slice(0,_);return[A.length>1?A[0]+A.slice(2):A,+l.slice(_+1)]}function ah(l){return l=h_(Math.abs(l)),l?l[1]:NaN}function Ok(l,u){return function(_,A){for(var P=_.length,L=[],B=0,q=l[0],n=0;P>0&&q>0&&(n+q+1>A&&(q=Math.max(1,A-n)),L.push(_.substring(P-=q,P+q)),!((n+=q+1)>A));)q=l[B=(B+1)%l.length];return L.reverse().join(u)}}function Fk(l){return function(u){return u.replace(/[0-9]/g,function(_){return l[+_]})}}var Bk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function d_(l){if(!(u=Bk.exec(l)))throw new Error("invalid format: "+l);var u;return new Q0({fill:u[1],align:u[2],sign:u[3],symbol:u[4],zero:u[5],width:u[6],comma:u[7],precision:u[8]&&u[8].slice(1),trim:u[9],type:u[10]})}d_.prototype=Q0.prototype;function Q0(l){this.fill=l.fill===void 0?" ":l.fill+"",this.align=l.align===void 0?">":l.align+"",this.sign=l.sign===void 0?"-":l.sign+"",this.symbol=l.symbol===void 0?"":l.symbol+"",this.zero=!!l.zero,this.width=l.width===void 0?void 0:+l.width,this.comma=!!l.comma,this.precision=l.precision===void 0?void 0:+l.precision,this.trim=!!l.trim,this.type=l.type===void 0?"":l.type+""}Q0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Nk(l){e:for(var u=l.length,_=1,A=-1,P;_0&&(A=0);break}return A>0?l.slice(0,A)+l.slice(P+1):l}var QE;function Vk(l,u){var _=h_(l,u);if(!_)return l+"";var A=_[0],P=_[1],L=P-(QE=Math.max(-8,Math.min(8,Math.floor(P/3)))*3)+1,B=A.length;return L===B?A:L>B?A+new Array(L-B+1).join("0"):L>0?A.slice(0,L)+"."+A.slice(L):"0."+new Array(1-L).join("0")+h_(l,Math.max(0,u+L-1))[0]}function Uw(l,u){var _=h_(l,u);if(!_)return l+"";var A=_[0],P=_[1];return P<0?"0."+new Array(-P).join("0")+A:A.length>P+1?A.slice(0,P+1)+"."+A.slice(P+1):A+new Array(P-A.length+2).join("0")}const jw={"%":(l,u)=>(l*100).toFixed(u),b:l=>Math.round(l).toString(2),c:l=>l+"",d:kk,e:(l,u)=>l.toExponential(u),f:(l,u)=>l.toFixed(u),g:(l,u)=>l.toPrecision(u),o:l=>Math.round(l).toString(8),p:(l,u)=>Uw(l*100,u),r:Uw,s:Vk,X:l=>Math.round(l).toString(16).toUpperCase(),x:l=>Math.round(l).toString(16)};function Gw(l){return l}var qw=Array.prototype.map,$w=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Uk(l){var u=l.grouping===void 0||l.thousands===void 0?Gw:Ok(qw.call(l.grouping,Number),l.thousands+""),_=l.currency===void 0?"":l.currency[0]+"",A=l.currency===void 0?"":l.currency[1]+"",P=l.decimal===void 0?".":l.decimal+"",L=l.numerals===void 0?Gw:Fk(qw.call(l.numerals,String)),B=l.percent===void 0?"%":l.percent+"",q=l.minus===void 0?"−":l.minus+"",n=l.nan===void 0?"NaN":l.nan+"";function W(ie){ie=d_(ie);var de=ie.fill,ve=ie.align,Je=ie.sign,it=ie.symbol,gt=ie.zero,Bt=ie.width,Ye=ie.comma,St=ie.precision,Dt=ie.trim,_t=ie.type;_t==="n"?(Ye=!0,_t="g"):jw[_t]||(St===void 0&&(St=12),Dt=!0,_t="g"),(gt||de==="0"&&ve==="=")&&(gt=!0,de="0",ve="=");var Ai=it==="$"?_:it==="#"&&/[boxX]/.test(_t)?"0"+_t.toLowerCase():"",di=it==="$"?A:/[%p]/.test(_t)?B:"",Ot=jw[_t],dr=/[defgprs%]/.test(_t);St=St===void 0?6:/[gprs]/.test(_t)?Math.max(1,Math.min(21,St)):Math.max(0,Math.min(20,St));function mr(vt){var Ut=Ai,Ti=di,Ht,ji,Tt;if(_t==="c")Ti=Ot(vt)+Ti,vt="";else{vt=+vt;var Jt=vt<0||1/vt<0;if(vt=isNaN(vt)?n:Ot(Math.abs(vt),St),Dt&&(vt=Nk(vt)),Jt&&+vt==0&&Je!=="+"&&(Jt=!1),Ut=(Jt?Je==="("?Je:q:Je==="-"||Je==="("?"":Je)+Ut,Ti=(_t==="s"?$w[8+QE/3]:"")+Ti+(Jt&&Je==="("?")":""),dr){for(Ht=-1,ji=vt.length;++HtTt||Tt>57){Ti=(Tt===46?P+vt.slice(Ht+1):vt.slice(Ht))+Ti,vt=vt.slice(0,Ht);break}}}Ye&&!gt&&(vt=u(vt,1/0));var hi=Ut.length+vt.length+Ti.length,Qi=hi>1)+Ut+vt+Ti+Qi.slice(hi);break;default:vt=Qi+Ut+vt+Ti;break}return L(vt)}return mr.toString=function(){return ie+""},mr}function Q(ie,de){var ve=W((ie=d_(ie),ie.type="f",ie)),Je=Math.max(-8,Math.min(8,Math.floor(ah(de)/3)))*3,it=Math.pow(10,-Je),gt=$w[8+Je/3];return function(Bt){return ve(it*Bt)+gt}}return{format:W,formatPrefix:Q}}var Lm,eS,tS;jk({thousands:",",grouping:[3],currency:["$",""]});function jk(l){return Lm=Uk(l),eS=Lm.format,tS=Lm.formatPrefix,Lm}function Gk(l){return Math.max(0,-ah(Math.abs(l)))}function qk(l,u){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ah(u)/3)))*3-ah(Math.abs(l)))}function $k(l,u){return l=Math.abs(l),u=Math.abs(u)-l,Math.max(0,ah(u)-ah(l))+1}function iS(l,u){switch(arguments.length){case 0:break;case 1:this.range(l);break;default:this.range(u).domain(l);break}return this}const Hw=Symbol("implicit");function rS(){var l=new Ew,u=[],_=[],A=Hw;function P(L){let B=l.get(L);if(B===void 0){if(A!==Hw)return A;l.set(L,B=u.push(L)-1)}return _[B%_.length]}return P.domain=function(L){if(!arguments.length)return u.slice();u=[],l=new Ew;for(const B of L)l.has(B)||l.set(B,u.push(B)-1);return P},P.range=function(L){return arguments.length?(_=Array.from(L),P):_.slice()},P.unknown=function(L){return arguments.length?(A=L,P):A},P.copy=function(){return rS(u,_).unknown(A)},iS.apply(P,arguments),P}function Hk(l){return function(){return l}}function Zk(l){return+l}var Zw=[0,1];function Gu(l){return l}function g0(l,u){return(u-=l=+l)?function(_){return(_-l)/u}:Hk(isNaN(u)?NaN:.5)}function Wk(l,u){var _;return l>u&&(_=l,l=u,u=_),function(A){return Math.max(l,Math.min(u,A))}}function Xk(l,u,_){var A=l[0],P=l[1],L=u[0],B=u[1];return P2?Yk:Xk,n=W=null,ie}function ie(de){return de==null||isNaN(de=+de)?L:(n||(n=q(l.map(A),u,_)))(A(B(de)))}return ie.invert=function(de){return B(P((W||(W=q(u,l.map(A),io)))(de)))},ie.domain=function(de){return arguments.length?(l=Array.from(de,Zk),Q()):l.slice()},ie.range=function(de){return arguments.length?(u=Array.from(de),Q()):u.slice()},ie.rangeRound=function(de){return u=Array.from(de),_=yL,Q()},ie.clamp=function(de){return arguments.length?(B=de?!0:Gu,Q()):B!==Gu},ie.interpolate=function(de){return arguments.length?(_=de,Q()):_},ie.unknown=function(de){return arguments.length?(L=de,ie):L},function(de,ve){return A=de,P=ve,Q()}}function Qk(){return Jk()(Gu,Gu)}function e4(l,u,_,A){var P=fz(l,u,_),L;switch(A=d_(A??",f"),A.type){case"s":{var B=Math.max(Math.abs(l),Math.abs(u));return A.precision==null&&!isNaN(L=qk(P,B))&&(A.precision=L),tS(A,B)}case"":case"e":case"g":case"p":case"r":{A.precision==null&&!isNaN(L=$k(P,Math.max(Math.abs(l),Math.abs(u))))&&(A.precision=L-(A.type==="e"));break}case"f":case"%":{A.precision==null&&!isNaN(L=Gk(P))&&(A.precision=L-(A.type==="%")*2);break}}return eS(A)}function t4(l){var u=l.domain;return l.ticks=function(_){var A=u();return dz(A[0],A[A.length-1],_??10)},l.tickFormat=function(_,A){var P=u();return e4(P[0],P[P.length-1],_??10,A)},l.nice=function(_){_==null&&(_=10);var A=u(),P=0,L=A.length-1,B=A[P],q=A[L],n,W,Q=10;for(q0;){if(W=c0(B,q,_),W===n)return A[P]=B,A[L]=q,u(A);if(W>0)B=Math.floor(B/W)*W,q=Math.ceil(q/W)*W;else if(W<0)B=Math.ceil(B*W)/W,q=Math.floor(q*W)/W;else break;n=W}return l},l}function nS(){var l=Qk();return l.copy=function(){return Kk(l,nS())},iS.apply(l,arguments),t4(l)}function of(l,u,_){this.k=l,this.x=u,this.y=_}of.prototype={constructor:of,scale:function(l){return l===1?this:new of(this.k*l,this.x,this.y)},translate:function(l,u){return l===0&u===0?this:new of(this.k,this.x+this.k*l,this.y+this.k*u)},apply:function(l){return[l[0]*this.k+this.x,l[1]*this.k+this.y]},applyX:function(l){return l*this.k+this.x},applyY:function(l){return l*this.k+this.y},invert:function(l){return[(l[0]-this.x)/this.k,(l[1]-this.y)/this.k]},invertX:function(l){return(l-this.x)/this.k},invertY:function(l){return(l-this.y)/this.k},rescaleX:function(l){return l.copy().domain(l.range().map(this.invertX,this).map(l.invert,l))},rescaleY:function(l){return l.copy().domain(l.range().map(this.invertY,this).map(l.invert,l))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};of.prototype;const i4={class:"stacked-bar-container"},r4=["width","height"],n4={class:"legend"},s4={__name:"StackedBar",props:{width:{type:Number,default:800},height:{type:Number,default:100}},setup(l){const u=l,_=oo(null),A=[{category:"Mixed with Residential",percentage:48.41},{category:"Primarily Residential",percentage:36.53},{category:"Nonresidential",percentage:10.72},{category:"Overlay not Affecting Use",percentage:4.29}],P=rS().domain(A.map(L=>L.category)).range(["#4B8BBF","#A25FAC","#E53032","#5CA248"]);return Cf(()=>{const L=XD(_.value),B=50,q={top:20,right:20,bottom:20,left:20},n=u.width-q.left-q.right,W=nS().domain([0,100]).range([0,n]);let Q=0;const ie=A.map(ve=>{const Je={category:ve.category,percentage:ve.percentage,start:Q,end:Q+ve.percentage};return Q+=ve.percentage,Je}),de=L.append("g").attr("transform",`translate(${q.left}, ${q.top})`);de.selectAll("rect").data(ie).enter().append("rect").attr("x",ve=>W(ve.start)).attr("y",0).attr("width",ve=>W(ve.percentage)).attr("height",B).attr("fill",ve=>P(ve.category)).attr("stroke","white").attr("stroke-width",1),de.selectAll("text").data(ie).enter().append("text").attr("x",ve=>W(ve.start+ve.percentage/2)).attr("y",B/2).attr("dy","0.35em").attr("text-anchor","middle").attr("fill","white").style("font-size","12px").text(ve=>ve.percentage>=4?`${ve.percentage}%`:"")}),(L,B)=>(Ro(),fl("div",i4,[B[0]||(B[0]=ci("h2",null,"Land by primary zoning type",-1)),(Ro(),fl("svg",{width:l.width,height:l.height,ref_key:"svgRef",ref:_},null,8,r4)),B[1]||(B[1]=ci("br",null,null,-1)),ci("div",n4,[(Ro(),fl(ns,null,jI(A,(q,n)=>ci("div",{key:n,class:"legend-item"},[ci("div",{class:"color-box",style:y_({backgroundColor:bs(P)(q.category)})},null,4),ci("span",null,$m(q.category)+": "+$m(q.percentage)+"%",1)])),64))])]))}},o4=B0(s4,[["__scopeId","data-v-ed9fce67"]]);function a4(l,u=document){return typeof l=="string"?Array.from(u.querySelectorAll(l)):l instanceof Element?[l]:l instanceof NodeList?Array.from(l):l instanceof Array?l:[]}function l4(l){const u=document.createElement("div");u.className=`scrollama__debug-step ${l}`,u.style.position="fixed",u.style.left="0",u.style.width="100%",u.style.zIndex="9999",u.style.borderTop="2px solid black",u.style.borderBottom="2px solid black";const _=document.createElement("p");return _.style.position="absolute",_.style.left="0",_.style.height="1px",_.style.width="100%",_.style.borderTop="1px dashed black",u.appendChild(_),document.body.appendChild(u),u}function c4({id:l,step:u,marginTop:_}){const{index:A,height:P}=u,L=`scrollama__debug-step--${l}-${A}`;let B=document.querySelector(`.${L}`);B||(B=l4(L)),B.style.top=`${_*-1}px`,B.style.height=`${P}px`,B.querySelector("p").style.top=`${P/2}px`}function u4(){const l="abcdefghijklmnopqrstuvwxyz",u=Date.now(),_=[];for(let A=0;A<6;A+=1){const P=l[Math.floor(Math.random()*l.length)];_.push(P)}return`${_.join("")}${u}`}function km(l){console.error(`scrollama error: ${l}`)}function tf(l){return+l.getAttribute("data-scrollama-index")}function h4(l,u){const _=Math.ceil(l/u),A=[],P=1/_;for(let L=0;L<_+1;L+=1)A.push(L*P);return A}function Uy(l){if(typeof l=="string"&&l.indexOf("px")>0){const u=+l.replace("px","");return isNaN(u)?(err("offset value must be in 'px' format. Fallback to 0.5."),{format:"percent",value:.5}):{format:"pixels",value:u}}else if(typeof l=="number"||!isNaN(+l))return l>1&&err("offset value is greater than 1. Fallback to 1."),l<0&&err("offset value is lower than 0. Fallback to 0."),{format:"percent",value:Math.min(Math.max(0,l),1)};return null}function d4(l){l.forEach(u=>u.node.setAttribute("data-scrollama-index",u.index))}function f4(l){const{top:u}=l.getBoundingClientRect(),_=window.pageYOffset,A=document.body.clientTop||0;return u+_-A}let Uu,qm,ra;function sS(l){const u=l?l.scrollTop:window.pageYOffset;Uu!==u&&(Uu=u,Uu>qm?ra="down":UusS(l))}function Ww(){let l={},u=u4(),_=[],A,P,L,B=0,q=!1,n=!1,W=!1,Q=!1,ie=[];function de(){l={stepEnter:()=>{},stepExit:()=>{},stepProgress:()=>{}},ie=[]}function ve(Ht){Ht&&!q&&Ut(),!Ht&&q&&_t(),q=Ht}function Je(Ht,ji){const Tt=tf(Ht),Jt=_[Tt];ji!==void 0&&(Jt.progress=ji);const hi={element:Ht,index:Tt,progress:ji,direction:ra};Jt.state==="enter"&&l.stepProgress(hi)}function it(Ht,ji=!0){const Tt=tf(Ht),Jt=_[Tt],hi={element:Ht,index:Tt,direction:ra};Jt.direction=ra,Jt.state="enter",ie[Tt]||l.stepEnter(hi),Q&&(ie[Tt]=!0)}function gt(Ht,ji=!0){const Tt=tf(Ht),Jt=_[Tt];if(!Jt.state)return!1;const hi={element:Ht,index:Tt,direction:ra};n&&(ra==="down"&&Jt.progress<1?Je(Ht,1):ra==="up"&&Jt.progress>0&&Je(Ht,0)),Jt.direction=ra,Jt.state="exit",l.stepExit(hi)}function Bt([Ht]){const ji=tf(Ht.target),Tt=_[ji],Jt=Ht.target.offsetHeight;Jt!==Tt.height&&(Tt.height=Jt,Dt(Tt),Ot(Tt),Ai(Tt))}function Ye([Ht]){sS(P);const{isIntersecting:ji,target:Tt}=Ht;ji?it(Tt):gt(Tt)}function St([Ht]){const ji=tf(Ht.target),Tt=_[ji],{isIntersecting:Jt,intersectionRatio:hi,target:Qi}=Ht;Jt&&Tt.state==="enter"&&Je(Qi,hi)}function Dt({observers:Ht}){Object.keys(Ht).map(ji=>{Ht[ji].disconnect()})}function _t(){_.forEach(Dt)}function Ai(Ht){const ji=new ResizeObserver(Bt);ji.observe(Ht.node),Ht.observers.resize=ji}function di(){_.forEach(Ai)}function Ot(Ht){const ji=window.innerHeight,Tt=Ht.offset||A,Jt=Tt.format==="pixels"?1:ji,hi=Tt.value*Jt,Qi=Ht.height/2-hi,Xt=Ht.height/2-(ji-hi),Cr={rootMargin:`${Qi}px 0px ${Xt}px 0px`,threshold:.5,root:L},vr=new IntersectionObserver(Ye,Cr);vr.observe(Ht.node),Ht.observers.step=vr,W&&c4({id:u,step:Ht,marginTop:Qi,marginBottom:Xt})}function dr(){_.forEach(Ot)}function mr(Ht){const ji=window.innerHeight,Tt=Ht.offset||A,Jt=Tt.format==="pixels"?1:ji,hi=Tt.value*Jt,Qi=-hi+Ht.height,Xt=hi-ji,Cr=`${Qi}px 0px ${Xt}px 0px`,vr=h4(Ht.height,B),Kr={rootMargin:Cr,threshold:vr},Yt=new IntersectionObserver(St,Kr);Yt.observe(Ht.node),Ht.observers.progress=Yt}function vt(){_.forEach(mr)}function Ut(){_t(),di(),dr(),n&&vt()}const Ti={};return Ti.setup=({step:Ht,parent:ji,offset:Tt=.5,threshold:Jt=4,progress:hi=!1,once:Qi=!1,debug:Xt=!1,container:Cr=void 0,root:vr=null})=>(p4(Cr),_=a4(Ht,ji).map((Kr,Yt)=>({index:Yt,direction:void 0,height:Kr.offsetHeight,node:Kr,observers:{},offset:Uy(Kr.dataset.offset),top:f4(Kr),progress:0,state:void 0})),_.length?(n=hi,Q=Qi,W=Xt,B=Math.max(1,+Jt),A=Uy(Tt),P=Cr,L=vr,de(),d4(_),ve(!0),Ti):(km("no step elements"),Ti)),Ti.enable=()=>(ve(!0),Ti),Ti.disable=()=>(ve(!1),Ti),Ti.destroy=()=>(ve(!1),de(),Ti),Ti.resize=()=>(Ut(),Ti),Ti.offset=Ht=>Ht==null?A.value:(A=Uy(Ht),Ut(),Ti),Ti.onStepEnter=Ht=>(typeof Ht=="function"?l.stepEnter=Ht:km("onStepEnter requires a function"),Ti),Ti.onStepExit=Ht=>(typeof Ht=="function"?l.stepExit=Ht:km("onStepExit requires a function"),Ti),Ti.onStepProgress=Ht=>(typeof Ht=="function"?l.stepProgress=Ht:km("onStepProgress requires a function"),Ti),Ti}const Xw={__name:"VueScrollama",setup(l,{emit:u}){let _=oo(null);const A=oo(null),P=new Proxy({},{get:(q,n)=>_.value.getAttribute(n),has:(q,n)=>_.value.hasAttribute(n)});Cf(()=>{A.value=Ww(),L()}),kT(()=>{A.value&&A.value.destroy(),window.removeEventListener("resize",B)}),uC(()=>{L()});function L(){if(A.value&&A.value.destroy(),_.value){const q={step:Array.from(_.value.children),progress:"step-progress"in P,...P};A.value=Ww().setup(q).onStepProgress(n=>{u("step-progress",n)}).onStepEnter(n=>{u("step-enter",n)}).onStepExit(n=>{u("step-exit",n)}),window.addEventListener("resize",B)}}function B(){A.value&&A.value.resize()}return(q,n)=>(Ro(),fl("div",{class:"scrollama__steps",ref_key:"rootElement",ref:_},[GI(q.$slots,"default")],512))}},m4={class:"",id:"zoning-overview"},_4={style:{position:"relative"}},g4={class:"columns"},y4={class:"column is-one-thid"},x4={class:"column is-two-thirds"},v4={class:"section is-medium"},b4={class:"container"},w4={__name:"HomeView",setup(l){let u=oo(null);return oo(null),(_,A)=>(Ro(),fl("main",null,[A[8]||(A[8]=tE('

The Vermont Zoning Atlas is a database and web tool that brings together zoning laws from 1,755 districts across the state of Vermont. Its goal is to help answer fundamental questions facing cities and towns: for the land that we have, what can be built?

Zoning is complex. We tried to bring it all together.

A sub

graphic here

Zoning laws regulate the types of housing that can be built. But for ordinary people, they can be complex, overwhelming, and hard to find. The Vermont Zoning Atlas takes inspiration from the National Zoning Atlas project to "digitize, demystify, and democratize information" that is often hidden under many layers of hard to parse paperwork.

As a rural state, Vermont's zoning laws can be especially difficult to find and understand. Many towns use their own methods of record keeping and governance. But we believe that universal access to this information is critical for smart community growth.

Complex civic problems require everyone to get on board.

The Vermont Zoning Atlas began as a grassroots civic tech project run by a team of community volunteers, student interns, and a Steering Committee of stakeholders from the public and private sectors and academia.

Over nine months of work, the Atlas grew from a handful of volunteers passionate about housing justice to 36 specially trained Zoning Analysts, GIS Specialists, and team leads funded by the state of Vermont, University of Vermont fellowships, an anonymous donor, and the Vermont Community Foundation. Using a methodology published by the National Zoning Atlas, the team analyzed 1,755 districts across 209 zoned and 57 unzoned jurisdictions.

1,755

districts

36

analysts

57

unzoned

209

zoned

',3)),ci("section",m4,[A[3]||(A[3]=ci("h1",{class:"title"},"The Vermont Zoning Atlas",-1)),A[4]||(A[4]=ci("h2",{class:"subtitle"}," All the land we have, and what can be built there. ",-1)),ci("div",_4,[rn(o4,{width:800,height:100})]),ci("div",g4,[ci("div",y4,[rn(bs(Xw),{debug:!1,offset:.55,onStepEnter:A[0]||(A[0]=({element:P})=>vn(u)?u.value=P.dataset.stepNo:u=P.dataset.stepNo),class:"main__scrollama"},{default:yf(()=>A[2]||(A[2]=[ci("div",{class:"step","data-step-no":"1"},[ci("p",null,[jr(" This is every district in Vermont colored by its "),ci("strong",null,"primary zoning type"),jr(". ")]),ci("p",null," Many districts have multiple zoning types, which dictate the types of things that can be built there. ")],-1),ci("div",{class:"step","data-step-no":"2"},[ci("p",null,[jr(" Here are all the areas that are zoned "),ci("strong",null,"primarily residential"),jr(" across the state. ")])],-1),ci("div",{class:"step","data-step-no":"3"},[ci("p",null,[jr(" And here are the areas for "),ci("strong",null,"nonresidential"),jr(" buildings. ")])],-1)])),_:1})]),ci("div",x4,[rn(ez,{class:"sticky",layerToHighlight:bs(u),mapboxToken:"pk.eyJ1IjoiYmRjb29sZXkiLCJhIjoiY20zM2Nzd212MWl3cTJrcTM5NWNrcjk0byJ9.40rHMMd1TXsvF8zeqxLaBw"},null,8,["layerToHighlight"])])])]),ci("section",v4,[A[6]||(A[6]=ci("h1",{class:"title"},"Zoning is just the start.",-1)),A[7]||(A[7]=ci("h2",{class:"subtitle"}," We plan to enrich the information started by the Zoning Atlas Project with geographic data on wastewater, flood basins, and more. ",-1)),ci("div",b4,[rn(JR,{class:"sticky",mapboxToken:"pk.eyJ1IjoiYmRjb29sZXkiLCJhIjoiY20zM2Nzd212MWl3cTJrcTM5NWNrcjk0byJ9.40rHMMd1TXsvF8zeqxLaBw",fgbPath:"../../data/vt-zoning-spatial-index.fgb"}),rn(bs(Xw),{debug:!1,offset:.55,onStepEnter:A[1]||(A[1]=({element:P})=>vn(u)?u.value=P.dataset.stepNo:u=P.dataset.stepNo),class:"main__scrollama"},{default:yf(()=>A[5]||(A[5]=[ci("div",{class:"step centered","data-step-no":"1"},[ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")])],-1),ci("div",{class:"step centered","data-step-no":"2"},[ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")])],-1),ci("div",{class:"step centered","data-step-no":"3"},[ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")])],-1)])),_:1})])]),A[9]||(A[9]=ci("section",{class:"section has-text-centered"},[ci("h1",{class:"title"},"We need your help."),ci("h3",{class:"subtitle"},"Tell us what information we should be adding to this resource."),ci("iframe",{src:"https://qualtrics.uvm.edu/jfe/form/SV_2rEmqLAhRrabOx8",height:"900px",width:"100%"})],-1))]))}},T4=B0(w4,[["__scopeId","data-v-538a5d17"]]),E4=sR({history:FP("/Vermont-Livability-Map/"),routes:[{path:"/",name:"home",component:T4},{path:"/about",name:"about",component:()=>dR(()=>import("./AboutView-BC-NYkeb.js"),[])}]}),ex=eP(cR);ex.use(sP());ex.use(E4);ex.mount("#app");export{B0 as _,ci as a,oP as b,fl as c,Ro as o}; +***************************************************************************** */var s0=function(l,u){return s0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,A){_.__proto__=A}||function(_,A){for(var P in A)A.hasOwnProperty(P)&&(_[P]=A[P])},s0(l,u)};function vR(l,u){s0(l,u);function _(){this.constructor=l}l.prototype=u===null?Object.create(u):(_.prototype=u.prototype,new _)}function nh(l,u,_,A){function P(L){return L instanceof _?L:new _(function(B){B(L)})}return new(_||(_=Promise))(function(L,B){function q(Q){try{W(A.next(Q))}catch(ie){B(ie)}}function n(Q){try{W(A.throw(Q))}catch(ie){B(ie)}}function W(Q){Q.done?L(Q.value):P(Q.value).then(q,n)}W((A=A.apply(l,[])).next())})}function ml(l,u){var _={label:0,sent:function(){if(L[0]&1)throw L[1];return L[1]},trys:[],ops:[]},A,P,L,B;return B={next:q(0),throw:q(1),return:q(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function q(W){return function(Q){return n([W,Q])}}function n(W){if(A)throw new TypeError("Generator is already executing.");for(;_;)try{if(A=1,P&&(L=W[0]&2?P.return:W[0]?P.throw||((L=P.return)&&L.call(P),0):P.next)&&!(L=L.call(P,W[1])).done)return L;switch(P=0,L&&(W=[W[0]&2,L.value]),W[0]){case 0:case 1:L=W;break;case 4:return _.label++,{value:W[1],done:!1};case 5:_.label++,P=W[1],W=[0];continue;case 7:W=_.ops.pop(),_.trys.pop();continue;default:if(L=_.trys,!(L=L.length>0&&L[L.length-1])&&(W[0]===6||W[0]===2)){_=0;continue}if(W[0]===3&&(!L||W[1]>L[0]&&W[1]=l.length&&(l=void 0),{value:l&&l[A++],done:!l}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ef(l){return this instanceof Ef?(this.v=l,this):new Ef(l)}function bR(l,u,_){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=_.apply(l,u||[]),P,L=[];return P={},B("next"),B("throw"),B("return"),P[Symbol.asyncIterator]=function(){return this},P;function B(de){A[de]&&(P[de]=function(ve){return new Promise(function(Je,it){L.push([de,ve,Je,it])>1||q(de,ve)})})}function q(de,ve){try{n(A[de](ve))}catch(Je){ie(L[0][3],Je)}}function n(de){de.value instanceof Ef?Promise.resolve(de.value.v).then(W,Q):ie(L[0][2],de)}function W(de){q("next",de)}function Q(de){q("throw",de)}function ie(de,ve){de(ve),L.shift(),L.length&&q(L[0][0],L[0][1])}}var wE=function(l){vR(u,l);function u(_){var A=l.call(this,_)||this;return Object.defineProperty(A,"name",{value:"RepeaterOverflowError",enumerable:!1}),typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(A,A.constructor.prototype):A.__proto__=A.constructor.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(A,A.constructor),A}return u}(Error);(function(){function l(u){if(u<0)throw new RangeError("Capacity may not be less than 0");this._c=u,this._q=[]}return Object.defineProperty(l.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"full",{get:function(){return this._q.length>=this._c},enumerable:!1,configurable:!0}),l.prototype.add=function(u){if(this.full)throw new Error("Buffer full");this._q.push(u)},l.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},l})();(function(){function l(u){if(u<1)throw new RangeError("Capacity may not be less than 1");this._c=u,this._q=[]}return Object.defineProperty(l.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),l.prototype.add=function(u){for(;this._q.length>=this._c;)this._q.shift();this._q.push(u)},l.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},l})();(function(){function l(u){if(u<1)throw new RangeError("Capacity may not be less than 1");this._c=u,this._q=[]}return Object.defineProperty(l.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),l.prototype.add=function(u){this._q.length=Jm;return Promise.resolve(u).then(function(A){return!_&&l.state>=a0?Ju(l).then(function(P){return{value:P,done:!0}}):{value:A,done:_}})}function U0(l,u){var _,A;if(!(l.state>=yc))if(l.state=yc,l.onnext(),l.onstop(),l.err==null&&(l.err=u),l.pushes.length===0&&(typeof l.buffer>"u"||l.buffer.empty))pf(l);else try{for(var P=lh(l.pushes),L=P.next();!L.done;L=P.next()){var B=L.value;B.resolve()}}catch(q){_={error:q}}finally{try{L&&!L.done&&(A=P.return)&&A.call(P)}finally{if(_)throw _.error}}}function pf(l){var u,_;if(!(l.state>=Jm)){l.state=a0||(l.state=Qm)throw new wE("No more than "+Qm+" pending calls to push are allowed on a single repeater.");if(l.state>=yc)return Promise.resolve(void 0);var _=l.pending===void 0?Promise.resolve(u):l.pending.then(function(){return u});_=_.catch(function(n){l.state=_w)){l.state=_w;var u=wR.bind(null,l),_=TR(l);l.execution=new Promise(function(A){return A(l.executor(u,_))}),l.execution.catch(function(){return U0(l)})}}var Cm=new WeakMap,zf=function(){function l(u,_){Cm.set(this,{executor:u,buffer:_,err:void 0,state:Fy,pushes:[],nexts:[],pending:void 0,execution:void 0,onnext:e_,onstop:e_})}return l.prototype.next=function(u){o0(u);var _=Cm.get(this);if(_===void 0)throw new Error("WeakMap error");if(_.nexts.length>=Qm)throw new wE("No more than "+Qm+" pending calls to next are allowed on a single repeater.");if(_.state<=Fy&&ER(_),_.onnext(u),typeof _.buffer<"u"&&!_.buffer.empty){var A=dc(_,_.buffer.remove());if(_.pushes.length){var P=_.pushes.shift();_.buffer.add(P.value),_.onnext=P.resolve}return A}else if(_.pushes.length){var L=_.pushes.shift();return _.onnext=L.resolve,dc(_,L.value)}else if(_.state>=yc)return pf(_),dc(_,Ju(_));return new Promise(function(B){return _.nexts.push({resolve:B,value:u})})},l.prototype.return=function(u){o0(u);var _=Cm.get(this);if(_===void 0)throw new Error("WeakMap error");return pf(_),_.execution=Promise.resolve(_.execution).then(function(){return u}),dc(_,Ju(_))},l.prototype.throw=function(u){var _=Cm.get(this);if(_===void 0)throw new Error("WeakMap error");return _.state<=Fy||_.state>=yc||typeof _.buffer<"u"&&!_.buffer.empty?(pf(_),_.err==null&&(_.err=u),dc(_,Ju(_))):this.next(Promise.reject(u))},l.prototype[Symbol.asyncIterator]=function(){return this},l.race=SR,l.merge=MR,l.zip=AR,l.latest=IR,l}();function C_(l,u){var _,A,P=[],L=function(W){W!=null&&typeof W[Symbol.asyncIterator]=="function"?P.push(W[Symbol.asyncIterator]()):W!=null&&typeof W[Symbol.iterator]=="function"?P.push(W[Symbol.iterator]()):P.push(function(){return bR(this,arguments,function(){return ml(this,function(de){switch(de.label){case 0:return u.yieldValues?[4,Ef(W)]:[3,3];case 1:return[4,de.sent()];case 2:de.sent(),de.label=3;case 3:return u.returnValues?[4,Ef(W)]:[3,5];case 4:return[2,de.sent()];case 5:return[2]}})})}())};try{for(var B=lh(l),q=B.next();!q.done;q=B.next()){var n=q.value;L(n)}}catch(W){_={error:W}}finally{try{q&&!q.done&&(A=B.return)&&A.call(B)}finally{if(_)throw _.error}}return P}function SR(l){var u=this,_=C_(l,{returnValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n,W,Q;return ml(this,function(ie){switch(ie.label){case 0:if(!_.length)return P(),[2];B=!1,P.then(function(){L(),B=!0}),ie.label=1;case 1:ie.trys.push([1,,5,7]),n=void 0,W=0,Q=function(){var de,ve,Je,it,gt,Bt;return ml(this,function(Ye){switch(Ye.label){case 0:de=W;try{for(ve=(gt=void 0,lh(_)),Je=ve.next();!Je.done;Je=ve.next())it=Je.value,Promise.resolve(it.next()).then(function(St){St.done?(P(),q===void 0&&(q=St)):W===de&&(W++,L(St))},function(St){return P(St)})}catch(St){gt={error:St}}finally{try{Je&&!Je.done&&(Bt=ve.return)&&Bt.call(ve)}finally{if(gt)throw gt.error}}return[4,new Promise(function(St){return L=St})];case 1:return n=Ye.sent(),n===void 0?[3,3]:[4,A(n.value)];case 2:Ye.sent(),Ye.label=3;case 3:return[2]}})},ie.label=2;case 2:return B?[3,4]:[5,Q()];case 3:return ie.sent(),[3,2];case 4:return[2,q&&q.value];case 5:return P(),[4,Promise.race(_.map(function(de){return de.return&&de.return()}))];case 6:return ie.sent(),[7];case 7:return[2]}})})})}function MR(l){var u=this,_=C_(l,{yieldValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n=this;return ml(this,function(W){switch(W.label){case 0:if(!_.length)return P(),[2];L=[],B=!1,P.then(function(){var Q,ie;B=!0;try{for(var de=lh(L),ve=de.next();!ve.done;ve=de.next()){var Je=ve.value;Je()}}catch(it){Q={error:it}}finally{try{ve&&!ve.done&&(ie=de.return)&&ie.call(de)}finally{if(Q)throw Q.error}}}),W.label=1;case 1:return W.trys.push([1,,3,4]),[4,Promise.all(_.map(function(Q,ie){return nh(n,void 0,void 0,function(){var de,ve;return ml(this,function(Je){switch(Je.label){case 0:Je.trys.push([0,,6,9]),Je.label=1;case 1:return B?[3,5]:(Promise.resolve(Q.next()).then(function(it){return L[ie](it)},function(it){return P(it)}),[4,new Promise(function(it){L[ie]=it})]);case 2:return de=Je.sent(),de===void 0?[3,4]:de.done?(q=de,[2]):[4,A(de.value)];case 3:Je.sent(),Je.label=4;case 4:return[3,1];case 5:return[3,9];case 6:return ve=Q.return,ve?[4,Q.return()]:[3,8];case 7:ve=Je.sent(),Je.label=8;case 8:return[7];case 9:return[2]}})})}))];case 2:return W.sent(),[2,q&&q.value];case 3:return P(),[7];case 4:return[2]}})})})}function AR(l){var u=this,_=C_(l,{returnValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n;return ml(this,function(W){switch(W.label){case 0:if(!_.length)return P(),[2,[]];B=!1,P.then(function(){L(),B=!0}),W.label=1;case 1:W.trys.push([1,,6,8]),W.label=2;case 2:return B?[3,5]:(Promise.all(_.map(function(Q){return Q.next()})).then(function(Q){return L(Q)},function(Q){return P(Q)}),[4,new Promise(function(Q){return L=Q})]);case 3:return q=W.sent(),q===void 0?[2]:(n=q.map(function(Q){return Q.value}),q.some(function(Q){return Q.done})?[2,n]:[4,A(n)]);case 4:return W.sent(),[3,2];case 5:return[3,8];case 6:return P(),[4,Promise.all(_.map(function(Q){return Q.return&&Q.return()}))];case 7:return W.sent(),[7];case 8:return[2]}})})})}function IR(l){var u=this,_=C_(l,{yieldValues:!0,returnValues:!0});return new zf(function(A,P){return nh(u,void 0,void 0,function(){var L,B,q,n,W,Q=this;return ml(this,function(ie){switch(ie.label){case 0:if(!_.length)return P(),[2,[]];B=[],q=!1,P.then(function(){var de,ve;L();try{for(var Je=lh(B),it=Je.next();!it.done;it=Je.next()){var gt=it.value;gt()}}catch(Bt){de={error:Bt}}finally{try{it&&!it.done&&(ve=Je.return)&&ve.call(Je)}finally{if(de)throw de.error}}q=!0}),ie.label=1;case 1:return ie.trys.push([1,,5,7]),Promise.all(_.map(function(de){return de.next()})).then(function(de){return L(de)},function(de){return P(de)}),[4,new Promise(function(de){return L=de})];case 2:return n=ie.sent(),n===void 0?[2]:(W=n.map(function(de){return de.value}),n.every(function(de){return de.done})?[2,W]:[4,A(W.slice())]);case 3:return ie.sent(),[4,Promise.all(_.map(function(de,ve){return nh(Q,void 0,void 0,function(){var Je;return ml(this,function(it){switch(it.label){case 0:if(n[ve].done)return[2,n[ve].value];it.label=1;case 1:return q?[3,4]:(Promise.resolve(de.next()).then(function(gt){return B[ve](gt)},function(gt){return P(gt)}),[4,new Promise(function(gt){return B[ve]=gt})]);case 2:return Je=it.sent(),Je===void 0?[2,n[ve].value]:Je.done?[2,Je.value]:(W[ve]=Je.value,[4,A(W.slice())]);case 3:return it.sent(),[3,1];case 4:return[2]}})})}))];case 4:return[2,ie.sent()];case 5:return P(),[4,Promise.all(_.map(function(de){return de.return&&de.return()}))];case 6:return ie.sent(),[7];case 7:return[2]}})})})}const f_=class f_{constructor(){Er(this,"_extraRequestThreshold",262144)}extraRequestThreshold(){return this._extraRequestThreshold}setExtraRequestThreshold(u){if(u<0)throw Error("extraRequestThreshold cannot be negative");this._extraRequestThreshold=u}};Er(f_,"global",new f_);let t_=f_;const CR=40,PR=16;function j0(l,u){u=Math.min(Math.max(+u,2),65535);let _=l,A=_;do A+=_=Math.ceil(_/u);while(_!==1);return 40*A}function RR(l,u){if(u<2)throw Error("Node size must be at least 2");if(l===0)throw Error("Number of items must be greater than 0");let _=l,A=_,P=[_];do A+=_=Math.ceil(_/u),P.push(_);while(_!==1);let L=[];for(let q of(_=A,P))L.push(_-q),_-=q;let B=[];for(let q=0;q=Q,it=(()=>{let[,Ye]=W[de.level()],St=Math.min(de.endNodeIdx()+u,Ye);return Je&&StBt.getFloat64(Dt+16,!0)||B>Bt.getFloat64(Dt+24,!0))continue;let _t=Bt.getBigUint64(Dt+32,!0);if(Je){let dr=(()=>{if(!(Ye{let dr=de.level()-1;return new P([Number(_t),Number(_t)+1],dr)})();di!==void 0&&(di.level(),Ot.level()),ie.push(Ot)}}}const fc=new Uint8Array([102,103,98,3,102,103,98,0]),sa=4;class G0{constructor(u,_,A,P,L){Er(this,"headerClient");Er(this,"header");Er(this,"headerLength");Er(this,"indexLength");Er(this,"nocache");this.headerClient=u,this.header=_,this.headerLength=A,this.indexLength=P,this.nocache=L}static async open(u,_){let A,P=new yw(u,_),L=2024+(()=>{let W,Q=0;for(W=0;W<3;W++)Q+=PR**W*CR;return Q})();if(!new Uint8Array(await P.getRange(0,8,L,"header")).subarray(0,3).every((W,Q)=>fc[Q]===W))throw Error("Not a FlatGeobuf file");if((A=new DataView(await P.getRange(8,4,L,"header")).getUint32(0,!0))>10485760||A<8)throw Error("Invalid header size");let B=await P.getRange(12,A,L,"header"),q=V0(new aa(new Uint8Array(B))),n=j0(q.featuresCount,q.indexNodeSize);return new G0(P,q,A,n,_)}async*selectBbox(u){let _=this.lengthBeforeTree(),A=this.headerClient,P=async function(n,W){return A.getRange(_+n,W,0,"index")},L=[],B=[];for await(let n of zR(this.header.featuresCount,this.header.indexNodeSize,u,P)){let[W,Q]=n,[,,ie]=n;if(ie||(ie=4),B.length==0){B.push([W,ie,Q]);continue}let de=B[B.length-1];W-(de[0]+de[1])>t_.global.extraRequestThreshold()&&(L.push(B),B=[]),B.push([W,ie,Q])}this.headerClient.logUsage("header+index"),B.length>0&&L.push(B);let q=L.flatMap(n=>this.readFeatureBatch(n,this.nocache));yield*zf.merge(q)}lengthBeforeTree(){return fc.length+sa+this.headerLength}lengthBeforeFeatures(){return this.lengthBeforeTree()+this.indexLength}buildFeatureClient(u){return new yw(this.headerClient.httpClient,u)}async*readFeatureBatch(u,_){let[A]=u[0],[P,L]=u[u.length-1],B=this.buildFeatureClient(_),q=P+L-A;for(let[n,,W]of u){let Q=await this.readFeature(B,n,q);yield{id:W,feature:Q},q=0}B.logUsage("feature")}async readFeature(u,_,A){let P,L=_+this.lengthBeforeFeatures();P=new DataView(await u.getRange(L,4,A,"feature length")).getUint32(0,!0);let B=new Uint8Array(await u.getRange(L+4,P,A,"feature data")),q=new Uint8Array(P+sa);q.set(B,sa);let n=new aa(q);return n.setPosition(sa),to.getRootAsFeature(n)}}class yw{constructor(u,_){Er(this,"httpClient");Er(this,"bytesEverUsed",0);Er(this,"bytesEverFetched",0);Er(this,"buffer",new ArrayBuffer(0));Er(this,"head",0);if(typeof u=="string")this.httpClient=new xw(u,_);else if(u instanceof xw)this.httpClient=u;else throw Error("Unknown source ")}async getRange(u,_,A,P){this.bytesEverUsed+=_;let L=u-this.head,B=L+_;if(L>=0&&B<=this.buffer.byteLength)return this.buffer.slice(L,B);let q=Math.max(_,A);return this.bytesEverFetched+=q,this.buffer=await this.httpClient.getRange(u,q,P),this.head=u,this.buffer.slice(0,_)}logUsage(u){u.split(" ")[0],(100*this.bytesEverUsed/this.bytesEverFetched).toFixed(2)}}class xw{constructor(u,_){Er(this,"url");Er(this,"nocache");Er(this,"requestsEverMade",0);Er(this,"bytesEverRequested",0);this.url=u,this.nocache=_}async getRange(u,_,A){this.requestsEverMade+=1,this.bytesEverRequested+=_;let P={Range:`bytes=${u}-${u+_-1}`};return this.nocache&&(P["Cache-Control"]="no-cache, no-store"),(await fetch(this.url,{headers:P})).arrayBuffer()}}function DR(l,u,_){if(!l.subarray(0,3).every((Q,ie)=>fc[ie]===Q))throw Error("Not a FlatGeobuf file");let A=new aa(l),P=A.readUint32(fc.length);A.setPosition(fc.length+sa);let L=V0(A),B=fc.length+sa+P,{indexNodeSize:q,featuresCount:n}=L;q>0&&(B+=j0(n,q));let W=[];for(;Bawait P.slice(ve),B=new Uint8Array(await L(8));if(!B.subarray(0,3).every((ve,Je)=>fc[Je]===ve))throw Error("Not a FlatGeobuf file");B=new Uint8Array(await L(4));let q=new aa(B),n=q.readUint32(0);B=new Uint8Array(await L(n));let W=V0(q=new aa(B)),{indexNodeSize:Q,featuresCount:ie}=W;if(Q>0){let ve=j0(ie,Q);await L(ve)}let de=0;for(;A=await OR(L,W,u,de++);)yield A}async function*kR(l,u,_,A,P=!1){let L=await G0.open(l,P);for await(let B of L.selectBbox(u))yield _(B.id,B.feature,L.header)}async function OR(l,u,_,A){let P=new Uint8Array(await l(4,"feature length"));if(P.byteLength===0)return;let L=new aa(P),B=L.readUint32(0);P=new Uint8Array(await l(B,"feature data"));let q=new Uint8Array(B+4);return q.set(P,4),(L=new aa(q)).setPosition(sa),_(A,to.getRootAsFeature(L),u)}const FR={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class TE{constructor(u){this.code_=u.code,this.units_=u.units,this.extent_=u.extent!==void 0?u.extent:null,this.worldExtent_=u.worldExtent!==void 0?u.worldExtent:null,this.axisOrientation_=u.axisOrientation!==void 0?u.axisOrientation:"enu",this.global_=u.global!==void 0?u.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=u.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=u.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||FR[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(u){this.global_=u,this.canWrapX_=!!(u&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(u){this.defaultTileGrid_=u}setExtent(u){this.extent_=u,this.canWrapX_=!!(this.global_&&u)}setWorldExtent(u){this.worldExtent_=u}setGetPointResolution(u){this.getPointResolutionFunc_=u}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Df=6378137,ju=Math.PI*Df,BR=[-ju,-ju,ju,ju],NR=[-180,-85,180,85],Pm=Df*Math.log(Math.tan(Math.PI/2));class Bu extends TE{constructor(u){super({code:u,units:"m",extent:BR,global:!0,worldExtent:NR,getPointResolution:function(_,A){return _/Math.cosh(A[1]/Df)}})}}const vw=[new Bu("EPSG:3857"),new Bu("EPSG:102100"),new Bu("EPSG:102113"),new Bu("EPSG:900913"),new Bu("http://www.opengis.net/def/crs/EPSG/0/3857"),new Bu("http://www.opengis.net/gml/srs/epsg.xml#3857")];function VR(l,u,_,A){const P=l.length;_=_>1?_:2,A=A??_,u===void 0&&(_>2?u=l.slice():u=new Array(P));for(let L=0;LPm?B=Pm:B<-Pm&&(B=-Pm),u[L+1]=B}return u}function UR(l,u,_,A){const P=l.length;_=_>1?_:2,A=A??_,u===void 0&&(_>2?u=l.slice():u=new Array(P));for(let L=0;LL.coordinates)}}let A=function(P,L){let B=P.xyArray(),q=P.zArray();switch(L){case xn.Point:{let n=Array.from(B);return q&&n.push(q[0]),n}case xn.MultiPoint:case xn.LineString:return Oy(B,q);case xn.MultiLineString:case xn.Polygon:return function(n,W,Q){let ie;if(!Q||Q.length===0)return[Oy(n,W)];let de=0,ve=Array.from(Q).map(Je=>n.slice(de,de=Je<<1));return W&&(de=0,ie=Array.from(Q).map(Je=>W.slice(de,de=Je))),ve.map((Je,it)=>Oy(Je,ie?ie[it]:void 0))}(B,q,P.endsArray())}}(l,_);return{type:xn[_],coordinates:A}}function q0(l,u,_){let A=_.columns;return{type:"Feature",id:l,geometry:l0(u.geometry(),_.geometryType),properties:xR(u,A)}}function WR(l,u){return{type:"FeatureCollection",features:DR(l,q0)}}function XR(l,u){return LR(l,q0)}function YR(l,u,_,A=!1){return kR(l,u,q0,_,A)}function SE(l,u,_,A=!1){return l instanceof Uint8Array?WR(l):l instanceof ReadableStream?XR(l):YR(l,u,_,A)}const KR={class:"map-container"},JR={__name:"MontpelierMap",props:{mapboxToken:{type:String,required:!0},fgbPath:{type:String,required:!0},initialCenter:{type:Array,default:()=>[-72.575,44.2601],required:!1},initialZoom:{type:Number,default:9},layerToHighlight:{type:String,default:"Nonresidential",requred:!1}},setup(l){const u=l,_=oo([]),A=oo(!1);Yu(u,q=>{console.log("props changed",q.layerToHighlight),q.layerToHighlight==2&&P()},{deep:!1});const P=()=>{console.log("toggle",L),L&&(A.value=!A.value,A.value?(L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",["==",["get","Type_of_Zoning_District"],"Nonresidential"]),L.setPaintProperty("fgb-layer","fill-opacity",.9)},300)):(L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",null),L.setPaintProperty("fgb-layer","fill-opacity",.9)},100)))};let L;const B=()=>{L=new Ku.Map({accessToken:u.mapboxToken,container:"map",style:"mapbox://styles/mapbox/light-v11",center:u.initialCenter,zoom:12});const q=document.getElementById("loading"),n=document.getElementById("progress"),W=document.getElementById("legend");let Q=0,ie=null;const de=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999","#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3","#7fc97f","#beaed4","#fdc086"],ve=new Map;let Je=0;function it(Ye){return ve.has(Ye)||(ve.set(Ye,de[Je%de.length]),Je++,gt()),ve.get(Ye)}function gt(){const Ye=document.createElement("div");for(Array.from(ve.entries()).sort((St,Dt)=>St[0].localeCompare(Dt[0])).forEach(([St,Dt])=>{const _t=document.createElement("div");_t.innerHTML=`
${St}`,Ye.appendChild(_t)});W.childNodes.length>2;)W.removeChild(W.lastChild);W.appendChild(Ye)}function Bt(Ye){Q=Ye,n.textContent=`Loaded ${Ye} features`}L.on("load",async()=>{try{q.style.display="block",n.style.display="block",console.log("Starting to load FlatGeoBuf data..."),L.addSource("fgb-data",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),L.addLayer({id:"fgb-layer",type:"fill",source:"fgb-data",paint:{"fill-color":"#ccc","fill-opacity":.7,"fill-outline-color":"#000"}}),ie=L.getSource("fgb-data");let Ye=[];const St=await fetch("../data/vt-zoning-spatial-index.fgb");if(!St.ok)throw new Error(`HTTP error! status: ${St.status}`);for await(const _t of SE(St.body)){const Ai=_t.properties.Type_of_Zoning_District||"Unknown";if(it(Ai),Ye.push(_t),Q++,Q%100===0&&(Bt(Q),ie.setData({type:"FeatureCollection",features:Ye}),ve.size>0)){const di=["match",["get","Type_of_Zoning_District"]];for(const[Ot,dr]of ve)di.push(Ot),di.push(dr);di.push("#ccc"),L.setPaintProperty("fgb-layer","fill-color",di)}}ie.setData({type:"FeatureCollection",features:Ye}),_.value=Ye;const Dt=new Ku.LngLatBounds;Ye.forEach(_t=>{if(_t.geometry){const Ai=_t.geometry.coordinates;_t.geometry.type==="Polygon"?Ai[0].forEach(di=>Dt.extend(di)):_t.geometry.type==="Point"&&Dt.extend(Ai)}}),L.fitBounds(Dt,{padding:50}),L.setZoom(11),console.log("Map visualization complete")}catch(Ye){console.error("Error loading FlatGeoBuf data:",Ye),q.textContent="Error loading data"}finally{q.style.display="none",n.style.display="none"}}),L.on("click","fgb-layer",Ye=>{if(!Ye.features.length)return;const St=Ye.features[0],Dt=Ye.lngLat,_t=Object.entries(St.properties).map(([Ai,di])=>`${Ai}: ${di}`).join("
");new Ku.Popup().setLngLat(Dt).setHTML(_t).addTo(L)}),L.on("mouseenter","fgb-layer",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","fgb-layer",()=>{L.getCanvas().style.cursor=""})};return Cf(()=>{B()}),E_(()=>{L.value&&L.value.remove()}),(q,n)=>(Ro(),fl("div",KR,[ci("button",{onClick:P,class:x_([{active:A.value},"filter-button"])},$m(A.value?"Show All":"Show Nonresidential"),3),n[0]||(n[0]=ci("div",{id:"map"},null,-1)),n[1]||(n[1]=ci("div",{id:"loading",class:"loading"},"Loading data...",-1)),n[2]||(n[2]=ci("div",{id:"progress"},null,-1)),n[3]||(n[3]=ci("div",{id:"legend",class:"legend"},[ci("h4",null,"Primary zoning classification")],-1))]))}},QR={class:"map-container"},ez={__name:"ZoningMap",props:{mapboxToken:{type:String,required:!0},initialCenter:{type:Array,default:()=>[-72.5778,44.4688]},initialZoom:{type:Number,default:6},layerToHighlight:{type:String,default:"Nonresidential",requred:!1}},setup(l){const u=l,_=oo([]);oo(!1),Yu(u,q=>{console.log("props changed",q.layerToHighlight),q.layerToHighlight==2?A("Primarily Residential"):q.layerToHighlight==3?A("Nonresidential"):P()},{deep:!1});const A=q=>{console.log("toggle",L),L&&(L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",["==",["get","Type_of_Zoning_District"],q]),L.setPaintProperty("fgb-layer","fill-opacity",.9)},300))},P=()=>{L.setPaintProperty("fgb-layer","fill-opacity",0),setTimeout(()=>{L.setFilter("fgb-layer",null),L.setPaintProperty("fgb-layer","fill-opacity",.9)},100)};let L;const B=()=>{L=new Ku.Map({accessToken:u.mapboxToken,container:"zoning-map",style:"mapbox://styles/mapbox/light-v11",center:u.initialCenter,zoom:u.initialZoom});const q=document.getElementById("zoning-map-loading"),n=document.getElementById("zoning-map-progress"),W=document.getElementById("zoning-map-legend");let Q=0,ie=null;const de=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999","#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3","#7fc97f","#beaed4","#fdc086"],ve=new Map;let Je=0;function it(Ye){return ve.has(Ye)||(ve.set(Ye,de[Je%de.length]),Je++,gt()),ve.get(Ye)}function gt(){const Ye=document.createElement("div");for(Array.from(ve.entries()).sort((St,Dt)=>St[0].localeCompare(Dt[0])).forEach(([St,Dt])=>{const _t=document.createElement("div");_t.className="legend-item",_t.innerHTML=`
${St}`,Ye.appendChild(_t)});W.childNodes.length>2;)W.removeChild(W.lastChild);W.appendChild(Ye)}function Bt(Ye){Q=Ye,n.textContent=`Loaded ${Ye} features`}L.on("load",async()=>{try{q.style.display="block",n.style.display="block",console.log("Starting to load FlatGeoBuf data..."),L.addSource("fgb-data",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),L.addLayer({id:"fgb-layer",type:"fill",source:"fgb-data",paint:{"fill-color":"#ccc","fill-opacity":.7,"fill-outline-color":"#000"}}),ie=L.getSource("fgb-data");let Ye=[];const Dt=await fetch("https://verso-uvm.github.io/Vermont-Livability-Map/data/vt-zoning-spatial-index.fgb");if(!Dt.ok)throw new Error(`HTTP error! status: ${Dt.status}`);for await(const Ai of SE(Dt.body)){const di=Ai.properties.Type_of_Zoning_District||"Unknown";if(it(di),Ye.push(Ai),Q++,Q%100===0&&(Bt(Q),ie.setData({type:"FeatureCollection",features:Ye}),ve.size>0)){const Ot=["match",["get","Type_of_Zoning_District"]];for(const[dr,mr]of ve)Ot.push(dr),Ot.push(mr);Ot.push("#ccc"),L.setPaintProperty("fgb-layer","fill-color",Ot)}}ie.setData({type:"FeatureCollection",features:Ye}),_.value=Ye;const _t=new Ku.LngLatBounds;Ye.forEach(Ai=>{if(Ai.geometry){const di=Ai.geometry.coordinates;Ai.geometry.type==="Polygon"?di[0].forEach(Ot=>_t.extend(Ot)):Ai.geometry.type==="Point"&&_t.extend(di)}}),L.fitBounds(_t,{padding:50}),console.log("Map visualization complete")}catch(Ye){console.error("Error loading FlatGeoBuf data:",Ye),q.textContent="Error loading data"}finally{q.style.display="none",n.style.display="none"}}),L.on("click","fgb-layer",Ye=>{if(!Ye.features.length)return;const St=Ye.features[0],Dt=Ye.lngLat,_t=Object.entries(St.properties).map(([Ai,di])=>`${Ai}: ${di}`).join("
");new Ku.Popup().setLngLat(Dt).setHTML(_t).addTo(L)}),L.on("mouseenter","fgb-layer",()=>{L.getCanvas().style.cursor="pointer"}),L.on("mouseleave","fgb-layer",()=>{L.getCanvas().style.cursor=""})};return Cf(()=>{B()}),E_(()=>{L.value&&L.value.remove()}),(q,n)=>(Ro(),fl("div",QR,n[0]||(n[0]=[ci("div",{id:"zoning-map"},null,-1),ci("div",{id:"zoning-map-loading",class:"loading"},"Loading data...",-1),ci("div",{id:"zoning-map-progress"},null,-1),ci("div",{id:"zoning-map-legend",class:"legend"},[ci("h4",null,"Primary zoning classification")],-1)])))}};function Vm(l,u){return l==null||u==null?NaN:lu?1:l>=u?0:NaN}function tz(l,u){return l==null||u==null?NaN:ul?1:u>=l?0:NaN}function ME(l){let u,_,A;l.length!==2?(u=Vm,_=(q,n)=>Vm(l(q),n),A=(q,n)=>l(q)-n):(u=l===Vm||l===tz?l:iz,_=l,A=l);function P(q,n,W=0,Q=q.length){if(W>>1;_(q[ie],n)<0?W=ie+1:Q=ie}while(W>>1;_(q[ie],n)<=0?W=ie+1:Q=ie}while(WW&&A(q[ie-1],n)>-A(q[ie],n)?ie-1:ie}return{left:P,center:B,right:L}}function iz(){return 0}function rz(l){return l===null?NaN:+l}const nz=ME(Vm),sz=nz.right;ME(rz).center;class Ew extends Map{constructor(u,_=lz){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:_}}),u!=null)for(const[A,P]of u)this.set(A,P)}get(u){return super.get(Sw(this,u))}has(u){return super.has(Sw(this,u))}set(u,_){return super.set(oz(this,u),_)}delete(u){return super.delete(az(this,u))}}function Sw({_intern:l,_key:u},_){const A=u(_);return l.has(A)?l.get(A):_}function oz({_intern:l,_key:u},_){const A=u(_);return l.has(A)?l.get(A):(l.set(A,_),_)}function az({_intern:l,_key:u},_){const A=u(_);return l.has(A)&&(_=l.get(A),l.delete(A)),_}function lz(l){return l!==null&&typeof l=="object"?l.valueOf():l}const cz=Math.sqrt(50),uz=Math.sqrt(10),hz=Math.sqrt(2);function r_(l,u,_){const A=(u-l)/Math.max(0,_),P=Math.floor(Math.log10(A)),L=A/Math.pow(10,P),B=L>=cz?10:L>=uz?5:L>=hz?2:1;let q,n,W;return P<0?(W=Math.pow(10,-P)/B,q=Math.round(l*W),n=Math.round(u*W),q/Wu&&--n,W=-W):(W=Math.pow(10,P)*B,q=Math.round(l/W),n=Math.round(u/W),q*Wu&&--n),n0))return[];if(l===u)return[l];const A=u=P))return[];const q=L-P+1,n=new Array(q);if(A)if(B<0)for(let W=0;W{}};function AE(){for(var l=0,u=arguments.length,_={},A;l=0&&(A=_.slice(P+1),_=_.slice(0,P)),_&&!u.hasOwnProperty(_))throw new Error("unknown type: "+_);return{type:_,name:A}})}Um.prototype=AE.prototype={constructor:Um,on:function(l,u){var _=this._,A=mz(l+"",_),P,L=-1,B=A.length;if(arguments.length<2){for(;++L0)for(var _=new Array(P),A=0,P,L;A=0&&(u=l.slice(0,_))!=="xmlns"&&(l=l.slice(_+1)),Aw.hasOwnProperty(u)?{space:Aw[u],local:l}:l}function gz(l){return function(){var u=this.ownerDocument,_=this.namespaceURI;return _===u0&&u.documentElement.namespaceURI===u0?u.createElement(l):u.createElementNS(_,l)}}function yz(l){return function(){return this.ownerDocument.createElementNS(l.space,l.local)}}function IE(l){var u=P_(l);return(u.local?yz:gz)(u)}function xz(){}function $0(l){return l==null?xz:function(){return this.querySelector(l)}}function vz(l){typeof l!="function"&&(l=$0(l));for(var u=this._groups,_=u.length,A=new Array(_),P=0;P<_;++P)for(var L=u[P],B=L.length,q=A[P]=new Array(B),n,W,Q=0;Q=St&&(St=Ye+1);!(_t=gt[St])&&++St=0;)(B=A[P])&&(L&&B.compareDocumentPosition(L)^4&&L.parentNode.insertBefore(B,L),L=B);return this}function $z(l){l||(l=Hz);function u(ie,de){return ie&&de?l(ie.__data__,de.__data__):!ie-!de}for(var _=this._groups,A=_.length,P=new Array(A),L=0;Lu?1:l>=u?0:NaN}function Zz(){var l=arguments[0];return arguments[0]=this,l.apply(null,arguments),this}function Wz(){return Array.from(this)}function Xz(){for(var l=this._groups,u=0,_=l.length;u<_;++u)for(var A=l[u],P=0,L=A.length;P1?this.each((u==null?oD:typeof u=="function"?lD:aD)(l,u,_??"")):sh(this.node(),l)}function sh(l,u){return l.style.getPropertyValue(u)||DE(l).getComputedStyle(l,null).getPropertyValue(u)}function uD(l){return function(){delete this[l]}}function hD(l,u){return function(){this[l]=u}}function dD(l,u){return function(){var _=u.apply(this,arguments);_==null?delete this[l]:this[l]=_}}function fD(l,u){return arguments.length>1?this.each((u==null?uD:typeof u=="function"?dD:hD)(l,u)):this.node()[l]}function LE(l){return l.trim().split(/^|\s+/)}function H0(l){return l.classList||new kE(l)}function kE(l){this._node=l,this._names=LE(l.getAttribute("class")||"")}kE.prototype={add:function(l){var u=this._names.indexOf(l);u<0&&(this._names.push(l),this._node.setAttribute("class",this._names.join(" ")))},remove:function(l){var u=this._names.indexOf(l);u>=0&&(this._names.splice(u,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(l){return this._names.indexOf(l)>=0}};function OE(l,u){for(var _=H0(l),A=-1,P=u.length;++A=0&&(_=u.slice(A+1),u=u.slice(0,A)),{type:u,name:_}})}function UD(l){return function(){var u=this.__on;if(u){for(var _=0,A=-1,P=u.length,L;_>8&15|u>>4&240,u>>4&15|u&240,(u&15)<<4|u&15,1):_===8?Rm(u>>24&255,u>>16&255,u>>8&255,(u&255)/255):_===4?Rm(u>>12&15|u>>8&240,u>>8&15|u>>4&240,u>>4&15|u&240,((u&15)<<4|u&15)/255):null):(u=KD.exec(l))?new os(u[1],u[2],u[3],1):(u=JD.exec(l))?new os(u[1]*255/100,u[2]*255/100,u[3]*255/100,1):(u=QD.exec(l))?Rm(u[1],u[2],u[3],u[4]):(u=eL.exec(l))?Rm(u[1]*255/100,u[2]*255/100,u[3]*255/100,u[4]):(u=tL.exec(l))?Lw(u[1],u[2]/100,u[3]/100,1):(u=iL.exec(l))?Lw(u[1],u[2]/100,u[3]/100,u[4]):Iw.hasOwnProperty(l)?Rw(Iw[l]):l==="transparent"?new os(NaN,NaN,NaN,0):null}function Rw(l){return new os(l>>16&255,l>>8&255,l&255,1)}function Rm(l,u,_,A){return A<=0&&(l=u=_=NaN),new os(l,u,_,A)}function sL(l){return l instanceof kf||(l=xc(l)),l?(l=l.rgb(),new os(l.r,l.g,l.b,l.opacity)):new os}function h0(l,u,_,A){return arguments.length===1?sL(l):new os(l,u,_,A??1)}function os(l,u,_,A){this.r=+l,this.g=+u,this.b=+_,this.opacity=+A}Z0(os,h0,VE(kf,{brighter(l){return l=l==null?s_:Math.pow(s_,l),new os(this.r*l,this.g*l,this.b*l,this.opacity)},darker(l){return l=l==null?Sf:Math.pow(Sf,l),new os(this.r*l,this.g*l,this.b*l,this.opacity)},rgb(){return this},clamp(){return new os(_c(this.r),_c(this.g),_c(this.b),o_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zw,formatHex:zw,formatHex8:oL,formatRgb:Dw,toString:Dw}));function zw(){return`#${pc(this.r)}${pc(this.g)}${pc(this.b)}`}function oL(){return`#${pc(this.r)}${pc(this.g)}${pc(this.b)}${pc((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dw(){const l=o_(this.opacity);return`${l===1?"rgb(":"rgba("}${_c(this.r)}, ${_c(this.g)}, ${_c(this.b)}${l===1?")":`, ${l})`}`}function o_(l){return isNaN(l)?1:Math.max(0,Math.min(1,l))}function _c(l){return Math.max(0,Math.min(255,Math.round(l)||0))}function pc(l){return l=_c(l),(l<16?"0":"")+l.toString(16)}function Lw(l,u,_,A){return A<=0?l=u=_=NaN:_<=0||_>=1?l=u=NaN:u<=0&&(l=NaN),new no(l,u,_,A)}function UE(l){if(l instanceof no)return new no(l.h,l.s,l.l,l.opacity);if(l instanceof kf||(l=xc(l)),!l)return new no;if(l instanceof no)return l;l=l.rgb();var u=l.r/255,_=l.g/255,A=l.b/255,P=Math.min(u,_,A),L=Math.max(u,_,A),B=NaN,q=L-P,n=(L+P)/2;return q?(u===L?B=(_-A)/q+(_0&&n<1?0:B,new no(B,q,n,l.opacity)}function aL(l,u,_,A){return arguments.length===1?UE(l):new no(l,u,_,A??1)}function no(l,u,_,A){this.h=+l,this.s=+u,this.l=+_,this.opacity=+A}Z0(no,aL,VE(kf,{brighter(l){return l=l==null?s_:Math.pow(s_,l),new no(this.h,this.s,this.l*l,this.opacity)},darker(l){return l=l==null?Sf:Math.pow(Sf,l),new no(this.h,this.s,this.l*l,this.opacity)},rgb(){var l=this.h%360+(this.h<0)*360,u=isNaN(l)||isNaN(this.s)?0:this.s,_=this.l,A=_+(_<.5?_:1-_)*u,P=2*_-A;return new os(Ny(l>=240?l-240:l+120,P,A),Ny(l,P,A),Ny(l<120?l+240:l-120,P,A),this.opacity)},clamp(){return new no(kw(this.h),zm(this.s),zm(this.l),o_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const l=o_(this.opacity);return`${l===1?"hsl(":"hsla("}${kw(this.h)}, ${zm(this.s)*100}%, ${zm(this.l)*100}%${l===1?")":`, ${l})`}`}}));function kw(l){return l=(l||0)%360,l<0?l+360:l}function zm(l){return Math.max(0,Math.min(1,l||0))}function Ny(l,u,_){return(l<60?u+(_-u)*l/60:l<180?_:l<240?u+(_-u)*(240-l)/60:u)*255}const W0=l=>()=>l;function lL(l,u){return function(_){return l+_*u}}function cL(l,u,_){return l=Math.pow(l,_),u=Math.pow(u,_)-l,_=1/_,function(A){return Math.pow(l+A*u,_)}}function uL(l){return(l=+l)==1?jE:function(u,_){return _-u?cL(u,_,l):W0(isNaN(u)?_:u)}}function jE(l,u){var _=u-l;return _?lL(l,_):W0(isNaN(l)?u:l)}const a_=function l(u){var _=uL(u);function A(P,L){var B=_((P=h0(P)).r,(L=h0(L)).r),q=_(P.g,L.g),n=_(P.b,L.b),W=jE(P.opacity,L.opacity);return function(Q){return P.r=B(Q),P.g=q(Q),P.b=n(Q),P.opacity=W(Q),P+""}}return A.gamma=l,A}(1);function hL(l,u){u||(u=[]);var _=l?Math.min(u.length,l.length):0,A=u.slice(),P;return function(L){for(P=0;P<_;++P)A[P]=l[P]*(1-L)+u[P]*L;return A}}function dL(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function fL(l,u){var _=u?u.length:0,A=l?Math.min(_,l.length):0,P=new Array(A),L=new Array(_),B;for(B=0;B_&&(L=u.slice(_,L),q[B]?q[B]+=L:q[++B]=L),(A=A[0])===(P=P[0])?q[B]?q[B]+=P:q[++B]=P:(q[++B]=null,n.push({i:B,x:io(A,P)})),_=Vy.lastIndex;return _180?Q+=360:Q-W>180&&(W+=360),de.push({i:ie.push(P(ie)+"rotate(",null,A)-2,x:io(W,Q)})):Q&&ie.push(P(ie)+"rotate("+Q+A)}function q(W,Q,ie,de){W!==Q?de.push({i:ie.push(P(ie)+"skewX(",null,A)-2,x:io(W,Q)}):Q&&ie.push(P(ie)+"skewX("+Q+A)}function n(W,Q,ie,de,ve,Je){if(W!==ie||Q!==de){var it=ve.push(P(ve)+"scale(",null,",",null,")");Je.push({i:it-4,x:io(W,ie)},{i:it-2,x:io(Q,de)})}else(ie!==1||de!==1)&&ve.push(P(ve)+"scale("+ie+","+de+")")}return function(W,Q){var ie=[],de=[];return W=l(W),Q=l(Q),L(W.translateX,W.translateY,Q.translateX,Q.translateY,ie,de),B(W.rotate,Q.rotate,ie,de),q(W.skewX,Q.skewX,ie,de),n(W.scaleX,W.scaleY,Q.scaleX,Q.scaleY,ie,de),W=Q=null,function(ve){for(var Je=-1,it=de.length,gt;++Je=0&&l._call.call(void 0,u),l=l._next;--oh}function Fw(){vc=(c_=Af.now())+R_,oh=nf=0;try{EL()}finally{oh=0,ML(),vc=0}}function SL(){var l=Af.now(),u=l-c_;u>HE&&(R_-=u,c_=l)}function ML(){for(var l,u=l_,_,A=1/0;u;)u._call?(A>u._time&&(A=u._time),l=u,u=u._next):(_=u._next,u._next=null,u=l?l._next=_:l_=_);sf=l,p0(A)}function p0(l){if(!oh){nf&&(nf=clearTimeout(nf));var u=l-vc;u>24?(l<1/0&&(nf=setTimeout(Fw,l-Af.now()-R_)),ef&&(ef=clearInterval(ef))):(ef||(c_=Af.now(),ef=setInterval(SL,HE)),oh=1,ZE(Fw))}}function Bw(l,u,_){var A=new u_;return u=u==null?0:+u,A.restart(P=>{A.stop(),l(P+u)},u,_),A}var AL=AE("start","end","cancel","interrupt"),IL=[],XE=0,Nw=1,m0=2,jm=3,Vw=4,_0=5,Gm=6;function z_(l,u,_,A,P,L){var B=l.__transition;if(!B)l.__transition={};else if(_ in B)return;CL(l,_,{name:u,index:A,group:P,on:AL,tween:IL,time:L.time,delay:L.delay,duration:L.duration,ease:L.ease,timer:null,state:XE})}function K0(l,u){var _=lo(l,u);if(_.state>XE)throw new Error("too late; already scheduled");return _}function Lo(l,u){var _=lo(l,u);if(_.state>jm)throw new Error("too late; already running");return _}function lo(l,u){var _=l.__transition;if(!_||!(_=_[u]))throw new Error("transition not found");return _}function CL(l,u,_){var A=l.__transition,P;A[u]=_,_.timer=WE(L,0,_.time);function L(W){_.state=Nw,_.timer.restart(B,_.delay,_.time),_.delay<=W&&B(W-_.delay)}function B(W){var Q,ie,de,ve;if(_.state!==Nw)return n();for(Q in A)if(ve=A[Q],ve.name===_.name){if(ve.state===jm)return Bw(B);ve.state===Vw?(ve.state=Gm,ve.timer.stop(),ve.on.call("interrupt",l,l.__data__,ve.index,ve.group),delete A[Q]):+Qm0&&A.state<_0,A.state=Gm,A.timer.stop(),A.on.call(P?"interrupt":"cancel",l,l.__data__,A.index,A.group),delete _[B]}L&&delete l.__transition}}function RL(l){return this.each(function(){PL(this,l)})}function zL(l,u){var _,A;return function(){var P=Lo(this,l),L=P.tween;if(L!==_){A=_=L;for(var B=0,q=A.length;B=0&&(u=u.slice(0,_)),!u||u==="start"})}function ok(l,u,_){var A,P,L=sk(u)?K0:Lo;return function(){var B=L(this,l),q=B.on;q!==A&&(P=(A=q).copy()).on(u,_),B.on=P}}function ak(l,u){var _=this._id;return arguments.length<2?lo(this.node(),_).on.on(l):this.each(ok(_,l,u))}function lk(l){return function(){var u=this.parentNode;for(var _ in this.__transition)if(+_!==l)return;u&&u.removeChild(this)}}function ck(){return this.on("end.remove",lk(this._id))}function uk(l){var u=this._name,_=this._id;typeof l!="function"&&(l=$0(l));for(var A=this._groups,P=A.length,L=new Array(P),B=0;B=1e21?l.toLocaleString("en").replace(/,/g,""):l.toString(10)}function h_(l,u){if((_=(l=u?l.toExponential(u-1):l.toExponential()).indexOf("e"))<0)return null;var _,A=l.slice(0,_);return[A.length>1?A[0]+A.slice(2):A,+l.slice(_+1)]}function ah(l){return l=h_(Math.abs(l)),l?l[1]:NaN}function Ok(l,u){return function(_,A){for(var P=_.length,L=[],B=0,q=l[0],n=0;P>0&&q>0&&(n+q+1>A&&(q=Math.max(1,A-n)),L.push(_.substring(P-=q,P+q)),!((n+=q+1)>A));)q=l[B=(B+1)%l.length];return L.reverse().join(u)}}function Fk(l){return function(u){return u.replace(/[0-9]/g,function(_){return l[+_]})}}var Bk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function d_(l){if(!(u=Bk.exec(l)))throw new Error("invalid format: "+l);var u;return new Q0({fill:u[1],align:u[2],sign:u[3],symbol:u[4],zero:u[5],width:u[6],comma:u[7],precision:u[8]&&u[8].slice(1),trim:u[9],type:u[10]})}d_.prototype=Q0.prototype;function Q0(l){this.fill=l.fill===void 0?" ":l.fill+"",this.align=l.align===void 0?">":l.align+"",this.sign=l.sign===void 0?"-":l.sign+"",this.symbol=l.symbol===void 0?"":l.symbol+"",this.zero=!!l.zero,this.width=l.width===void 0?void 0:+l.width,this.comma=!!l.comma,this.precision=l.precision===void 0?void 0:+l.precision,this.trim=!!l.trim,this.type=l.type===void 0?"":l.type+""}Q0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Nk(l){e:for(var u=l.length,_=1,A=-1,P;_0&&(A=0);break}return A>0?l.slice(0,A)+l.slice(P+1):l}var QE;function Vk(l,u){var _=h_(l,u);if(!_)return l+"";var A=_[0],P=_[1],L=P-(QE=Math.max(-8,Math.min(8,Math.floor(P/3)))*3)+1,B=A.length;return L===B?A:L>B?A+new Array(L-B+1).join("0"):L>0?A.slice(0,L)+"."+A.slice(L):"0."+new Array(1-L).join("0")+h_(l,Math.max(0,u+L-1))[0]}function Uw(l,u){var _=h_(l,u);if(!_)return l+"";var A=_[0],P=_[1];return P<0?"0."+new Array(-P).join("0")+A:A.length>P+1?A.slice(0,P+1)+"."+A.slice(P+1):A+new Array(P-A.length+2).join("0")}const jw={"%":(l,u)=>(l*100).toFixed(u),b:l=>Math.round(l).toString(2),c:l=>l+"",d:kk,e:(l,u)=>l.toExponential(u),f:(l,u)=>l.toFixed(u),g:(l,u)=>l.toPrecision(u),o:l=>Math.round(l).toString(8),p:(l,u)=>Uw(l*100,u),r:Uw,s:Vk,X:l=>Math.round(l).toString(16).toUpperCase(),x:l=>Math.round(l).toString(16)};function Gw(l){return l}var qw=Array.prototype.map,$w=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Uk(l){var u=l.grouping===void 0||l.thousands===void 0?Gw:Ok(qw.call(l.grouping,Number),l.thousands+""),_=l.currency===void 0?"":l.currency[0]+"",A=l.currency===void 0?"":l.currency[1]+"",P=l.decimal===void 0?".":l.decimal+"",L=l.numerals===void 0?Gw:Fk(qw.call(l.numerals,String)),B=l.percent===void 0?"%":l.percent+"",q=l.minus===void 0?"−":l.minus+"",n=l.nan===void 0?"NaN":l.nan+"";function W(ie){ie=d_(ie);var de=ie.fill,ve=ie.align,Je=ie.sign,it=ie.symbol,gt=ie.zero,Bt=ie.width,Ye=ie.comma,St=ie.precision,Dt=ie.trim,_t=ie.type;_t==="n"?(Ye=!0,_t="g"):jw[_t]||(St===void 0&&(St=12),Dt=!0,_t="g"),(gt||de==="0"&&ve==="=")&&(gt=!0,de="0",ve="=");var Ai=it==="$"?_:it==="#"&&/[boxX]/.test(_t)?"0"+_t.toLowerCase():"",di=it==="$"?A:/[%p]/.test(_t)?B:"",Ot=jw[_t],dr=/[defgprs%]/.test(_t);St=St===void 0?6:/[gprs]/.test(_t)?Math.max(1,Math.min(21,St)):Math.max(0,Math.min(20,St));function mr(vt){var Ut=Ai,Ti=di,Ht,ji,Tt;if(_t==="c")Ti=Ot(vt)+Ti,vt="";else{vt=+vt;var Jt=vt<0||1/vt<0;if(vt=isNaN(vt)?n:Ot(Math.abs(vt),St),Dt&&(vt=Nk(vt)),Jt&&+vt==0&&Je!=="+"&&(Jt=!1),Ut=(Jt?Je==="("?Je:q:Je==="-"||Je==="("?"":Je)+Ut,Ti=(_t==="s"?$w[8+QE/3]:"")+Ti+(Jt&&Je==="("?")":""),dr){for(Ht=-1,ji=vt.length;++HtTt||Tt>57){Ti=(Tt===46?P+vt.slice(Ht+1):vt.slice(Ht))+Ti,vt=vt.slice(0,Ht);break}}}Ye&&!gt&&(vt=u(vt,1/0));var hi=Ut.length+vt.length+Ti.length,Qi=hi>1)+Ut+vt+Ti+Qi.slice(hi);break;default:vt=Qi+Ut+vt+Ti;break}return L(vt)}return mr.toString=function(){return ie+""},mr}function Q(ie,de){var ve=W((ie=d_(ie),ie.type="f",ie)),Je=Math.max(-8,Math.min(8,Math.floor(ah(de)/3)))*3,it=Math.pow(10,-Je),gt=$w[8+Je/3];return function(Bt){return ve(it*Bt)+gt}}return{format:W,formatPrefix:Q}}var Lm,eS,tS;jk({thousands:",",grouping:[3],currency:["$",""]});function jk(l){return Lm=Uk(l),eS=Lm.format,tS=Lm.formatPrefix,Lm}function Gk(l){return Math.max(0,-ah(Math.abs(l)))}function qk(l,u){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ah(u)/3)))*3-ah(Math.abs(l)))}function $k(l,u){return l=Math.abs(l),u=Math.abs(u)-l,Math.max(0,ah(u)-ah(l))+1}function iS(l,u){switch(arguments.length){case 0:break;case 1:this.range(l);break;default:this.range(u).domain(l);break}return this}const Hw=Symbol("implicit");function rS(){var l=new Ew,u=[],_=[],A=Hw;function P(L){let B=l.get(L);if(B===void 0){if(A!==Hw)return A;l.set(L,B=u.push(L)-1)}return _[B%_.length]}return P.domain=function(L){if(!arguments.length)return u.slice();u=[],l=new Ew;for(const B of L)l.has(B)||l.set(B,u.push(B)-1);return P},P.range=function(L){return arguments.length?(_=Array.from(L),P):_.slice()},P.unknown=function(L){return arguments.length?(A=L,P):A},P.copy=function(){return rS(u,_).unknown(A)},iS.apply(P,arguments),P}function Hk(l){return function(){return l}}function Zk(l){return+l}var Zw=[0,1];function Gu(l){return l}function g0(l,u){return(u-=l=+l)?function(_){return(_-l)/u}:Hk(isNaN(u)?NaN:.5)}function Wk(l,u){var _;return l>u&&(_=l,l=u,u=_),function(A){return Math.max(l,Math.min(u,A))}}function Xk(l,u,_){var A=l[0],P=l[1],L=u[0],B=u[1];return P2?Yk:Xk,n=W=null,ie}function ie(de){return de==null||isNaN(de=+de)?L:(n||(n=q(l.map(A),u,_)))(A(B(de)))}return ie.invert=function(de){return B(P((W||(W=q(u,l.map(A),io)))(de)))},ie.domain=function(de){return arguments.length?(l=Array.from(de,Zk),Q()):l.slice()},ie.range=function(de){return arguments.length?(u=Array.from(de),Q()):u.slice()},ie.rangeRound=function(de){return u=Array.from(de),_=yL,Q()},ie.clamp=function(de){return arguments.length?(B=de?!0:Gu,Q()):B!==Gu},ie.interpolate=function(de){return arguments.length?(_=de,Q()):_},ie.unknown=function(de){return arguments.length?(L=de,ie):L},function(de,ve){return A=de,P=ve,Q()}}function Qk(){return Jk()(Gu,Gu)}function e4(l,u,_,A){var P=fz(l,u,_),L;switch(A=d_(A??",f"),A.type){case"s":{var B=Math.max(Math.abs(l),Math.abs(u));return A.precision==null&&!isNaN(L=qk(P,B))&&(A.precision=L),tS(A,B)}case"":case"e":case"g":case"p":case"r":{A.precision==null&&!isNaN(L=$k(P,Math.max(Math.abs(l),Math.abs(u))))&&(A.precision=L-(A.type==="e"));break}case"f":case"%":{A.precision==null&&!isNaN(L=Gk(P))&&(A.precision=L-(A.type==="%")*2);break}}return eS(A)}function t4(l){var u=l.domain;return l.ticks=function(_){var A=u();return dz(A[0],A[A.length-1],_??10)},l.tickFormat=function(_,A){var P=u();return e4(P[0],P[P.length-1],_??10,A)},l.nice=function(_){_==null&&(_=10);var A=u(),P=0,L=A.length-1,B=A[P],q=A[L],n,W,Q=10;for(q0;){if(W=c0(B,q,_),W===n)return A[P]=B,A[L]=q,u(A);if(W>0)B=Math.floor(B/W)*W,q=Math.ceil(q/W)*W;else if(W<0)B=Math.ceil(B*W)/W,q=Math.floor(q*W)/W;else break;n=W}return l},l}function nS(){var l=Qk();return l.copy=function(){return Kk(l,nS())},iS.apply(l,arguments),t4(l)}function of(l,u,_){this.k=l,this.x=u,this.y=_}of.prototype={constructor:of,scale:function(l){return l===1?this:new of(this.k*l,this.x,this.y)},translate:function(l,u){return l===0&u===0?this:new of(this.k,this.x+this.k*l,this.y+this.k*u)},apply:function(l){return[l[0]*this.k+this.x,l[1]*this.k+this.y]},applyX:function(l){return l*this.k+this.x},applyY:function(l){return l*this.k+this.y},invert:function(l){return[(l[0]-this.x)/this.k,(l[1]-this.y)/this.k]},invertX:function(l){return(l-this.x)/this.k},invertY:function(l){return(l-this.y)/this.k},rescaleX:function(l){return l.copy().domain(l.range().map(this.invertX,this).map(l.invert,l))},rescaleY:function(l){return l.copy().domain(l.range().map(this.invertY,this).map(l.invert,l))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};of.prototype;const i4={class:"stacked-bar-container"},r4=["width","height"],n4={class:"legend"},s4={__name:"StackedBar",props:{width:{type:Number,default:800},height:{type:Number,default:100}},setup(l){const u=l,_=oo(null),A=[{category:"Mixed with Residential",percentage:48.41},{category:"Primarily Residential",percentage:36.53},{category:"Nonresidential",percentage:10.72},{category:"Overlay not Affecting Use",percentage:4.29}],P=rS().domain(A.map(L=>L.category)).range(["#4B8BBF","#A25FAC","#E53032","#5CA248"]);return Cf(()=>{const L=XD(_.value),B=50,q={top:20,right:20,bottom:20,left:20},n=u.width-q.left-q.right,W=nS().domain([0,100]).range([0,n]);let Q=0;const ie=A.map(ve=>{const Je={category:ve.category,percentage:ve.percentage,start:Q,end:Q+ve.percentage};return Q+=ve.percentage,Je}),de=L.append("g").attr("transform",`translate(${q.left}, ${q.top})`);de.selectAll("rect").data(ie).enter().append("rect").attr("x",ve=>W(ve.start)).attr("y",0).attr("width",ve=>W(ve.percentage)).attr("height",B).attr("fill",ve=>P(ve.category)).attr("stroke","white").attr("stroke-width",1),de.selectAll("text").data(ie).enter().append("text").attr("x",ve=>W(ve.start+ve.percentage/2)).attr("y",B/2).attr("dy","0.35em").attr("text-anchor","middle").attr("fill","white").style("font-size","12px").text(ve=>ve.percentage>=4?`${ve.percentage}%`:"")}),(L,B)=>(Ro(),fl("div",i4,[B[0]||(B[0]=ci("h2",null,"Land by primary zoning type",-1)),(Ro(),fl("svg",{width:l.width,height:l.height,ref_key:"svgRef",ref:_},null,8,r4)),B[1]||(B[1]=ci("br",null,null,-1)),ci("div",n4,[(Ro(),fl(ns,null,jI(A,(q,n)=>ci("div",{key:n,class:"legend-item"},[ci("div",{class:"color-box",style:y_({backgroundColor:bs(P)(q.category)})},null,4),ci("span",null,$m(q.category)+": "+$m(q.percentage)+"%",1)])),64))])]))}},o4=B0(s4,[["__scopeId","data-v-ed9fce67"]]);function a4(l,u=document){return typeof l=="string"?Array.from(u.querySelectorAll(l)):l instanceof Element?[l]:l instanceof NodeList?Array.from(l):l instanceof Array?l:[]}function l4(l){const u=document.createElement("div");u.className=`scrollama__debug-step ${l}`,u.style.position="fixed",u.style.left="0",u.style.width="100%",u.style.zIndex="9999",u.style.borderTop="2px solid black",u.style.borderBottom="2px solid black";const _=document.createElement("p");return _.style.position="absolute",_.style.left="0",_.style.height="1px",_.style.width="100%",_.style.borderTop="1px dashed black",u.appendChild(_),document.body.appendChild(u),u}function c4({id:l,step:u,marginTop:_}){const{index:A,height:P}=u,L=`scrollama__debug-step--${l}-${A}`;let B=document.querySelector(`.${L}`);B||(B=l4(L)),B.style.top=`${_*-1}px`,B.style.height=`${P}px`,B.querySelector("p").style.top=`${P/2}px`}function u4(){const l="abcdefghijklmnopqrstuvwxyz",u=Date.now(),_=[];for(let A=0;A<6;A+=1){const P=l[Math.floor(Math.random()*l.length)];_.push(P)}return`${_.join("")}${u}`}function km(l){console.error(`scrollama error: ${l}`)}function tf(l){return+l.getAttribute("data-scrollama-index")}function h4(l,u){const _=Math.ceil(l/u),A=[],P=1/_;for(let L=0;L<_+1;L+=1)A.push(L*P);return A}function Uy(l){if(typeof l=="string"&&l.indexOf("px")>0){const u=+l.replace("px","");return isNaN(u)?(err("offset value must be in 'px' format. Fallback to 0.5."),{format:"percent",value:.5}):{format:"pixels",value:u}}else if(typeof l=="number"||!isNaN(+l))return l>1&&err("offset value is greater than 1. Fallback to 1."),l<0&&err("offset value is lower than 0. Fallback to 0."),{format:"percent",value:Math.min(Math.max(0,l),1)};return null}function d4(l){l.forEach(u=>u.node.setAttribute("data-scrollama-index",u.index))}function f4(l){const{top:u}=l.getBoundingClientRect(),_=window.pageYOffset,A=document.body.clientTop||0;return u+_-A}let Uu,qm,ra;function sS(l){const u=l?l.scrollTop:window.pageYOffset;Uu!==u&&(Uu=u,Uu>qm?ra="down":UusS(l))}function Ww(){let l={},u=u4(),_=[],A,P,L,B=0,q=!1,n=!1,W=!1,Q=!1,ie=[];function de(){l={stepEnter:()=>{},stepExit:()=>{},stepProgress:()=>{}},ie=[]}function ve(Ht){Ht&&!q&&Ut(),!Ht&&q&&_t(),q=Ht}function Je(Ht,ji){const Tt=tf(Ht),Jt=_[Tt];ji!==void 0&&(Jt.progress=ji);const hi={element:Ht,index:Tt,progress:ji,direction:ra};Jt.state==="enter"&&l.stepProgress(hi)}function it(Ht,ji=!0){const Tt=tf(Ht),Jt=_[Tt],hi={element:Ht,index:Tt,direction:ra};Jt.direction=ra,Jt.state="enter",ie[Tt]||l.stepEnter(hi),Q&&(ie[Tt]=!0)}function gt(Ht,ji=!0){const Tt=tf(Ht),Jt=_[Tt];if(!Jt.state)return!1;const hi={element:Ht,index:Tt,direction:ra};n&&(ra==="down"&&Jt.progress<1?Je(Ht,1):ra==="up"&&Jt.progress>0&&Je(Ht,0)),Jt.direction=ra,Jt.state="exit",l.stepExit(hi)}function Bt([Ht]){const ji=tf(Ht.target),Tt=_[ji],Jt=Ht.target.offsetHeight;Jt!==Tt.height&&(Tt.height=Jt,Dt(Tt),Ot(Tt),Ai(Tt))}function Ye([Ht]){sS(P);const{isIntersecting:ji,target:Tt}=Ht;ji?it(Tt):gt(Tt)}function St([Ht]){const ji=tf(Ht.target),Tt=_[ji],{isIntersecting:Jt,intersectionRatio:hi,target:Qi}=Ht;Jt&&Tt.state==="enter"&&Je(Qi,hi)}function Dt({observers:Ht}){Object.keys(Ht).map(ji=>{Ht[ji].disconnect()})}function _t(){_.forEach(Dt)}function Ai(Ht){const ji=new ResizeObserver(Bt);ji.observe(Ht.node),Ht.observers.resize=ji}function di(){_.forEach(Ai)}function Ot(Ht){const ji=window.innerHeight,Tt=Ht.offset||A,Jt=Tt.format==="pixels"?1:ji,hi=Tt.value*Jt,Qi=Ht.height/2-hi,Xt=Ht.height/2-(ji-hi),Cr={rootMargin:`${Qi}px 0px ${Xt}px 0px`,threshold:.5,root:L},vr=new IntersectionObserver(Ye,Cr);vr.observe(Ht.node),Ht.observers.step=vr,W&&c4({id:u,step:Ht,marginTop:Qi,marginBottom:Xt})}function dr(){_.forEach(Ot)}function mr(Ht){const ji=window.innerHeight,Tt=Ht.offset||A,Jt=Tt.format==="pixels"?1:ji,hi=Tt.value*Jt,Qi=-hi+Ht.height,Xt=hi-ji,Cr=`${Qi}px 0px ${Xt}px 0px`,vr=h4(Ht.height,B),Kr={rootMargin:Cr,threshold:vr},Yt=new IntersectionObserver(St,Kr);Yt.observe(Ht.node),Ht.observers.progress=Yt}function vt(){_.forEach(mr)}function Ut(){_t(),di(),dr(),n&&vt()}const Ti={};return Ti.setup=({step:Ht,parent:ji,offset:Tt=.5,threshold:Jt=4,progress:hi=!1,once:Qi=!1,debug:Xt=!1,container:Cr=void 0,root:vr=null})=>(p4(Cr),_=a4(Ht,ji).map((Kr,Yt)=>({index:Yt,direction:void 0,height:Kr.offsetHeight,node:Kr,observers:{},offset:Uy(Kr.dataset.offset),top:f4(Kr),progress:0,state:void 0})),_.length?(n=hi,Q=Qi,W=Xt,B=Math.max(1,+Jt),A=Uy(Tt),P=Cr,L=vr,de(),d4(_),ve(!0),Ti):(km("no step elements"),Ti)),Ti.enable=()=>(ve(!0),Ti),Ti.disable=()=>(ve(!1),Ti),Ti.destroy=()=>(ve(!1),de(),Ti),Ti.resize=()=>(Ut(),Ti),Ti.offset=Ht=>Ht==null?A.value:(A=Uy(Ht),Ut(),Ti),Ti.onStepEnter=Ht=>(typeof Ht=="function"?l.stepEnter=Ht:km("onStepEnter requires a function"),Ti),Ti.onStepExit=Ht=>(typeof Ht=="function"?l.stepExit=Ht:km("onStepExit requires a function"),Ti),Ti.onStepProgress=Ht=>(typeof Ht=="function"?l.stepProgress=Ht:km("onStepProgress requires a function"),Ti),Ti}const Xw={__name:"VueScrollama",setup(l,{emit:u}){let _=oo(null);const A=oo(null),P=new Proxy({},{get:(q,n)=>_.value.getAttribute(n),has:(q,n)=>_.value.hasAttribute(n)});Cf(()=>{A.value=Ww(),L()}),kT(()=>{A.value&&A.value.destroy(),window.removeEventListener("resize",B)}),uC(()=>{L()});function L(){if(A.value&&A.value.destroy(),_.value){const q={step:Array.from(_.value.children),progress:"step-progress"in P,...P};A.value=Ww().setup(q).onStepProgress(n=>{u("step-progress",n)}).onStepEnter(n=>{u("step-enter",n)}).onStepExit(n=>{u("step-exit",n)}),window.addEventListener("resize",B)}}function B(){A.value&&A.value.resize()}return(q,n)=>(Ro(),fl("div",{class:"scrollama__steps",ref_key:"rootElement",ref:_},[GI(q.$slots,"default")],512))}},m4={class:"",id:"zoning-overview"},_4={style:{position:"relative"}},g4={class:"columns"},y4={class:"column is-one-thid"},x4={class:"column is-two-thirds"},v4={class:"section is-medium"},b4={class:"container"},w4={__name:"HomeView",setup(l){let u=oo(null);return oo(null),(_,A)=>(Ro(),fl("main",null,[A[8]||(A[8]=tE('

The Vermont Zoning Atlas is a database and web tool that brings together zoning laws from 1,755 districts across the state of Vermont. Its goal is to help answer fundamental questions facing cities and towns: for the land that we have, what can be built?

Zoning is complex. We tried to bring it all together.

A sub

graphic here

Zoning laws regulate the types of housing that can be built. But for ordinary people, they can be complex, overwhelming, and hard to find. The Vermont Zoning Atlas takes inspiration from the National Zoning Atlas project to "digitize, demystify, and democratize information" that is often hidden under many layers of hard to parse paperwork.

As a rural state, Vermont's zoning laws can be especially difficult to find and understand. Many towns use their own methods of record keeping and governance. But we believe that universal access to this information is critical for smart community growth.

Complex civic problems require everyone to get on board.

The Vermont Zoning Atlas began as a grassroots civic tech project run by a team of community volunteers, student interns, and a Steering Committee of stakeholders from the public and private sectors and academia.

Over nine months of work, the Atlas grew from a handful of volunteers passionate about housing justice to 36 specially trained Zoning Analysts, GIS Specialists, and team leads funded by the state of Vermont, University of Vermont fellowships, an anonymous donor, and the Vermont Community Foundation. Using a methodology published by the National Zoning Atlas, the team analyzed 1,755 districts across 209 zoned and 57 unzoned jurisdictions.

1,755

districts

36

analysts

57

unzoned

209

zoned

',3)),ci("section",m4,[A[3]||(A[3]=ci("h1",{class:"title"},"The Vermont Zoning Atlas",-1)),A[4]||(A[4]=ci("h2",{class:"subtitle"}," All the land we have, and what can be built there. ",-1)),ci("div",_4,[rn(o4,{width:800,height:100})]),ci("div",g4,[ci("div",y4,[rn(bs(Xw),{debug:!1,offset:.55,onStepEnter:A[0]||(A[0]=({element:P})=>vn(u)?u.value=P.dataset.stepNo:u=P.dataset.stepNo),class:"main__scrollama"},{default:yf(()=>A[2]||(A[2]=[ci("div",{class:"step","data-step-no":"1"},[ci("p",null,[jr(" This is every district in Vermont colored by its "),ci("strong",null,"primary zoning type"),jr(". ")]),ci("p",null," Many districts have multiple zoning types, which dictate the types of things that can be built there. ")],-1),ci("div",{class:"step","data-step-no":"2"},[ci("p",null,[jr(" Here are all the areas that are zoned "),ci("strong",null,"primarily residential"),jr(" across the state. ")])],-1),ci("div",{class:"step","data-step-no":"3"},[ci("p",null,[jr(" And here are the areas for "),ci("strong",null,"nonresidential"),jr(" buildings. ")])],-1)])),_:1})]),ci("div",x4,[rn(ez,{class:"sticky",layerToHighlight:bs(u),mapboxToken:"pk.eyJ1IjoiYmRjb29sZXkiLCJhIjoiY20zM2Nzd212MWl3cTJrcTM5NWNrcjk0byJ9.40rHMMd1TXsvF8zeqxLaBw"},null,8,["layerToHighlight"])])])]),ci("section",v4,[A[6]||(A[6]=ci("h1",{class:"title"},"Zoning is just the start.",-1)),A[7]||(A[7]=ci("h2",{class:"subtitle"}," We plan to enrich the information started by the Zoning Atlas Project with geographic data on wastewater, flood basins, and more. ",-1)),ci("div",b4,[rn(JR,{class:"sticky",mapboxToken:"pk.eyJ1IjoiYmRjb29sZXkiLCJhIjoiY20zM2Nzd212MWl3cTJrcTM5NWNrcjk0byJ9.40rHMMd1TXsvF8zeqxLaBw",fgbPath:"../../data/vt-zoning-spatial-index.fgb"}),rn(bs(Xw),{debug:!1,offset:.55,onStepEnter:A[1]||(A[1]=({element:P})=>vn(u)?u.value=P.dataset.stepNo:u=P.dataset.stepNo),class:"main__scrollama"},{default:yf(()=>A[5]||(A[5]=[ci("div",{class:"step centered","data-step-no":"1"},[ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")])],-1),ci("div",{class:"step centered","data-step-no":"2"},[ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")]),ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")])],-1),ci("div",{class:"step centered","data-step-no":"3"},[ci("p",null,[jr(" A simple container to divide your page into "),ci("strong",null,"sections"),jr(", like the one you're currently reading. ")])],-1)])),_:1})])]),A[9]||(A[9]=ci("section",{class:"section has-text-centered"},[ci("h1",{class:"title"},"We need your help."),ci("h3",{class:"subtitle"},"Tell us what information we should be adding to this resource."),ci("iframe",{src:"https://qualtrics.uvm.edu/jfe/form/SV_2rEmqLAhRrabOx8",height:"900px",width:"100%"})],-1))]))}},T4=B0(w4,[["__scopeId","data-v-538a5d17"]]),E4=sR({history:FP("/Vermont-Livability-Map/"),routes:[{path:"/",name:"home",component:T4},{path:"/about",name:"about",component:()=>dR(()=>import("./AboutView-ChuzRpxH.js"),[])}]}),ex=eP(cR);ex.use(sP());ex.use(E4);ex.mount("#app");export{B0 as _,ci as a,oP as b,fl as c,Ro as o}; diff --git a/docs/index.html b/docs/index.html index 7185a93..ad7a5b7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,7 @@ Vite App - + diff --git a/src/components/ZoningMap.vue b/src/components/ZoningMap.vue index 0c4b5fa..5bfc986 100644 --- a/src/components/ZoningMap.vue +++ b/src/components/ZoningMap.vue @@ -198,7 +198,7 @@ let map; const fgbPath = `https://verso-uvm.github.io/Vermont-Livability-Map/data/vt-zoning-spatial-index.fgb` // Start streaming features from the FGB file - const response = await fetch('public/data/vt-zoning-spatial-index.fgb'); + const response = await fetch(fgbPath); if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`); // Use FlatGeoBuf streaming API