@deck.gl/carto 9.2.0-beta.2 → 9.2.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cartoPropertiesTile-worker.js +1 -1
- package/dist/cartoRasterTile-worker.js +1 -1
- package/dist/cartoSpatialTile-worker.js +1 -1
- package/dist/cartoVectorTile-worker.js +1 -1
- package/dist/index.cjs +4 -4
- package/dist/layers/schema/carto-properties-tile-loader.js +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist.min.js +2 -2
- package/package.json +2 -2
|
@@ -5530,7 +5530,7 @@
|
|
|
5530
5530
|
};
|
|
5531
5531
|
|
|
5532
5532
|
// src/layers/schema/carto-properties-tile-loader.ts
|
|
5533
|
-
var VERSION = true ? "9.2.0-beta.
|
|
5533
|
+
var VERSION = true ? "9.2.0-beta.3" : "latest";
|
|
5534
5534
|
var id = "cartoPropertiesTile";
|
|
5535
5535
|
var DEFAULT_OPTIONS = {
|
|
5536
5536
|
cartoPropertiesTile: {
|
|
@@ -5516,7 +5516,7 @@
|
|
|
5516
5516
|
};
|
|
5517
5517
|
|
|
5518
5518
|
// src/layers/schema/carto-raster-tile-loader.ts
|
|
5519
|
-
var VERSION = true ? "9.2.0-beta.
|
|
5519
|
+
var VERSION = true ? "9.2.0-beta.3" : "latest";
|
|
5520
5520
|
var id = "cartoRasterTile";
|
|
5521
5521
|
var DEFAULT_OPTIONS = {
|
|
5522
5522
|
cartoRasterTile: {
|
|
@@ -5915,7 +5915,7 @@
|
|
|
5915
5915
|
}
|
|
5916
5916
|
|
|
5917
5917
|
// src/layers/schema/carto-spatial-tile-loader.ts
|
|
5918
|
-
var VERSION = true ? "9.2.0-beta.
|
|
5918
|
+
var VERSION = true ? "9.2.0-beta.3" : "latest";
|
|
5919
5919
|
var id = "cartoSpatialTile";
|
|
5920
5920
|
var DEFAULT_OPTIONS = {
|
|
5921
5921
|
cartoSpatialTile: {
|
|
@@ -6135,7 +6135,7 @@
|
|
|
6135
6135
|
};
|
|
6136
6136
|
|
|
6137
6137
|
// src/layers/schema/carto-vector-tile-loader.ts
|
|
6138
|
-
var VERSION = true ? "9.2.0-beta.
|
|
6138
|
+
var VERSION = true ? "9.2.0-beta.3" : "latest";
|
|
6139
6139
|
var id = "cartoVectorTile";
|
|
6140
6140
|
var DEFAULT_OPTIONS = {
|
|
6141
6141
|
cartoVectorTile: {
|
package/dist/index.cjs
CHANGED
|
@@ -673,7 +673,7 @@ function binaryToSpatialjson(binary) {
|
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
// dist/layers/schema/carto-spatial-tile-loader.js
|
|
676
|
-
var VERSION = true ? "9.2.0-beta.
|
|
676
|
+
var VERSION = true ? "9.2.0-beta.3" : "latest";
|
|
677
677
|
var id = "cartoSpatialTile";
|
|
678
678
|
var DEFAULT_OPTIONS = {
|
|
679
679
|
cartoSpatialTile: {
|
|
@@ -2035,7 +2035,7 @@ var TileReader3 = class {
|
|
|
2035
2035
|
};
|
|
2036
2036
|
|
|
2037
2037
|
// dist/layers/schema/carto-raster-tile-loader.js
|
|
2038
|
-
var VERSION2 = true ? "9.2.0-beta.
|
|
2038
|
+
var VERSION2 = true ? "9.2.0-beta.3" : "latest";
|
|
2039
2039
|
var id2 = "cartoRasterTile";
|
|
2040
2040
|
var DEFAULT_OPTIONS2 = {
|
|
2041
2041
|
cartoRasterTile: {
|
|
@@ -2147,7 +2147,7 @@ var TileReader4 = class {
|
|
|
2147
2147
|
};
|
|
2148
2148
|
|
|
2149
2149
|
// dist/layers/schema/carto-properties-tile-loader.js
|
|
2150
|
-
var VERSION3 = true ? "9.2.0-beta.
|
|
2150
|
+
var VERSION3 = true ? "9.2.0-beta.3" : "latest";
|
|
2151
2151
|
var id3 = "cartoPropertiesTile";
|
|
2152
2152
|
var DEFAULT_OPTIONS3 = {
|
|
2153
2153
|
cartoPropertiesTile: {
|
|
@@ -2176,7 +2176,7 @@ var carto_properties_tile_loader_default = CartoPropertiesTileLoader;
|
|
|
2176
2176
|
|
|
2177
2177
|
// dist/layers/schema/carto-vector-tile-loader.js
|
|
2178
2178
|
var import_earcut = __toESM(require("earcut"), 1);
|
|
2179
|
-
var VERSION4 = true ? "9.2.0-beta.
|
|
2179
|
+
var VERSION4 = true ? "9.2.0-beta.3" : "latest";
|
|
2180
2180
|
var id4 = "cartoVectorTile";
|
|
2181
2181
|
var DEFAULT_OPTIONS4 = {
|
|
2182
2182
|
cartoVectorTile: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TileReader } from "./carto-properties-tile.js";
|
|
5
5
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
6
6
|
import { getWorkerUrl } from "../../utils.js";
|
|
7
|
-
const VERSION = typeof "9.2.0-beta.
|
|
7
|
+
const VERSION = typeof "9.2.0-beta.3" !== 'undefined' ? "9.2.0-beta.3" : 'latest';
|
|
8
8
|
const id = 'cartoPropertiesTile';
|
|
9
9
|
const DEFAULT_OPTIONS = {
|
|
10
10
|
cartoPropertiesTile: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { TileReader } from "./carto-raster-tile.js";
|
|
5
5
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
6
6
|
import { getWorkerUrl } from "../../utils.js";
|
|
7
|
-
const VERSION = typeof "9.2.0-beta.
|
|
7
|
+
const VERSION = typeof "9.2.0-beta.3" !== 'undefined' ? "9.2.0-beta.3" : 'latest';
|
|
8
8
|
const id = 'cartoRasterTile';
|
|
9
9
|
const DEFAULT_OPTIONS = {
|
|
10
10
|
cartoRasterTile: {
|
|
@@ -5,7 +5,7 @@ import { TileReader } from "./carto-spatial-tile.js";
|
|
|
5
5
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
6
6
|
import { getWorkerUrl } from "../../utils.js";
|
|
7
7
|
import { binaryToSpatialjson } from "./spatialjson-utils.js";
|
|
8
|
-
const VERSION = typeof "9.2.0-beta.
|
|
8
|
+
const VERSION = typeof "9.2.0-beta.3" !== 'undefined' ? "9.2.0-beta.3" : 'latest';
|
|
9
9
|
const id = 'cartoSpatialTile';
|
|
10
10
|
const DEFAULT_OPTIONS = {
|
|
11
11
|
cartoSpatialTile: {
|
|
@@ -5,7 +5,7 @@ import earcut from 'earcut';
|
|
|
5
5
|
import { TileReader } from "./carto-tile.js";
|
|
6
6
|
import { parsePbf } from "./tile-loader-utils.js";
|
|
7
7
|
import { getWorkerUrl } from "../../utils.js";
|
|
8
|
-
const VERSION = typeof "9.2.0-beta.
|
|
8
|
+
const VERSION = typeof "9.2.0-beta.3" !== 'undefined' ? "9.2.0-beta.3" : 'latest';
|
|
9
9
|
const id = 'cartoVectorTile';
|
|
10
10
|
const DEFAULT_OPTIONS = {
|
|
11
11
|
cartoVectorTile: {
|
package/dist.min.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
else if (typeof define === 'function' && define.amd) define([], factory);
|
|
5
5
|
else if (typeof exports === 'object') exports['deck'] = factory();
|
|
6
6
|
else root['deck'] = factory();})(globalThis, function () {
|
|
7
|
-
"use strict";var __exports__=(()=>{var lg=Object.create;var Ni=Object.defineProperty;var cg=Object.getOwnPropertyDescriptor;var ug=Object.getOwnPropertyNames;var dg=Object.getPrototypeOf,hg=Object.prototype.hasOwnProperty;var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ma=(e,t)=>{for(var r in t)Ni(e,r,{get:t[r],enumerable:!0})},Di=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ug(t))!hg.call(e,i)&&i!==r&&Ni(e,i,{get:()=>t[i],enumerable:!(n=cg(t,i))||n.enumerable});return e},Je=(e,t,r)=>(Di(e,t,"default"),r&&Di(r,t,"default")),q=(e,t,r)=>(r=e!=null?lg(dg(e)):{},Di(t||!e||!e.__esModule?Ni(r,"default",{value:e,enumerable:!0}):r,e)),pg=e=>Di(Ni({},"__esModule",{value:!0}),e);var kt=K((Z_,sl)=>{sl.exports=globalThis.deck});var pt=K((H_,fl)=>{fl.exports=globalThis.deck});var cn=K((j_,ll)=>{ll.exports=globalThis.loaders});var Ee=K((K_,hl)=>{hl.exports=globalThis.deck});var Sl=K((Q_,El)=>{var _g=Math.PI/180,Eg=180/Math.PI;function ml(e){var t=pl(e[0]+1,e[2]),r=pl(e[0],e[2]),n=gl(e[1]+1,e[2]),i=gl(e[1],e[2]);return[r,n,t,i]}function Sg(e){var t=ml(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r}function pl(e,t){return e/Math.pow(2,t)*360-180}function gl(e,t){var r=Math.PI-2*Math.PI*e/Math.pow(2,t);return Eg*Math.atan(.5*(Math.exp(r)-Math.exp(-r)))}function La(e,t,r){var n=_l(e,t,r);return n[0]=Math.floor(n[0]),n[1]=Math.floor(n[1]),n}function bl(e){return[[e[0]*2,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2+1,e[2]+1],[e[0]*2,e[1]*2+1,e[2]+1]]}function yl(e){return e[0]%2===0&&e[1]%2===0?[e[0]/2,e[1]/2,e[2]-1]:e[0]%2===0&&!e[1]%2===0?[e[0]/2,(e[1]-1)/2,e[2]-1]:!e[0]%2===0&&e[1]%2===0?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function xl(e){return bl(yl(e))}function Tg(e,t){for(var r=xl(e),n=0;n<r.length;n++)if(!vl(t,r[n]))return!1;return!0}function vl(e,t){for(var r=0;r<e.length;r++)if(wl(e[r],t))return!0;return!1}function wl(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Cg(e){for(var t="",r=e[2];r>0;r--){var n=0,i=1<<r-1;e[0]&i&&n++,e[1]&i&&(n+=2),t+=n.toString()}return t}function Ag(e){for(var t=0,r=0,n=e.length,i=n;i>0;i--){var o=1<<i-1;switch(e[n-i]){case"0":break;case"1":t|=o;break;case"2":r|=o;break;case"3":t|=o,r|=o;break}}return[t,r,n]}function Pg(e){var t=La(e[0],e[1],32),r=La(e[2],e[3],32),n=[t[0],t[1],r[0],r[1]],i=kg(n);if(i===0)return[0,0,0];var o=n[0]>>>32-i,a=n[1]>>>32-i;return[o,a,i]}function kg(e){for(var t=28,r=0;r<t;r++){var n=1<<32-(r+1);if((e[0]&n)!=(e[2]&n)||(e[1]&n)!=(e[3]&n))return r}return t}function _l(e,t,r){var n=Math.sin(t*_g),i=Math.pow(2,r),o=i*(e/360+.5),a=i*(.5-.25*Math.log((1+n)/(1-n))/Math.PI);return[o,a,r]}El.exports={tileToGeoJSON:Sg,tileToBBOX:ml,getChildren:bl,getParent:yl,getSiblings:xl,hasTile:vl,hasSiblings:Tg,tilesEqual:wl,tileToQuadkey:Cg,quadkeyToTile:Ag,pointToTile:La,bboxToTile:Pg,pointToTileFraction:_l}});var Al=K(qi=>{var Tr=Sl();qi.geojson=function(e,t){return{type:"FeatureCollection",features:Oa(e,t).map(Mg)}};function Mg(e){return{type:"Feature",geometry:Tr.tileToGeoJSON(e),properties:{}}}qi.tiles=Oa;qi.indexes=function(e,t){return Oa(e,t).map(Tr.tileToQuadkey)};function Oa(e,t){var r,n,i=e.coordinates,o=t.max_zoom,a={},s=[];if(e.type==="Point")return[Tr.pointToTile(i[0],i[1],o)];if(e.type==="MultiPoint")for(r=0;r<i.length;r++)n=Tr.pointToTile(i[r][0],i[r][1],o),a[ze(n[0],n[1],n[2])]=!0;else if(e.type==="LineString")Ia(a,i,o);else if(e.type==="MultiLineString")for(r=0;r<i.length;r++)Ia(a,i[r],o);else if(e.type==="Polygon")Tl(a,s,i,o);else if(e.type==="MultiPolygon")for(r=0;r<i.length;r++)Tl(a,s,i[r],o);else throw new Error("Geometry type not implemented");if(t.min_zoom!==o){var l=s.length;for(Cl(a,s),r=0;r<l;r++){var f=s[r];a[ze(f[0],f[1],f[2])]=!0}return Fg(a,s,t)}return Cl(a,s),s}function Fg(e,t,r){for(var n=[],i=r.max_zoom;i>r.min_zoom;i--){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s];if(l[0]%2===0&&l[1]%2===0){var f=ze(l[0]+1,l[1],i),c=ze(l[0],l[1]+1,i),u=ze(l[0]+1,l[1]+1,i);if(e[f]&&e[c]&&e[u]){e[ze(l[0],l[1],l[2])]=!1,e[f]=!1,e[c]=!1,e[u]=!1;var d=[l[0]/2,l[1]/2,i-1];i-1===r.min_zoom?n.push(d):(o[ze(l[0]/2,l[1]/2,i-1)]=!0,a.push(d))}}}for(s=0;s<t.length;s++)l=t[s],e[ze(l[0],l[1],l[2])]&&n.push(l);e=o,t=a}return n}function Tl(e,t,r,n){for(var i=[],o=0;o<r.length;o++){var a=[];Ia(e,r[o],n,a);for(var s=0,l=a.length,f=l-1;s<l;f=s++){var c=(s+1)%l,u=a[s][1];(u>a[f][1]||u>a[c][1])&&(u<a[f][1]||u<a[c][1])&&u!==a[c][1]&&i.push(a[s])}}for(i.sort(Lg),o=0;o<i.length;o+=2){u=i[o][1];for(var d=i[o][0]+1;d<i[o+1][0];d++){var h=ze(d,u,n);e[h]||t.push([d,u,n])}}}function Lg(e,t){return e[1]-t[1]||e[0]-t[0]}function Ia(e,t,r,n){for(var i,o,a=0;a<t.length-1;a++){var s=Tr.pointToTileFraction(t[a][0],t[a][1],r),l=Tr.pointToTileFraction(t[a+1][0],t[a+1][1],r),f=s[0],c=s[1],u=l[0],d=l[1],h=u-f,g=d-c;if(!(g===0&&h===0)){var x=h>0?1:-1,T=g>0?1:-1,_=Math.floor(f),v=Math.floor(c),M=h===0?1/0:Math.abs(((h>0?1:0)+_-f)/h),L=g===0?1/0:Math.abs(((g>0?1:0)+v-c)/g),I=Math.abs(x/h),B=Math.abs(T/g);for((_!==i||v!==o)&&(e[ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v);M<1||L<1;)M<L?(M+=I,_+=x):(L+=B,v+=T),e[ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v}}n&&v===n[0][1]&&n.pop()}function Cl(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.push(Ig(+r[n]))}function ze(e,t,r){var n=2*(1<<r);return(n*t+e)*32+r}function Ig(e){var t=e%32,r=2*(1<<t),n=(e-t)/32,i=n%r,o=(n-i)/r%r;return[i,o,t]}});var Yt=K((Z3,Bl)=>{Bl.exports=globalThis.h3||{}});var gt=K(pe=>{"use strict";var sm=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function fm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}pe.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)fm(r,n)&&(e[n]=r[n])}}return e};pe.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var lm={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},cm={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};pe.setTyped=function(e){e?(pe.Buf8=Uint8Array,pe.Buf16=Uint16Array,pe.Buf32=Int32Array,pe.assign(pe,lm)):(pe.Buf8=Array,pe.Buf16=Array,pe.Buf32=Array,pe.assign(pe,cm))};pe.setTyped(sm)});var wc=K(Lr=>{"use strict";var um=gt(),dm=4,Jl=0,ec=1,hm=2;function Fr(e){for(var t=e.length;--t>=0;)e[t]=0}var pm=0,ac=1,gm=2,mm=3,bm=258,Ya=29,vn=256,mn=vn+1+Ya,Mr=30,Wa=19,sc=2*mn+1,Wt=15,Ga=16,ym=7,Xa=256,fc=16,lc=17,cc=18,Ha=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Yi=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],xm=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],uc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],vm=512,mt=new Array((mn+2)*2);Fr(mt);var gn=new Array(Mr*2);Fr(gn);var bn=new Array(vm);Fr(bn);var yn=new Array(bm-mm+1);Fr(yn);var Ka=new Array(Ya);Fr(Ka);var Wi=new Array(Mr);Fr(Wi);function Va(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var dc,hc,pc;function $a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function gc(e){return e<256?bn[e]:bn[256+(e>>>7)]}function xn(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function be(e,t,r){e.bi_valid>Ga-r?(e.bi_buf|=t<<e.bi_valid&65535,xn(e,e.bi_buf),e.bi_buf=t>>Ga-e.bi_valid,e.bi_valid+=r-Ga):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function rt(e,t,r){be(e,r[t*2],r[t*2+1])}function mc(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function wm(e){e.bi_valid===16?(xn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function _m(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,f,c,u,d,h,g,x=0;for(d=0;d<=Wt;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<sc;f++)c=e.heap[f],d=r[r[c*2+1]*2+1]+1,d>l&&(d=l,x++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,h=0,c>=s&&(h=a[c-s]),g=r[c*2],e.opt_len+=g*(d+h),o&&(e.static_len+=g*(i[c*2+1]+h)));if(x!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,x-=2}while(x>0);for(d=l;d!==0;d--)for(c=e.bl_count[d];c!==0;)u=e.heap[--f],!(u>n)&&(r[u*2+1]!==d&&(e.opt_len+=(d-r[u*2+1])*r[u*2],r[u*2+1]=d),c--)}}function bc(e,t,r){var n=new Array(Wt+1),i=0,o,a;for(o=1;o<=Wt;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=mc(n[s]++,s))}}function Em(){var e,t,r,n,i,o=new Array(Wt+1);for(r=0,n=0;n<Ya-1;n++)for(Ka[n]=r,e=0;e<1<<Ha[n];e++)yn[r++]=n;for(yn[r-1]=n,i=0,n=0;n<16;n++)for(Wi[n]=i,e=0;e<1<<Yi[n];e++)bn[i++]=n;for(i>>=7;n<Mr;n++)for(Wi[n]=i<<7,e=0;e<1<<Yi[n]-7;e++)bn[256+i++]=n;for(t=0;t<=Wt;t++)o[t]=0;for(e=0;e<=143;)mt[e*2+1]=8,e++,o[8]++;for(;e<=255;)mt[e*2+1]=9,e++,o[9]++;for(;e<=279;)mt[e*2+1]=7,e++,o[7]++;for(;e<=287;)mt[e*2+1]=8,e++,o[8]++;for(bc(mt,mn+1,o),e=0;e<Mr;e++)gn[e*2+1]=5,gn[e*2]=mc(e,5);dc=new Va(mt,Ha,vn+1,mn,Wt),hc=new Va(gn,Yi,0,Mr,Wt),pc=new Va(new Array(0),xm,0,Wa,ym)}function yc(e){var t;for(t=0;t<mn;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Mr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Wa;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Xa*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function xc(e){e.bi_valid>8?xn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Sm(e,t,r,n){xc(e),n&&(xn(e,r),xn(e,~r)),um.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function tc(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function Za(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&tc(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!tc(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function rc(e,t,r){var n,i,o=0,a,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?rt(e,i,t):(a=yn[i],rt(e,a+vn+1,t),s=Ha[a],s!==0&&(i-=Ka[a],be(e,i,s)),n--,a=gc(n),rt(e,a,r),s=Yi[a],s!==0&&(n-=Wi[a],be(e,n,s)));while(o<e.last_lit);rt(e,Xa,t)}function ja(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,f;for(e.heap_len=0,e.heap_max=sc,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=l<2?++l:0,r[f*2]=1,e.depth[f]=0,e.opt_len--,i&&(e.static_len-=n[f*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Za(e,r,a);f=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Za(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[f*2]=r[a*2]+r[s*2],e.depth[f]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=f,e.heap[1]=f++,Za(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],_m(e,t),bc(r,l,e.bl_count)}function nc(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<f?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[fc*2]++):s<=10?e.bl_tree[lc*2]++:e.bl_tree[cc*2]++,s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4))}function ic(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<f)do rt(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(rt(e,o,e.bl_tree),s--),rt(e,fc,e.bl_tree),be(e,s-3,2)):s<=10?(rt(e,lc,e.bl_tree),be(e,s-3,3)):(rt(e,cc,e.bl_tree),be(e,s-11,7));s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4)}}function Tm(e){var t;for(nc(e,e.dyn_ltree,e.l_desc.max_code),nc(e,e.dyn_dtree,e.d_desc.max_code),ja(e,e.bl_desc),t=Wa-1;t>=3&&e.bl_tree[uc[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Cm(e,t,r,n){var i;for(be(e,t-257,5),be(e,r-1,5),be(e,n-4,4),i=0;i<n;i++)be(e,e.bl_tree[uc[i]*2+1],3);ic(e,e.dyn_ltree,t-1),ic(e,e.dyn_dtree,r-1)}function Am(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Jl;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return ec;for(r=32;r<vn;r++)if(e.dyn_ltree[r*2]!==0)return ec;return Jl}var oc=!1;function Pm(e){oc||(Em(),oc=!0),e.l_desc=new $a(e.dyn_ltree,dc),e.d_desc=new $a(e.dyn_dtree,hc),e.bl_desc=new $a(e.bl_tree,pc),e.bi_buf=0,e.bi_valid=0,yc(e)}function vc(e,t,r,n){be(e,(pm<<1)+(n?1:0),3),Sm(e,t,r,!0)}function km(e){be(e,ac<<1,3),rt(e,Xa,mt),wm(e)}function Mm(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===hm&&(e.strm.data_type=Am(e)),ja(e,e.l_desc),ja(e,e.d_desc),a=Tm(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?vc(e,t,r,n):e.strategy===dm||o===i?(be(e,(ac<<1)+(n?1:0),3),rc(e,mt,gn)):(be(e,(gm<<1)+(n?1:0),3),Cm(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),rc(e,e.dyn_ltree,e.dyn_dtree)),yc(e),n&&xc(e)}function Fm(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(yn[r]+vn+1)*2]++,e.dyn_dtree[gc(t)*2]++),e.last_lit===e.lit_bufsize-1}Lr._tr_init=Pm;Lr._tr_stored_block=vc;Lr._tr_flush_block=Mm;Lr._tr_tally=Fm;Lr._tr_align=km});var Qa=K((E5,_c)=>{"use strict";function Lm(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}_c.exports=Lm});var Ja=K((S5,Ec)=>{"use strict";function Im(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var Om=Im();function Rm(e,t,r,n){var i=Om,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Ec.exports=Rm});var Xi=K((T5,Sc)=>{"use strict";Sc.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Ic=K(ot=>{"use strict";var ge=gt(),Me=wc(),Pc=Qa(),Lt=Ja(),Bm=Xi(),Jt=0,Dm=1,Nm=3,Dt=4,Tc=5,it=0,Cc=1,Fe=-2,zm=-3,es=-5,Um=-1,qm=1,Ki=2,Gm=3,Vm=4,$m=0,Zm=2,to=8,Hm=9,jm=15,Ym=8,Wm=29,Xm=256,rs=Xm+1+Wm,Km=30,Qm=19,Jm=2*rs+1,e1=15,$=3,Rt=258,Ue=Rt+$+1,t1=32,ro=42,ns=69,Qi=73,Ji=91,eo=103,Xt=113,_n=666,se=1,En=2,Kt=3,Rr=4,r1=3;function Bt(e,t){return e.msg=Bm[t],t}function Ac(e){return(e<<1)-(e>4?9:0)}function Ot(e){for(var t=e.length;--t>=0;)e[t]=0}function It(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(ge.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function le(e,t){Me._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,It(e.strm)}function j(e,t){e.pending_buf[e.pending++]=t}function wn(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function n1(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,ge.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Pc(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Lt(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function kc(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-Ue?e.strstart-(e.w_size-Ue):0,f=e.window,c=e.w_mask,u=e.prev,d=e.strstart+Rt,h=f[n+a-1],g=f[n+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(f[i+a]!==g||f[i+a-1]!==h||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&n<d);if(o=Rt-(d-n),n=d-Rt,o>a){if(e.match_start=t,a=o,o>=s)break;h=f[n+a-1],g=f[n+a]}}while((t=u[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function Qt(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ue)){ge.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=n1(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=$)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+$-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<$)););}while(e.lookahead<Ue&&e.strm.avail_in!==0)}function i1(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Qt(e),e.lookahead===0&&t===Jt)return se;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,le(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ue&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):(e.strstart>e.block_start&&(le(e,!1),e.strm.avail_out===0),se)}function ts(e,t){for(var r,n;;){if(e.lookahead<Ue){if(Qt(e),e.lookahead<Ue&&t===Jt)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Ue&&(e.match_length=kc(e,r)),e.match_length>=$)if(n=Me._tr_tally(e,e.strstart-e.match_start,e.match_length-$),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=$){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=e.strstart<$-1?e.strstart:$-1,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function Ir(e,t){for(var r,n,i;;){if(e.lookahead<Ue){if(Qt(e),e.lookahead<Ue&&t===Jt)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=$-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Ue&&(e.match_length=kc(e,r),e.match_length<=5&&(e.strategy===qm||e.match_length===$&&e.strstart-e.match_start>4096)&&(e.match_length=$-1)),e.prev_length>=$&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-$,n=Me._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-$),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=$-1,e.strstart++,n&&(le(e,!1),e.strm.avail_out===0))return se}else if(e.match_available){if(n=Me._tr_tally(e,0,e.window[e.strstart-1]),n&&le(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return se}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Me._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<$-1?e.strstart:$-1,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function o1(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=Rt){if(Qt(e),e.lookahead<=Rt&&t===Jt)return se;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=$&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+Rt;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=Rt-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=$?(r=Me._tr_tally(e,1,e.match_length-$),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function a1(e,t){for(var r;;){if(e.lookahead===0&&(Qt(e),e.lookahead===0)){if(t===Jt)return se;break}if(e.match_length=0,r=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function nt(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Or;Or=[new nt(0,0,0,0,i1),new nt(4,4,8,4,ts),new nt(4,5,16,8,ts),new nt(4,6,32,32,ts),new nt(4,4,16,16,Ir),new nt(8,16,32,32,Ir),new nt(8,16,128,128,Ir),new nt(8,32,128,256,Ir),new nt(32,128,258,1024,Ir),new nt(32,258,258,4096,Ir)];function s1(e){e.window_size=2*e.w_size,Ot(e.head),e.max_lazy_match=Or[e.level].max_lazy,e.good_match=Or[e.level].good_length,e.nice_match=Or[e.level].nice_length,e.max_chain_length=Or[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=$-1,e.match_available=0,e.ins_h=0}function f1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=to,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ge.Buf16(Jm*2),this.dyn_dtree=new ge.Buf16((2*Km+1)*2),this.bl_tree=new ge.Buf16((2*Qm+1)*2),Ot(this.dyn_ltree),Ot(this.dyn_dtree),Ot(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ge.Buf16(e1+1),this.heap=new ge.Buf16(2*rs+1),Ot(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ge.Buf16(2*rs+1),Ot(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Mc(e){var t;return!e||!e.state?Bt(e,Fe):(e.total_in=e.total_out=0,e.data_type=Zm,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ro:Xt,e.adler=t.wrap===2?0:1,t.last_flush=Jt,Me._tr_init(t),it)}function Fc(e){var t=Mc(e);return t===it&&s1(e.state),t}function l1(e,t){return!e||!e.state||e.state.wrap!==2?Fe:(e.state.gzhead=t,it)}function Lc(e,t,r,n,i,o){if(!e)return Fe;var a=1;if(t===Um&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>Hm||r!==to||n<8||n>15||t<0||t>9||o<0||o>Vm)return Bt(e,Fe);n===8&&(n=9);var s=new f1;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+$-1)/$),s.window=new ge.Buf8(s.w_size*2),s.head=new ge.Buf16(s.hash_size),s.prev=new ge.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new ge.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,Fc(e)}function c1(e,t){return Lc(e,t,to,jm,Ym,$m)}function u1(e,t){var r,n,i,o;if(!e||!e.state||t>Tc||t<0)return e?Bt(e,Fe):Fe;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===_n&&t!==Dt)return Bt(e,e.avail_out===0?es:Fe);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ro)if(n.wrap===2)e.adler=0,j(n,31),j(n,139),j(n,8),n.gzhead?(j(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),j(n,n.gzhead.time&255),j(n,n.gzhead.time>>8&255),j(n,n.gzhead.time>>16&255),j(n,n.gzhead.time>>24&255),j(n,n.level===9?2:n.strategy>=Ki||n.level<2?4:0),j(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(j(n,n.gzhead.extra.length&255),j(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Lt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=ns):(j(n,0),j(n,0),j(n,0),j(n,0),j(n,0),j(n,n.level===9?2:n.strategy>=Ki||n.level<2?4:0),j(n,r1),n.status=Xt);else{var a=to+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=Ki||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,a|=s<<6,n.strstart!==0&&(a|=t1),a+=31-a%31,n.status=Xt,wn(n,a),n.strstart!==0&&(wn(n,e.adler>>>16),wn(n,e.adler&65535)),e.adler=1}if(n.status===ns)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),It(e),i=n.pending,n.pending===n.pending_buf_size));)j(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Qi)}else n.status=Qi;if(n.status===Qi)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),It(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=Ji)}else n.status=Ji;if(n.status===Ji)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),It(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=eo)}else n.status=eo;if(n.status===eo&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&It(e),n.pending+2<=n.pending_buf_size&&(j(n,e.adler&255),j(n,e.adler>>8&255),e.adler=0,n.status=Xt)):n.status=Xt),n.pending!==0){if(It(e),e.avail_out===0)return n.last_flush=-1,it}else if(e.avail_in===0&&Ac(t)<=Ac(r)&&t!==Dt)return Bt(e,es);if(n.status===_n&&e.avail_in!==0)return Bt(e,es);if(e.avail_in!==0||n.lookahead!==0||t!==Jt&&n.status!==_n){var l=n.strategy===Ki?a1(n,t):n.strategy===Gm?o1(n,t):Or[n.level].func(n,t);if((l===Kt||l===Rr)&&(n.status=_n),l===se||l===Kt)return e.avail_out===0&&(n.last_flush=-1),it;if(l===En&&(t===Dm?Me._tr_align(n):t!==Tc&&(Me._tr_stored_block(n,0,0,!1),t===Nm&&(Ot(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),It(e),e.avail_out===0))return n.last_flush=-1,it}return t!==Dt?it:n.wrap<=0?Cc:(n.wrap===2?(j(n,e.adler&255),j(n,e.adler>>8&255),j(n,e.adler>>16&255),j(n,e.adler>>24&255),j(n,e.total_in&255),j(n,e.total_in>>8&255),j(n,e.total_in>>16&255),j(n,e.total_in>>24&255)):(wn(n,e.adler>>>16),wn(n,e.adler&65535)),It(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?it:Cc)}function d1(e){var t;return!e||!e.state?Fe:(t=e.state.status,t!==ro&&t!==ns&&t!==Qi&&t!==Ji&&t!==eo&&t!==Xt&&t!==_n?Bt(e,Fe):(e.state=null,t===Xt?Bt(e,zm):it))}function h1(e,t){var r=t.length,n,i,o,a,s,l,f,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ro||n.lookahead))return Fe;for(a===1&&(e.adler=Pc(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(Ot(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new ge.Buf8(n.w_size),ge.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),s=e.avail_in,l=e.next_in,f=e.input,e.avail_in=r,e.next_in=0,e.input=t,Qt(n);n.lookahead>=$;){i=n.strstart,o=n.lookahead-($-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+$-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=$-1,Qt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=$-1,n.match_available=0,e.next_in=l,e.input=f,e.avail_in=s,n.wrap=a,it}ot.deflateInit=c1;ot.deflateInit2=Lc;ot.deflateReset=Fc;ot.deflateResetKeep=Mc;ot.deflateSetHeader=l1;ot.deflate=u1;ot.deflateEnd=d1;ot.deflateSetDictionary=h1;ot.deflateInfo="pako deflate (from Nodeca project)"});var is=K(Br=>{"use strict";var no=gt(),Oc=!0,Rc=!0;try{String.fromCharCode.apply(null,[0])}catch{Oc=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Rc=!1}var Sn=new no.Buf8(256);for(bt=0;bt<256;bt++)Sn[bt]=bt>=252?6:bt>=248?5:bt>=240?4:bt>=224?3:bt>=192?2:1;var bt;Sn[254]=Sn[254]=1;Br.string2buf=function(e){var t,r,n,i,o,a=e.length,s=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new no.Buf8(s),o=0,i=0;o<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function Bc(e,t){if(t<65534&&(e.subarray&&Rc||!e.subarray&&Oc))return String.fromCharCode.apply(null,no.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Br.buf2binstring=function(e){return Bc(e,e.length)};Br.binstring2buf=function(e){for(var t=new no.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Br.buf2string=function(e,t){var r,n,i,o,a=t||e.length,s=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){s[n++]=i;continue}if(o=Sn[i],o>4){s[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return Bc(s,n)};Br.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Sn[e[r]]>t?r:t}});var os=K((P5,Dc)=>{"use strict";function p1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Dc.exports=p1});var qc=K(An=>{"use strict";var Tn=Ic(),Cn=gt(),ss=is(),fs=Xi(),g1=os(),Uc=Object.prototype.toString,m1=0,as=4,Dr=0,Nc=1,zc=2,b1=-1,y1=0,x1=8;function er(e){if(!(this instanceof er))return new er(e);this.options=Cn.assign({level:b1,method:x1,chunkSize:16384,windowBits:15,memLevel:8,strategy:y1,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g1,this.strm.avail_out=0;var r=Tn.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Dr)throw new Error(fs[r]);if(t.header&&Tn.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=ss.string2buf(t.dictionary):Uc.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Tn.deflateSetDictionary(this.strm,n),r!==Dr)throw new Error(fs[r]);this._dict_set=!0}}er.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?as:m1,typeof e=="string"?r.input=ss.string2buf(e):Uc.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Cn.Buf8(n),r.next_out=0,r.avail_out=n),i=Tn.deflate(r,o),i!==Nc&&i!==Dr)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===as||o===zc))&&(this.options.to==="string"?this.onData(ss.buf2binstring(Cn.shrinkBuf(r.output,r.next_out))):this.onData(Cn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Nc);return o===as?(i=Tn.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Dr):(o===zc&&(this.onEnd(Dr),r.avail_out=0),!0)};er.prototype.onData=function(e){this.chunks.push(e)};er.prototype.onEnd=function(e){e===Dr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Cn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ls(e,t){var r=new er(t);if(r.push(e,!0),r.err)throw r.msg||fs[r.err];return r.result}function v1(e,t){return t=t||{},t.raw=!0,ls(e,t)}function w1(e,t){return t=t||{},t.gzip=!0,ls(e,t)}An.Deflate=er;An.deflate=ls;An.deflateRaw=v1;An.gzip=w1});var Vc=K((M5,Gc)=>{"use strict";var io=30,_1=12;Gc.exports=function(t,r){var n,i,o,a,s,l,f,c,u,d,h,g,x,T,_,v,M,L,I,B,N,p,m,b,y;n=t.state,i=t.next_in,b=t.input,o=i+(t.avail_in-5),a=t.next_out,y=t.output,s=a-(r-t.avail_out),l=a+(t.avail_out-257),f=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,g=n.hold,x=n.bits,T=n.lencode,_=n.distcode,v=(1<<n.lenbits)-1,M=(1<<n.distbits)-1;e:do{x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),L=T[g&v];t:for(;;){if(I=L>>>24,g>>>=I,x-=I,I=L>>>16&255,I===0)y[a++]=L&65535;else if(I&16){B=L&65535,I&=15,I&&(x<I&&(g+=b[i++]<<x,x+=8),B+=g&(1<<I)-1,g>>>=I,x-=I),x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),L=_[g&M];r:for(;;){if(I=L>>>24,g>>>=I,x-=I,I=L>>>16&255,I&16){if(N=L&65535,I&=15,x<I&&(g+=b[i++]<<x,x+=8,x<I&&(g+=b[i++]<<x,x+=8)),N+=g&(1<<I)-1,N>f){t.msg="invalid distance too far back",n.mode=io;break e}if(g>>>=I,x-=I,I=a-s,N>I){if(I=N-I,I>u&&n.sane){t.msg="invalid distance too far back",n.mode=io;break e}if(p=0,m=h,d===0){if(p+=c-I,I<B){B-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}else if(d<I){if(p+=c+d-I,I-=d,I<B){B-=I;do y[a++]=h[p++];while(--I);if(p=0,d<B){I=d,B-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}}else if(p+=d-I,I<B){B-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}for(;B>2;)y[a++]=m[p++],y[a++]=m[p++],y[a++]=m[p++],B-=3;B&&(y[a++]=m[p++],B>1&&(y[a++]=m[p++]))}else{p=a-N;do y[a++]=y[p++],y[a++]=y[p++],y[a++]=y[p++],B-=3;while(B>2);B&&(y[a++]=y[p++],B>1&&(y[a++]=y[p++]))}}else if(I&64){t.msg="invalid distance code",n.mode=io;break e}else{L=_[(L&65535)+(g&(1<<I)-1)];continue r}break}}else if(I&64)if(I&32){n.mode=_1;break e}else{t.msg="invalid literal/length code",n.mode=io;break e}else{L=T[(L&65535)+(g&(1<<I)-1)];continue t}break}}while(i<o&&a<l);B=x>>3,i-=B,x-=B<<3,g&=(1<<x)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=g,n.bits=x}});var Xc=K((F5,Wc)=>{"use strict";var $c=gt(),Nr=15,Zc=852,Hc=592,jc=0,cs=1,Yc=2,E1=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],S1=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T1=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],C1=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Wc.exports=function(t,r,n,i,o,a,s,l){var f=l.bits,c=0,u=0,d=0,h=0,g=0,x=0,T=0,_=0,v=0,M=0,L,I,B,N,p,m=null,b=0,y,w=new $c.Buf16(Nr+1),S=new $c.Buf16(Nr+1),P=null,E=0,C,k,A;for(c=0;c<=Nr;c++)w[c]=0;for(u=0;u<i;u++)w[r[n+u]]++;for(g=f,h=Nr;h>=1&&w[h]===0;h--);if(g>h&&(g=h),h===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d<h&&w[d]===0;d++);for(g<d&&(g=d),_=1,c=1;c<=Nr;c++)if(_<<=1,_-=w[c],_<0)return-1;if(_>0&&(t===jc||h!==1))return-1;for(S[1]=0,c=1;c<Nr;c++)S[c+1]=S[c]+w[c];for(u=0;u<i;u++)r[n+u]!==0&&(s[S[r[n+u]]++]=u);if(t===jc?(m=P=s,y=19):t===cs?(m=E1,b-=257,P=S1,E-=257,y=256):(m=T1,P=C1,y=-1),M=0,u=0,c=d,p=a,x=g,T=0,B=-1,v=1<<g,N=v-1,t===cs&&v>Zc||t===Yc&&v>Hc)return 1;for(;;){C=c-T,s[u]<y?(k=0,A=s[u]):s[u]>y?(k=P[E+s[u]],A=m[b+s[u]]):(k=32+64,A=0),L=1<<c-T,I=1<<x,d=I;do I-=L,o[p+(M>>T)+I]=C<<24|k<<16|A|0;while(I!==0);for(L=1<<c-1;M&L;)L>>=1;if(L!==0?(M&=L-1,M+=L):M=0,u++,--w[c]===0){if(c===h)break;c=r[n+s[u]]}if(c>g&&(M&N)!==B){for(T===0&&(T=g),p+=d,x=c-T,_=1<<x;x+T<h&&(_-=w[x+T],!(_<=0));)x++,_<<=1;if(v+=1<<x,t===cs&&v>Zc||t===Yc&&v>Hc)return 1;B=M&N,o[B]=g<<24|x<<16|p-a|0}}return M!==0&&(o[p+M]=c-T<<24|64<<16|0),l.bits=g,0}});var Fu=K(qe=>{"use strict";var Te=gt(),ms=Qa(),at=Ja(),A1=Vc(),Pn=Xc(),P1=0,_u=1,Eu=2,Kc=4,k1=5,oo=6,tr=0,M1=1,F1=2,Le=-2,Su=-3,bs=-4,L1=-5,Qc=8,Tu=1,Jc=2,eu=3,tu=4,ru=5,nu=6,iu=7,ou=8,au=9,su=10,fo=11,yt=12,us=13,fu=14,ds=15,lu=16,cu=17,uu=18,du=19,ao=20,so=21,hu=22,pu=23,gu=24,mu=25,bu=26,hs=27,yu=28,xu=29,Q=30,ys=31,I1=32,O1=852,R1=592,B1=15,D1=B1;function vu(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function N1(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Te.Buf16(320),this.work=new Te.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Cu(e){var t;return!e||!e.state?Le:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Tu,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Te.Buf32(O1),t.distcode=t.distdyn=new Te.Buf32(R1),t.sane=1,t.back=-1,tr)}function Au(e){var t;return!e||!e.state?Le:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Cu(e))}function Pu(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Le:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Au(e))}function ku(e,t){var r,n;return e?(n=new N1,e.state=n,n.window=null,r=Pu(e,t),r!==tr&&(e.state=null),r):Le}function z1(e){return ku(e,D1)}var wu=!0,ps,gs;function U1(e){if(wu){var t;for(ps=new Te.Buf32(512),gs=new Te.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Pn(_u,e.lens,0,288,ps,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Pn(Eu,e.lens,0,32,gs,0,e.work,{bits:5}),wu=!1}e.lencode=ps,e.lenbits=9,e.distcode=gs,e.distbits=5}function Mu(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Te.Buf8(o.wsize)),n>=o.wsize?(Te.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Te.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Te.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function q1(e,t){var r,n,i,o,a,s,l,f,c,u,d,h,g,x,T=0,_,v,M,L,I,B,N,p,m=new Te.Buf8(4),b,y,w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Le;r=e.state,r.mode===yt&&(r.mode=us),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,u=s,d=l,p=tr;e:for(;;)switch(r.mode){case Tu:if(r.wrap===0){r.mode=us;break}for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.wrap&2&&f===35615){r.check=0,m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0),f=0,c=0,r.mode=Jc;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=Q;break}if((f&15)!==Qc){e.msg="unknown compression method",r.mode=Q;break}if(f>>>=4,c-=4,N=(f&15)+8,r.wbits===0)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=Q;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=f&512?su:yt,f=0,c=0;break;case Jc:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.flags=f,(r.flags&255)!==Qc){e.msg="unknown compression method",r.mode=Q;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Q;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=eu;case eu:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.time=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,m[2]=f>>>16&255,m[3]=f>>>24&255,r.check=at(r.check,m,4,0)),f=0,c=0,r.mode=tu;case tu:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=ru;case ru:if(r.flags&1024){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=nu;case nu:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Te.arraySet(r.head.extra,n,o,h,N)),r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,r.length-=h),r.length))break e;r.length=0,r.mode=iu;case iu:if(r.flags&2048){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=ou;case ou:if(r.flags&4096){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.comment=null);r.mode=au;case au:if(r.flags&512){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Q;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=yt;break;case su:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}e.adler=r.check=vu(f),f=0,c=0,r.mode=fo;case fo:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,F1;e.adler=r.check=1,r.mode=yt;case yt:if(t===k1||t===oo)break e;case us:if(r.last){f>>>=c&7,c-=c&7,r.mode=hs;break}for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}switch(r.last=f&1,f>>>=1,c-=1,f&3){case 0:r.mode=fu;break;case 1:if(U1(r),r.mode=ao,t===oo){f>>>=2,c-=2;break e}break;case 2:r.mode=cu;break;case 3:e.msg="invalid block type",r.mode=Q}f>>>=2,c-=2;break;case fu:for(f>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if((f&65535)!==(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Q;break}if(r.length=f&65535,f=0,c=0,r.mode=ds,t===oo)break e;case ds:r.mode=lu;case lu:if(h=r.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;Te.arraySet(i,n,o,h,a),s-=h,o+=h,l-=h,a+=h,r.length-=h;break}r.mode=yt;break;case cu:for(;c<14;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.nlen=(f&31)+257,f>>>=5,c-=5,r.ndist=(f&31)+1,f>>>=5,c-=5,r.ncode=(f&15)+4,f>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Q;break}r.have=0,r.mode=uu;case uu:for(;r.have<r.ncode;){for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.lens[w[r.have++]]=f&7,f>>>=3,c-=3}for(;r.have<19;)r.lens[w[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,b={bits:r.lenbits},p=Pn(P1,r.lens,0,19,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid code lengths set",r.mode=Q;break}r.have=0,r.mode=du;case du:for(;r.have<r.nlen+r.ndist;){for(;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,v=T>>>16&255,M=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(M<16)f>>>=_,c-=_,r.lens[r.have++]=M;else{if(M===16){for(y=_+2;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Q;break}N=r.lens[r.have-1],h=3+(f&3),f>>>=2,c-=2}else if(M===17){for(y=_+3;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=3+(f&7),f>>>=3,c-=3}else{for(y=_+7;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=11+(f&127),f>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Q;break}for(;h--;)r.lens[r.have++]=N}}if(r.mode===Q)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Q;break}if(r.lenbits=9,b={bits:r.lenbits},p=Pn(_u,r.lens,0,r.nlen,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid literal/lengths set",r.mode=Q;break}if(r.distbits=6,r.distcode=r.distdyn,b={bits:r.distbits},p=Pn(Eu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,b),r.distbits=b.bits,p){e.msg="invalid distances set",r.mode=Q;break}if(r.mode=ao,t===oo)break e;case ao:r.mode=so;case so:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,A1(e,d),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,r.mode===yt&&(r.back=-1);break}for(r.back=0;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,v=T>>>16&255,M=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(v&&!(v&240)){for(L=_,I=v,B=M;T=r.lencode[B+((f&(1<<L+I)-1)>>L)],_=T>>>24,v=T>>>16&255,M=T&65535,!(L+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=L,c-=L,r.back+=L}if(f>>>=_,c-=_,r.back+=_,r.length=M,v===0){r.mode=bu;break}if(v&32){r.back=-1,r.mode=yt;break}if(v&64){e.msg="invalid literal/length code",r.mode=Q;break}r.extra=v&15,r.mode=hu;case hu:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=pu;case pu:for(;T=r.distcode[f&(1<<r.distbits)-1],_=T>>>24,v=T>>>16&255,M=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(!(v&240)){for(L=_,I=v,B=M;T=r.distcode[B+((f&(1<<L+I)-1)>>L)],_=T>>>24,v=T>>>16&255,M=T&65535,!(L+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=L,c-=L,r.back+=L}if(f>>>=_,c-=_,r.back+=_,v&64){e.msg="invalid distance code",r.mode=Q;break}r.offset=M,r.extra=v&15,r.mode=gu;case gu:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Q;break}r.mode=mu;case mu:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Q;break}h>r.wnext?(h-=r.wnext,g=r.wsize-h):g=r.wnext-h,h>r.length&&(h=r.length),x=r.window}else x=i,g=a-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[a++]=x[g++];while(--h);r.length===0&&(r.mode=so);break;case bu:if(l===0)break e;i[a++]=r.length,l--,r.mode=so;break;case hs:if(r.wrap){for(;c<32;){if(s===0)break e;s--,f|=n[o++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?at(r.check,i,d,a-d):ms(r.check,i,d,a-d)),d=l,(r.flags?f:vu(f))!==r.check){e.msg="incorrect data check",r.mode=Q;break}f=0,c=0}r.mode=yu;case yu:if(r.wrap&&r.flags){for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Q;break}f=0,c=0}r.mode=xu;case xu:p=M1;break e;case Q:p=Su;break e;case ys:return bs;case I1:default:return Le}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<Q&&(r.mode<hs||t!==Kc))&&Mu(e,e.output,e.next_out,d-e.avail_out)?(r.mode=ys,bs):(u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?at(r.check,i,d,e.next_out-d):ms(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===yt?128:0)+(r.mode===ao||r.mode===ds?256:0),(u===0&&d===0||t===Kc)&&p===tr&&(p=L1),p)}function G1(e){if(!e||!e.state)return Le;var t=e.state;return t.window&&(t.window=null),e.state=null,tr}function V1(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Le:(r.head=t,t.done=!1,tr)}function $1(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==fo)?Le:n.mode===fo&&(i=1,i=ms(i,t,r,0),i!==n.check)?Su:(o=Mu(e,t,r,r),o?(n.mode=ys,bs):(n.havedict=1,tr))}qe.inflateReset=Au;qe.inflateReset2=Pu;qe.inflateResetKeep=Cu;qe.inflateInit=z1;qe.inflateInit2=ku;qe.inflate=q1;qe.inflateEnd=G1;qe.inflateGetHeader=V1;qe.inflateSetDictionary=$1;qe.inflateInfo="pako inflate (from Nodeca project)"});var xs=K((I5,Lu)=>{"use strict";Lu.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Ou=K((O5,Iu)=>{"use strict";function Z1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Iu.exports=Z1});var Bu=K(Mn=>{"use strict";var zr=Fu(),kn=gt(),lo=is(),oe=xs(),vs=Xi(),H1=os(),j1=Ou(),Ru=Object.prototype.toString;function rr(e){if(!(this instanceof rr))return new rr(e);this.options=kn.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H1,this.strm.avail_out=0;var r=zr.inflateInit2(this.strm,t.windowBits);if(r!==oe.Z_OK)throw new Error(vs[r]);if(this.header=new j1,zr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=lo.string2buf(t.dictionary):Ru.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=zr.inflateSetDictionary(this.strm,t.dictionary),r!==oe.Z_OK)))throw new Error(vs[r])}rr.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,s,l,f,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?oe.Z_FINISH:oe.Z_NO_FLUSH,typeof e=="string"?r.input=lo.binstring2buf(e):Ru.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new kn.Buf8(n),r.next_out=0,r.avail_out=n),o=zr.inflate(r,oe.Z_NO_FLUSH),o===oe.Z_NEED_DICT&&i&&(o=zr.inflateSetDictionary(this.strm,i)),o===oe.Z_BUF_ERROR&&c===!0&&(o=oe.Z_OK,c=!1),o!==oe.Z_STREAM_END&&o!==oe.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===oe.Z_STREAM_END||r.avail_in===0&&(a===oe.Z_FINISH||a===oe.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=lo.utf8border(r.output,r.next_out),l=r.next_out-s,f=lo.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&kn.arraySet(r.output,r.output,s,l,0),this.onData(f)):this.onData(kn.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==oe.Z_STREAM_END);return o===oe.Z_STREAM_END&&(a=oe.Z_FINISH),a===oe.Z_FINISH?(o=zr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===oe.Z_OK):(a===oe.Z_SYNC_FLUSH&&(this.onEnd(oe.Z_OK),r.avail_out=0),!0)};rr.prototype.onData=function(e){this.chunks.push(e)};rr.prototype.onEnd=function(e){e===oe.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=kn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ws(e,t){var r=new rr(t);if(r.push(e,!0),r.err)throw r.msg||vs[r.err];return r.result}function Y1(e,t){return t=t||{},t.raw=!0,ws(e,t)}Mn.Inflate=rr;Mn.inflate=ws;Mn.inflateRaw=Y1;Mn.ungzip=ws});var zu=K((B5,Nu)=>{"use strict";var W1=gt().assign,X1=qc(),K1=Bu(),Q1=xs(),Du={};W1(Du,X1,K1,Q1);Nu.exports=Du});var Uu=K(()=>{});var qu=K(_s=>{_s.read=function(e,t,r,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,f=l>>1,c=-7,u=r?i-1:0,d=r?-1:1,h=e[t+u];for(u+=d,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=o*256+e[t+u],u+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=a*256+e[t+u],u+=d,c-=8);if(o===0)o=1-f;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(h?-1:1)*a*Math.pow(2,o-n)};_s.write=function(e,t,r,n,i,o){var a,s,l,f=o*8-i-1,c=(1<<f)-1,u=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,g=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+u>=1?t+=d/l:t+=d*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,i),a=a+u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=s&255,h+=g,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[r+h]=a&255,h+=g,a/=256,f-=8);e[r+h-g]|=x*128}});var ju=K((e7,Hu)=>{"use strict";Hu.exports=Y;var uo=qu();function Y(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Y.Varint=0;Y.Fixed64=1;Y.Bytes=2;Y.Fixed32=5;var Es=(1<<16)*(1<<16),Gu=1/Es,J1=12,Zu=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");Y.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=n&7,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=ho(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=$u(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=ho(this.buf,this.pos)+ho(this.buf,this.pos+4)*Es;return this.pos+=8,e},readSFixed64:function(){var e=ho(this.buf,this.pos)+$u(this.buf,this.pos+4)*Es;return this.pos+=8,e},readFloat:function(){var e=uo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=uo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,r,n;return n=t[this.pos++],r=n&127,n<128||(n=t[this.pos++],r|=(n&127)<<7,n<128)||(n=t[this.pos++],r|=(n&127)<<14,n<128)||(n=t[this.pos++],r|=(n&127)<<21,n<128)?r:(n=t[this.pos],r|=(n&15)<<28,eb(r,e,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=J1&&Zu?pb(this.buf,t,e):hb(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Y.Bytes)return e.push(this.readVarint(t));var r=vt(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==Y.Bytes)return e.push(this.readSVarint());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==Y.Bytes)return e.push(this.readBoolean());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==Y.Bytes)return e.push(this.readFloat());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==Y.Bytes)return e.push(this.readDouble());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==Y.Bytes)return e.push(this.readFixed32());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==Y.Bytes)return e.push(this.readSFixed32());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==Y.Bytes)return e.push(this.readFixed64());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==Y.Bytes)return e.push(this.readSFixed64());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=e&7;if(t===Y.Varint)for(;this.buf[this.pos++]>127;);else if(t===Y.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Y.Fixed32)this.pos+=4;else if(t===Y.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Vr(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Vr(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Vr(this.buf,e&-1,this.pos),Vr(this.buf,Math.floor(e*Gu),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Vr(this.buf,e&-1,this.pos),Vr(this.buf,Math.floor(e*Gu),this.pos+4),this.pos+=8},writeVarint:function(e){if(e=+e||0,e>268435455||e<0){tb(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))},writeSVarint:function(e){this.writeVarint(e<0?-e*2-1:e*2)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(e.length*4),this.pos++;var t=this.pos;this.pos=gb(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Vu(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),uo.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),uo.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var n=this.pos-r;n>=128&&Vu(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,Y.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,ib,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,ob,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,fb,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ab,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,sb,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,lb,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,cb,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,ub,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,db,t)},writeBytesField:function(e,t){this.writeTag(e,Y.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Y.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Y.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Y.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Y.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Y.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Y.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Y.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Y.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Y.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};function eb(e,t,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return Gr(e,i,t);throw new Error("Expected varint not more than 10 bytes")}function vt(e){return e.type===Y.Bytes?e.readVarint()+e.pos:e.pos+1}function Gr(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function tb(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(r=~(-e%4294967296),n=~(-e/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),rb(r,n,t),nb(n,t)}function rb(e,t,r){r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos]=e&127}function nb(e,t){var r=(e&7)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127)))))}function Vu(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function ib(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function ob(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function ab(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function sb(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function fb(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function lb(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function cb(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function ub(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function db(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function ho(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}function Vr(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function $u(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function hb(e,t,r){for(var n="",i=t;i<r;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,f,c;s===1?o<128&&(a=o):s===2?(l=e[i+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(a=(o&15)<<12|(l&63)<<6|f&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=e[i+1],f=e[i+2],c=e[i+3],(l&192)===128&&(f&192)===128&&(c&192)===128&&(a=(o&15)<<18|(l&63)<<12|(f&63)<<6|c&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=s}return n}function pb(e,t,r){return Zu.decode(e.subarray(t,r))}function gb(e,t,r){for(var n=0,i,o;n<t.length;n++){if(i=t.charCodeAt(n),i>55295&&i<57344)if(o)if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=i;continue}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=i&63|128)}return r}});var Dd=K((p4,Ls)=>{"use strict";Ls.exports=Mo;Ls.exports.default=Mo;function Mo(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Od(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var s,l,f,c,u,d,h;if(n&&(o=Xb(e,t,o,r)),e.length>80*r){s=f=e[0],l=c=e[1];for(var g=r;g<i;g+=r)u=e[g],d=e[g+1],u<s&&(s=u),d<l&&(l=d),u>f&&(f=u),d>c&&(c=d);h=Math.max(f-s,c-l),h=h!==0?32767/h:0}return ii(o,a,r,s,l,h,0),a}function Od(e,t,r,n,i){var o,a;if(i===Fs(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Id(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Id(o,e[o],e[o+1],a);return a&&Fo(a,a.next)&&(ai(a),a=a.next),a}function lr(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Fo(r,r.next)||ee(r.prev,r,r.next)===0)){if(ai(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ii(e,t,r,n,i,o,a){if(e){!a&&o&&ty(e,n,i,o);for(var s=e,l,f;e.prev!==e.next;){if(l=e.prev,f=e.next,o?jb(e,n,i,o):Hb(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),ai(e),e=f.next,s=f.next;continue}if(e=f,e===s){a?a===1?(e=Yb(lr(e),t,r),ii(e,t,r,n,i,o,2)):a===2&&Wb(e,t,r,n,i,o):ii(lr(e),t,r,n,i,o,1);break}}}}function Hb(e){var t=e.prev,r=e,n=e.next;if(ee(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,l=r.y,f=n.y,c=i<o?i<a?i:a:o<a?o:a,u=s<l?s<f?s:f:l<f?l:f,d=i>o?i>a?i:a:o>a?o:a,h=s>l?s>f?s:f:l>f?l:f,g=n.next;g!==t;){if(g.x>=c&&g.x<=d&&g.y>=u&&g.y<=h&&Hr(i,s,o,l,a,f,g.x,g.y)&&ee(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function jb(e,t,r,n){var i=e.prev,o=e,a=e.next;if(ee(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,f=a.x,c=i.y,u=o.y,d=a.y,h=s<l?s<f?s:f:l<f?l:f,g=c<u?c<d?c:d:u<d?u:d,x=s>l?s>f?s:f:l>f?l:f,T=c>u?c>d?c:d:u>d?u:d,_=ks(h,g,t,r,n),v=ks(x,T,t,r,n),M=e.prevZ,L=e.nextZ;M&&M.z>=_&&L&&L.z<=v;){if(M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Hr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0||(M=M.prevZ,L.x>=h&&L.x<=x&&L.y>=g&&L.y<=T&&L!==i&&L!==a&&Hr(s,c,l,u,f,d,L.x,L.y)&&ee(L.prev,L,L.next)>=0))return!1;L=L.nextZ}for(;M&&M.z>=_;){if(M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Hr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;L&&L.z<=v;){if(L.x>=h&&L.x<=x&&L.y>=g&&L.y<=T&&L!==i&&L!==a&&Hr(s,c,l,u,f,d,L.x,L.y)&&ee(L.prev,L,L.next)>=0)return!1;L=L.nextZ}return!0}function Yb(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Fo(i,o)&&Rd(i,n,n.next,o)&&oi(i,o)&&oi(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),ai(n),ai(n.next),n=e=o),n=n.next}while(n!==e);return lr(n)}function Wb(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&iy(a,s)){var l=Bd(a,s);a=lr(a,a.next),l=lr(l,l.next),ii(a,t,r,n,i,o,0),ii(l,t,r,n,i,o,0);return}s=s.next}a=a.next}while(a!==e)}function Xb(e,t,r,n){var i=[],o,a,s,l,f;for(o=0,a=t.length;o<a;o++)s=t[o]*n,l=o<a-1?t[o+1]*n:e.length,f=Od(e,s,l,n,!1),f===f.next&&(f.steiner=!0),i.push(ny(f));for(i.sort(Kb),o=0;o<i.length;o++)r=Qb(i[o],r);return r}function Kb(e,t){return e.x-t.x}function Qb(e,t){var r=Jb(e,t);if(!r)return t;var n=Bd(r,e);return lr(n,n.next),lr(r,r.next)}function Jb(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o&&(o=s,a=r.x<r.next.x?r:r.next,s===n))return a}r=r.next}while(r!==t);if(!a)return null;var l=a,f=a.x,c=a.y,u=1/0,d;r=a;do n>=r.x&&r.x>=f&&n!==r.x&&Hr(i<c?n:o,i,f,c,i<c?o:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),oi(r,e)&&(d<u||d===u&&(r.x>a.x||r.x===a.x&&ey(a,r)))&&(a=r,u=d)),r=r.next;while(r!==l);return a}function ey(e,t){return ee(e.prev,e,t.prev)<0&&ee(t.next,e,e.next)<0}function ty(e,t,r,n){var i=e;do i.z===0&&(i.z=ks(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,ry(i)}function ry(e){var t,r,n,i,o,a,s,l,f=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<f&&(s++,n=n.nextZ,!!n);t++);for(l=f;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,f*=2}while(a>1);return e}function ks(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function ny(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Hr(e,t,r,n,i,o,a,s){return(i-a)*(t-s)>=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function iy(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!oy(e,t)&&(oi(e,t)&&oi(t,e)&&ay(e,t)&&(ee(e.prev,e,t.prev)||ee(e,t.prev,t))||Fo(e,t)&&ee(e.prev,e,e.next)>0&&ee(t.prev,t,t.next)>0)}function ee(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Fo(e,t){return e.x===t.x&&e.y===t.y}function Rd(e,t,r,n){var i=ko(ee(e,t,r)),o=ko(ee(e,t,n)),a=ko(ee(r,n,e)),s=ko(ee(r,n,t));return!!(i!==o&&a!==s||i===0&&Po(e,r,t)||o===0&&Po(e,n,t)||a===0&&Po(r,e,n)||s===0&&Po(r,t,n))}function Po(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function ko(e){return e>0?1:e<0?-1:0}function oy(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Rd(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function oi(e,t){return ee(e.prev,e,e.next)<0?ee(e,t,e.next)>=0&&ee(e,e.prev,t)>=0:ee(e,t,e.prev)<0||ee(e,e.next,t)<0}function ay(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Bd(e,t){var r=new Ms(e.i,e.x,e.y),n=new Ms(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Id(e,t,r,n){var i=new Ms(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ai(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ms(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Mo.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(Fs(e,0,o,r));if(i)for(var s=0,l=t.length;s<l;s++){var f=t[s]*r,c=s<l-1?t[s+1]*r:e.length;a-=Math.abs(Fs(e,f,c,r))}var u=0;for(s=0;s<n.length;s+=3){var d=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;u+=Math.abs((e[d]-e[g])*(e[h+1]-e[d+1])-(e[d]-e[h])*(e[g+1]-e[d+1]))}return a===0&&u===0?0:Math.abs((u-a)/a)};function Fs(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Mo.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var $d=K((x4,Vd)=>{Vd.exports=globalThis.deck});var Sr={};Ma(Sr,{carto:()=>V_});var Aa={};Ma(Aa,{BASEMAP:()=>rg,CARTO_LAYERS:()=>G_,ClusterTileLayer:()=>Vn,H3TileLayer:()=>sr,HeatmapTileLayer:()=>Xn,LayerFactory:()=>ol,PointLabelLayer:()=>Jn,QuadbinTileLayer:()=>fr,RasterTileLayer:()=>ni,VectorTileLayer:()=>Yr,_GOOGLE_BASEMAPS:()=>Sa,_QuadbinLayer:()=>xo,_RasterLayer:()=>Ao,_STYLE_LAYER_GROUPS:()=>el,_SpatialIndexTileLayer:()=>$r,_applyLayerGroupFilters:()=>Ta,_fetchStyle:()=>Ca,_getStyleUrl:()=>Ke,colorBins:()=>rl,colorCategories:()=>nl,colorContinuous:()=>il,fetchBasemapProps:()=>sg,fetchMap:()=>og});var nd=q(kt(),1),id=q(pt(),1),od=q(cn(),1);function Fa(e,t){let r=t?.globalFeatureId;return r!==void 0?gg(e,r):mg(e,t?.type)}function gg(e,t){let r=ul(e);for(let n of r){let i=0,o=n.featureIds.value[0];for(let a=0;a<n.featureIds.value.length;a++){let s=n.featureIds.value[a];if(s!==o){if(t===n.globalFeatureIds.value[i])return zi(n,i,a);i=a,o=s}}if(t===n.globalFeatureIds.value[i])return zi(n,i,n.featureIds.value.length)}throw new Error(`featureId:${t} not found`)}function mg(e,t){let r=ul(e,t);return bg(r)}function cl(e,t,r){switch(e.type){case"Point":return wg(e,t,r);case"LineString":return vg(e,t,r);case"Polygon":return dl(e,t,r);default:let n=e;throw new Error(`Unsupported geometry type: ${n?.type}`)}}function ul(e,t){let r=[];return e.points&&(e.points.type="Point",r.push(e.points)),e.lines&&(e.lines.type="LineString",r.push(e.lines)),e.polygons&&(e.polygons.type="Polygon",r.push(e.polygons)),r}function bg(e){let t=[];for(let r of e){if(r.featureIds.value.length===0)continue;let n=0,i=r.featureIds.value[0];for(let o=0;o<r.featureIds.value.length;o++){let a=r.featureIds.value[o];a!==i&&(t.push(zi(r,n,o)),n=o,i=a)}t.push(zi(r,n,r.featureIds.value.length))}return t}function zi(e,t,r){let n=cl(e,t,r),i=xg(e,t,r),o=yg(e,t,r);return{type:"Feature",geometry:n,properties:i,...o}}function yg(e,t=0,r){return e.fields&&e.fields[e.featureIds.value[t]]}function xg(e,t=0,r){let n=Object.assign({},e.properties[e.featureIds.value[t]]);for(let i in e.numericProps)n[i]=e.numericProps[i].value[t];return n}function dl(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.polygonIndices.value.filter(l=>l>=t&&l<=r),o=e.primitivePolygonIndices.value.filter(l=>l>=t&&l<=r);if(!(i.length>2)){let l=[];for(let f=0;f<o.length-1;f++){let c=o[f],u=o[f+1],d=Ui(n,c,u);l.push(d)}return{type:"Polygon",coordinates:l}}let s=[];for(let l=0;l<i.length-1;l++){let f=i[l],c=i[l+1],u=dl(e,f,c).coordinates;s.push(u)}return{type:"MultiPolygon",coordinates:s}}function vg(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.pathIndices.value.filter(s=>s>=t&&s<=r);if(!(i.length>2))return{type:"LineString",coordinates:Ui(n,i[0],i[1])};let a=[];for(let s=0;s<i.length-1;s++){let l=Ui(n,i[s],i[s+1]);a.push(l)}return{type:"MultiLineString",coordinates:a}}function wg(e,t,r){let{positions:n}=e,i=Ui(n,t,r);return i.length>1?{type:"MultiPoint",coordinates:i}:{type:"Point",coordinates:i[0]}}function Ui(e,t,r){t=t||0,r=r||e.value.length/e.size;let n=[];for(let i=t;i<r;i++){let o=Array();for(let a=i*e.size;a<(i+1)*e.size;a++)o.push(Number(e.value[a]));n.push(o)}return n}var zn=q(Ee(),1);var Kg=q(Al(),1);var jt=Math.PI,Ng=jt/4,i3=jt/180,Pl=180/jt,kl=512;function Se(e){let[t,r]=e,n=t/kl*(2*jt)-jt,i=2*(Math.atan(Math.exp(r/kl*(2*jt)-jt))-Ng);return[n*Pl,i*Pl]}var d3=Math.PI/180;var Ll=[0x5555555555555555n,0x3333333333333333n,0x0f0f0f0f0f0f0f0fn,0x00ff00ff00ff00ffn,0x0000ffff0000ffffn,0x00000000ffffffffn],Il=[0n,1n,2n,4n,8n,16n];function Ol(e){return BigInt(`0x${e}`)}function un(e){return e.toString(16)}function Rl(e){if(e.z<0||e.z>26)throw new Error("Wrong zoom");let t=BigInt(e.z),r=BigInt(e.x)<<32n-t,n=BigInt(e.y)<<32n-t;for(let o=0;o<5;o++){let a=Il[5-o],s=Ll[4-o];r=(r|r<<a)&s,n=(n|n<<a)&s}return 0x4000000000000000n|1n<<59n|t<<52n|(r|n<<1n)>>12n|0xfffffffffffffn>>t*2n}function Gi(e){let t=e>>59n&7n,r=e>>57n&3n,n=e>>52n&0x1fn,i=(e&0xfffffffffffffn)<<12n;if(t!==1n&&r!==0n)throw new Error("Wrong mode");let o=i,a=i>>1n;for(let s=0;s<6;s++){let l=Il[s],f=Ll[s];o=(o|o>>l)&f,a=(a|a>>l)&f}return o=o>>32n-n,a=a>>32n-n,{z:Number(n),x:Number(o),y:Number(a)}}function dn(e){return e>>52n&0x1fn}function Vi(e){let t=dn(e)-1n;return e&~(0x1fn<<52n)|t<<52n|0xfffffffffffffn>>t*2n}var Zi=q(Yt(),1),zl=q(Ee(),1);var Dl=q(Ee(),1);function ke(e,t){Dl.log.assert(e,t)}function Nl(e,t){let{properties:r,numericProps:n}=e;return new Proxy(r[t]||{},{get(i,o){return o in n?n[o].value[t]:i[o]},has(i,o){return o in n||o in i},ownKeys(i){return[...Object.keys(n),...Reflect.ownKeys(i)]},getOwnPropertyDescriptor(i,o){return{enumerable:!0,configurable:!0}}})}function Mt(e,t){return`https://unpkg.com/@deck.gl/carto@${t}/dist/${e}-worker.js`}var hn=new Uint16Array,Ba={positions:{value:new Float32Array,size:2},properties:[],numericProps:{},featureIds:{value:hn,size:1},globalFeatureIds:{value:hn,size:1}};function $i(){return{shape:"binary-feature-collection",points:{type:"Point",...Ba},lines:{type:"LineString",pathIndices:{value:hn,size:1},...Ba},polygons:{type:"Polygon",polygonIndices:{value:hn,size:1},primitivePolygonIndices:{value:hn,size:1},...Ba}}}function pn(e,t,r,n,i,o=2){return{type:"Point",positions:{value:new Float32Array(e),size:o},featureIds:{value:new Uint16Array(t),size:1},globalFeatureIds:{value:new Uint32Array(r),size:1},numericProps:n,properties:i}}function Da(e,t){let r={};return t&&Object.keys(t).forEach(n=>{r[n]={value:new Float32Array(e),size:1}}),r}function Na(e,t,r,n){Object.keys(e).forEach(i=>{t[i].value[n]=e[i].value[r]})}function Ul(e,t,r,n=[],i,o,a="quadbin"){if(!e.content)return!1;e.userData||(e.userData={});let s=t.get(r)?.[0];if(s){if(n.every(f=>f.name in s))return!1;t.clear()}let l={};for(let f of e.content){let c=f.id,u=typeof i=="function"?i(f,{}):i;for(let T=0;T<r-1;T++)if(a==="h3"){let _=(0,Zi.getResolution)(c);c=(0,Zi.cellToParent)(c,Math.max(0,_-1))}else c=Vi(c);let d=String(c);if(!(d in l)){l[d]={id:c,count:0,position:[0,0]};for(let{name:T,aggregation:_}of n)_==="any"?l[d][T]=f.properties[T]:l[d][T]=0}let h=l[d].count;l[d].count+=typeof o=="function"?o(f,{}):o;let g=l[d].count,x=g-h;l[d].position[0]=(h*l[d].position[0]+x*u[0])/g,l[d].position[1]=(h*l[d].position[1]+x*u[1])/g;for(let{name:T,aggregation:_}of n){let v=l[d][T],M=f.properties[T];_==="average"?l[d][T]=(h*v+x*M)/g:_==="count"||_==="sum"?l[d][T]=v+M:_==="max"?l[d][T]=Math.max(v,M):_==="min"&&(l[d][T]=Math.min(v,M))}}return t.set(r,Object.values(l)),!0}function ql(e){let t=[],r=["any","average","count","min","max","sum"];for(let n of Object.keys(e.content[0].properties)){let i=n.split("_").pop().toLowerCase();r.includes(i)||(zl.log.warn(`No valid aggregation present in ${n} property`)(),i="any"),t.push({name:n,aggregation:i})}return t}function Gl(e,t){let r={};for(let{name:n,aggregation:i}of t)if(r[n]={min:1/0,max:-1/0},i!=="any")for(let o of e)r[n].min=Math.min(r[n].min,o[n]),r[n].max=Math.max(r[n].max,o[n]);return r}function Vl(e){let t=new Float32Array(e.length*2),r=new Uint16Array(e.length);for(let n=0;n<e.length;n++)t.set(e[n].position,2*n),r[n]=n;return{...$i(),points:pn(t,r,r,{},e)}}var $l=q(pt(),1);var et=class extends $l._Tileset2D{getTileIndices(t){return super.getTileIndices(t).map(Rl).map(r=>({q:r,i:un(r)}))}getTileId({q:t,i:r}){return r||un(t)}getTileMetadata({q:t}){return super.getTileMetadata(Gi(t))}getTileZoom({q:t}){return Number(dn(t))}getParentIndex({q:t}){return{q:Vi(t)}}};var Hl=q(pt(),1),ie=q(Yt(),1),Zl=85.051128;function jl({west:e,north:t,east:r,south:n},i,o=1){let l=[[t,r],[n,r],[n,e],[t,e]].map(u=>(0,ie.latLngToCell)(u[0],u[1],i)).map(u=>Math.max(...(0,ie.originToDirectedEdges)(u).map(d=>(0,ie.edgeLength)(d,ie.UNITS.rads)))*180/Math.PI),f=Math.max(...l)*o,c=Math.min(180,f/Math.cos((t+n)/2*Math.PI/180));return{north:Math.min(t+f,Zl),east:r+c,south:Math.max(n-f,-Zl),west:e-c}}function Yl({west:e,north:t,east:r,south:n},i){let o=Math.abs(r-e);if(o>180){let s=Math.ceil(o/180),l=[];for(let f=0;f<s;f++){let c=e+f*180,u=Math.min(c+179.9999999,r);l=l.concat(Yl({west:c,north:t,east:u,south:n},i))}return[...new Set(l)]}return(0,ie.polygonToCells)([[t,r],[n,r],[n,e],[t,e],[t,r]],i)}function Qg(e){let t=(0,ie.cellToBoundary)(e),r=t.map(f=>f[0]),n=t.map(f=>f[1]),i=Math.min(...n),o=Math.min(...r),a=Math.max(...n),s=Math.max(...r);return jl({west:i,south:o,east:a,north:s},(0,ie.getResolution)(e),.12)}var Jg=2;function Cr(e,t){let r=Math.log2(t/512),n=2/3*(e.zoom-r),i=Math.log(1/Math.cos(Math.PI*e.latitude/180));return Math.max(0,Math.floor(n+i-Jg))}var Ft=class extends Hl._Tileset2D{getTileIndices({viewport:t,minZoom:r,maxZoom:n}){if(t.latitude===void 0)return[];let[i,o,a,s]=t.getBounds(),{tileSize:l}=this.opts,f=Cr(t,l),c;if(typeof r=="number"&&Number.isFinite(r)&&f<r)return[];if(typeof n=="number"&&Number.isFinite(n)&&f>n){f=n;let u=(0,ie.latLngToCell)(t.latitude,t.longitude,n);c=(0,ie.gridDisk)(u,1)}else{let u=jl({west:i,north:s,east:a,south:o},f);c=Yl(u,f)}return c.map(u=>({i:u}))}getTileId({i:t}){return t}getTileMetadata({i:t}){return{bbox:Qg(t)}}getTileZoom({i:t}){return(0,ie.getResolution)(t)}getParentIndex(t){let r=(0,ie.getResolution)(t.i);return{i:(0,ie.cellToParent)(t.i,r-1)}}};var Wl=512;function za(e){let{x:t,y:r,z:n}=Gi(e),i=Wl/(1<<n);return[t*i,Wl-r*i,i]}function em(e,t){let[r,n,i]=za(e);return[[r,n],[r+t*i,n-t*i]]}function Hi(e,t=1){let[r,n]=em(e,t),[i,o]=Se(r),[a,s]=Se(n);return[a,o,a,s,i,s,i,o,a,o]}var go=q(Yt(),1);var tt={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},tm=tt.self||tt.window||tt.global||{},rm=tt.window||tt.self||tt.global||{},nm=tt.global||tt.self||tt.window||{},im=tt.document||{};var Ar=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var Xl=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),om=Xl&&parseFloat(Xl[1])||0;function Ua(e){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,e)}function Kl(...e){return am(e)}function am(e){let t=e.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=t.reduce((o,a)=>o+a.byteLength,0),n=new Uint8Array(r),i=0;for(let o of t)n.set(o,i),i+=o.byteLength;return n.buffer}async function qa(e){let t=[];for await(let r of e)t.push(r);return Kl(...t)}function Ql(e){return e&&typeof e=="object"&&e.isBuffer}function Pr(e){if(Ql(e))return e;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let t=e;return new TextEncoder().encode(t).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function kr(e){return t=>new Promise((r,n)=>e(t,(i,o)=>i?n(i):r(o)))}var ji=class{constructor(t){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(t={}){Ua(t)}async compress(t){return await this.preload(),this.compressSync(t)}async decompress(t,r){return await this.preload(),this.decompressSync(t,r)}compressSync(t){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(t,r){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(t){let r=await this.concatenate(t);yield this.compress(r)}async*decompressBatches(t){let r=await this.concatenate(t);yield this.decompress(r)}concatenate(t){return qa(t)}improveError(t){return t.message.includes(this.name)||(t.message=`${this.name} ${t.message}`),t}};var nr=q(zu(),1),xt=q(Uu(),1),co=class extends ji{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(t={}){super(t),this.options=t}async compress(t){if(!Ar&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await kr(xt.default.gzip)(t):await kr(xt.default.deflate)(t);return Pr(r)}return this.compressSync(t)}async decompress(t){if(!Ar&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await kr(xt.default.gunzip)(t):await kr(xt.default.inflate)(t);return Pr(r)}return this.decompressSync(t)}compressSync(t){if(!Ar&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?xt.default.gzipSync(t):xt.default.deflateSync(t);return Pr(o)}let r=this.options?.deflate||{},n=new Uint8Array(t);return(this.options?.raw?nr.default.deflateRaw:nr.default.deflate)(n,r).buffer}decompressSync(t){if(!Ar&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?xt.default.gunzipSync(t):xt.default.inflateSync(t);return Pr(o)}let r=this.options?.deflate||{},n=new Uint8Array(t);return(this.options?.raw?nr.default.inflateRaw:nr.default.inflate)(n,r).buffer}async*compressBatches(t){let r=this.options?.deflate||{},n=new nr.default.Deflate(r);yield*this.transformBatches(n,t)}async*decompressBatches(t){let r=this.options?.deflate||{},n=new nr.default.Inflate(r);yield*this.transformBatches(n,t)}async*transformBatches(t,r){t.onData=this._onData.bind(this),t.onEnd=this._onEnd.bind(this);for await(let a of r){let s=new Uint8Array(a);if(!t.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let n=new Uint8Array(0),i=t.push(n,!0);yield*this._getChunks()}_onData(t){this._chunks.push(t)}_onEnd(t){if(t!==0)throw new Error(this._getError(t)+this._chunks.length)}_getChunks(){let t=this._chunks;return this._chunks=[],t}_getError(t=0){let r={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};return`${this.name}: ${r[t]}`}};var Fn=class extends co{name="gzip";extensions=["gz","gzip"];contentEncodings=["gzip","x-gzip"];isSupported=!0;constructor(t){super({...t,deflate:{...t?.gzip,gzip:!0}})}};function ir(e,t,r,n){let i=t.type===2?t.readVarint()+t.pos:t.pos+1,o=t.buf.buffer.slice(t.pos,i);if(n?.compression==="gzip"){let s=new Fn().decompressSync(o);r.value=new e(s)}else r.value=new e(o);return t.pos=i,r.value}var Ln=class{static read(t,r){return t.readFields(Ln._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=n.readString())}},Ge=class{static read(t,r){return t.readFields(Ge._readField,{},r)}static _readField(t,r,n){if(t===1){let{key:i,value:o}=Ln.read(n,n.readVarint()+n.pos);r[i]=o}}},or=class{static read(t,r){let{value:n,size:i}=t.readFields(or._readField,{value:[],size:0},r);return{value:n,size:i}}static _readField(t,r,n){t===1?ir(Float64Array,n,r):t===2&&(r.size=n.readVarint(!0))}},ye=class{static read(t,r){let{value:n,size:i}=t.readFields(ye._readField,{value:[],size:0},r);return{value:new Uint32Array(n),size:i}}static _readField(t,r,n){t===1?n.readPackedVarint(r.value):t===2&&(r.size=n.readVarint(!0))}},ar=class{static read(t,r){return t.readFields(ar._readField,{id:0},r)}static _readField(t,r,n){t===1&&(r.id=n.readVarint())}},In=class{static read(t,r){return t.readFields(In._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ir(Float64Array,n,r)}},Ve=class{static read(t,r){return t.readFields(Ve._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=In.read(n,n.readVarint()+n.pos))}},On=class{static read(t,r){return t.readFields(On._readField,{positions:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=or.read(n,n.readVarint()+n.pos);else if(t===2)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===5){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===6&&r.fields.push(ar.read(n,n.readVarint()+n.pos))}},Rn=class{static read(t,r){return t.readFields(Rn._readField,{positions:null,pathIndices:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=or.read(n,n.readVarint()+n.pos);else if(t===2)r.pathIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===6){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===7&&r.fields.push(ar.read(n,n.readVarint()+n.pos))}},Bn=class{static read(t,r){return t.readFields(Bn._readField,{positions:null,polygonIndices:null,globalFeatureIds:null,featureIds:null,primitivePolygonIndices:null,triangles:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=or.read(n,n.readVarint()+n.pos);else if(t===2)r.polygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.primitivePolygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===6)r.triangles=ye.read(n,n.readVarint()+n.pos);else if(t===7)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===8){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===9&&r.fields.push(ar.read(n,n.readVarint()+n.pos))}},Ur=class{static read(t,r){return t.readFields(Ur._readField,{points:null,lines:null,polygons:null},r)}static _readField(t,r,n){t===1?r.points=On.read(n,n.readVarint()+n.pos):t===2?r.lines=Rn.read(n,n.readVarint()+n.pos):t===3&&(r.polygons=Bn.read(n,n.readVarint()+n.pos))}};var Dn=class{static read(t,r){return t.readFields(Dn._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ir(BigUint64Array,n,r)}},Nn=class{static read(t,r){return t.readFields(Nn._readField,{indices:null,properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.indices=Dn.read(n,n.readVarint()+n.pos);else if(t===2)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===3){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}},qr=class{static read(t,r){return t.readFields(qr._readField,{scheme:0,cells:null},r)}static _readField(t,r,n){t===1?r.scheme=n.readVarint():t===2&&(r.cells=Nn.read(n,n.readVarint()+n.pos))}};var Yu=q(ju(),1);function Nt(e,t){let r=new Yu.default(e);return t.read(r)}function Wu(e){let{cells:t,scheme:r}=e,n=t.indices.value.length,i=[];for(let o=0;o<n;o++){let a=r==="h3"?un(t.indices.value[o]):t.indices.value[o],s={...t.properties[o]};for(let l of Object.keys(t.numericProps))s[l]=t.numericProps[l].value[o];i.push({id:a,properties:s})}return i}var Ku="9.2.0-beta.2",Qu="cartoSpatialTile",mb={cartoSpatialTile:{scheme:"quadbin",workerUrl:Mt(Qu,Ku)}},bb={name:"CARTO Spatial Tile",version:Ku,id:Qu,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-spatial-tile"],category:"geometry",parse:async(e,t)=>Xu(e,t),parseSync:Xu,worker:!0,options:mb};function Xu(e,t){if(!e)return null;let r=Nt(e,qr),{cells:n}=r,i=t?.cartoSpatialTile?.scheme;return Wu({cells:n,scheme:i})}var po=bb;var Ju=q(Ee(),1),ed=q(Ee(),1);function $e(e,t,r=0){if(!e)return t;if(!t)return e;if(r>10)return t;let n={...e};for(let i in t){let o=t[i];o===e||o===t||(typeof o=="object"&&o!==null?n[i]=$e(e[i],o,r+1):n[i]=o)}return n}function td(e,t){let r={};for(let{geoid:n,...i}of t.properties)n in r?Ju.log.warn("Duplicate geoid key in boundary mapping, using first occurance")():r[n]=i;for(let n of["points","lines","polygons"]){let i=e[n];if(i.positions.value.length===0)continue;i.properties=i.properties.map(({geoid:f})=>r[f]);let{positions:o,globalFeatureIds:a}=i,s=null;n==="lines"&&(s=i.pathIndices.value),n==="polygons"&&(s=i.polygonIndices.value);let l=o.value.length/o.size;for(let f in t.numericProps){let c=t.numericProps[f].value,u=c.constructor,d=new u(l);if(i.numericProps[f]={value:d,size:1},s)for(let h=0;h<s.length-1;h++){let g=s[h],x=s[h+1],T=a.value[g];d.fill(c[T],g,x)}else for(let h=0;h<l;h++){let g=a.value[h];d[h]=c[g]}}}return e}var Ce={type:"object",value:null,validate:(e,t)=>t.optional&&e===null||typeof e=="object"&&Array.isArray(e.tiles)&&e.tiles.every(r=>typeof r=="string"),equal:(e,t)=>(0,ed._deepEqual)(e,t,2),async:!0};(0,od.registerLoaders)([po]);function rd(e){if(e===Ft)return"h3";if(e===et)return"quadbin";throw new Error("Invalid tileset class")}var ad={data:Ce,clusterLevel:{type:"number",value:5,min:1},getPosition:{type:"accessor",value:({id:e})=>{if(typeof e=="string"){let[t,r]=(0,go.cellToLatLng)(e);return[r,t]}return Hi(e,.5).slice(2,4)}},getWeight:{type:"accessor",value:1},refinementStrategy:"no-overlap",tileSize:512},Un=class extends id.TileLayer{initializeState(){super.initializeState(),this.state.aggregationCache=new WeakMap,this.state.scheme=rd(this.props.TilesetClass)}updateState(t){let{props:r}=t,n=rd(r.TilesetClass);this.state.scheme!==n&&(this.setState({scheme:n,tileset:null}),this.state.aggregationCache=new WeakMap),super.updateState(t)}renderLayers(){let t=this.state.tileset?.tiles.filter(h=>h.isLoaded&&h.content&&this.state.tileset.isTileVisible(h));if(!t?.length||!this.state.tileset)return null;t.sort((h,g)=>g.zoom-h.zoom);let{getPosition:r,getWeight:n}=this.props,{aggregationCache:i,scheme:o}=this.state,a=o==="h3",s=ql(t[0]),l=[],f=!1,c=this._getAggregationLevels(t);for(let h of t){let g=i.get(h.content);g||(g=new Map,i.set(h.content,g));let x=Ul(h,g,c,s,r,n,a?"h3":"quadbin");f||(f=x),l.push(...g.get(c))}l.sort((h,g)=>Number(g.count-h.count));let u=l?.map(h=>h.id);if(f||(f=!(0,zn._deepEqual)(u,this.state.clusterIds,1)),this.setState({clusterIds:u}),f){let h=Gl(l,s),g=Vl(l);g.points.attributes={stats:h},this.setState({data:g})}let d={...this.props,id:"clusters",data:this.state.data,dataComparator:(h,g)=>{let x=h?.points?.properties?.map(_=>_.id),T=g?.points?.properties?.map(_=>_.id);return(0,zn._deepEqual)(x,T,1)}};return new nd.GeoJsonLayer(this.getSubLayerProps(d))}getPickingInfo(t){let r=t.info;if(r.index!==-1){let{data:n}=t.sourceLayer.props;r.object=Fa(n,{globalFeatureId:r.index})}return r}_updateAutoHighlight(t){for(let r of this.getSubLayers())r.updateAutoHighlight(t)}filterSubLayer(){return!0}_getAggregationLevels(t){let r=this.state.scheme==="h3",n=t[0],i,o;r?(i=(0,go.getResolution)(n.id),o=Cr(this.context.viewport,this.state.tileset.opts.tileSize)):(i=n.zoom,o=this.context.viewport.zoom);let a=Math.round(o-i);return Math.round(this.props.clusterLevel)-a}};Un.layerName="ClusterGeoJsonLayer";Un.defaultProps=ad;var qn=class extends zn.CompositeLayer{getLoadOptions(){let t=this.props.data,r=t&&"scheme"in t?t.scheme:"quadbin";return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:r}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,maxresolution:n}=t,o=t&&"scheme"in t&&t.scheme==="h3"?Ft:et;return[new Un(this.props,{id:`cluster-geojson-layer-${this.props.id}`,data:r,TilesetClass:o,maxZoom:n,loadOptions:this.getLoadOptions()})]}};qn.layerName="ClusterTileLayer";qn.defaultProps=ad;var Vn=qn;var ld=q(Ee(),1),Ss=q(pt(),1);var sd=q(cn(),1);var fd=q(pt(),1);(0,sd.registerLoaders)([po]);function yb(e){return e!=null&&e!==""}var xb={tileSize:512},$n=class extends fd.TileLayer{_updateAutoHighlight(t){let{hoveredFeatureId:r}=this.state,n=t.object,i=null;if(n&&(i=n.id),r!==i){let{highlightColor:o}=this.props;typeof o=="function"&&(o=o(t)),this.setState({highlightColor:o,hoveredFeatureId:i})}}getSubLayerPropsByTile(t){return{highlightedObjectIndex:this.getHighlightedObjectIndex(t),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(t){let{hoveredFeatureId:r}=this.state,n=t.content;return!yb(r)||!Array.isArray(n)||!this._featureInTile(t,r)?-1:n.findIndex(o=>o.id===r)}_featureInTile(t,r){let n=this.state.tileset,i=n.getTileZoom(t.index),o=t.index.q?"q":"i",a={[o]:r},s=n.getTileZoom(a);for(;!(s<=i);)a=n.getParentIndex(a),s=n.getTileZoom(a);return a[o]===t.index[o]}};$n.layerName="SpatialIndexTileLayer";$n.defaultProps=xb;var $r=$n;var vb=e=>{let{data:t}=e,{index:r}=e.tile;return!t||!t.length?null:new Ss.H3HexagonLayer(e,{getHexagon:n=>n.id,centerHexagon:r,highPrecision:!0})},wb={data:Ce,tileSize:512},Zn=class extends ld.CompositeLayer{initializeState(){Ss.H3HexagonLayer._checkH3Lib()}getLoadOptions(){let t=this.props.data;return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:"h3"}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r}=t,{minresolution:n,maxresolution:i}=t;this.props.minZoom&&(n=Math.max(n,Cr({zoom:this.props.minZoom,latitude:0},this.props.tileSize))),this.props.maxZoom&&(i=Math.min(i,Cr({zoom:this.props.maxZoom,latitude:0},this.props.tileSize)));let o=this.getSubLayerClass("spatial-index-tile",$r);return new o(this.props,{id:`h3-tile-layer-${this.props.id}`,data:r,TilesetClass:Ft,renderSubLayers:vb,minZoom:n,maxZoom:i,loadOptions:this.getLoadOptions()})}};Zn.layerName="H3TileLayer";Zn.defaultProps=wb;var sr=Zn;var wo=q(Yt(),1),_o=q(Ee(),1),hd=q(kt(),1);var _b=`uniform heatmapUniforms {
|
|
7
|
+
"use strict";var __exports__=(()=>{var lg=Object.create;var Ni=Object.defineProperty;var cg=Object.getOwnPropertyDescriptor;var ug=Object.getOwnPropertyNames;var dg=Object.getPrototypeOf,hg=Object.prototype.hasOwnProperty;var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ma=(e,t)=>{for(var r in t)Ni(e,r,{get:t[r],enumerable:!0})},Di=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ug(t))!hg.call(e,i)&&i!==r&&Ni(e,i,{get:()=>t[i],enumerable:!(n=cg(t,i))||n.enumerable});return e},Je=(e,t,r)=>(Di(e,t,"default"),r&&Di(r,t,"default")),q=(e,t,r)=>(r=e!=null?lg(dg(e)):{},Di(t||!e||!e.__esModule?Ni(r,"default",{value:e,enumerable:!0}):r,e)),pg=e=>Di(Ni({},"__esModule",{value:!0}),e);var kt=K((Z_,sl)=>{sl.exports=globalThis.deck});var pt=K((H_,fl)=>{fl.exports=globalThis.deck});var cn=K((j_,ll)=>{ll.exports=globalThis.loaders});var Ee=K((K_,hl)=>{hl.exports=globalThis.deck});var Sl=K((Q_,El)=>{var _g=Math.PI/180,Eg=180/Math.PI;function ml(e){var t=pl(e[0]+1,e[2]),r=pl(e[0],e[2]),n=gl(e[1]+1,e[2]),i=gl(e[1],e[2]);return[r,n,t,i]}function Sg(e){var t=ml(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r}function pl(e,t){return e/Math.pow(2,t)*360-180}function gl(e,t){var r=Math.PI-2*Math.PI*e/Math.pow(2,t);return Eg*Math.atan(.5*(Math.exp(r)-Math.exp(-r)))}function La(e,t,r){var n=_l(e,t,r);return n[0]=Math.floor(n[0]),n[1]=Math.floor(n[1]),n}function bl(e){return[[e[0]*2,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2+1,e[2]+1],[e[0]*2,e[1]*2+1,e[2]+1]]}function yl(e){return e[0]%2===0&&e[1]%2===0?[e[0]/2,e[1]/2,e[2]-1]:e[0]%2===0&&!e[1]%2===0?[e[0]/2,(e[1]-1)/2,e[2]-1]:!e[0]%2===0&&e[1]%2===0?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function xl(e){return bl(yl(e))}function Tg(e,t){for(var r=xl(e),n=0;n<r.length;n++)if(!vl(t,r[n]))return!1;return!0}function vl(e,t){for(var r=0;r<e.length;r++)if(wl(e[r],t))return!0;return!1}function wl(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Cg(e){for(var t="",r=e[2];r>0;r--){var n=0,i=1<<r-1;e[0]&i&&n++,e[1]&i&&(n+=2),t+=n.toString()}return t}function Ag(e){for(var t=0,r=0,n=e.length,i=n;i>0;i--){var o=1<<i-1;switch(e[n-i]){case"0":break;case"1":t|=o;break;case"2":r|=o;break;case"3":t|=o,r|=o;break}}return[t,r,n]}function Pg(e){var t=La(e[0],e[1],32),r=La(e[2],e[3],32),n=[t[0],t[1],r[0],r[1]],i=kg(n);if(i===0)return[0,0,0];var o=n[0]>>>32-i,a=n[1]>>>32-i;return[o,a,i]}function kg(e){for(var t=28,r=0;r<t;r++){var n=1<<32-(r+1);if((e[0]&n)!=(e[2]&n)||(e[1]&n)!=(e[3]&n))return r}return t}function _l(e,t,r){var n=Math.sin(t*_g),i=Math.pow(2,r),o=i*(e/360+.5),a=i*(.5-.25*Math.log((1+n)/(1-n))/Math.PI);return[o,a,r]}El.exports={tileToGeoJSON:Sg,tileToBBOX:ml,getChildren:bl,getParent:yl,getSiblings:xl,hasTile:vl,hasSiblings:Tg,tilesEqual:wl,tileToQuadkey:Cg,quadkeyToTile:Ag,pointToTile:La,bboxToTile:Pg,pointToTileFraction:_l}});var Al=K(qi=>{var Tr=Sl();qi.geojson=function(e,t){return{type:"FeatureCollection",features:Oa(e,t).map(Mg)}};function Mg(e){return{type:"Feature",geometry:Tr.tileToGeoJSON(e),properties:{}}}qi.tiles=Oa;qi.indexes=function(e,t){return Oa(e,t).map(Tr.tileToQuadkey)};function Oa(e,t){var r,n,i=e.coordinates,o=t.max_zoom,a={},s=[];if(e.type==="Point")return[Tr.pointToTile(i[0],i[1],o)];if(e.type==="MultiPoint")for(r=0;r<i.length;r++)n=Tr.pointToTile(i[r][0],i[r][1],o),a[ze(n[0],n[1],n[2])]=!0;else if(e.type==="LineString")Ia(a,i,o);else if(e.type==="MultiLineString")for(r=0;r<i.length;r++)Ia(a,i[r],o);else if(e.type==="Polygon")Tl(a,s,i,o);else if(e.type==="MultiPolygon")for(r=0;r<i.length;r++)Tl(a,s,i[r],o);else throw new Error("Geometry type not implemented");if(t.min_zoom!==o){var l=s.length;for(Cl(a,s),r=0;r<l;r++){var f=s[r];a[ze(f[0],f[1],f[2])]=!0}return Fg(a,s,t)}return Cl(a,s),s}function Fg(e,t,r){for(var n=[],i=r.max_zoom;i>r.min_zoom;i--){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s];if(l[0]%2===0&&l[1]%2===0){var f=ze(l[0]+1,l[1],i),c=ze(l[0],l[1]+1,i),u=ze(l[0]+1,l[1]+1,i);if(e[f]&&e[c]&&e[u]){e[ze(l[0],l[1],l[2])]=!1,e[f]=!1,e[c]=!1,e[u]=!1;var d=[l[0]/2,l[1]/2,i-1];i-1===r.min_zoom?n.push(d):(o[ze(l[0]/2,l[1]/2,i-1)]=!0,a.push(d))}}}for(s=0;s<t.length;s++)l=t[s],e[ze(l[0],l[1],l[2])]&&n.push(l);e=o,t=a}return n}function Tl(e,t,r,n){for(var i=[],o=0;o<r.length;o++){var a=[];Ia(e,r[o],n,a);for(var s=0,l=a.length,f=l-1;s<l;f=s++){var c=(s+1)%l,u=a[s][1];(u>a[f][1]||u>a[c][1])&&(u<a[f][1]||u<a[c][1])&&u!==a[c][1]&&i.push(a[s])}}for(i.sort(Lg),o=0;o<i.length;o+=2){u=i[o][1];for(var d=i[o][0]+1;d<i[o+1][0];d++){var h=ze(d,u,n);e[h]||t.push([d,u,n])}}}function Lg(e,t){return e[1]-t[1]||e[0]-t[0]}function Ia(e,t,r,n){for(var i,o,a=0;a<t.length-1;a++){var s=Tr.pointToTileFraction(t[a][0],t[a][1],r),l=Tr.pointToTileFraction(t[a+1][0],t[a+1][1],r),f=s[0],c=s[1],u=l[0],d=l[1],h=u-f,g=d-c;if(!(g===0&&h===0)){var x=h>0?1:-1,T=g>0?1:-1,_=Math.floor(f),v=Math.floor(c),M=h===0?1/0:Math.abs(((h>0?1:0)+_-f)/h),L=g===0?1/0:Math.abs(((g>0?1:0)+v-c)/g),I=Math.abs(x/h),B=Math.abs(T/g);for((_!==i||v!==o)&&(e[ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v);M<1||L<1;)M<L?(M+=I,_+=x):(L+=B,v+=T),e[ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v}}n&&v===n[0][1]&&n.pop()}function Cl(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.push(Ig(+r[n]))}function ze(e,t,r){var n=2*(1<<r);return(n*t+e)*32+r}function Ig(e){var t=e%32,r=2*(1<<t),n=(e-t)/32,i=n%r,o=(n-i)/r%r;return[i,o,t]}});var Yt=K((Z3,Bl)=>{Bl.exports=globalThis.h3||{}});var gt=K(pe=>{"use strict";var sm=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function fm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}pe.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)fm(r,n)&&(e[n]=r[n])}}return e};pe.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var lm={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},cm={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};pe.setTyped=function(e){e?(pe.Buf8=Uint8Array,pe.Buf16=Uint16Array,pe.Buf32=Int32Array,pe.assign(pe,lm)):(pe.Buf8=Array,pe.Buf16=Array,pe.Buf32=Array,pe.assign(pe,cm))};pe.setTyped(sm)});var wc=K(Lr=>{"use strict";var um=gt(),dm=4,Jl=0,ec=1,hm=2;function Fr(e){for(var t=e.length;--t>=0;)e[t]=0}var pm=0,ac=1,gm=2,mm=3,bm=258,Ya=29,vn=256,mn=vn+1+Ya,Mr=30,Wa=19,sc=2*mn+1,Wt=15,Ga=16,ym=7,Xa=256,fc=16,lc=17,cc=18,Ha=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Yi=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],xm=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],uc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],vm=512,mt=new Array((mn+2)*2);Fr(mt);var gn=new Array(Mr*2);Fr(gn);var bn=new Array(vm);Fr(bn);var yn=new Array(bm-mm+1);Fr(yn);var Ka=new Array(Ya);Fr(Ka);var Wi=new Array(Mr);Fr(Wi);function Va(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var dc,hc,pc;function $a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function gc(e){return e<256?bn[e]:bn[256+(e>>>7)]}function xn(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function be(e,t,r){e.bi_valid>Ga-r?(e.bi_buf|=t<<e.bi_valid&65535,xn(e,e.bi_buf),e.bi_buf=t>>Ga-e.bi_valid,e.bi_valid+=r-Ga):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function rt(e,t,r){be(e,r[t*2],r[t*2+1])}function mc(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function wm(e){e.bi_valid===16?(xn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function _m(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,f,c,u,d,h,g,x=0;for(d=0;d<=Wt;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<sc;f++)c=e.heap[f],d=r[r[c*2+1]*2+1]+1,d>l&&(d=l,x++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,h=0,c>=s&&(h=a[c-s]),g=r[c*2],e.opt_len+=g*(d+h),o&&(e.static_len+=g*(i[c*2+1]+h)));if(x!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,x-=2}while(x>0);for(d=l;d!==0;d--)for(c=e.bl_count[d];c!==0;)u=e.heap[--f],!(u>n)&&(r[u*2+1]!==d&&(e.opt_len+=(d-r[u*2+1])*r[u*2],r[u*2+1]=d),c--)}}function bc(e,t,r){var n=new Array(Wt+1),i=0,o,a;for(o=1;o<=Wt;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=mc(n[s]++,s))}}function Em(){var e,t,r,n,i,o=new Array(Wt+1);for(r=0,n=0;n<Ya-1;n++)for(Ka[n]=r,e=0;e<1<<Ha[n];e++)yn[r++]=n;for(yn[r-1]=n,i=0,n=0;n<16;n++)for(Wi[n]=i,e=0;e<1<<Yi[n];e++)bn[i++]=n;for(i>>=7;n<Mr;n++)for(Wi[n]=i<<7,e=0;e<1<<Yi[n]-7;e++)bn[256+i++]=n;for(t=0;t<=Wt;t++)o[t]=0;for(e=0;e<=143;)mt[e*2+1]=8,e++,o[8]++;for(;e<=255;)mt[e*2+1]=9,e++,o[9]++;for(;e<=279;)mt[e*2+1]=7,e++,o[7]++;for(;e<=287;)mt[e*2+1]=8,e++,o[8]++;for(bc(mt,mn+1,o),e=0;e<Mr;e++)gn[e*2+1]=5,gn[e*2]=mc(e,5);dc=new Va(mt,Ha,vn+1,mn,Wt),hc=new Va(gn,Yi,0,Mr,Wt),pc=new Va(new Array(0),xm,0,Wa,ym)}function yc(e){var t;for(t=0;t<mn;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Mr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Wa;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Xa*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function xc(e){e.bi_valid>8?xn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Sm(e,t,r,n){xc(e),n&&(xn(e,r),xn(e,~r)),um.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function tc(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function Za(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&tc(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!tc(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function rc(e,t,r){var n,i,o=0,a,s;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,n===0?rt(e,i,t):(a=yn[i],rt(e,a+vn+1,t),s=Ha[a],s!==0&&(i-=Ka[a],be(e,i,s)),n--,a=gc(n),rt(e,a,r),s=Yi[a],s!==0&&(n-=Wi[a],be(e,n,s)));while(o<e.last_lit);rt(e,Xa,t)}function ja(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,f;for(e.heap_len=0,e.heap_max=sc,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=l<2?++l:0,r[f*2]=1,e.depth[f]=0,e.opt_len--,i&&(e.static_len-=n[f*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Za(e,r,a);f=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Za(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[f*2]=r[a*2]+r[s*2],e.depth[f]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=f,e.heap[1]=f++,Za(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],_m(e,t),bc(r,l,e.bl_count)}function nc(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<f?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[fc*2]++):s<=10?e.bl_tree[lc*2]++:e.bl_tree[cc*2]++,s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4))}function ic(e,t,r){var n,i=-1,o,a=t[0*2+1],s=0,l=7,f=4;for(a===0&&(l=138,f=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<f)do rt(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(rt(e,o,e.bl_tree),s--),rt(e,fc,e.bl_tree),be(e,s-3,2)):s<=10?(rt(e,lc,e.bl_tree),be(e,s-3,3)):(rt(e,cc,e.bl_tree),be(e,s-11,7));s=0,i=o,a===0?(l=138,f=3):o===a?(l=6,f=3):(l=7,f=4)}}function Tm(e){var t;for(nc(e,e.dyn_ltree,e.l_desc.max_code),nc(e,e.dyn_dtree,e.d_desc.max_code),ja(e,e.bl_desc),t=Wa-1;t>=3&&e.bl_tree[uc[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Cm(e,t,r,n){var i;for(be(e,t-257,5),be(e,r-1,5),be(e,n-4,4),i=0;i<n;i++)be(e,e.bl_tree[uc[i]*2+1],3);ic(e,e.dyn_ltree,t-1),ic(e,e.dyn_dtree,r-1)}function Am(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Jl;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return ec;for(r=32;r<vn;r++)if(e.dyn_ltree[r*2]!==0)return ec;return Jl}var oc=!1;function Pm(e){oc||(Em(),oc=!0),e.l_desc=new $a(e.dyn_ltree,dc),e.d_desc=new $a(e.dyn_dtree,hc),e.bl_desc=new $a(e.bl_tree,pc),e.bi_buf=0,e.bi_valid=0,yc(e)}function vc(e,t,r,n){be(e,(pm<<1)+(n?1:0),3),Sm(e,t,r,!0)}function km(e){be(e,ac<<1,3),rt(e,Xa,mt),wm(e)}function Mm(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===hm&&(e.strm.data_type=Am(e)),ja(e,e.l_desc),ja(e,e.d_desc),a=Tm(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?vc(e,t,r,n):e.strategy===dm||o===i?(be(e,(ac<<1)+(n?1:0),3),rc(e,mt,gn)):(be(e,(gm<<1)+(n?1:0),3),Cm(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),rc(e,e.dyn_ltree,e.dyn_dtree)),yc(e),n&&xc(e)}function Fm(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(yn[r]+vn+1)*2]++,e.dyn_dtree[gc(t)*2]++),e.last_lit===e.lit_bufsize-1}Lr._tr_init=Pm;Lr._tr_stored_block=vc;Lr._tr_flush_block=Mm;Lr._tr_tally=Fm;Lr._tr_align=km});var Qa=K((E5,_c)=>{"use strict";function Lm(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}_c.exports=Lm});var Ja=K((S5,Ec)=>{"use strict";function Im(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var Om=Im();function Rm(e,t,r,n){var i=Om,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Ec.exports=Rm});var Xi=K((T5,Sc)=>{"use strict";Sc.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Ic=K(ot=>{"use strict";var ge=gt(),Me=wc(),Pc=Qa(),Lt=Ja(),Bm=Xi(),Jt=0,Dm=1,Nm=3,Dt=4,Tc=5,it=0,Cc=1,Fe=-2,zm=-3,es=-5,Um=-1,qm=1,Ki=2,Gm=3,Vm=4,$m=0,Zm=2,to=8,Hm=9,jm=15,Ym=8,Wm=29,Xm=256,rs=Xm+1+Wm,Km=30,Qm=19,Jm=2*rs+1,e1=15,$=3,Rt=258,Ue=Rt+$+1,t1=32,ro=42,ns=69,Qi=73,Ji=91,eo=103,Xt=113,_n=666,se=1,En=2,Kt=3,Rr=4,r1=3;function Bt(e,t){return e.msg=Bm[t],t}function Ac(e){return(e<<1)-(e>4?9:0)}function Ot(e){for(var t=e.length;--t>=0;)e[t]=0}function It(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(ge.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function le(e,t){Me._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,It(e.strm)}function j(e,t){e.pending_buf[e.pending++]=t}function wn(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function n1(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,ge.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Pc(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Lt(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function kc(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-Ue?e.strstart-(e.w_size-Ue):0,f=e.window,c=e.w_mask,u=e.prev,d=e.strstart+Rt,h=f[n+a-1],g=f[n+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(f[i+a]!==g||f[i+a-1]!==h||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&n<d);if(o=Rt-(d-n),n=d-Rt,o>a){if(e.match_start=t,a=o,o>=s)break;h=f[n+a-1],g=f[n+a]}}while((t=u[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function Qt(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ue)){ge.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=n1(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=$)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+$-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<$)););}while(e.lookahead<Ue&&e.strm.avail_in!==0)}function i1(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Qt(e),e.lookahead===0&&t===Jt)return se;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,le(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ue&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):(e.strstart>e.block_start&&(le(e,!1),e.strm.avail_out===0),se)}function ts(e,t){for(var r,n;;){if(e.lookahead<Ue){if(Qt(e),e.lookahead<Ue&&t===Jt)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Ue&&(e.match_length=kc(e,r)),e.match_length>=$)if(n=Me._tr_tally(e,e.strstart-e.match_start,e.match_length-$),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=$){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=e.strstart<$-1?e.strstart:$-1,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function Ir(e,t){for(var r,n,i;;){if(e.lookahead<Ue){if(Qt(e),e.lookahead<Ue&&t===Jt)return se;if(e.lookahead===0)break}if(r=0,e.lookahead>=$&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=$-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Ue&&(e.match_length=kc(e,r),e.match_length<=5&&(e.strategy===qm||e.match_length===$&&e.strstart-e.match_start>4096)&&(e.match_length=$-1)),e.prev_length>=$&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-$,n=Me._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-$),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+$-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=$-1,e.strstart++,n&&(le(e,!1),e.strm.avail_out===0))return se}else if(e.match_available){if(n=Me._tr_tally(e,0,e.window[e.strstart-1]),n&&le(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return se}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Me._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<$-1?e.strstart:$-1,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function o1(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=Rt){if(Qt(e),e.lookahead<=Rt&&t===Jt)return se;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=$&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+Rt;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=Rt-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=$?(r=Me._tr_tally(e,1,e.match_length-$),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function a1(e,t){for(var r;;){if(e.lookahead===0&&(Qt(e),e.lookahead===0)){if(t===Jt)return se;break}if(e.match_length=0,r=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(le(e,!1),e.strm.avail_out===0))return se}return e.insert=0,t===Dt?(le(e,!0),e.strm.avail_out===0?Kt:Rr):e.last_lit&&(le(e,!1),e.strm.avail_out===0)?se:En}function nt(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Or;Or=[new nt(0,0,0,0,i1),new nt(4,4,8,4,ts),new nt(4,5,16,8,ts),new nt(4,6,32,32,ts),new nt(4,4,16,16,Ir),new nt(8,16,32,32,Ir),new nt(8,16,128,128,Ir),new nt(8,32,128,256,Ir),new nt(32,128,258,1024,Ir),new nt(32,258,258,4096,Ir)];function s1(e){e.window_size=2*e.w_size,Ot(e.head),e.max_lazy_match=Or[e.level].max_lazy,e.good_match=Or[e.level].good_length,e.nice_match=Or[e.level].nice_length,e.max_chain_length=Or[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=$-1,e.match_available=0,e.ins_h=0}function f1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=to,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ge.Buf16(Jm*2),this.dyn_dtree=new ge.Buf16((2*Km+1)*2),this.bl_tree=new ge.Buf16((2*Qm+1)*2),Ot(this.dyn_ltree),Ot(this.dyn_dtree),Ot(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ge.Buf16(e1+1),this.heap=new ge.Buf16(2*rs+1),Ot(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ge.Buf16(2*rs+1),Ot(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Mc(e){var t;return!e||!e.state?Bt(e,Fe):(e.total_in=e.total_out=0,e.data_type=Zm,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ro:Xt,e.adler=t.wrap===2?0:1,t.last_flush=Jt,Me._tr_init(t),it)}function Fc(e){var t=Mc(e);return t===it&&s1(e.state),t}function l1(e,t){return!e||!e.state||e.state.wrap!==2?Fe:(e.state.gzhead=t,it)}function Lc(e,t,r,n,i,o){if(!e)return Fe;var a=1;if(t===Um&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>Hm||r!==to||n<8||n>15||t<0||t>9||o<0||o>Vm)return Bt(e,Fe);n===8&&(n=9);var s=new f1;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+$-1)/$),s.window=new ge.Buf8(s.w_size*2),s.head=new ge.Buf16(s.hash_size),s.prev=new ge.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new ge.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,Fc(e)}function c1(e,t){return Lc(e,t,to,jm,Ym,$m)}function u1(e,t){var r,n,i,o;if(!e||!e.state||t>Tc||t<0)return e?Bt(e,Fe):Fe;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===_n&&t!==Dt)return Bt(e,e.avail_out===0?es:Fe);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ro)if(n.wrap===2)e.adler=0,j(n,31),j(n,139),j(n,8),n.gzhead?(j(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),j(n,n.gzhead.time&255),j(n,n.gzhead.time>>8&255),j(n,n.gzhead.time>>16&255),j(n,n.gzhead.time>>24&255),j(n,n.level===9?2:n.strategy>=Ki||n.level<2?4:0),j(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(j(n,n.gzhead.extra.length&255),j(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Lt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=ns):(j(n,0),j(n,0),j(n,0),j(n,0),j(n,0),j(n,n.level===9?2:n.strategy>=Ki||n.level<2?4:0),j(n,r1),n.status=Xt);else{var a=to+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=Ki||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,a|=s<<6,n.strstart!==0&&(a|=t1),a+=31-a%31,n.status=Xt,wn(n,a),n.strstart!==0&&(wn(n,e.adler>>>16),wn(n,e.adler&65535)),e.adler=1}if(n.status===ns)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),It(e),i=n.pending,n.pending===n.pending_buf_size));)j(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Qi)}else n.status=Qi;if(n.status===Qi)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),It(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=Ji)}else n.status=Ji;if(n.status===Ji)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),It(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,j(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Lt(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=eo)}else n.status=eo;if(n.status===eo&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&It(e),n.pending+2<=n.pending_buf_size&&(j(n,e.adler&255),j(n,e.adler>>8&255),e.adler=0,n.status=Xt)):n.status=Xt),n.pending!==0){if(It(e),e.avail_out===0)return n.last_flush=-1,it}else if(e.avail_in===0&&Ac(t)<=Ac(r)&&t!==Dt)return Bt(e,es);if(n.status===_n&&e.avail_in!==0)return Bt(e,es);if(e.avail_in!==0||n.lookahead!==0||t!==Jt&&n.status!==_n){var l=n.strategy===Ki?a1(n,t):n.strategy===Gm?o1(n,t):Or[n.level].func(n,t);if((l===Kt||l===Rr)&&(n.status=_n),l===se||l===Kt)return e.avail_out===0&&(n.last_flush=-1),it;if(l===En&&(t===Dm?Me._tr_align(n):t!==Tc&&(Me._tr_stored_block(n,0,0,!1),t===Nm&&(Ot(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),It(e),e.avail_out===0))return n.last_flush=-1,it}return t!==Dt?it:n.wrap<=0?Cc:(n.wrap===2?(j(n,e.adler&255),j(n,e.adler>>8&255),j(n,e.adler>>16&255),j(n,e.adler>>24&255),j(n,e.total_in&255),j(n,e.total_in>>8&255),j(n,e.total_in>>16&255),j(n,e.total_in>>24&255)):(wn(n,e.adler>>>16),wn(n,e.adler&65535)),It(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?it:Cc)}function d1(e){var t;return!e||!e.state?Fe:(t=e.state.status,t!==ro&&t!==ns&&t!==Qi&&t!==Ji&&t!==eo&&t!==Xt&&t!==_n?Bt(e,Fe):(e.state=null,t===Xt?Bt(e,zm):it))}function h1(e,t){var r=t.length,n,i,o,a,s,l,f,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ro||n.lookahead))return Fe;for(a===1&&(e.adler=Pc(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(Ot(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new ge.Buf8(n.w_size),ge.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),s=e.avail_in,l=e.next_in,f=e.input,e.avail_in=r,e.next_in=0,e.input=t,Qt(n);n.lookahead>=$;){i=n.strstart,o=n.lookahead-($-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+$-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=$-1,Qt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=$-1,n.match_available=0,e.next_in=l,e.input=f,e.avail_in=s,n.wrap=a,it}ot.deflateInit=c1;ot.deflateInit2=Lc;ot.deflateReset=Fc;ot.deflateResetKeep=Mc;ot.deflateSetHeader=l1;ot.deflate=u1;ot.deflateEnd=d1;ot.deflateSetDictionary=h1;ot.deflateInfo="pako deflate (from Nodeca project)"});var is=K(Br=>{"use strict";var no=gt(),Oc=!0,Rc=!0;try{String.fromCharCode.apply(null,[0])}catch{Oc=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Rc=!1}var Sn=new no.Buf8(256);for(bt=0;bt<256;bt++)Sn[bt]=bt>=252?6:bt>=248?5:bt>=240?4:bt>=224?3:bt>=192?2:1;var bt;Sn[254]=Sn[254]=1;Br.string2buf=function(e){var t,r,n,i,o,a=e.length,s=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new no.Buf8(s),o=0,i=0;o<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function Bc(e,t){if(t<65534&&(e.subarray&&Rc||!e.subarray&&Oc))return String.fromCharCode.apply(null,no.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Br.buf2binstring=function(e){return Bc(e,e.length)};Br.binstring2buf=function(e){for(var t=new no.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Br.buf2string=function(e,t){var r,n,i,o,a=t||e.length,s=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){s[n++]=i;continue}if(o=Sn[i],o>4){s[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return Bc(s,n)};Br.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Sn[e[r]]>t?r:t}});var os=K((P5,Dc)=>{"use strict";function p1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}Dc.exports=p1});var qc=K(An=>{"use strict";var Tn=Ic(),Cn=gt(),ss=is(),fs=Xi(),g1=os(),Uc=Object.prototype.toString,m1=0,as=4,Dr=0,Nc=1,zc=2,b1=-1,y1=0,x1=8;function er(e){if(!(this instanceof er))return new er(e);this.options=Cn.assign({level:b1,method:x1,chunkSize:16384,windowBits:15,memLevel:8,strategy:y1,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g1,this.strm.avail_out=0;var r=Tn.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Dr)throw new Error(fs[r]);if(t.header&&Tn.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=ss.string2buf(t.dictionary):Uc.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Tn.deflateSetDictionary(this.strm,n),r!==Dr)throw new Error(fs[r]);this._dict_set=!0}}er.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?as:m1,typeof e=="string"?r.input=ss.string2buf(e):Uc.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Cn.Buf8(n),r.next_out=0,r.avail_out=n),i=Tn.deflate(r,o),i!==Nc&&i!==Dr)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===as||o===zc))&&(this.options.to==="string"?this.onData(ss.buf2binstring(Cn.shrinkBuf(r.output,r.next_out))):this.onData(Cn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Nc);return o===as?(i=Tn.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Dr):(o===zc&&(this.onEnd(Dr),r.avail_out=0),!0)};er.prototype.onData=function(e){this.chunks.push(e)};er.prototype.onEnd=function(e){e===Dr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Cn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ls(e,t){var r=new er(t);if(r.push(e,!0),r.err)throw r.msg||fs[r.err];return r.result}function v1(e,t){return t=t||{},t.raw=!0,ls(e,t)}function w1(e,t){return t=t||{},t.gzip=!0,ls(e,t)}An.Deflate=er;An.deflate=ls;An.deflateRaw=v1;An.gzip=w1});var Vc=K((M5,Gc)=>{"use strict";var io=30,_1=12;Gc.exports=function(t,r){var n,i,o,a,s,l,f,c,u,d,h,g,x,T,_,v,M,L,I,B,N,p,m,b,y;n=t.state,i=t.next_in,b=t.input,o=i+(t.avail_in-5),a=t.next_out,y=t.output,s=a-(r-t.avail_out),l=a+(t.avail_out-257),f=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,g=n.hold,x=n.bits,T=n.lencode,_=n.distcode,v=(1<<n.lenbits)-1,M=(1<<n.distbits)-1;e:do{x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),L=T[g&v];t:for(;;){if(I=L>>>24,g>>>=I,x-=I,I=L>>>16&255,I===0)y[a++]=L&65535;else if(I&16){B=L&65535,I&=15,I&&(x<I&&(g+=b[i++]<<x,x+=8),B+=g&(1<<I)-1,g>>>=I,x-=I),x<15&&(g+=b[i++]<<x,x+=8,g+=b[i++]<<x,x+=8),L=_[g&M];r:for(;;){if(I=L>>>24,g>>>=I,x-=I,I=L>>>16&255,I&16){if(N=L&65535,I&=15,x<I&&(g+=b[i++]<<x,x+=8,x<I&&(g+=b[i++]<<x,x+=8)),N+=g&(1<<I)-1,N>f){t.msg="invalid distance too far back",n.mode=io;break e}if(g>>>=I,x-=I,I=a-s,N>I){if(I=N-I,I>u&&n.sane){t.msg="invalid distance too far back",n.mode=io;break e}if(p=0,m=h,d===0){if(p+=c-I,I<B){B-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}else if(d<I){if(p+=c+d-I,I-=d,I<B){B-=I;do y[a++]=h[p++];while(--I);if(p=0,d<B){I=d,B-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}}}else if(p+=d-I,I<B){B-=I;do y[a++]=h[p++];while(--I);p=a-N,m=y}for(;B>2;)y[a++]=m[p++],y[a++]=m[p++],y[a++]=m[p++],B-=3;B&&(y[a++]=m[p++],B>1&&(y[a++]=m[p++]))}else{p=a-N;do y[a++]=y[p++],y[a++]=y[p++],y[a++]=y[p++],B-=3;while(B>2);B&&(y[a++]=y[p++],B>1&&(y[a++]=y[p++]))}}else if(I&64){t.msg="invalid distance code",n.mode=io;break e}else{L=_[(L&65535)+(g&(1<<I)-1)];continue r}break}}else if(I&64)if(I&32){n.mode=_1;break e}else{t.msg="invalid literal/length code",n.mode=io;break e}else{L=T[(L&65535)+(g&(1<<I)-1)];continue t}break}}while(i<o&&a<l);B=x>>3,i-=B,x-=B<<3,g&=(1<<x)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=g,n.bits=x}});var Xc=K((F5,Wc)=>{"use strict";var $c=gt(),Nr=15,Zc=852,Hc=592,jc=0,cs=1,Yc=2,E1=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],S1=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T1=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],C1=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Wc.exports=function(t,r,n,i,o,a,s,l){var f=l.bits,c=0,u=0,d=0,h=0,g=0,x=0,T=0,_=0,v=0,M=0,L,I,B,N,p,m=null,b=0,y,w=new $c.Buf16(Nr+1),S=new $c.Buf16(Nr+1),P=null,E=0,C,k,A;for(c=0;c<=Nr;c++)w[c]=0;for(u=0;u<i;u++)w[r[n+u]]++;for(g=f,h=Nr;h>=1&&w[h]===0;h--);if(g>h&&(g=h),h===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d<h&&w[d]===0;d++);for(g<d&&(g=d),_=1,c=1;c<=Nr;c++)if(_<<=1,_-=w[c],_<0)return-1;if(_>0&&(t===jc||h!==1))return-1;for(S[1]=0,c=1;c<Nr;c++)S[c+1]=S[c]+w[c];for(u=0;u<i;u++)r[n+u]!==0&&(s[S[r[n+u]]++]=u);if(t===jc?(m=P=s,y=19):t===cs?(m=E1,b-=257,P=S1,E-=257,y=256):(m=T1,P=C1,y=-1),M=0,u=0,c=d,p=a,x=g,T=0,B=-1,v=1<<g,N=v-1,t===cs&&v>Zc||t===Yc&&v>Hc)return 1;for(;;){C=c-T,s[u]<y?(k=0,A=s[u]):s[u]>y?(k=P[E+s[u]],A=m[b+s[u]]):(k=32+64,A=0),L=1<<c-T,I=1<<x,d=I;do I-=L,o[p+(M>>T)+I]=C<<24|k<<16|A|0;while(I!==0);for(L=1<<c-1;M&L;)L>>=1;if(L!==0?(M&=L-1,M+=L):M=0,u++,--w[c]===0){if(c===h)break;c=r[n+s[u]]}if(c>g&&(M&N)!==B){for(T===0&&(T=g),p+=d,x=c-T,_=1<<x;x+T<h&&(_-=w[x+T],!(_<=0));)x++,_<<=1;if(v+=1<<x,t===cs&&v>Zc||t===Yc&&v>Hc)return 1;B=M&N,o[B]=g<<24|x<<16|p-a|0}}return M!==0&&(o[p+M]=c-T<<24|64<<16|0),l.bits=g,0}});var Fu=K(qe=>{"use strict";var Te=gt(),ms=Qa(),at=Ja(),A1=Vc(),Pn=Xc(),P1=0,_u=1,Eu=2,Kc=4,k1=5,oo=6,tr=0,M1=1,F1=2,Le=-2,Su=-3,bs=-4,L1=-5,Qc=8,Tu=1,Jc=2,eu=3,tu=4,ru=5,nu=6,iu=7,ou=8,au=9,su=10,fo=11,yt=12,us=13,fu=14,ds=15,lu=16,cu=17,uu=18,du=19,ao=20,so=21,hu=22,pu=23,gu=24,mu=25,bu=26,hs=27,yu=28,xu=29,Q=30,ys=31,I1=32,O1=852,R1=592,B1=15,D1=B1;function vu(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function N1(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Te.Buf16(320),this.work=new Te.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Cu(e){var t;return!e||!e.state?Le:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Tu,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Te.Buf32(O1),t.distcode=t.distdyn=new Te.Buf32(R1),t.sane=1,t.back=-1,tr)}function Au(e){var t;return!e||!e.state?Le:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Cu(e))}function Pu(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Le:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Au(e))}function ku(e,t){var r,n;return e?(n=new N1,e.state=n,n.window=null,r=Pu(e,t),r!==tr&&(e.state=null),r):Le}function z1(e){return ku(e,D1)}var wu=!0,ps,gs;function U1(e){if(wu){var t;for(ps=new Te.Buf32(512),gs=new Te.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Pn(_u,e.lens,0,288,ps,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Pn(Eu,e.lens,0,32,gs,0,e.work,{bits:5}),wu=!1}e.lencode=ps,e.lenbits=9,e.distcode=gs,e.distbits=5}function Mu(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Te.Buf8(o.wsize)),n>=o.wsize?(Te.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Te.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Te.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function q1(e,t){var r,n,i,o,a,s,l,f,c,u,d,h,g,x,T=0,_,v,M,L,I,B,N,p,m=new Te.Buf8(4),b,y,w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Le;r=e.state,r.mode===yt&&(r.mode=us),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,u=s,d=l,p=tr;e:for(;;)switch(r.mode){case Tu:if(r.wrap===0){r.mode=us;break}for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.wrap&2&&f===35615){r.check=0,m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0),f=0,c=0,r.mode=Jc;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=Q;break}if((f&15)!==Qc){e.msg="unknown compression method",r.mode=Q;break}if(f>>>=4,c-=4,N=(f&15)+8,r.wbits===0)r.wbits=N;else if(N>r.wbits){e.msg="invalid window size",r.mode=Q;break}r.dmax=1<<N,e.adler=r.check=1,r.mode=f&512?su:yt,f=0,c=0;break;case Jc:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.flags=f,(r.flags&255)!==Qc){e.msg="unknown compression method",r.mode=Q;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Q;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=eu;case eu:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.time=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,m[2]=f>>>16&255,m[3]=f>>>24&255,r.check=at(r.check,m,4,0)),f=0,c=0,r.mode=tu;case tu:for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0,r.mode=ru;case ru:if(r.flags&1024){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&(m[0]=f&255,m[1]=f>>>8&255,r.check=at(r.check,m,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=nu;case nu:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Te.arraySet(r.head.extra,n,o,h,N)),r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,r.length-=h),r.length))break e;r.length=0,r.mode=iu;case iu:if(r.flags&2048){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=ou;case ou:if(r.flags&4096){if(s===0)break e;h=0;do N=n[o+h++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N));while(N&&h<s);if(r.flags&512&&(r.check=at(r.check,n,h,o)),s-=h,o+=h,N)break e}else r.head&&(r.head.comment=null);r.mode=au;case au:if(r.flags&512){for(;c<16;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Q;break}f=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=yt;break;case su:for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}e.adler=r.check=vu(f),f=0,c=0,r.mode=fo;case fo:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,F1;e.adler=r.check=1,r.mode=yt;case yt:if(t===k1||t===oo)break e;case us:if(r.last){f>>>=c&7,c-=c&7,r.mode=hs;break}for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}switch(r.last=f&1,f>>>=1,c-=1,f&3){case 0:r.mode=fu;break;case 1:if(U1(r),r.mode=ao,t===oo){f>>>=2,c-=2;break e}break;case 2:r.mode=cu;break;case 3:e.msg="invalid block type",r.mode=Q}f>>>=2,c-=2;break;case fu:for(f>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if((f&65535)!==(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Q;break}if(r.length=f&65535,f=0,c=0,r.mode=ds,t===oo)break e;case ds:r.mode=lu;case lu:if(h=r.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;Te.arraySet(i,n,o,h,a),s-=h,o+=h,l-=h,a+=h,r.length-=h;break}r.mode=yt;break;case cu:for(;c<14;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(r.nlen=(f&31)+257,f>>>=5,c-=5,r.ndist=(f&31)+1,f>>>=5,c-=5,r.ncode=(f&15)+4,f>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Q;break}r.have=0,r.mode=uu;case uu:for(;r.have<r.ncode;){for(;c<3;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.lens[w[r.have++]]=f&7,f>>>=3,c-=3}for(;r.have<19;)r.lens[w[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,b={bits:r.lenbits},p=Pn(P1,r.lens,0,19,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid code lengths set",r.mode=Q;break}r.have=0,r.mode=du;case du:for(;r.have<r.nlen+r.ndist;){for(;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,v=T>>>16&255,M=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(M<16)f>>>=_,c-=_,r.lens[r.have++]=M;else{if(M===16){for(y=_+2;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Q;break}N=r.lens[r.have-1],h=3+(f&3),f>>>=2,c-=2}else if(M===17){for(y=_+3;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=3+(f&7),f>>>=3,c-=3}else{for(y=_+7;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=_,c-=_,N=0,h=11+(f&127),f>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Q;break}for(;h--;)r.lens[r.have++]=N}}if(r.mode===Q)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Q;break}if(r.lenbits=9,b={bits:r.lenbits},p=Pn(_u,r.lens,0,r.nlen,r.lencode,0,r.work,b),r.lenbits=b.bits,p){e.msg="invalid literal/lengths set",r.mode=Q;break}if(r.distbits=6,r.distcode=r.distdyn,b={bits:r.distbits},p=Pn(Eu,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,b),r.distbits=b.bits,p){e.msg="invalid distances set",r.mode=Q;break}if(r.mode=ao,t===oo)break e;case ao:r.mode=so;case so:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,A1(e,d),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,r.mode===yt&&(r.back=-1);break}for(r.back=0;T=r.lencode[f&(1<<r.lenbits)-1],_=T>>>24,v=T>>>16&255,M=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(v&&!(v&240)){for(L=_,I=v,B=M;T=r.lencode[B+((f&(1<<L+I)-1)>>L)],_=T>>>24,v=T>>>16&255,M=T&65535,!(L+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=L,c-=L,r.back+=L}if(f>>>=_,c-=_,r.back+=_,r.length=M,v===0){r.mode=bu;break}if(v&32){r.back=-1,r.mode=yt;break}if(v&64){e.msg="invalid literal/length code",r.mode=Q;break}r.extra=v&15,r.mode=hu;case hu:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=pu;case pu:for(;T=r.distcode[f&(1<<r.distbits)-1],_=T>>>24,v=T>>>16&255,M=T&65535,!(_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(!(v&240)){for(L=_,I=v,B=M;T=r.distcode[B+((f&(1<<L+I)-1)>>L)],_=T>>>24,v=T>>>16&255,M=T&65535,!(L+_<=c);){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}f>>>=L,c-=L,r.back+=L}if(f>>>=_,c-=_,r.back+=_,v&64){e.msg="invalid distance code",r.mode=Q;break}r.offset=M,r.extra=v&15,r.mode=gu;case gu:if(r.extra){for(y=r.extra;c<y;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Q;break}r.mode=mu;case mu:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Q;break}h>r.wnext?(h-=r.wnext,g=r.wsize-h):g=r.wnext-h,h>r.length&&(h=r.length),x=r.window}else x=i,g=a-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[a++]=x[g++];while(--h);r.length===0&&(r.mode=so);break;case bu:if(l===0)break e;i[a++]=r.length,l--,r.mode=so;break;case hs:if(r.wrap){for(;c<32;){if(s===0)break e;s--,f|=n[o++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?at(r.check,i,d,a-d):ms(r.check,i,d,a-d)),d=l,(r.flags?f:vu(f))!==r.check){e.msg="incorrect data check",r.mode=Q;break}f=0,c=0}r.mode=yu;case yu:if(r.wrap&&r.flags){for(;c<32;){if(s===0)break e;s--,f+=n[o++]<<c,c+=8}if(f!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Q;break}f=0,c=0}r.mode=xu;case xu:p=M1;break e;case Q:p=Su;break e;case ys:return bs;case I1:default:return Le}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=f,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<Q&&(r.mode<hs||t!==Kc))&&Mu(e,e.output,e.next_out,d-e.avail_out)?(r.mode=ys,bs):(u-=e.avail_in,d-=e.avail_out,e.total_in+=u,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?at(r.check,i,d,e.next_out-d):ms(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===yt?128:0)+(r.mode===ao||r.mode===ds?256:0),(u===0&&d===0||t===Kc)&&p===tr&&(p=L1),p)}function G1(e){if(!e||!e.state)return Le;var t=e.state;return t.window&&(t.window=null),e.state=null,tr}function V1(e,t){var r;return!e||!e.state||(r=e.state,!(r.wrap&2))?Le:(r.head=t,t.done=!1,tr)}function $1(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==fo)?Le:n.mode===fo&&(i=1,i=ms(i,t,r,0),i!==n.check)?Su:(o=Mu(e,t,r,r),o?(n.mode=ys,bs):(n.havedict=1,tr))}qe.inflateReset=Au;qe.inflateReset2=Pu;qe.inflateResetKeep=Cu;qe.inflateInit=z1;qe.inflateInit2=ku;qe.inflate=q1;qe.inflateEnd=G1;qe.inflateGetHeader=V1;qe.inflateSetDictionary=$1;qe.inflateInfo="pako inflate (from Nodeca project)"});var xs=K((I5,Lu)=>{"use strict";Lu.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Ou=K((O5,Iu)=>{"use strict";function Z1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Iu.exports=Z1});var Bu=K(Mn=>{"use strict";var zr=Fu(),kn=gt(),lo=is(),oe=xs(),vs=Xi(),H1=os(),j1=Ou(),Ru=Object.prototype.toString;function rr(e){if(!(this instanceof rr))return new rr(e);this.options=kn.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H1,this.strm.avail_out=0;var r=zr.inflateInit2(this.strm,t.windowBits);if(r!==oe.Z_OK)throw new Error(vs[r]);if(this.header=new j1,zr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=lo.string2buf(t.dictionary):Ru.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=zr.inflateSetDictionary(this.strm,t.dictionary),r!==oe.Z_OK)))throw new Error(vs[r])}rr.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,s,l,f,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?oe.Z_FINISH:oe.Z_NO_FLUSH,typeof e=="string"?r.input=lo.binstring2buf(e):Ru.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new kn.Buf8(n),r.next_out=0,r.avail_out=n),o=zr.inflate(r,oe.Z_NO_FLUSH),o===oe.Z_NEED_DICT&&i&&(o=zr.inflateSetDictionary(this.strm,i)),o===oe.Z_BUF_ERROR&&c===!0&&(o=oe.Z_OK,c=!1),o!==oe.Z_STREAM_END&&o!==oe.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===oe.Z_STREAM_END||r.avail_in===0&&(a===oe.Z_FINISH||a===oe.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=lo.utf8border(r.output,r.next_out),l=r.next_out-s,f=lo.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&kn.arraySet(r.output,r.output,s,l,0),this.onData(f)):this.onData(kn.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==oe.Z_STREAM_END);return o===oe.Z_STREAM_END&&(a=oe.Z_FINISH),a===oe.Z_FINISH?(o=zr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===oe.Z_OK):(a===oe.Z_SYNC_FLUSH&&(this.onEnd(oe.Z_OK),r.avail_out=0),!0)};rr.prototype.onData=function(e){this.chunks.push(e)};rr.prototype.onEnd=function(e){e===oe.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=kn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ws(e,t){var r=new rr(t);if(r.push(e,!0),r.err)throw r.msg||vs[r.err];return r.result}function Y1(e,t){return t=t||{},t.raw=!0,ws(e,t)}Mn.Inflate=rr;Mn.inflate=ws;Mn.inflateRaw=Y1;Mn.ungzip=ws});var zu=K((B5,Nu)=>{"use strict";var W1=gt().assign,X1=qc(),K1=Bu(),Q1=xs(),Du={};W1(Du,X1,K1,Q1);Nu.exports=Du});var Uu=K(()=>{});var qu=K(_s=>{_s.read=function(e,t,r,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,f=l>>1,c=-7,u=r?i-1:0,d=r?-1:1,h=e[t+u];for(u+=d,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=o*256+e[t+u],u+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=a*256+e[t+u],u+=d,c-=8);if(o===0)o=1-f;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(h?-1:1)*a*Math.pow(2,o-n)};_s.write=function(e,t,r,n,i,o){var a,s,l,f=o*8-i-1,c=(1<<f)-1,u=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,g=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+u>=1?t+=d/l:t+=d*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,i),a=a+u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=s&255,h+=g,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[r+h]=a&255,h+=g,a/=256,f-=8);e[r+h-g]|=x*128}});var ju=K((e7,Hu)=>{"use strict";Hu.exports=Y;var uo=qu();function Y(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Y.Varint=0;Y.Fixed64=1;Y.Bytes=2;Y.Fixed32=5;var Es=(1<<16)*(1<<16),Gu=1/Es,J1=12,Zu=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");Y.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,o=this.pos;this.type=n&7,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=ho(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=$u(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=ho(this.buf,this.pos)+ho(this.buf,this.pos+4)*Es;return this.pos+=8,e},readSFixed64:function(){var e=ho(this.buf,this.pos)+$u(this.buf,this.pos+4)*Es;return this.pos+=8,e},readFloat:function(){var e=uo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=uo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,r,n;return n=t[this.pos++],r=n&127,n<128||(n=t[this.pos++],r|=(n&127)<<7,n<128)||(n=t[this.pos++],r|=(n&127)<<14,n<128)||(n=t[this.pos++],r|=(n&127)<<21,n<128)?r:(n=t[this.pos],r|=(n&15)<<28,eb(r,e,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=J1&&Zu?pb(this.buf,t,e):hb(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Y.Bytes)return e.push(this.readVarint(t));var r=vt(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==Y.Bytes)return e.push(this.readSVarint());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==Y.Bytes)return e.push(this.readBoolean());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==Y.Bytes)return e.push(this.readFloat());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==Y.Bytes)return e.push(this.readDouble());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==Y.Bytes)return e.push(this.readFixed32());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==Y.Bytes)return e.push(this.readSFixed32());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==Y.Bytes)return e.push(this.readFixed64());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==Y.Bytes)return e.push(this.readSFixed64());var t=vt(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=e&7;if(t===Y.Varint)for(;this.buf[this.pos++]>127;);else if(t===Y.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Y.Fixed32)this.pos+=4;else if(t===Y.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Vr(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Vr(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Vr(this.buf,e&-1,this.pos),Vr(this.buf,Math.floor(e*Gu),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Vr(this.buf,e&-1,this.pos),Vr(this.buf,Math.floor(e*Gu),this.pos+4),this.pos+=8},writeVarint:function(e){if(e=+e||0,e>268435455||e<0){tb(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))},writeSVarint:function(e){this.writeVarint(e<0?-e*2-1:e*2)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(e.length*4),this.pos++;var t=this.pos;this.pos=gb(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Vu(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),uo.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),uo.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var n=this.pos-r;n>=128&&Vu(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,Y.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,ib,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,ob,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,fb,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ab,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,sb,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,lb,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,cb,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,ub,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,db,t)},writeBytesField:function(e,t){this.writeTag(e,Y.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Y.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Y.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Y.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Y.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Y.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Y.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Y.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Y.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Y.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};function eb(e,t,r){var n=r.buf,i,o;if(o=n[r.pos++],i=(o&112)>>4,o<128||(o=n[r.pos++],i|=(o&127)<<3,o<128)||(o=n[r.pos++],i|=(o&127)<<10,o<128)||(o=n[r.pos++],i|=(o&127)<<17,o<128)||(o=n[r.pos++],i|=(o&127)<<24,o<128)||(o=n[r.pos++],i|=(o&1)<<31,o<128))return Gr(e,i,t);throw new Error("Expected varint not more than 10 bytes")}function vt(e){return e.type===Y.Bytes?e.readVarint()+e.pos:e.pos+1}function Gr(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function tb(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(r=~(-e%4294967296),n=~(-e/4294967296),r^4294967295?r=r+1|0:(r=0,n=n+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),rb(r,n,t),nb(n,t)}function rb(e,t,r){r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos++]=e&127|128,e>>>=7,r.buf[r.pos]=e&127}function nb(e,t){var r=(e&7)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=e&127)))))}function Vu(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function ib(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function ob(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function ab(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function sb(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function fb(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function lb(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function cb(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function ub(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function db(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function ho(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}function Vr(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function $u(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function hb(e,t,r){for(var n="",i=t;i<r;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s>r)break;var l,f,c;s===1?o<128&&(a=o):s===2?(l=e[i+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(a=(o&15)<<12|(l&63)<<6|f&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=e[i+1],f=e[i+2],c=e[i+3],(l&192)===128&&(f&192)===128&&(c&192)===128&&(a=(o&15)<<18|(l&63)<<12|(f&63)<<6|c&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,n+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),n+=String.fromCharCode(a),i+=s}return n}function pb(e,t,r){return Zu.decode(e.subarray(t,r))}function gb(e,t,r){for(var n=0,i,o;n<t.length;n++){if(i=t.charCodeAt(n),i>55295&&i<57344)if(o)if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=i;continue}else i=o-55296<<10|i-56320|65536,o=null;else{i>56319||n+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=i;continue}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=i&63|128)}return r}});var Dd=K((p4,Ls)=>{"use strict";Ls.exports=Mo;Ls.exports.default=Mo;function Mo(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Od(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var s,l,f,c,u,d,h;if(n&&(o=Xb(e,t,o,r)),e.length>80*r){s=f=e[0],l=c=e[1];for(var g=r;g<i;g+=r)u=e[g],d=e[g+1],u<s&&(s=u),d<l&&(l=d),u>f&&(f=u),d>c&&(c=d);h=Math.max(f-s,c-l),h=h!==0?32767/h:0}return ii(o,a,r,s,l,h,0),a}function Od(e,t,r,n,i){var o,a;if(i===Fs(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Id(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Id(o,e[o],e[o+1],a);return a&&Fo(a,a.next)&&(ai(a),a=a.next),a}function lr(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Fo(r,r.next)||ee(r.prev,r,r.next)===0)){if(ai(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ii(e,t,r,n,i,o,a){if(e){!a&&o&&ty(e,n,i,o);for(var s=e,l,f;e.prev!==e.next;){if(l=e.prev,f=e.next,o?jb(e,n,i,o):Hb(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),ai(e),e=f.next,s=f.next;continue}if(e=f,e===s){a?a===1?(e=Yb(lr(e),t,r),ii(e,t,r,n,i,o,2)):a===2&&Wb(e,t,r,n,i,o):ii(lr(e),t,r,n,i,o,1);break}}}}function Hb(e){var t=e.prev,r=e,n=e.next;if(ee(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,l=r.y,f=n.y,c=i<o?i<a?i:a:o<a?o:a,u=s<l?s<f?s:f:l<f?l:f,d=i>o?i>a?i:a:o>a?o:a,h=s>l?s>f?s:f:l>f?l:f,g=n.next;g!==t;){if(g.x>=c&&g.x<=d&&g.y>=u&&g.y<=h&&Hr(i,s,o,l,a,f,g.x,g.y)&&ee(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function jb(e,t,r,n){var i=e.prev,o=e,a=e.next;if(ee(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,f=a.x,c=i.y,u=o.y,d=a.y,h=s<l?s<f?s:f:l<f?l:f,g=c<u?c<d?c:d:u<d?u:d,x=s>l?s>f?s:f:l>f?l:f,T=c>u?c>d?c:d:u>d?u:d,_=ks(h,g,t,r,n),v=ks(x,T,t,r,n),M=e.prevZ,L=e.nextZ;M&&M.z>=_&&L&&L.z<=v;){if(M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Hr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0||(M=M.prevZ,L.x>=h&&L.x<=x&&L.y>=g&&L.y<=T&&L!==i&&L!==a&&Hr(s,c,l,u,f,d,L.x,L.y)&&ee(L.prev,L,L.next)>=0))return!1;L=L.nextZ}for(;M&&M.z>=_;){if(M.x>=h&&M.x<=x&&M.y>=g&&M.y<=T&&M!==i&&M!==a&&Hr(s,c,l,u,f,d,M.x,M.y)&&ee(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;L&&L.z<=v;){if(L.x>=h&&L.x<=x&&L.y>=g&&L.y<=T&&L!==i&&L!==a&&Hr(s,c,l,u,f,d,L.x,L.y)&&ee(L.prev,L,L.next)>=0)return!1;L=L.nextZ}return!0}function Yb(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Fo(i,o)&&Rd(i,n,n.next,o)&&oi(i,o)&&oi(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),ai(n),ai(n.next),n=e=o),n=n.next}while(n!==e);return lr(n)}function Wb(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&iy(a,s)){var l=Bd(a,s);a=lr(a,a.next),l=lr(l,l.next),ii(a,t,r,n,i,o,0),ii(l,t,r,n,i,o,0);return}s=s.next}a=a.next}while(a!==e)}function Xb(e,t,r,n){var i=[],o,a,s,l,f;for(o=0,a=t.length;o<a;o++)s=t[o]*n,l=o<a-1?t[o+1]*n:e.length,f=Od(e,s,l,n,!1),f===f.next&&(f.steiner=!0),i.push(ny(f));for(i.sort(Kb),o=0;o<i.length;o++)r=Qb(i[o],r);return r}function Kb(e,t){return e.x-t.x}function Qb(e,t){var r=Jb(e,t);if(!r)return t;var n=Bd(r,e);return lr(n,n.next),lr(r,r.next)}function Jb(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o&&(o=s,a=r.x<r.next.x?r:r.next,s===n))return a}r=r.next}while(r!==t);if(!a)return null;var l=a,f=a.x,c=a.y,u=1/0,d;r=a;do n>=r.x&&r.x>=f&&n!==r.x&&Hr(i<c?n:o,i,f,c,i<c?o:n,i,r.x,r.y)&&(d=Math.abs(i-r.y)/(n-r.x),oi(r,e)&&(d<u||d===u&&(r.x>a.x||r.x===a.x&&ey(a,r)))&&(a=r,u=d)),r=r.next;while(r!==l);return a}function ey(e,t){return ee(e.prev,e,t.prev)<0&&ee(t.next,e,e.next)<0}function ty(e,t,r,n){var i=e;do i.z===0&&(i.z=ks(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,ry(i)}function ry(e){var t,r,n,i,o,a,s,l,f=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<f&&(s++,n=n.nextZ,!!n);t++);for(l=f;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,f*=2}while(a>1);return e}function ks(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function ny(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Hr(e,t,r,n,i,o,a,s){return(i-a)*(t-s)>=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function iy(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!oy(e,t)&&(oi(e,t)&&oi(t,e)&&ay(e,t)&&(ee(e.prev,e,t.prev)||ee(e,t.prev,t))||Fo(e,t)&&ee(e.prev,e,e.next)>0&&ee(t.prev,t,t.next)>0)}function ee(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Fo(e,t){return e.x===t.x&&e.y===t.y}function Rd(e,t,r,n){var i=ko(ee(e,t,r)),o=ko(ee(e,t,n)),a=ko(ee(r,n,e)),s=ko(ee(r,n,t));return!!(i!==o&&a!==s||i===0&&Po(e,r,t)||o===0&&Po(e,n,t)||a===0&&Po(r,e,n)||s===0&&Po(r,t,n))}function Po(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function ko(e){return e>0?1:e<0?-1:0}function oy(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Rd(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function oi(e,t){return ee(e.prev,e,e.next)<0?ee(e,t,e.next)>=0&&ee(e,e.prev,t)>=0:ee(e,t,e.prev)<0||ee(e,e.next,t)<0}function ay(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Bd(e,t){var r=new Ms(e.i,e.x,e.y),n=new Ms(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Id(e,t,r,n){var i=new Ms(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ai(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ms(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Mo.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(Fs(e,0,o,r));if(i)for(var s=0,l=t.length;s<l;s++){var f=t[s]*r,c=s<l-1?t[s+1]*r:e.length;a-=Math.abs(Fs(e,f,c,r))}var u=0;for(s=0;s<n.length;s+=3){var d=n[s]*r,h=n[s+1]*r,g=n[s+2]*r;u+=Math.abs((e[d]-e[g])*(e[h+1]-e[d+1])-(e[d]-e[h])*(e[g+1]-e[d+1]))}return a===0&&u===0?0:Math.abs((u-a)/a)};function Fs(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Mo.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var $d=K((x4,Vd)=>{Vd.exports=globalThis.deck});var Sr={};Ma(Sr,{carto:()=>V_});var Aa={};Ma(Aa,{BASEMAP:()=>rg,CARTO_LAYERS:()=>G_,ClusterTileLayer:()=>Vn,H3TileLayer:()=>sr,HeatmapTileLayer:()=>Xn,LayerFactory:()=>ol,PointLabelLayer:()=>Jn,QuadbinTileLayer:()=>fr,RasterTileLayer:()=>ni,VectorTileLayer:()=>Yr,_GOOGLE_BASEMAPS:()=>Sa,_QuadbinLayer:()=>xo,_RasterLayer:()=>Ao,_STYLE_LAYER_GROUPS:()=>el,_SpatialIndexTileLayer:()=>$r,_applyLayerGroupFilters:()=>Ta,_fetchStyle:()=>Ca,_getStyleUrl:()=>Ke,colorBins:()=>rl,colorCategories:()=>nl,colorContinuous:()=>il,fetchBasemapProps:()=>sg,fetchMap:()=>og});var nd=q(kt(),1),id=q(pt(),1),od=q(cn(),1);function Fa(e,t){let r=t?.globalFeatureId;return r!==void 0?gg(e,r):mg(e,t?.type)}function gg(e,t){let r=ul(e);for(let n of r){let i=0,o=n.featureIds.value[0];for(let a=0;a<n.featureIds.value.length;a++){let s=n.featureIds.value[a];if(s!==o){if(t===n.globalFeatureIds.value[i])return zi(n,i,a);i=a,o=s}}if(t===n.globalFeatureIds.value[i])return zi(n,i,n.featureIds.value.length)}throw new Error(`featureId:${t} not found`)}function mg(e,t){let r=ul(e,t);return bg(r)}function cl(e,t,r){switch(e.type){case"Point":return wg(e,t,r);case"LineString":return vg(e,t,r);case"Polygon":return dl(e,t,r);default:let n=e;throw new Error(`Unsupported geometry type: ${n?.type}`)}}function ul(e,t){let r=[];return e.points&&(e.points.type="Point",r.push(e.points)),e.lines&&(e.lines.type="LineString",r.push(e.lines)),e.polygons&&(e.polygons.type="Polygon",r.push(e.polygons)),r}function bg(e){let t=[];for(let r of e){if(r.featureIds.value.length===0)continue;let n=0,i=r.featureIds.value[0];for(let o=0;o<r.featureIds.value.length;o++){let a=r.featureIds.value[o];a!==i&&(t.push(zi(r,n,o)),n=o,i=a)}t.push(zi(r,n,r.featureIds.value.length))}return t}function zi(e,t,r){let n=cl(e,t,r),i=xg(e,t,r),o=yg(e,t,r);return{type:"Feature",geometry:n,properties:i,...o}}function yg(e,t=0,r){return e.fields&&e.fields[e.featureIds.value[t]]}function xg(e,t=0,r){let n=Object.assign({},e.properties[e.featureIds.value[t]]);for(let i in e.numericProps)n[i]=e.numericProps[i].value[t];return n}function dl(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.polygonIndices.value.filter(l=>l>=t&&l<=r),o=e.primitivePolygonIndices.value.filter(l=>l>=t&&l<=r);if(!(i.length>2)){let l=[];for(let f=0;f<o.length-1;f++){let c=o[f],u=o[f+1],d=Ui(n,c,u);l.push(d)}return{type:"Polygon",coordinates:l}}let s=[];for(let l=0;l<i.length-1;l++){let f=i[l],c=i[l+1],u=dl(e,f,c).coordinates;s.push(u)}return{type:"MultiPolygon",coordinates:s}}function vg(e,t=-1/0,r=1/0){let{positions:n}=e,i=e.pathIndices.value.filter(s=>s>=t&&s<=r);if(!(i.length>2))return{type:"LineString",coordinates:Ui(n,i[0],i[1])};let a=[];for(let s=0;s<i.length-1;s++){let l=Ui(n,i[s],i[s+1]);a.push(l)}return{type:"MultiLineString",coordinates:a}}function wg(e,t,r){let{positions:n}=e,i=Ui(n,t,r);return i.length>1?{type:"MultiPoint",coordinates:i}:{type:"Point",coordinates:i[0]}}function Ui(e,t,r){t=t||0,r=r||e.value.length/e.size;let n=[];for(let i=t;i<r;i++){let o=Array();for(let a=i*e.size;a<(i+1)*e.size;a++)o.push(Number(e.value[a]));n.push(o)}return n}var zn=q(Ee(),1);var Kg=q(Al(),1);var jt=Math.PI,Ng=jt/4,i3=jt/180,Pl=180/jt,kl=512;function Se(e){let[t,r]=e,n=t/kl*(2*jt)-jt,i=2*(Math.atan(Math.exp(r/kl*(2*jt)-jt))-Ng);return[n*Pl,i*Pl]}var d3=Math.PI/180;var Ll=[0x5555555555555555n,0x3333333333333333n,0x0f0f0f0f0f0f0f0fn,0x00ff00ff00ff00ffn,0x0000ffff0000ffffn,0x00000000ffffffffn],Il=[0n,1n,2n,4n,8n,16n];function Ol(e){return BigInt(`0x${e}`)}function un(e){return e.toString(16)}function Rl(e){if(e.z<0||e.z>26)throw new Error("Wrong zoom");let t=BigInt(e.z),r=BigInt(e.x)<<32n-t,n=BigInt(e.y)<<32n-t;for(let o=0;o<5;o++){let a=Il[5-o],s=Ll[4-o];r=(r|r<<a)&s,n=(n|n<<a)&s}return 0x4000000000000000n|1n<<59n|t<<52n|(r|n<<1n)>>12n|0xfffffffffffffn>>t*2n}function Gi(e){let t=e>>59n&7n,r=e>>57n&3n,n=e>>52n&0x1fn,i=(e&0xfffffffffffffn)<<12n;if(t!==1n&&r!==0n)throw new Error("Wrong mode");let o=i,a=i>>1n;for(let s=0;s<6;s++){let l=Il[s],f=Ll[s];o=(o|o>>l)&f,a=(a|a>>l)&f}return o=o>>32n-n,a=a>>32n-n,{z:Number(n),x:Number(o),y:Number(a)}}function dn(e){return e>>52n&0x1fn}function Vi(e){let t=dn(e)-1n;return e&~(0x1fn<<52n)|t<<52n|0xfffffffffffffn>>t*2n}var Zi=q(Yt(),1),zl=q(Ee(),1);var Dl=q(Ee(),1);function ke(e,t){Dl.log.assert(e,t)}function Nl(e,t){let{properties:r,numericProps:n}=e;return new Proxy(r[t]||{},{get(i,o){return o in n?n[o].value[t]:i[o]},has(i,o){return o in n||o in i},ownKeys(i){return[...Object.keys(n),...Reflect.ownKeys(i)]},getOwnPropertyDescriptor(i,o){return{enumerable:!0,configurable:!0}}})}function Mt(e,t){return`https://unpkg.com/@deck.gl/carto@${t}/dist/${e}-worker.js`}var hn=new Uint16Array,Ba={positions:{value:new Float32Array,size:2},properties:[],numericProps:{},featureIds:{value:hn,size:1},globalFeatureIds:{value:hn,size:1}};function $i(){return{shape:"binary-feature-collection",points:{type:"Point",...Ba},lines:{type:"LineString",pathIndices:{value:hn,size:1},...Ba},polygons:{type:"Polygon",polygonIndices:{value:hn,size:1},primitivePolygonIndices:{value:hn,size:1},...Ba}}}function pn(e,t,r,n,i,o=2){return{type:"Point",positions:{value:new Float32Array(e),size:o},featureIds:{value:new Uint16Array(t),size:1},globalFeatureIds:{value:new Uint32Array(r),size:1},numericProps:n,properties:i}}function Da(e,t){let r={};return t&&Object.keys(t).forEach(n=>{r[n]={value:new Float32Array(e),size:1}}),r}function Na(e,t,r,n){Object.keys(e).forEach(i=>{t[i].value[n]=e[i].value[r]})}function Ul(e,t,r,n=[],i,o,a="quadbin"){if(!e.content)return!1;e.userData||(e.userData={});let s=t.get(r)?.[0];if(s){if(n.every(f=>f.name in s))return!1;t.clear()}let l={};for(let f of e.content){let c=f.id,u=typeof i=="function"?i(f,{}):i;for(let T=0;T<r-1;T++)if(a==="h3"){let _=(0,Zi.getResolution)(c);c=(0,Zi.cellToParent)(c,Math.max(0,_-1))}else c=Vi(c);let d=String(c);if(!(d in l)){l[d]={id:c,count:0,position:[0,0]};for(let{name:T,aggregation:_}of n)_==="any"?l[d][T]=f.properties[T]:l[d][T]=0}let h=l[d].count;l[d].count+=typeof o=="function"?o(f,{}):o;let g=l[d].count,x=g-h;l[d].position[0]=(h*l[d].position[0]+x*u[0])/g,l[d].position[1]=(h*l[d].position[1]+x*u[1])/g;for(let{name:T,aggregation:_}of n){let v=l[d][T],M=f.properties[T];_==="average"?l[d][T]=(h*v+x*M)/g:_==="count"||_==="sum"?l[d][T]=v+M:_==="max"?l[d][T]=Math.max(v,M):_==="min"&&(l[d][T]=Math.min(v,M))}}return t.set(r,Object.values(l)),!0}function ql(e){let t=[],r=["any","average","count","min","max","sum"];for(let n of Object.keys(e.content[0].properties)){let i=n.split("_").pop().toLowerCase();r.includes(i)||(zl.log.warn(`No valid aggregation present in ${n} property`)(),i="any"),t.push({name:n,aggregation:i})}return t}function Gl(e,t){let r={};for(let{name:n,aggregation:i}of t)if(r[n]={min:1/0,max:-1/0},i!=="any")for(let o of e)r[n].min=Math.min(r[n].min,o[n]),r[n].max=Math.max(r[n].max,o[n]);return r}function Vl(e){let t=new Float32Array(e.length*2),r=new Uint16Array(e.length);for(let n=0;n<e.length;n++)t.set(e[n].position,2*n),r[n]=n;return{...$i(),points:pn(t,r,r,{},e)}}var $l=q(pt(),1);var et=class extends $l._Tileset2D{getTileIndices(t){return super.getTileIndices(t).map(Rl).map(r=>({q:r,i:un(r)}))}getTileId({q:t,i:r}){return r||un(t)}getTileMetadata({q:t}){return super.getTileMetadata(Gi(t))}getTileZoom({q:t}){return Number(dn(t))}getParentIndex({q:t}){return{q:Vi(t)}}};var Hl=q(pt(),1),ie=q(Yt(),1),Zl=85.051128;function jl({west:e,north:t,east:r,south:n},i,o=1){let l=[[t,r],[n,r],[n,e],[t,e]].map(u=>(0,ie.latLngToCell)(u[0],u[1],i)).map(u=>Math.max(...(0,ie.originToDirectedEdges)(u).map(d=>(0,ie.edgeLength)(d,ie.UNITS.rads)))*180/Math.PI),f=Math.max(...l)*o,c=Math.min(180,f/Math.cos((t+n)/2*Math.PI/180));return{north:Math.min(t+f,Zl),east:r+c,south:Math.max(n-f,-Zl),west:e-c}}function Yl({west:e,north:t,east:r,south:n},i){let o=Math.abs(r-e);if(o>180){let s=Math.ceil(o/180),l=[];for(let f=0;f<s;f++){let c=e+f*180,u=Math.min(c+179.9999999,r);l=l.concat(Yl({west:c,north:t,east:u,south:n},i))}return[...new Set(l)]}return(0,ie.polygonToCells)([[t,r],[n,r],[n,e],[t,e],[t,r]],i)}function Qg(e){let t=(0,ie.cellToBoundary)(e),r=t.map(f=>f[0]),n=t.map(f=>f[1]),i=Math.min(...n),o=Math.min(...r),a=Math.max(...n),s=Math.max(...r);return jl({west:i,south:o,east:a,north:s},(0,ie.getResolution)(e),.12)}var Jg=2;function Cr(e,t){let r=Math.log2(t/512),n=2/3*(e.zoom-r),i=Math.log(1/Math.cos(Math.PI*e.latitude/180));return Math.max(0,Math.floor(n+i-Jg))}var Ft=class extends Hl._Tileset2D{getTileIndices({viewport:t,minZoom:r,maxZoom:n}){if(t.latitude===void 0)return[];let[i,o,a,s]=t.getBounds(),{tileSize:l}=this.opts,f=Cr(t,l),c;if(typeof r=="number"&&Number.isFinite(r)&&f<r)return[];if(typeof n=="number"&&Number.isFinite(n)&&f>n){f=n;let u=(0,ie.latLngToCell)(t.latitude,t.longitude,n);c=(0,ie.gridDisk)(u,1)}else{let u=jl({west:i,north:s,east:a,south:o},f);c=Yl(u,f)}return c.map(u=>({i:u}))}getTileId({i:t}){return t}getTileMetadata({i:t}){return{bbox:Qg(t)}}getTileZoom({i:t}){return(0,ie.getResolution)(t)}getParentIndex(t){let r=(0,ie.getResolution)(t.i);return{i:(0,ie.cellToParent)(t.i,r-1)}}};var Wl=512;function za(e){let{x:t,y:r,z:n}=Gi(e),i=Wl/(1<<n);return[t*i,Wl-r*i,i]}function em(e,t){let[r,n,i]=za(e);return[[r,n],[r+t*i,n-t*i]]}function Hi(e,t=1){let[r,n]=em(e,t),[i,o]=Se(r),[a,s]=Se(n);return[a,o,a,s,i,s,i,o,a,o]}var go=q(Yt(),1);var tt={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},tm=tt.self||tt.window||tt.global||{},rm=tt.window||tt.self||tt.global||{},nm=tt.global||tt.self||tt.window||{},im=tt.document||{};var Ar=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var Xl=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),om=Xl&&parseFloat(Xl[1])||0;function Ua(e){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,e)}function Kl(...e){return am(e)}function am(e){let t=e.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),r=t.reduce((o,a)=>o+a.byteLength,0),n=new Uint8Array(r),i=0;for(let o of t)n.set(o,i),i+=o.byteLength;return n.buffer}async function qa(e){let t=[];for await(let r of e)t.push(r);return Kl(...t)}function Ql(e){return e&&typeof e=="object"&&e.isBuffer}function Pr(e){if(Ql(e))return e;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let t=e;return new TextEncoder().encode(t).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function kr(e){return t=>new Promise((r,n)=>e(t,(i,o)=>i?n(i):r(o)))}var ji=class{constructor(t){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(t={}){Ua(t)}async compress(t){return await this.preload(),this.compressSync(t)}async decompress(t,r){return await this.preload(),this.decompressSync(t,r)}compressSync(t){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(t,r){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(t){let r=await this.concatenate(t);yield this.compress(r)}async*decompressBatches(t){let r=await this.concatenate(t);yield this.decompress(r)}concatenate(t){return qa(t)}improveError(t){return t.message.includes(this.name)||(t.message=`${this.name} ${t.message}`),t}};var nr=q(zu(),1),xt=q(Uu(),1),co=class extends ji{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(t={}){super(t),this.options=t}async compress(t){if(!Ar&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await kr(xt.default.gzip)(t):await kr(xt.default.deflate)(t);return Pr(r)}return this.compressSync(t)}async decompress(t){if(!Ar&&this.options.deflate?.useZlib){let r=this.options.deflate?.gzip?await kr(xt.default.gunzip)(t):await kr(xt.default.inflate)(t);return Pr(r)}return this.decompressSync(t)}compressSync(t){if(!Ar&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?xt.default.gzipSync(t):xt.default.deflateSync(t);return Pr(o)}let r=this.options?.deflate||{},n=new Uint8Array(t);return(this.options?.raw?nr.default.deflateRaw:nr.default.deflate)(n,r).buffer}decompressSync(t){if(!Ar&&this.options.deflate?.useZlib){let o=this.options.deflate?.gzip?xt.default.gunzipSync(t):xt.default.inflateSync(t);return Pr(o)}let r=this.options?.deflate||{},n=new Uint8Array(t);return(this.options?.raw?nr.default.inflateRaw:nr.default.inflate)(n,r).buffer}async*compressBatches(t){let r=this.options?.deflate||{},n=new nr.default.Deflate(r);yield*this.transformBatches(n,t)}async*decompressBatches(t){let r=this.options?.deflate||{},n=new nr.default.Inflate(r);yield*this.transformBatches(n,t)}async*transformBatches(t,r){t.onData=this._onData.bind(this),t.onEnd=this._onEnd.bind(this);for await(let a of r){let s=new Uint8Array(a);if(!t.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let n=new Uint8Array(0),i=t.push(n,!0);yield*this._getChunks()}_onData(t){this._chunks.push(t)}_onEnd(t){if(t!==0)throw new Error(this._getError(t)+this._chunks.length)}_getChunks(){let t=this._chunks;return this._chunks=[],t}_getError(t=0){let r={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};return`${this.name}: ${r[t]}`}};var Fn=class extends co{name="gzip";extensions=["gz","gzip"];contentEncodings=["gzip","x-gzip"];isSupported=!0;constructor(t){super({...t,deflate:{...t?.gzip,gzip:!0}})}};function ir(e,t,r,n){let i=t.type===2?t.readVarint()+t.pos:t.pos+1,o=t.buf.buffer.slice(t.pos,i);if(n?.compression==="gzip"){let s=new Fn().decompressSync(o);r.value=new e(s)}else r.value=new e(o);return t.pos=i,r.value}var Ln=class{static read(t,r){return t.readFields(Ln._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=n.readString())}},Ge=class{static read(t,r){return t.readFields(Ge._readField,{},r)}static _readField(t,r,n){if(t===1){let{key:i,value:o}=Ln.read(n,n.readVarint()+n.pos);r[i]=o}}},or=class{static read(t,r){let{value:n,size:i}=t.readFields(or._readField,{value:[],size:0},r);return{value:n,size:i}}static _readField(t,r,n){t===1?ir(Float64Array,n,r):t===2&&(r.size=n.readVarint(!0))}},ye=class{static read(t,r){let{value:n,size:i}=t.readFields(ye._readField,{value:[],size:0},r);return{value:new Uint32Array(n),size:i}}static _readField(t,r,n){t===1?n.readPackedVarint(r.value):t===2&&(r.size=n.readVarint(!0))}},ar=class{static read(t,r){return t.readFields(ar._readField,{id:0},r)}static _readField(t,r,n){t===1&&(r.id=n.readVarint())}},In=class{static read(t,r){return t.readFields(In._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ir(Float64Array,n,r)}},Ve=class{static read(t,r){return t.readFields(Ve._readField,{key:"",value:null},r)}static _readField(t,r,n){t===1?r.key=n.readString():t===2&&(r.value=In.read(n,n.readVarint()+n.pos))}},On=class{static read(t,r){return t.readFields(On._readField,{positions:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=or.read(n,n.readVarint()+n.pos);else if(t===2)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===5){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===6&&r.fields.push(ar.read(n,n.readVarint()+n.pos))}},Rn=class{static read(t,r){return t.readFields(Rn._readField,{positions:null,pathIndices:null,globalFeatureIds:null,featureIds:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=or.read(n,n.readVarint()+n.pos);else if(t===2)r.pathIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===6){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===7&&r.fields.push(ar.read(n,n.readVarint()+n.pos))}},Bn=class{static read(t,r){return t.readFields(Bn._readField,{positions:null,polygonIndices:null,globalFeatureIds:null,featureIds:null,primitivePolygonIndices:null,triangles:null,properties:[],numericProps:{},fields:[]},r)}static _readField(t,r,n){if(t===1)r.positions=or.read(n,n.readVarint()+n.pos);else if(t===2)r.polygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===3)r.globalFeatureIds=ye.read(n,n.readVarint()+n.pos);else if(t===4)r.featureIds=ye.read(n,n.readVarint()+n.pos);else if(t===5)r.primitivePolygonIndices=ye.read(n,n.readVarint()+n.pos);else if(t===6)r.triangles=ye.read(n,n.readVarint()+n.pos);else if(t===7)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===8){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}else t===9&&r.fields.push(ar.read(n,n.readVarint()+n.pos))}},Ur=class{static read(t,r){return t.readFields(Ur._readField,{points:null,lines:null,polygons:null},r)}static _readField(t,r,n){t===1?r.points=On.read(n,n.readVarint()+n.pos):t===2?r.lines=Rn.read(n,n.readVarint()+n.pos):t===3&&(r.polygons=Bn.read(n,n.readVarint()+n.pos))}};var Dn=class{static read(t,r){return t.readFields(Dn._readField,{value:[]},r)}static _readField(t,r,n){t===1&&ir(BigUint64Array,n,r)}},Nn=class{static read(t,r){return t.readFields(Nn._readField,{indices:null,properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.indices=Dn.read(n,n.readVarint()+n.pos);else if(t===2)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===3){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}},qr=class{static read(t,r){return t.readFields(qr._readField,{scheme:0,cells:null},r)}static _readField(t,r,n){t===1?r.scheme=n.readVarint():t===2&&(r.cells=Nn.read(n,n.readVarint()+n.pos))}};var Yu=q(ju(),1);function Nt(e,t){let r=new Yu.default(e);return t.read(r)}function Wu(e){let{cells:t,scheme:r}=e,n=t.indices.value.length,i=[];for(let o=0;o<n;o++){let a=r==="h3"?un(t.indices.value[o]):t.indices.value[o],s={...t.properties[o]};for(let l of Object.keys(t.numericProps))s[l]=t.numericProps[l].value[o];i.push({id:a,properties:s})}return i}var Ku="9.2.0-beta.3",Qu="cartoSpatialTile",mb={cartoSpatialTile:{scheme:"quadbin",workerUrl:Mt(Qu,Ku)}},bb={name:"CARTO Spatial Tile",version:Ku,id:Qu,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-spatial-tile"],category:"geometry",parse:async(e,t)=>Xu(e,t),parseSync:Xu,worker:!0,options:mb};function Xu(e,t){if(!e)return null;let r=Nt(e,qr),{cells:n}=r,i=t?.cartoSpatialTile?.scheme;return Wu({cells:n,scheme:i})}var po=bb;var Ju=q(Ee(),1),ed=q(Ee(),1);function $e(e,t,r=0){if(!e)return t;if(!t)return e;if(r>10)return t;let n={...e};for(let i in t){let o=t[i];o===e||o===t||(typeof o=="object"&&o!==null?n[i]=$e(e[i],o,r+1):n[i]=o)}return n}function td(e,t){let r={};for(let{geoid:n,...i}of t.properties)n in r?Ju.log.warn("Duplicate geoid key in boundary mapping, using first occurance")():r[n]=i;for(let n of["points","lines","polygons"]){let i=e[n];if(i.positions.value.length===0)continue;i.properties=i.properties.map(({geoid:f})=>r[f]);let{positions:o,globalFeatureIds:a}=i,s=null;n==="lines"&&(s=i.pathIndices.value),n==="polygons"&&(s=i.polygonIndices.value);let l=o.value.length/o.size;for(let f in t.numericProps){let c=t.numericProps[f].value,u=c.constructor,d=new u(l);if(i.numericProps[f]={value:d,size:1},s)for(let h=0;h<s.length-1;h++){let g=s[h],x=s[h+1],T=a.value[g];d.fill(c[T],g,x)}else for(let h=0;h<l;h++){let g=a.value[h];d[h]=c[g]}}}return e}var Ce={type:"object",value:null,validate:(e,t)=>t.optional&&e===null||typeof e=="object"&&Array.isArray(e.tiles)&&e.tiles.every(r=>typeof r=="string"),equal:(e,t)=>(0,ed._deepEqual)(e,t,2),async:!0};(0,od.registerLoaders)([po]);function rd(e){if(e===Ft)return"h3";if(e===et)return"quadbin";throw new Error("Invalid tileset class")}var ad={data:Ce,clusterLevel:{type:"number",value:5,min:1},getPosition:{type:"accessor",value:({id:e})=>{if(typeof e=="string"){let[t,r]=(0,go.cellToLatLng)(e);return[r,t]}return Hi(e,.5).slice(2,4)}},getWeight:{type:"accessor",value:1},refinementStrategy:"no-overlap",tileSize:512},Un=class extends id.TileLayer{initializeState(){super.initializeState(),this.state.aggregationCache=new WeakMap,this.state.scheme=rd(this.props.TilesetClass)}updateState(t){let{props:r}=t,n=rd(r.TilesetClass);this.state.scheme!==n&&(this.setState({scheme:n,tileset:null}),this.state.aggregationCache=new WeakMap),super.updateState(t)}renderLayers(){let t=this.state.tileset?.tiles.filter(h=>h.isLoaded&&h.content&&this.state.tileset.isTileVisible(h));if(!t?.length||!this.state.tileset)return null;t.sort((h,g)=>g.zoom-h.zoom);let{getPosition:r,getWeight:n}=this.props,{aggregationCache:i,scheme:o}=this.state,a=o==="h3",s=ql(t[0]),l=[],f=!1,c=this._getAggregationLevels(t);for(let h of t){let g=i.get(h.content);g||(g=new Map,i.set(h.content,g));let x=Ul(h,g,c,s,r,n,a?"h3":"quadbin");f||(f=x),l.push(...g.get(c))}l.sort((h,g)=>Number(g.count-h.count));let u=l?.map(h=>h.id);if(f||(f=!(0,zn._deepEqual)(u,this.state.clusterIds,1)),this.setState({clusterIds:u}),f){let h=Gl(l,s),g=Vl(l);g.points.attributes={stats:h},this.setState({data:g})}let d={...this.props,id:"clusters",data:this.state.data,dataComparator:(h,g)=>{let x=h?.points?.properties?.map(_=>_.id),T=g?.points?.properties?.map(_=>_.id);return(0,zn._deepEqual)(x,T,1)}};return new nd.GeoJsonLayer(this.getSubLayerProps(d))}getPickingInfo(t){let r=t.info;if(r.index!==-1){let{data:n}=t.sourceLayer.props;r.object=Fa(n,{globalFeatureId:r.index})}return r}_updateAutoHighlight(t){for(let r of this.getSubLayers())r.updateAutoHighlight(t)}filterSubLayer(){return!0}_getAggregationLevels(t){let r=this.state.scheme==="h3",n=t[0],i,o;r?(i=(0,go.getResolution)(n.id),o=Cr(this.context.viewport,this.state.tileset.opts.tileSize)):(i=n.zoom,o=this.context.viewport.zoom);let a=Math.round(o-i);return Math.round(this.props.clusterLevel)-a}};Un.layerName="ClusterGeoJsonLayer";Un.defaultProps=ad;var qn=class extends zn.CompositeLayer{getLoadOptions(){let t=this.props.data,r=t&&"scheme"in t?t.scheme:"quadbin";return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:r}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,maxresolution:n}=t,o=t&&"scheme"in t&&t.scheme==="h3"?Ft:et;return[new Un(this.props,{id:`cluster-geojson-layer-${this.props.id}`,data:r,TilesetClass:o,maxZoom:n,loadOptions:this.getLoadOptions()})]}};qn.layerName="ClusterTileLayer";qn.defaultProps=ad;var Vn=qn;var ld=q(Ee(),1),Ss=q(pt(),1);var sd=q(cn(),1);var fd=q(pt(),1);(0,sd.registerLoaders)([po]);function yb(e){return e!=null&&e!==""}var xb={tileSize:512},$n=class extends fd.TileLayer{_updateAutoHighlight(t){let{hoveredFeatureId:r}=this.state,n=t.object,i=null;if(n&&(i=n.id),r!==i){let{highlightColor:o}=this.props;typeof o=="function"&&(o=o(t)),this.setState({highlightColor:o,hoveredFeatureId:i})}}getSubLayerPropsByTile(t){return{highlightedObjectIndex:this.getHighlightedObjectIndex(t),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(t){let{hoveredFeatureId:r}=this.state,n=t.content;return!yb(r)||!Array.isArray(n)||!this._featureInTile(t,r)?-1:n.findIndex(o=>o.id===r)}_featureInTile(t,r){let n=this.state.tileset,i=n.getTileZoom(t.index),o=t.index.q?"q":"i",a={[o]:r},s=n.getTileZoom(a);for(;!(s<=i);)a=n.getParentIndex(a),s=n.getTileZoom(a);return a[o]===t.index[o]}};$n.layerName="SpatialIndexTileLayer";$n.defaultProps=xb;var $r=$n;var vb=e=>{let{data:t}=e,{index:r}=e.tile;return!t||!t.length?null:new Ss.H3HexagonLayer(e,{getHexagon:n=>n.id,centerHexagon:r,highPrecision:!0})},wb={data:Ce,tileSize:512},Zn=class extends ld.CompositeLayer{initializeState(){Ss.H3HexagonLayer._checkH3Lib()}getLoadOptions(){let t=this.props.data;return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},cartoSpatialTile:{scheme:"h3"}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r}=t,{minresolution:n,maxresolution:i}=t;this.props.minZoom&&(n=Math.max(n,Cr({zoom:this.props.minZoom,latitude:0},this.props.tileSize))),this.props.maxZoom&&(i=Math.min(i,Cr({zoom:this.props.maxZoom,latitude:0},this.props.tileSize)));let o=this.getSubLayerClass("spatial-index-tile",$r);return new o(this.props,{id:`h3-tile-layer-${this.props.id}`,data:r,TilesetClass:Ft,renderSubLayers:vb,minZoom:n,maxZoom:i,loadOptions:this.getLoadOptions()})}};Zn.layerName="H3TileLayer";Zn.defaultProps=wb;var sr=Zn;var wo=q(Yt(),1),_o=q(Ee(),1),hd=q(kt(),1);var _b=`uniform heatmapUniforms {
|
|
8
8
|
vec2 colorDomain;
|
|
9
9
|
vec2 delta;
|
|
10
10
|
float intensity;
|
|
@@ -166,7 +166,7 @@ vColor = vec4(color.rgb, color.a * layer.opacity);
|
|
|
166
166
|
}
|
|
167
167
|
DECKGL_FILTER_COLOR(vColor, geometry);
|
|
168
168
|
}
|
|
169
|
-
`;var Db={...As.ColumnLayer.defaultProps,extruded:!1,diskResolution:4,vertices:[[-.5,-.5],[.5,-.5],[.5,.5],[-.5,.5]]},Co=class extends yo(As.ColumnLayer){getShaders(){let t=super.getShaders(),r=this.props.data,n=r.data.blockSize??Math.sqrt(r.length);return{...t,defines:{...t.defines,BLOCK_WIDTH:n},vs:vd}}initializeState(){this.getAttributeManager().addInstanced({instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getLineColor",defaultValue:[255,255,255,255]}})}};Co.layerName="RasterColumnLayer";function Nb(e,t){return e.data===t.data&&e.length===t.length}var ei=class extends wd.CompositeLayer{renderLayers(){let{data:t,getElevation:r,getFillColor:n,getLineColor:i,getLineWidth:o,tileIndex:a,updateTriggers:s}=this.props;if(!t||!a)return null;let l=t.blockSize??0,[f,c,u]=za(a),d=[f,c],h=u/l,g=this.getSubLayerClass("column",Co),{highlightedObjectIndex:x,highlightColor:T}=this.state;return new g(this.props,this.getSubLayerProps({id:"cell",updateTriggers:s,getElevation:this.getSubLayerAccessor(r),getFillColor:this.getSubLayerAccessor(n),getLineColor:this.getSubLayerAccessor(i),getLineWidth:this.getSubLayerAccessor(o)}),{data:{data:t,length:l*l},dataComparator:Nb,offset:d,lineWidthScale:h,highlightedObjectIndex:x,highlightColor:T})}getSubLayerAccessor(t){return typeof t!="function"?super.getSubLayerAccessor(t):(r,n)=>{let{data:i,index:o}=n,a=i.data,s=Nl(a.cells,o);return t({properties:s},n)}}getPickingInfo(t){let r=super.getPickingInfo(t);return r.index!==-1&&(r.object=this.getSubLayerAccessor(n=>n)(void 0,{data:this.props,index:r.index})),r}_updateAutoHighlight(t){let{highlightedObjectIndex:r}=this.state,n=-1;if(t.index!==-1&&(n=t.index),r!==n){let{highlightColor:i}=this.props;typeof i=="function"&&(i=i(t)),this.setState({highlightColor:i,highlightedObjectIndex:n})}}};ei.layerName="RasterLayer";ei.defaultProps=Db;var Ao=ei;var Ad=q(pt(),1);var Pd=q(cn(),1);var zb={uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,uint64:BigUint64Array,int8:Int8Array,int16:Int16Array,int32:Int32Array,int64:BigInt64Array,float32:Float32Array,float64:Float64Array},ti=class{static read(t,r){return t.readFields(ti._readField,{name:"",type:"",data:null},r)}static _readField(t,r,n){if(t===1)r.name=n.readString();else if(t===2)r.type=n.readString();else if(t===3){let i=zb[r.type];if(!i)throw Error(`Invalid data type: ${r.type}`);r.data={};let{compression:o}=zt;ir(i,n,r.data,{compression:o})}}},zt=class{static read(t,r){return t.readFields(zt._readField,{blockSize:0,bands:[]},r)}static _readField(t,r,n){t===1?r.blockSize=n.readVarint():t===2&&r.bands.push(ti.read(n,n.readVarint()+n.pos))}};var Ed="9.2.0-beta.2",Sd="cartoRasterTile",Ub={cartoRasterTile:{metadata:null,workerUrl:Mt(Sd,Ed)}},qb={name:"CARTO Raster Tile",version:Ed,id:Sd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-raster-tile"],category:"geometry",parse:async(e,t)=>_d(e,t),parseSync:_d,worker:!0,options:Ub};function _d(e,t){let r=t?.cartoRasterTile?.metadata;if(!e||!r)return null;zt.compression=r.compression;let n=Nt(e,zt),{bands:i,blockSize:o}=n,a={};for(let s=0;s<i.length;s++){let{name:l,data:f}=i[s];a[l]=f}return{blockSize:o,cells:{numericProps:a,properties:[]}}}var Td=qb;(0,Pd.registerLoaders)([Td]);var Gb=e=>{let t=e.tile?.index?.q;return t?new Ao(e,{tileIndex:t}):null},Vb={data:Ce,refinementStrategy:"no-overlap",tileSize:512},Ps=class extends Hn(Ad.TileLayer,cd){filterSubLayer(t){let{tile:r}=t.layer.props;return r?super.filterSubLayer(t):!0}},ri=class extends Cd.CompositeLayer{getLoadOptions(){let t=this.props.data;return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,minzoom:n,maxzoom:i,raster_metadata:o}=t,a=this.getSubLayerClass("tile",Ps),s=this.getLoadOptions();return new a(this.props,{id:`raster-tile-layer-${this.props.id}`,data:r,TilesetClass:et,renderSubLayers:Gb,minZoom:n,maxZoom:i,loadOptions:{...s,cartoRasterTile:{...s?.cartoRasterTile,metadata:o}}})}};ri.layerName="RasterTileLayer";ri.defaultProps=Vb;var ni=ri;var Yd=q(cn(),1);var Zr=class{static read(t,r){return t.readFields(Zr._readField,{properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===2){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}};var Md="9.2.0-beta.2",Fd="cartoPropertiesTile",$b={cartoPropertiesTile:{workerUrl:Mt(Fd,Md)}},Zb={name:"CARTO Properties Tile",version:Md,id:Fd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-properties-tile"],category:"geometry",worker:!0,parse:async(e,t)=>kd(e,t),parseSync:kd,options:$b};function kd(e,t){return e?Nt(e,Zr):null}var Ld=Zb;var zd=q(Dd(),1);var Ud="9.2.0-beta.2",qd="cartoVectorTile",sy={cartoVectorTile:{workerUrl:Mt(qd,Ud)}},fy={name:"CARTO Vector Tile",version:Ud,id:qd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-vector-tile"],category:"geometry",parse:async(e,t)=>Nd(e,t),parseSync:Nd,worker:!0,options:sy};function ly(e,t,{startPosition:r,endPosition:n,indices:i}){let o=e.positions.size,a=r*o,s=n*o,l=e.positions.value.subarray(a,s),f=i.slice(1).map(u=>u-r),c=(0,zd.default)(l,f,o);for(let u=0,d=c.length;u<d;++u)t.push(r+c[u])}function cy(e){let{polygonIndices:t,primitivePolygonIndices:r}=e,n=[],i=0;for(let o=0;o<t.value.length-1;o++){let a=t.value[o],s=t.value[o+1],l=r.value.indexOf(s),f=r.value.subarray(i,l);i=l,ly(e,n,{startPosition:a,endPosition:s,indices:f})}e.triangles={value:new Uint32Array(n),size:1}}function Nd(e,t){if(!e)return null;let r=Nt(e,Ur);return r.polygons&&!r.polygons.triangles&&cy(r.polygons),r}var Gd=fy;var Lo=q($d(),1),jr=q(pt(),1),Wd=q(kt(),1);function Zd(e,t){let r=t?t in e.numericProps:!1,n=new Map;for(let c=0;c<e.pathIndices.value.length-1;c++){let u=e.pathIndices.value[c],d=e.featureIds.value[u],h;t===void 0?h=d:r?h=e.numericProps[t].value[u]:e.properties[d]&&t in e.properties[d]?h=e.properties[d][t]:h=void 0;let g=my(e,c);(!n.has(h)||g>n.get(h).length)&&n.set(h,{index:c,length:g})}let i=[],o=[],a=[],s=[],l=Da(n.size,e.numericProps),f=0;for(let[c,{index:u}]of n){let d=by(e,u);i.push(...d);let h=e.pathIndices.value[u],g=e.featureIds.value[h];a.push(f),o.push(e.properties[g]),s.push(e.globalFeatureIds.value[h]),Na(e.numericProps,l,h,f),f++}return pn(i,a,s,l,o)}function Hd(e,t,r){let{west:n,south:i,east:o,north:a}=t,l=(o-n)*(a-i)*1e-4,f=[],c=[],u=[],d=[],h=Da(e.polygonIndices.value.length-1,e.numericProps),g=0,x=0,{extruded:T}=r;for(let _=0;_<e.polygonIndices.value.length-1;_++){let v=e.polygonIndices.value[_],M=e.polygonIndices.value[_+1];if(uy(e,_)<l)continue;let L=py(e,_),I=-1,B=[0,0],N=!1;for(;x<e.triangles.value.length;){let m=e.triangles.value[x];if(m>=M)break;if(N){x+=3;continue}let b=e.triangles.value[x+1],y=e.triangles.value[x+2],w=e.positions.value.subarray(m*e.positions.size,m*e.positions.size+e.positions.size),S=e.positions.value.subarray(b*e.positions.size,b*e.positions.size+e.positions.size),P=e.positions.value.subarray(y*e.positions.size,y*e.positions.size+e.positions.size);if(hy(L,w,S,P))N=!0;else{let E=jd(w,S,P);E>I&&(I=E,B=[(w[0]+S[0]+P[0])/3,(w[1]+S[1]+P[1])/3])}x+=3}let p=N?L:B;if(dy(p,t)){f.push(...p);let m=e.featureIds.value[v];if(T){let b=r.getElevation(void 0,{data:e,index:m});f.push(b*r.elevationScale)}c.push(e.properties[m]),u.push(g),d.push(e.globalFeatureIds.value[v]),Na(e.numericProps,h,v,g),g++}}return e.numericProps&&Object.keys(h).forEach(_=>{h[_].value=h[_].value.slice(0,g)}),pn(f,u,d,h,c,T?3:2)}function uy(e,t){let{positions:{value:r,size:n},polygonIndices:{value:i},triangles:{value:o}}=e,a=i[t],s=i[t+1],l=0,f=0;for(;f<o.length&&!(o[f]>=a);)f+=3;for(;f<o.length;){let c=o[f];if(c>=s)break;let u=o[f+1],d=o[f+2],h=r.subarray(c*n,c*n+n),g=r.subarray(u*n,u*n+n),x=r.subarray(d*n,d*n+n);l+=jd(h,g,x),f+=3}return l}function dy([e,t],{west:r,east:n,south:i,north:o}){return e>=r&&e<n&&t>=i&&t<o}function hy(e,t,r,n){let i=Math.abs((r[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(r[1]-t[1]))/2,o=Math.abs((t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1]))/2,a=Math.abs((r[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(r[1]-e[1]))/2,s=Math.abs((n[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(n[1]-e[1]))/2;return Math.abs(i-(o+a+s))<1e-10}function jd([e,t],[r,n],[i,o]){return Math.abs((e*(n-o)+r*(o-t)+i*(t-n))/2)}function py(e,t){let{positions:{value:r,size:n}}=e,i=n*e.polygonIndices.value[t],o=n*e.polygonIndices.value[t+1],a=1/0,s=1/0,l=-1/0,f=-1/0;for(let c=i;c<o;c+=n){let[u,d]=r.subarray(c,c+2);a=Math.min(a,u),s=Math.min(s,d),l=Math.max(l,u),f=Math.max(f,d)}return[(a+l)/2,(s+f)/2]}function gy(e,t){let{positions:{value:r}}=e,[n,i,o,a]=r.subarray(t,t+4);return Math.sqrt(Math.pow(o-n,2)+Math.pow(a-i,2))}function my(e,t){let{positions:{size:r}}=e,n=r*e.pathIndices.value[t],i=r*e.pathIndices.value[t+1],o=0;for(let a=n;a<i;a+=r)o+=gy(e,a);return o}function by(e,t){let{positions:{value:r},pathIndices:{value:n}}=e,i=n[t]*2,a=(n[t+1]*2-i)/2;if(a===2){let[l,f,c,u]=r.subarray(i,i+4);return[(l+c)/2,(f+u)/2]}let s=i+Math.floor(a/2)*2;return[r[s],r[s+1]]}(0,Yd.registerLoaders)([Ld,Gd]);var yy={...jr.MVTLayer.defaultProps,autoLabels:!1,data:Ce,dataComparator:Ce.equal,tileSize:512},si=class extends jr.MVTLayer{constructor(...t){super(...t)}initializeState(){super.initializeState(),this.setState({binary:!0})}updateState(t){let{props:r}=t;if(r.data){super.updateState(t);let i=new URL(r.data.tiles[0]).searchParams.get("formatTiles")==="mvt";this.setState({mvt:i})}}getLoadOptions(){let t=this.props.data;return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},gis:{format:"binary"}})}async getTileData(t){let r=this.props.data,{tiles:n,properties_tiles:i}=r,o=(0,jr._getURLFromTemplate)(n,t);if(!o)return Promise.reject("Invalid URL");let a=this.getLoadOptions(),{fetch:s}=this.props,{signal:l}=t,f=s(o,{propName:"data",layer:this,loadOptions:a,signal:l});if(!i)return await f;let c=(0,jr._getURLFromTemplate)(i,t);if(!c)return Promise.reject("Invalid properties URL");let u=s(c,{propName:"data",layer:this,loadOptions:a,signal:l}),[d,h]=await Promise.all([f,u]);return d?h?td(d,h):d:null}renderSubLayers(t){if(t.data===null)return null;let r=t.tile.bbox,n=[],i={"points-text":{type:Jn,...t?._subLayerProps?.["points-text"],extensions:[new Lo.CollisionFilterExtension,...t.extensions||[],...t?._subLayerProps?.["points-text"]?.extensions||[]]}};if(this.state.mvt)n.push(super.renderSubLayers(t));else{let{west:o,south:a,east:s,north:l}=r,f=[new Lo.ClipExtension,...t.extensions||[]],c={clipBounds:[o,a,s,l]},u=h=>({[h]:{...c,...t?._subLayerProps?.[h],extensions:[...f,...t?._subLayerProps?.[h]?.extensions||[]]}}),d={...t,data:{...t.data,tileBbox:r},autoHighlight:!1,_subLayerProps:{...t._subLayerProps,...i,...u("polygons-fill"),...u("polygons-stroke"),...u("linestrings")}};n.push(new Wd.GeoJsonLayer(d))}if(n[0]&&t.autoLabels){let o=$i();t.data.lines&&t.data.lines.positions.value.length>0&&(o.points=Zd(t.data.lines,typeof t.autoLabels=="object"?t.autoLabels.uniqueIdProperty:void 0)),t.data.polygons&&t.data.polygons.positions.value.length>0&&(o.points=Hd(t.data.polygons,r,t)),n.push(n[0].clone({id:`${t.id}-labels`,data:o,pickable:!1,autoHighlight:!1}))}return n}renderLayers(){let t=super.renderLayers();if(!this.props.autoLabels)return t;let r=t.flat().filter(Boolean);return r.sort((n,i)=>{let o=n.id.includes("labels"),a=i.id.includes("labels");return o&&!a?1:!o&&a?-1:0}),r.map(n=>n.id.includes("labels")?n.clone({highlightedObjectIndex:-1}):n)}_isWGS84(){return this.state.mvt?super._isWGS84():!0}};si.layerName="VectorTileLayer";si.defaultProps=yy;var Yr=si;var xy=Math.PI/180,vy=180/Math.PI;function th(e){var t=Xd(e[0]+1,e[2]),r=Xd(e[0],e[2]),n=Kd(e[1]+1,e[2]),i=Kd(e[1],e[2]);return[r,n,t,i]}function wy(e){var t=th(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r}function Xd(e,t){return e/Math.pow(2,t)*360-180}function Kd(e,t){var r=Math.PI-2*Math.PI*e/Math.pow(2,t);return vy*Math.atan(.5*(Math.exp(r)-Math.exp(-r)))}function Is(e,t,r){var n=sh(e,t,r);return n[0]=Math.floor(n[0]),n[1]=Math.floor(n[1]),n}function rh(e){return[[e[0]*2,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2+1,e[2]+1],[e[0]*2,e[1]*2+1,e[2]+1]]}function nh(e){return e[0]%2===0&&e[1]%2===0?[e[0]/2,e[1]/2,e[2]-1]:e[0]%2===0&&!e[1]%2===0?[e[0]/2,(e[1]-1)/2,e[2]-1]:!e[0]%2===0&&e[1]%2===0?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function ih(e){return rh(nh(e))}function _y(e,t){for(var r=ih(e),n=0;n<r.length;n++)if(!oh(t,r[n]))return!1;return!0}function oh(e,t){for(var r=0;r<e.length;r++)if(ah(e[r],t))return!0;return!1}function ah(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ey(e){for(var t="",r=e[2];r>0;r--){var n=0,i=1<<r-1;e[0]&i&&n++,e[1]&i&&(n+=2),t+=n.toString()}return t}function Sy(e){for(var t=0,r=0,n=e.length,i=n;i>0;i--){var o=1<<i-1;switch(e[n-i]){case"0":break;case"1":t|=o;break;case"2":r|=o;break;case"3":t|=o,r|=o;break}}return[t,r,n]}function Ty(e){var t=Is(e[0],e[1],32),r=Is(e[2],e[3],32),n=[t[0],t[1],r[0],r[1]],i=Cy(n);if(i===0)return[0,0,0];var o=n[0]>>>32-i,a=n[1]>>>32-i;return[o,a,i]}function Cy(e){for(var t=28,r=0;r<t;r++){var n=1<<32-(r+1);if((e[0]&n)!=(e[2]&n)||(e[1]&n)!=(e[3]&n))return r}return t}function sh(e,t,r){var n=Math.sin(t*xy),i=Math.pow(2,r),o=i*(e/360+.5),a=i*(.5-.25*Math.log((1+n)/(1-n))/Math.PI);return[o,a,r]}var Io={tileToGeoJSON:wy,tileToBBOX:th,getChildren:rh,getParent:nh,getSiblings:ih,hasTile:oh,hasSiblings:_y,tilesEqual:ah,tileToQuadkey:Ey,quadkeyToTile:Sy,pointToTile:Is,bboxToTile:Ty,pointToTileFraction:sh},Ay=Py;function Py(e,t){var r,n,i=e.coordinates,o=t.max_zoom,a={},s=[];if(e.type==="Point")return[Io.pointToTile(i[0],i[1],o)];if(e.type==="MultiPoint")for(r=0;r<i.length;r++)n=Io.pointToTile(i[r][0],i[r][1],o),a[Ze(n[0],n[1],n[2])]=!0;else if(e.type==="LineString")Os(a,i,o);else if(e.type==="MultiLineString")for(r=0;r<i.length;r++)Os(a,i[r],o);else if(e.type==="Polygon")Qd(a,s,i,o);else if(e.type==="MultiPolygon")for(r=0;r<i.length;r++)Qd(a,s,i[r],o);else throw new Error("Geometry type not implemented");if(t.min_zoom!==o){var l=s.length;for(Jd(a,s),r=0;r<l;r++){var f=s[r];a[Ze(f[0],f[1],f[2])]=!0}return ky(a,s,t)}return Jd(a,s),s}function ky(e,t,r){for(var n=[],i=r.max_zoom;i>r.min_zoom;i--){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s];if(l[0]%2===0&&l[1]%2===0){var f=Ze(l[0]+1,l[1],i),c=Ze(l[0],l[1]+1,i),u=Ze(l[0]+1,l[1]+1,i);if(e[f]&&e[c]&&e[u]){e[Ze(l[0],l[1],l[2])]=!1,e[f]=!1,e[c]=!1,e[u]=!1;var d=[l[0]/2,l[1]/2,i-1];i-1===r.min_zoom?n.push(d):(o[Ze(l[0]/2,l[1]/2,i-1)]=!0,a.push(d))}}}for(s=0;s<t.length;s++)l=t[s],e[Ze(l[0],l[1],l[2])]&&n.push(l);e=o,t=a}return n}function Qd(e,t,r,n){for(var i=[],o=0;o<r.length;o++){var a=[];Os(e,r[o],n,a);for(var s=0,l=a.length,f=l-1;s<l;f=s++){var c=(s+1)%l,u=a[s][1];(u>a[f][1]||u>a[c][1])&&(u<a[f][1]||u<a[c][1])&&u!==a[c][1]&&i.push(a[s])}}for(i.sort(My),o=0;o<i.length;o+=2){u=i[o][1];for(var d=i[o][0]+1;d<i[o+1][0];d++){var h=Ze(d,u,n);e[h]||t.push([d,u,n])}}}function My(e,t){return e[1]-t[1]||e[0]-t[0]}function Os(e,t,r,n){for(var i,o,a=0;a<t.length-1;a++){var s=Io.pointToTileFraction(t[a][0],t[a][1],r),l=Io.pointToTileFraction(t[a+1][0],t[a+1][1],r),f=s[0],c=s[1],u=l[0],d=l[1],h=u-f,g=d-c;if(!(g===0&&h===0)){var x=h>0?1:-1,T=g>0?1:-1,_=Math.floor(f),v=Math.floor(c),M=h===0?1/0:Math.abs(((h>0?1:0)+_-f)/h),L=g===0?1/0:Math.abs(((g>0?1:0)+v-c)/g),I=Math.abs(x/h),B=Math.abs(T/g);for((_!==i||v!==o)&&(e[Ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v);M<1||L<1;)M<L?(M+=I,_+=x):(L+=B,v+=T),e[Ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v}}n&&v===n[0][1]&&n.pop()}function Jd(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.push(Fy(+r[n]))}function Ze(e,t,r){var n=2*(1<<r);return(n*t+e)*32+r}function Fy(e){var t=e%32,r=2*(1<<t),n=(e-t)/32,i=n%r,o=(n-i)/r%r;return[i,o,t]}var fh=[0x5555555555555555n,0x3333333333333333n,0x0f0f0f0f0f0f0f0fn,0x00ff00ff00ff00ffn,0x0000ffff0000ffffn,0x00000000ffffffffn],lh=[0n,1n,2n,4n,8n,16n],eh=512;function Ly(e){let{x:t,y:r,z:n}=Bs(e),i=eh/(1<<n);return[t*i,eh-r*i,i]}function Iy(e,t){let[r,n,i]=Ly(e);return[[r,n],[r+t*i,n-t*i]]}function Oy(e,t=1){let[r,n]=Iy(e,t),[i,o]=Se(r),[a,s]=Se(n);return[a,o,a,s,i,s,i,o,a,o]}function Rs(e){if(e.z<0||e.z>26)throw new Error("Wrong zoom");let t=BigInt(e.z),r=BigInt(e.x)<<32n-t,n=BigInt(e.y)<<32n-t;for(let o=0;o<5;o++){let a=lh[5-o],s=fh[4-o];r=(r|r<<a)&s,n=(n|n<<a)&s}return 0x4000000000000000n|1n<<59n|t<<52n|(r|n<<1n)>>12n|0xfffffffffffffn>>t*2n}function Bs(e){let t=e>>59n&7n,r=e>>57n&3n,n=e>>52n&0x1fn,i=(e&0xfffffffffffffn)<<12n;if(t!==1n&&r!==0n)throw new Error("Wrong mode");let o=i,a=i>>1n;for(let s=0;s<6;s++){let l=lh[s],f=fh[s];o=(o|o>>l)&f,a=(a|a>>l)&f}return o=o>>32n-n,a=a>>32n-n,{z:Number(n),x:Number(o),y:Number(a)}}function Oo(e){return e>>52n&0x1fn}function ch(e,t){let r=Number(t);return Ay(e,{min_zoom:r,max_zoom:r}).map(([n,i,o])=>Rs({x:n,y:i,z:o}))}function uh(e){let t=Oy(e);return{type:"Polygon",coordinates:[[[t[0],t[1]],[t[2],t[3]],[t[4],t[5]],[t[6],t[7]],[t[0],t[1]]]]}}var Lf=q(Yt(),1);var _p=q(Yt(),1);var Ds=class{add(t,r,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][n?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(n){n.call(r&&r.context?r.context:r,r)})}},Ns=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}},F=class{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+F.version}static addUnaryOp(t){return F.max_unop_len=Math.max(t.length,F.max_unop_len),F.unary_ops[t]=1,F}static addBinaryOp(t,r,n){return F.max_binop_len=Math.max(t.length,F.max_binop_len),F.binary_ops[t]=r,n?F.right_associative.add(t):F.right_associative.delete(t),F}static addIdentifierChar(t){return F.additional_identifier_chars.add(t),F}static addLiteral(t,r){return F.literals[t]=r,F}static removeUnaryOp(t){return delete F.unary_ops[t],t.length===F.max_unop_len&&(F.max_unop_len=F.getMaxKeyLen(F.unary_ops)),F}static removeAllUnaryOps(){return F.unary_ops={},F.max_unop_len=0,F}static removeIdentifierChar(t){return F.additional_identifier_chars.delete(t),F}static removeBinaryOp(t){return delete F.binary_ops[t],t.length===F.max_binop_len&&(F.max_binop_len=F.getMaxKeyLen(F.binary_ops)),F.right_associative.delete(t),F}static removeAllBinaryOps(){return F.binary_ops={},F.max_binop_len=0,F}static removeLiteral(t){return delete F.literals[t],F}static removeAllLiterals(){return F.literals={},F}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new F(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return F.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!F.binary_ops[String.fromCharCode(t)]||F.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return F.isIdentifierStart(t)||F.isDecimalDigit(t)}throwError(t){let r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(F.hooks[t]){let n={context:this,node:r};return F.hooks.run(t,n),n.node}return r}searchHook(t){if(F.hooks[t]){let r={context:this};return F.hooks[t].find(function(n){return n.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===F.SPACE_CODE||t===F.TAB_CODE||t===F.LF_CODE||t===F.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:F.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===F.SEMCOL_CODE||n===F.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,F.max_binop_len),r=t.length;for(;r>0;){if(F.binary_ops.hasOwnProperty(t)&&(!F.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!F.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,n,i,o,a,s,l,f;if(a=this.gobbleToken(),!a||(r=this.gobbleBinaryOp(),!r))return a;for(o={value:r,prec:F.binaryPrecedence(r),right_a:F.right_associative.has(r)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+r),i=[a,o,s];r=this.gobbleBinaryOp();){if(n=F.binaryPrecedence(r),n===0){this.index-=r.length;break}o={value:r,prec:n,right_a:F.right_associative.has(r)},f=r;let c=u=>o.right_a&&u.right_a?n>u.prec:n<=u.prec;for(;i.length>2&&c(i[i.length-2]);)s=i.pop(),r=i.pop().value,a=i.pop(),t={type:F.BINARY_EXP,operator:r,left:a,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+f),i.push(o,t)}for(l=i.length-1,t=i[l];l>1;)t={type:F.BINARY_EXP,operator:i[l-1].value,left:i[l-2],right:t},l-=2;return t}gobbleToken(){let t,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,F.isDecimalDigit(t)||t===F.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===F.SQUOTE_CODE||t===F.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===F.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,F.max_unop_len),n=r.length;n>0;){if(F.unary_ops.hasOwnProperty(r)&&(!F.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!F.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;let o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:F.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--n)}F.isIdentifierStart(t)?(i=this.gobbleIdentifier(),F.literals.hasOwnProperty(i.name)?i={type:F.LITERAL,value:F.literals[i.name],raw:i.name}:i.name===F.this_str&&(i={type:F.THIS_EXP})):t===F.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===F.PERIOD_CODE||r===F.OBRACK_CODE||r===F.OPAREN_CODE||r===F.QUMARK_CODE;){let n;if(r===F.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==F.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===F.OBRACK_CODE?(t={type:F.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==F.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===F.OPAREN_CODE?t={type:F.CALL_EXP,arguments:this.gobbleArguments(F.CPAREN_CODE),callee:t}:(r===F.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:F.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,n;for(;F.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===F.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);F.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));F.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);F.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return n=this.code,F.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(n===F.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===F.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:F.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",r=this.index,n=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===n){i=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
|
|
169
|
+
`;var Db={...As.ColumnLayer.defaultProps,extruded:!1,diskResolution:4,vertices:[[-.5,-.5],[.5,-.5],[.5,.5],[-.5,.5]]},Co=class extends yo(As.ColumnLayer){getShaders(){let t=super.getShaders(),r=this.props.data,n=r.data.blockSize??Math.sqrt(r.length);return{...t,defines:{...t.defines,BLOCK_WIDTH:n},vs:vd}}initializeState(){this.getAttributeManager().addInstanced({instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getLineColor",defaultValue:[255,255,255,255]}})}};Co.layerName="RasterColumnLayer";function Nb(e,t){return e.data===t.data&&e.length===t.length}var ei=class extends wd.CompositeLayer{renderLayers(){let{data:t,getElevation:r,getFillColor:n,getLineColor:i,getLineWidth:o,tileIndex:a,updateTriggers:s}=this.props;if(!t||!a)return null;let l=t.blockSize??0,[f,c,u]=za(a),d=[f,c],h=u/l,g=this.getSubLayerClass("column",Co),{highlightedObjectIndex:x,highlightColor:T}=this.state;return new g(this.props,this.getSubLayerProps({id:"cell",updateTriggers:s,getElevation:this.getSubLayerAccessor(r),getFillColor:this.getSubLayerAccessor(n),getLineColor:this.getSubLayerAccessor(i),getLineWidth:this.getSubLayerAccessor(o)}),{data:{data:t,length:l*l},dataComparator:Nb,offset:d,lineWidthScale:h,highlightedObjectIndex:x,highlightColor:T})}getSubLayerAccessor(t){return typeof t!="function"?super.getSubLayerAccessor(t):(r,n)=>{let{data:i,index:o}=n,a=i.data,s=Nl(a.cells,o);return t({properties:s},n)}}getPickingInfo(t){let r=super.getPickingInfo(t);return r.index!==-1&&(r.object=this.getSubLayerAccessor(n=>n)(void 0,{data:this.props,index:r.index})),r}_updateAutoHighlight(t){let{highlightedObjectIndex:r}=this.state,n=-1;if(t.index!==-1&&(n=t.index),r!==n){let{highlightColor:i}=this.props;typeof i=="function"&&(i=i(t)),this.setState({highlightColor:i,highlightedObjectIndex:n})}}};ei.layerName="RasterLayer";ei.defaultProps=Db;var Ao=ei;var Ad=q(pt(),1);var Pd=q(cn(),1);var zb={uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,uint64:BigUint64Array,int8:Int8Array,int16:Int16Array,int32:Int32Array,int64:BigInt64Array,float32:Float32Array,float64:Float64Array},ti=class{static read(t,r){return t.readFields(ti._readField,{name:"",type:"",data:null},r)}static _readField(t,r,n){if(t===1)r.name=n.readString();else if(t===2)r.type=n.readString();else if(t===3){let i=zb[r.type];if(!i)throw Error(`Invalid data type: ${r.type}`);r.data={};let{compression:o}=zt;ir(i,n,r.data,{compression:o})}}},zt=class{static read(t,r){return t.readFields(zt._readField,{blockSize:0,bands:[]},r)}static _readField(t,r,n){t===1?r.blockSize=n.readVarint():t===2&&r.bands.push(ti.read(n,n.readVarint()+n.pos))}};var Ed="9.2.0-beta.3",Sd="cartoRasterTile",Ub={cartoRasterTile:{metadata:null,workerUrl:Mt(Sd,Ed)}},qb={name:"CARTO Raster Tile",version:Ed,id:Sd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-raster-tile"],category:"geometry",parse:async(e,t)=>_d(e,t),parseSync:_d,worker:!0,options:Ub};function _d(e,t){let r=t?.cartoRasterTile?.metadata;if(!e||!r)return null;zt.compression=r.compression;let n=Nt(e,zt),{bands:i,blockSize:o}=n,a={};for(let s=0;s<i.length;s++){let{name:l,data:f}=i[s];a[l]=f}return{blockSize:o,cells:{numericProps:a,properties:[]}}}var Td=qb;(0,Pd.registerLoaders)([Td]);var Gb=e=>{let t=e.tile?.index?.q;return t?new Ao(e,{tileIndex:t}):null},Vb={data:Ce,refinementStrategy:"no-overlap",tileSize:512},Ps=class extends Hn(Ad.TileLayer,cd){filterSubLayer(t){let{tile:r}=t.layer.props;return r?super.filterSubLayer(t):!0}},ri=class extends Cd.CompositeLayer{getLoadOptions(){let t=this.props.data;return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}}})}renderLayers(){let t=this.props.data;if(!t)return null;let{tiles:r,minzoom:n,maxzoom:i,raster_metadata:o}=t,a=this.getSubLayerClass("tile",Ps),s=this.getLoadOptions();return new a(this.props,{id:`raster-tile-layer-${this.props.id}`,data:r,TilesetClass:et,renderSubLayers:Gb,minZoom:n,maxZoom:i,loadOptions:{...s,cartoRasterTile:{...s?.cartoRasterTile,metadata:o}}})}};ri.layerName="RasterTileLayer";ri.defaultProps=Vb;var ni=ri;var Yd=q(cn(),1);var Zr=class{static read(t,r){return t.readFields(Zr._readField,{properties:[],numericProps:{}},r)}static _readField(t,r,n){if(t===1)r.properties.push(Ge.read(n,n.readVarint()+n.pos));else if(t===2){let i=Ve.read(n,n.readVarint()+n.pos);r.numericProps[i.key]=i.value}}};var Md="9.2.0-beta.3",Fd="cartoPropertiesTile",$b={cartoPropertiesTile:{workerUrl:Mt(Fd,Md)}},Zb={name:"CARTO Properties Tile",version:Md,id:Fd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-properties-tile"],category:"geometry",worker:!0,parse:async(e,t)=>kd(e,t),parseSync:kd,options:$b};function kd(e,t){return e?Nt(e,Zr):null}var Ld=Zb;var zd=q(Dd(),1);var Ud="9.2.0-beta.3",qd="cartoVectorTile",sy={cartoVectorTile:{workerUrl:Mt(qd,Ud)}},fy={name:"CARTO Vector Tile",version:Ud,id:qd,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-vector-tile"],category:"geometry",parse:async(e,t)=>Nd(e,t),parseSync:Nd,worker:!0,options:sy};function ly(e,t,{startPosition:r,endPosition:n,indices:i}){let o=e.positions.size,a=r*o,s=n*o,l=e.positions.value.subarray(a,s),f=i.slice(1).map(u=>u-r),c=(0,zd.default)(l,f,o);for(let u=0,d=c.length;u<d;++u)t.push(r+c[u])}function cy(e){let{polygonIndices:t,primitivePolygonIndices:r}=e,n=[],i=0;for(let o=0;o<t.value.length-1;o++){let a=t.value[o],s=t.value[o+1],l=r.value.indexOf(s),f=r.value.subarray(i,l);i=l,ly(e,n,{startPosition:a,endPosition:s,indices:f})}e.triangles={value:new Uint32Array(n),size:1}}function Nd(e,t){if(!e)return null;let r=Nt(e,Ur);return r.polygons&&!r.polygons.triangles&&cy(r.polygons),r}var Gd=fy;var Lo=q($d(),1),jr=q(pt(),1),Wd=q(kt(),1);function Zd(e,t){let r=t?t in e.numericProps:!1,n=new Map;for(let c=0;c<e.pathIndices.value.length-1;c++){let u=e.pathIndices.value[c],d=e.featureIds.value[u],h;t===void 0?h=d:r?h=e.numericProps[t].value[u]:e.properties[d]&&t in e.properties[d]?h=e.properties[d][t]:h=void 0;let g=my(e,c);(!n.has(h)||g>n.get(h).length)&&n.set(h,{index:c,length:g})}let i=[],o=[],a=[],s=[],l=Da(n.size,e.numericProps),f=0;for(let[c,{index:u}]of n){let d=by(e,u);i.push(...d);let h=e.pathIndices.value[u],g=e.featureIds.value[h];a.push(f),o.push(e.properties[g]),s.push(e.globalFeatureIds.value[h]),Na(e.numericProps,l,h,f),f++}return pn(i,a,s,l,o)}function Hd(e,t,r){let{west:n,south:i,east:o,north:a}=t,l=(o-n)*(a-i)*1e-4,f=[],c=[],u=[],d=[],h=Da(e.polygonIndices.value.length-1,e.numericProps),g=0,x=0,{extruded:T}=r;for(let _=0;_<e.polygonIndices.value.length-1;_++){let v=e.polygonIndices.value[_],M=e.polygonIndices.value[_+1];if(uy(e,_)<l)continue;let L=py(e,_),I=-1,B=[0,0],N=!1;for(;x<e.triangles.value.length;){let m=e.triangles.value[x];if(m>=M)break;if(N){x+=3;continue}let b=e.triangles.value[x+1],y=e.triangles.value[x+2],w=e.positions.value.subarray(m*e.positions.size,m*e.positions.size+e.positions.size),S=e.positions.value.subarray(b*e.positions.size,b*e.positions.size+e.positions.size),P=e.positions.value.subarray(y*e.positions.size,y*e.positions.size+e.positions.size);if(hy(L,w,S,P))N=!0;else{let E=jd(w,S,P);E>I&&(I=E,B=[(w[0]+S[0]+P[0])/3,(w[1]+S[1]+P[1])/3])}x+=3}let p=N?L:B;if(dy(p,t)){f.push(...p);let m=e.featureIds.value[v];if(T){let b=r.getElevation(void 0,{data:e,index:m});f.push(b*r.elevationScale)}c.push(e.properties[m]),u.push(g),d.push(e.globalFeatureIds.value[v]),Na(e.numericProps,h,v,g),g++}}return e.numericProps&&Object.keys(h).forEach(_=>{h[_].value=h[_].value.slice(0,g)}),pn(f,u,d,h,c,T?3:2)}function uy(e,t){let{positions:{value:r,size:n},polygonIndices:{value:i},triangles:{value:o}}=e,a=i[t],s=i[t+1],l=0,f=0;for(;f<o.length&&!(o[f]>=a);)f+=3;for(;f<o.length;){let c=o[f];if(c>=s)break;let u=o[f+1],d=o[f+2],h=r.subarray(c*n,c*n+n),g=r.subarray(u*n,u*n+n),x=r.subarray(d*n,d*n+n);l+=jd(h,g,x),f+=3}return l}function dy([e,t],{west:r,east:n,south:i,north:o}){return e>=r&&e<n&&t>=i&&t<o}function hy(e,t,r,n){let i=Math.abs((r[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(r[1]-t[1]))/2,o=Math.abs((t[0]-e[0])*(r[1]-e[1])-(r[0]-e[0])*(t[1]-e[1]))/2,a=Math.abs((r[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(r[1]-e[1]))/2,s=Math.abs((n[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(n[1]-e[1]))/2;return Math.abs(i-(o+a+s))<1e-10}function jd([e,t],[r,n],[i,o]){return Math.abs((e*(n-o)+r*(o-t)+i*(t-n))/2)}function py(e,t){let{positions:{value:r,size:n}}=e,i=n*e.polygonIndices.value[t],o=n*e.polygonIndices.value[t+1],a=1/0,s=1/0,l=-1/0,f=-1/0;for(let c=i;c<o;c+=n){let[u,d]=r.subarray(c,c+2);a=Math.min(a,u),s=Math.min(s,d),l=Math.max(l,u),f=Math.max(f,d)}return[(a+l)/2,(s+f)/2]}function gy(e,t){let{positions:{value:r}}=e,[n,i,o,a]=r.subarray(t,t+4);return Math.sqrt(Math.pow(o-n,2)+Math.pow(a-i,2))}function my(e,t){let{positions:{size:r}}=e,n=r*e.pathIndices.value[t],i=r*e.pathIndices.value[t+1],o=0;for(let a=n;a<i;a+=r)o+=gy(e,a);return o}function by(e,t){let{positions:{value:r},pathIndices:{value:n}}=e,i=n[t]*2,a=(n[t+1]*2-i)/2;if(a===2){let[l,f,c,u]=r.subarray(i,i+4);return[(l+c)/2,(f+u)/2]}let s=i+Math.floor(a/2)*2;return[r[s],r[s+1]]}(0,Yd.registerLoaders)([Ld,Gd]);var yy={...jr.MVTLayer.defaultProps,autoLabels:!1,data:Ce,dataComparator:Ce.equal,tileSize:512},si=class extends jr.MVTLayer{constructor(...t){super(...t)}initializeState(){super.initializeState(),this.setState({binary:!0})}updateState(t){let{props:r}=t;if(r.data){super.updateState(t);let i=new URL(r.data.tiles[0]).searchParams.get("formatTiles")==="mvt";this.setState({mvt:i})}}getLoadOptions(){let t=this.props.data;return $e(super.getLoadOptions(),{fetch:{headers:{Authorization:`Bearer ${t.accessToken}`}},gis:{format:"binary"}})}async getTileData(t){let r=this.props.data,{tiles:n,properties_tiles:i}=r,o=(0,jr._getURLFromTemplate)(n,t);if(!o)return Promise.reject("Invalid URL");let a=this.getLoadOptions(),{fetch:s}=this.props,{signal:l}=t,f=s(o,{propName:"data",layer:this,loadOptions:a,signal:l});if(!i)return await f;let c=(0,jr._getURLFromTemplate)(i,t);if(!c)return Promise.reject("Invalid properties URL");let u=s(c,{propName:"data",layer:this,loadOptions:a,signal:l}),[d,h]=await Promise.all([f,u]);return d?h?td(d,h):d:null}renderSubLayers(t){if(t.data===null)return null;let r=t.tile.bbox,n=[],i={"points-text":{type:Jn,...t?._subLayerProps?.["points-text"],extensions:[new Lo.CollisionFilterExtension,...t.extensions||[],...t?._subLayerProps?.["points-text"]?.extensions||[]]}};if(this.state.mvt)n.push(super.renderSubLayers(t));else{let{west:o,south:a,east:s,north:l}=r,f=[new Lo.ClipExtension,...t.extensions||[]],c={clipBounds:[o,a,s,l]},u=h=>({[h]:{...c,...t?._subLayerProps?.[h],extensions:[...f,...t?._subLayerProps?.[h]?.extensions||[]]}}),d={...t,data:{...t.data,tileBbox:r},autoHighlight:!1,_subLayerProps:{...t._subLayerProps,...i,...u("polygons-fill"),...u("polygons-stroke"),...u("linestrings")}};n.push(new Wd.GeoJsonLayer(d))}if(n[0]&&t.autoLabels){let o=$i();t.data.lines&&t.data.lines.positions.value.length>0&&(o.points=Zd(t.data.lines,typeof t.autoLabels=="object"?t.autoLabels.uniqueIdProperty:void 0)),t.data.polygons&&t.data.polygons.positions.value.length>0&&(o.points=Hd(t.data.polygons,r,t)),n.push(n[0].clone({id:`${t.id}-labels`,data:o,pickable:!1,autoHighlight:!1}))}return n}renderLayers(){let t=super.renderLayers();if(!this.props.autoLabels)return t;let r=t.flat().filter(Boolean);return r.sort((n,i)=>{let o=n.id.includes("labels"),a=i.id.includes("labels");return o&&!a?1:!o&&a?-1:0}),r.map(n=>n.id.includes("labels")?n.clone({highlightedObjectIndex:-1}):n)}_isWGS84(){return this.state.mvt?super._isWGS84():!0}};si.layerName="VectorTileLayer";si.defaultProps=yy;var Yr=si;var xy=Math.PI/180,vy=180/Math.PI;function th(e){var t=Xd(e[0]+1,e[2]),r=Xd(e[0],e[2]),n=Kd(e[1]+1,e[2]),i=Kd(e[1],e[2]);return[r,n,t,i]}function wy(e){var t=th(e),r={type:"Polygon",coordinates:[[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]]]};return r}function Xd(e,t){return e/Math.pow(2,t)*360-180}function Kd(e,t){var r=Math.PI-2*Math.PI*e/Math.pow(2,t);return vy*Math.atan(.5*(Math.exp(r)-Math.exp(-r)))}function Is(e,t,r){var n=sh(e,t,r);return n[0]=Math.floor(n[0]),n[1]=Math.floor(n[1]),n}function rh(e){return[[e[0]*2,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2,e[2]+1],[e[0]*2+1,e[1]*2+1,e[2]+1],[e[0]*2,e[1]*2+1,e[2]+1]]}function nh(e){return e[0]%2===0&&e[1]%2===0?[e[0]/2,e[1]/2,e[2]-1]:e[0]%2===0&&!e[1]%2===0?[e[0]/2,(e[1]-1)/2,e[2]-1]:!e[0]%2===0&&e[1]%2===0?[(e[0]-1)/2,e[1]/2,e[2]-1]:[(e[0]-1)/2,(e[1]-1)/2,e[2]-1]}function ih(e){return rh(nh(e))}function _y(e,t){for(var r=ih(e),n=0;n<r.length;n++)if(!oh(t,r[n]))return!1;return!0}function oh(e,t){for(var r=0;r<e.length;r++)if(ah(e[r],t))return!0;return!1}function ah(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ey(e){for(var t="",r=e[2];r>0;r--){var n=0,i=1<<r-1;e[0]&i&&n++,e[1]&i&&(n+=2),t+=n.toString()}return t}function Sy(e){for(var t=0,r=0,n=e.length,i=n;i>0;i--){var o=1<<i-1;switch(e[n-i]){case"0":break;case"1":t|=o;break;case"2":r|=o;break;case"3":t|=o,r|=o;break}}return[t,r,n]}function Ty(e){var t=Is(e[0],e[1],32),r=Is(e[2],e[3],32),n=[t[0],t[1],r[0],r[1]],i=Cy(n);if(i===0)return[0,0,0];var o=n[0]>>>32-i,a=n[1]>>>32-i;return[o,a,i]}function Cy(e){for(var t=28,r=0;r<t;r++){var n=1<<32-(r+1);if((e[0]&n)!=(e[2]&n)||(e[1]&n)!=(e[3]&n))return r}return t}function sh(e,t,r){var n=Math.sin(t*xy),i=Math.pow(2,r),o=i*(e/360+.5),a=i*(.5-.25*Math.log((1+n)/(1-n))/Math.PI);return[o,a,r]}var Io={tileToGeoJSON:wy,tileToBBOX:th,getChildren:rh,getParent:nh,getSiblings:ih,hasTile:oh,hasSiblings:_y,tilesEqual:ah,tileToQuadkey:Ey,quadkeyToTile:Sy,pointToTile:Is,bboxToTile:Ty,pointToTileFraction:sh},Ay=Py;function Py(e,t){var r,n,i=e.coordinates,o=t.max_zoom,a={},s=[];if(e.type==="Point")return[Io.pointToTile(i[0],i[1],o)];if(e.type==="MultiPoint")for(r=0;r<i.length;r++)n=Io.pointToTile(i[r][0],i[r][1],o),a[Ze(n[0],n[1],n[2])]=!0;else if(e.type==="LineString")Os(a,i,o);else if(e.type==="MultiLineString")for(r=0;r<i.length;r++)Os(a,i[r],o);else if(e.type==="Polygon")Qd(a,s,i,o);else if(e.type==="MultiPolygon")for(r=0;r<i.length;r++)Qd(a,s,i[r],o);else throw new Error("Geometry type not implemented");if(t.min_zoom!==o){var l=s.length;for(Jd(a,s),r=0;r<l;r++){var f=s[r];a[Ze(f[0],f[1],f[2])]=!0}return ky(a,s,t)}return Jd(a,s),s}function ky(e,t,r){for(var n=[],i=r.max_zoom;i>r.min_zoom;i--){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s];if(l[0]%2===0&&l[1]%2===0){var f=Ze(l[0]+1,l[1],i),c=Ze(l[0],l[1]+1,i),u=Ze(l[0]+1,l[1]+1,i);if(e[f]&&e[c]&&e[u]){e[Ze(l[0],l[1],l[2])]=!1,e[f]=!1,e[c]=!1,e[u]=!1;var d=[l[0]/2,l[1]/2,i-1];i-1===r.min_zoom?n.push(d):(o[Ze(l[0]/2,l[1]/2,i-1)]=!0,a.push(d))}}}for(s=0;s<t.length;s++)l=t[s],e[Ze(l[0],l[1],l[2])]&&n.push(l);e=o,t=a}return n}function Qd(e,t,r,n){for(var i=[],o=0;o<r.length;o++){var a=[];Os(e,r[o],n,a);for(var s=0,l=a.length,f=l-1;s<l;f=s++){var c=(s+1)%l,u=a[s][1];(u>a[f][1]||u>a[c][1])&&(u<a[f][1]||u<a[c][1])&&u!==a[c][1]&&i.push(a[s])}}for(i.sort(My),o=0;o<i.length;o+=2){u=i[o][1];for(var d=i[o][0]+1;d<i[o+1][0];d++){var h=Ze(d,u,n);e[h]||t.push([d,u,n])}}}function My(e,t){return e[1]-t[1]||e[0]-t[0]}function Os(e,t,r,n){for(var i,o,a=0;a<t.length-1;a++){var s=Io.pointToTileFraction(t[a][0],t[a][1],r),l=Io.pointToTileFraction(t[a+1][0],t[a+1][1],r),f=s[0],c=s[1],u=l[0],d=l[1],h=u-f,g=d-c;if(!(g===0&&h===0)){var x=h>0?1:-1,T=g>0?1:-1,_=Math.floor(f),v=Math.floor(c),M=h===0?1/0:Math.abs(((h>0?1:0)+_-f)/h),L=g===0?1/0:Math.abs(((g>0?1:0)+v-c)/g),I=Math.abs(x/h),B=Math.abs(T/g);for((_!==i||v!==o)&&(e[Ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v);M<1||L<1;)M<L?(M+=I,_+=x):(L+=B,v+=T),e[Ze(_,v,r)]=!0,n&&v!==o&&n.push([_,v]),i=_,o=v}}n&&v===n[0][1]&&n.pop()}function Jd(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.push(Fy(+r[n]))}function Ze(e,t,r){var n=2*(1<<r);return(n*t+e)*32+r}function Fy(e){var t=e%32,r=2*(1<<t),n=(e-t)/32,i=n%r,o=(n-i)/r%r;return[i,o,t]}var fh=[0x5555555555555555n,0x3333333333333333n,0x0f0f0f0f0f0f0f0fn,0x00ff00ff00ff00ffn,0x0000ffff0000ffffn,0x00000000ffffffffn],lh=[0n,1n,2n,4n,8n,16n],eh=512;function Ly(e){let{x:t,y:r,z:n}=Bs(e),i=eh/(1<<n);return[t*i,eh-r*i,i]}function Iy(e,t){let[r,n,i]=Ly(e);return[[r,n],[r+t*i,n-t*i]]}function Oy(e,t=1){let[r,n]=Iy(e,t),[i,o]=Se(r),[a,s]=Se(n);return[a,o,a,s,i,s,i,o,a,o]}function Rs(e){if(e.z<0||e.z>26)throw new Error("Wrong zoom");let t=BigInt(e.z),r=BigInt(e.x)<<32n-t,n=BigInt(e.y)<<32n-t;for(let o=0;o<5;o++){let a=lh[5-o],s=fh[4-o];r=(r|r<<a)&s,n=(n|n<<a)&s}return 0x4000000000000000n|1n<<59n|t<<52n|(r|n<<1n)>>12n|0xfffffffffffffn>>t*2n}function Bs(e){let t=e>>59n&7n,r=e>>57n&3n,n=e>>52n&0x1fn,i=(e&0xfffffffffffffn)<<12n;if(t!==1n&&r!==0n)throw new Error("Wrong mode");let o=i,a=i>>1n;for(let s=0;s<6;s++){let l=lh[s],f=fh[s];o=(o|o>>l)&f,a=(a|a>>l)&f}return o=o>>32n-n,a=a>>32n-n,{z:Number(n),x:Number(o),y:Number(a)}}function Oo(e){return e>>52n&0x1fn}function ch(e,t){let r=Number(t);return Ay(e,{min_zoom:r,max_zoom:r}).map(([n,i,o])=>Rs({x:n,y:i,z:o}))}function uh(e){let t=Oy(e);return{type:"Polygon",coordinates:[[[t[0],t[1]],[t[2],t[3]],[t[4],t[5]],[t[6],t[7]],[t[0],t[1]]]]}}var Lf=q(Yt(),1);var _p=q(Yt(),1);var Ds=class{add(t,r,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][n?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(n){n.call(r&&r.context?r.context:r,r)})}},Ns=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}},F=class{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+F.version}static addUnaryOp(t){return F.max_unop_len=Math.max(t.length,F.max_unop_len),F.unary_ops[t]=1,F}static addBinaryOp(t,r,n){return F.max_binop_len=Math.max(t.length,F.max_binop_len),F.binary_ops[t]=r,n?F.right_associative.add(t):F.right_associative.delete(t),F}static addIdentifierChar(t){return F.additional_identifier_chars.add(t),F}static addLiteral(t,r){return F.literals[t]=r,F}static removeUnaryOp(t){return delete F.unary_ops[t],t.length===F.max_unop_len&&(F.max_unop_len=F.getMaxKeyLen(F.unary_ops)),F}static removeAllUnaryOps(){return F.unary_ops={},F.max_unop_len=0,F}static removeIdentifierChar(t){return F.additional_identifier_chars.delete(t),F}static removeBinaryOp(t){return delete F.binary_ops[t],t.length===F.max_binop_len&&(F.max_binop_len=F.getMaxKeyLen(F.binary_ops)),F.right_associative.delete(t),F}static removeAllBinaryOps(){return F.binary_ops={},F.max_binop_len=0,F}static removeLiteral(t){return delete F.literals[t],F}static removeAllLiterals(){return F.literals={},F}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new F(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return F.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!F.binary_ops[String.fromCharCode(t)]||F.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return F.isIdentifierStart(t)||F.isDecimalDigit(t)}throwError(t){let r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(F.hooks[t]){let n={context:this,node:r};return F.hooks.run(t,n),n.node}return r}searchHook(t){if(F.hooks[t]){let r={context:this};return F.hooks[t].find(function(n){return n.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===F.SPACE_CODE||t===F.TAB_CODE||t===F.LF_CODE||t===F.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:F.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===F.SEMCOL_CODE||n===F.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,F.max_binop_len),r=t.length;for(;r>0;){if(F.binary_ops.hasOwnProperty(t)&&(!F.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!F.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,n,i,o,a,s,l,f;if(a=this.gobbleToken(),!a||(r=this.gobbleBinaryOp(),!r))return a;for(o={value:r,prec:F.binaryPrecedence(r),right_a:F.right_associative.has(r)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+r),i=[a,o,s];r=this.gobbleBinaryOp();){if(n=F.binaryPrecedence(r),n===0){this.index-=r.length;break}o={value:r,prec:n,right_a:F.right_associative.has(r)},f=r;let c=u=>o.right_a&&u.right_a?n>u.prec:n<=u.prec;for(;i.length>2&&c(i[i.length-2]);)s=i.pop(),r=i.pop().value,a=i.pop(),t={type:F.BINARY_EXP,operator:r,left:a,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+f),i.push(o,t)}for(l=i.length-1,t=i[l];l>1;)t={type:F.BINARY_EXP,operator:i[l-1].value,left:i[l-2],right:t},l-=2;return t}gobbleToken(){let t,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,F.isDecimalDigit(t)||t===F.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===F.SQUOTE_CODE||t===F.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===F.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,F.max_unop_len),n=r.length;n>0;){if(F.unary_ops.hasOwnProperty(r)&&(!F.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!F.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;let o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:F.UNARY_EXP,operator:r,argument:o,prefix:!0})}r=r.substr(0,--n)}F.isIdentifierStart(t)?(i=this.gobbleIdentifier(),F.literals.hasOwnProperty(i.name)?i={type:F.LITERAL,value:F.literals[i.name],raw:i.name}:i.name===F.this_str&&(i={type:F.THIS_EXP})):t===F.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===F.PERIOD_CODE||r===F.OBRACK_CODE||r===F.OPAREN_CODE||r===F.QUMARK_CODE;){let n;if(r===F.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==F.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===F.OBRACK_CODE?(t={type:F.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==F.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===F.OPAREN_CODE?t={type:F.CALL_EXP,arguments:this.gobbleArguments(F.CPAREN_CODE),callee:t}:(r===F.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:F.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,n;for(;F.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===F.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);F.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));F.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);F.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return n=this.code,F.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(n===F.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===F.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:F.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",r=this.index,n=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===n){i=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
|
|
170
170
|
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:F.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(F.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,F.isIdentifierPart(t));)this.index++;return{type:F.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){let r=[],n=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){n=!0,this.index++,t===F.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(o===F.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===F.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===F.CBRACK_CODE)for(let a=r.length;a<i;a++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{let a=this.gobbleExpression();(!a||a.type===F.COMPOUND)&&this.throwError("Expected comma"),r.push(a)}}return n||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(F.CPAREN_CODE);if(this.code===F.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:F.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:F.ARRAY_EXP,elements:this.gobbleArguments(F.CBRACK_CODE)}}},Ry=new Ds;Object.assign(F,{hooks:Ry,plugins:new Ns(F),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});F.max_unop_len=F.getMaxKeyLen(F.unary_ops);F.max_binop_len=F.getMaxKeyLen(F.binary_ops);var Wr=e=>new F(e).parse(),By=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(F).filter(e=>!By.includes(e)&&Wr[e]===void 0).forEach(e=>{Wr[e]=F[e]});Wr.Jsep=F;var Dy="ConditionalExpression",Ny={name:"ternary",init(e){e.hooks.add("after-expression",function(r){if(r.node&&this.code===e.QUMARK_CODE){this.index++;let n=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),r.node={type:Dy,test:n,consequent:i,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let a=n;for(;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;r.node.test=a.right,a.right=r.node,r.node=n}}else this.throwError("Expected :")}})}};Wr.plugins.register(Ny);function st(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zs(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ro(e){let t,r,n;e.length!==2?(t=st,r=(s,l)=>st(e(s),l),n=(s,l)=>e(s)-l):(t=e===st||e===zs?e:zy,r=e,n=e);function i(s,l,f=0,c=s.length){if(f<c){if(t(l,l)!==0)return c;do{let u=f+c>>>1;r(s[u],l)<0?f=u+1:c=u}while(f<c)}return f}function o(s,l,f=0,c=s.length){if(f<c){if(t(l,l)!==0)return c;do{let u=f+c>>>1;r(s[u],l)<=0?f=u+1:c=u}while(f<c)}return f}function a(s,l,f=0,c=s.length){let u=i(s,l,f,c-1);return u>f&&n(s[u-1],l)>-n(s[u],l)?u-1:u}return{left:i,center:a,right:o}}function zy(){return 0}function fi(e){return e===null?NaN:+e}var dh=Ro(st),hh=dh.right,Uy=dh.left,qy=Ro(fi).center,wt=hh;var Xr=class extends Map{constructor(t,r=$y){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(ph(this,t))}has(t){return super.has(ph(this,t))}set(t,r){return super.set(Gy(this,t),r)}delete(t){return super.delete(Vy(this,t))}};function ph({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function Gy({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Vy({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function $y(e){return e!==null&&typeof e=="object"?e.valueOf():e}var Zy=Math.sqrt(50),Hy=Math.sqrt(10),jy=Math.sqrt(2);function Bo(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=Zy?10:o>=Hy?5:o>=jy?2:1,s,l,f;return i<0?(f=Math.pow(10,-i)/a,s=Math.round(e*f),l=Math.round(t*f),s/f<e&&++s,l/f>t&&--l,f=-f):(f=Math.pow(10,i)*a,s=Math.round(e/f),l=Math.round(t/f),s*f<e&&++s,l*f>t&&--l),l<s&&.5<=r&&r<2?Bo(e,t,r*2):[s,l,f]}function cr(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];let n=t<e,[i,o,a]=n?Bo(t,e,r):Bo(e,t,r);if(!(o>=i))return[];let s=o-i+1,l=new Array(s);if(n)if(a<0)for(let f=0;f<s;++f)l[f]=(o-f)/-a;else for(let f=0;f<s;++f)l[f]=(o-f)*a;else if(a<0)for(let f=0;f<s;++f)l[f]=(i+f)/-a;else for(let f=0;f<s;++f)l[f]=(i+f)*a;return l}function li(e,t,r){return t=+t,e=+e,r=+r,Bo(e,t,r)[2]}function Us(e,t,r){t=+t,e=+e,r=+r;let n=t<e,i=n?li(t,e,r):li(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function qs(e,t,r=fi){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Do(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function ue(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var Gs=Symbol("implicit");function ur(){var e=new Xr,t=[],r=[],n=Gs;function i(o){let a=e.get(o);if(a===void 0){if(n!==Gs)return n;e.set(o,a=t.push(o)-1)}return r[a%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Xr;for(let a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return ur(t,r).unknown(n)},ue.apply(i,arguments),i}function No(){var e=ur().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,a,s=!1,l=0,f=0,c=.5;delete e.unknown;function u(){var d=t().length,h=i<n,g=h?i:n,x=h?n:i;o=(x-g)/Math.max(1,d-l+f*2),s&&(o=Math.floor(o)),g+=(x-g-o*(d-l))*c,a=o*(1-l),s&&(g=Math.round(g),a=Math.round(a));var T=Do(d).map(function(_){return g+o*_});return r(h?T.reverse():T)}return e.domain=function(d){return arguments.length?(t(d),u()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,u()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,u()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(d){return arguments.length?(s=!!d,u()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,f=+d),u()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),u()):l},e.paddingOuter=function(d){return arguments.length?(f=+d,u()):f},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),u()):c},e.copy=function(){return No(t(),[n,i]).round(s).paddingInner(l).paddingOuter(f).align(c)},ue.apply(u(),arguments)}function gh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return gh(t())},e}function Vs(){return gh(No.apply(null,arguments).paddingInner(1))}function zo(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $s(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function di(){}var ci=.7,Go=1/ci,Kr="\\s*([+-]?\\d+)\\s*",ui="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yy=/^#([0-9a-f]{3,8})$/,Wy=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),Xy=new RegExp(`^rgb\\(${ft},${ft},${ft}\\)$`),Ky=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${ui}\\)$`),Qy=new RegExp(`^rgba\\(${ft},${ft},${ft},${ui}\\)$`),Jy=new RegExp(`^hsl\\(${ui},${ft},${ft}\\)$`),ex=new RegExp(`^hsla\\(${ui},${ft},${ft},${ui}\\)$`),mh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};zo(di,Ut,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bh,formatHex:bh,formatHex8:tx,formatHsl:rx,formatRgb:yh,toString:yh});function bh(){return this.rgb().formatHex()}function tx(){return this.rgb().formatHex8()}function rx(){return Sh(this).formatHsl()}function yh(){return this.rgb().formatRgb()}function Ut(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Yy.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?xh(t):r===3?new xe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Uo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Uo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wy.exec(e))?new xe(t[1],t[2],t[3],1):(t=Xy.exec(e))?new xe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ky.exec(e))?Uo(t[1],t[2],t[3],t[4]):(t=Qy.exec(e))?Uo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Jy.exec(e))?_h(t[1],t[2]/100,t[3]/100,1):(t=ex.exec(e))?_h(t[1],t[2]/100,t[3]/100,t[4]):mh.hasOwnProperty(e)?xh(mh[e]):e==="transparent"?new xe(NaN,NaN,NaN,0):null}function xh(e){return new xe(e>>16&255,e>>8&255,e&255,1)}function Uo(e,t,r,n){return n<=0&&(e=t=r=NaN),new xe(e,t,r,n)}function nx(e){return e instanceof di||(e=Ut(e)),e?(e=e.rgb(),new xe(e.r,e.g,e.b,e.opacity)):new xe}function Qr(e,t,r,n){return arguments.length===1?nx(e):new xe(e,t,r,n??1)}function xe(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}zo(xe,Qr,$s(di,{brighter(e){return e=e==null?Go:Math.pow(Go,e),new xe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ci:Math.pow(ci,e),new xe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xe(hr(this.r),hr(this.g),hr(this.b),Vo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vh,formatHex:vh,formatHex8:ix,formatRgb:wh,toString:wh}));function vh(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}`}function ix(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}${dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function wh(){let e=Vo(this.opacity);return`${e===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${e===1?")":`, ${e})`}`}function Vo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dr(e){return e=hr(e),(e<16?"0":"")+e.toString(16)}function _h(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,r,n)}function Sh(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof di||(e=Ut(e)),!e)return new He;if(e instanceof He)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new He(a,s,l,e.opacity)}function Th(e,t,r,n){return arguments.length===1?Sh(e):new He(e,t,r,n??1)}function He(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}zo(He,Th,$s(di,{brighter(e){return e=e==null?Go:Math.pow(Go,e),new He(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ci:Math.pow(ci,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new xe(Zs(e>=240?e-240:e+120,i,n),Zs(e,i,n),Zs(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new He(Eh(this.h),qo(this.s),qo(this.l),Vo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Vo(this.opacity);return`${e===1?"hsl(":"hsla("}${Eh(this.h)}, ${qo(this.s)*100}%, ${qo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Eh(e){return e=(e||0)%360,e<0?e+360:e}function qo(e){return Math.max(0,Math.min(1,e||0))}function Zs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function Hs(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function Ch(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Hs((r-n/t)*t,a,i,o,s)}}function Ah(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Hs((r-n/t)*t,i,o,a,s)}}var hi=e=>()=>e;function ox(e,t){return function(r){return e+r*t}}function ax(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Ph(e){return(e=+e)==1?$o:function(t,r){return r-t?ax(t,r,e):hi(isNaN(t)?r:t)}}function $o(e,t){var r=t-e;return r?ox(e,r):hi(isNaN(e)?t:e)}var js=function e(t){var r=Ph(t);function n(i,o){var a=r((i=Qr(i)).r,(o=Qr(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),f=$o(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=f(c),i+""}}return n.gamma=e,n}(1);function kh(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=Qr(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var P9=kh(Ch),k9=kh(Ah);function Mh(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function Fh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Lh(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=pr(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}function Ih(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function qt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Oh(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=pr(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var Ws=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ys=new RegExp(Ws.source,"g");function sx(e){return function(){return e}}function fx(e){return function(t){return e(t)+""}}function Rh(e,t){var r=Ws.lastIndex=Ys.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Ws.exec(e))&&(i=Ys.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:qt(n,i)})),r=Ys.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?fx(l[0].x):sx(t):(t=l.length,function(f){for(var c=0,u;c<t;++c)s[(u=l[c]).i]=u.x(f);return s.join("")})}function pr(e,t){var r=typeof t,n;return t==null||r==="boolean"?hi(t):(r==="number"?qt:r==="string"?(n=Ut(t))?(t=n,js):Rh:t instanceof Ut?js:t instanceof Date?Ih:Fh(t)?Mh:Array.isArray(t)?Lh:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Oh:qt)(e,t)}function Xs(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Ks(e){return function(){return e}}function Qs(e){return+e}var Bh=[0,1];function je(e){return e}function Js(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Ks(isNaN(t)?NaN:.5)}function lx(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function cx(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=Js(i,n),o=r(a,o)):(n=Js(n,i),o=r(o,a)),function(s){return o(n(s))}}function ux(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=Js(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var l=wt(e,s,1,n)-1;return o[l](i[l](s))}}function Jr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pi(){var e=Bh,t=Bh,r=pr,n,i,o,a=je,s,l,f;function c(){var d=Math.min(e.length,t.length);return a!==je&&(a=lx(e[0],e[d-1])),s=d>2?ux:cx,l=f=null,u}function u(d){return d==null||isNaN(d=+d)?o:(l||(l=s(e.map(n),t,r)))(n(a(d)))}return u.invert=function(d){return a(i((f||(f=s(t,e.map(n),qt)))(d)))},u.domain=function(d){return arguments.length?(e=Array.from(d,Qs),c()):e.slice()},u.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},u.rangeRound=function(d){return t=Array.from(d),r=Xs,c()},u.clamp=function(d){return arguments.length?(a=d?!0:je,c()):a!==je},u.interpolate=function(d){return arguments.length?(r=d,c()):r},u.unknown=function(d){return arguments.length?(o=d,u):o},function(d,h){return n=d,i=h,c()}}function ef(){return pi()(je,je)}function Dh(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gr(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function lt(e){return e=gr(Math.abs(e)),e?e[1]:NaN}function Nh(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function zh(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var dx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ct(e){if(!(t=dx.exec(e)))throw new Error("invalid format: "+e);var t;return new Zo({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ct.prototype=Zo.prototype;function Zo(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Zo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Uh(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var tf;function qh(e,t){var r=gr(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(tf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+gr(e,Math.max(0,t+o-1))[0]}function rf(e,t){var r=gr(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var nf={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Dh,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>rf(e*100,t),r:rf,s:qh,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function of(e){return e}var Gh=Array.prototype.map,Vh=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function $h(e){var t=e.grouping===void 0||e.thousands===void 0?of:Nh(Gh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?of:zh(Gh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function f(u){u=ct(u);var d=u.fill,h=u.align,g=u.sign,x=u.symbol,T=u.zero,_=u.width,v=u.comma,M=u.precision,L=u.trim,I=u.type;I==="n"?(v=!0,I="g"):nf[I]||(M===void 0&&(M=12),L=!0,I="g"),(T||d==="0"&&h==="=")&&(T=!0,d="0",h="=");var B=x==="$"?r:x==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",N=x==="$"?n:/[%p]/.test(I)?a:"",p=nf[I],m=/[defgprs%]/.test(I);M=M===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function b(y){var w=B,S=N,P,E,C;if(I==="c")S=p(y)+S,y="";else{y=+y;var k=y<0||1/y<0;if(y=isNaN(y)?l:p(Math.abs(y),M),L&&(y=Uh(y)),k&&+y==0&&g!=="+"&&(k=!1),w=(k?g==="("?g:s:g==="-"||g==="("?"":g)+w,S=(I==="s"?Vh[8+tf/3]:"")+S+(k&&g==="("?")":""),m){for(P=-1,E=y.length;++P<E;)if(C=y.charCodeAt(P),48>C||C>57){S=(C===46?i+y.slice(P+1):y.slice(P))+S,y=y.slice(0,P);break}}}v&&!T&&(y=t(y,1/0));var A=w.length+y.length+S.length,O=A<_?new Array(_-A+1).join(d):"";switch(v&&T&&(y=t(O+y,O.length?_-S.length:1/0),O=""),h){case"<":y=w+y+S+O;break;case"=":y=w+O+y+S;break;case"^":y=O.slice(0,A=O.length>>1)+w+y+S+O.slice(A);break;default:y=O+w+y+S;break}return o(y)}return b.toString=function(){return u+""},b}function c(u,d){var h=f((u=ct(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(lt(d)/3)))*3,x=Math.pow(10,-g),T=Vh[8+g/3];return function(_){return h(x*_)+T}}return{format:f,formatPrefix:c}}var Ho,_t,jo;af({thousands:",",grouping:[3],currency:["$",""]});function af(e){return Ho=$h(e),_t=Ho.format,jo=Ho.formatPrefix,Ho}function sf(e){return Math.max(0,-lt(Math.abs(e)))}function ff(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lt(t)/3)))*3-lt(Math.abs(e)))}function lf(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lt(t)-lt(e))+1}function cf(e,t,r,n){var i=Us(e,t,r),o;switch(n=ct(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=ff(i,a))&&(n.precision=o),jo(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=lf(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=sf(i))&&(n.precision=o-(n.type==="%")*2);break}}return _t(n)}function gi(e){var t=e.domain;return e.ticks=function(r){var n=t();return cr(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return cf(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l,f,c=10;for(s<a&&(f=a,a=s,s=f,f=i,i=o,o=f);c-- >0;){if(f=li(a,s,r),f===l)return n[i]=a,n[o]=s,t(n);if(f>0)a=Math.floor(a/f)*f,s=Math.ceil(s/f)*f;else if(f<0)a=Math.ceil(a*f)/f,s=Math.floor(s*f)/f;else break;l=f}return e},e}function mr(){var e=ef();return e.copy=function(){return Jr(e,mr())},ue.apply(e,arguments),gi(e)}function uf(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}function Zh(e){return Math.log(e)}function Hh(e){return Math.exp(e)}function hx(e){return-Math.log(-e)}function px(e){return-Math.exp(-e)}function gx(e){return isFinite(e)?+("1e"+e):e<0?0:e}function mx(e){return e===10?gx:e===Math.E?Math.exp:t=>Math.pow(e,t)}function bx(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function jh(e){return(t,r)=>-e(-t,r)}function yx(e){let t=e(Zh,Hh),r=t.domain,n=10,i,o;function a(){return i=bx(n),o=mx(n),r()[0]<0?(i=jh(i),o=jh(o),e(hx,px)):e(Zh,Hh),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=s=>{let l=r(),f=l[0],c=l[l.length-1],u=c<f;u&&([f,c]=[c,f]);let d=i(f),h=i(c),g,x,T=s==null?10:+s,_=[];if(!(n%1)&&h-d<T){if(d=Math.floor(d),h=Math.ceil(h),f>0){for(;d<=h;++d)for(g=1;g<n;++g)if(x=d<0?g/o(-d):g*o(d),!(x<f)){if(x>c)break;_.push(x)}}else for(;d<=h;++d)for(g=n-1;g>=1;--g)if(x=d>0?g/o(-d):g*o(d),!(x<f)){if(x>c)break;_.push(x)}_.length*2<T&&(_=cr(f,c,T))}else _=cr(d,h,Math.min(h-d,T)).map(o);return u?_.reverse():_},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ct(l)).precision==null&&(l.trim=!0),l=_t(l)),s===1/0)return l;let f=Math.max(1,n*s/t.ticks().length);return c=>{let u=c/o(Math.round(i(c)));return u*n<n-.5&&(u*=n),u<=f?l(c):""}},t.nice=()=>r(uf(r(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function mi(){let e=yx(pi()).domain([1,10]);return e.copy=()=>Jr(e,mi()).base(e.base()),ue.apply(e,arguments),e}function Yh(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function xx(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function vx(e){return e<0?-e*e:e*e}function wx(e){var t=e(je,je),r=1;function n(){return r===1?e(je,je):r===.5?e(xx,vx):e(Yh(r),Yh(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},gi(t)}function Yo(){var e=wx(pi());return e.copy=function(){return Jr(e,Yo()).exponent(e.exponent())},ue.apply(e,arguments),e}function df(){return Yo.apply(null,arguments).exponent(.5)}function bi(){var e=[],t=[],r=[],n;function i(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=qs(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?n:t[wt(r,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(st),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(n=a,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return bi().domain(e).range(t).unknown(n)},ue.apply(o,arguments)}function yi(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[wt(n,l,0,r)]:o}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var f=i.indexOf(l);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return n.slice()},a.copy=function(){return yi().domain([e,t]).range(i).unknown(o)},ue.apply(gi(a),arguments)}function br(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[wt(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return br().domain(e).range(t).unknown(r)},ue.apply(i,arguments)}var v6={},_x=Object.create,Bf=Object.defineProperty,Ex=Object.getOwnPropertyDescriptor,G0=Object.getOwnPropertyNames,Sx=Object.getPrototypeOf,Tx=Object.prototype.hasOwnProperty,Cx=(e,t,r)=>t in e?Bf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ax=(e,t)=>function(){return t||(0,e[G0(e)[0]])((t={exports:{}}).exports,t),t.exports},Px=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of G0(t))!Tx.call(e,i)&&i!==r&&Bf(e,i,{get:()=>t[i],enumerable:!(n=Ex(t,i))||n.enumerable});return e},kx=(e,t,r)=>(r=e!=null?_x(Sx(e)):{},Px(t||!e||!e.__esModule?Bf(r,"default",{value:e,enumerable:!0}):r,e)),D=(e,t,r)=>Cx(e,typeof t!="symbol"?t+"":t,r),Mx=Ax({"node_modules/thenby/thenBy.module.js"(e,t){"use strict";t.exports=function(){function r(a){return a}function n(a){return typeof a=="string"?a.toLowerCase():a}function i(a,s){if(s=typeof s=="object"?s:{direction:s},typeof a!="function"){var l=a;a=function(h){return h[l]?h[l]:""}}if(a.length===1){var f=a,c=s.ignoreCase?n:r,u=s.cmp||function(h,g){return h<g?-1:h>g?1:0};a=function(h,g){return u(c(f(h)),c(f(g)))}}let d={"-1":"",desc:""};return s.direction in d?function(h,g){return-a(h,g)}:a}function o(a,s){var l=typeof this=="function"&&!this.firstBy?this:!1,f=i(a,s),c=l?function(u,d){return l(u,d)||f(u,d)}:f;return c.thenBy=o,c}return o.firstBy=o,o}()}}),Fx="deck-gl-carto";function ba(){return Fx}var Df=(e=>(e.IN="in",e.BETWEEN="between",e.CLOSED_OPEN="closed_open",e.TIME="time",e.STRING_SEARCH="stringSearch",e))(Df||{}),V0=(e=>(e.V1="v1",e.V2="v2",e.V3="v3",e))(V0||{}),Nf="https://gcp-us-east1.api.carto.com";var $0=(e=>(e.H3="h3",e.QUADBIN="quadbin",e))($0||{});var Lx=Object.freeze({h3:["h3","hex","h3id","hex_id","h3hex"],quadbin:["quadbin"]}),Be={Count:"count",Avg:"avg",Min:"min",Max:"max",Sum:"sum",Custom:"custom"};function Z0(e){return e.map(t=>t[0]===void 0||t[0]===null?[Number.MIN_SAFE_INTEGER,t[1]]:t[1]===void 0||t[1]===null?[t[0],Number.MAX_SAFE_INTEGER]:t)}var Ix={in:Ox,between:H0,time:Rx,closed_open:Bx,stringSearch:Dx};function Ox(e,t){return e.includes(t)}function H0(e,t){let r=n=>{let[i,o]=n;return t>=i&&t<=o};return Z0(e).some(r)}function Rx(e,t){let r=new Date(t).getTime();if(isFinite(r))return H0(e,r);throw new Error("Column used to filter by time isn't well formatted.")}function Bx(e,t){let r=n=>{let[i,o]=n;return t>=i&&t<o};return Z0(e).some(r)}function Dx(e,t,r={}){let n=Wh(t,r),i=r.useRegExp?e:e.map(a=>{let s=Ux(Wh(a,r));return r.mustStart&&(s=`^${s}`),r.mustEnd&&(s=`${s}$`),s}),o=new RegExp(i.join("|"),r.caseSensitive?"g":"gi");return!!n.match(o)}var Nx=/[.*+?^${}()|[\]\\]/g,zx=/\p{Diacritic}/gu;function Ux(e){return e.replace(Nx,"\\$&")}function Wh(e,t){let r=String(e);return t.keepSpecialCharacters||(r=r.normalize("NFD").replace(zx,"")),r}var qx={and:"every",or:"some"};function Gx(e,t,r,n){let i=qx[n];return e[i](o=>{let a=t[o],s=Object.keys(a);return!r||r[o]===null||r[o]===void 0?!1:s.every(l=>{let f=Ix[l];if(!f)throw new Error(`"${l}" filter is not implemented.`);return f(a[l].values,r[o],a[l].params)})})}function Vx({filters:e={},type:t="boolean",filtersLogicalOperator:r="and"}){let n=Object.keys(e);return n.length?i=>{let o=i.properties||i,a=Gx(n,e,o,r);return t==="number"?Number(a):a}:()=>t==="number"?1:!0}function $x(e,t,r){return Object.keys(t).length?e.filter(Vx({filters:t,filtersLogicalOperator:r})):e}var W=11102230246251565e-32,de=134217729,Zx=(3+8*W)*W;function hf(e,t,r,n,i){let o,a,s,l,f=t[0],c=n[0],u=0,d=0;c>f==c>-f?(o=f,f=t[++u]):(o=c,c=n[++d]);let h=0;if(u<e&&d<r)for(c>f==c>-f?(a=f+o,s=o-(a-f),f=t[++u]):(a=c+o,s=o-(a-c),c=n[++d]),o=a,s!==0&&(i[h++]=s);u<e&&d<r;)c>f==c>-f?(a=o+f,l=a-o,s=o-(a-l)+(f-l),f=t[++u]):(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=n[++d]),o=a,s!==0&&(i[h++]=s);for(;u<e;)a=o+f,l=a-o,s=o-(a-l)+(f-l),f=t[++u],o=a,s!==0&&(i[h++]=s);for(;d<r;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=n[++d],o=a,s!==0&&(i[h++]=s);return(o!==0||h===0)&&(i[h++]=o),h}function Hx(e,t){let r=t[0];for(let n=1;n<e;n++)r+=t[n];return r}function R(e){return new Float64Array(e)}var jx=(3+16*W)*W,Yx=(2+12*W)*W,Wx=(9+64*W)*W*W,en=R(4),Xh=R(8),Kh=R(12),Qh=R(16),me=R(4);function Xx(e,t,r,n,i,o,a){let s,l,f,c,u,d,h,g,x,T,_,v,M,L,I,B,N,p,m=e-i,b=r-i,y=t-o,w=n-o;L=m*w,d=de*m,h=d-(d-m),g=m-h,d=de*w,x=d-(d-w),T=w-x,I=g*T-(L-h*x-g*x-h*T),B=y*b,d=de*y,h=d-(d-y),g=y-h,d=de*b,x=d-(d-b),T=b-x,N=g*T-(B-h*x-g*x-h*T),_=I-N,u=I-_,en[0]=I-(_+u)+(u-N),v=L+_,u=v-L,M=L-(v-u)+(_-u),_=M-B,u=M-_,en[1]=M-(_+u)+(u-B),p=v+_,u=p-v,en[2]=v-(p-u)+(_-u),en[3]=p;let S=Hx(4,en),P=Yx*a;if(S>=P||-S>=P||(u=e-m,s=e-(m+u)+(u-i),u=r-b,f=r-(b+u)+(u-i),u=t-y,l=t-(y+u)+(u-o),u=n-w,c=n-(w+u)+(u-o),s===0&&l===0&&f===0&&c===0)||(P=Wx*a+Zx*Math.abs(S),S+=m*c+w*s-(y*f+b*l),S>=P||-S>=P))return S;L=s*w,d=de*s,h=d-(d-s),g=s-h,d=de*w,x=d-(d-w),T=w-x,I=g*T-(L-h*x-g*x-h*T),B=l*b,d=de*l,h=d-(d-l),g=l-h,d=de*b,x=d-(d-b),T=b-x,N=g*T-(B-h*x-g*x-h*T),_=I-N,u=I-_,me[0]=I-(_+u)+(u-N),v=L+_,u=v-L,M=L-(v-u)+(_-u),_=M-B,u=M-_,me[1]=M-(_+u)+(u-B),p=v+_,u=p-v,me[2]=v-(p-u)+(_-u),me[3]=p;let E=hf(4,en,4,me,Xh);L=m*c,d=de*m,h=d-(d-m),g=m-h,d=de*c,x=d-(d-c),T=c-x,I=g*T-(L-h*x-g*x-h*T),B=y*f,d=de*y,h=d-(d-y),g=y-h,d=de*f,x=d-(d-f),T=f-x,N=g*T-(B-h*x-g*x-h*T),_=I-N,u=I-_,me[0]=I-(_+u)+(u-N),v=L+_,u=v-L,M=L-(v-u)+(_-u),_=M-B,u=M-_,me[1]=M-(_+u)+(u-B),p=v+_,u=p-v,me[2]=v-(p-u)+(_-u),me[3]=p;let C=hf(E,Xh,4,me,Kh);L=s*c,d=de*s,h=d-(d-s),g=s-h,d=de*c,x=d-(d-c),T=c-x,I=g*T-(L-h*x-g*x-h*T),B=l*f,d=de*l,h=d-(d-l),g=l-h,d=de*f,x=d-(d-f),T=f-x,N=g*T-(B-h*x-g*x-h*T),_=I-N,u=I-_,me[0]=I-(_+u)+(u-N),v=L+_,u=v-L,M=L-(v-u)+(_-u),_=M-B,u=M-_,me[1]=M-(_+u)+(u-B),p=v+_,u=p-v,me[2]=v-(p-u)+(_-u),me[3]=p;let k=hf(C,Kh,4,me,Qh);return Qh[k-1]}function Kx(e,t,r,n,i,o){let a=(t-o)*(r-i),s=(e-i)*(n-o),l=a-s,f=Math.abs(a+s);return Math.abs(l)>=jx*f?l:-Xx(e,t,r,n,i,o,f)}var FS=(7+56*W)*W,LS=(3+28*W)*W,IS=(26+288*W)*W*W,OS=R(4),RS=R(4),BS=R(4),DS=R(4),NS=R(4),zS=R(4),US=R(4),qS=R(4),GS=R(4),VS=R(8),$S=R(8),ZS=R(8),HS=R(4),jS=R(8),YS=R(8),WS=R(8),XS=R(12),KS=R(192),QS=R(192),JS=(10+96*W)*W,eT=(4+48*W)*W,tT=(44+576*W)*W*W,rT=R(4),nT=R(4),iT=R(4),oT=R(4),aT=R(4),sT=R(4),fT=R(4),lT=R(4),cT=R(8),uT=R(8),dT=R(8),hT=R(8),pT=R(8),gT=R(8),mT=R(8),bT=R(8),yT=R(8),xT=R(4),vT=R(4),wT=R(4),_T=R(8),ET=R(16),ST=R(16),TT=R(16),CT=R(32),AT=R(32),PT=R(48),kT=R(64),MT=R(1152),FT=R(1152),LT=(16+224*W)*W,IT=(5+72*W)*W,OT=(71+1408*W)*W*W,RT=R(4),BT=R(4),DT=R(4),NT=R(4),zT=R(4),UT=R(4),qT=R(4),GT=R(4),VT=R(4),$T=R(4),ZT=R(24),HT=R(24),jT=R(24),YT=R(24),WT=R(24),XT=R(24),KT=R(24),QT=R(24),JT=R(24),eC=R(24),tC=R(1152),rC=R(1152),nC=R(1152),iC=R(1152),oC=R(1152),aC=R(2304),sC=R(2304),fC=R(3456),lC=R(5760),cC=R(8),uC=R(8),dC=R(8),hC=R(16),pC=R(24),gC=R(48),mC=R(48),bC=R(96),yC=R(192),xC=R(384),vC=R(384),wC=R(384),_C=R(768),EC=R(96),SC=R(96),TC=R(96),CC=R(1152);function Qx(e,t){var r,n,i=0,o,a,s,l,f,c,u,d=e[0],h=e[1],g=t.length;for(r=0;r<g;r++){n=0;var x=t[r],T=x.length-1;if(c=x[0],c[0]!==x[T][0]&&c[1]!==x[T][1])throw new Error("First and last coordinates in a ring must be the same");for(a=c[0]-d,s=c[1]-h,n;n<T;n++){if(u=x[n+1],l=u[0]-d,f=u[1]-h,s===0&&f===0){if(l<=0&&a>=0||a<=0&&l>=0)return 0}else if(f>=0&&s<=0||f<=0&&s>=0){if(o=Kx(a,l,s,f,0,0),o===0)return 0;(o>0&&f>0&&s<=0||o<0&&f<=0&&s>0)&&i++}c=u,s=f,a=l}}return i%2!==0}var Ae=63710088e-1,AC={centimeters:Ae*100,centimetres:Ae*100,degrees:360/(2*Math.PI),feet:Ae*3.28084,inches:Ae*39.37,kilometers:Ae/1e3,kilometres:Ae/1e3,meters:Ae,metres:Ae,miles:Ae/1609.344,millimeters:Ae*1e3,millimetres:Ae*1e3,nauticalmiles:Ae/1852,radians:1,yards:Ae*1.0936};function _e(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Jx(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Jh(e[0])||!Jh(e[1]))throw new Error("coordinates must contain numbers");return _e({type:"Point",coordinates:e},t,r)}function zf(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;o<i[i.length-1].length;o++)if(i[i.length-1][o]!==i[0][o])throw new Error("First and last Position are not equivalent.")}return _e({type:"Polygon",coordinates:e},t,r)}function j0(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return _e({type:"LineString",coordinates:e},t,r)}function Pi(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function Y0(e,t,r={}){return _e({type:"MultiLineString",coordinates:e},t,r)}function W0(e,t,r={}){return _e({type:"MultiPolygon",coordinates:e},t,r)}function Jh(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function X0(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return[...e.geometry.coordinates];if(e.type==="Point")return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ci(e){if(Array.isArray(e))return e;if(e.type==="Feature"){if(e.geometry!==null)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function At(e){return e.type==="Feature"?e.geometry:e}function ev(e,t){return e.type==="FeatureCollection"?"FeatureCollection":e.type==="GeometryCollection"?"GeometryCollection":e.type==="Feature"&&e.geometry!==null?e.geometry.type:e.type}function De(e,t,r={}){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");let n=X0(e),i=At(t),o=i.type,a=t.bbox,s=i.coordinates;if(a&&tv(n,a)===!1)return!1;o==="Polygon"&&(s=[s]);let l=!1;for(var f=0;f<s.length;++f){let c=Qx(n,s[f]);if(c===0)return!r.ignoreBoundary;c&&(l=!0)}return l}function tv(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}var K0=class{constructor(e=[],t=rv){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;let e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,o=t[i];if(r(n,o)>=0)break;t[e]=o,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e<n;){let o=(e<<1)+1,a=t[o],s=o+1;if(s<this.length&&r(t[s],a)<0&&(o=s,a=t[s]),r(a,i)>=0)break;t[e]=a,e=o}t[e]=i}};function rv(e,t){return e<t?-1:e>t?1:0}function Q0(e,t){return e.p.x>t.p.x?1:e.p.x<t.p.x?-1:e.p.y!==t.p.y?e.p.y>t.p.y?1:-1:1}function nv(e,t){return e.rightSweepEvent.p.x>t.rightSweepEvent.p.x?1:e.rightSweepEvent.p.x<t.rightSweepEvent.p.x?-1:e.rightSweepEvent.p.y!==t.rightSweepEvent.p.y?e.rightSweepEvent.p.y<t.rightSweepEvent.p.y?1:-1:1}var e0=class{constructor(e,t,r,n){this.p={x:e[0],y:e[1]},this.featureId=t,this.ringId=r,this.eventId=n,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(e){return this.p.x===e.p.x&&this.p.y===e.p.y}};function iv(e,t){if(e.type==="FeatureCollection"){let r=e.features;for(let n=0;n<r.length;n++)t0(r[n],t)}else t0(e,t)}var Wo=0,Xo=0,Ko=0;function t0(e,t){let r=e.type==="Feature"?e.geometry:e,n=r.coordinates;(r.type==="Polygon"||r.type==="MultiLineString")&&(n=[n]),r.type==="LineString"&&(n=[[n]]);for(let i=0;i<n.length;i++)for(let o=0;o<n[i].length;o++){let a=n[i][o][0],s=null;Xo=Xo+1;for(let l=0;l<n[i][o].length-1;l++){s=n[i][o][l+1];let f=new e0(a,Wo,Xo,Ko),c=new e0(s,Wo,Xo,Ko+1);f.otherEvent=c,c.otherEvent=f,Q0(f,c)>0?(c.isLeftEndpoint=!0,f.isLeftEndpoint=!1):(f.isLeftEndpoint=!0,c.isLeftEndpoint=!1),t.push(f),t.push(c),a=s,Ko=Ko+1}}Wo=Wo+1}var ov=class{constructor(e){this.leftSweepEvent=e,this.rightSweepEvent=e.otherEvent}};function av(e,t){if(e===null||t===null||e.leftSweepEvent.ringId===t.leftSweepEvent.ringId&&(e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.rightSweepEvent)||e.leftSweepEvent.isSamePoint(t.leftSweepEvent)||e.leftSweepEvent.isSamePoint(t.rightSweepEvent)))return!1;let r=e.leftSweepEvent.p.x,n=e.leftSweepEvent.p.y,i=e.rightSweepEvent.p.x,o=e.rightSweepEvent.p.y,a=t.leftSweepEvent.p.x,s=t.leftSweepEvent.p.y,l=t.rightSweepEvent.p.x,f=t.rightSweepEvent.p.y,c=(f-s)*(i-r)-(l-a)*(o-n),u=(l-a)*(n-s)-(f-s)*(r-a),d=(i-r)*(n-s)-(o-n)*(r-a);if(c===0)return u===0&&d===0,!1;let h=u/c,g=d/c;if(h>=0&&h<=1&&g>=0&&g<=1){let x=r+h*(i-r),T=n+h*(o-n);return[x,T]}return!1}function sv(e,t){t=t||!1;let r=[],n=new K0([],nv);for(;e.length;){let i=e.pop();if(i.isLeftEndpoint){let o=new ov(i);for(let a=0;a<n.data.length;a++){let s=n.data[a];if(t&&s.leftSweepEvent.featureId===i.featureId)continue;let l=av(o,s);l!==!1&&r.push(l)}n.push(o)}else i.isLeftEndpoint===!1&&n.pop()}return r}function fv(e,t){let r=new K0([],Q0);return iv(e,r),sv(r,t)}var lv=fv,cv=lv;function Uf(e,t,r={}){let{removeDuplicates:n=!0,ignoreSelfIntersections:i=!0}=r,o=[];e.type==="FeatureCollection"?o=o.concat(e.features):e.type==="Feature"?o.push(e):(e.type==="LineString"||e.type==="Polygon"||e.type==="MultiLineString"||e.type==="MultiPolygon")&&o.push(_e(e)),t.type==="FeatureCollection"?o=o.concat(t.features):t.type==="Feature"?o.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&o.push(_e(t));let a=cv(Pi(o),i),s=[];if(n){let l={};a.forEach(f=>{let c=f.join(",");l[c]||(l[c]=!0,s.push(f))})}else s=a;return Pi(s.map(l=>Jx(l)))}function J0(e,t,r){if(e!==null)for(var n,i,o,a,s,l,f,c=0,u=0,d,h=e.type,g=h==="FeatureCollection",x=h==="Feature",T=g?e.features.length:1,_=0;_<T;_++){f=g?e.features[_].geometry:x?e.geometry:e,d=f?f.type==="GeometryCollection":!1,s=d?f.geometries.length:1;for(var v=0;v<s;v++){var M=0,L=0;if(a=d?f.geometries[v]:f,a!==null){l=a.coordinates;var I=a.type;switch(c=r&&(I==="Polygon"||I==="MultiPolygon")?1:0,I){case null:break;case"Point":if(t(l,u,_,M,L)===!1)return!1;u++,M++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(t(l[n],u,_,M,L)===!1)return!1;u++,I==="MultiPoint"&&M++}I==="LineString"&&M++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],u,_,M,L)===!1)return!1;u++}I==="MultiLineString"&&M++,I==="Polygon"&&L++}I==="Polygon"&&M++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(L=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-c;o++){if(t(l[n][i][o],u,_,M,L)===!1)return!1;u++}L++}M++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(J0(a.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ep(e,t){var r,n,i,o,a,s,l,f,c,u,d=0,h=e.type==="FeatureCollection",g=e.type==="Feature",x=h?e.features.length:1;for(r=0;r<x;r++){for(s=h?e.features[r].geometry:g?e.geometry:e,f=h?e.features[r].properties:g?e.properties:{},c=h?e.features[r].bbox:g?e.bbox:void 0,u=h?e.features[r].id:g?e.id:void 0,l=s?s.type==="GeometryCollection":!1,a=l?s.geometries.length:1,i=0;i<a;i++){if(o=l?s.geometries[i]:s,o===null){if(t(null,d,f,c,u)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,d,f,c,u)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(t(o.geometries[n],d,f,c,u)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}d++}}function aa(e,t){ep(e,function(r,n,i,o,a){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return t(_e(r,i,{bbox:o,id:a}),n,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var f=0;f<r.coordinates.length;f++){var c=r.coordinates[f],u={type:l,coordinates:c};if(t(_e(u,i),n,f)===!1)return!1}})}function Ef(e,t={}){let r=At(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return uv(r,t);case"MultiPolygon":return dv(r,t);default:throw new Error("invalid poly")}}function uv(e,t={}){let n=At(e).coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{};return tp(n,i)}function dv(e,t={}){let n=At(e).coordinates,i=t.properties?t.properties:e.type==="Feature"?e.properties:{},o=[];return n.forEach(a=>{o.push(tp(a,i))}),Pi(o)}function tp(e,t){return e.length>1?Y0(e,t):j0(e[0],t)}function hv(e,t,{ignoreSelfIntersections:r=!0}={ignoreSelfIntersections:!0}){let n=!0;return aa(e,i=>{aa(t,o=>{if(n===!1)return!1;n=pv(i.geometry,o.geometry,r)})}),n}function pv(e,t,r){switch(e.type){case"Point":switch(t.type){case"Point":return!yv(e.coordinates,t.coordinates);case"LineString":return!r0(t,e);case"Polygon":return!De(e,t)}break;case"LineString":switch(t.type){case"Point":return!r0(e,t);case"LineString":return!gv(e,t,r);case"Polygon":return!n0(t,e,r)}break;case"Polygon":switch(t.type){case"Point":return!De(t,e);case"LineString":return!n0(e,t,r);case"Polygon":return!mv(t,e,r)}}return!1}function r0(e,t){for(let r=0;r<e.coordinates.length-1;r++)if(bv(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function gv(e,t,r){return Uf(e,t,{ignoreSelfIntersections:r}).features.length>0}function n0(e,t,r){for(let i of t.coordinates)if(De(i,e))return!0;return Uf(t,Ef(e),{ignoreSelfIntersections:r}).features.length>0}function mv(e,t,r){for(let i of e.coordinates[0])if(De(i,t))return!0;for(let i of t.coordinates[0])if(De(i,e))return!0;return Uf(Ef(e),Ef(t),{ignoreSelfIntersections:r}).features.length>0}function bv(e,t,r){let n=r[0]-e[0],i=r[1]-e[1],o=t[0]-e[0],a=t[1]-e[1];return n*a-i*o!==0?!1:Math.abs(o)>=Math.abs(a)?o>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:a>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}function yv(e,t){return e[0]===t[0]&&e[1]===t[1]}function xv(e,t,{ignoreSelfIntersections:r=!0}={}){let n=!1;return aa(e,i=>{aa(t,o=>{if(n===!0)return!0;n=!hv(i.geometry,o.geometry,{ignoreSelfIntersections:r})})}),n}var rp=xv;function vv({geojson:e,spatialFilter:t,uniqueIdProperty:r}){let n=0,i=new Map;if(!t)return[];for(let o of e.features){let a=r?o.properties[r]:++n;!i.has(a)&&rp(t,o)&&i.set(a,o.properties)}return Array.from(i.values())}var PC=1/Math.PI*180,kC=1/180*Math.PI,wv={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...wv}};var MC=globalThis.mathgl.config;function _v(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Sf(e,t,r){return _v(e)?e.map((n,i)=>Sf(n,t[i],r)):r*t+(1-r)*e}function i0(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}var Xe=Math.PI,np=Xe/4,o0=Xe/180,a0=180/Xe,sa=512;function Tf(e){let[t,r]=e;i0(Number.isFinite(t)),i0(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");let n=t*o0,i=r*o0,o=sa*(n+Xe)/(2*Xe),a=sa*(Xe+Math.log(Math.tan(np+i*.5)))/(2*Xe);return[o,a]}function Ev(e){let[t,r]=e,n=t/sa*(2*Xe)-Xe,i=2*(Math.atan(Math.exp(r/sa*(2*Xe)-Xe))-np);return[n*a0,i*a0]}var FC=Math.PI/180,Sv={Point:ip,MultiPoint:Cv,LineString:op,MultiLineString:Av,Polygon:ap,MultiPolygon:Pv};function Tv(e,t){let[r,n,i,o]=t,a=Tf([r,o]),s=Tf([i,n]),l=[a,s];if(e.type==="GeometryCollection")throw new Error("Unsupported geometry type GeometryCollection");let f=Sv[e.type],c=f(e.coordinates,l);return{...e,coordinates:c}}function ip([e,t],[r,n]){let i=Sf(r[0],n[0],e),o=Sf(r[1],n[1],t);return Ev([i,o])}function qf(e,t){return e.map(r=>ip(r,t))}function Cv(e,t){return qf(e,t)}function op(e,t){return qf(e,t)}function Av(e,t){return e.map(r=>op(r,t))}function ap(e,t){return e.map(r=>qf(r,t))}function Pv(e,t){return e.map(r=>ap(r,t))}function kv(e,t={}){let r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(e.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");let a=[r,n];return zf([[a,[i,n],[i,o],[r,o],a]],t.properties,{bbox:e,id:t.id})}var Mv=kv;function fa(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return J0(e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]<n[0]&&(r[2]=n[0]),r[3]<n[1]&&(r[3]=n[1])}),r}function la(e,t,r={}){let n=X0(e),i=Ci(t);for(let o=0;o<i.length-1;o++){let a=!1;if(r.ignoreEndVertices&&(o===0&&(a="start"),o===i.length-2&&(a="end"),o===0&&o+1===i.length-1&&(a="both")),Fv(i[o],i[o+1],n,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function Fv(e,t,r,n,i){let o=r[0],a=r[1],s=e[0],l=e[1],f=t[0],c=t[1],u=r[0]-s,d=r[1]-l,h=f-s,g=c-l,x=u*g-d*h;if(i!==null){if(Math.abs(x)>i)return!1}else if(x!==0)return!1;if(Math.abs(h)===Math.abs(g)&&Math.abs(h)===0)return n?!1:r[0]===e[0]&&r[1]===e[1];if(n){if(n==="start")return Math.abs(h)>=Math.abs(g)?h>0?s<o&&o<=f:f<=o&&o<s:g>0?l<a&&a<=c:c<=a&&a<l;if(n==="end")return Math.abs(h)>=Math.abs(g)?h>0?s<=o&&o<f:f<o&&o<=s:g>0?l<=a&&a<c:c<a&&a<=l;if(n==="both")return Math.abs(h)>=Math.abs(g)?h>0?s<o&&o<f:f<o&&o<s:g>0?l<a&&a<c:c<a&&a<l}else return Math.abs(h)>=Math.abs(g)?h>0?s<=o&&o<=f:f<=o&&o<=s:g>0?l<=a&&a<=c:c<=a&&a<=l;return!1}function Lv(e,t){var r=At(e),n=At(t),i=r.type,o=n.type;switch(i){case"Point":switch(o){case"MultiPoint":return Iv(r,n);case"LineString":return la(r,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return De(r,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return Ov(r,n);case"LineString":return Rv(r,n);case"Polygon":case"MultiPolygon":return Bv(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return Dv(r,n);case"Polygon":case"MultiPolygon":return Nv(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return zv(r,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Iv(e,t){var r,n=!1;for(r=0;r<t.coordinates.length;r++)if(fp(t.coordinates[r],e.coordinates)){n=!0;break}return n}function Ov(e,t){for(var r=0;r<e.coordinates.length;r++){for(var n=!1,i=0;i<t.coordinates.length;i++)fp(e.coordinates[r],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function Rv(e,t){for(var r=!1,n=0;n<e.coordinates.length;n++){if(!la(e.coordinates[n],t))return!1;r||(r=la(e.coordinates[n],t,{ignoreEndVertices:!0}))}return r}function Bv(e,t){for(var r=!0,n=!1,i=!1,o=0;o<e.coordinates.length;o++){if(i=De(e.coordinates[o],t),!i){r=!1;break}n||(i=De(e.coordinates[o],t,{ignoreBoundary:!0}))}return r&&i}function Dv(e,t){for(var r=0;r<e.coordinates.length;r++)if(!la(e.coordinates[r],t))return!1;return!0}function Nv(e,t){var r=fa(t),n=fa(e);if(!sp(r,n))return!1;for(var i=!1,o=0;o<e.coordinates.length;o++){if(!De(e.coordinates[o],t))return!1;if(i||(i=De(e.coordinates[o],t,{ignoreBoundary:!0})),!i&&o<e.coordinates.length-1){var a=Uv(e.coordinates[o],e.coordinates[o+1]);i=De(a,t,{ignoreBoundary:!0})}}return i}function zv(e,t){var r=fa(e),n=fa(t);if(!sp(n,r))return!1;for(var i=0;i<e.coordinates[0].length;i++)if(!De(e.coordinates[0][i],t))return!1;return!0}function sp(e,t){return!(e[0]>t[0]||e[2]<t[2]||e[1]>t[1]||e[3]<t[3])}function fp(e,t){return e[0]===t[0]&&e[1]===t[1]}function Uv(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var lp=Lv,qv=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,pf=Math.ceil,Oe=Math.floor,ve="[BigNumber Error] ",s0=ve+"Number primitive has more than 15 significant digits: ",Ye=1e14,G=14,gf=9007199254740991,mf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Gt=1e7,fe=1e9;function cp(e){var t,r,n,i=v.prototype={constructor:v,toString:null,valueOf:null},o=new v(1),a=20,s=4,l=-7,f=21,c=-1e7,u=1e7,d=!1,h=1,g=0,x={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz",_=!0;function v(p,m){var b,y,w,S,P,E,C,k,A=this;if(!(A instanceof v))return new v(p,m);if(m==null){if(p&&p._isBigNumber===!0){A.s=p.s,!p.c||p.e>u?A.c=A.e=null:p.e<c?A.c=[A.e=0]:(A.e=p.e,A.c=p.c.slice());return}if((E=typeof p=="number")&&p*0==0){if(A.s=1/p<0?(p=-p,-1):1,p===~~p){for(S=0,P=p;P>=10;P/=10,S++);S>u?A.c=A.e=null:(A.e=S,A.c=[p]);return}k=String(p)}else{if(!qv.test(k=String(p)))return n(A,k,E);A.s=k.charCodeAt(0)==45?(k=k.slice(1),-1):1}(S=k.indexOf("."))>-1&&(k=k.replace(".","")),(P=k.search(/e/i))>0?(S<0&&(S=P),S+=+k.slice(P+1),k=k.substring(0,P)):S<0&&(S=k.length)}else{if(te(m,2,T.length,"Base"),m==10&&_)return A=new v(p),B(A,a+A.e+1,s);if(k=String(p),E=typeof p=="number"){if(p*0!=0)return n(A,k,E,m);if(A.s=1/p<0?(k=k.slice(1),-1):1,v.DEBUG&&k.replace(/^0\.0*|\./,"").length>15)throw Error(s0+p)}else A.s=k.charCodeAt(0)===45?(k=k.slice(1),-1):1;for(b=T.slice(0,m),S=P=0,C=k.length;P<C;P++)if(b.indexOf(y=k.charAt(P))<0){if(y=="."){if(P>S){S=C;continue}}else if(!w&&(k==k.toUpperCase()&&(k=k.toLowerCase())||k==k.toLowerCase()&&(k=k.toUpperCase()))){w=!0,P=-1,S=0;continue}return n(A,String(p),E,m)}E=!1,k=r(k,m,10,A.s),(S=k.indexOf("."))>-1?k=k.replace(".",""):S=k.length}for(P=0;k.charCodeAt(P)===48;P++);for(C=k.length;k.charCodeAt(--C)===48;);if(k=k.slice(P,++C)){if(C-=P,E&&v.DEBUG&&C>15&&(p>gf||p!==Oe(p)))throw Error(s0+A.s*p);if((S=S-P-1)>u)A.c=A.e=null;else if(S<c)A.c=[A.e=0];else{if(A.e=S,A.c=[],P=(S+1)%G,S<0&&(P+=G),P<C){for(P&&A.c.push(+k.slice(0,P)),C-=G;P<C;)A.c.push(+k.slice(P,P+=G));P=G-(k=k.slice(P)).length}else P-=C;for(;P--;k+="0");A.c.push(+k)}}else A.c=[A.e=0]}v.clone=cp,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(p){var m,b;if(p!=null)if(typeof p=="object"){if(p.hasOwnProperty(m="DECIMAL_PLACES")&&(b=p[m],te(b,0,fe,m),a=b),p.hasOwnProperty(m="ROUNDING_MODE")&&(b=p[m],te(b,0,8,m),s=b),p.hasOwnProperty(m="EXPONENTIAL_AT")&&(b=p[m],b&&b.pop?(te(b[0],-fe,0,m),te(b[1],0,fe,m),l=b[0],f=b[1]):(te(b,-fe,fe,m),l=-(f=b<0?-b:b))),p.hasOwnProperty(m="RANGE"))if(b=p[m],b&&b.pop)te(b[0],-fe,-1,m),te(b[1],1,fe,m),c=b[0],u=b[1];else if(te(b,-fe,fe,m),b)c=-(u=b<0?-b:b);else throw Error(ve+m+" cannot be zero: "+b);if(p.hasOwnProperty(m="CRYPTO"))if(b=p[m],b===!!b)if(b)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))d=b;else throw d=!b,Error(ve+"crypto unavailable");else d=b;else throw Error(ve+m+" not true or false: "+b);if(p.hasOwnProperty(m="MODULO_MODE")&&(b=p[m],te(b,0,9,m),h=b),p.hasOwnProperty(m="POW_PRECISION")&&(b=p[m],te(b,0,fe,m),g=b),p.hasOwnProperty(m="FORMAT"))if(b=p[m],typeof b=="object")x=b;else throw Error(ve+m+" not an object: "+b);if(p.hasOwnProperty(m="ALPHABET"))if(b=p[m],typeof b=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(b))_=b.slice(0,10)=="0123456789",T=b;else throw Error(ve+m+" invalid: "+b)}else throw Error(ve+"Object expected: "+p);return{DECIMAL_PLACES:a,ROUNDING_MODE:s,EXPONENTIAL_AT:[l,f],RANGE:[c,u],CRYPTO:d,MODULO_MODE:h,POW_PRECISION:g,FORMAT:x,ALPHABET:T}},v.isBigNumber=function(p){if(!p||p._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var m,b,y=p.c,w=p.e,S=p.s;e:if({}.toString.call(y)=="[object Array]"){if((S===1||S===-1)&&w>=-fe&&w<=fe&&w===Oe(w)){if(y[0]===0){if(w===0&&y.length===1)return!0;break e}if(m=(w+1)%G,m<1&&(m+=G),String(y[0]).length==m){for(m=0;m<y.length;m++)if(b=y[m],b<0||b>=Ye||b!==Oe(b))break e;if(b!==0)return!0}}}else if(y===null&&w===null&&(S===null||S===1||S===-1))return!0;throw Error(ve+"Invalid BigNumber: "+p)},v.maximum=v.max=function(){return L(arguments,-1)},v.minimum=v.min=function(){return L(arguments,1)},v.random=function(){var p=9007199254740992,m=Math.random()*p&2097151?function(){return Oe(Math.random()*p)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(b){var y,w,S,P,E,C=0,k=[],A=new v(o);if(b==null?b=a:te(b,0,fe),P=pf(b/G),d)if(crypto.getRandomValues){for(y=crypto.getRandomValues(new Uint32Array(P*=2));C<P;)E=y[C]*131072+(y[C+1]>>>11),E>=9e15?(w=crypto.getRandomValues(new Uint32Array(2)),y[C]=w[0],y[C+1]=w[1]):(k.push(E%1e14),C+=2);C=P/2}else if(crypto.randomBytes){for(y=crypto.randomBytes(P*=7);C<P;)E=(y[C]&31)*281474976710656+y[C+1]*1099511627776+y[C+2]*4294967296+y[C+3]*16777216+(y[C+4]<<16)+(y[C+5]<<8)+y[C+6],E>=9e15?crypto.randomBytes(7).copy(y,C):(k.push(E%1e14),C+=7);C=P/7}else throw d=!1,Error(ve+"crypto unavailable");if(!d)for(;C<P;)E=m(),E<9e15&&(k[C++]=E%1e14);for(P=k[--C],b%=G,P&&b&&(E=mf[G-b],k[C]=Oe(P/E)*E);k[C]===0;k.pop(),C--);if(C<0)k=[S=0];else{for(S=-1;k[0]===0;k.splice(0,1),S-=G);for(C=1,E=k[0];E>=10;E/=10,C++);C<G&&(S-=G-C)}return A.e=S,A.c=k,A}}(),v.sum=function(){for(var p=1,m=arguments,b=new v(m[0]);p<m.length;)b=b.plus(m[p++]);return b},r=function(){var p="0123456789";function m(b,y,w,S){for(var P,E=[0],C,k=0,A=b.length;k<A;){for(C=E.length;C--;E[C]*=y);for(E[0]+=S.indexOf(b.charAt(k++)),P=0;P<E.length;P++)E[P]>w-1&&(E[P+1]==null&&(E[P+1]=0),E[P+1]+=E[P]/w|0,E[P]%=w)}return E.reverse()}return function(b,y,w,S,P){var E,C,k,A,O,z,U,H,re=b.indexOf("."),ae=a,Z=s;for(re>=0&&(A=g,g=0,b=b.replace(".",""),H=new v(y),z=H.pow(b.length-re),g=A,H.c=m(Et(Ie(z.c),z.e,"0"),10,w,p),H.e=H.c.length),U=m(b,y,w,P?(E=T,p):(E=p,T)),k=A=U.length;U[--A]==0;U.pop());if(!U[0])return E.charAt(0);if(re<0?--k:(z.c=U,z.e=k,z.s=S,z=t(z,H,ae,Z,w),U=z.c,O=z.r,k=z.e),C=k+ae+1,re=U[C],A=w/2,O=O||C<0||U[C+1]!=null,O=Z<4?(re!=null||O)&&(Z==0||Z==(z.s<0?3:2)):re>A||re==A&&(Z==4||O||Z==6&&U[C-1]&1||Z==(z.s<0?8:7)),C<1||!U[0])b=O?Et(E.charAt(1),-ae,E.charAt(0)):E.charAt(0);else{if(U.length=C,O)for(--w;++U[--C]>w;)U[C]=0,C||(++k,U=[1].concat(U));for(A=U.length;!U[--A];);for(re=0,b="";re<=A;b+=E.charAt(U[re++]));b=Et(b,k,E.charAt(0))}return b}}(),t=function(){function p(y,w,S){var P,E,C,k,A=0,O=y.length,z=w%Gt,U=w/Gt|0;for(y=y.slice();O--;)C=y[O]%Gt,k=y[O]/Gt|0,P=U*C+k*z,E=z*C+P%Gt*Gt+A,A=(E/S|0)+(P/Gt|0)+U*k,y[O]=E%S;return A&&(y=[A].concat(y)),y}function m(y,w,S,P){var E,C;if(S!=P)C=S>P?1:-1;else for(E=C=0;E<S;E++)if(y[E]!=w[E]){C=y[E]>w[E]?1:-1;break}return C}function b(y,w,S,P){for(var E=0;S--;)y[S]-=E,E=y[S]<w[S]?1:0,y[S]=E*P+y[S]-w[S];for(;!y[0]&&y.length>1;y.splice(0,1));}return function(y,w,S,P,E){var C,k,A,O,z,U,H,re,ae,Z,X,ce,Bi,Pa,ka,Qe,ln,Pe=y.s==w.s?1:-1,he=y.c,ne=w.c;if(!he||!he[0]||!ne||!ne[0])return new v(!y.s||!w.s||(he?ne&&he[0]==ne[0]:!ne)?NaN:he&&he[0]==0||!ne?Pe*0:Pe/0);for(re=new v(Pe),ae=re.c=[],k=y.e-w.e,Pe=S+k+1,E||(E=Ye,k=Re(y.e/G)-Re(w.e/G),Pe=Pe/G|0),A=0;ne[A]==(he[A]||0);A++);if(ne[A]>(he[A]||0)&&k--,Pe<0)ae.push(1),O=!0;else{for(Pa=he.length,Qe=ne.length,A=0,Pe+=2,z=Oe(E/(ne[0]+1)),z>1&&(ne=p(ne,z,E),he=p(he,z,E),Qe=ne.length,Pa=he.length),Bi=Qe,Z=he.slice(0,Qe),X=Z.length;X<Qe;Z[X++]=0);ln=ne.slice(),ln=[0].concat(ln),ka=ne[0],ne[1]>=E/2&&ka++;do{if(z=0,C=m(ne,Z,Qe,X),C<0){if(ce=Z[0],Qe!=X&&(ce=ce*E+(Z[1]||0)),z=Oe(ce/ka),z>1)for(z>=E&&(z=E-1),U=p(ne,z,E),H=U.length,X=Z.length;m(U,Z,H,X)==1;)z--,b(U,Qe<H?ln:ne,H,E),H=U.length,C=1;else z==0&&(C=z=1),U=ne.slice(),H=U.length;if(H<X&&(U=[0].concat(U)),b(Z,U,X,E),X=Z.length,C==-1)for(;m(ne,Z,Qe,X)<1;)z++,b(Z,Qe<X?ln:ne,X,E),X=Z.length}else C===0&&(z++,Z=[0]);ae[A++]=z,Z[0]?Z[X++]=he[Bi]||0:(Z=[he[Bi]],X=1)}while((Bi++<Pa||Z[0]!=null)&&Pe--);O=Z[0]!=null,ae[0]||ae.splice(0,1)}if(E==Ye){for(A=1,Pe=ae[0];Pe>=10;Pe/=10,A++);B(re,S+(re.e=A+k*G-1)+1,P,O)}else re.e=k,re.r=+O;return re}}();function M(p,m,b,y){var w,S,P,E,C;if(b==null?b=s:te(b,0,8),!p.c)return p.toString();if(w=p.c[0],P=p.e,m==null)C=Ie(p.c),C=y==1||y==2&&(P<=l||P>=f)?Jo(C,P):Et(C,P,"0");else if(p=B(new v(p),m,b),S=p.e,C=Ie(p.c),E=C.length,y==1||y==2&&(m<=S||S<=l)){for(;E<m;C+="0",E++);C=Jo(C,S)}else if(m-=P,C=Et(C,S,"0"),S+1>E){if(--m>0)for(C+=".";m--;C+="0");}else if(m+=S-E,m>0)for(S+1==E&&(C+=".");m--;C+="0");return p.s<0&&w?"-"+C:C}function L(p,m){for(var b,y,w=1,S=new v(p[0]);w<p.length;w++)y=new v(p[w]),(!y.s||(b=yr(S,y))===m||b===0&&S.s===m)&&(S=y);return S}function I(p,m,b){for(var y=1,w=m.length;!m[--w];m.pop());for(w=m[0];w>=10;w/=10,y++);return(b=y+b*G-1)>u?p.c=p.e=null:b<c?p.c=[p.e=0]:(p.e=b,p.c=m),p}n=function(){var p=/^(-?)0([xbo])(?=\w[\w.]*$)/i,m=/^([^.]+)\.$/,b=/^\.([^.]+)$/,y=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(S,P,E,C){var k,A=E?P:P.replace(w,"");if(y.test(A))S.s=isNaN(A)?null:A<0?-1:1;else{if(!E&&(A=A.replace(p,function(O,z,U){return k=(U=U.toLowerCase())=="x"?16:U=="b"?2:8,!C||C==k?z:O}),C&&(k=C,A=A.replace(m,"$1").replace(b,"0.$1")),P!=A))return new v(A,k);if(v.DEBUG)throw Error(ve+"Not a"+(C?" base "+C:"")+" number: "+P);S.s=null}S.c=S.e=null}}();function B(p,m,b,y){var w,S,P,E,C,k,A,O=p.c,z=mf;if(O){e:{for(w=1,E=O[0];E>=10;E/=10,w++);if(S=m-w,S<0)S+=G,P=m,C=O[k=0],A=Oe(C/z[w-P-1]%10);else if(k=pf((S+1)/G),k>=O.length)if(y){for(;O.length<=k;O.push(0));C=A=0,w=1,S%=G,P=S-G+1}else break e;else{for(C=E=O[k],w=1;E>=10;E/=10,w++);S%=G,P=S-G+w,A=P<0?0:Oe(C/z[w-P-1]%10)}if(y=y||m<0||O[k+1]!=null||(P<0?C:C%z[w-P-1]),y=b<4?(A||y)&&(b==0||b==(p.s<0?3:2)):A>5||A==5&&(b==4||y||b==6&&(S>0?P>0?C/z[w-P]:0:O[k-1])%10&1||b==(p.s<0?8:7)),m<1||!O[0])return O.length=0,y?(m-=p.e+1,O[0]=z[(G-m%G)%G],p.e=-m||0):O[0]=p.e=0,p;if(S==0?(O.length=k,E=1,k--):(O.length=k+1,E=z[G-S],O[k]=P>0?Oe(C/z[w-P]%z[P])*E:0),y)for(;;)if(k==0){for(S=1,P=O[0];P>=10;P/=10,S++);for(P=O[0]+=E,E=1;P>=10;P/=10,E++);S!=E&&(p.e++,O[0]==Ye&&(O[0]=1));break}else{if(O[k]+=E,O[k]!=Ye)break;O[k--]=0,E=1}for(S=O.length;O[--S]===0;O.pop());}p.e>u?p.c=p.e=null:p.e<c&&(p.c=[p.e=0])}return p}function N(p){var m,b=p.e;return b===null?p.toString():(m=Ie(p.c),m=b<=l||b>=f?Jo(m,b):Et(m,b,"0"),p.s<0?"-"+m:m)}return i.absoluteValue=i.abs=function(){var p=new v(this);return p.s<0&&(p.s=1),p},i.comparedTo=function(p,m){return yr(this,new v(p,m))},i.decimalPlaces=i.dp=function(p,m){var b,y,w,S=this;if(p!=null)return te(p,0,fe),m==null?m=s:te(m,0,8),B(new v(S),p+S.e+1,m);if(!(b=S.c))return null;if(y=((w=b.length-1)-Re(this.e/G))*G,w=b[w])for(;w%10==0;w/=10,y--);return y<0&&(y=0),y},i.dividedBy=i.div=function(p,m){return t(this,new v(p,m),a,s)},i.dividedToIntegerBy=i.idiv=function(p,m){return t(this,new v(p,m),0,1)},i.exponentiatedBy=i.pow=function(p,m){var b,y,w,S,P,E,C,k,A,O=this;if(p=new v(p),p.c&&!p.isInteger())throw Error(ve+"Exponent not an integer: "+N(p));if(m!=null&&(m=new v(m)),E=p.e>14,!O.c||!O.c[0]||O.c[0]==1&&!O.e&&O.c.length==1||!p.c||!p.c[0])return A=new v(Math.pow(+N(O),E?p.s*(2-Qo(p)):+N(p))),m?A.mod(m):A;if(C=p.s<0,m){if(m.c?!m.c[0]:!m.s)return new v(NaN);y=!C&&O.isInteger()&&m.isInteger(),y&&(O=O.mod(m))}else{if(p.e>9&&(O.e>0||O.e<-1||(O.e==0?O.c[0]>1||E&&O.c[1]>=24e7:O.c[0]<8e13||E&&O.c[0]<=9999975e7)))return S=O.s<0&&Qo(p)?-0:0,O.e>-1&&(S=1/S),new v(C?1/S:S);g&&(S=pf(g/G+2))}for(E?(b=new v(.5),C&&(p.s=1),k=Qo(p)):(w=Math.abs(+N(p)),k=w%2),A=new v(o);;){if(k){if(A=A.times(O),!A.c)break;S?A.c.length>S&&(A.c.length=S):y&&(A=A.mod(m))}if(w){if(w=Oe(w/2),w===0)break;k=w%2}else if(p=p.times(b),B(p,p.e+1,1),p.e>14)k=Qo(p);else{if(w=+N(p),w===0)break;k=w%2}O=O.times(O),S?O.c&&O.c.length>S&&(O.c.length=S):y&&(O=O.mod(m))}return y?A:(C&&(A=o.div(A)),m?A.mod(m):S?B(A,g,s,P):A)},i.integerValue=function(p){var m=new v(this);return p==null?p=s:te(p,0,8),B(m,m.e+1,p)},i.isEqualTo=i.eq=function(p,m){return yr(this,new v(p,m))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(p,m){return yr(this,new v(p,m))>0},i.isGreaterThanOrEqualTo=i.gte=function(p,m){return(m=yr(this,new v(p,m)))===1||m===0},i.isInteger=function(){return!!this.c&&Re(this.e/G)>this.c.length-2},i.isLessThan=i.lt=function(p,m){return yr(this,new v(p,m))<0},i.isLessThanOrEqualTo=i.lte=function(p,m){return(m=yr(this,new v(p,m)))===-1||m===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(p,m){var b,y,w,S,P=this,E=P.s;if(p=new v(p,m),m=p.s,!E||!m)return new v(NaN);if(E!=m)return p.s=-m,P.plus(p);var C=P.e/G,k=p.e/G,A=P.c,O=p.c;if(!C||!k){if(!A||!O)return A?(p.s=-m,p):new v(O?P:NaN);if(!A[0]||!O[0])return O[0]?(p.s=-m,p):new v(A[0]?P:s==3?-0:0)}if(C=Re(C),k=Re(k),A=A.slice(),E=C-k){for((S=E<0)?(E=-E,w=A):(k=C,w=O),w.reverse(),m=E;m--;w.push(0));w.reverse()}else for(y=(S=(E=A.length)<(m=O.length))?E:m,E=m=0;m<y;m++)if(A[m]!=O[m]){S=A[m]<O[m];break}if(S&&(w=A,A=O,O=w,p.s=-p.s),m=(y=O.length)-(b=A.length),m>0)for(;m--;A[b++]=0);for(m=Ye-1;y>E;){if(A[--y]<O[y]){for(b=y;b&&!A[--b];A[b]=m);--A[b],A[y]+=Ye}A[y]-=O[y]}for(;A[0]==0;A.splice(0,1),--k);return A[0]?I(p,A,k):(p.s=s==3?-1:1,p.c=[p.e=0],p)},i.modulo=i.mod=function(p,m){var b,y,w=this;return p=new v(p,m),!w.c||!p.s||p.c&&!p.c[0]?new v(NaN):!p.c||w.c&&!w.c[0]?new v(w):(h==9?(y=p.s,p.s=1,b=t(w,p,0,3),p.s=y,b.s*=y):b=t(w,p,0,h),p=w.minus(b.times(p)),!p.c[0]&&h==1&&(p.s=w.s),p)},i.multipliedBy=i.times=function(p,m){var b,y,w,S,P,E,C,k,A,O,z,U,H,re,ae,Z=this,X=Z.c,ce=(p=new v(p,m)).c;if(!X||!ce||!X[0]||!ce[0])return!Z.s||!p.s||X&&!X[0]&&!ce||ce&&!ce[0]&&!X?p.c=p.e=p.s=null:(p.s*=Z.s,!X||!ce?p.c=p.e=null:(p.c=[0],p.e=0)),p;for(y=Re(Z.e/G)+Re(p.e/G),p.s*=Z.s,C=X.length,O=ce.length,C<O&&(H=X,X=ce,ce=H,w=C,C=O,O=w),w=C+O,H=[];w--;H.push(0));for(re=Ye,ae=Gt,w=O;--w>=0;){for(b=0,z=ce[w]%ae,U=ce[w]/ae|0,P=C,S=w+P;S>w;)k=X[--P]%ae,A=X[P]/ae|0,E=U*k+A*z,k=z*k+E%ae*ae+H[S]+b,b=(k/re|0)+(E/ae|0)+U*A,H[S--]=k%re;H[S]=b}return b?++y:H.splice(0,1),I(p,H,y)},i.negated=function(){var p=new v(this);return p.s=-p.s||null,p},i.plus=function(p,m){var b,y=this,w=y.s;if(p=new v(p,m),m=p.s,!w||!m)return new v(NaN);if(w!=m)return p.s=-m,y.minus(p);var S=y.e/G,P=p.e/G,E=y.c,C=p.c;if(!S||!P){if(!E||!C)return new v(w/0);if(!E[0]||!C[0])return C[0]?p:new v(E[0]?y:w*0)}if(S=Re(S),P=Re(P),E=E.slice(),w=S-P){for(w>0?(P=S,b=C):(w=-w,b=E),b.reverse();w--;b.push(0));b.reverse()}for(w=E.length,m=C.length,w-m<0&&(b=C,C=E,E=b,m=w),w=0;m;)w=(E[--m]=E[m]+C[m]+w)/Ye|0,E[m]=Ye===E[m]?0:E[m]%Ye;return w&&(E=[w].concat(E),++P),I(p,E,P)},i.precision=i.sd=function(p,m){var b,y,w,S=this;if(p!=null&&p!==!!p)return te(p,1,fe),m==null?m=s:te(m,0,8),B(new v(S),p,m);if(!(b=S.c))return null;if(w=b.length-1,y=w*G+1,w=b[w]){for(;w%10==0;w/=10,y--);for(w=b[0];w>=10;w/=10,y++);}return p&&S.e+1>y&&(y=S.e+1),y},i.shiftedBy=function(p){return te(p,-gf,gf),this.times("1e"+p)},i.squareRoot=i.sqrt=function(){var p,m,b,y,w,S=this,P=S.c,E=S.s,C=S.e,k=a+4,A=new v("0.5");if(E!==1||!P||!P[0])return new v(!E||E<0&&(!P||P[0])?NaN:P?S:1/0);if(E=Math.sqrt(+N(S)),E==0||E==1/0?(m=Ie(P),(m.length+C)%2==0&&(m+="0"),E=Math.sqrt(+m),C=Re((C+1)/2)-(C<0||C%2),E==1/0?m="5e"+C:(m=E.toExponential(),m=m.slice(0,m.indexOf("e")+1)+C),b=new v(m)):b=new v(E+""),b.c[0]){for(C=b.e,E=C+k,E<3&&(E=0);;)if(w=b,b=A.times(w.plus(t(S,w,k,1))),Ie(w.c).slice(0,E)===(m=Ie(b.c)).slice(0,E))if(b.e<C&&--E,m=m.slice(E-3,E+1),m=="9999"||!y&&m=="4999"){if(!y&&(B(w,w.e+a+2,0),w.times(w).eq(S))){b=w;break}k+=4,E+=4,y=1}else{(!+m||!+m.slice(1)&&m.charAt(0)=="5")&&(B(b,b.e+a+2,1),p=!b.times(b).eq(S));break}}return B(b,b.e+a+1,s,p)},i.toExponential=function(p,m){return p!=null&&(te(p,0,fe),p++),M(this,p,m,1)},i.toFixed=function(p,m){return p!=null&&(te(p,0,fe),p=p+this.e+1),M(this,p,m)},i.toFormat=function(p,m,b){var y,w=this;if(b==null)p!=null&&m&&typeof m=="object"?(b=m,m=null):p&&typeof p=="object"?(b=p,p=m=null):b=x;else if(typeof b!="object")throw Error(ve+"Argument not an object: "+b);if(y=w.toFixed(p,m),w.c){var S,P=y.split("."),E=+b.groupSize,C=+b.secondaryGroupSize,k=b.groupSeparator||"",A=P[0],O=P[1],z=w.s<0,U=z?A.slice(1):A,H=U.length;if(C&&(S=E,E=C,C=S,H-=S),E>0&&H>0){for(S=H%E||E,A=U.substr(0,S);S<H;S+=E)A+=k+U.substr(S,E);C>0&&(A+=k+U.slice(S)),z&&(A="-"+A)}y=O?A+(b.decimalSeparator||"")+((C=+b.fractionGroupSize)?O.replace(new RegExp("\\d{"+C+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):O):A}return(b.prefix||"")+y+(b.suffix||"")},i.toFraction=function(p){var m,b,y,w,S,P,E,C,k,A,O,z,U=this,H=U.c;if(p!=null&&(E=new v(p),!E.isInteger()&&(E.c||E.s!==1)||E.lt(o)))throw Error(ve+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+N(E));if(!H)return new v(U);for(m=new v(o),k=b=new v(o),y=C=new v(o),z=Ie(H),S=m.e=z.length-U.e-1,m.c[0]=mf[(P=S%G)<0?G+P:P],p=!p||E.comparedTo(m)>0?S>0?m:k:E,P=u,u=1/0,E=new v(z),C.c[0]=0;A=t(E,m,0,1),w=b.plus(A.times(y)),w.comparedTo(p)!=1;)b=y,y=w,k=C.plus(A.times(w=k)),C=w,m=E.minus(A.times(w=m)),E=w;return w=t(p.minus(b),y,0,1),C=C.plus(w.times(k)),b=b.plus(w.times(y)),C.s=k.s=U.s,S=S*2,O=t(k,y,S,s).minus(U).abs().comparedTo(t(C,b,S,s).minus(U).abs())<1?[k,y]:[C,b],u=P,O},i.toNumber=function(){return+N(this)},i.toPrecision=function(p,m){return p!=null&&te(p,1,fe),M(this,p,m,2)},i.toString=function(p){var m,b=this,y=b.s,w=b.e;return w===null?y?(m="Infinity",y<0&&(m="-"+m)):m="NaN":(p==null?m=w<=l||w>=f?Jo(Ie(b.c),w):Et(Ie(b.c),w,"0"):p===10&&_?(b=B(new v(b),a+w+1,s),m=Et(Ie(b.c),b.e,"0")):(te(p,2,T.length,"Base"),m=r(Et(Ie(b.c),w,"0"),10,p,y,!0)),y<0&&b.c[0]&&(m="-"+m)),m},i.valueOf=i.toJSON=function(){return N(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,e!=null&&v.set(e),v}function Re(e){var t=e|0;return e>0||e===t?t:t-1}function Ie(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=G-t.length;r--;t="0"+t);o+=t}for(i=o.length;o.charCodeAt(--i)===48;);return o.slice(0,i+1||1)}function yr(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,f=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=l==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return l>f^r?1:-1;for(s=(l=i.length)<(f=o.length)?l:f,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return l==f?0:l>f^r?1:-1}function te(e,t,r,n){if(e<t||e>r||e!==Oe(e))throw Error(ve+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Qo(e){var t=e.c.length-1;return Re(e.e/G)==t&&e.c[t]%2!=0}function Jo(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Et(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Gv=cp(),dt=Gv,Vv=class{constructor(e){D(this,"key"),D(this,"left",null),D(this,"right",null),this.key=e}},xi=class extends Vv{constructor(e){super(e)}},$v=class{constructor(){D(this,"size",0),D(this,"modificationCount",0),D(this,"splayCount",0)}splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let r=null,n=null,i=null,o=null,a=t,s=this.compare,l;for(;;)if(l=s(a.key,e),l>0){let f=a.left;if(f==null||(l=s(f.key,e),l>0&&(a.left=f.right,f.right=a,a=f,f=a.left,f==null)))break;r==null?n=a:r.left=a,r=a,a=f}else if(l<0){let f=a.right;if(f==null||(l=s(f.key,e),l<0&&(a.right=f.left,f.left=a,a=f,f=a.right,f==null)))break;i==null?o=a:i.right=a,i=a,a=f}else break;return i!=null&&(i.right=a.left,a.left=o),r!=null&&(r.left=a.right,a.right=n),this.root!==a&&(this.root=a,this.splayCount++),l}splayMin(e){let t=e,r=t.left;for(;r!=null;){let n=r;t.left=n.right,n.right=t,t=n,r=t.left}return t}splayMax(e){let t=e,r=t.right;for(;r!=null;){let n=r;t.right=n.left,n.left=t,t=n,r=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let r=this.root,n=r,i=r.left;if(this.size--,i==null)this.root=r.right;else{let o=r.right;r=this.splayMax(i),r.right=o,this.root=r}return this.modificationCount++,n}addNewRoot(e,t){this.size++,this.modificationCount++;let r=this.root;if(r==null){this.root=e;return}t<0?(e.left=r,e.right=r.right,r.right=null):(e.right=r,e.left=r.left,r.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,t)=>e<t?-1:e>t?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},f0,l0,ca=class _i extends $v{constructor(t,r){super(),D(this,"root",null),D(this,"compare"),D(this,"validKey"),D(this,f0,"[object Set]"),this.compare=t??this.defaultCompare(),this.validKey=r??(n=>n!=null&&n!=null)}delete(t){return this.validKey(t)?this._delete(t)!=null:!1}deleteAll(t){for(let r of t)this.delete(r)}forEach(t){let r=this[Symbol.iterator](),n;for(;n=r.next(),!n.done;)t(n.value,n.value,this)}add(t){let r=this.splay(t);return r!=0&&this.addNewRoot(new xi(t),r),this}addAndReturn(t){let r=this.splay(t);return r!=0&&this.addNewRoot(new xi(t),r),this.root.key}addAll(t){for(let r of t)this.add(r)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)<0)return this.root.key;let n=this.root.left;if(n==null)return null;let i=n.right;for(;i!=null;)n=i,i=n.right;return n.key}firstAfter(t){if(t==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(t)>0)return this.root.key;let n=this.root.right;if(n==null)return null;let i=n.left;for(;i!=null;)n=i,i=n.left;return n.key}retainAll(t){let r=new _i(this.compare,this.validKey),n=this.modificationCount;for(let i of t){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(i)&&this.splay(i)==0&&r.add(this.root.key)}r.size!=this.size&&(this.root=r.root,this.size=r.size,this.modificationCount++)}lookup(t){return!this.validKey(t)||this.splay(t)!=0?null:this.root.key}intersection(t){let r=new _i(this.compare,this.validKey);for(let n of this)t.has(n)&&r.add(n);return r}difference(t){let r=new _i(this.compare,this.validKey);for(let n of this)t.has(n)||r.add(n);return r}union(t){let r=this.clone();return r.addAll(t),r}clone(){let t=new _i(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(t==null)return null;function r(i,o){let a,s;do{if(a=i.left,s=i.right,a!=null){let l=new xi(a.key);o.left=l,r(a,l)}if(s!=null){let l=new xi(s.key);o.right=l,i=s,o=l}}while(s!=null)}let n=new xi(t.key);return r(t,n),n}toSet(){return this.clone()}entries(){return new Hv(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(l0=Symbol.iterator,f0=Symbol.toStringTag,l0)](){return new Zv(this.wrap())}},up=class{constructor(e){D(this,"tree"),D(this,"path",new Array),D(this,"modificationCount",null),D(this,"splayCount"),this.tree=e,this.splayCount=e.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let r=this.tree.getRoot();for(;r!=null;)this.path.push(r),r=r.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let e=this.path[this.path.length-1],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},Zv=class extends up{getValue(e){return e.key}},Hv=class extends up{getValue(e){return[e.key,e.key]}},dp=e=>()=>e,Cf=e=>{let t=e?(r,n)=>n.minus(r).abs().isLessThanOrEqualTo(e):dp(!1);return(r,n)=>t(r,n)?0:r.comparedTo(n)};function jv(e){let t=e?(r,n,i,o,a)=>r.exponentiatedBy(2).isLessThanOrEqualTo(o.minus(n).exponentiatedBy(2).plus(a.minus(i).exponentiatedBy(2)).times(e)):dp(!1);return(r,n,i)=>{let o=r.x,a=r.y,s=i.x,l=i.y,f=a.minus(l).times(n.x.minus(s)).minus(o.minus(s).times(n.y.minus(l)));return t(f,o,a,s,l)?0:f.comparedTo(0)}}var Yv=e=>e,Wv=e=>{if(e){let t=new ca(Cf(e)),r=new ca(Cf(e)),n=(o,a)=>a.addAndReturn(o),i=o=>({x:n(o.x,t),y:n(o.y,r)});return i({x:new dt(0),y:new dt(0)}),i}return Yv},Af=e=>({set:t=>{Pt=Af(t)},reset:()=>Af(e),compare:Cf(e),snap:Wv(e),orient:jv(e)}),Pt=Af(),vi=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),Pf=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let r=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,n=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,i=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,o=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:r,y:i},ur:{x:n,y:o}}},ia=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),hp=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),ua=e=>hp(e,e).sqrt(),Xv=(e,t,r)=>{let n={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:r.x.minus(e.x),y:r.y.minus(e.y)};return ia(i,n).div(ua(i)).div(ua(n))},Kv=(e,t,r)=>{let n={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:r.x.minus(e.x),y:r.y.minus(e.y)};return hp(i,n).div(ua(i)).div(ua(n))},c0=(e,t,r)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(r.minus(e.y))),y:r},u0=(e,t,r)=>t.x.isZero()?null:{x:r,y:e.y.plus(t.y.div(t.x).times(r.minus(e.x)))},Qv=(e,t,r,n)=>{if(t.x.isZero())return u0(r,n,e.x);if(n.x.isZero())return u0(e,t,r.x);if(t.y.isZero())return c0(r,n,e.y);if(n.y.isZero())return c0(e,t,r.y);let i=ia(t,n);if(i.isZero())return null;let o={x:r.x.minus(e.x),y:r.y.minus(e.y)},a=ia(o,t).div(i),s=ia(o,n).div(i),l=e.x.plus(s.times(t.x)),f=r.x.plus(a.times(n.x)),c=e.y.plus(s.times(t.y)),u=r.y.plus(a.times(n.y)),d=l.plus(f).div(2),h=c.plus(u).div(2);return{x:d,y:h}},ut=class pp{constructor(t,r){D(this,"point"),D(this,"isLeft"),D(this,"segment"),D(this,"otherSE"),D(this,"consumedBy"),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=r}static compare(t,r){let n=pp.comparePoints(t.point,r.point);return n!==0?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:da.compare(t.segment,r.segment))}static comparePoints(t,r){return t.x.isLessThan(r.x)?-1:t.x.isGreaterThan(r.x)?1:t.y.isLessThan(r.y)?-1:t.y.isGreaterThan(r.y)?1:0}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");let r=t.point.events;for(let n=0,i=r.length;n<i;n++){let o=r[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let r=0;r<t;r++){let n=this.point.events[r];if(n.segment.consumedBy===void 0)for(let i=r+1;i<t;i++){let o=this.point.events[i];o.consumedBy===void 0&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}getAvailableLinkedEvents(){let t=[];for(let r=0,n=this.point.events.length;r<n;r++){let i=this.point.events[r];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){let r=new Map,n=i=>{let o=i.otherSE;r.set(i,{sine:Xv(this.point,t.point,o.point),cosine:Kv(this.point,t.point,o.point)})};return(i,o)=>{r.has(i)||n(i),r.has(o)||n(o);let{sine:a,cosine:s}=r.get(i),{sine:l,cosine:f}=r.get(o);return a.isGreaterThanOrEqualTo(0)&&l.isGreaterThanOrEqualTo(0)?s.isLessThan(f)?1:s.isGreaterThan(f)?-1:0:a.isLessThan(0)&&l.isLessThan(0)?s.isLessThan(f)?-1:s.isGreaterThan(f)?1:0:l.isLessThan(a)?-1:l.isGreaterThan(a)?1:0}}},Jv=class kf{constructor(t){D(this,"events"),D(this,"poly"),D(this,"_isExteriorRing"),D(this,"_enclosingRing"),this.events=t;for(let r=0,n=t.length;r<n;r++)t[r].segment.ringOut=this;this.poly=null}static factory(t){let r=[];for(let n=0,i=t.length;n<i;n++){let o=t[n];if(!o.isInResult()||o.ringOut)continue;let a=null,s=o.leftSE,l=o.rightSE,f=[s],c=s.point,u=[];for(;a=s,s=l,f.push(s),s.point!==c;)for(;;){let d=s.getAvailableLinkedEvents();if(d.length===0){let x=f[0].point,T=f[f.length-1].point;throw new Error(`Unable to complete output ring starting at [${x.x}, ${x.y}]. Last matching segment found ends at [${T.x}, ${T.y}].`)}if(d.length===1){l=d[0].otherSE;break}let h=null;for(let x=0,T=u.length;x<T;x++)if(u[x].point===s.point){h=x;break}if(h!==null){let x=u.splice(h)[0],T=f.splice(x.index);T.unshift(T[0].otherSE),r.push(new kf(T.reverse()));continue}u.push({index:f.length,point:s.point});let g=s.getLeftmostComparator(a);l=d.sort(g)[0].otherSE;break}r.push(new kf(f))}return r}getGeom(){let t=this.events[0].point,r=[t];for(let f=1,c=this.events.length-1;f<c;f++){let u=this.events[f].point,d=this.events[f+1].point;Pt.orient(u,t,d)!==0&&(r.push(u),t=u)}if(r.length===1)return null;let n=r[0],i=r[1];Pt.orient(n,t,i)===0&&r.shift(),r.push(r[0]);let o=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:r.length-1,s=this.isExteriorRing()?r.length:-1,l=[];for(let f=a;f!=s;f+=o)l.push([r[f].x.toNumber(),r[f].y.toNumber()]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){let t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,o=this.events.length;i<o;i++){let a=this.events[i];ut.compare(t,a)>0&&(t=a)}let r=t.segment.prevInResult(),n=r?r.prevInResult():null;for(;;){if(!r)return null;if(!n)return r.ringOut;if(n.ringOut!==r.ringOut)return n.ringOut?.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut?.enclosingRing();r=n.prevInResult(),n=r?r.prevInResult():null}}},d0=class{constructor(e){D(this,"exteriorRing"),D(this,"interiorRings"),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let t=[e];for(let r=0,n=this.interiorRings.length;r<n;r++){let i=this.interiorRings[r].getGeom();i!==null&&t.push(i)}return t}},e2=class{constructor(e){D(this,"rings"),D(this,"polys"),this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,r=this.polys.length;t<r;t++){let n=this.polys[t].getGeom();n!==null&&e.push(n)}return e}_composePolys(e){let t=[];for(let r=0,n=e.length;r<n;r++){let i=e[r];if(!i.poly)if(i.isExteriorRing())t.push(new d0(i));else{let o=i.enclosingRing();o?.poly||t.push(new d0(o)),o?.poly?.addInterior(i)}}return t}},t2=class{constructor(e,t=da.compare){D(this,"queue"),D(this,"tree"),D(this,"segments"),this.queue=e,this.tree=new ca(t),this.segments=[]}process(e){let t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),r;e.isLeft&&this.tree.add(t);let n=t,i=t;do n=this.tree.lastBefore(n);while(n!=null&&n.consumedBy!=null);do i=this.tree.firstAfter(i);while(i!=null&&i.consumedBy!=null);if(e.isLeft){let o=null;if(n){let s=n.getIntersection(t);if(s!==null&&(t.isAnEndpoint(s)||(o=s),!n.isAnEndpoint(s))){let l=this._splitSafely(n,s);for(let f=0,c=l.length;f<c;f++)r.push(l[f])}}let a=null;if(i){let s=i.getIntersection(t);if(s!==null&&(t.isAnEndpoint(s)||(a=s),!i.isAnEndpoint(s))){let l=this._splitSafely(i,s);for(let f=0,c=l.length;f<c;f++)r.push(l[f])}}if(o!==null||a!==null){let s=null;o===null?s=a:a===null?s=o:s=ut.comparePoints(o,a)<=0?o:a,this.queue.delete(t.rightSE),r.push(t.rightSE);let l=t.split(s);for(let f=0,c=l.length;f<c;f++)r.push(l[f])}r.length>0?(this.tree.delete(t),r.push(e)):(this.segments.push(t),t.prev=n)}else{if(n&&i){let o=n.getIntersection(i);if(o!==null){if(!n.isAnEndpoint(o)){let a=this._splitSafely(n,o);for(let s=0,l=a.length;s<l;s++)r.push(a[s])}if(!i.isAnEndpoint(o)){let a=this._splitSafely(i,o);for(let s=0,l=a.length;s<l;s++)r.push(a[s])}}}this.tree.delete(t)}return r}_splitSafely(e,t){this.tree.delete(e);let r=e.rightSE;this.queue.delete(r);let n=e.split(t);return n.push(r),e.consumedBy===void 0&&this.tree.add(e),n}},r2=class{constructor(){D(this,"type"),D(this,"numMultiPolys")}run(e,t,r){Ei.type=e;let n=[new p0(t,!0)];for(let f=0,c=r.length;f<c;f++)n.push(new p0(r[f],!1));if(Ei.numMultiPolys=n.length,Ei.type==="difference"){let f=n[0],c=1;for(;c<n.length;)Pf(n[c].bbox,f.bbox)!==null?c++:n.splice(c,1)}if(Ei.type==="intersection")for(let f=0,c=n.length;f<c;f++){let u=n[f];for(let d=f+1,h=n.length;d<h;d++)if(Pf(u.bbox,n[d].bbox)===null)return[]}let i=new ca(ut.compare);for(let f=0,c=n.length;f<c;f++){let u=n[f].getSweepEvents();for(let d=0,h=u.length;d<h;d++)i.add(u[d])}let o=new t2(i),a=null;for(i.size!=0&&(a=i.first(),i.delete(a));a;){let f=o.process(a);for(let c=0,u=f.length;c<u;c++){let d=f[c];d.consumedBy===void 0&&i.add(d)}i.size!=0?(a=i.first(),i.delete(a)):a=null}Pt.reset();let s=Jv.factory(o.segments);return new e2(s).getGeom()}},Ei=new r2,Mf=Ei,n2=0,da=class oa{constructor(t,r,n,i){D(this,"id"),D(this,"leftSE"),D(this,"rightSE"),D(this,"rings"),D(this,"windings"),D(this,"ringOut"),D(this,"consumedBy"),D(this,"prev"),D(this,"_prevInResult"),D(this,"_beforeState"),D(this,"_afterState"),D(this,"_isInResult"),this.id=++n2,this.leftSE=t,t.segment=this,t.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=t,this.rings=n,this.windings=i}static compare(t,r){let n=t.leftSE.point.x,i=r.leftSE.point.x,o=t.rightSE.point.x,a=r.rightSE.point.x;if(a.isLessThan(n))return 1;if(o.isLessThan(i))return-1;let s=t.leftSE.point.y,l=r.leftSE.point.y,f=t.rightSE.point.y,c=r.rightSE.point.y;if(n.isLessThan(i)){if(l.isLessThan(s)&&l.isLessThan(f))return 1;if(l.isGreaterThan(s)&&l.isGreaterThan(f))return-1;let u=t.comparePoint(r.leftSE.point);if(u<0)return 1;if(u>0)return-1;let d=r.comparePoint(t.rightSE.point);return d!==0?d:-1}if(n.isGreaterThan(i)){if(s.isLessThan(l)&&s.isLessThan(c))return-1;if(s.isGreaterThan(l)&&s.isGreaterThan(c))return 1;let u=r.comparePoint(t.leftSE.point);if(u!==0)return u;let d=t.comparePoint(r.rightSE.point);return d<0?1:d>0?-1:1}if(s.isLessThan(l))return-1;if(s.isGreaterThan(l))return 1;if(o.isLessThan(a)){let u=r.comparePoint(t.rightSE.point);if(u!==0)return u}if(o.isGreaterThan(a)){let u=t.comparePoint(r.rightSE.point);if(u<0)return 1;if(u>0)return-1}if(!o.eq(a)){let u=f.minus(s),d=o.minus(n),h=c.minus(l),g=a.minus(i);if(u.isGreaterThan(d)&&h.isLessThan(g))return 1;if(u.isLessThan(d)&&h.isGreaterThan(g))return-1}return o.isGreaterThan(a)?1:o.isLessThan(a)||f.isLessThan(c)?-1:f.isGreaterThan(c)?1:t.id<r.id?-1:t.id>r.id?1:0}static fromRing(t,r,n){let i,o,a,s=ut.comparePoints(t,r);if(s<0)i=t,o=r,a=1;else if(s>0)i=r,o=t,a=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);let l=new ut(i,!0),f=new ut(o,!1);return new oa(l,f,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(r)?t:r},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(r)?t:r}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return Pt.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let r=this.bbox(),n=t.bbox(),i=Pf(r,n);if(i===null)return null;let o=this.leftSE.point,a=this.rightSE.point,s=t.leftSE.point,l=t.rightSE.point,f=vi(r,s)&&this.comparePoint(s)===0,c=vi(n,o)&&t.comparePoint(o)===0,u=vi(r,l)&&this.comparePoint(l)===0,d=vi(n,a)&&t.comparePoint(a)===0;if(c&&f)return d&&!u?a:!d&&u?l:null;if(c)return u&&o.x.eq(l.x)&&o.y.eq(l.y)?null:o;if(f)return d&&a.x.eq(s.x)&&a.y.eq(s.y)?null:s;if(d&&u)return null;if(d)return a;if(u)return l;let h=Qv(o,this.vector(),s,t.vector());return h===null||!vi(i,h)?null:Pt.snap(h)}split(t){let r=[],n=t.events!==void 0,i=new ut(t,!0),o=new ut(t,!1),a=this.rightSE;this.replaceRightSE(o),r.push(o),r.push(i);let s=new oa(i,a,this.rings.slice(),this.windings.slice());return ut.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),ut.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),r}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let r=0,n=this.windings.length;r<n;r++)this.windings[r]*=-1}consume(t){let r=this,n=t;for(;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;let i=oa.compare(r,n);if(i!==0){if(i>0){let o=r;r=n,n=o}if(r.prev===n){let o=r;r=n,n=o}for(let o=0,a=n.rings.length;o<a;o++){let s=n.rings[o],l=n.windings[o],f=r.rings.indexOf(s);f===-1?(r.rings.push(s),r.windings.push(l)):r.windings[f]+=l}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let r=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let s=0,l=this.rings.length;s<l;s++){let f=this.rings[s],c=this.windings[s],u=r.indexOf(f);u===-1?(r.push(f),n.push(c)):n[u]+=c}let o=[],a=[];for(let s=0,l=r.length;s<l;s++){if(n[s]===0)continue;let f=r[s],c=f.poly;if(a.indexOf(c)===-1)if(f.isExterior)o.push(c);else{a.indexOf(c)===-1&&a.push(c);let u=o.indexOf(f.poly);u!==-1&&o.splice(u,1)}}for(let s=0,l=o.length;s<l;s++){let f=o[s].multiPoly;i.indexOf(f)===-1&&i.push(f)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let t=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(Mf.type){case"union":{let n=t.length===0,i=r.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<r.length?(n=t.length,i=r.length):(n=r.length,i=t.length),this._isInResult=i===Mf.numMultiPolys&&n<i;break}case"xor":{let n=Math.abs(t.length-r.length);this._isInResult=n%2===1;break}case"difference":{let n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(r);break}}return this._isInResult}},h0=class{constructor(e,t,r){if(D(this,"poly"),D(this,"isExterior"),D(this,"segments"),D(this,"bbox"),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let n=Pt.snap({x:new dt(e[0][0]),y:new dt(e[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let i=n;for(let o=1,a=e.length;o<a;o++){if(typeof e[o][0]!="number"||typeof e[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let s=Pt.snap({x:new dt(e[o][0]),y:new dt(e[o][1])});s.x.eq(i.x)&&s.y.eq(i.y)||(this.segments.push(da.fromRing(i,s,this)),s.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=s.x),s.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=s.y),s.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=s.x),s.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=s.y),i=s)}(!n.x.eq(i.x)||!n.y.eq(i.y))&&this.segments.push(da.fromRing(i,n,this))}getSweepEvents(){let e=[];for(let t=0,r=this.segments.length;t<r;t++){let n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}},i2=class{constructor(e,t){if(D(this,"multiPoly"),D(this,"exteriorRing"),D(this,"interiorRings"),D(this,"bbox"),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new h0(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,n=e.length;r<n;r++){let i=new h0(e[r],this,!1);i.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.bbox.ur.y),this.interiorRings.push(i)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,r=this.interiorRings.length;t<r;t++){let n=this.interiorRings[t].getSweepEvents();for(let i=0,o=n.length;i<o;i++)e.push(n[i])}return e}},p0=class{constructor(e,t){if(D(this,"isSubject"),D(this,"polys"),D(this,"bbox"),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new dt(Number.POSITIVE_INFINITY),y:new dt(Number.POSITIVE_INFINITY)},ur:{x:new dt(Number.NEGATIVE_INFINITY),y:new dt(Number.NEGATIVE_INFINITY)}};for(let r=0,n=e.length;r<n;r++){let i=new i2(e[r],this);i.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=i.bbox.ur.y),this.polys.push(i)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,r=this.polys.length;t<r;t++){let n=this.polys[t].getSweepEvents();for(let i=0,o=n.length;i<o;i++)e.push(n[i])}return e}};var o2=(e,...t)=>Mf.run("intersection",e,t),LC=Pt.set;function a2(e,t={}){let r=[];if(ep(e,i=>{r.push(i.coordinates)}),r.length<2)throw new Error("Must specify at least 2 geometries");let n=o2(r[0],...r.slice(1));return n.length===0?null:n.length===1?zf(n[0],t.properties):W0(n,t.properties)}var gp=a2,s2={Point:mp,MultiPoint:l2,LineString:bp,MultiLineString:c2,Polygon:yp,MultiPolygon:u2};function f2(e,t){let[r,n,i,o]=t,a=Ff([r,o]),s=Ff([i,n]),l=[a,s];if(e.type==="GeometryCollection")throw new Error("Unsupported geometry type GeometryCollection");let f=s2[e.type],c=f(e.coordinates,l);return{...e,coordinates:c}}function mp([e,t],[r,n]){let i=g0(r[0],n[0],e),o=g0(r[1],n[1],t);return[i,o]}function Gf(e,t){return e.map(r=>mp(Ff(r),t))}function l2(e,t){return Gf(e,t)}function bp(e,t){return Gf(e,t)}function c2(e,t){return e.map(r=>bp(r,t))}function yp(e,t){return e.map(r=>Gf(r,t))}function u2(e,t){return e.map(r=>yp(r,t))}function Ff(e){return Tf(e)}function g0(e,t,r){return(r-e)/(t-e)}function d2(e,t,r){var n=e.length,i=rn(e[0],t),o=[],a,s,l;let f,c;for(r||(r=[]),a=1;a<n;a++){for(f=e[a-1],c=e[a],s=l=rn(c,t);;)if(i|s){if(i&s)break;i?(f=If(f,c,i,t),i=rn(f,t)):(c=If(f,c,s,t),s=rn(c,t))}else{o.push(f),s!==l?(o.push(c),a<n-1&&(r.push(o),o=[])):a===n-1&&o.push(c);break}i=l}return o.length&&r.push(o),r}function h2(e,t){var r,n,i,o,a,s,l;for(n=1;n<=8;n*=2){for(r=[],i=e[e.length-1],o=!(rn(i,t)&n),a=0;a<e.length;a++)s=e[a],l=!(rn(s,t)&n),l!==o&&r.push(If(i,s,n,t)),l&&r.push(s),i=s,o=l;if(e=r,!e.length)break}return r}function If(e,t,r,n){return r&8?[e[0]+(t[0]-e[0])*(n[3]-e[1])/(t[1]-e[1]),n[3]]:r&4?[e[0]+(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1]),n[1]]:r&2?[n[2],e[1]+(t[1]-e[1])*(n[2]-e[0])/(t[0]-e[0])]:r&1?[n[0],e[1]+(t[1]-e[1])*(n[0]-e[0])/(t[0]-e[0])]:null}function rn(e,t){var r=0;return e[0]<t[0]?r|=1:e[0]>t[2]&&(r|=2),e[1]<t[1]?r|=4:e[1]>t[3]&&(r|=8),r}function p2(e,t){let r=At(e),n=r.type,i=e.type==="Feature"?e.properties:{},o=r.coordinates;switch(n){case"LineString":case"MultiLineString":{let a=[];return n==="LineString"&&(o=[o]),o.forEach(s=>{d2(s,t,a)}),a.length===1?j0(a[0],i):Y0(a,i)}case"Polygon":return zf(m0(o,t),i);case"MultiPolygon":return W0(o.map(a=>m0(a,t)),i);default:throw new Error("geometry "+n+" not supported")}}function m0(e,t){let r=[];for(let n of e){let i=h2(n,t);i.length>0&&((i[0][0]!==i[i.length-1][0]||i[0][1]!==i[i.length-1][1])&&i.push(i[0]),i.length>=4&&r.push(i))}return r}var b0=p2;function g2(e,t,r){let n=Mv(e);if(!r||lp(n,r))return!0;let i=gp(Pi([n,_e(r)]));return i?t==="mvt"?f2(i.geometry,e):i.geometry:!1}function m2(e,t,r){return xp(e,t,r)}function xp(e,t,r){let n=uh(e);if(!r||lp(n,r))return!0;let i=gp(Pi([_e(n),_e(r)]));if(!i)return!1;let o=ch(i.geometry,t);return new Set(o)}var b2=[-180,-90,0,90],y2=[0,-90,180,90];function x2(e,t){if(!t)return!0;let r=_e(t),n=(0,Lf.polygonToCells)(b0(r,b2).geometry.coordinates,e,!0),i=(0,Lf.polygonToCells)(b0(r,y2).geometry.coordinates,e,!0);return new Set(n.concat(i))}var v2="__geomValue";function w2({tiles:e,tileFormat:t,spatialFilter:r,uniqueIdProperty:n,options:i}){let o=new Map;for(let a of e){if(a.isVisible===!1||!a.data)continue;let s=[a.bbox.west,a.bbox.south,a.bbox.east,a.bbox.north],l=g2(s,t,r);if(l===!1)continue;let f=l===!0?void 0:l;yf({map:o,spatialFilter:f,data:a.data.points,type:"Point",bbox:s,tileFormat:t,uniqueIdProperty:n,options:i}),yf({map:o,spatialFilter:f,data:a.data.lines,type:"LineString",bbox:s,tileFormat:t,uniqueIdProperty:n,options:i}),yf({map:o,spatialFilter:f,data:a.data.polygons,type:"Polygon",bbox:s,tileFormat:t,uniqueIdProperty:n,options:i})}return Array.from(o.values())}function vp({map:e,data:t,startIndex:r,endIndex:n,type:i,bbox:o,tileFormat:a,uniqueIdProperty:s,storeGeometry:l,spatialFilter:f}){let c=S2(t,r),u=C2(c,s,e);if(!u||e.has(u))return;let d=null;if(l||f){let{positions:g}=t,x=P2(r,n,g);d=A2(x,i)}if(d&&f&&!rp(d,f))return;let h=T2(c);l&&d&&(h[v2]=a==="mvt"?Tv(d,o):d),e.set(u,h)}function _2({map:e,data:t,spatialFilter:r,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}){let l=wp(t,n),f=s?.storeGeometry||!1;for(let c=0;c<l.length-1;c++){let u=l[c],d=l[c+1];vp({map:e,data:t,startIndex:u,endIndex:d,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,storeGeometry:f,spatialFilter:r})}}function wp(e,t){let r;switch(t){case"Polygon":r=e.primitivePolygonIndices;break;case"LineString":r=e.pathIndices;break;case"Point":r=M2(e);break;default:throw new Error(`Unsupported geometry type: ${t}`)}return r.value}function E2(e,t){return e.featureIds.value[t]}function S2(e,t){let r=E2(e,t),{properties:n,numericProps:i,fields:o}=e,a={uniqueId:o?.[r]?.id,properties:n[r],numericProps:{}};for(let s in i)a.numericProps[s]=i[s].value[t];return a}function T2(e){let{properties:t,numericProps:r}=e;return Object.assign({},t,r)}function C2(e,t,r){if(t)return bf(e,t);if(e.uniqueId)return e.uniqueId;let n=r.size+1;return bf(e,"cartodb_id")||bf(e,"geoid")||n}function bf(e,t){let{properties:r,numericProps:n}=e;return n[t]||r[t]}function A2(e,t){switch(t){case"Polygon":return{type:"Polygon",coordinates:[e]};case"LineString":return{type:"LineString",coordinates:e};case"Point":return{type:"Point",coordinates:e[0]};default:throw new Error("Invalid geometry type")}}function P2(e,t,r){let n=[];for(let i=e;i<t;i++)n.push(Array.from(r.value.subarray(i*r.size,(i+1)*r.size)));return n}function yf({map:e,spatialFilter:t,data:r,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}){r?.properties.length&&(t?_2({map:e,data:r,spatialFilter:t,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}):k2({map:e,data:r,type:n,bbox:i,tileFormat:o,uniqueIdProperty:a,options:s}))}function k2({map:e,data:t,type:r,bbox:n,tileFormat:i,uniqueIdProperty:o,options:a}){let s=wp(t,r),l=a?.storeGeometry||!1;for(let f=0;f<s.length-1;f++){let c=s[f],u=s[f+1];vp({map:e,data:t,startIndex:c,endIndex:u,type:r,bbox:n,tileFormat:i,uniqueIdProperty:o,storeGeometry:l})}}function M2(e){let t=e.featureIds.value,r=t[t.length-1],n=t.constructor,i={value:new n(t.length+1),size:1};return i.value.set(t),i.value.set([r+1],t.length),i}function F2({tiles:e,spatialFilter:t,spatialDataColumn:r,spatialDataType:n}){let i=new Map,o=O2(n),a=I2(e,o),s=r||o;if(!a)return[];let l;o==="h3"&&(l=x2(a,t));for(let f of e)if(!(f.isVisible===!1||!f.data)){if(o==="quadbin"){let c=L2(f,o);l=xp(c,a,t)}l&&f.data.forEach(c=>{(l===!0||l.has(c.id))&&i.set(c.id,{...c.properties,[s]:c.id})})}return Array.from(i.values())}function L2(e,t){return t==="quadbin"?e.index.q:e.id}function I2(e,t){let r=e.find(n=>n.data?.length)?.data;if(r){if(t==="quadbin")return Number(Oo(r[0].id));if(t==="h3")return(0,_p.getResolution)(r[0].id)}}function O2(e){switch(e){case"h3":return"h3";case"quadbin":return"quadbin";default:throw new Error("Unexpected spatial data type")}}var R2="3.4",Li="geom",Ep=7e3,ya=.5,B2=1,Vf=4,$f=6,Sp="__aggregationValue",D2=`1 AS ${Sp}`;function N2({tiles:e,...t}){let r={};for(let s of t.rasterMetadata.bands)r[s.name]={...s,nodata:Number(s.nodata)};if(e=e.filter(U2),e.length===0)return[];let n=Oo(e[0].index.q),i=e[0].data.blockSize,o=n+BigInt(Math.log2(i)),a=new Map;for(let s of e){let l=s.index.q,f=m2(l,o,t.spatialFilter);if(f===!1)continue;let c=q2(l,o);for(let u=0;u<c.length;u++){if(f!==!0&&!f.has(c[u]))continue;let d={},h=!1;for(let g in s.data.cells.numericProps){let x=s.data.cells.numericProps[g].value[u],T=r[g];G2(x,T.nodata)&&(d[g]=s.data.cells.numericProps[g].value[u],h=!0)}h&&a.set(c[u],d)}}return Array.from(a.values())}function z2(e){return!!e.data?.cells}function U2(e){return!!(e.isVisible&&e.data?.cells?.numericProps)}function q2(e,t){let r=Bs(e),n=Number(t),i=2**(n-r.z),o=r.x*i,a=r.y*i,s=[];for(let l=0,f=i**2;l<f;l++){let c=o+l%i,u=a+Math.floor(l/i);s.push(Rs({x:c,y:u,z:n}))}return s}function G2(e,t){return Number.isNaN(e)?!1:t!==e}var BC=new Set(Object.values(Df));function Ct(e){return Array.isArray(e)?e.map(t=>Ct(t)):typeof e!="object"?e:Object.entries(e).reduce((t,[r,n])=>(t[r.toLowerCase()]=typeof n=="object"&&n?Ct(n):n,t),{})}function J(e,t){if(!e)throw new Error(t)}var Tp=class Si extends Error{constructor(t){super(`${Si.NAME}: ${t}`),this.name=Si.NAME}static is(t){return t instanceof Si||t.message?.includes(Si.NAME)}};D(Tp,"NAME","InvalidColumnError");var Of=Tp;function V2(e){for(let t in e)return!1;return!0}var $2=e=>e!==null&&typeof e=="object",Cp=e=>$2(e)&&e.constructor==={}.constructor;function Z2(e,...t){for(let r of t)for(let n in r)r[n]!==void 0&&(e[n]=r[n]);return e}function xa(e,t,r){let n=r.find(i=>i.name===t);return n&&n.type==="geometry"?"geo":e}function H2({tiles:e,spatialFilter:t,uniqueIdProperty:r,tileFormat:n,spatialDataColumn:i=Li,spatialDataType:o,rasterMetadata:a,storeGeometry:s=!1}){return o==="geo"?w2({tiles:e,tileFormat:n,spatialFilter:t,uniqueIdProperty:r,options:{storeGeometry:s}}):e.some(z2)?(J(a,"Missing raster metadata"),N2({tiles:e,spatialFilter:t,spatialDataColumn:i,spatialDataType:o,rasterMetadata:a})):F2({tiles:e,spatialFilter:t,spatialDataColumn:i,spatialDataType:o})}var Ii=class extends Error{constructor(e,t,r,n){let i="Failed to connect";r&&(i="Server returned: ",r.status===400?i+="Bad request":r.status===401||r.status===403?i+="Unauthorized access":r.status===404?i+="Not found":i+="Error",i+=` (${r.status}):`),i+=` ${e.message||e}`;let o=`${t.requestType} API request failed`;o+=`
|
|
171
171
|
${i}`;for(let a of Object.keys(t))a!=="requestType"&&(o+=`
|
|
172
172
|
${j2(a)}: ${t[a]}`);o+=`
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "9.2.0-beta.
|
|
6
|
+
"version": "9.2.0-beta.3",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"@loaders.gl/core": "^4.2.0",
|
|
76
76
|
"@luma.gl/core": "^9.2.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "15f2330ac9a9ec3ae449a1e5fad9b923eac60bf2"
|
|
79
79
|
}
|