diff --git a/assets/main-a8e3cff7.js b/assets/main-da5c3ad5.js similarity index 96% rename from assets/main-a8e3cff7.js rename to assets/main-da5c3ad5.js index 9f6f159..9b19999 100644 --- a/assets/main-a8e3cff7.js +++ b/assets/main-da5c3ad5.js @@ -612,7 +612,7 @@ and limitations under the License. `);var u=e+(t?" ":"│ ");r.left&&Vm(r.left,u,!1,n,l),r.right&&Vm(r.right,u,!0,n,l)}}var Bg=function(){function r(e){e===void 0&&(e=DT),this._root=null,this._size=0,this._comparator=e}return r.prototype.insert=function(e,t){return this._size++,this._root=rm(e,t,this._root,this._comparator)},r.prototype.add=function(e,t){var n=new pa(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var l=this._comparator,u=sa(e,this._root,l),d=l(e,u.key);return d===0?this._root=u:(d<0?(n.left=u.left,n.right=u,u.left=null):d>0&&(n.right=u.right,n.left=u,u.right=null),this._size++,this._root=n),this._root},r.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},r.prototype._remove=function(e,t,n){var l;if(t===null)return null;t=sa(e,t,n);var u=n(e,t.key);return u===0?(t.left===null?l=t.right:(l=sa(e,t.left,n),l.right=t.right),this._size--,l):t},r.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=sa(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},r.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var l=n(e,t.key);if(l===0)return t;l<0?t=t.left:t=t.right}return null},r.prototype.find=function(e){return this._root&&(this._root=sa(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},r.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var l=n(e,t.key);if(l===0)return!0;l<0?t=t.left:t=t.right}return!1},r.prototype.forEach=function(e,t){for(var n=this._root,l=[],u=!1;!u;)n!==null?(l.push(n),n=n.left):l.length!==0?(n=l.pop(),e.call(t,n),n=n.right):u=!0;return this},r.prototype.range=function(e,t,n,l){for(var u=[],d=this._comparator,a=this._root,_;u.length!==0||a;)if(a)u.push(a),a=a.left;else{if(a=u.pop(),_=d(a.key,t),_>0)break;if(d(a.key,e)>=0&&n.call(l,a))return this;a=a.right}return this},r.prototype.keys=function(){var e=[];return this.forEach(function(t){var n=t.key;return e.push(n)}),e},r.prototype.values=function(){var e=[];return this.forEach(function(t){var n=t.data;return e.push(n)}),e},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},r.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},r.prototype.at=function(e){for(var t=this._root,n=!1,l=0,u=[];!n;)if(t)u.push(t),t=t.left;else if(u.length>0){if(t=u.pop(),l===e)return t;l++,t=t.right}else n=!0;return null},r.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var l=this._comparator;t;){var u=l(e.key,t.key);if(u===0)break;u<0?(n=t,t=t.left):t=t.right}return n},r.prototype.prev=function(e){var t=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}for(var l=this._comparator;t;){var u=l(e.key,t.key);if(u===0)break;u<0?t=t.left:(n=t,t=t.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return FT(this._root)},r.prototype.load=function(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!1);var l=e.length,u=this._comparator;if(n&&Wm(e,t,0,l-1,u),this._root===null)this._root=qm(e,t,0,l),this._size=l;else{var d=OT(this.toList(),BT(e,t),u);l=this._size+l,this._root=Gm({head:d},0,l)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var t=[];return Vm(this._root,"",!0,function(n){return t.push(n)},e),t.join("")},r.prototype.update=function(e,t,n){var l=this._comparator,u=C0(e,this._root,l),d=u.left,a=u.right;l(e,t)<0?a=rm(t,n,a,l):d=rm(t,n,d,l),this._root=RT(d,a,l)},r.prototype.split=function(e){return C0(e,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var e,t,n;return zT(this,function(l){switch(l.label){case 0:e=this._root,t=[],n=!1,l.label=1;case 1:return n?[3,6]:e===null?[3,2]:(t.push(e),e=e.left,[3,5]);case 2:return t.length===0?[3,4]:(e=t.pop(),[4,e]);case 3:return l.sent(),e=e.right,[3,5];case 4:n=!0,l.label=5;case 5:return[3,1];case 6:return[2]}})},r}();function qm(r,e,t,n){var l=n-t;if(l>0){var u=t+Math.floor(l/2),d=r[u],a=e[u],_=new pa(d,a);return _.left=qm(r,e,t,u),_.right=qm(r,e,u+1,n),_}return null}function BT(r,e){for(var t=new pa(null,null),n=t,l=0;l0?(e=u=u.next=t.pop(),e=e.right):n=!0;return u.next=null,l.next}function Gm(r,e,t){var n=t-e;if(n>0){var l=e+Math.floor(n/2),u=Gm(r,e,l),d=r.head;return d.left=u,r.head=r.head.next,d.right=Gm(r,l+1,t),d}return null}function OT(r,e,t){for(var n=new pa(null,null),l=n,u=r,d=e;u!==null&&d!==null;)t(u.key,d.key)<0?(l.next=u,u=u.next):(l.next=d,d=d.next),l=l.next;return u!==null?l.next=u:d!==null&&(l.next=d),n.next}function Wm(r,e,t,n,l){if(!(t>=n)){for(var u=r[t+n>>1],d=t-1,a=n+1;;){do d++;while(l(r[d],u)<0);do a--;while(l(r[a],u)>0);if(d>=a)break;var _=r[d];r[d]=r[a],r[a]=_,_=e[d],e[d]=e[a],e[a]=_}Wm(r,e,t,a,l),Wm(r,e,a+1,n,l)}}const Ps=11102230246251565e-32,Ii=134217729,NT=(3+8*Ps)*Ps;function nm(r,e,t,n,l){let u,d,a,_,x=e[0],S=n[0],k=0,C=0;S>x==S>-x?(u=x,x=e[++k]):(u=S,S=n[++C]);let P=0;if(kx==S>-x?(d=x+u,a=u-(d-x),x=e[++k]):(d=S+u,a=u-(d-S),S=n[++C]),u=d,a!==0&&(l[P++]=a);kx==S>-x?(d=u+x,_=d-u,a=u-(d-_)+(x-_),x=e[++k]):(d=u+S,_=d-u,a=u-(d-_)+(S-_),S=n[++C]),u=d,a!==0&&(l[P++]=a);for(;k=Me||-Ze>=Me||(k=r-_e,a=r-(_e+k)+(k-l),k=t-ze,x=t-(ze+k)+(k-l),k=e-re,_=e-(re+k)+(k-u),k=n-ce,S=n-(ce+k)+(k-u),a===0&&_===0&&x===0&&S===0)||(Me=qT*d+NT*Math.abs(Ze),Ze+=_e*S+ce*a-(re*x+ze*_),Ze>=Me||-Ze>=Me))return Ze;U=a*ce,C=Ii*a,P=C-(C-a),D=a-P,C=Ii*ce,N=C-(C-ce),z=ce-N,K=D*z-(U-P*N-D*N-P*z),me=_*ze,C=Ii*_,P=C-(C-_),D=_-P,C=Ii*ze,N=C-(C-ze),z=ze-N,X=D*z-(me-P*N-D*N-P*z),B=K-X,k=K-B,Gi[0]=K-(B+k)+(k-X),O=U+B,k=O-U,G=U-(O-k)+(B-k),B=G-me,k=G-B,Gi[1]=G-(B+k)+(k-me),Y=O+B,k=Y-O,Gi[2]=O-(Y-k)+(B-k),Gi[3]=Y;const ft=nm(4,lc,4,Gi,I0);U=_e*S,C=Ii*_e,P=C-(C-_e),D=_e-P,C=Ii*S,N=C-(C-S),z=S-N,K=D*z-(U-P*N-D*N-P*z),me=re*x,C=Ii*re,P=C-(C-re),D=re-P,C=Ii*x,N=C-(C-x),z=x-N,X=D*z-(me-P*N-D*N-P*z),B=K-X,k=K-B,Gi[0]=K-(B+k)+(k-X),O=U+B,k=O-U,G=U-(O-k)+(B-k),B=G-me,k=G-B,Gi[1]=G-(B+k)+(k-me),Y=O+B,k=Y-O,Gi[2]=O-(Y-k)+(B-k),Gi[3]=Y;const Ct=nm(ft,I0,4,Gi,A0);U=a*S,C=Ii*a,P=C-(C-a),D=a-P,C=Ii*S,N=C-(C-S),z=S-N,K=D*z-(U-P*N-D*N-P*z),me=_*x,C=Ii*_,P=C-(C-_),D=_-P,C=Ii*x,N=C-(C-x),z=x-N,X=D*z-(me-P*N-D*N-P*z),B=K-X,k=K-B,Gi[0]=K-(B+k)+(k-X),O=U+B,k=O-U,G=U-(O-k)+(B-k),B=G-me,k=G-B,Gi[1]=G-(B+k)+(k-me),Y=O+B,k=Y-O,Gi[2]=O-(Y-k)+(B-k),Gi[3]=Y;const Ot=nm(Ct,A0,4,Gi,L0);return L0[Ot-1]}function WT(r,e,t,n,l,u){const d=(e-u)*(t-l),a=(r-l)*(n-u),_=d-a,x=Math.abs(d+a);return Math.abs(_)>=UT*x?_:-GT(r,e,t,n,l,u,x)}const ju=(r,e)=>r.ll.x<=e.x&&e.x<=r.ur.x&&r.ll.y<=e.y&&e.y<=r.ur.y,Zm=(r,e)=>{if(e.ur.x{if(-lar.x*e.y-r.y*e.x,gw=(r,e)=>r.x*e.x+r.y*e.y,D0=(r,e,t)=>{const n=WT(r.x,r.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},pd=r=>Math.sqrt(gw(r,r)),$T=(r,e,t)=>{const n={x:e.x-r.x,y:e.y-r.y},l={x:t.x-r.x,y:t.y-r.y};return $f(l,n)/pd(l)/pd(n)},XT=(r,e,t)=>{const n={x:e.x-r.x,y:e.y-r.y},l={x:t.x-r.x,y:t.y-r.y};return gw(l,n)/pd(l)/pd(n)},R0=(r,e,t)=>e.y===0?null:{x:r.x+e.x/e.y*(t-r.y),y:t},B0=(r,e,t)=>e.x===0?null:{x:t,y:r.y+e.y/e.x*(t-r.x)},KT=(r,e,t,n)=>{if(e.x===0)return B0(t,n,r.x);if(n.x===0)return B0(r,e,t.x);if(e.y===0)return R0(t,n,r.y);if(n.y===0)return R0(r,e,t.y);const l=$f(e,n);if(l==0)return null;const u={x:t.x-r.x,y:t.y-r.y},d=$f(u,e)/l,a=$f(u,n)/l,_=r.x+a*e.x,x=t.x+d*n.x,S=r.y+a*e.y,k=t.y+d*n.y,C=(_+x)/2,P=(S+k)/2;return{x:C,y:P}};class Mo{static compare(e,t){const n=Mo.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:ua.compare(e.segment,t.segment))}static comparePoints(e,t){return e.xt.x?1:e.yt.y?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const t=e.point.events;for(let n=0,l=t.length;n{const u=l.otherSE;t.set(l,{sine:$T(this.point,e.point,u.point),cosine:XT(this.point,e.point,u.point)})};return(l,u)=>{t.has(l)||n(l),t.has(u)||n(u);const{sine:d,cosine:a}=t.get(l),{sine:_,cosine:x}=t.get(u);return d>=0&&_>=0?ax?-1:0:d<0&&_<0?ax?1:0:_d?1:0}}}let JT=0;class ua{static compare(e,t){const n=e.leftSE.point.x,l=t.leftSE.point.x,u=e.rightSE.point.x,d=t.rightSE.point.x;if(da&&_>x)return-1;const k=e.comparePoint(t.leftSE.point);if(k<0)return 1;if(k>0)return-1;const C=t.comparePoint(e.rightSE.point);return C!==0?C:-1}if(n>l){if(a<_&&a_&&a>S)return 1;const k=t.comparePoint(e.leftSE.point);if(k!==0)return k;const C=e.comparePoint(t.rightSE.point);return C<0?1:C>0?-1:1}if(a<_)return-1;if(a>_)return 1;if(ud){const k=e.comparePoint(t.rightSE.point);if(k<0)return 1;if(k>0)return-1}if(u!==d){const k=x-a,C=u-n,P=S-_,D=d-l;if(k>C&&PD)return-1}return u>d?1:uS?1:e.idt.id?1:0}constructor(e,t,n,l){this.id=++JT,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=l}static fromRing(e,t,n){let l,u,d;const a=Mo.comparePoints(e,t);if(a<0)l=e,u=t,d=1;else if(a>0)l=t,u=e,d=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const _=new Mo(l,!0),x=new Mo(u,!1);return new ua(_,x,[n],[d])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:et?e:t}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const t=this.leftSE.point,n=this.rightSE.point,l=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x0&&a.swapEvents(),Mo.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(l.checkForConsuming(),u.checkForConsuming()),t}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,n=this.windings.length;t0){const u=t;t=n,n=u}if(t.prev===n){const u=t;t=n,n=u}for(let u=0,d=n.rings.length;ul.length===1&&l[0].isSubject;this._isInResult=n(e)!==n(t);break}default:throw new Error(`Unrecognized operation type found ${Wo.type}`)}return this._isInResult}}class F0{constructor(e,t,n){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const l=yh.round(e[0][0],e[0][1]);this.bbox={ll:{x:l.x,y:l.y},ur:{x:l.x,y:l.y}};let u=l;for(let d=1,a=e.length;dthis.bbox.ur.x&&(this.bbox.ur.x=_.x),_.y>this.bbox.ur.y&&(this.bbox.ur.y=_.y),u=_)}(l.x!==u.x||l.y!==u.y)&&this.segments.push(ua.fromRing(u,l,this))}getSweepEvents(){const e=[];for(let t=0,n=this.segments.length;tthis.bbox.ur.x&&(this.bbox.ur.x=u.bbox.ur.x),u.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=u.bbox.ur.y),this.interiorRings.push(u)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;tthis.bbox.ur.x&&(this.bbox.ur.x=u.bbox.ur.x),u.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=u.bbox.ur.y),this.polys.push(u)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,n=this.polys.length;t0&&(e=d)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}}class N0{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(let t=0,n=this.interiorRings.length;t1&&arguments[1]!==void 0?arguments[1]:ua.compare;this.queue=e,this.tree=new Bg(t),this.segments=[]}process(e){const t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;const l=e.isLeft?this.tree.add(t):this.tree.find(t);if(!l)throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);let u=l,d=l,a,_;for(;a===void 0;)u=this.tree.prev(u),u===null?a=null:u.key.consumedBy===void 0&&(a=u.key);for(;_===void 0;)d=this.tree.next(d),d===null?_=null:d.key.consumedBy===void 0&&(_=d.key);if(e.isLeft){let x=null;if(a){const k=a.getIntersection(t);if(k!==null&&(t.isAnEndpoint(k)||(x=k),!a.isAnEndpoint(k))){const C=this._splitSafely(a,k);for(let P=0,D=C.length;P0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&_){const x=a.getIntersection(_);if(x!==null){if(!a.isAnEndpoint(x)){const S=this._splitSafely(a,x);for(let k=0,C=S.length;kj0)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const d=new eE(u);let a=u.size,_=u.pop();for(;_;){const S=_.key;if(u.size===a){const C=S.segment;throw new Error(`Unable to pop() ${S.isLeft?"left":"right"} SweepEvent [${S.point.x}, ${S.point.y}] from segment #${C.id} [${C.leftSE.point.x}, ${C.leftSE.point.y}] -> [${C.rightSE.point.x}, ${C.rightSE.point.y}] from queue.`)}if(u.size>j0)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(d.segments.length>tE)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const k=d.process(S);for(let C=0,P=k.length;C1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n{t.push(l.coordinates)}),t.length<2)throw new Error("Must have at least 2 geometries");const n=_w.union(t[0],...t.slice(1));return n.length===0?null:n.length===1?Rg(n[0],e.properties):mw(n,e.properties)}var vw=lE;function cE(r,e={}){if(r.bbox!=null&&e.recompute!==!0)return r.bbox;const t=[1/0,1/0,-1/0,-1/0];return yw(r,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]{e.push(l.coordinates)}),e.length<2)throw new Error("Must have at least two features");const t=r.features[0].properties||{},n=_w.difference(e[0],...e.slice(1));return n.length===0?null:n.length===1?Rg(n[0],t):mw(n,t)}var hE=uE;function fE(r){if(!r)throw new Error("geojson is required");var e=[];return aE(r,function(t){e.push(t)}),_h(e)}var dE=fE;function V0(r,e){const t=hE(_h([Rg([[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]),r]));if(!t)return;t.properties={isMask:!0};const n=dd(U0(r)),l=(n[2]-n[0])/360/1e3,u=n[0]<-180,d=n[2]>180,a=dE(r);if(a.features.length>1&&(u||d))for(const _ of a.features){const x=dd(U0(_));if(d&&x[0]<-180+l)for(const S of _.geometry.coordinates)for(const k of S)k[0]+=360-l;if(u&&x[2]>180-l)for(const S of _.geometry.coordinates)for(const k of S)k[0]-=360-l}e(_h([a.features.length<2?r:vw(a)??r,t]))}const q0={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}},Ff="mtlr-gc-full-geom",G0="mtlr-gc-full-geom-fill",W0="mtlr-gc-full-geom-line";function bw(r,e,t=!0,n=!0,l={},u={},d=q0){let a;const _=[];let x,S,k;function C(){if(!r.loaded){r.once("load",C);return}const z=d?d===!0?q0:d:void 0;if(!(z!=null&&z.fill)&&!(z!=null&&z.line))return;const B=r.getSource(Ff);if(B)B.setData(k??_h([]));else if(k)r.addSource(Ff,{type:"geojson",data:k});else return;!r.getLayer(G0)&&z!=null&&z.fill&&r.addLayer({...z==null?void 0:z.fill,id:G0,type:"fill",source:Ff}),!r.getLayer(W0)&&z!=null&&z.line&&r.addLayer({...z==null?void 0:z.line,id:W0,type:"line",source:Ff})}function P(z){k=z,C()}r.on("styledata",()=>{setTimeout(()=>{k&&C()})});const D=z=>{a==null||a({type:"mapClick",coordinates:[z.lngLat.lng,z.lngLat.lat]})};function N(z=!1){if(!e)throw new Error;const B=document.createElement("div");return z&&B.classList.add("marker-interactive"),new lT({props:{displayIn:"maplibre"},target:B}),new e.Marker({element:B,offset:[1,-13]})}return{setEventHandler(z){z?(a=z,r.on("click",D)):(a=void 0,r.off("click",D))},flyTo(z,B){r.flyTo({center:z,...B?{zoom:B}:{},...l})},fitBounds(z,B,O){r.fitBounds([[z[0],z[1]],[z[2],z[3]]],{padding:B,...O?{maxZoom:O}:{},...u})},indicateReverse(z){r.getCanvasContainer().style.cursor=z?"crosshair":""},setReverseMarker(z){!e||!t||(S?z?S.setLngLat(z):(S.remove(),S=void 0):z&&(t instanceof Function?S=t(r)??void 0:(S=(typeof t=="object"?new e.Marker(t):N()).setLngLat(z).addTo(r),S.getElement().classList.add("marker-reverse"))))},setFeatures(z,B,O){for(const G of _)G.remove();if(_.length=0,P(void 0),!!e){if(B){let G=!1;if(B.geometry.type==="GeometryCollection"){const U=B.geometry.geometries.filter(K=>K.type==="Polygon"||K.type==="MultiPolygon");e:if(U.length>0){const K=vw(_h(U.map(me=>gh(me))));if(!K)break e;V0({...B,geometry:K.geometry},P),G=!0}else{const K=B.geometry.geometries.filter(me=>me.type==="LineString"||me.type==="MultiLineString");K.length>0&&(P({...B,geometry:{type:"GeometryCollection",geometries:K}}),G=!0)}}if(!G){if(B.geometry.type==="Polygon"||B.geometry.type==="MultiPolygon")V0(B,P);else if(B.geometry.type==="LineString"||B.geometry.type==="MultiLineString"){P(B);return}}if(!O&&B.geometry.type!=="Point")return;if(t instanceof Function){const U=t(r,B);U&&_.push(U)}else t&&_.push(typeof t=="object"?new e.Marker(t):N().setLngLat(B.center).addTo(r))}if(n)for(const G of z??[]){if(G===B)continue;let U;if(n instanceof Function){if(U=n(r,G),!U)continue}else U=(typeof n=="object"?new e.Marker(n):N(!0)).setLngLat(G.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(G.place_type[0]==="reverse"?G.place_name:G.place_name.replace(/,.*/,""))).addTo(r);const K=U.getElement();K.addEventListener("click",me=>{me.stopPropagation(),a==null||a({type:"markerClick",id:G.id})}),K.addEventListener("mouseenter",()=>{a==null||a({type:"markerMouseEnter",id:G.id}),U.togglePopup()}),K.addEventListener("mouseleave",()=>{a==null||a({type:"markerMouseLeave",id:G.id}),U.togglePopup()}),_.push(U)}}},setSelectedMarker(z){x&&x.getElement().classList.toggle("marker-selected",!1),x=z>-1?_[z]:void 0,x==null||x.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const z=r.getCenter();return[r.getZoom(),z.lng,z.lat]}}}function pE(r,e,t){var n,l;class u{constructor(z,B){fo(this,"type"),fo(this,"target"),this.type=B,this.target=z}}class d extends u{constructor(z,B){super(z,"select"),fo(this,"feature"),Object.assign(this,B)}}class a extends u{constructor(z,B){super(z,"featureslisted"),fo(this,"features"),this.features=B}}class _ extends u{constructor(z,B){super(z,"featuresmarked"),fo(this,"features"),this.features=B}}class x extends u{constructor(z,B){super(z,"optionsvisibilitychange"),fo(this,"optionsVisible"),this.optionsVisible=B}}class S extends u{constructor(z,B){super(z,"pick"),fo(this,"feature"),this.feature=B}}class k extends u{constructor(z,B){super(z,"querychange"),fo(this,"query"),this.query=B}}class C extends u{constructor(z,B,O){super(z,"response"),fo(this,"url"),fo(this,"featureCollection"),this.url=B,this.featureCollection=O}}class P extends u{constructor(z,B){super(z,"reversetoggle"),fo(this,"reverse"),this.reverse=B}}class D extends r{constructor(z={}){super(),l0(this,n),l0(this,l),c0(this,l,z)}onAddInt(z){const B=document.createElement("div");B.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";const{marker:O,showResultMarkers:G,flyTo:U,fullGeometryStyle:K,...me}=Qn(this,l),X=typeof U=="boolean"?{}:U,Y={mapController:bw(z,e,O,G,X,X,K),flyTo:U===void 0?!0:!!U,apiKey:"",...t==null?void 0:t(z,B),...me};if(!Y.apiKey)throw new Error("no apiKey provided");return c0(this,n,new PT({target:B,props:Y})),Qn(this,n).$on("select",_e=>{this.fire(new d(this,_e.detail))}),Qn(this,n).$on("pick",_e=>{this.fire(new S(this,_e.detail.feature))}),Qn(this,n).$on("featureslisted",_e=>{this.fire(new a(this,_e.detail.features))}),Qn(this,n).$on("featuresmarked",_e=>{this.fire(new _(this,_e.detail.features))}),Qn(this,n).$on("response",_e=>{this.fire(new C(this,_e.detail.url,_e.detail.featureCollection))}),Qn(this,n).$on("optionsvisibilitychange",_e=>{this.fire(new x(this,_e.detail.optionsVisible))}),Qn(this,n).$on("reversetoggle",_e=>{this.fire(new P(this,_e.detail.reverse))}),Qn(this,n).$on("querychange",_e=>{this.fire(new k(this,_e.detail.query))}),B}on(z,B){return super.on(z,B)}once(z,B){return super.once(z,B)}off(z,B){return super.off(z,B)}listens(z){return super.listens(z)}setOptions(z){var B;Object.assign(Qn(this,l),z);const{marker:O,showResultMarkers:G,flyTo:U,fullGeometryStyle:K,...me}=Qn(this,l);(B=Qn(this,n))==null||B.$set(me)}setQuery(z,B=!0){var O;(O=Qn(this,n))==null||O.setQuery(z,B)}clearMap(){var z;(z=Qn(this,n))==null||z.clearMap()}clearList(){var z;(z=Qn(this,n))==null||z.clearList()}setReverseMode(z){var B;(B=Qn(this,n))==null||B.$set({reverseActive:z})}focus(){var z;(z=Qn(this,n))==null||z.focus()}blur(){var z;(z=Qn(this,n))==null||z.blur()}onRemove(){var z;(z=Qn(this,n))==null||z.$destroy()}}return n=new WeakMap,l=new WeakMap,{MapLibreBasedGeocodingControl:D,events:{SelectEvent:d,FeaturesListedEvent:a,FeaturesMarkedEvent:_,OptionsVisibilityChangeEvent:x,PickEvent:S,QueryChangeEvent:k,ResponseEvent:C,ReverseToggleEvent:P}}}const{MapLibreBasedGeocodingControl:OD,events:va}=pE(Pc.Evented,c4);va.SelectEvent;va.FeaturesListedEvent;va.FeaturesMarkedEvent;va.OptionsVisibilityChangeEvent;va.PickEvent;va.QueryChangeEvent;va.ResponseEvent;va.ReverseToggleEvent;function mE(r){let e,t;return{c(){e=Ls("svg"),t=Ls("path"),Ee(t,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),Ee(e,"viewBox","0 0 14 14"),Ee(e,"width","13"),Ee(e,"height","13"),Ee(e,"class","svelte-en2qvf")},m(n,l){be(n,e,l),ie(e,t)},p:Mt,i:Mt,o:Mt,d(n){n&&ve(e)}}}class ww extends Ht{constructor(e){super(),Zt(this,e,null,mE,Ut,{})}}function gE(r){let e,t;return{c(){e=Ls("svg"),t=Ls("path"),Ee(t,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),Ee(e,"viewBox","0 0 30 30"),Ee(e,"fill","none"),Ee(e,"xmlns","http://www.w3.org/2000/svg"),Ee(e,"class","svelte-d2loi5")},m(n,l){be(n,e,l),ie(e,t)},p:Mt,i:Mt,o:Mt,d(n){n&&ve(e)}}}class xw extends Ht{constructor(e){super(),Zt(this,e,null,gE,Ut,{})}}function _E(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"area.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"area.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function yE(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"reverse.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"reverse.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function vE(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"poi.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"poi.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function bE(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"postal_code.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"postal_code.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function wE(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"street.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"street.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function xE(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"road.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"road.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function SE(r){let e,t;return{c(){e=fe("img"),En(e.src,t=r[3]+"housenumber.svg")||Ee(e,"src",t),Ee(e,"alt",r[6]),Ee(e,"class","svelte-ltkwvy")},m(n,l){be(n,e,l)},p(n,l){l&8&&!En(e.src,t=n[3]+"housenumber.svg")&&Ee(e,"src",t),l&64&&Ee(e,"alt",n[6])},d(n){n&&ve(e)}}}function kE(r){let e,t,n,l;return{c(){e=fe("img"),En(e.src,t=r[5])||Ee(e,"src",t),Ee(e,"alt",r[4]),Ee(e,"class","svelte-ltkwvy")},m(u,d){be(u,e,d),n||(l=Tt(e,"error",r[14]),n=!0)},p(u,d){d&32&&!En(e.src,t=u[5])&&Ee(e,"src",t),d&16&&Ee(e,"alt",u[4])},d(u){u&&ve(e),n=!1,l()}}}function Z0(r){let e,t;return{c(){e=fe("span"),t=rt(r[6]),Ee(e,"class","secondary svelte-ltkwvy")},m(n,l){be(n,e,l),ie(e,t)},p(n,l){l&64&&Ar(t,n[6])},d(n){n&&ve(e)}}}function TE(r){let e,t,n,l,u,d,a,_,x,S=(r[7]?r[0].place_name:r[0].place_name.replace(/,.*/,""))+"",k,C,P=r[2]==="always"||r[2]!=="never"&&!r[0].address&&!r[0].id.startsWith("road.")&&!r[0].id.startsWith("address.")&&!r[0].id.startsWith("postal_code.")&&(!r[0].id.startsWith("poi.")||!r[5])&&!r[7],D,N,z=(r[7]?"":r[0].place_name.replace(/[^,]*,?\s*/,""))+"",B,O,G;function U(Y,_e){return _e&1&&(t=null),_e&1&&(n=null),_e&1&&(l=null),_e&1&&(u=null),Y[5]?kE:Y[0].address?SE:(t==null&&(t=!!Y[0].id.startsWith("road.")),t?xE:(n==null&&(n=!!Y[0].id.startsWith("address.")),n?wE:(l==null&&(l=!!Y[0].id.startsWith("postal_code.")),l?bE:(u==null&&(u=!!Y[0].id.startsWith("poi.")),u?vE:Y[7]?yE:_E))))}let K=U(r,-1),me=K(r),X=P&&Z0(r);return{c(){e=fe("li"),me.c(),d=Ve(),a=fe("span"),_=fe("span"),x=fe("span"),k=rt(S),C=Ve(),X&&X.c(),D=Ve(),N=fe("span"),B=rt(z),Ee(x,"class","primary svelte-ltkwvy"),Ee(_,"class","svelte-ltkwvy"),Ee(N,"class","line2 svelte-ltkwvy"),Ee(a,"class","texts svelte-ltkwvy"),Ee(e,"tabindex","0"),Ee(e,"data-selected",r[1]),Ee(e,"class","svelte-ltkwvy"),hi(e,"selected",r[1])},m(Y,_e){be(Y,e,_e),me.m(e,null),ie(e,d),ie(e,a),ie(a,_),ie(_,x),ie(x,k),ie(_,C),X&&X.m(_,null),ie(a,D),ie(a,N),ie(N,B),O||(G=[Tt(e,"mouseenter",r[12]),Tt(e,"focus",r[13])],O=!0)},p(Y,[_e]){K===(K=U(Y,_e))&&me?me.p(Y,_e):(me.d(1),me=K(Y),me&&(me.c(),me.m(e,d))),_e&1&&S!==(S=(Y[7]?Y[0].place_name:Y[0].place_name.replace(/,.*/,""))+"")&&Ar(k,S),_e&37&&(P=Y[2]==="always"||Y[2]!=="never"&&!Y[0].address&&!Y[0].id.startsWith("road.")&&!Y[0].id.startsWith("address.")&&!Y[0].id.startsWith("postal_code.")&&(!Y[0].id.startsWith("poi.")||!Y[5])&&!Y[7]),P?X?X.p(Y,_e):(X=Z0(Y),X.c(),X.m(_,null)):X&&(X.d(1),X=null),_e&1&&z!==(z=(Y[7]?"":Y[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&Ar(B,z),_e&2&&Ee(e,"data-selected",Y[1]),_e&2&&hi(e,"selected",Y[1])},i:Mt,o:Mt,d(Y){Y&&ve(e),me.d(),X&&X.d(),O=!1,_n(G)}}}function EE(r,e,t){var G;let n,l,{feature:u}=e,{selected:d=!1}=e,{showPlaceType:a}=e,{missingIconsCache:_}=e,{iconsBaseUrl:x}=e;const S=(G=u.properties)==null?void 0:G.categories;let k,C,P=0,D=u.place_type[0]==="reverse";function N(){C&&_.add(C),t(10,P++,P)}function z(U){ur.call(this,r,U)}function B(U){ur.call(this,r,U)}const O=()=>N();return r.$$set=U=>{"feature"in U&&t(0,u=U.feature),"selected"in U&&t(1,d=U.selected),"showPlaceType"in U&&t(2,a=U.showPlaceType),"missingIconsCache"in U&&t(9,_=U.missingIconsCache),"iconsBaseUrl"in U&&t(3,x=U.iconsBaseUrl)},r.$$.update=()=>{var U,K,me,X;if(r.$$.dirty&3640)do t(11,n--,n),t(4,k=S==null?void 0:S[n]),t(5,C=k?x+k.replace(/ /g,"_")+".svg":void 0);while(n>-1&&(!C||_.has(C)));r.$$.dirty&1&&t(6,l=((K=(U=u.properties)==null?void 0:U.categories)==null?void 0:K.join(", "))??((X=(me=u.properties)==null?void 0:me.place_type_name)==null?void 0:X[0])??u.place_type[0])},t(11,n=(S==null?void 0:S.length)??0),[u,d,a,x,k,C,l,D,N,_,P,n,z,B,O]}class ME extends Ht{constructor(e){super(),Zt(this,e,EE,TE,Ut,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function CE(r){let e;return{c(){e=fe("div"),e.innerHTML='',Ee(e,"class","svelte-7cmwmc")},m(t,n){be(t,e,n)},p:Mt,i:Mt,o:Mt,d(t){t&&ve(e)}}}class IE extends Ht{constructor(e){super(),Zt(this,e,null,CE,Ut,{})}}function AE(r){let e,t;return{c(){e=Ls("svg"),t=Ls("path"),Ee(t,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),Ee(e,"viewBox","0 0 60.006 21.412"),Ee(e,"width","14"),Ee(e,"height","20"),Ee(e,"class","svelte-en2qvf")},m(n,l){be(n,e,l),ie(e,t)},p:Mt,i:Mt,o:Mt,d(n){n&&ve(e)}}}class LE extends Ht{constructor(e){super(),Zt(this,e,null,AE,Ut,{})}}function PE(r){let e,t,n;return{c(){e=Ls("svg"),t=Ls("circle"),n=Ls("path"),Ee(t,"cx","4.789"),Ee(t,"cy","4.787"),Ee(t,"r","3.85"),Ee(t,"class","svelte-1aq105l"),Ee(n,"d","M12.063 12.063 7.635 7.635"),Ee(n,"class","svelte-1aq105l"),Ee(e,"xmlns","http://www.w3.org/2000/svg"),Ee(e,"width","13"),Ee(e,"height","13"),Ee(e,"viewBox","0 0 13 13"),Ee(e,"class","svelte-1aq105l")},m(l,u){be(l,e,u),ie(e,t),ie(e,n)},p:Mt,i:Mt,o:Mt,d(l){l&&ve(e)}}}class zE extends Ht{constructor(e){super(),Zt(this,e,null,PE,Ut,{})}}function DE(r,e,t){const n=e[1],l=e[0],u=n-l;return r===n&&t?r:((r-l)%u+u)%u+l}function H0(r){const e=[...r];return e[2]Math.abs((e[0]-360+e[2])/2)?e[0]-=360:e[2]+=360),e}let Uu;async function RE(r,e,t){const n=r==null?void 0:r.getCenterAndZoom();for(const l of e??[])if(!(n&&(l.minZoom!=null&&l.minZoom>n[0]||l.maxZoom!=null&&l.maxZoomDate.now()){if(!Uu.coords)break e;return Uu.coords}let u;try{return u=await new Promise((d,a)=>{t.signal.addEventListener("abort",()=>{a(Error("aborted"))}),navigator.geolocation.getCurrentPosition(_=>{d([_.coords.longitude,_.coords.latitude].map(x=>x.toFixed(6)).join(","))},_=>{a(_)},l)}),u}catch{}finally{l.cachedLocationExpiry&&(Uu={time:Date.now(),coords:u})}if(t.signal.aborted)return}if(l.type==="server-geolocation")return"ip";if(n&&l.type==="map-center")return n[1].toFixed(6)+","+n[2].toFixed(6)}}const BE=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i,$0=/^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/,X0=/^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i,K0=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i,J0=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i,Y0=/^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;function FE(r){if(!["DMS","DM","DD"].includes(r))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){const e=this.decimalCoordinates.split(",").map(P=>Number(P.trim())),t=Number(e[0]),n=Number(e[1]),l=Math.abs(t),u=Math.abs(n),d=t>0?"N":"S",a=n>0?"E":"W";let _;r=="DD"&&(_=`${l}° ${d}, ${u}° ${a}`);const x=Math.floor(l),S=Math.floor(u),k=(l-x)*60,C=(u-S)*60;if(r=="DM"){let P=Q0(k,3).toFixed(3).padStart(6,"0"),D=Q0(C,3).toFixed(3).padStart(6,"0");P.endsWith(".000")&&D.endsWith(".000")&&(P=P.replace(/\.000$/,""),D=D.replace(/\.000$/,"")),_=`${x}° ${P}' ${d}, ${S}° ${D}' ${a}`}if(r=="DMS"){const P=Math.floor(k),D=Math.floor(C);let N=((k-P)*60).toFixed(1).padStart(4,"0"),z=((C-D)*60).toFixed(1).padStart(4,"0");const B=P.toString().padStart(2,"0"),O=D.toString().padStart(2,"0");N.endsWith(".0")&&z.endsWith(".0")&&(N=N.replace(/\.0$/,""),z=z.replace(/\.0$/,"")),_=`${x}° ${B}' ${N}" ${d}, ${S}° ${O}' ${z}" ${a}`}return _}else throw new Error("no decimal coordinates to convert")}function Q0(r,e){const t=Math.pow(10,e);return Math.round((r+Number.EPSILON)*t)/t}function Og(r,e){e||(e=5),r=r.replace(/\s+/g," ").trim();let t=null,n=null,l="",u="",d=null,a=[],_=!1;if(BE.test(r))throw new Error("invalid coordinate value");if($0.test(r))if(a=$0.exec(r),_=Vu(a),_)t=Math.abs(a[1])+a[2]/60,Number(a[1])<0&&(t*=-1),n=Math.abs(a[3])+a[4]/60,Number(a[3])<0&&(n*=-1),d="DM";else throw new Error("invalid coordinate format");else if(X0.test(r))if(a=X0.exec(r),_=Vu(a),_){if(t=a[2],n=a[6],t.includes(",")&&(t=t.replace(",",".")),n.includes(",")&&(n=n.replace(",",".")),d="DD",Number(Math.round(t))==Number(t))throw new Error("integer only coordinate provided");if(Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");a[1]?(l=a[1],u=a[5]):a[4]&&(l=a[4],u=a[8])}else throw new Error("invalid decimal coordinate format");else if(K0.test(r))if(a=K0.exec(r),_=Vu(a),_)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4]/60,d="DM"),a[6]&&(t+=a[6].replace(",",".")/3600,d="DMS"),parseInt(a[2])<0&&(t=-1*t),n=Math.abs(parseInt(a[9])),a[11]&&(n+=a[11]/60),a[13]&&(n+=a[13].replace(",",".")/3600),parseInt(a[9])<0&&(n=-1*n),a[1]?(l=a[1],u=a[8]):a[7]&&(l=a[7],u=a[14]);else throw new Error("invalid DMS coordinates format");else if(J0.test(r))if(a=J0.exec(r),_=Vu(a),_)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4]/60,d="DM"),a[6]&&(t+=a[6]/3600,d="DMS"),parseInt(a[2])<0&&(t=-1*t),n=Math.abs(parseInt(a[10])),a[12]&&(n+=a[12]/60),a[14]&&(n+=a[14]/3600),parseInt(a[10])<0&&(n=-1*n),a[1]?(l=a[1],u=a[9]):a[8]&&(l=a[8],u=a[16]);else throw new Error("invalid DMS coordinates format");else if(Y0.test(r)){if(a=Y0.exec(r),_=Vu(a),a.filter(x=>x).length<=5)throw new Error("invalid coordinates format");if(_)t=Math.abs(parseInt(a[2])),a[4]&&(t+=a[4].replace(",",".")/60,d="DM"),a[6]&&(t+=a[6].replace(",",".")/3600,d="DMS"),parseInt(a[2])<0&&(t=-1*t),n=Math.abs(parseInt(a[10])),a[12]&&(n+=a[12].replace(",",".")/60),a[14]&&(n+=a[14].replace(",",".")/3600),parseInt(a[10])<0&&(n=-1*n),a[1]?(l=a[1],u=a[9]):a[8]&&(l=a[8],u=a[16]);else throw new Error("invalid coordinates format")}if(_){if(Math.abs(n)>=180)throw new Error("invalid longitude value");if(Math.abs(t)>=90)throw new Error("invalid latitude value");if(l&&!u||!l&&u)throw new Error("invalid coordinates value");if(l&&l==u)throw new Error("invalid coordinates format");t.toString().includes(",")&&(t=t.replace(",",".")),n.toString().includes(",")&&(n=n.replace(",","."));let x=/S|SOUTH/i;x.test(l)&&t>0&&(t=-1*t),x=/W|WEST/i,x.test(u)&&n>0&&(n=-1*n);const S=a[0].trim();let k,C;const P=/[,/;\u0020]/g,D=S.match(P);if(D==null){const B=Math.floor(r.length/2);k=S.substring(0,B).trim(),C=S.substring(B).trim()}else{let B;D.length%2==1?B=Math.floor(D.length/2):B=D.length/2-1;let O=0;if(B==0)O=S.indexOf(D[0]),k=S.substring(0,O).trim(),C=S.substring(O+1).trim();else{let G=0,U=0;for(;G<=B;)O=S.indexOf(D[G],U),U=O+1,G++;k=S.substring(0,O).trim(),C=S.substring(O+1).trim()}}const N=k.split(".");if(N.length==2&&N[1]==0&&N[1].length!=2)throw new Error("invalid coordinates format");const z=C.split(".");if(z.length==2&&z[1]==0&&z[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(k)||/^\d+$/.test(C))throw new Error("degree only coordinate/s provided");return t=Number(Number(t).toFixed(e)),n=Number(Number(n).toFixed(e)),Object.freeze({verbatimCoordinates:S,verbatimLatitude:k,verbatimLongitude:C,decimalLatitude:t,decimalLongitude:n,decimalCoordinates:`${t},${n}`,originalFormat:d,closeEnough:OE,toCoordinateFormat:FE})}else throw new Error("coordinates pattern match failed")}function Vu(r){if(!isNaN(r[0]))return!1;const e=[...r];if(e.shift(),e.length%2>0)return!1;const t=/^[-+]?\d+([\.,]\d+)?$/,n=/[eastsouthnorthwest]+/i,l=e.length/2;for(let u=0;u{e.decimalLatitude?r.push(e):r.push({...e,...UE})}),[...r,...VE,...qE]}const WE=GE();Og.formats=WE.map(r=>r.verbatimCoordinates);const ZE=Og;function t1(r,e,t){const n=r.slice();return n[84]=e[t],n[86]=t,n}function r1(r){let e,t;return e=new IE({}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function n1(r){let e,t,n,l,u;return t=new LE({}),{c(){e=fe("button"),je(t.$$.fragment),Ee(e,"type","button"),Ee(e,"title",r[9]),Ee(e,"class","svelte-bz0zu3"),hi(e,"active",r[0])},m(d,a){be(d,e,a),Oe(t,e,null),n=!0,l||(u=Tt(e,"click",r[69]),l=!0)},p(d,a){(!n||a[0]&512)&&Ee(e,"title",d[9]),(!n||a[0]&1)&&hi(e,"active",d[0])},i(d){n||(oe(t.$$.fragment,d),n=!0)},o(d){de(t.$$.fragment,d),n=!1},d(d){d&&ve(e),Ne(t),l=!1,u()}}}function HE(r){let e,t=[],n=new Map,l,u,d,a=Jn(r[14]);const _=x=>x[84].id+(x[84].address?","+x[84].address:"");for(let x=0;x{X=null}),vr()),(!G||ft[0]&2)&&hi(x,"displayable",Me[1]!==""),Me[5]==="button"?Y?(Y.p(Me,ft),ft[0]&32&&oe(Y,1)):(Y=n1(Me),Y.c(),oe(Y,1),Y.m(n,D)):Y&&(yr(),de(Y,1,1,()=>{Y=null}),vr()),ze&&ze.p&&(!G||ft[1]&536870912)&&Gr(ze,_e,Me,Me[60],G?qr(_e,Me[60],ft,null):Wr(Me[60]),null);let Ct=z;z=Ze(Me),z===Ct?~z&&ce[z].p(Me,ft):(B&&(yr(),de(ce[Ct],1,1,()=>{ce[Ct]=null}),vr()),~z?(B=ce[z],B?B.p(Me,ft):(B=ce[z]=re[z](Me),B.c()),oe(B,1),B.m(t,null)):B=null),(!G||ft[0]&4&&O!==(O=od(Me[2])+" svelte-bz0zu3"))&&Ee(t,"class",O),(!G||ft[0]&22)&&hi(t,"can-collapse",Me[4]&&Me[1]==="")},i(Me){G||(oe(me),oe(u.$$.fragment,Me),oe(k.$$.fragment,Me),oe(X),oe(Y),oe(ze,Me),oe(B),G=!0)},o(Me){de(me),de(u.$$.fragment,Me),de(k.$$.fragment,Me),de(X),de(Y),de(ze,Me),de(B),G=!1},d(Me){Me&&(ve(e),ve(t)),Ne(u),r[63](null),Ne(k),X&&X.d(),Y&&Y.d(),ze&&ze.d(Me),~z&&ce[z].d(),U=!1,_n(K)}}}function YE(r,e,t){let n,l,{$$slots:u={},$$scope:d}=e;const a={continental_marine:4,country:4,major_landform:8,region:5,subregion:6,county:7,joint_municipality:8,joint_submunicipality:9,municipality:10,municipal_district:11,locality:12,neighbourhood:13,place:14,postal_code:14,road:16,poi:17,address:18,"poi.peak":15,"poi.shop":18,"poi.cafe":18,"poi.restaurant":18,"poi.aerodrome":13};let{class:_=void 0}=e,{apiKey:x}=e,{bbox:S=void 0}=e,{clearButtonTitle:k="clear"}=e,{clearOnBlur:C=!1}=e,{collapsed:P=!1}=e,{country:D=void 0}=e,{debounceSearch:N=200}=e,{enableReverse:z="never"}=e,{errorMessage:B="Something went wrong…"}=e,{filter:O=()=>!0}=e,{flyTo:G=!0}=e,{fuzzyMatch:U=!0}=e,{language:K=void 0}=e,{limit:me=void 0}=e,{mapController:X=void 0}=e,{minLength:Y=2}=e,{noResultsMessage:_e="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:ze="Search"}=e,{proximity:re=[{type:"server-geolocation"}]}=e,{reverseActive:ce=z==="always"}=e,{reverseButtonTitle:Ze="toggle reverse geocoding"}=e,{searchValue:Me=""}=e,{pickedResultStyle:ft="full-geometry"}=e,{showPlaceType:Ct="if-needed"}=e,{showResultsWhileTyping:Ot=!0}=e,{selectFirst:Ke=!0}=e,{flyToSelected:Kt=!1}=e,{markerOnSelected:vt=!0}=e,{types:At=void 0}=e,{exhaustiveReverseGeocoding:Vt=!1}=e,{excludeTypes:sr=!1}=e,{zoom:fr=a}=e,{apiUrl:er="https://api.maptiler.com/geocoding"}=e,{fetchParameters:Nt={}}=e,{iconsBaseUrl:nr="https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.1/icons/"}=e,{adjustUrlQuery:tr=()=>{}}=e;function Lr(){We.focus()}function Pr(){We.blur()}function st(W,Be=!0,Fe=!1){t(1,Me=W),Be?(t(15,Ye=-1),ct()):(Jt(!Fe,Fe),setTimeout(()=>{We.focus(),We.select()}))}function Lt(){t(14,tt=void 0),t(56,ne=void 0),t(15,Ye=-1)}function De(){t(55,it=[]),t(56,ne=void 0)}let at=!1,tt,it,ne,br="",We,Ye=-1,jt,bn=[],wn,Mn,ni,ii;const $o=new Set,Jr=us();ti(()=>{X&&(X.setEventHandler(void 0),X.indicateReverse(!1),X.setSelectedMarker(-1),X.setFeatures(void 0,void 0,!1))});function ct(W){if(Mn&&(clearTimeout(Mn),Mn=void 0),Ye>-1&&tt)t(56,ne=tt[Ye]),t(1,Me=ne.place_type[0]==="reverse"?ne.place_name:ne.place_name.replace(/,.*/,"")),t(18,jt=void 0),t(55,it=void 0),t(15,Ye=-1);else if(Me){const Be=W||!Xn(Me);xn(Me,{exact:!0}).then(()=>{t(55,it=tt),t(56,ne=void 0),Be&&Bo()}).catch(Fe=>t(18,jt=Fe))}}function Xn(W){try{return ZE(W,6)}catch{return!1}}async function xn(W,{byId:Be=!1,exact:Fe=!1}={}){t(18,jt=void 0),wn==null||wn.abort();const qe=new AbortController;t(19,wn=qe);try{const Xe=Xn(W),ut=new URLSearchParams;if(K!==void 0&&ut.set("language",Array.isArray(K)?K.join(","):K??""),At&&ut.set("types",At.join(",")),sr&&ut.set("excludeTypes",String(sr)),S&&ut.set("bbox",S.map(gr=>gr.toFixed(6)).join(",")),D&&ut.set("country",Array.isArray(D)?D.join(","):D),!Be&&!Xe){const gr=await RE(X,re,qe);gr&&ut.set("proximity",gr),(Fe||!Ot)&&ut.set("autocomplete","false"),ut.set("fuzzyMatch",String(U))}me!==void 0&&(Vt||!Xe||(At==null?void 0:At.length)===1)&&ut.set("limit",String(me)),ut.set("key",x),tr(ut);const Pt=er+"/"+encodeURIComponent(Xe?Xe.decimalLongitude+","+Xe.decimalLatitude:W)+".json?"+ut.toString();if(Pt===br){Be?(t(14,tt=void 0),t(56,ne=bn[0])):t(14,tt=bn);return}br=Pt;const $t=await fetch(Pt,{signal:qe.signal,...Nt});if(!$t.ok)throw new Error(await $t.text());const ar=await $t.json();Jr("response",{url:Pt,featureCollection:ar}),Be?(t(14,tt=void 0),t(56,ne=ar.features[0]),bn=[ne]):(t(14,tt=ar.features.filter(O)),Xe&&tt.unshift({type:"Feature",properties:{},id:"reverse_"+Xe.decimalLongitude+"_"+Xe.decimalLatitude,text:Xe.decimalLatitude+", "+Xe.decimalLongitude,place_name:Xe.decimalLatitude+", "+Xe.decimalLongitude,place_type:["reverse"],center:[Xe.decimalLongitude,Xe.decimalLatitude],bbox:[Xe.decimalLongitude,Xe.decimalLatitude,Xe.decimalLongitude,Xe.decimalLatitude],geometry:{type:"Point",coordinates:[Xe.decimalLongitude,Xe.decimalLatitude]}}),bn=tt,Xe&&We.focus())}catch(Xe){if(Xe&&typeof Xe=="object"&&"name"in Xe&&Xe.name==="AbortError")return;throw Xe}finally{qe===wn&&t(19,wn=void 0)}}function Bo(){var qe;if(!(it!=null&&it.length)||!G)return;const W=[180,90,-180,-90],Be=!it.some(Xe=>!Xe.matching_text);let Fe;for(const Xe of it){const ut=Or(Xe);if(Fe=Fe===void 0?ut:ut===void 0?Fe:Math.max(Fe,ut),Be||!Xe.matching_text)for(const Pt of[0,1,2,3])W[Pt]=Math[Pt<2?"min":"max"](W[Pt],((qe=Xe.bbox)==null?void 0:qe[Pt])??Xe.center[Pt%2])}X&&it.length>0&&(ne&&W[0]===W[2]&&W[1]===W[3]?X.flyTo(ne.center,Or(ne)):X.fitBounds(H0(W),50,Fe))}function Or(W){var Fe;if(!W.bbox||W.bbox[0]!==W.bbox[2]&&W.bbox[1]!==W.bbox[3])return;const Be=W.id.replace(/\..*/,"");return(Array.isArray((Fe=W.properties)==null?void 0:Fe.categories)?W.properties.categories.reduce((qe,Xe)=>{const ut=fr[Be+"."+Xe];return qe===void 0?ut:ut===void 0?qe:Math.max(qe,ut)},void 0):void 0)??fr[Be]}function mt(W){t(0,ce=z==="always"),t(14,tt=void 0),t(56,ne=void 0),t(15,Ye=-1),st(W[1].toFixed(6)+", "+DE(W[0],[-180,180],!0).toFixed(6),!1,!0)}function rr(W){if(!tt)return;let Be=W.key==="ArrowDown"?1:W.key==="ArrowUp"?-1:0;Be&&(Ye===(Ke?0:-1)&&Be===-1&&t(15,Ye=tt.length),t(15,Ye+=Be),Ye>=tt.length&&t(15,Ye=-1),Ye<0&&Ke&&t(15,Ye=0),W.preventDefault())}function Jt(W=!0,Be=!1){if(t(18,jt=void 0),Ot||Be){if(Mn&&clearTimeout(Mn),Me.length{xn(Fe).catch(qe=>t(18,jt=qe))},W?N:0)}else t(14,tt=void 0),t(18,jt=void 0)}function Nr(W){t(56,ne=W),t(1,Me=W.place_name),t(15,Ye=-1)}const vi=()=>We.focus();function Qt(W){pn[W?"unshift":"push"](()=>{We=W,t(17,We)})}function ro(){Me=this.value,t(1,Me),t(13,at),t(28,C)}const an=()=>t(13,at=!0),pe=()=>t(13,at=!1),Z=()=>Jt(),$=()=>{t(1,Me=""),We.focus()},te=()=>t(0,ce=!ce),le=()=>t(18,jt=void 0),Ce=W=>t(15,Ye=W),Ie=W=>Nr(W),Pe=()=>{Ke||t(15,Ye=-1)},Se=()=>{};return r.$$set=W=>{"class"in W&&t(2,_=W.class),"apiKey"in W&&t(26,x=W.apiKey),"bbox"in W&&t(27,S=W.bbox),"clearButtonTitle"in W&&t(3,k=W.clearButtonTitle),"clearOnBlur"in W&&t(28,C=W.clearOnBlur),"collapsed"in W&&t(4,P=W.collapsed),"country"in W&&t(29,D=W.country),"debounceSearch"in W&&t(30,N=W.debounceSearch),"enableReverse"in W&&t(5,z=W.enableReverse),"errorMessage"in W&&t(6,B=W.errorMessage),"filter"in W&&t(31,O=W.filter),"flyTo"in W&&t(32,G=W.flyTo),"fuzzyMatch"in W&&t(33,U=W.fuzzyMatch),"language"in W&&t(34,K=W.language),"limit"in W&&t(35,me=W.limit),"mapController"in W&&t(36,X=W.mapController),"minLength"in W&&t(37,Y=W.minLength),"noResultsMessage"in W&&t(7,_e=W.noResultsMessage),"placeholder"in W&&t(8,ze=W.placeholder),"proximity"in W&&t(38,re=W.proximity),"reverseActive"in W&&t(0,ce=W.reverseActive),"reverseButtonTitle"in W&&t(9,Ze=W.reverseButtonTitle),"searchValue"in W&&t(1,Me=W.searchValue),"pickedResultStyle"in W&&t(39,ft=W.pickedResultStyle),"showPlaceType"in W&&t(10,Ct=W.showPlaceType),"showResultsWhileTyping"in W&&t(40,Ot=W.showResultsWhileTyping),"selectFirst"in W&&t(11,Ke=W.selectFirst),"flyToSelected"in W&&t(41,Kt=W.flyToSelected),"markerOnSelected"in W&&t(42,vt=W.markerOnSelected),"types"in W&&t(43,At=W.types),"exhaustiveReverseGeocoding"in W&&t(44,Vt=W.exhaustiveReverseGeocoding),"excludeTypes"in W&&t(45,sr=W.excludeTypes),"zoom"in W&&t(46,fr=W.zoom),"apiUrl"in W&&t(47,er=W.apiUrl),"fetchParameters"in W&&t(48,Nt=W.fetchParameters),"iconsBaseUrl"in W&&t(12,nr=W.iconsBaseUrl),"adjustUrlQuery"in W&&t(49,tr=W.adjustUrlQuery),"$$scope"in W&&t(60,d=W.$$scope)},r.$$.update=()=>{if(r.$$.dirty[0]&32&&t(0,ce=z==="always"),r.$$.dirty[0]&268443648&&setTimeout(()=>{t(16,ni=at),C&&!at&&t(1,Me="")}),r.$$.dirty[0]&16386|r.$$.dirty[1]&64&&Me.lengtht(18,jt=W)),r.$$.dirty[1]&100663330&&(X&&ne&&ne.id!==ii&&G&&(!ne.bbox||ne.bbox[0]===ne.bbox[2]&&ne.bbox[1]===ne.bbox[3]?X.flyTo(ne.center,Or(ne)):X.fitBounds(H0(ne.bbox),50,Or(ne)),t(14,tt=void 0),t(55,it=void 0),t(15,Ye=-1)),t(57,ii=ne==null?void 0:ne.id)),r.$$.dirty[0]&18432&&Ke&&tt!=null&&tt.length&&t(15,Ye=0),r.$$.dirty[0]&2&&t(15,Ye=-1),r.$$.dirty[0]&16384|r.$$.dirty[1]&16777216&&it!==tt&&t(55,it=void 0),r.$$.dirty[0]&81921|r.$$.dirty[1]&16777248&&X&&X.setEventHandler(W=>{switch(W.type){case"mapClick":ce&&mt(W.coordinates);break;case"markerClick":{const Be=tt==null?void 0:tt.find(Fe=>Fe.id===W.id);Be&&Nr(Be)}break;case"markerMouseEnter":it&&t(15,Ye=ni?(tt==null?void 0:tt.findIndex(Be=>Be.id===W.id))??-1:-1);break;case"markerMouseLeave":it&&t(15,Ye=-1);break}}),r.$$.dirty[0]&49152&&t(58,l=tt==null?void 0:tt[Ye]),r.$$.dirty[1]&134218786&&X&&l&&G&&Kt&&X.flyTo(l.center,Or(l)),r.$$.dirty[1]&256&&t(59,n=ft==="full-geometry-including-polygon-center-marker"),r.$$.dirty[1]&268437536&&(vt||X==null||X.setFeatures(void 0,void 0,n)),r.$$.dirty[1]&419432480&&X&&vt&&!it&&(X.setFeatures(l?[l]:void 0,void 0,n),X.setSelectedMarker(l?0:-1)),r.$$.dirty[1]&318767136&&X&&X.setFeatures(it,ne,n),r.$$.dirty[0]&32768|r.$$.dirty[1]&16777248&&it&&X&&X.setSelectedMarker(Ye),r.$$.dirty[0]&2|r.$$.dirty[1]&32&&X){const W=Xn(Me);X.setReverseMarker(W?[W.decimalLongitude,W.decimalLatitude]:void 0)}r.$$.dirty[1]&134217728&&Jr("select",{feature:l}),r.$$.dirty[1]&33554432&&Jr("pick",{feature:ne}),r.$$.dirty[0]&81920&&Jr("optionsvisibilitychange",{optionsVisible:ni&&!!tt}),r.$$.dirty[0]&16384&&Jr("featureslisted",{features:tt}),r.$$.dirty[1]&16777216&&Jr("featuresmarked",{features:it}),r.$$.dirty[0]&1&&Jr("reversetoggle",{reverse:ce}),r.$$.dirty[0]&2&&Jr("querychange",{query:Me}),r.$$.dirty[0]&1|r.$$.dirty[1]&32&&X&&X.indicateReverse(ce)},[ce,Me,_,k,P,z,B,_e,ze,Ze,Ct,Ke,nr,at,tt,Ye,ni,We,jt,wn,$o,ct,rr,Jt,Nr,a,x,S,C,D,N,O,G,U,K,me,X,Y,re,ft,Ot,Kt,vt,At,Vt,sr,fr,er,Nt,tr,Lr,Pr,st,Lt,De,it,ne,ii,l,n,d,u,vi,Qt,ro,an,pe,Z,$,te,le,Ce,Ie,Pe,Se]}class QE extends Ht{constructor(e){super(),Zt(this,e,YE,JE,Ut,{ZOOM_DEFAULTS:25,class:2,apiKey:26,bbox:27,clearButtonTitle:3,clearOnBlur:28,collapsed:4,country:29,debounceSearch:30,enableReverse:5,errorMessage:6,filter:31,flyTo:32,fuzzyMatch:33,language:34,limit:35,mapController:36,minLength:37,noResultsMessage:7,placeholder:8,proximity:38,reverseActive:0,reverseButtonTitle:9,searchValue:1,pickedResultStyle:39,showPlaceType:10,showResultsWhileTyping:40,selectFirst:11,flyToSelected:41,markerOnSelected:42,types:43,exhaustiveReverseGeocoding:44,excludeTypes:45,zoom:46,apiUrl:47,fetchParameters:48,iconsBaseUrl:12,adjustUrlQuery:49,focus:50,blur:51,setQuery:52,clearList:53,clearMap:54},null,[-1,-1,-1])}get ZOOM_DEFAULTS(){return this.$$.ctx[25]}get focus(){return this.$$.ctx[50]}get blur(){return this.$$.ctx[51]}get setQuery(){return this.$$.ctx[52]}get clearList(){return this.$$.ctx[53]}get clearMap(){return this.$$.ctx[54]}}function o1(r){let e,t,n;return t=new QE({props:{mapController:r[1],apiKey:r[0],proximity:[{type:"map-center"}]}}),{c(){e=fe("div"),je(t.$$.fragment),Ee(e,"class","svelte-ixhnie")},m(l,u){be(l,e,u),Oe(t,e,null),n=!0},p(l,u){const d={};u&2&&(d.mapController=l[1]),u&1&&(d.apiKey=l[0]),t.$set(d)},i(l){n||(oe(t.$$.fragment,l),n=!0)},o(l){de(t.$$.fragment,l),n=!1},d(l){l&&ve(e),Ne(t)}}}function e5(r){let e,t,n=r[1]&&o1(r);return{c(){n&&n.c(),e=$n()},m(l,u){n&&n.m(l,u),be(l,e,u),t=!0},p(l,[u]){l[1]?n?(n.p(l,u),u&2&&oe(n,1)):(n=o1(l),n.c(),oe(n,1),n.m(e.parentNode,e)):n&&(yr(),de(n,1,1,()=>{n=null}),vr())},i(l){t||(oe(n),t=!0)},o(l){de(n),t=!1},d(l){l&&ve(e),n&&n.d(l)}}}function t5(r,e,t){let n,{apiKey:l}=e,{map:u}=e;function d(a){return a?bw(a,to,!0,!0,{duration:1e3},{duration:1e3}):null}return r.$$set=a=>{"apiKey"in a&&t(0,l=a.apiKey),"map"in a&&t(2,u=a.map)},r.$$.update=()=>{r.$$.dirty&4&&t(1,n=d(u))},[l,n,u]}class r5 extends Ht{constructor(e){super(),Zt(this,e,t5,e5,Ut,{apiKey:0,map:2})}}const n5=["==",["geometry-type"],"Polygon"],i5=["==",["geometry-type"],"LineString"];function o5(r,e,t){let n=["match",r];for(let[l,u]of Object.entries(e))n.push(l),n.push(u);return n.push(t),n}function Xf(){return{type:"FeatureCollection",features:[]}}const s5=r=>({}),s1=r=>({}),a5=r=>({}),a1=r=>({}),l5=r=>({}),l1=r=>({});function c5(r){let e,t,n,l,u,d;const a=r[1].top,_=Vr(a,r,r[0],l1),x=r[1].left,S=Vr(x,r,r[0],a1),k=r[1].main,C=Vr(k,r,r[0],s1);return{c(){e=fe("div"),_&&_.c(),t=Ve(),n=fe("div"),S&&S.c(),l=Ve(),u=fe("div"),C&&C.c(),Ee(e,"class","top svelte-mpick2"),Ee(n,"class","left svelte-mpick2"),Ee(u,"class","main svelte-mpick2")},m(P,D){be(P,e,D),_&&_.m(e,null),be(P,t,D),be(P,n,D),S&&S.m(n,null),be(P,l,D),be(P,u,D),C&&C.m(u,null),d=!0},p(P,[D]){_&&_.p&&(!d||D&1)&&Gr(_,a,P,P[0],d?qr(a,P[0],D,l5):Wr(P[0]),l1),S&&S.p&&(!d||D&1)&&Gr(S,x,P,P[0],d?qr(x,P[0],D,a5):Wr(P[0]),a1),C&&C.p&&(!d||D&1)&&Gr(C,k,P,P[0],d?qr(k,P[0],D,s5):Wr(P[0]),s1)},i(P){d||(oe(_,P),oe(S,P),oe(C,P),d=!0)},o(P){de(_,P),de(S,P),de(C,P),d=!1},d(P){P&&(ve(e),ve(t),ve(n),ve(l),ve(u)),_&&_.d(P),S&&S.d(P),C&&C.d(P)}}}function u5(r,e,t){let{$$slots:n={},$$scope:l}=e;return r.$$set=u=>{"$$scope"in u&&t(0,l=u.$$scope)},[l,n]}class h5 extends Ht{constructor(e){super(),Zt(this,e,u5,c5,Ut,{})}}const f5=r=>({}),c1=r=>({}),d5=r=>({}),u1=r=>({}),p5=r=>({}),h1=r=>({});function m5(r){let e,t,n,l,u,d;const a=r[4].top,_=Vr(a,r,r[3],h1),x=r[4].sidebar,S=Vr(x,r,r[3],u1),k=r[4].map,C=Vr(k,r,r[3],c1);return{c(){e=fe("div"),_&&_.c(),t=Ve(),n=fe("div"),S&&S.c(),l=Ve(),u=fe("div"),C&&C.c()},m(P,D){be(P,e,D),_&&_.m(e,null),r[5](e),be(P,t,D),be(P,n,D),S&&S.m(n,null),r[6](n),be(P,l,D),be(P,u,D),C&&C.m(u,null),r[7](u),d=!0},p(P,[D]){_&&_.p&&(!d||D&8)&&Gr(_,a,P,P[3],d?qr(a,P[3],D,p5):Wr(P[3]),h1),S&&S.p&&(!d||D&8)&&Gr(S,x,P,P[3],d?qr(x,P[3],D,d5):Wr(P[3]),u1),C&&C.p&&(!d||D&8)&&Gr(C,k,P,P[3],d?qr(k,P[3],D,f5):Wr(P[3]),c1)},i(P){d||(oe(_,P),oe(S,P),oe(C,P),d=!0)},o(P){de(_,P),de(S,P),de(C,P),d=!1},d(P){P&&(ve(e),ve(t),ve(n),ve(l),ve(u)),_&&_.d(P),r[5](null),S&&S.d(P),r[6](null),C&&C.d(P),r[7](null)}}}function g5(r,e,t){let n,l,u;wt(r,Hm,k=>t(0,n=k)),wt(r,$m,k=>t(1,l=k)),wt(r,Xm,k=>t(2,u=k));let{$$slots:d={},$$scope:a}=e;function _(k){pn[k?"unshift":"push"](()=>{n=k,Hm.set(n)})}function x(k){pn[k?"unshift":"push"](()=>{l=k,$m.set(l)})}function S(k){pn[k?"unshift":"push"](()=>{u=k,Xm.set(u)})}return r.$$set=k=>{"$$scope"in k&&t(3,a=k.$$scope)},[n,l,u,a,d,_,x,S]}class Fs extends Ht{constructor(e){super(),Zt(this,e,g5,m5,Ut,{})}}let Hm=Tr(null),$m=Tr(null),Xm=Tr(null);function _5(r){let e,t,n,l,u,d,a,_,x;return{c(){e=fe("label"),t=rt(`Basemap: `),n=fe("select"),l=fe("option"),l.textContent="MapTiler Dataviz",u=fe("option"),u.textContent="MapTiler Streets",d=fe("option"),d.textContent="MapTiler Satellite",a=fe("option"),a.textContent="OS Open Zoomstack",l.__value="dataviz",ei(l,l.__value),u.__value="streets-v2",ei(u,u.__value),d.__value="hybrid",ei(d,d.__value),a.__value="uk-openzoomstack-light",ei(a,a.__value),r[0]===void 0&&uh(()=>r[1].call(n))},m(S,k){be(S,e,k),ie(e,t),ie(e,n),ie(n,l),ie(n,u),ie(n,d),ie(n,a),sd(n,r[0],!0),_||(x=Tt(n,"change",r[1]),_=!0)},p(S,[k]){k&1&&sd(n,S[0])},i:Mt,o:Mt,d(S){S&&ve(e),_=!1,x()}}}function y5(r,e,t){let n;wt(r,Rm,u=>t(0,n=u));function l(){n=Cb(this),Rm.set(n)}return[n,l]}class v5 extends Ht{constructor(e){super(),Zt(this,e,y5,_5,Ut,{})}}let Kf=Tr(!0);function b5(r){let e,t;return e=new ma({props:{paint:{"fill-color":"black","fill-opacity":0},layout:{visibility:r[0]?"none":"visible"}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&1&&(u.layout={visibility:n[0]?"none":"visible"}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function w5(r){let e,t;return e=new Pi({props:{data:r[1],$$slots:{default:[b5]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,[l]){const u={};l&5&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function x5(r,e,t){let n;return wt(r,Kf,u=>t(0,n=u)),[n,{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]}}]}class S5 extends Ht{constructor(e){super(),Zt(this,e,x5,w5,Ut,{})}}const k5="/ltn/assets/help-d011708a.svg";function f1(r){let e,t;return e=new Pd({props:{$$slots:{default:[T5]},$$scope:{ctx:r}}}),e.$on("close",r[3]),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&16&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function T5(r){let e,t,n;const l=r[1].default,u=Vr(l,r,r[4],null);return{c(){e=fe("h2"),e.textContent="Help",t=Ve(),u&&u.c()},m(d,a){be(d,e,a),be(d,t,a),u&&u.m(d,a),n=!0},p(d,a){u&&u.p&&(!n||a&16)&&Gr(u,l,d,d[4],n?qr(l,d[4],a,null):Wr(d[4]),null)},i(d){n||(oe(u,d),n=!0)},o(d){de(u,d),n=!1},d(d){d&&(ve(e),ve(t)),u&&u.d(d)}}}function E5(r){let e,t,n,l,u,d,a=r[0]&&f1(r);return{c(){e=fe("button"),e.innerHTML=`Help`,t=Ve(),a&&a.c(),n=$n(),Ee(e,"class","svelte-gb6dzm")},m(_,x){be(_,e,x),be(_,t,x),a&&a.m(_,x),be(_,n,x),l=!0,u||(d=Tt(e,"click",r[2]),u=!0)},p(_,[x]){_[0]?a?(a.p(_,x),x&1&&oe(a,1)):(a=f1(_),a.c(),oe(a,1),a.m(n.parentNode,n)):a&&(yr(),de(a,1,1,()=>{a=null}),vr())},i(_){l||(oe(a),l=!0)},o(_){de(a),l=!1},d(_){_&&(ve(e),ve(t),ve(n)),a&&a.d(_),u=!1,d()}}}function M5(r,e,t){let{$$slots:n={},$$scope:l}=e,u=!1;const d=()=>t(0,u=!0),a=()=>t(0,u=!1);return r.$$set=_=>{"$$scope"in _&&t(4,l=_.$$scope)},[u,n,d,a,l]}class Ng extends Ht{constructor(e){super(),Zt(this,e,M5,E5,Ut,{})}}function C5(r){let e,t,n,l;const u=r[1].default,d=Vr(u,r,r[0],null);return{c(){e=fe("a"),d&&d.c(),Ee(e,"href","#")},m(a,_){be(a,e,_),d&&d.m(e,null),t=!0,n||(l=Tt(e,"click",bg(r[2])),n=!0)},p(a,[_]){d&&d.p&&(!t||_&1)&&Gr(d,u,a,a[0],t?qr(u,a[0],_,null):Wr(a[0]),null)},i(a){t||(oe(d,a),t=!0)},o(a){de(d,a),t=!1},d(a){a&&ve(e),d&&d.d(a),n=!1,l()}}}function I5(r,e,t){let{$$slots:n={},$$scope:l}=e;function u(d){ur.call(this,r,d)}return r.$$set=d=>{"$$scope"in d&&t(0,l=d.$$scope)},[l,n,u]}class Zr extends Ht{constructor(e){super(),Zt(this,e,I5,C5,Ut,{})}}const A5=r=>({props:r&8}),d1=r=>({props:z5(r[3])});function L5(r){let e;const t=r[1].default,n=Vr(t,r,r[2],d1);return{c(){n&&n.c()},m(l,u){n&&n.m(l,u),e=!0},p(l,u){n&&n.p&&(!e||u&12)&&Gr(n,t,l,l[2],e?qr(t,l[2],u,A5):Wr(l[2]),d1)},i(l){e||(oe(n,l),e=!0)},o(l){de(n,l),e=!1},d(l){n&&n.d(l)}}}function P5(r){let e,t;return e=new c3({props:{openOn:r[0],popupClass:"popup",$$slots:{default:[L5,({features:n})=>({3:n}),({features:n})=>n?8:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,[l]){const u={};l&1&&(u.openOn=n[0]),l&12&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function z5(r){return r?r[0].properties??{}:(console.log("A Popup with null features should be impossible"),{})}function D5(r,e,t){let{$$slots:n={},$$scope:l}=e,{openOn:u="hover"}=e;return r.$$set=d=>{"openOn"in d&&t(0,u=d.openOn),"$$scope"in d&&t(2,l=d.$$scope)},[u,n,l]}class Os extends Ht{constructor(e){super(),Zt(this,e,D5,P5,Ut,{openOn:0})}}function R5(r,e){let t=new Set(r.getStyle().layers.filter(n=>n.type=="line").map(n=>n.id));return e=="dataviz"?["Road network","Path"].filter(n=>t.has(n)):e=="hybrid"?["Path","Road","Tunnel"].filter(n=>t.has(n)):e=="streets-v2"?r.getStyle().layers.filter(n=>n["source-layer"]=="transportation"&&n.type=="line").map(n=>n.id):e=="uk-openzoomstack-light"?r.getStyle().layers.filter(n=>n["source-layer"]=="roads"&&n.type=="line").map(n=>n.id):[]}const{window:B5}=Ad;function F5(r){let e,t,n,l,u,d,a,_,x,S,k,C,P,D,N;return P=Mb(r[8][0]),{c(){e=fe("button"),e.textContent="Stop StreetView",t=Ve(),n=fe("fieldset"),l=fe("legend"),l.textContent="Source:",u=Ve(),d=fe("label"),a=fe("input"),_=rt(` Google Street View`),x=Ve(),S=fe("label"),k=fe("input"),C=rt(` - Bing Streetside`),Ee(e,"class","secondary"),Ee(a,"type","radio"),a.__value="google",ei(a,a.__value),Ee(k,"type","radio"),k.__value="bing",ei(k,k.__value),P.p(a,k)},m(z,B){be(z,e,B),be(z,t,B),be(z,n,B),ie(n,l),ie(n,u),ie(n,d),ie(d,a),a.checked=a.__value===r[0],ie(d,_),ie(n,x),ie(n,S),ie(S,k),k.checked=k.__value===r[0],ie(S,C),D||(N=[Tt(e,"click",r[3]),Tt(a,"change",r[7]),Tt(k,"change",r[9])],D=!0)},p(z,B){B&1&&(a.checked=a.__value===z[0]),B&1&&(k.checked=k.__value===z[0])},d(z){z&&(ve(e),ve(t),ve(n)),P.r(),D=!1,_n(N)}}}function O5(r){let e,t,n;return{c(){e=fe("button"),e.textContent="StreetView",Ee(e,"class","secondary")},m(l,u){be(l,e,u),t||(n=Tt(e,"click",r[2]),t=!0)},p:Mt,d(l){l&&ve(e),t=!1,n()}}}function N5(r){let e,t,n;function l(a,_){return a[1]?O5:F5}let u=l(r),d=u(r);return{c(){d.c(),e=$n()},m(a,_){d.m(a,_),be(a,e,_),t||(n=Tt(B5,"keydown",r[4]),t=!0)},p(a,[_]){u===(u=l(a))&&d?d.p(a,_):(d.d(1),d=u(a),d&&(d.c(),d.m(e.parentNode,e)))},i:Mt,o:Mt,d(a){a&&ve(e),d.d(a),t=!1,n()}}}function j5(r,e,t){let n;wt(r,Kf,N=>t(1,n=N));let{map:l}=e,{maptilerBasemap:u}=e,d="google",a=[];function _(){Rt(Kf,n=!1,n),l.on("click",S),l.getCanvas().style.cursor="crosshair";for(let N of R5(l,u))a.push([N,l.getPaintProperty(N,"line-color")]),l.setPaintProperty(N,"line-color","cyan")}function x(){Rt(Kf,n=!0,n),l.off("click",S),l.getCanvas().style.cursor="inherit";for(let[N,z]of a)l.setPaintProperty(N,"line-color",z);a=[]}ti(x);function S(N){let z=N.lngLat.lng,B=N.lngLat.lat;d=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${B},${z}&cbp=11,0,0,0,0`,"_blank"):d=="bing"&&window.open(`https://www.bing.com/maps?cp=${B}~${z}&style=x`,"_blank")}function k(N){!n&&N.key=="Escape"&&(N.stopPropagation(),x())}const C=[[]];function P(){d=this.__value,t(0,d)}function D(){d=this.__value,t(0,d)}return r.$$set=N=>{"map"in N&&t(5,l=N.map),"maptilerBasemap"in N&&t(6,u=N.maptilerBasemap)},[d,n,_,x,k,l,u,P,C,D]}class U5 extends Ht{constructor(e){super(),Zt(this,e,j5,N5,Ut,{map:5,maptilerBasemap:6})}}function Hn(r){return{id:r,beforeId:V5(r)}}function V5(r){let e=Hi(ls);if(!e){console.warn(`getBeforeId(${r}) called before map is ready. Z-ordering may be incorrect.`);return}let t,n=!1;for(let l=p1.length-1;l>=0;l--){let u=p1[l];if(u==r){n=!0;break}e.getLayer(u)&&(t=u)}if(!n)throw new Error(`Layer ID ${r} not defined in layerZorder`);return t}let im=r=>r,om=r=>r;const p1=[im(om("Background")),"neighbourhood-boundaries",im("Ferry line"),"debug-borders","debug-crosses","debug-filters","cells","interior-roads-outlines","interior-roads","compare-route","shortcuts","shortcuts-focus",om("Building"),"draw-area-lines","draw-area-preview","one-ways",om("Road labels"),im("road_label"),"animate-shortcuts","modal-filters","boundary","neighbourhood-boundary","auto-boundaries-areas","auto-boundaries-severances","freehand-line","edit-polygon-fill","edit-polygon-lines","edit-polygon-vertices"];function q5(r){let e;return{c(){e=rt("Back")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function G5(r){let e,t,n,l;return e=new Zr({props:{$$slots:{default:[q5]},$$scope:{ctx:r}}}),e.$on("click",r[2]),{c(){je(e.$$.fragment)},m(u,d){Oe(e,u,d),t=!0,n||(l=Tt(window,"keydown",r[1]),n=!0)},p(u,[d]){const a={};d&8&&(a.$$scope={dirty:d,ctx:u}),e.$set(a)},i(u){t||(oe(e.$$.fragment,u),t=!0)},o(u){de(e.$$.fragment,u),t=!1},d(u){Ne(e,u),n=!1,l()}}}function W5(r){let e=us();function t(l){l.key=="Escape"&&(l.stopPropagation(),e("click"))}return[e,t,()=>e("click")]}class Od extends Ht{constructor(e){super(),Zt(this,e,W5,G5,Ut,{})}}function Z5(r){let e,t;const n=[Hn("one-ways"),{filter:["all",["==",["get","kind"],"interior_road"],["!=",["get","direction"],"both"]]},{layout:{"icon-image":"oneway-arrow","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["==",["get","direction"],"forwards"],0,180]}},{paint:{"icon-opacity":["case",["get","direction_edited"],1,.5]}}];let l={};for(let u=0;u({}),m1=r=>({}),X5=r=>({}),g1=r=>({});function K5(r){let e,t;const n=[Hn("neighbourhood-boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let l={};for(let u=0;u{n=null}),vr())},i(l){t||(oe(n),t=!0)},o(l){de(n),t=!1},d(l){l&&ve(e),n&&n.d(l)}}}function Y5(r){let e,t,n,l,u,d,a,_,x,S,k;e=new Pi({props:{data:y1(r[3]),$$slots:{default:[K5]},$$scope:{ctx:r}}});const C=[Hn("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.8}}];let P={};for(let U=0;Ut.properties.kind=="boundary");return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]],e.geometry.coordinates[0]]}}}function eM(r,e,t){let n,l,u,{$$slots:d={},$$scope:a}=e,{gjInput:_}=e,{interactive:x=!0}=e,{onClickLine:S=(C,P)=>{}}=e;const k=C=>x&&S(C.detail.features[0],C.detail.event.lngLat);return r.$$set=C=>{"gjInput"in C&&t(4,_=C.gjInput),"interactive"in C&&t(0,x=C.interactive),"onClickLine"in C&&t(1,S=C.onClickLine),"$$scope"in C&&t(8,a=C.$$scope)},r.$$.update=()=>{r.$$.dirty&16&&t(3,n=Km(_)),r.$$.dirty&16&&t(5,l=Math.max(..._.features.map(C=>C.properties.kind=="interior_road"?C.properties.shortcuts:0))),r.$$.dirty&32&&t(2,u=kc(["interpolate-hcl",["linear"],["get","shortcuts"],0,"white",1,"#F19A93",l,"#A32015"],"blue"))},[x,S,u,n,_,l,d,k,a]}class Nd extends Ht{constructor(e){super(),Zt(this,e,eM,Q5,Ut,{gjInput:4,interactive:0,onClickLine:1})}}function tM(r){let e;return{c(){e=rt("Choose project")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function rM(r){let e;return{c(){e=rt("Pick neighbourhood")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function nM(r){let e;return{c(){e=rt("Editing")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function iM(r){let e,t,n,l,u,d,a,_,x,S,k,C,P,D;return u=new Zr({props:{$$slots:{default:[tM]},$$scope:{ctx:r}}}),u.$on("click",r[4]),_=new Zr({props:{$$slots:{default:[rM]},$$scope:{ctx:r}}}),_.$on("click",r[5]),k=new Zr({props:{$$slots:{default:[nM]},$$scope:{ctx:r}}}),k.$on("click",r[6]),{c(){e=fe("div"),t=fe("nav"),n=fe("ul"),l=fe("li"),je(u.$$.fragment),d=Ve(),a=fe("li"),je(_.$$.fragment),x=Ve(),S=fe("li"),je(k.$$.fragment),C=Ve(),P=fe("li"),P.textContent="Debug mode",Ee(t,"aria-label","breadcrumb"),Ee(e,"slot","top")},m(N,z){be(N,e,z),ie(e,t),ie(t,n),ie(n,l),Oe(u,l,null),ie(n,d),ie(n,a),Oe(_,a,null),ie(n,x),ie(n,S),Oe(k,S,null),ie(n,C),ie(n,P),D=!0},p(N,z){const B={};z&256&&(B.$$scope={dirty:z,ctx:N}),u.$set(B);const O={};z&256&&(O.$$scope={dirty:z,ctx:N}),_.$set(O);const G={};z&256&&(G.$$scope={dirty:z,ctx:N}),k.$set(G)},i(N){D||(oe(u.$$.fragment,N),oe(_.$$.fragment,N),oe(k.$$.fragment,N),D=!0)},o(N){de(u.$$.fragment,N),de(_.$$.fragment,N),de(k.$$.fragment,N),D=!1},d(N){N&&ve(e),Ne(u),Ne(_),Ne(k)}}}function oM(r){let e,t,n;return t=new Od({}),t.$on("click",r[3]),{c(){e=fe("div"),je(t.$$.fragment),Ee(e,"slot","sidebar")},m(l,u){be(l,e,u),Oe(t,e,null),n=!0},p:Mt,i(l){n||(oe(t.$$.fragment,l),n=!0)},o(l){de(t.$$.fragment,l),n=!1},d(l){l&&ve(e),Ne(t)}}}function sM(r){let e,t;return e=new zd({props:{properties:r[7]}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&128&&(u.properties=n[7]),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function aM(r){let e,t,n;return t=new Os({props:{openOn:"hover",$$slots:{default:[sM,({props:l})=>({7:l}),({props:l})=>l?128:0]},$$scope:{ctx:r}}}),{c(){e=fe("div"),je(t.$$.fragment),Ee(e,"slot","line-popup")},m(l,u){be(l,e,u),Oe(t,e,null),n=!0},p(l,u){const d={};u&384&&(d.$$scope={dirty:u,ctx:l}),t.$set(d)},i(l){n||(oe(t.$$.fragment,l),n=!0)},o(l){de(t.$$.fragment,l),n=!1},d(l){l&&ve(e),Ne(t)}}}function lM(r){let e,t;return e=new zd({props:{properties:r[7]}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&128&&(u.properties=n[7]),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function cM(r){let e,t;return e=new Os({props:{openOn:"hover",$$slots:{default:[lM,({props:n})=>({7:n}),({props:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&384&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function uM(r){let e,t;return e=new zd({props:{properties:r[7]}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&128&&(u.properties=n[7]),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function hM(r){let e,t;return e=new Os({props:{openOn:"hover",$$slots:{default:[uM,({props:n})=>({7:n}),({props:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&384&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function fM(r){let e,t,n,l;const u=[Hn("debug-borders"),{filter:["==",["get","kind"],"border_intersection"]},{paint:{"circle-radius":15,"circle-color":"green"}}];let d={$$slots:{default:[cM]},$$scope:{ctx:r}};for(let x=0;x({7:n}),({props:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&384&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function mM(r){let e,t;const n=[Hn("debug-filters"),{paint:{"circle-radius":15,"circle-color":"black"}}];let l={$$slots:{default:[pM]},$$scope:{ctx:r}};for(let u=0;ut(0,n=S)),wt(r,pr,S=>t(1,l=S)),[n,l,(S,k)=>window.open(dn(S.properties).way,"_blank"),()=>Rt(pr,l={mode:"neighbourhood"},l),()=>Rt(pr,l={mode:"title"},l),()=>Rt(pr,l={mode:"network"},l),()=>Rt(pr,l={mode:"neighbourhood"},l)]}class vM extends Ht{constructor(e){super(),Zt(this,e,yM,_M,Ut,{})}}function v1(r,e,t){const n=r.slice();return n[7]=e[t][0],n[8]=e[t][1],n[9]=e[t][2],n}function b1(r){let e,t,n,l,u,d,a=r[8]+"",_,x,S,k,C;function P(){return r[3](r[7])}return{c(){e=fe("button"),t=fe("img"),l=Ve(),u=fe("br"),d=Ve(),_=rt(a),x=Ve(),En(t.src,n=`/ltn//filters/${r[7]}_icon.gif`)||Ee(t,"src",n),Ee(t,"width","80"),Ee(t,"alt",r[8]),Ee(e,"class","outline"),fn(e,"width","100%"),e.disabled=S=r[0]==r[7]},m(D,N){be(D,e,N),ie(e,t),ie(e,l),ie(e,u),ie(e,d),ie(e,_),ie(e,x),k||(C=Tt(e,"click",P),k=!0)},p(D,N){r=D,N&1&&S!==(S=r[0]==r[7])&&(e.disabled=S)},d(D){D&&ve(e),k=!1,C()}}}function bM(r){let e,t,n,l,u,d,a,_,x,S,k,C,P=r[1][2]+"",D,N,z,B,O,G,U=Jn(r[2]),K=[];for(let X=0;X({6:n}),({dialog:n})=>n?64:0]},$$scope:{ctx:r}}}),e.$on("close",r[5]),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,[l]){const u={};l&4163&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function xM(r,e,t){let n,l;wt(r,Om,x=>t(0,l=x));let u=[["walk_cycle_only","Walking/cycling only","A physical barrier that only allows people walking, cycling, and rolling to pass. Often planters or bollards. Larger vehicles cannot enter."],["no_entry","No entry","An alternative sign to indicate vehicles are not allowed to enter the street. Only people walking, cycling, and rolling may pass through."],["bus_gate","Bus gate","A bus gate sign and traffic cameras are installed to allow buses, pedestrians, and cyclists to pass. There is no physical barrier."],["school_street","School street","A closure during school hours only. The barrier usually allows teachers and staff to access the school."]];const d=x=>Rt(Om,l=x,l),a=x=>dn(x).close();function _(x){ur.call(this,r,x)}return r.$$.update=()=>{r.$$.dirty&1&&t(1,n=u.find(x=>x[0]==l))},[l,n,u,d,a,_]}class SM extends Ht{constructor(e){super(),Zt(this,e,xM,wM,Ut,{})}}function w1(r){let e,t;return e=new Pi({props:{data:r[0],$$slots:{default:[kM]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&1&&(u.data=n[0]),l&64&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function kM(r){let e,t;const n=[Hn("freehand-line"),{paint:{"line-width":5,"line-color":"red"}}];let l={};for(let u=0;u{n=null}),vr())},i(l){t||(oe(n),t=!0)},o(l){de(n),t=!1},d(l){l&&ve(e),n&&n.d(l)}}}function EM(r,e,t){let{map:n}=e,l=null;const u=us();n.on("dragstart",d),n.on("mousemove",a),n.on("mouseup",_),ti(()=>{n.dragPan.enable(),n.off("dragstart",d),n.off("mousemove",a),n.off("mouseup",_)});function d(){n.dragPan.disable(),t(0,l={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}function a(x){l&&(l.geometry.coordinates.push(x.lngLat.toArray()),t(0,l))}function _(){l&&(u("done",l),t(0,l=null))}return r.$$set=x=>{"map"in x&&t(1,n=x.map)},[l,n]}class MM extends Ht{constructor(e){super(),Zt(this,e,EM,TM,Ut,{map:1})}}function CM(r){let e;const t=r[3].default,n=Vr(t,r,r[5],null);return{c(){n&&n.c()},m(l,u){n&&n.m(l,u),e=!0},p(l,u){n&&n.p&&(!e||u&32)&&Gr(n,t,l,l[5],e?qr(t,l[5],u,null):Wr(l[5]),null)},i(l){e||(oe(n,l),e=!0)},o(l){de(n,l),e=!1},d(l){n&&n.d(l)}}}function IM(r){let e,t;const n=[Hn("modal-filters"),{layout:{"icon-image":["get","filter_kind"],"icon-rotate":["get","angle"],"icon-allow-overlap":!0,"icon-size":.1}},{paint:{"icon-opacity":["case",["get","edited"],1,.5]}}];let l={$$slots:{default:[CM]},$$scope:{ctx:r}};for(let u=0;ut(1,l=x)),wt(r,ia,x=>t(2,u=x));let{$$slots:d={},$$scope:a}=e;function _(x){ur.call(this,r,x)}return r.$$set=x=>{"$$scope"in x&&t(5,a=x.$$scope)},r.$$.update=()=>{r.$$.dirty&6&&t(0,n=u>0?JSON.parse(l.renderModalFilters()):null)},[n,l,u,d,_,a]}class jd extends Ht{constructor(e){super(),Zt(this,e,LM,AM,Ut,{})}}var x1=Object.prototype.toString,Sw=function(e){var t=x1.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&x1.call(e.callee)==="[object Function]"),n},sm,S1;function PM(){if(S1)return sm;S1=1;var r;if(!Object.keys){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Sw,l=Object.prototype.propertyIsEnumerable,u=!l.call({toString:null},"toString"),d=l.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=function(C){var P=C.constructor;return P&&P.prototype===C},x={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},S=function(){if(typeof window>"u")return!1;for(var C in window)try{if(!x["$"+C]&&e.call(window,C)&&window[C]!==null&&typeof window[C]=="object")try{_(window[C])}catch{return!0}}catch{return!0}return!1}(),k=function(C){if(typeof window>"u"||!S)return _(C);try{return _(C)}catch{return!1}};r=function(P){var D=P!==null&&typeof P=="object",N=t.call(P)==="[object Function]",z=n(P),B=D&&t.call(P)==="[object String]",O=[];if(!D&&!N&&!z)throw new TypeError("Object.keys called on a non-object");var G=d&&N;if(B&&P.length>0&&!e.call(P,0))for(var U=0;U0)for(var K=0;K"u"||!ci?Mr:ci(Uint8Array),el={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Mr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Mr:ArrayBuffer,"%ArrayIteratorPrototype%":cc&&ci?ci([][Symbol.iterator]()):Mr,"%AsyncFromSyncIteratorPrototype%":Mr,"%AsyncFunction%":mc,"%AsyncGenerator%":mc,"%AsyncGeneratorFunction%":mc,"%AsyncIteratorPrototype%":mc,"%Atomics%":typeof Atomics>"u"?Mr:Atomics,"%BigInt%":typeof BigInt>"u"?Mr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Mr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Mr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Mr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":eC,"%eval%":eval,"%EvalError%":tC,"%Float32Array%":typeof Float32Array>"u"?Mr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Mr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Mr:FinalizationRegistry,"%Function%":Ew,"%GeneratorFunction%":mc,"%Int8Array%":typeof Int8Array>"u"?Mr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Mr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Mr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":cc&&ci?ci(ci([][Symbol.iterator]())):Mr,"%JSON%":typeof JSON=="object"?JSON:Mr,"%Map%":typeof Map>"u"?Mr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!cc||!ci?Mr:ci(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Mr:Promise,"%Proxy%":typeof Proxy>"u"?Mr:Proxy,"%RangeError%":rC,"%ReferenceError%":nC,"%Reflect%":typeof Reflect>"u"?Mr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Mr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!cc||!ci?Mr:ci(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Mr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":cc&&ci?ci(""[Symbol.iterator]()):Mr,"%Symbol%":cc?Symbol:Mr,"%SyntaxError%":Tc,"%ThrowTypeError%":oC,"%TypedArray%":aC,"%TypeError%":bc,"%Uint8Array%":typeof Uint8Array>"u"?Mr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Mr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Mr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Mr:Uint32Array,"%URIError%":iC,"%WeakMap%":typeof WeakMap>"u"?Mr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Mr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Mr:WeakSet};if(ci)try{null.error}catch(r){var lC=ci(ci(r));el["%Error.prototype%"]=lC}var cC=function r(e){var t;if(e==="%AsyncFunction%")t=lm("async function () {}");else if(e==="%GeneratorFunction%")t=lm("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=lm("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var l=r("%AsyncGenerator%");l&&ci&&(t=ci(l.prototype))}return el[e]=t,t},C1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Eh=Vg,gd=Tw,uC=Eh.call(Function.call,Array.prototype.concat),hC=Eh.call(Function.apply,Array.prototype.splice),I1=Eh.call(Function.call,String.prototype.replace),_d=Eh.call(Function.call,String.prototype.slice),fC=Eh.call(Function.call,RegExp.prototype.exec),dC=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pC=/\\(\\)?/g,mC=function(e){var t=_d(e,0,1),n=_d(e,-1);if(t==="%"&&n!=="%")throw new Tc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Tc("invalid intrinsic syntax, expected opening `%`");var l=[];return I1(e,dC,function(u,d,a,_){l[l.length]=a?I1(_,pC,"$1"):d||u}),l},gC=function(e,t){var n=e,l;if(gd(C1,n)&&(l=C1[n],n="%"+l[0]+"%"),gd(el,n)){var u=el[n];if(u===mc&&(u=cC(n)),typeof u>"u"&&!t)throw new bc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:l,name:n,value:u}}throw new Tc("intrinsic "+e+" does not exist!")},hs=function(e,t){if(typeof e!="string"||e.length===0)throw new bc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new bc('"allowMissing" argument must be a boolean');if(fC(/^%?[^%]*%?$/,e)===null)throw new Tc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=mC(e),l=n.length>0?n[0]:"",u=gC("%"+l+"%",t),d=u.name,a=u.value,_=!1,x=u.alias;x&&(l=x[0],hC(n,uC([0,1],x)));for(var S=1,k=!0;S=n.length){var N=Qa(a,C);k=!!N,k&&"get"in N&&!("originalValue"in N.get)?a=N.get:a=a[C]}else k=gd(a,C),a=a[C];k&&!_&&(el[d]=a)}}return a},um,A1;function qg(){if(A1)return um;A1=1;var r=hs,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return um=e,um}var _C=hs,Yf=_C("%Object.getOwnPropertyDescriptor%",!0);if(Yf)try{Yf([],"length")}catch{Yf=null}var Gg=Yf,L1=qg(),yC=kw,uc=ba,P1=Gg,Wg=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new uc("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new uc("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new uc("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new uc("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new uc("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new uc("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,_=!!P1&&P1(e,t);if(L1)L1(e,t,{configurable:d===null&&_?_.configurable:!d,enumerable:l===null&&_?_.enumerable:!l,value:n,writable:u===null&&_?_.writable:!u});else if(a||!l&&!u&&!d)e[t]=n;else throw new yC("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Jm=qg(),Mw=function(){return!!Jm};Mw.hasArrayLengthDefineBug=function(){if(!Jm)return null;try{return Jm([],"length",{value:1}).length!==1}catch{return!0}};var Zg=Mw,vC=jg,bC=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",wC=Object.prototype.toString,xC=Array.prototype.concat,z1=Wg,SC=function(r){return typeof r=="function"&&wC.call(r)==="[object Function]"},Cw=Zg(),kC=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!SC(n)||!n())return}Cw?z1(r,e,t,!0):z1(r,e,t)},Iw=function(r,e){var t=arguments.length>2?arguments[2]:{},n=vC(e);bC&&(n=xC.call(n,Object.getOwnPropertySymbols(e)));for(var l=0;l4294967295||MC(t)!==t)throw new B1("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],l=!0,u=!0;if("length"in e&&R1){var d=R1(e,"length");d&&!d.configurable&&(l=!1),d&&!d.writable&&(u=!1)}return(l||u||!n)&&(EC?D1(e,"length",t,!0,!0):D1(e,"length",t)),e};(function(r){var e=Vg,t=hs,n=CC,l=ba,u=t("%Function.prototype.apply%"),d=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(d,u),_=qg(),x=t("%Math.max%");r.exports=function(C){if(typeof C!="function")throw new l("a function is required");var P=a(e,d,arguments);return n(P,1+x(0,C.length-(arguments.length-1)),!0)};var S=function(){return a(e,u,arguments)};_?_(r.exports,"apply",{value:S}):r.exports.apply=S})(Aw);var Rc=Aw.exports,Lw=hs,Pw=Rc,IC=Pw(Lw("String.prototype.indexOf")),Ro=function(e,t){var n=Lw(e,!!t);return typeof n=="function"&&IC(e,".prototype.")>-1?Pw(n):n},AC=jg,zw=Ud(),Dw=Ro,F1=Object,LC=Dw("Array.prototype.push"),O1=Dw("Object.prototype.propertyIsEnumerable"),PC=zw?Object.getOwnPropertySymbols:null,Rw=function(e,t){if(e==null)throw new TypeError("target must be an object");var n=F1(e);if(arguments.length===1)return n;for(var l=1;l2&&!!arguments[2];return(!n||HC)&&(ZC?N1(e,"name",t,!0,!0):N1(e,"name",t)),e},KC=XC,JC=ba,YC=Object,Nw=KC(function(){if(this==null||this!==YC(this))throw new JC("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),QC=Nw,eI=il.supportsDescriptors,tI=Object.getOwnPropertyDescriptor,jw=function(){if(eI&&/a/mig.flags==="gim"){var e=tI(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var t="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(n,"sticky",{get:function(){t+="y"}}),t==="dy")return e.get}}return QC},rI=il.supportsDescriptors,nI=jw,iI=Object.getOwnPropertyDescriptor,oI=Object.defineProperty,sI=TypeError,j1=Object.getPrototypeOf,aI=/a/,lI=function(){if(!rI||!j1)throw new sI("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=nI(),t=j1(aI),n=iI(t,"flags");return(!n||n.get!==e)&&oI(t,"flags",{configurable:!0,enumerable:!1,get:e}),e},cI=il,uI=Rc,hI=Nw,Uw=jw,fI=lI,Vw=uI(Uw());cI(Vw,{getPolyfill:Uw,implementation:hI,shim:fI});var dI=Vw,Qf={exports:{}},pI=Ud,ol=function(){return pI()&&!!Symbol.toStringTag},mI=ol(),gI=Ro,Ym=gI("Object.prototype.toString"),Vd=function(e){return mI&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ym(e)==="[object Arguments]"},qw=function(e){return Vd(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ym(e)!=="[object Array]"&&Ym(e.callee)==="[object Function]"},_I=function(){return Vd(arguments)}();Vd.isLegacyArguments=qw;var Gw=_I?Vd:qw;const yI={},vI=Object.freeze(Object.defineProperty({__proto__:null,default:yI},Symbol.toStringTag,{value:"Module"})),bI=Dd(vI);var Hg=typeof Map=="function"&&Map.prototype,fm=Object.getOwnPropertyDescriptor&&Hg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,yd=Hg&&fm&&typeof fm.get=="function"?fm.get:null,U1=Hg&&Map.prototype.forEach,$g=typeof Set=="function"&&Set.prototype,dm=Object.getOwnPropertyDescriptor&&$g?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,vd=$g&&dm&&typeof dm.get=="function"?dm.get:null,V1=$g&&Set.prototype.forEach,wI=typeof WeakMap=="function"&&WeakMap.prototype,ah=wI?WeakMap.prototype.has:null,xI=typeof WeakSet=="function"&&WeakSet.prototype,lh=xI?WeakSet.prototype.has:null,SI=typeof WeakRef=="function"&&WeakRef.prototype,q1=SI?WeakRef.prototype.deref:null,kI=Boolean.prototype.valueOf,TI=Object.prototype.toString,EI=Function.prototype.toString,MI=String.prototype.match,Xg=String.prototype.slice,ca=String.prototype.replace,CI=String.prototype.toUpperCase,G1=String.prototype.toLowerCase,Ww=RegExp.prototype.test,W1=Array.prototype.concat,as=Array.prototype.join,II=Array.prototype.slice,Z1=Math.floor,Qm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pm=Object.getOwnPropertySymbols,eg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Di=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ec||"symbol")?Symbol.toStringTag:null,Zw=Object.prototype.propertyIsEnumerable,H1=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function $1(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Ww.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Z1(-r):Z1(r);if(n!==r){var l=String(n),u=Xg.call(e,l.length+1);return ca.call(l,t,"$&_")+"."+ca.call(ca.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ca.call(e,t,"$&_")}var tg=bI,X1=tg.custom,K1=$w(X1)?X1:null,AI=function r(e,t,n,l){var u=t||{};if(oa(u,"quoteStyle")&&u.quoteStyle!=="single"&&u.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(oa(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=oa(u,"customInspect")?u.customInspect:!0;if(typeof d!="boolean"&&d!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(oa(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(oa(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=u.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Kw(e,u);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var _=String(e);return a?$1(e,_):_}if(typeof e=="bigint"){var x=String(e)+"n";return a?$1(e,x):x}var S=typeof u.depth>"u"?5:u.depth;if(typeof n>"u"&&(n=0),n>=S&&S>0&&typeof e=="object")return rg(e)?"[Array]":"[Object]";var k=$I(u,n);if(typeof l>"u")l=[];else if(Xw(l,e)>=0)return"[Circular]";function C(Ze,Me,ft){if(Me&&(l=II.call(l),l.push(Me)),ft){var Ct={depth:u.depth};return oa(u,"quoteStyle")&&(Ct.quoteStyle=u.quoteStyle),r(Ze,Ct,n+1,l)}return r(Ze,u,n+1,l)}if(typeof e=="function"&&!J1(e)){var P=NI(e),D=Of(e,C);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(D.length>0?" { "+as.call(D,", ")+" }":"")}if($w(e)){var N=Ec?ca.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):eg.call(e);return typeof e=="object"&&!Ec?qu(N):N}if(WI(e)){for(var z="<"+G1.call(String(e.nodeName)),B=e.attributes||[],O=0;O",z}if(rg(e)){if(e.length===0)return"[]";var G=Of(e,C);return k&&!HI(G)?"["+ng(G,k)+"]":"[ "+as.call(G,", ")+" ]"}if(zI(e)){var U=Of(e,C);return!("cause"in Error.prototype)&&"cause"in e&&!Zw.call(e,"cause")?"{ ["+String(e)+"] "+as.call(W1.call("[cause]: "+C(e.cause),U),", ")+" }":U.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+as.call(U,", ")+" }"}if(typeof e=="object"&&d){if(K1&&typeof e[K1]=="function"&&tg)return tg(e,{depth:S-n});if(d!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(jI(e)){var K=[];return U1&&U1.call(e,function(Ze,Me){K.push(C(Me,e,!0)+" => "+C(Ze,e))}),Y1("Map",yd.call(e),K,k)}if(qI(e)){var me=[];return V1&&V1.call(e,function(Ze){me.push(C(Ze,e))}),Y1("Set",vd.call(e),me,k)}if(UI(e))return mm("WeakMap");if(GI(e))return mm("WeakSet");if(VI(e))return mm("WeakRef");if(RI(e))return qu(C(Number(e)));if(FI(e))return qu(C(Qm.call(e)));if(BI(e))return qu(kI.call(e));if(DI(e))return qu(C(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===xh)return"{ [object globalThis] }";if(!PI(e)&&!J1(e)){var X=Of(e,C),Y=H1?H1(e)===Object.prototype:e instanceof Object||e.constructor===Object,_e=e instanceof Object?"":"null prototype",ze=!Y&&Di&&Object(e)===e&&Di in e?Xg.call(wa(e),8,-1):_e?"Object":"",re=Y||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ce=re+(ze||_e?"["+as.call(W1.call([],ze||[],_e||[]),": ")+"] ":"");return X.length===0?ce+"{}":k?ce+"{"+ng(X,k)+"}":ce+"{ "+as.call(X,", ")+" }"}return String(e)};function Hw(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function LI(r){return ca.call(String(r),/"/g,""")}function rg(r){return wa(r)==="[object Array]"&&(!Di||!(typeof r=="object"&&Di in r))}function PI(r){return wa(r)==="[object Date]"&&(!Di||!(typeof r=="object"&&Di in r))}function J1(r){return wa(r)==="[object RegExp]"&&(!Di||!(typeof r=="object"&&Di in r))}function zI(r){return wa(r)==="[object Error]"&&(!Di||!(typeof r=="object"&&Di in r))}function DI(r){return wa(r)==="[object String]"&&(!Di||!(typeof r=="object"&&Di in r))}function RI(r){return wa(r)==="[object Number]"&&(!Di||!(typeof r=="object"&&Di in r))}function BI(r){return wa(r)==="[object Boolean]"&&(!Di||!(typeof r=="object"&&Di in r))}function $w(r){if(Ec)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!eg)return!1;try{return eg.call(r),!0}catch{}return!1}function FI(r){if(!r||typeof r!="object"||!Qm)return!1;try{return Qm.call(r),!0}catch{}return!1}var OI=Object.prototype.hasOwnProperty||function(r){return r in this};function oa(r,e){return OI.call(r,e)}function wa(r){return TI.call(r)}function NI(r){if(r.name)return r.name;var e=MI.call(EI.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Xw(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Kw(Xg.call(r,0,e.maxStringLength),e)+n}var l=ca.call(ca.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ZI);return Hw(l,"single",e)}function ZI(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+CI.call(e.toString(16))}function qu(r){return"Object("+r+")"}function mm(r){return r+" { ? }"}function Y1(r,e,t,n){var l=n?ng(t,n):as.call(t,", ");return r+" ("+e+") {"+l+"}"}function HI(r){for(var e=0;et(1,n=N));let{map:l}=e,{maptilerBasemap:u}=e,d="google",a=[];function _(){Rt(Kf,n=!1,n),l.on("click",S),l.getCanvas().style.cursor="crosshair";for(let N of R5(l,u))a.push([N,l.getPaintProperty(N,"line-color")]),l.setPaintProperty(N,"line-color","cyan")}function x(){Rt(Kf,n=!0,n),l.off("click",S),l.getCanvas().style.cursor="inherit";for(let[N,z]of a)l.setPaintProperty(N,"line-color",z);a=[]}ti(x);function S(N){let z=N.lngLat.lng,B=N.lngLat.lat;d=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${B},${z}&cbp=11,0,0,0,0`,"_blank"):d=="bing"&&window.open(`https://www.bing.com/maps?cp=${B}~${z}&style=x`,"_blank")}function k(N){!n&&N.key=="Escape"&&(N.stopPropagation(),x())}const C=[[]];function P(){d=this.__value,t(0,d)}function D(){d=this.__value,t(0,d)}return r.$$set=N=>{"map"in N&&t(5,l=N.map),"maptilerBasemap"in N&&t(6,u=N.maptilerBasemap)},[d,n,_,x,k,l,u,P,C,D]}class U5 extends Ht{constructor(e){super(),Zt(this,e,j5,N5,Ut,{map:5,maptilerBasemap:6})}}function Hn(r){return{id:r,beforeId:V5(r)}}function V5(r){let e=Hi(ls);if(!e){console.warn(`getBeforeId(${r}) called before map is ready. Z-ordering may be incorrect.`);return}let t,n=!1;for(let l=p1.length-1;l>=0;l--){let u=p1[l];if(u==r){n=!0;break}e.getLayer(u)&&(t=u)}if(!n)throw new Error(`Layer ID ${r} not defined in layerZorder`);return t}let im=r=>r,om=r=>r;const p1=[im(om("Background")),"neighbourhood-boundaries",im("Ferry line"),"debug-borders","debug-crosses","debug-filters","cells","interior-roads-outlines","interior-roads","compare-route","shortcuts","shortcuts-focus",om("Building"),"draw-area-lines","draw-area-preview","one-ways",om("Road labels"),im("road_label"),"animate-shortcuts","modal-filters","boundary","neighbourhood-boundary","auto-boundaries-areas","auto-boundaries-severances","freehand-line","edit-polygon-fill","edit-polygon-lines","edit-polygon-vertices"];function q5(r){let e;return{c(){e=rt("Back")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function G5(r){let e,t,n,l;return e=new Zr({props:{$$slots:{default:[q5]},$$scope:{ctx:r}}}),e.$on("click",r[2]),{c(){je(e.$$.fragment)},m(u,d){Oe(e,u,d),t=!0,n||(l=Tt(window,"keydown",r[1]),n=!0)},p(u,[d]){const a={};d&8&&(a.$$scope={dirty:d,ctx:u}),e.$set(a)},i(u){t||(oe(e.$$.fragment,u),t=!0)},o(u){de(e.$$.fragment,u),t=!1},d(u){Ne(e,u),n=!1,l()}}}function W5(r){let e=us();function t(l){l.key=="Escape"&&(l.stopPropagation(),e("click"))}return[e,t,()=>e("click")]}class Od extends Ht{constructor(e){super(),Zt(this,e,W5,G5,Ut,{})}}function Z5(r){let e,t;const n=[Hn("one-ways"),{filter:["all",["==",["get","kind"],"interior_road"],["!=",["get","direction"],"both"]]},{layout:{"icon-image":"oneway-arrow","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["==",["get","direction"],"forwards"],0,180]}},{paint:{"icon-opacity":["case",["get","direction_edited"],1,.5]}}];let l={};for(let u=0;u({}),m1=r=>({}),X5=r=>({}),g1=r=>({});function K5(r){let e,t;const n=[Hn("neighbourhood-boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let l={};for(let u=0;u{n=null}),vr())},i(l){t||(oe(n),t=!0)},o(l){de(n),t=!1},d(l){l&&ve(e),n&&n.d(l)}}}function Y5(r){let e,t,n,l,u,d,a,_,x,S,k;e=new Pi({props:{data:y1(r[3]),$$slots:{default:[K5]},$$scope:{ctx:r}}});const C=[Hn("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.8}}];let P={};for(let U=0;Ut.properties.kind=="boundary");return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]],e.geometry.coordinates[0]]}}}function eM(r,e,t){let n,l,u,{$$slots:d={},$$scope:a}=e,{gjInput:_}=e,{interactive:x=!0}=e,{onClickLine:S=(C,P)=>{}}=e;const k=C=>x&&S(C.detail.features[0],C.detail.event.lngLat);return r.$$set=C=>{"gjInput"in C&&t(4,_=C.gjInput),"interactive"in C&&t(0,x=C.interactive),"onClickLine"in C&&t(1,S=C.onClickLine),"$$scope"in C&&t(8,a=C.$$scope)},r.$$.update=()=>{r.$$.dirty&16&&t(3,n=Km(_)),r.$$.dirty&16&&t(5,l=Math.max(..._.features.map(C=>C.properties.kind=="interior_road"?C.properties.shortcuts:0))),r.$$.dirty&32&&t(2,u=kc(["interpolate-hcl",["linear"],["get","shortcuts"],0,"white",1,"#F19A93",l,"#A32015"],"blue"))},[x,S,u,n,_,l,d,k,a]}class Nd extends Ht{constructor(e){super(),Zt(this,e,eM,Q5,Ut,{gjInput:4,interactive:0,onClickLine:1})}}function tM(r){let e;return{c(){e=rt("Choose project")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function rM(r){let e;return{c(){e=rt("Pick neighbourhood")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function nM(r){let e;return{c(){e=rt("Editing")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function iM(r){let e,t,n,l,u,d,a,_,x,S,k,C,P,D;return u=new Zr({props:{$$slots:{default:[tM]},$$scope:{ctx:r}}}),u.$on("click",r[4]),_=new Zr({props:{$$slots:{default:[rM]},$$scope:{ctx:r}}}),_.$on("click",r[5]),k=new Zr({props:{$$slots:{default:[nM]},$$scope:{ctx:r}}}),k.$on("click",r[6]),{c(){e=fe("div"),t=fe("nav"),n=fe("ul"),l=fe("li"),je(u.$$.fragment),d=Ve(),a=fe("li"),je(_.$$.fragment),x=Ve(),S=fe("li"),je(k.$$.fragment),C=Ve(),P=fe("li"),P.textContent="Debug mode",Ee(t,"aria-label","breadcrumb"),Ee(e,"slot","top")},m(N,z){be(N,e,z),ie(e,t),ie(t,n),ie(n,l),Oe(u,l,null),ie(n,d),ie(n,a),Oe(_,a,null),ie(n,x),ie(n,S),Oe(k,S,null),ie(n,C),ie(n,P),D=!0},p(N,z){const B={};z&256&&(B.$$scope={dirty:z,ctx:N}),u.$set(B);const O={};z&256&&(O.$$scope={dirty:z,ctx:N}),_.$set(O);const G={};z&256&&(G.$$scope={dirty:z,ctx:N}),k.$set(G)},i(N){D||(oe(u.$$.fragment,N),oe(_.$$.fragment,N),oe(k.$$.fragment,N),D=!0)},o(N){de(u.$$.fragment,N),de(_.$$.fragment,N),de(k.$$.fragment,N),D=!1},d(N){N&&ve(e),Ne(u),Ne(_),Ne(k)}}}function oM(r){let e,t,n;return t=new Od({}),t.$on("click",r[3]),{c(){e=fe("div"),je(t.$$.fragment),Ee(e,"slot","sidebar")},m(l,u){be(l,e,u),Oe(t,e,null),n=!0},p:Mt,i(l){n||(oe(t.$$.fragment,l),n=!0)},o(l){de(t.$$.fragment,l),n=!1},d(l){l&&ve(e),Ne(t)}}}function sM(r){let e,t;return e=new zd({props:{properties:r[7]}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&128&&(u.properties=n[7]),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function aM(r){let e,t,n;return t=new Os({props:{openOn:"hover",$$slots:{default:[sM,({props:l})=>({7:l}),({props:l})=>l?128:0]},$$scope:{ctx:r}}}),{c(){e=fe("div"),je(t.$$.fragment),Ee(e,"slot","line-popup")},m(l,u){be(l,e,u),Oe(t,e,null),n=!0},p(l,u){const d={};u&384&&(d.$$scope={dirty:u,ctx:l}),t.$set(d)},i(l){n||(oe(t.$$.fragment,l),n=!0)},o(l){de(t.$$.fragment,l),n=!1},d(l){l&&ve(e),Ne(t)}}}function lM(r){let e,t;return e=new zd({props:{properties:r[7]}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&128&&(u.properties=n[7]),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function cM(r){let e,t;return e=new Os({props:{openOn:"hover",$$slots:{default:[lM,({props:n})=>({7:n}),({props:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&384&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function uM(r){let e,t;return e=new zd({props:{properties:r[7]}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&128&&(u.properties=n[7]),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function hM(r){let e,t;return e=new Os({props:{openOn:"hover",$$slots:{default:[uM,({props:n})=>({7:n}),({props:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&384&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function fM(r){let e,t,n,l;const u=[Hn("debug-borders"),{filter:["==",["get","kind"],"border_intersection"]},{paint:{"circle-radius":15,"circle-color":"green"}}];let d={$$slots:{default:[cM]},$$scope:{ctx:r}};for(let x=0;x({7:n}),({props:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&384&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function mM(r){let e,t;const n=[Hn("debug-filters"),{paint:{"circle-radius":15,"circle-color":"black"}}];let l={$$slots:{default:[pM]},$$scope:{ctx:r}};for(let u=0;ut(0,n=S)),wt(r,pr,S=>t(1,l=S)),[n,l,(S,k)=>window.open(dn(S.properties).way,"_blank"),()=>Rt(pr,l={mode:"neighbourhood"},l),()=>Rt(pr,l={mode:"title"},l),()=>Rt(pr,l={mode:"network"},l),()=>Rt(pr,l={mode:"neighbourhood"},l)]}class vM extends Ht{constructor(e){super(),Zt(this,e,yM,_M,Ut,{})}}function v1(r,e,t){const n=r.slice();return n[7]=e[t][0],n[8]=e[t][1],n[9]=e[t][2],n}function b1(r){let e,t,n,l,u,d,a=r[8]+"",_,x,S,k,C;function P(){return r[3](r[7])}return{c(){e=fe("button"),t=fe("img"),l=Ve(),u=fe("br"),d=Ve(),_=rt(a),x=Ve(),En(t.src,n=`/ltn//filters/${r[7]}_icon.gif`)||Ee(t,"src",n),Ee(t,"width","80"),Ee(t,"alt",r[8]),Ee(e,"class","outline"),fn(e,"width","100%"),e.disabled=S=r[0]==r[7]},m(D,N){be(D,e,N),ie(e,t),ie(e,l),ie(e,u),ie(e,d),ie(e,_),ie(e,x),k||(C=Tt(e,"click",P),k=!0)},p(D,N){r=D,N&1&&S!==(S=r[0]==r[7])&&(e.disabled=S)},d(D){D&&ve(e),k=!1,C()}}}function bM(r){let e,t,n,l,u,d,a,_,x,S,k,C,P=r[1][2]+"",D,N,z,B,O,G,U=Jn(r[2]),K=[];for(let X=0;X({6:n}),({dialog:n})=>n?64:0]},$$scope:{ctx:r}}}),e.$on("close",r[5]),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,[l]){const u={};l&4163&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function xM(r,e,t){let n,l;wt(r,Om,x=>t(0,l=x));let u=[["walk_cycle_only","Walking/cycling only","A physical barrier that only allows people walking, cycling, and rolling to pass. Often planters or bollards. Larger vehicles cannot enter."],["no_entry","No entry","An alternative sign to indicate vehicles are not allowed to enter the street. Only people walking, cycling, and rolling may pass through."],["bus_gate","Bus gate","A bus gate sign and traffic cameras are installed to allow buses, pedestrians, and cyclists to pass. There is no physical barrier."],["school_street","School street","A closure during school hours only. The barrier usually allows teachers and staff to access the school."]];const d=x=>Rt(Om,l=x,l),a=x=>dn(x).close();function _(x){ur.call(this,r,x)}return r.$$.update=()=>{r.$$.dirty&1&&t(1,n=u.find(x=>x[0]==l))},[l,n,u,d,a,_]}class SM extends Ht{constructor(e){super(),Zt(this,e,xM,wM,Ut,{})}}function w1(r){let e,t;return e=new Pi({props:{data:r[0],$$slots:{default:[kM]},$$scope:{ctx:r}}}),{c(){je(e.$$.fragment)},m(n,l){Oe(e,n,l),t=!0},p(n,l){const u={};l&1&&(u.data=n[0]),l&64&&(u.$$scope={dirty:l,ctx:n}),e.$set(u)},i(n){t||(oe(e.$$.fragment,n),t=!0)},o(n){de(e.$$.fragment,n),t=!1},d(n){Ne(e,n)}}}function kM(r){let e,t;const n=[Hn("freehand-line"),{paint:{"line-width":5,"line-color":"red"}}];let l={};for(let u=0;u{n=null}),vr())},i(l){t||(oe(n),t=!0)},o(l){de(n),t=!1},d(l){l&&ve(e),n&&n.d(l)}}}function EM(r,e,t){let{map:n}=e,l=null;const u=us();n.on("dragstart",d),n.on("mousemove",a),n.on("mouseup",_),ti(()=>{n.dragPan.enable(),n.off("dragstart",d),n.off("mousemove",a),n.off("mouseup",_)});function d(){n.dragPan.disable(),t(0,l={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}function a(x){l&&(l.geometry.coordinates.push(x.lngLat.toArray()),t(0,l))}function _(){l&&(u("done",l),t(0,l=null))}return r.$$set=x=>{"map"in x&&t(1,n=x.map)},[l,n]}class MM extends Ht{constructor(e){super(),Zt(this,e,EM,TM,Ut,{map:1})}}function CM(r){let e;const t=r[3].default,n=Vr(t,r,r[5],null);return{c(){n&&n.c()},m(l,u){n&&n.m(l,u),e=!0},p(l,u){n&&n.p&&(!e||u&32)&&Gr(n,t,l,l[5],e?qr(t,l[5],u,null):Wr(l[5]),null)},i(l){e||(oe(n,l),e=!0)},o(l){de(n,l),e=!1},d(l){n&&n.d(l)}}}function IM(r){let e,t;const n=[Hn("modal-filters"),{layout:{"icon-image":["get","filter_kind"],"icon-rotate":["get","angle"],"icon-allow-overlap":!0,"icon-size":.1}},{paint:{"icon-opacity":["case",["get","edited"],1,.5]}}];let l={$$slots:{default:[CM]},$$scope:{ctx:r}};for(let u=0;ut(1,l=x)),wt(r,ia,x=>t(2,u=x));let{$$slots:d={},$$scope:a}=e;function _(x){ur.call(this,r,x)}return r.$$set=x=>{"$$scope"in x&&t(5,a=x.$$scope)},r.$$.update=()=>{r.$$.dirty&6&&t(0,n=u>0?JSON.parse(l.renderModalFilters()):null)},[n,l,u,d,_,a]}class jd extends Ht{constructor(e){super(),Zt(this,e,LM,AM,Ut,{})}}var x1=Object.prototype.toString,Sw=function(e){var t=x1.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&x1.call(e.callee)==="[object Function]"),n},sm,S1;function PM(){if(S1)return sm;S1=1;var r;if(!Object.keys){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Sw,l=Object.prototype.propertyIsEnumerable,u=!l.call({toString:null},"toString"),d=l.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=function(C){var P=C.constructor;return P&&P.prototype===C},x={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},S=function(){if(typeof window>"u")return!1;for(var C in window)try{if(!x["$"+C]&&e.call(window,C)&&window[C]!==null&&typeof window[C]=="object")try{_(window[C])}catch{return!0}}catch{return!0}return!1}(),k=function(C){if(typeof window>"u"||!S)return _(C);try{return _(C)}catch{return!1}};r=function(P){var D=P!==null&&typeof P=="object",N=t.call(P)==="[object Function]",z=n(P),B=D&&t.call(P)==="[object String]",O=[];if(!D&&!N&&!z)throw new TypeError("Object.keys called on a non-object");var G=d&&N;if(B&&P.length>0&&!e.call(P,0))for(var U=0;U0)for(var K=0;K"u"||!ci?Mr:ci(Uint8Array),el={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Mr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Mr:ArrayBuffer,"%ArrayIteratorPrototype%":cc&&ci?ci([][Symbol.iterator]()):Mr,"%AsyncFromSyncIteratorPrototype%":Mr,"%AsyncFunction%":mc,"%AsyncGenerator%":mc,"%AsyncGeneratorFunction%":mc,"%AsyncIteratorPrototype%":mc,"%Atomics%":typeof Atomics>"u"?Mr:Atomics,"%BigInt%":typeof BigInt>"u"?Mr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Mr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Mr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Mr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":eC,"%eval%":eval,"%EvalError%":tC,"%Float32Array%":typeof Float32Array>"u"?Mr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Mr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Mr:FinalizationRegistry,"%Function%":Ew,"%GeneratorFunction%":mc,"%Int8Array%":typeof Int8Array>"u"?Mr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Mr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Mr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":cc&&ci?ci(ci([][Symbol.iterator]())):Mr,"%JSON%":typeof JSON=="object"?JSON:Mr,"%Map%":typeof Map>"u"?Mr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!cc||!ci?Mr:ci(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Mr:Promise,"%Proxy%":typeof Proxy>"u"?Mr:Proxy,"%RangeError%":rC,"%ReferenceError%":nC,"%Reflect%":typeof Reflect>"u"?Mr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Mr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!cc||!ci?Mr:ci(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Mr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":cc&&ci?ci(""[Symbol.iterator]()):Mr,"%Symbol%":cc?Symbol:Mr,"%SyntaxError%":Tc,"%ThrowTypeError%":oC,"%TypedArray%":aC,"%TypeError%":bc,"%Uint8Array%":typeof Uint8Array>"u"?Mr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Mr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Mr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Mr:Uint32Array,"%URIError%":iC,"%WeakMap%":typeof WeakMap>"u"?Mr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Mr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Mr:WeakSet};if(ci)try{null.error}catch(r){var lC=ci(ci(r));el["%Error.prototype%"]=lC}var cC=function r(e){var t;if(e==="%AsyncFunction%")t=lm("async function () {}");else if(e==="%GeneratorFunction%")t=lm("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=lm("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var l=r("%AsyncGenerator%");l&&ci&&(t=ci(l.prototype))}return el[e]=t,t},C1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Eh=Vg,gd=Tw,uC=Eh.call(Function.call,Array.prototype.concat),hC=Eh.call(Function.apply,Array.prototype.splice),I1=Eh.call(Function.call,String.prototype.replace),_d=Eh.call(Function.call,String.prototype.slice),fC=Eh.call(Function.call,RegExp.prototype.exec),dC=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pC=/\\(\\)?/g,mC=function(e){var t=_d(e,0,1),n=_d(e,-1);if(t==="%"&&n!=="%")throw new Tc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Tc("invalid intrinsic syntax, expected opening `%`");var l=[];return I1(e,dC,function(u,d,a,_){l[l.length]=a?I1(_,pC,"$1"):d||u}),l},gC=function(e,t){var n=e,l;if(gd(C1,n)&&(l=C1[n],n="%"+l[0]+"%"),gd(el,n)){var u=el[n];if(u===mc&&(u=cC(n)),typeof u>"u"&&!t)throw new bc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:l,name:n,value:u}}throw new Tc("intrinsic "+e+" does not exist!")},hs=function(e,t){if(typeof e!="string"||e.length===0)throw new bc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new bc('"allowMissing" argument must be a boolean');if(fC(/^%?[^%]*%?$/,e)===null)throw new Tc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=mC(e),l=n.length>0?n[0]:"",u=gC("%"+l+"%",t),d=u.name,a=u.value,_=!1,x=u.alias;x&&(l=x[0],hC(n,uC([0,1],x)));for(var S=1,k=!0;S=n.length){var N=Qa(a,C);k=!!N,k&&"get"in N&&!("originalValue"in N.get)?a=N.get:a=a[C]}else k=gd(a,C),a=a[C];k&&!_&&(el[d]=a)}}return a},um,A1;function qg(){if(A1)return um;A1=1;var r=hs,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return um=e,um}var _C=hs,Yf=_C("%Object.getOwnPropertyDescriptor%",!0);if(Yf)try{Yf([],"length")}catch{Yf=null}var Gg=Yf,L1=qg(),yC=kw,uc=ba,P1=Gg,Wg=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new uc("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new uc("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new uc("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new uc("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new uc("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new uc("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,_=!!P1&&P1(e,t);if(L1)L1(e,t,{configurable:d===null&&_?_.configurable:!d,enumerable:l===null&&_?_.enumerable:!l,value:n,writable:u===null&&_?_.writable:!u});else if(a||!l&&!u&&!d)e[t]=n;else throw new yC("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Jm=qg(),Mw=function(){return!!Jm};Mw.hasArrayLengthDefineBug=function(){if(!Jm)return null;try{return Jm([],"length",{value:1}).length!==1}catch{return!0}};var Zg=Mw,vC=jg,bC=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",wC=Object.prototype.toString,xC=Array.prototype.concat,z1=Wg,SC=function(r){return typeof r=="function"&&wC.call(r)==="[object Function]"},Cw=Zg(),kC=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!SC(n)||!n())return}Cw?z1(r,e,t,!0):z1(r,e,t)},Iw=function(r,e){var t=arguments.length>2?arguments[2]:{},n=vC(e);bC&&(n=xC.call(n,Object.getOwnPropertySymbols(e)));for(var l=0;l4294967295||MC(t)!==t)throw new B1("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],l=!0,u=!0;if("length"in e&&R1){var d=R1(e,"length");d&&!d.configurable&&(l=!1),d&&!d.writable&&(u=!1)}return(l||u||!n)&&(EC?D1(e,"length",t,!0,!0):D1(e,"length",t)),e};(function(r){var e=Vg,t=hs,n=CC,l=ba,u=t("%Function.prototype.apply%"),d=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(d,u),_=qg(),x=t("%Math.max%");r.exports=function(C){if(typeof C!="function")throw new l("a function is required");var P=a(e,d,arguments);return n(P,1+x(0,C.length-(arguments.length-1)),!0)};var S=function(){return a(e,u,arguments)};_?_(r.exports,"apply",{value:S}):r.exports.apply=S})(Aw);var Rc=Aw.exports,Lw=hs,Pw=Rc,IC=Pw(Lw("String.prototype.indexOf")),Ro=function(e,t){var n=Lw(e,!!t);return typeof n=="function"&&IC(e,".prototype.")>-1?Pw(n):n},AC=jg,zw=Ud(),Dw=Ro,F1=Object,LC=Dw("Array.prototype.push"),O1=Dw("Object.prototype.propertyIsEnumerable"),PC=zw?Object.getOwnPropertySymbols:null,Rw=function(e,t){if(e==null)throw new TypeError("target must be an object");var n=F1(e);if(arguments.length===1)return n;for(var l=1;l2&&!!arguments[2];return(!n||HC)&&(ZC?N1(e,"name",t,!0,!0):N1(e,"name",t)),e},KC=XC,JC=ba,YC=Object,Nw=KC(function(){if(this==null||this!==YC(this))throw new JC("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),QC=Nw,eI=il.supportsDescriptors,tI=Object.getOwnPropertyDescriptor,jw=function(){if(eI&&/a/mig.flags==="gim"){var e=tI(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var t="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(n,"sticky",{get:function(){t+="y"}}),t==="dy")return e.get}}return QC},rI=il.supportsDescriptors,nI=jw,iI=Object.getOwnPropertyDescriptor,oI=Object.defineProperty,sI=TypeError,j1=Object.getPrototypeOf,aI=/a/,lI=function(){if(!rI||!j1)throw new sI("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=nI(),t=j1(aI),n=iI(t,"flags");return(!n||n.get!==e)&&oI(t,"flags",{configurable:!0,enumerable:!1,get:e}),e},cI=il,uI=Rc,hI=Nw,Uw=jw,fI=lI,Vw=uI(Uw());cI(Vw,{getPolyfill:Uw,implementation:hI,shim:fI});var dI=Vw,Qf={exports:{}},pI=Ud,ol=function(){return pI()&&!!Symbol.toStringTag},mI=ol(),gI=Ro,Ym=gI("Object.prototype.toString"),Vd=function(e){return mI&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ym(e)==="[object Arguments]"},qw=function(e){return Vd(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ym(e)!=="[object Array]"&&Ym(e.callee)==="[object Function]"},_I=function(){return Vd(arguments)}();Vd.isLegacyArguments=qw;var Gw=_I?Vd:qw;const yI={},vI=Object.freeze(Object.defineProperty({__proto__:null,default:yI},Symbol.toStringTag,{value:"Module"})),bI=Dd(vI);var Hg=typeof Map=="function"&&Map.prototype,fm=Object.getOwnPropertyDescriptor&&Hg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,yd=Hg&&fm&&typeof fm.get=="function"?fm.get:null,U1=Hg&&Map.prototype.forEach,$g=typeof Set=="function"&&Set.prototype,dm=Object.getOwnPropertyDescriptor&&$g?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,vd=$g&&dm&&typeof dm.get=="function"?dm.get:null,V1=$g&&Set.prototype.forEach,wI=typeof WeakMap=="function"&&WeakMap.prototype,ah=wI?WeakMap.prototype.has:null,xI=typeof WeakSet=="function"&&WeakSet.prototype,lh=xI?WeakSet.prototype.has:null,SI=typeof WeakRef=="function"&&WeakRef.prototype,q1=SI?WeakRef.prototype.deref:null,kI=Boolean.prototype.valueOf,TI=Object.prototype.toString,EI=Function.prototype.toString,MI=String.prototype.match,Xg=String.prototype.slice,ca=String.prototype.replace,CI=String.prototype.toUpperCase,G1=String.prototype.toLowerCase,Ww=RegExp.prototype.test,W1=Array.prototype.concat,as=Array.prototype.join,II=Array.prototype.slice,Z1=Math.floor,Qm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pm=Object.getOwnPropertySymbols,eg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Di=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ec||"symbol")?Symbol.toStringTag:null,Zw=Object.prototype.propertyIsEnumerable,H1=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function $1(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Ww.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Z1(-r):Z1(r);if(n!==r){var l=String(n),u=Xg.call(e,l.length+1);return ca.call(l,t,"$&_")+"."+ca.call(ca.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ca.call(e,t,"$&_")}var tg=bI,X1=tg.custom,K1=$w(X1)?X1:null,AI=function r(e,t,n,l){var u=t||{};if(oa(u,"quoteStyle")&&u.quoteStyle!=="single"&&u.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(oa(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=oa(u,"customInspect")?u.customInspect:!0;if(typeof d!="boolean"&&d!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(oa(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(oa(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=u.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Kw(e,u);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var _=String(e);return a?$1(e,_):_}if(typeof e=="bigint"){var x=String(e)+"n";return a?$1(e,x):x}var S=typeof u.depth>"u"?5:u.depth;if(typeof n>"u"&&(n=0),n>=S&&S>0&&typeof e=="object")return rg(e)?"[Array]":"[Object]";var k=$I(u,n);if(typeof l>"u")l=[];else if(Xw(l,e)>=0)return"[Circular]";function C(Ze,Me,ft){if(Me&&(l=II.call(l),l.push(Me)),ft){var Ct={depth:u.depth};return oa(u,"quoteStyle")&&(Ct.quoteStyle=u.quoteStyle),r(Ze,Ct,n+1,l)}return r(Ze,u,n+1,l)}if(typeof e=="function"&&!J1(e)){var P=NI(e),D=Of(e,C);return"[Function"+(P?": "+P:" (anonymous)")+"]"+(D.length>0?" { "+as.call(D,", ")+" }":"")}if($w(e)){var N=Ec?ca.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):eg.call(e);return typeof e=="object"&&!Ec?qu(N):N}if(WI(e)){for(var z="<"+G1.call(String(e.nodeName)),B=e.attributes||[],O=0;O",z}if(rg(e)){if(e.length===0)return"[]";var G=Of(e,C);return k&&!HI(G)?"["+ng(G,k)+"]":"[ "+as.call(G,", ")+" ]"}if(zI(e)){var U=Of(e,C);return!("cause"in Error.prototype)&&"cause"in e&&!Zw.call(e,"cause")?"{ ["+String(e)+"] "+as.call(W1.call("[cause]: "+C(e.cause),U),", ")+" }":U.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+as.call(U,", ")+" }"}if(typeof e=="object"&&d){if(K1&&typeof e[K1]=="function"&&tg)return tg(e,{depth:S-n});if(d!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(jI(e)){var K=[];return U1&&U1.call(e,function(Ze,Me){K.push(C(Me,e,!0)+" => "+C(Ze,e))}),Y1("Map",yd.call(e),K,k)}if(qI(e)){var me=[];return V1&&V1.call(e,function(Ze){me.push(C(Ze,e))}),Y1("Set",vd.call(e),me,k)}if(UI(e))return mm("WeakMap");if(GI(e))return mm("WeakSet");if(VI(e))return mm("WeakRef");if(RI(e))return qu(C(Number(e)));if(FI(e))return qu(C(Qm.call(e)));if(BI(e))return qu(kI.call(e));if(DI(e))return qu(C(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===xh)return"{ [object globalThis] }";if(!PI(e)&&!J1(e)){var X=Of(e,C),Y=H1?H1(e)===Object.prototype:e instanceof Object||e.constructor===Object,_e=e instanceof Object?"":"null prototype",ze=!Y&&Di&&Object(e)===e&&Di in e?Xg.call(wa(e),8,-1):_e?"Object":"",re=Y||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ce=re+(ze||_e?"["+as.call(W1.call([],ze||[],_e||[]),": ")+"] ":"");return X.length===0?ce+"{}":k?ce+"{"+ng(X,k)+"}":ce+"{ "+as.call(X,", ")+" }"}return String(e)};function Hw(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function LI(r){return ca.call(String(r),/"/g,""")}function rg(r){return wa(r)==="[object Array]"&&(!Di||!(typeof r=="object"&&Di in r))}function PI(r){return wa(r)==="[object Date]"&&(!Di||!(typeof r=="object"&&Di in r))}function J1(r){return wa(r)==="[object RegExp]"&&(!Di||!(typeof r=="object"&&Di in r))}function zI(r){return wa(r)==="[object Error]"&&(!Di||!(typeof r=="object"&&Di in r))}function DI(r){return wa(r)==="[object String]"&&(!Di||!(typeof r=="object"&&Di in r))}function RI(r){return wa(r)==="[object Number]"&&(!Di||!(typeof r=="object"&&Di in r))}function BI(r){return wa(r)==="[object Boolean]"&&(!Di||!(typeof r=="object"&&Di in r))}function $w(r){if(Ec)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!eg)return!1;try{return eg.call(r),!0}catch{}return!1}function FI(r){if(!r||typeof r!="object"||!Qm)return!1;try{return Qm.call(r),!0}catch{}return!1}var OI=Object.prototype.hasOwnProperty||function(r){return r in this};function oa(r,e){return OI.call(r,e)}function wa(r){return TI.call(r)}function NI(r){if(r.name)return r.name;var e=MI.call(EI.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Xw(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Kw(Xg.call(r,0,e.maxStringLength),e)+n}var l=ca.call(ca.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ZI);return Hw(l,"single",e)}function ZI(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+CI.call(e.toString(16))}function qu(r){return"Object("+r+")"}function mm(r){return r+" { ? }"}function Y1(r,e,t,n){var l=n?ng(t,n):as.call(t,", ");return r+" ("+e+") {"+l+"}"}function HI(r){for(var e=0;e=0)return!1;return!0}function $I(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=as.call(Array(r.indent+1)," ");else return null;return{base:t,prev:as.call(Array(e+1),t)}}function ng(r,e){if(r.length===0)return"";var t=` `+e.prev+e.base;return t+as.call(r,","+t)+` `+e.prev}function Of(r,e){var t=rg(r),n=[];if(t){n.length=r.length;for(var l=0;l=n)return t+1;var l=sv(e,t);if(l<55296||l>56319)return t+1;var u=sv(e,t+1);return u<56320||u>57343?t+1:t+2},_m=function(e){var t=0;return{next:function(){var l=t>=e.length,u;return l||(u=e[t],t+=1),{done:l,value:u}}}},av=function(e,t){if(yA(e)||rv(e))return _m(e);if(vA(e)){var n=0;return{next:function(){var u=SA(e,n),d=xA(e,n,u);return n=u,{done:u>e.length,value:d}}}}if(t&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!bA&&!wA)Qf.exports=function(e){if(e!=null)return av(e,!0)};else{var kA=rx,TA=ix,lv=qo("Map.prototype.forEach",!0),cv=qo("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var uv=qo("Map.prototype.iterator",!0),hv=qo("Set.prototype.iterator",!0);var fv=qo("Map.prototype.@@iterator",!0)||qo("Map.prototype._es6-shim iterator_",!0),dv=qo("Set.prototype.@@iterator",!0)||qo("Set.prototype._es6-shim iterator_",!0),EA=function(e){if(kA(e)){if(uv)return nv(uv(e));if(fv)return fv(e);if(lv){var t=[];return lv(e,function(l,u){ov(t,[u,l])}),_m(t)}}if(TA(e)){if(hv)return nv(hv(e));if(dv)return dv(e);if(cv){var n=[];return cv(e,function(l){ov(n,l)}),_m(n)}}};Qf.exports=function(e){return EA(e)||av(e)}}}var MA=Qf.exports,pv=function(r){return r!==r},ox=function(e,t){return e===0&&t===0?1/e===1/t:!!(e===t||pv(e)&&pv(t))},CA=ox,sx=function(){return typeof Object.is=="function"?Object.is:CA},IA=sx,AA=il,LA=function(){var e=IA();return AA(Object,{is:e},{is:function(){return Object.is!==e}}),e},PA=il,zA=Rc,DA=ox,ax=sx,RA=LA,lx=zA(ax(),Object);PA(lx,{getPolyfill:ax,implementation:DA,shim:RA});var BA=lx,FA=Rc,cx=Ro,OA=hs,ig=OA("%ArrayBuffer%",!0),ed=cx("ArrayBuffer.prototype.byteLength",!0),NA=cx("Object.prototype.toString"),mv=!!ig&&!ed&&new ig(0).slice,gv=!!mv&&FA(mv),ux=ed||gv?function(e){if(!e||typeof e!="object")return!1;try{return ed?ed(e):gv(e,0),!0}catch{return!1}}:ig?function(e){return NA(e)==="[object ArrayBuffer]"}:function(e){return!1},jA=Date.prototype.getDay,UA=function(e){try{return jA.call(e),!0}catch{return!1}},VA=Object.prototype.toString,qA="[object Date]",GA=ol(),WA=function(e){return typeof e!="object"||e===null?!1:GA?UA(e):VA.call(e)===qA},og=Ro,hx=ol(),fx,dx,sg,ag;if(hx){fx=og("Object.prototype.hasOwnProperty"),dx=og("RegExp.prototype.exec"),sg={};var ym=function(){throw sg};ag={toString:ym,valueOf:ym},typeof Symbol.toPrimitive=="symbol"&&(ag[Symbol.toPrimitive]=ym)}var ZA=og("Object.prototype.toString"),HA=Object.getOwnPropertyDescriptor,$A="[object RegExp]",XA=hx?function(e){if(!e||typeof e!="object")return!1;var t=HA(e,"lastIndex"),n=t&&fx(t,"value");if(!n)return!1;try{dx(e,ag)}catch(l){return l===sg}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:ZA(e)===$A},KA=Ro,_v=KA("SharedArrayBuffer.prototype.byteLength",!0),JA=_v?function(e){if(!e||typeof e!="object")return!1;try{return _v(e),!0}catch{return!1}}:function(e){return!1},YA=Number.prototype.toString,QA=function(e){try{return YA.call(e),!0}catch{return!1}},eL=Object.prototype.toString,tL="[object Number]",rL=ol(),nL=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:rL?QA(e):eL.call(e)===tL},px=Ro,iL=px("Boolean.prototype.toString"),oL=px("Object.prototype.toString"),sL=function(e){try{return iL(e),!0}catch{return!1}},aL="[object Boolean]",lL=ol(),cL=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:lL&&Symbol.toStringTag in e?sL(e):oL(e)===aL},lg={exports:{}},uL=Object.prototype.toString,hL=Ug();if(hL){var fL=Symbol.prototype.toString,dL=/^Symbol\(.*\)$/,pL=function(e){return typeof e.valueOf()!="symbol"?!1:dL.test(fL.call(e))};lg.exports=function(e){if(typeof e=="symbol")return!0;if(uL.call(e)!=="[object Symbol]")return!1;try{return pL(e)}catch{return!1}}}else lg.exports=function(e){return!1};var mL=lg.exports,cg={exports:{}},yv=typeof BigInt<"u"&&BigInt,gL=function(){return typeof yv=="function"&&typeof BigInt=="function"&&typeof yv(42)=="bigint"&&typeof BigInt(42)=="bigint"},_L=gL();if(_L){var yL=BigInt.prototype.valueOf,vL=function(e){try{return yL.call(e),!0}catch{}return!1};cg.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:vL(e)}}else cg.exports=function(e){return!1};var bL=cg.exports,wL=ex,xL=nL,SL=cL,kL=mL,TL=bL,EL=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(wL(e))return"String";if(xL(e))return"Number";if(SL(e))return"Boolean";if(kL(e))return"Symbol";if(TL(e))return"BigInt"},xd=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,vv=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Sd;xd||(Sd=function(e){return!1});var ug=xd?xd.prototype.has:null,vm=vv?vv.prototype.has:null;!Sd&&!ug&&(Sd=function(e){return!1});var ML=Sd||function(e){if(!e||typeof e!="object")return!1;try{if(ug.call(e,ug),vm)try{vm.call(e,vm)}catch{return!0}return e instanceof xd}catch{}return!1},hg={exports:{}},CL=hs,mx=Ro,IL=CL("%WeakSet%",!0),bm=mx("WeakSet.prototype.has",!0);if(bm){var wm=mx("WeakMap.prototype.has",!0);hg.exports=function(e){if(!e||typeof e!="object")return!1;try{if(bm(e,bm),wm)try{wm(e,wm)}catch{return!0}return e instanceof IL}catch{}return!1}}else hg.exports=function(e){return!1};var AL=hg.exports,LL=rx,PL=ix,zL=ML,DL=AL,RL=function(e){if(e&&typeof e=="object"){if(LL(e))return"Map";if(PL(e))return"Set";if(zL(e))return"WeakMap";if(DL(e))return"WeakSet"}return!1},gx=Function.prototype.toString,gc=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,fg,td;if(typeof gc=="function"&&typeof Object.defineProperty=="function")try{fg=Object.defineProperty({},"length",{get:function(){throw td}}),td={},gc(function(){throw 42},null,fg)}catch(r){r!==td&&(gc=null)}else gc=null;var BL=/^\s*class\b/,dg=function(e){try{var t=gx.call(e);return BL.test(t)}catch{return!1}},xm=function(e){try{return dg(e)?!1:(gx.call(e),!0)}catch{return!1}},rd=Object.prototype.toString,FL="[object Object]",OL="[object Function]",NL="[object GeneratorFunction]",jL="[object HTMLAllCollection]",UL="[object HTML document.all class]",VL="[object HTMLCollection]",qL=typeof Symbol=="function"&&!!Symbol.toStringTag,GL=!(0 in[,]),pg=function(){return!1};if(typeof document=="object"){var WL=document.all;rd.call(WL)===rd.call(document.all)&&(pg=function(e){if((GL||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=rd.call(e);return(t===jL||t===UL||t===VL||t===FL)&&e("")==null}catch{}return!1})}var ZL=gc?function(e){if(pg(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{gc(e,null,fg)}catch(t){if(t!==td)return!1}return!dg(e)&&xm(e)}:function(e){if(pg(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(qL)return xm(e);if(dg(e))return!1;var t=rd.call(e);return t!==OL&&t!==NL&&!/^\[object HTML/.test(t)?!1:xm(e)},HL=ZL,$L=Object.prototype.toString,_x=Object.prototype.hasOwnProperty,XL=function(e,t,n){for(var l=0,u=e.length;l=3&&(l=n),$L.call(e)==="[object Array]"?XL(e,t,l):typeof e=="string"?KL(e,t,l):JL(e,t,l)},QL=YL,eP=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Sm=eP,tP=typeof globalThis>"u"?xh:globalThis,rP=function(){for(var e=[],t=0;t"u"?xh:globalThis,mg=nP(),t_=e_("String.prototype.slice"),km=Object.getPrototypeOf,oP=e_("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n-1?t:t!=="Object"?!1:aP(e)}return nd?sP(e):null},cP=Ro,xv=cP("ArrayBuffer.prototype.byteLength",!0),uP=ux,hP=function(e){return uP(e)?xv?xv(e):e.byteLength:NaN},vx=qC,fs=Ro,Sv=dI,fP=hs,Mc=MA,dP=Yw,kv=BA,Tv=Gw,Ev=Qw,Mv=ux,Cv=WA,Iv=XA,Av=JA,Lv=jg,Pv=EL,zv=RL,Dv=lP,Rv=hP,Bv=fs("SharedArrayBuffer.prototype.byteLength",!0),Fv=fs("Date.prototype.getTime"),Tm=Object.getPrototypeOf,Ov=fs("Object.prototype.toString"),Ed=fP("%Set%",!0),gg=fs("Map.prototype.has",!0),Md=fs("Map.prototype.get",!0),Nv=fs("Map.prototype.size",!0),Cd=fs("Set.prototype.add",!0),bx=fs("Set.prototype.delete",!0),Id=fs("Set.prototype.has",!0),id=fs("Set.prototype.size",!0);function jv(r,e,t,n){for(var l=Mc(r),u;(u=l.next())&&!u.done;)if(Ho(e,u.value,t,n))return bx(r,u.value),!0;return!1}function wx(r){if(typeof r>"u")return null;if(typeof r!="object")return typeof r=="symbol"?!1:typeof r=="string"||typeof r=="number"?+r==+r:!0}function pP(r,e,t,n,l,u){var d=wx(t);if(d!=null)return d;var a=Md(e,d),_=vx({},l,{strict:!1});return typeof a>"u"&&!gg(e,d)||!Ho(n,a,_,u)?!1:!gg(r,d)&&Ho(n,a,_,u)}function mP(r,e,t){var n=wx(t);return n??(Id(e,n)&&!Id(r,n))}function Uv(r,e,t,n,l,u){for(var d=Mc(r),a,_;(a=d.next())&&!a.done;)if(_=a.value,Ho(t,_,l,u)&&Ho(n,Md(e,_),l,u))return bx(r,_),!0;return!1}function Ho(r,e,t,n){var l=t||{};if(l.strict?kv(r,e):r===e)return!0;var u=Pv(r),d=Pv(e);if(u!==d)return!1;if(!r||!e||typeof r!="object"&&typeof e!="object")return l.strict?kv(r,e):r==e;var a=n.has(r),_=n.has(e),x;if(a&&_){if(n.get(r)===n.get(e))return!0}else x={};return a||n.set(r,x),_||n.set(e,x),yP(r,e,l,n)}function Vv(r){return!r||typeof r!="object"||typeof r.length!="number"||typeof r.copy!="function"||typeof r.slice!="function"||r.length>0&&typeof r[0]!="number"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))}function gP(r,e,t,n){if(id(r)!==id(e))return!1;for(var l=Mc(r),u=Mc(e),d,a,_;(d=l.next())&&!d.done;)if(d.value&&typeof d.value=="object")_||(_=new Ed),Cd(_,d.value);else if(!Id(e,d.value)){if(t.strict||!mP(r,e,d.value))return!1;_||(_=new Ed),Cd(_,d.value)}if(_){for(;(a=u.next())&&!a.done;)if(a.value&&typeof a.value=="object"){if(!jv(_,a.value,t.strict,n))return!1}else if(!t.strict&&!Id(r,a.value)&&!jv(_,a.value,t.strict,n))return!1;return id(_)===0}return!0}function _P(r,e,t,n){if(Nv(r)!==Nv(e))return!1;for(var l=Mc(r),u=Mc(e),d,a,_,x,S,k;(d=l.next())&&!d.done;)if(x=d.value[0],S=d.value[1],x&&typeof x=="object")_||(_=new Ed),Cd(_,x);else if(k=Md(e,x),typeof k>"u"&&!gg(e,x)||!Ho(S,k,t,n)){if(t.strict||!pP(r,e,x,S,t,n))return!1;_||(_=new Ed),Cd(_,x)}if(_){for(;(a=u.next())&&!a.done;)if(x=a.value[0],k=a.value[1],x&&typeof x=="object"){if(!Uv(_,r,x,k,t,n))return!1}else if(!t.strict&&(!r.has(x)||!Ho(Md(r,x),k,t,n))&&!Uv(_,r,x,k,vx({},t,{strict:!1}),n))return!1;return id(_)===0}return!0}function yP(r,e,t,n){var l,u;if(typeof r!=typeof e||r==null||e==null||Ov(r)!==Ov(e)||Tv(r)!==Tv(e))return!1;var d=Ev(r),a=Ev(e);if(d!==a)return!1;var _=r instanceof Error,x=e instanceof Error;if(_!==x||(_||x)&&(r.name!==e.name||r.message!==e.message))return!1;var S=Iv(r),k=Iv(e);if(S!==k||(S||k)&&(r.source!==e.source||Sv(r)!==Sv(e)))return!1;var C=Cv(r),P=Cv(e);if(C!==P||(C||P)&&Fv(r)!==Fv(e)||t.strict&&Tm&&Tm(r)!==Tm(e))return!1;var D=Dv(r),N=Dv(e);if(D!==N)return!1;if(D||N){if(r.length!==e.length)return!1;for(l=0;l=0;l--)if(me[l]!=X[l])return!1;for(l=me.length-1;l>=0;l--)if(u=me[l],!Ho(r[u],e[u],t,n))return!1;var Y=zv(r),_e=zv(e);return Y!==_e?!1:Y==="Set"||_e==="Set"?gP(r,e,t,n):Y==="Map"?_P(r,e,t,n):!0}var vP=function(e,t,n){return Ho(e,t,n,dP())};const bP=Sg(vP);var wP=Object.defineProperty,Hr=(r,e)=>wP(r,"name",{value:e,configurable:!0}),xP=class{constructor(e){this.direction=!1,this.compareProperties=!0;var t,n,l;this.precision=10**-((t=e==null?void 0:e.precision)!=null?t:17),this.direction=(n=e==null?void 0:e.direction)!=null?n:!1,this.compareProperties=(l=e==null?void 0:e.compareProperties)!=null?l:!0}compare(e,t){if(e.type!==t.type||!eh(e,t))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,t.coordinates);case"LineString":return this.compareLine(e.coordinates,t.coordinates);case"Polygon":return this.comparePolygon(e,t);case"GeometryCollection":return this.compareGeometryCollection(e,t);case"Feature":return this.compareFeature(e,t);case"FeatureCollection":return this.compareFeatureCollection(e,t);default:if(e.type.startsWith("Multi")){const n=_g(e),l=_g(t);return n.every(u=>l.some(d=>this.compare(u,d)))}}return!1}compareCoord(e,t){return e.length===t.length&&e.every((n,l)=>Math.abs(n-t[l])=0&&(n=[].concat(e.slice(l,e.length),e.slice(1,l+1))),n}comparePath(e,t){return e.every((n,l)=>this.compareCoord(n,t[l]))}comparePolygon(e,t){if(this.compareLine(e.coordinates[0],t.coordinates[0],1,!0)){const n=e.coordinates.slice(1,e.coordinates.length),l=t.coordinates.slice(1,t.coordinates.length);return n.every(u=>l.some(d=>this.compareLine(u,d,1,!0)))}return!1}compareGeometryCollection(e,t){return eh(e.geometries,t.geometries)&&this.compareBBox(e,t)&&e.geometries.every((n,l)=>this.compare(n,t.geometries[l]))}compareFeature(e,t){return e.id===t.id&&(this.compareProperties?bP(e.properties,t.properties):!0)&&this.compareBBox(e,t)&&this.compare(e.geometry,t.geometry)}compareFeatureCollection(e,t){return eh(e.features,t.features)&&this.compareBBox(e,t)&&e.features.every((n,l)=>this.compare(n,t.features[l]))}compareBBox(e,t){return!e.bbox&&!t.bbox||(e.bbox&&t.bbox?this.compareCoord(e.bbox,t.bbox):!1)}};Hr(xP,"GeojsonEquality");function eh(r,e){return r.coordinates?r.coordinates.length===e.coordinates.length:r.length===e.length}Hr(eh,"sameLength");function _g(r){return r.coordinates.map(e=>({type:r.type.replace("Multi",""),coordinates:e}))}Hr(_g,"explode");var ho=63710088e-1,xx={centimeters:ho*100,centimetres:ho*100,degrees:360/(2*Math.PI),feet:ho*3.28084,inches:ho*39.37,kilometers:ho/1e3,kilometres:ho/1e3,meters:ho,metres:ho,miles:ho/1609.344,millimeters:ho*1e3,millimetres:ho*1e3,nauticalmiles:ho/1852,radians:1,yards:ho*1.0936},qv={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function xa(r,e,t={}){const n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}Hr(xa,"feature");function SP(r,e,t={}){switch(r){case"Point":return Cc(e).geometry;case"LineString":return n_(e).geometry;case"Polygon":return r_(e).geometry;case"MultiPoint":return kx(e).geometry;case"MultiLineString":return Sx(e).geometry;case"MultiPolygon":return Tx(e).geometry;default:throw new Error(r+" is invalid")}}Hr(SP,"geometry");function Cc(r,e,t={}){if(!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ic(r[0])||!Ic(r[1]))throw new Error("coordinates must contain numbers");return xa({type:"Point",coordinates:r},e,t)}Hr(Cc,"point");function kP(r,e,t={}){return qd(r.map(n=>Cc(n,e)),t)}Hr(kP,"points");function r_(r,e,t={}){for(const l of r){if(l.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(l[l.length-1].length!==l[0].length)throw new Error("First and last Position are not equivalent.");for(let u=0;ur_(n,e)),t)}Hr(TP,"polygons");function n_(r,e,t={}){if(r.length<2)throw new Error("coordinates must be an array of two or more positions");return xa({type:"LineString",coordinates:r},e,t)}Hr(n_,"lineString");function EP(r,e,t={}){return qd(r.map(n=>n_(n,e)),t)}Hr(EP,"lineStrings");function qd(r,e={}){const t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}Hr(qd,"featureCollection");function Sx(r,e,t={}){return xa({type:"MultiLineString",coordinates:r},e,t)}Hr(Sx,"multiLineString");function kx(r,e,t={}){return xa({type:"MultiPoint",coordinates:r},e,t)}Hr(kx,"multiPoint");function Tx(r,e,t={}){return xa({type:"MultiPolygon",coordinates:r},e,t)}Hr(Tx,"multiPolygon");function MP(r,e,t={}){return xa({type:"GeometryCollection",geometries:r},e,t)}Hr(MP,"geometryCollection");function CP(r,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const t=Math.pow(10,e||0);return Math.round(r*t)/t}Hr(CP,"round");function i_(r,e="kilometers"){const t=xx[e];if(!t)throw new Error(e+" units is invalid");return r*t}Hr(i_,"radiansToLength");function Gd(r,e="kilometers"){const t=xx[e];if(!t)throw new Error(e+" units is invalid");return r/t}Hr(Gd,"lengthToRadians");function IP(r,e){return bh(Gd(r,e))}Hr(IP,"lengthToDegrees");function AP(r){let e=r%360;return e<0&&(e+=360),e}Hr(AP,"bearingToAzimuth");function bh(r){return r%(2*Math.PI)*180/Math.PI}Hr(bh,"radiansToDegrees");function Lo(r){return r%360*Math.PI/180}Hr(Lo,"degreesToRadians");function LP(r,e="kilometers",t="kilometers"){if(!(r>=0))throw new Error("length must be a positive number");return i_(Gd(r,e),t)}Hr(LP,"convertLength");function PP(r,e="meters",t="kilometers"){if(!(r>=0))throw new Error("area must be a positive number");const n=qv[e];if(!n)throw new Error("invalid original units");const l=qv[t];if(!l)throw new Error("invalid final units");return r/n*l}Hr(PP,"convertArea");function Ic(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}Hr(Ic,"isNumber");function zP(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}Hr(zP,"isObject");function DP(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(e=>{if(!Ic(e))throw new Error("bbox must only contain numbers")})}Hr(DP,"validateBBox");function RP(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}Hr(RP,"validateId");var BP=Object.defineProperty,Sa=(r,e)=>BP(r,"name",{value:e,configurable:!0});function Ac(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return[...r.geometry.coordinates];if(r.type==="Point")return[...r.coordinates]}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return[...r];throw new Error("coord must be GeoJSON Point or an Array of numbers")}Sa(Ac,"getCoord");function FP(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}Sa(FP,"getCoords");function Ex(r){if(r.length>1&&Ic(r[0])&&Ic(r[1]))return!0;if(Array.isArray(r[0])&&r[0].length)return Ex(r[0]);throw new Error("coordinates must only contain numbers")}Sa(Ex,"containsNumber");function OP(r,e,t){if(!e||!t)throw new Error("type and name required");if(!r||r.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+r.type)}Sa(OP,"geojsonType");function NP(r,e,t){if(!r)throw new Error("No feature passed");if(!t)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+r.geometry.type)}Sa(NP,"featureOf");function jP(r,e,t){if(!r)throw new Error("No featureCollection passed");if(!t)throw new Error(".collectionOf() requires a name");if(!r||r.type!=="FeatureCollection")throw new Error("Invalid input to "+t+", FeatureCollection required");for(const n of r.features){if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!n.geometry||n.geometry.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+n.geometry.type)}}Sa(jP,"collectionOf");function Mx(r){return r.type==="Feature"?r.geometry:r}Sa(Mx,"getGeom");function UP(r,e){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}Sa(UP,"getType");var VP=Object.defineProperty,Cx=(r,e)=>VP(r,"name",{value:e,configurable:!0});function o_(r,e,t={}){if(t.final===!0)return Ix(r,e);const n=Ac(r),l=Ac(e),u=Lo(n[0]),d=Lo(l[0]),a=Lo(n[1]),_=Lo(l[1]),x=Math.sin(d-u)*Math.cos(_),S=Math.cos(a)*Math.sin(_)-Math.sin(a)*Math.cos(_)*Math.cos(d-u);return bh(Math.atan2(x,S))}Cx(o_,"bearing");function Ix(r,e){let t=o_(e,r);return t=(t+180)%360,t}Cx(Ix,"calculateFinalBearing");var qP=Object.defineProperty,GP=(r,e)=>qP(r,"name",{value:e,configurable:!0});function Ax(r,e,t,n={}){const l=Ac(r),u=Lo(l[0]),d=Lo(l[1]),a=Lo(t),_=Gd(e,n.units),x=Math.asin(Math.sin(d)*Math.cos(_)+Math.cos(d)*Math.sin(_)*Math.cos(a)),S=u+Math.atan2(Math.sin(a)*Math.sin(_)*Math.cos(d),Math.cos(_)-Math.sin(d)*Math.sin(x)),k=bh(S),C=bh(x);return Cc([k,C],n.properties)}GP(Ax,"destination");var WP=Object.defineProperty,ZP=(r,e)=>WP(r,"name",{value:e,configurable:!0});function Lx(r,e,t={}){var n=Ac(r),l=Ac(e),u=Lo(l[1]-n[1]),d=Lo(l[0]-n[0]),a=Lo(n[1]),_=Lo(l[1]),x=Math.pow(Math.sin(u/2),2)+Math.pow(Math.sin(d/2),2)*Math.cos(a)*Math.cos(_);return i_(2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x)),t.units)}ZP(Lx,"distance");var HP=Object.defineProperty,$P=(r,e)=>HP(r,"name",{value:e,configurable:!0});function Px(r,e,t={}){const l=Mx(r).coordinates;let u=0;for(let d=0;d=u&&d===l.length-1);d++)if(u>=e){const a=e-u;if(a){const _=o_(l[d],l[d-1])-180;return Ax(l[d],a,_,t)}else return Cc(l[d])}else u+=Lx(l[d],l[d+1],t);return Cc(l[l.length-1])}$P(Px,"along");var XP=Px;function KP(r){let e,t;const n=[Hn("animate-shortcuts"),{paint:{"circle-radius":10,"circle-color":"purple","circle-stroke-color":"black","circle-stroke-width":1}}];let l={};for(let u=0;uclearInterval(a));function _(){return n.features.map(P=>1/P.properties.directness).reduce((P,D)=>P+D,0)}function x(){return n.features.length==0?[]:Array.from({length:YP},S)}function S(){let P=Math.random()*l,D=0;for(let[N,z]of n.features.entries())if(D+=1/z.properties.directness,PXP(n.features[P],D,{units:"kilometers"}))}}function C(){for(let[P,D]of u.entries())D.distance+=e6,D.distance>=n.features[D.idx].properties.length_meters/1e3&&(u[P]=S());t(0,d=k())}return r.$$set=P=>{"paths"in P&&t(1,n=P.paths)},r.$$.update=()=>{r.$$.dirty&2&&n&&(l=_(),u=x())},[d,n]}class r6 extends Ht{constructor(e){super(),Zt(this,e,t6,JP,Ut,{paths:1})}}function n6(r){let e;return{c(){e=rt("Choose project")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function i6(r){let e;return{c(){e=rt("Pick neighbourhood")},m(t,n){be(t,e,n)},d(t){t&&ve(e)}}}function o6(r){let e;return{c(){e=fe("p"),e.textContent=`Now that you've defined a neighbourhood boundary, you can see the diff --git a/index.html b/index.html index 23855c0..6cb988e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ The low-traffic neighbourhood (LTN) tool, v2 - +