diff --git a/favicon.ico b/dist/favicon.ico similarity index 100% rename from favicon.ico rename to dist/favicon.ico diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..bad9e80 --- /dev/null +++ b/dist/index.html @@ -0,0 +1 @@ +Maptable
\ No newline at end of file diff --git a/static/css/564.44e76f33.chunk.css b/dist/static/css/564.44e76f33.chunk.css similarity index 100% rename from static/css/564.44e76f33.chunk.css rename to dist/static/css/564.44e76f33.chunk.css diff --git a/static/css/235.55f8c8f2.css b/dist/static/css/938.55f8c8f2.css similarity index 100% rename from static/css/235.55f8c8f2.css rename to dist/static/css/938.55f8c8f2.css diff --git a/static/css/main.922e2cd1.css b/dist/static/css/main.922e2cd1.css similarity index 100% rename from static/css/main.922e2cd1.css rename to dist/static/css/main.922e2cd1.css diff --git a/dist/static/js/30.5facda43.js b/dist/static/js/30.5facda43.js new file mode 100644 index 0000000..68f8994 --- /dev/null +++ b/dist/static/js/30.5facda43.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[30],{55892:(t,e,r)=>{"use strict";var n=r(55611);function i(t){var e=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";function r(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function n(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!d(t[0])||!d(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function i(t,e,n){void 0===n&&(n={});for(var i=0,o=t;i=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=d,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},55611:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(24052);function i(t,e,r){if(null!==t)for(var n,o,a,s,u,l,c,f,h=0,d=0,p=t.type,g="FeatureCollection"===p,m="Feature"===p,v=g?t.features.length:1,y=0;yl||d>c||p>f)return u=i,l=r,c=d,f=p,void(a=0);var g=n.lineString([u,i],t.properties);if(!1===e(g,r,o,p,a))return!1;a++,u=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");u(t,(function(t,r,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s{var n=r(42967),i=r(24052),o=r(55611),a=r(55892).Z,s=o.featureEach,u=(o.coordEach,i.polygon,i.featureCollection);function l(t){var e=new n(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:a(t),n.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:a(t),e.push(t)})):s(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:a(t),e.push(t)})),n.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:a(t),n.prototype.remove.call(this,t,e)},e.clear=function(){return n.prototype.clear.call(this)},e.search=function(t){var e=n.prototype.search.call(this,this.toBBox(t));return u(e)},e.collides=function(t){return n.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=n.prototype.all.call(this);return u(t)},e.toJSON=function(){return n.prototype.toJSON.call(this)},e.fromJSON=function(t){return n.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=a(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=a(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=l,t.exports.default=l},41017:(t,e,r)=>{var n=r(82675);t.exports=function(t){return"function"==typeof t?t:n}},42967:function(t){t.exports=function(){"use strict";function t(t,n,i,o,a){!function t(r,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=n-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);t(r,n,Math.max(i,Math.floor(n-u*c/s+f)),Math.min(o,Math.floor(n+(s-u)*c/s+f)),a)}var h=r[n],d=i,p=o;for(e(r,i,n),a(r[o],h)>0&&e(r,i,o);d0;)p--}0===a(r[i],h)?e(r,i,p):e(r,++p,o),p<=n&&(i=p+1),n<=p&&(o=p-1)}}(t,n,i||0,o||t.length-1,a||r)}function e(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function r(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;t(e,s,r,n,o),a.push(r,s,s,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,r=[];if(!d(t,e))return r;for(var n=this.toBBox,i=[];e;){for(var o=0;o=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(n,i,e)},n.prototype._split=function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var a=this._chooseSplitIndex(r,i,n),s=p(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,o(r,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(r,s)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,r){for(var n,i,o,s,u,l,f,h=1/0,d=1/0,p=e;p<=r-e;p++){var g=a(t,0,p,this.toBBox),m=a(t,p,r,this.toBBox),v=(i=g,o=m,s=void 0,u=void 0,l=void 0,f=void 0,s=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),f=Math.min(i.maxY,o.maxY),Math.max(0,l-s)*Math.max(0,f-u)),y=c(g)+c(m);v=e;d--){var p=t.children[d];s(u,t.leaf?i(p):p),l+=f(u)}return l},n.prototype._adjustParentBBoxes=function(t,e,r){for(var n=r;n>=0;n--)s(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},57323:(t,e,r)=>{var n=r(99654);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},32864:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(40517),i=r(81011);function o(t,e,r){if(void 0===r&&(r={}),!0===r.final)return function(t,e){var r=o(e,t);return r=(r+180)%360}(t,e);var a=(0,i.c9)(t),s=(0,i.c9)(e),u=(0,n.Ht)(a[0]),l=(0,n.Ht)(s[0]),c=(0,n.Ht)(a[1]),f=(0,n.Ht)(s[1]),h=Math.sin(l-u)*Math.cos(f),d=Math.cos(c)*Math.sin(f)-Math.sin(c)*Math.cos(f)*Math.cos(l-u);return(0,n.vi)(Math.atan2(h,d))}},94648:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var n=r(82086),i=r(81011);function o(t,e,r,n,i){var o=r[0],a=r[1],s=t[0],u=t[1],l=e[0],c=e[1],f=l-s,h=c-u,d=(r[0]-s)*h-(r[1]-u)*f;if(null!==i){if(Math.abs(d)>i)return!1}else if(0!==d)return!1;return n?"start"===n?Math.abs(f)>=Math.abs(h)?f>0?s0?u=Math.abs(h)?f>0?s<=o&&o0?u<=a&&a=Math.abs(h)?f>0?s0?u=Math.abs(h)?f>0?s<=o&&o<=l:l<=o&&o<=s:h>0?u<=a&&a<=c:c<=a&&a<=u}const a=function(t,e,r){void 0===r&&(r={});for(var n=(0,i.c9)(t),a=(0,i.r7)(e),s=0;se[0])&&(!(t[2]e[1])&&!(t[3]{"use strict";r.d(e,{Z:()=>o});var n=r(40517),i=r(81011);function o(t,e,r,o){void 0===o&&(o={});var a=(0,i.c9)(t),s=(0,n.Ht)(a[0]),u=(0,n.Ht)(a[1]),l=(0,n.Ht)(r),c=(0,n.lF)(e,o.units),f=Math.asin(Math.sin(u)*Math.cos(c)+Math.cos(u)*Math.sin(c)*Math.cos(l)),h=s+Math.atan2(Math.sin(l)*Math.sin(c)*Math.cos(u),Math.cos(c)-Math.sin(u)*Math.sin(f)),d=(0,n.vi)(h),p=(0,n.vi)(f);return(0,n.xm)([d,p],o.properties)}},36012:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(40517),i=r(81011),o=r(4790),a=r(48024),s=r(34156);function u(t,e){var r=(0,i.r7)(t),o=(0,i.r7)(e);if(2!==r.length)throw new Error(" line1 must only contain 2 coordinates");if(2!==o.length)throw new Error(" line2 must only contain 2 coordinates");var a=r[0][0],s=r[0][1],u=r[1][0],l=r[1][1],c=o[0][0],f=o[0][1],h=o[1][0],d=o[1][1],p=(d-f)*(u-a)-(h-c)*(l-s),g=(h-c)*(s-f)-(d-f)*(a-c),m=(u-a)*(s-f)-(l-s)*(a-c);if(0===p)return null;var v=g/p,y=m/p;if(v>=0&&v<=1&&y>=0&&y<=1){var b=a+v*(u-a),M=s+v*(l-s);return(0,n.xm)([b,M])}return null}const l=function(t,e){var r={},l=[];if("LineString"===t.type&&(t=(0,n.zL)(t)),"LineString"===e.type&&(e=(0,n.zL)(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var c=u(t,e);return c&&l.push(c),(0,n.uf)(l)}var f=s();return f.load((0,o.Z)(e)),(0,a.By)((0,o.Z)(t),(function(t){(0,a.By)(f.search(t),(function(e){var n=u(t,e);if(n){var o=(0,i.r7)(n).join(",");r[o]||(r[o]=!0,l.push(n))}}))})),(0,n.uf)(l)}},4790:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(40517),i=r(81011),o=r(48024);const a=function(t){if(!t)throw new Error("geojson is required");var e=[];return(0,o.nG)(t,(function(t){!function(t,e){var r=[],o=t.geometry;if(null!==o){switch(o.type){case"Polygon":r=(0,i.r7)(o);break;case"LineString":r=[(0,i.r7)(o)]}r.forEach((function(r){var i=function(t,e){var r=[];return t.reduce((function(t,i){var o=(0,n.Tu)([t,i],e);return o.bbox=function(t,e){var r=t[0],n=t[1],i=e[0],o=e[1];return[ri?r:i,n>o?n:o]}(t,i),r.push(o),i})),r}(r,t.properties);i.forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),(0,n.uf)(e)}},51090:(t,e,r)=>{"use strict";r.d(e,{Z:()=>M});var n=r(34156),i=r(64505);const o=function(t){var e=t[0],r=t[1],n=t[2],o=t[3];if((0,i.Z)(t.slice(0,2),[n,r])>=(0,i.Z)(t.slice(0,2),[e,o])){var a=(r+o)/2;return[e,a-(n-e)/2,n,a+(n-e)/2]}var s=(e+n)/2;return[s-(o-r)/2,r,s+(o-r)/2,o]};var a=r(82086),s=r(48024);const u=function(t,e){void 0===e&&(e={});var r=e.precision,n=e.coordinates,i=e.mutate;if(r=void 0===r||null===r||isNaN(r)?6:r,n=void 0===n||null===n||isNaN(n)?3:n,!t)throw new Error(" is required");if("number"!==typeof r)throw new Error(" must be a number");if("number"!==typeof n)throw new Error(" must be a number");!1!==i&&void 0!==i||(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,r);return(0,s.pZ)(t,(function(t){!function(t,e,r){t.length>r&&t.splice(r,t.length);for(var n=0;n0&&((w=M.features[0]).properties.dist=(0,i.Z)(e,w,r),w.properties.location=o+(0,i.Z)(u,w,r)),u.properties.dist1&&r.push((0,d.Tu)(g)),(0,d.uf)(r)}function y(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var r,n=1/0;return(0,s.By)(e,(function(e){var i=g(e,t).properties.dist;i{"use strict";function n(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}r.d(e,{Z:()=>n})},35546:(t,e,r)=>{"use strict";function n(t,e){let r=0,n=0;if(void 0===e)for(let i of t)null!=i&&(i=+i)>=i&&(++r,n+=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++r,n+=o)}if(r)return n/r}r.d(e,{Z:()=>n})},70323:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(31600);function i(t,e){return(0,n.ZP)(t,.5,e)}},42514:(t,e,r)=>{"use strict";function n(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}r.d(e,{Z:()=>n})},14755:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(25945);function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.Z;if(t===n.Z)return o;if("function"!==typeof t)throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||0===n?n:(0===t(r,r))-(0===t(e,e))}}function o(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}function a(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,u=arguments.length>4?arguments[4]:void 0;if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(u=void 0===u?o:i(u);n>r;){if(n-r>600){const i=n-r+1,o=e-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(o-i/2<0?-1:1);a(t,e,Math.max(r,Math.floor(e-o*l/i+c)),Math.min(n,Math.floor(e+(i-o)*l/i+c)),u)}const i=t[e];let o=r,l=n;for(s(t,r,e),u(t[n],i)>0&&s(t,r,n);o0;)--l}0===u(t[r],i)?s(t,r,l):(++l,s(t,l,n)),l<=e&&(r=l+1),e<=l&&(n=l-1)}return t}function s(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}},27077:(t,e,r)=>{"use strict";function n(t,e){let r=0;if(void 0===e)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}r.d(e,{Z:()=>n})}}]); \ No newline at end of file diff --git a/static/js/43.b7169bd5.chunk.js b/dist/static/js/43.b7169bd5.chunk.js similarity index 100% rename from static/js/43.b7169bd5.chunk.js rename to dist/static/js/43.b7169bd5.chunk.js diff --git a/dist/static/js/433.8e937a53.js b/dist/static/js/433.8e937a53.js new file mode 100644 index 0000000..e310ab7 --- /dev/null +++ b/dist/static/js/433.8e937a53.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[433],{32411:(A,e,r)=>{"use strict";r.d(e,{kG:()=>t});function t(A,e,r){if(void 0===r&&(r=Error),!A)throw new r(e)}},74128:(A,e,r)=>{"use strict";function t(A){return A}r.d(e,{Em:()=>t})},98968:(A,e,r)=>{"use strict";r.d(e,{Z:()=>t});const t={schemeGroups:{sequential:["BuGn","BuPu","GnBu","OrRd","PuBu","PuBuGn","PuRd","RdPu","YlGn","YlGnBu","YlOrBr","YlOrRd"],singlehue:["Blues","Greens","Greys","Oranges","Purples","Reds"],diverging:["BrBG","PiYG","PRGn","PuOr","RdBu","RdGy","RdYlBu","RdYlGn","Spectral"],qualitative:["Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3"]},YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}}},65235:function(A){A.exports=function(){"use strict";var A=1e3,e=6e4,r=36e5,t="millisecond",n="second",i="minute",f="hour",a="day",o="week",u="month",c="quarter",s="year",l="date",d="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var e=["th","st","nd","rd"],r=A%100;return"["+A+(e[(r-20)%10]||e[r]||e[0])+"]"}},v=function(A,e,r){var t=String(A);return!t||t.length>=e?A:""+Array(e+1-t.length).join(r)+A},p={s:v,z:function(A){var e=-A.utcOffset(),r=Math.abs(e),t=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+v(t,2,"0")+":"+v(n,2,"0")},m:function A(e,r){if(e.date()1)return A(f[0])}else{var a=e.name;y[a]=e,n=a}return!t&&n&&(w=n),n||!t&&w},B=function(A,e){if(m(A))return A.clone();var r="object"==typeof e?e:{};return r.date=A,r.args=arguments,new x(r)},k=p;k.l=E,k.i=m,k.w=function(A,e){return B(A,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function g(A){this.$L=E(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[_]=!0}var v=g.prototype;return v.parse=function(A){this.$d=function(A){var e=A.date,r=A.utc;if(null===e)return new Date(NaN);if(k.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var t=e.match(b);if(t){var n=t[2]-1||0,i=(t[7]||"0").substring(0,3);return r?new Date(Date.UTC(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,i)):new Date(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,i)}}return new Date(e)}(A),this.init()},v.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},v.$utils=function(){return k},v.isValid=function(){return!(this.$d.toString()===d)},v.isSame=function(A,e){var r=B(A);return this.startOf(e)<=r&&r<=this.endOf(e)},v.isAfter=function(A,e){return B(A)=0&&(i[s]=parseInt(c,10))}var l=i[3],d=24===l?0:l,b=i[0]+"-"+i[1]+"-"+i[2]+" "+d+":"+i[4]+":"+i[5]+":000",h=+e;return(n.utc(b).valueOf()-(h-=h%1e3))/6e4},o=t.prototype;o.tz=function(A,e){void 0===A&&(A=i);var r=this.utcOffset(),t=this.toDate(),f=t.toLocaleString("en-US",{timeZone:A}),a=Math.round((t-new Date(f))/1e3/60),o=n(f,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(t.getTimezoneOffset()/15)-a,!0);if(e){var u=o.utcOffset();o=o.add(r-u,"minute")}return o.$x.$timezone=A,o},o.offsetName=function(A){var e=this.$x.$timezone||n.tz.guess(),r=f(this.valueOf(),e,{timeZoneName:A}).find((function(A){return"timezonename"===A.type.toLowerCase()}));return r&&r.value};var u=o.startOf;o.startOf=function(A,e){if(!this.$x||!this.$x.$timezone)return u.call(this,A,e);var r=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(r,A,e).tz(this.$x.$timezone,!0)},n.tz=function(A,e,r){var t=r&&e,f=r||e||i,o=a(+n(),f);if("string"!=typeof A)return n(A).tz(f);var u=function(A,e,r){var t=A-60*e*1e3,n=a(t,r);if(e===n)return[t,e];var i=a(t-=60*(n-e)*1e3,r);return n===i?[t,n]:[A-60*Math.min(n,i)*1e3,Math.max(n,i)]}(n.utc(A,t).valueOf(),o,f),c=u[0],s=u[1],l=n(c).utcOffset(s);return l.$x.$timezone=f,l},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(A){i=A}}}()},9944:function(A){A.exports=function(){"use strict";var A="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(t,n,i){var f=n.prototype;i.utc=function(A){return new n({date:A,utc:!0,args:arguments})},f.utc=function(e){var r=i(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),A):r},f.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=f.parse;f.parse=function(A){A.utc&&(this.$u=!0),this.$utils().u(A.$offset)||(this.$offset=A.$offset),a.call(this,A)};var o=f.init;f.init=function(){if(this.$u){var A=this.$d;this.$y=A.getUTCFullYear(),this.$M=A.getUTCMonth(),this.$D=A.getUTCDate(),this.$W=A.getUTCDay(),this.$H=A.getUTCHours(),this.$m=A.getUTCMinutes(),this.$s=A.getUTCSeconds(),this.$ms=A.getUTCMilliseconds()}else o.call(this)};var u=f.utcOffset;f.utcOffset=function(t,n){var i=this.$utils().u;if(i(t))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof t&&(t=function(A){void 0===A&&(A="");var t=A.match(e);if(!t)return null;var n=(""+t[0]).match(r)||["-",0,0],i=n[0],f=60*+n[1]+ +n[2];return 0===f?0:"+"===i?f:-f}(t),null===t))return this;var f=Math.abs(t)<=16?60*t:t,a=this;if(n)return a.$offset=f,a.$u=0===t,a;if(0!==t){var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(f+o,A)).$offset=f,a.$x.$localOffset=o}else a=this.utc();return a};var c=f.format;f.format=function(A){var e=A||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,e)},f.valueOf=function(){var A=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*A},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var s=f.toDate;f.toDate=function(A){return"s"===A&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():s.call(this)};var l=f.diff;f.diff=function(A,e,r){if(A&&this.$u===A.$u)return l.call(this,A,e,r);var t=this.local(),n=i(A).local();return l.call(t,n,e,r)}}}()},78062:(A,e,r)=>{"use strict";r.d(e,{rS:()=>B});var t=function(A){var e,r="undefined"!==typeof(A=A||{})?A:{},t={};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);var n,i=[],f="";"undefined"!==typeof document&&document.currentScript&&(f=document.currentScript.src),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",n=function(A,e,r){var t=new XMLHttpRequest;t.open("GET",A,!0),t.responseType="arraybuffer",t.onload=function(){if(200==t.status||0==t.status&&t.response)e(t.response);else{var n=V(A);n?e(n.buffer):r()}},t.onerror=r,t.send(null)};var a=r.print||console.log.bind(console),o=r.printErr||console.warn.bind(console);for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);t=null,r.arguments&&(i=r.arguments);var u=0;var c=!1;function s(A){var e,t=r["_"+A];return e="Cannot call unknown function "+A+", make sure it is exported",t||aA("Assertion failed: "+e),t}function l(A,e,r,t,n){var i={string:function(A){var e=0;if(null!==A&&void 0!==A&&0!==A){var r=1+(A.length<<2);(function(A,e,r){(function(A,e,r,t){if(!(t>0))return 0;for(var n=r,i=r+t-1,f=0;f=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&A.charCodeAt(++f);if(a<=127){if(r>=i)break;e[r++]=a}else if(a<=2047){if(r+1>=i)break;e[r++]=192|a>>6,e[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;e[r++]=224|a>>12,e[r++]=128|a>>6&63,e[r++]=128|63&a}else{if(r+3>=i)break;e[r++]=240|a>>18,e[r++]=128|a>>12&63,e[r++]=128|a>>6&63,e[r++]=128|63&a}}e[r]=0})(A,v,e,r)})(A,e=q(r),r)}return e},array:function(A){var e=q(A.length);return function(A,e){g.set(A,e)}(A,e),e}};var f=s(A),a=[],o=0;if(t)for(var u=0;u=t);)++n;if(n-e>16&&A.subarray&&d)return d.decode(A.subarray(e,n));for(var i="";e>10,56320|1023&u)}}else i+=String.fromCharCode((31&f)<<6|a)}else i+=String.fromCharCode(f)}return i}(v,A,e):""}var h,g,v,p,w,y,_;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function m(A,e){return A%e>0&&(A+=e-A%e),A}function E(A){h=A,r.HEAP8=g=new Int8Array(A),r.HEAP16=p=new Int16Array(A),r.HEAP32=w=new Int32Array(A),r.HEAPU8=v=new Uint8Array(A),r.HEAPU16=new Uint16Array(A),r.HEAPU32=new Uint32Array(A),r.HEAPF32=y=new Float32Array(A),r.HEAPF64=_=new Float64Array(A)}var B=r.TOTAL_MEMORY||33554432;function k(A){for(;A.length>0;){var e=A.shift();if("function"!=typeof e){var t=e.func;"number"===typeof t?void 0===e.arg?r.dynCall_v(t):r.dynCall_vi(t,e.arg):t(void 0===e.arg?null:e.arg)}else e()}}B=(h=r.buffer?r.buffer:new ArrayBuffer(B)).byteLength,E(h),w[6032]=5267040;var x=[],D=[],M=[],C=[];var Q=Math.abs,P=Math.ceil,I=Math.floor,S=Math.min,R=0,T=null,O=null;r.preloadedImages={},r.preloadedAudios={};var F,G,L=null,U="data:application/octet-stream;base64,";function N(A){return String.prototype.startsWith?A.startsWith(U):0===A.indexOf(U)}L="data:application/octet-stream;base64,AAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAAAQAAAAQAAAADAAAABgAAAAUAAAACAAAAAAAAAAIAAAADAAAAAQAAAAQAAAAGAAAAAAAAAAUAAAADAAAABgAAAAQAAAAFAAAAAAAAAAEAAAACAAAABAAAAAUAAAAGAAAAAAAAAAIAAAADAAAAAQAAAAUAAAACAAAAAAAAAAEAAAADAAAABgAAAAQAAAAGAAAAAAAAAAUAAAACAAAAAQAAAAQAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAYAAAAAAAAABQAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAYAAAAAAAAAAwAAAAIAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAABAAAAAAAAAABAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAgAAAAQAAAADAAAACAAAAAEAAAAHAAAABgAAAAkAAAAAAAAAAwAAAAIAAAACAAAABgAAAAoAAAALAAAAAAAAAAEAAAAFAAAAAwAAAA0AAAABAAAABwAAAAQAAAAMAAAAAAAAAAQAAAB/AAAADwAAAAgAAAADAAAAAAAAAAwAAAAFAAAAAgAAABIAAAAKAAAACAAAAAAAAAAQAAAABgAAAA4AAAALAAAAEQAAAAEAAAAJAAAAAgAAAAcAAAAVAAAACQAAABMAAAADAAAADQAAAAEAAAAIAAAABQAAABYAAAAQAAAABAAAAAAAAAAPAAAACQAAABMAAAAOAAAAFAAAAAEAAAAHAAAABgAAAAoAAAALAAAAGAAAABcAAAAFAAAAAgAAABIAAAALAAAAEQAAABcAAAAZAAAAAgAAAAYAAAAKAAAADAAAABwAAAANAAAAGgAAAAQAAAAPAAAAAwAAAA0AAAAaAAAAFQAAAB0AAAADAAAADAAAAAcAAAAOAAAAfwAAABEAAAAbAAAACQAAABQAAAAGAAAADwAAABYAAAAcAAAAHwAAAAQAAAAIAAAADAAAABAAAAASAAAAIQAAAB4AAAAIAAAABQAAABYAAAARAAAACwAAAA4AAAAGAAAAIwAAABkAAAAbAAAAEgAAABgAAAAeAAAAIAAAAAUAAAAKAAAAEAAAABMAAAAiAAAAFAAAACQAAAAHAAAAFQAAAAkAAAAUAAAADgAAABMAAAAJAAAAKAAAABsAAAAkAAAAFQAAACYAAAATAAAAIgAAAA0AAAAdAAAABwAAABYAAAAQAAAAKQAAACEAAAAPAAAACAAAAB8AAAAXAAAAGAAAAAsAAAAKAAAAJwAAACUAAAAZAAAAGAAAAH8AAAAgAAAAJQAAAAoAAAAXAAAAEgAAABkAAAAXAAAAEQAAAAsAAAAtAAAAJwAAACMAAAAaAAAAKgAAAB0AAAArAAAADAAAABwAAAANAAAAGwAAACgAAAAjAAAALgAAAA4AAAAUAAAAEQAAABwAAAAfAAAAKgAAACwAAAAMAAAADwAAABoAAAAdAAAAKwAAACYAAAAvAAAADQAAABoAAAAVAAAAHgAAACAAAAAwAAAAMgAAABAAAAASAAAAIQAAAB8AAAApAAAALAAAADUAAAAPAAAAFgAAABwAAAAgAAAAHgAAABgAAAASAAAANAAAADIAAAAlAAAAIQAAAB4AAAAxAAAAMAAAABYAAAAQAAAAKQAAACIAAAATAAAAJgAAABUAAAA2AAAAJAAAADMAAAAjAAAALgAAAC0AAAA4AAAAEQAAABsAAAAZAAAAJAAAABQAAAAiAAAAEwAAADcAAAAoAAAANgAAACUAAAAnAAAANAAAADkAAAAYAAAAFwAAACAAAAAmAAAAfwAAACIAAAAzAAAAHQAAAC8AAAAVAAAAJwAAACUAAAAZAAAAFwAAADsAAAA5AAAALQAAACgAAAAbAAAAJAAAABQAAAA8AAAALgAAADcAAAApAAAAMQAAADUAAAA9AAAAFgAAACEAAAAfAAAAKgAAADoAAAArAAAAPgAAABwAAAAsAAAAGgAAACsAAAA+AAAALwAAAEAAAAAaAAAAKgAAAB0AAAAsAAAANQAAADoAAABBAAAAHAAAAB8AAAAqAAAALQAAACcAAAAjAAAAGQAAAD8AAAA7AAAAOAAAAC4AAAA8AAAAOAAAAEQAAAAbAAAAKAAAACMAAAAvAAAAJgAAACsAAAAdAAAARQAAADMAAABAAAAAMAAAADEAAAAeAAAAIQAAAEMAAABCAAAAMgAAADEAAAB/AAAAPQAAAEIAAAAhAAAAMAAAACkAAAAyAAAAMAAAACAAAAAeAAAARgAAAEMAAAA0AAAAMwAAAEUAAAA2AAAARwAAACYAAAAvAAAAIgAAADQAAAA5AAAARgAAAEoAAAAgAAAAJQAAADIAAAA1AAAAPQAAAEEAAABLAAAAHwAAACkAAAAsAAAANgAAAEcAAAA3AAAASQAAACIAAAAzAAAAJAAAADcAAAAoAAAANgAAACQAAABIAAAAPAAAAEkAAAA4AAAARAAAAD8AAABNAAAAIwAAAC4AAAAtAAAAOQAAADsAAABKAAAATgAAACUAAAAnAAAANAAAADoAAAB/AAAAPgAAAEwAAAAsAAAAQQAAACoAAAA7AAAAPwAAAE4AAABPAAAAJwAAAC0AAAA5AAAAPAAAAEgAAABEAAAAUAAAACgAAAA3AAAALgAAAD0AAAA1AAAAMQAAACkAAABRAAAASwAAAEIAAAA+AAAAKwAAADoAAAAqAAAAUgAAAEAAAABMAAAAPwAAAH8AAAA4AAAALQAAAE8AAAA7AAAATQAAAEAAAAAvAAAAPgAAACsAAABUAAAARQAAAFIAAABBAAAAOgAAADUAAAAsAAAAVgAAAEwAAABLAAAAQgAAAEMAAABRAAAAVQAAADEAAAAwAAAAPQAAAEMAAABCAAAAMgAAADAAAABXAAAAVQAAAEYAAABEAAAAOAAAADwAAAAuAAAAWgAAAE0AAABQAAAARQAAADMAAABAAAAALwAAAFkAAABHAAAAVAAAAEYAAABDAAAANAAAADIAAABTAAAAVwAAAEoAAABHAAAAWQAAAEkAAABbAAAAMwAAAEUAAAA2AAAASAAAAH8AAABJAAAANwAAAFAAAAA8AAAAWAAAAEkAAABbAAAASAAAAFgAAAA2AAAARwAAADcAAABKAAAATgAAAFMAAABcAAAANAAAADkAAABGAAAASwAAAEEAAAA9AAAANQAAAF4AAABWAAAAUQAAAEwAAABWAAAAUgAAAGAAAAA6AAAAQQAAAD4AAABNAAAAPwAAAEQAAAA4AAAAXQAAAE8AAABaAAAATgAAAEoAAAA7AAAAOQAAAF8AAABcAAAATwAAAE8AAABOAAAAPwAAADsAAABdAAAAXwAAAE0AAABQAAAARAAAAEgAAAA8AAAAYwAAAFoAAABYAAAAUQAAAFUAAABeAAAAZQAAAD0AAABCAAAASwAAAFIAAABgAAAAVAAAAGIAAAA+AAAATAAAAEAAAABTAAAAfwAAAEoAAABGAAAAZAAAAFcAAABcAAAAVAAAAEUAAABSAAAAQAAAAGEAAABZAAAAYgAAAFUAAABXAAAAZQAAAGYAAABCAAAAQwAAAFEAAABWAAAATAAAAEsAAABBAAAAaAAAAGAAAABeAAAAVwAAAFMAAABmAAAAZAAAAEMAAABGAAAAVQAAAFgAAABIAAAAWwAAAEkAAABjAAAAUAAAAGkAAABZAAAAYQAAAFsAAABnAAAARQAAAFQAAABHAAAAWgAAAE0AAABQAAAARAAAAGoAAABdAAAAYwAAAFsAAABJAAAAWQAAAEcAAABpAAAAWAAAAGcAAABcAAAAUwAAAE4AAABKAAAAbAAAAGQAAABfAAAAXQAAAE8AAABaAAAATQAAAG0AAABfAAAAagAAAF4AAABWAAAAUQAAAEsAAABrAAAAaAAAAGUAAABfAAAAXAAAAE8AAABOAAAAbQAAAGwAAABdAAAAYAAAAGgAAABiAAAAbgAAAEwAAABWAAAAUgAAAGEAAAB/AAAAYgAAAFQAAABnAAAAWQAAAG8AAABiAAAAbgAAAGEAAABvAAAAUgAAAGAAAABUAAAAYwAAAFAAAABpAAAAWAAAAGoAAABaAAAAcQAAAGQAAABmAAAAUwAAAFcAAABsAAAAcgAAAFwAAABlAAAAZgAAAGsAAABwAAAAUQAAAFUAAABeAAAAZgAAAGUAAABXAAAAVQAAAHIAAABwAAAAZAAAAGcAAABbAAAAYQAAAFkAAAB0AAAAaQAAAG8AAABoAAAAawAAAG4AAABzAAAAVgAAAF4AAABgAAAAaQAAAFgAAABnAAAAWwAAAHEAAABjAAAAdAAAAGoAAABdAAAAYwAAAFoAAAB1AAAAbQAAAHEAAABrAAAAfwAAAGUAAABeAAAAcwAAAGgAAABwAAAAbAAAAGQAAABfAAAAXAAAAHYAAAByAAAAbQAAAG0AAABsAAAAXQAAAF8AAAB1AAAAdgAAAGoAAABuAAAAYgAAAGgAAABgAAAAdwAAAG8AAABzAAAAbwAAAGEAAABuAAAAYgAAAHQAAABnAAAAdwAAAHAAAABrAAAAZgAAAGUAAAB4AAAAcwAAAHIAAABxAAAAYwAAAHQAAABpAAAAdQAAAGoAAAB5AAAAcgAAAHAAAABkAAAAZgAAAHYAAAB4AAAAbAAAAHMAAABuAAAAawAAAGgAAAB4AAAAdwAAAHAAAAB0AAAAZwAAAHcAAABvAAAAcQAAAGkAAAB5AAAAdQAAAH8AAABtAAAAdgAAAHEAAAB5AAAAagAAAHYAAAB4AAAAbAAAAHIAAAB1AAAAeQAAAG0AAAB3AAAAbwAAAHMAAABuAAAAeQAAAHQAAAB4AAAAeAAAAHMAAAByAAAAcAAAAHkAAAB3AAAAdgAAAHkAAAB0AAAAeAAAAHcAAAB1AAAAcQAAAHYAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAACAAAABQAAAAEAAAAAAAAA/////wEAAAAAAAAAAwAAAAQAAAACAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAUAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAUAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAUAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAD//////////wEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAAAAAAAAAAABAAAAAgAAAAYAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAAAAAAAAAAAAQAAAAEAAAAFAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAAAAAAAAAAABAAAAAwAAAAcAAAAGAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADgAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAACAAAAAoAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAAAAAAAAAAAAQAAAAsAAAAPAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAIAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAAAAAAAAAAAAQAAAAwAAAAQAAAADAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAAAAAAAAAAABAAAACgAAABMAAAAIAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAEAAAANAAAAEQAAAA0AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAAAAAABAAAADgAAABIAAAAPAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAAAAAAAAQAAAP//////////EwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAASAAAAAAAAABgAAAAAAAAAIQAAAAAAAAAeAAAAAAAAACAAAAADAAAAMQAAAAEAAAAwAAAAAwAAADIAAAADAAAACAAAAAAAAAAFAAAABQAAAAoAAAAFAAAAFgAAAAAAAAAQAAAAAAAAABIAAAAAAAAAKQAAAAEAAAAhAAAAAAAAAB4AAAAAAAAABAAAAAAAAAAAAAAABQAAAAIAAAAFAAAADwAAAAEAAAAIAAAAAAAAAAUAAAAFAAAAHwAAAAEAAAAWAAAAAAAAABAAAAAAAAAAAgAAAAAAAAAGAAAAAAAAAA4AAAAAAAAACgAAAAAAAAALAAAAAAAAABEAAAADAAAAGAAAAAEAAAAXAAAAAwAAABkAAAADAAAAAAAAAAAAAAABAAAABQAAAAkAAAAFAAAABQAAAAAAAAACAAAAAAAAAAYAAAAAAAAAEgAAAAEAAAAKAAAAAAAAAAsAAAAAAAAABAAAAAEAAAADAAAABQAAAAcAAAAFAAAACAAAAAEAAAAAAAAAAAAAAAEAAAAFAAAAEAAAAAEAAAAFAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAVAAAAAAAAACYAAAAAAAAACQAAAAAAAAATAAAAAAAAACIAAAADAAAADgAAAAEAAAAUAAAAAwAAACQAAAADAAAAAwAAAAAAAAANAAAABQAAAB0AAAAFAAAAAQAAAAAAAAAHAAAAAAAAABUAAAAAAAAABgAAAAEAAAAJAAAAAAAAABMAAAAAAAAABAAAAAIAAAAMAAAABQAAABoAAAAFAAAAAAAAAAEAAAADAAAAAAAAAA0AAAAFAAAAAgAAAAEAAAABAAAAAAAAAAcAAAAAAAAAGgAAAAAAAAAqAAAAAAAAADoAAAAAAAAAHQAAAAAAAAArAAAAAAAAAD4AAAADAAAAJgAAAAEAAAAvAAAAAwAAAEAAAAADAAAADAAAAAAAAAAcAAAABQAAACwAAAAFAAAADQAAAAAAAAAaAAAAAAAAACoAAAAAAAAAFQAAAAEAAAAdAAAAAAAAACsAAAAAAAAABAAAAAMAAAAPAAAABQAAAB8AAAAFAAAAAwAAAAEAAAAMAAAAAAAAABwAAAAFAAAABwAAAAEAAAANAAAAAAAAABoAAAAAAAAAHwAAAAAAAAApAAAAAAAAADEAAAAAAAAALAAAAAAAAAA1AAAAAAAAAD0AAAADAAAAOgAAAAEAAABBAAAAAwAAAEsAAAADAAAADwAAAAAAAAAWAAAABQAAACEAAAAFAAAAHAAAAAAAAAAfAAAAAAAAACkAAAAAAAAAKgAAAAEAAAAsAAAAAAAAADUAAAAAAAAABAAAAAQAAAAIAAAABQAAABAAAAAFAAAADAAAAAEAAAAPAAAAAAAAABYAAAAFAAAAGgAAAAEAAAAcAAAAAAAAAB8AAAAAAAAAMgAAAAAAAAAwAAAAAAAAADEAAAADAAAAIAAAAAAAAAAeAAAAAwAAACEAAAADAAAAGAAAAAMAAAASAAAAAwAAABAAAAADAAAARgAAAAAAAABDAAAAAAAAAEIAAAADAAAANAAAAAMAAAAyAAAAAAAAADAAAAAAAAAAJQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAUwAAAAAAAABXAAAAAwAAAFUAAAADAAAASgAAAAMAAABGAAAAAAAAAEMAAAAAAAAAOQAAAAEAAAA0AAAAAwAAADIAAAAAAAAAGQAAAAAAAAAXAAAAAAAAABgAAAADAAAAEQAAAAAAAAALAAAAAwAAAAoAAAADAAAADgAAAAMAAAAGAAAAAwAAAAIAAAADAAAALQAAAAAAAAAnAAAAAAAAACUAAAADAAAAIwAAAAMAAAAZAAAAAAAAABcAAAAAAAAAGwAAAAMAAAARAAAAAAAAAAsAAAADAAAAPwAAAAAAAAA7AAAAAwAAADkAAAADAAAAOAAAAAMAAAAtAAAAAAAAACcAAAAAAAAALgAAAAMAAAAjAAAAAwAAABkAAAAAAAAAJAAAAAAAAAAUAAAAAAAAAA4AAAADAAAAIgAAAAAAAAATAAAAAwAAAAkAAAADAAAAJgAAAAMAAAAVAAAAAwAAAAcAAAADAAAANwAAAAAAAAAoAAAAAAAAABsAAAADAAAANgAAAAMAAAAkAAAAAAAAABQAAAAAAAAAMwAAAAMAAAAiAAAAAAAAABMAAAADAAAASAAAAAAAAAA8AAAAAwAAAC4AAAADAAAASQAAAAMAAAA3AAAAAAAAACgAAAAAAAAARwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAQAAAAAAAAAAvAAAAAAAAACYAAAADAAAAPgAAAAAAAAArAAAAAwAAAB0AAAADAAAAOgAAAAMAAAAqAAAAAwAAABoAAAADAAAAVAAAAAAAAABFAAAAAAAAADMAAAADAAAAUgAAAAMAAABAAAAAAAAAAC8AAAAAAAAATAAAAAMAAAA+AAAAAAAAACsAAAADAAAAYQAAAAAAAABZAAAAAwAAAEcAAAADAAAAYgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAYAAAAAMAAABSAAAAAwAAAEAAAAAAAAAASwAAAAAAAABBAAAAAAAAADoAAAADAAAAPQAAAAAAAAA1AAAAAwAAACwAAAADAAAAMQAAAAMAAAApAAAAAwAAAB8AAAADAAAAXgAAAAAAAABWAAAAAAAAAEwAAAADAAAAUQAAAAMAAABLAAAAAAAAAEEAAAAAAAAAQgAAAAMAAAA9AAAAAAAAADUAAAADAAAAawAAAAAAAABoAAAAAwAAAGAAAAADAAAAZQAAAAMAAABeAAAAAAAAAFYAAAAAAAAAVQAAAAMAAABRAAAAAwAAAEsAAAAAAAAAOQAAAAAAAAA7AAAAAAAAAD8AAAADAAAASgAAAAAAAABOAAAAAwAAAE8AAAADAAAAUwAAAAMAAABcAAAAAwAAAF8AAAADAAAAJQAAAAAAAAAnAAAAAwAAAC0AAAADAAAANAAAAAAAAAA5AAAAAAAAADsAAAAAAAAARgAAAAMAAABKAAAAAAAAAE4AAAADAAAAGAAAAAAAAAAXAAAAAwAAABkAAAADAAAAIAAAAAMAAAAlAAAAAAAAACcAAAADAAAAMgAAAAMAAAA0AAAAAAAAADkAAAAAAAAALgAAAAAAAAA8AAAAAAAAAEgAAAADAAAAOAAAAAAAAABEAAAAAwAAAFAAAAADAAAAPwAAAAMAAABNAAAAAwAAAFoAAAADAAAAGwAAAAAAAAAoAAAAAwAAADcAAAADAAAAIwAAAAAAAAAuAAAAAAAAADwAAAAAAAAALQAAAAMAAAA4AAAAAAAAAEQAAAADAAAADgAAAAAAAAAUAAAAAwAAACQAAAADAAAAEQAAAAMAAAAbAAAAAAAAACgAAAADAAAAGQAAAAMAAAAjAAAAAAAAAC4AAAAAAAAARwAAAAAAAABZAAAAAAAAAGEAAAADAAAASQAAAAAAAABbAAAAAwAAAGcAAAADAAAASAAAAAMAAABYAAAAAwAAAGkAAAADAAAAMwAAAAAAAABFAAAAAwAAAFQAAAADAAAANgAAAAAAAABHAAAAAAAAAFkAAAAAAAAANwAAAAMAAABJAAAAAAAAAFsAAAADAAAAJgAAAAAAAAAvAAAAAwAAAEAAAAADAAAAIgAAAAMAAAAzAAAAAAAAAEUAAAADAAAAJAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAYAAAAAAAAABoAAAAAAAAAGsAAAADAAAAYgAAAAAAAABuAAAAAwAAAHMAAAADAAAAYQAAAAMAAABvAAAAAwAAAHcAAAADAAAATAAAAAAAAABWAAAAAwAAAF4AAAADAAAAUgAAAAAAAABgAAAAAAAAAGgAAAAAAAAAVAAAAAMAAABiAAAAAAAAAG4AAAADAAAAOgAAAAAAAABBAAAAAwAAAEsAAAADAAAAPgAAAAMAAABMAAAAAAAAAFYAAAADAAAAQAAAAAMAAABSAAAAAAAAAGAAAAAAAAAAVQAAAAAAAABXAAAAAAAAAFMAAAADAAAAZQAAAAAAAABmAAAAAwAAAGQAAAADAAAAawAAAAMAAABwAAAAAwAAAHIAAAADAAAAQgAAAAAAAABDAAAAAwAAAEYAAAADAAAAUQAAAAAAAABVAAAAAAAAAFcAAAAAAAAAXgAAAAMAAABlAAAAAAAAAGYAAAADAAAAMQAAAAAAAAAwAAAAAwAAADIAAAADAAAAPQAAAAMAAABCAAAAAAAAAEMAAAADAAAASwAAAAMAAABRAAAAAAAAAFUAAAAAAAAAXwAAAAAAAABcAAAAAAAAAFMAAAAAAAAATwAAAAAAAABOAAAAAAAAAEoAAAADAAAAPwAAAAEAAAA7AAAAAwAAADkAAAADAAAAbQAAAAAAAABsAAAAAAAAAGQAAAAFAAAAXQAAAAEAAABfAAAAAAAAAFwAAAAAAAAATQAAAAEAAABPAAAAAAAAAE4AAAAAAAAAdQAAAAQAAAB2AAAABQAAAHIAAAAFAAAAagAAAAEAAABtAAAAAAAAAGwAAAAAAAAAWgAAAAEAAABdAAAAAQAAAF8AAAAAAAAAWgAAAAAAAABNAAAAAAAAAD8AAAAAAAAAUAAAAAAAAABEAAAAAAAAADgAAAADAAAASAAAAAEAAAA8AAAAAwAAAC4AAAADAAAAagAAAAAAAABdAAAAAAAAAE8AAAAFAAAAYwAAAAEAAABaAAAAAAAAAE0AAAAAAAAAWAAAAAEAAABQAAAAAAAAAEQAAAAAAAAAdQAAAAMAAABtAAAABQAAAF8AAAAFAAAAcQAAAAEAAABqAAAAAAAAAF0AAAAAAAAAaQAAAAEAAABjAAAAAQAAAFoAAAAAAAAAaQAAAAAAAABYAAAAAAAAAEgAAAAAAAAAZwAAAAAAAABbAAAAAAAAAEkAAAADAAAAYQAAAAEAAABZAAAAAwAAAEcAAAADAAAAcQAAAAAAAABjAAAAAAAAAFAAAAAFAAAAdAAAAAEAAABpAAAAAAAAAFgAAAAAAAAAbwAAAAEAAABnAAAAAAAAAFsAAAAAAAAAdQAAAAIAAABqAAAABQAAAFoAAAAFAAAAeQAAAAEAAABxAAAAAAAAAGMAAAAAAAAAdwAAAAEAAAB0AAAAAQAAAGkAAAAAAAAAdwAAAAAAAABvAAAAAAAAAGEAAAAAAAAAcwAAAAAAAABuAAAAAAAAAGIAAAADAAAAawAAAAEAAABoAAAAAwAAAGAAAAADAAAAeQAAAAAAAAB0AAAAAAAAAGcAAAAFAAAAeAAAAAEAAAB3AAAAAAAAAG8AAAAAAAAAcAAAAAEAAABzAAAAAAAAAG4AAAAAAAAAdQAAAAEAAABxAAAABQAAAGkAAAAFAAAAdgAAAAEAAAB5AAAAAAAAAHQAAAAAAAAAcgAAAAEAAAB4AAAAAQAAAHcAAAAAAAAAcgAAAAAAAABwAAAAAAAAAGsAAAAAAAAAZAAAAAAAAABmAAAAAAAAAGUAAAADAAAAUwAAAAEAAABXAAAAAwAAAFUAAAADAAAAdgAAAAAAAAB4AAAAAAAAAHMAAAAFAAAAbAAAAAEAAAByAAAAAAAAAHAAAAAAAAAAXAAAAAEAAABkAAAAAAAAAGYAAAAAAAAAdQAAAAAAAAB5AAAABQAAAHcAAAAFAAAAbQAAAAEAAAB2AAAAAAAAAHgAAAAAAAAAXwAAAAEAAABsAAAAAQAAAHIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGAAAAAgAAAAUAAAABAAAABAAAAAAAAAAAAAAABQAAAAMAAAABAAAABgAAAAQAAAACAAAAAAAAAH6iBfbytuk/Gq6akm/58z/Xrm0Liez0P5doSdOpSwRAWs602ULg8D/dT7Rcbo/1v1N1RQHFNOM/g9Snx7HW3L8HWsP8Q3jfP6VwOLosutk/9rjk1YQcxj+gnmKMsNn6P/HDeuPFY+M/YHwDjqKhB0Ci19/fCVrbP4UxKkDWOP6/pvljWa09tL9wi7wrQXjnv/Z6yLImkM2/3yTlOzY14D+m+WNZrT20PzwKVQnrQwNA9nrIsiaQzT/g40rFrRQFwPa45NWEHMa/kbslHEZq97/xw3rjxWPjv4cLC2SMBci/otff3wla27+rKF5oIAv0P1N1RQHFNOO/iDJPGyWHBUAHWsP8Q3jfvwQf/by16gXAfqIF9vK26b8XrO0Vh0r+v9eubQuJ7PS/BxLrA0ZZ479azrTZQuDwv1MK1EuItPw/yscgV9Z6FkAwHBR2WjQMQJNRzXsQ5vY/GlUHVJYKF0DONuFv2lMNQNCGZ28QJfk/0WUwoIL36D8ggDOMQuATQNqMOeAy/wZAWFYOYM+M2z/LWC4uH3oSQDE+LyTsMgRAkJzhRGWFGEDd4soovCQQQKqk0DJMEP8/rGmNdwOLBUAW2X/9xCbjP4hu3dcqJhNAzuYItRvdB0CgzW3zJW/sPxotm/Y2TxRAQAk9XmdDDEC1Kx9MKgT3P1M+NctcghZAFVqcLlb0C0Bgzd3sB2b2P77mZDPUWhZAFROHJpUGCEDAfma5CxXtPz1DWq/zYxRAmhYY5824F0DOuQKWSbAOQNCMqrvu3fs/L6DR22K2wT9nAAxPBU8RQGiN6mW43AFAZhu25b633D8c1YgmzowSQNM25BRKWARArGS08/lNxD+LFssHwmMRQLC5aNcxBgJABL9HT0WRF0CjCmJmOGEOQHsuaVzMP/s/TWJCaGGwBUCeu1PAPLzjP9nqN9DZOBNAKE4JcydbCkCGtbd1qjPzP8dgm9U8jhVAtPeKTkVwDkCeCLss5l37P401XMPLmBdAFd29VMVQDUBg0yA55h75Pz6odcYLCRdApBM4rBrkAkDyAVWgQxbRP4XDMnK20hFAymLlF7EmzD8GUgo9XBHlP3lbK7T9COc/k+OhPthhy7+YGEpnrOvCPzBFhLs15u4/epbqB6H4uz9IuuLF5svev6lzLKY31es/CaQ0envF5z8ZY0xlUADXv7zaz7HYEuI/CfbK1sn16T8uAQfWwxLWPzKn/YuFN94/5KdbC1AFu793fyCSnlfvPzK2y4doAMY/NRg5t1/X6b/shq4QJaHDP5yNIAKPOeI/vpn7BSE30r/X4YQrO6nrv78Ziv/Thto/DqJ1Y6+y5z9l51NaxFrlv8QlA65HOLS/86dxiEc96z+Hj0+LFjneP6LzBZ8LTc2/DaJ1Y6+y579l51NaxFrlP8QlA65HOLQ/8qdxiEc967+Jj0+LFjnev6LzBZ8LTc0/1qdbC1AFuz93fyCSnlfvvzK2y4doAMa/NRg5t1/X6T/vhq4QJaHDv5yNIAKPOeK/wJn7BSE30j/W4YQrO6nrP78Ziv/Thtq/CaQ0envF578XY0xlUADXP7zaz7HYEuK/CvbK1sn16b8rAQfWwxLWvzKn/YuFN96/zWLlF7EmzL8GUgo9XBHlv3lbK7T9COe/kOOhPthhyz+cGEpnrOvCvzBFhLs15u6/c5bqB6H4u79IuuLF5sveP6lzLKY31eu/AQAAAP////8HAAAA/////zEAAAD/////VwEAAP////9hCQAA/////6dBAAD/////kcsBAP/////3kAwA/////8H2VwAAAAAAAAAAAAAAAAACAAAA/////w4AAAD/////YgAAAP////+uAgAA/////8ISAAD/////ToMAAP////8ilwMA/////+4hGQD/////gu2vAAAAAAAAAAAAAAAAAAAAAAACAAAA//////////8BAAAAAwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////AgAAAP//////////AQAAAAAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD/////////////////////AQAAAP///////////////wIAAAD///////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP///////////////////////////////wIAAAD///////////////8BAAAA/////////////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAABAAAA//////////8CAAAA//////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAAAQAAAP//////////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAIAAAABAAAAAQAAAAIAAAACAAAAAAAAAAUAAAAFAAAAAAAAAAIAAAACAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAEAAAACAAAAAgAAAAIAAAAAAAAABQAAAAYAAAAAAAAAAgAAAAIAAAADAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAAAAAACAAAAAQAAAAMAAAACAAAAAgAAAAAAAAAFAAAABwAAAAAAAAACAAAAAgAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAAAAAAAIAAAABAAAABAAAAAIAAAACAAAAAAAAAAUAAAAIAAAAAAAAAAIAAAACAAAAAwAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAIAAAAAAAAAAgAAAAEAAAAAAAAAAgAAAAIAAAAAAAAABQAAAAkAAAAAAAAAAgAAAAIAAAADAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAIAAAAAAAAAAwAAAA4AAAACAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAgAAAAMAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAgAAAAAAAAADAAAACgAAAAIAAAAAAAAAAgAAAAMAAAABAAAAAAAAAAIAAAACAAAAAwAAAAcAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAACAAAAAAAAAAMAAAALAAAAAgAAAAAAAAACAAAAAwAAAAIAAAAAAAAAAgAAAAIAAAADAAAACAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAIAAAAAAAAAAwAAAAwAAAACAAAAAAAAAAIAAAADAAAAAwAAAAAAAAACAAAAAgAAAAMAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAACAAAAAgAAAAAAAAADAAAADQAAAAIAAAAAAAAAAgAAAAMAAAAEAAAAAAAAAAIAAAACAAAAAwAAAAoAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAACAAAAAAAAAAMAAAAGAAAAAgAAAAAAAAACAAAAAwAAAA8AAAAAAAAAAgAAAAIAAAADAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAIAAAAAAAAAAwAAAAcAAAACAAAAAAAAAAIAAAADAAAAEAAAAAAAAAACAAAAAgAAAAMAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAgAAAAAAAAADAAAACAAAAAIAAAAAAAAAAgAAAAMAAAARAAAAAAAAAAIAAAACAAAAAwAAAA0AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAACAAAAAAAAAAMAAAAJAAAAAgAAAAAAAAACAAAAAwAAABIAAAAAAAAAAgAAAAIAAAADAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAgAAAAIAAAAAAAAAAwAAAAUAAAACAAAAAAAAAAIAAAADAAAAEwAAAAAAAAACAAAAAgAAAAMAAAAPAAAAAAAAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAAIAAAABAAAAEwAAAAIAAAACAAAAAAAAAAUAAAAKAAAAAAAAAAIAAAACAAAAAwAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAIAAAAAAAAAAgAAAAEAAAAPAAAAAgAAAAIAAAAAAAAABQAAAAsAAAAAAAAAAgAAAAIAAAADAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAACAAAAAQAAABAAAAACAAAAAgAAAAAAAAAFAAAADAAAAAAAAAACAAAAAgAAAAMAAAASAAAAAAAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAIAAAABAAAAEQAAAAIAAAACAAAAAAAAAAUAAAANAAAAAAAAAAIAAAACAAAAAwAAABMAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAIAAAAAAAAAAgAAAAEAAAASAAAAAgAAAAIAAAAAAAAABQAAAA4AAAAAAAAAAgAAAAIAAAADAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAOgehWlKfUEEz1zLi+JsiQa2og3wcMfVAWCbHorc0yEDi+Yn/Y6mbQJ11/mfsnG9At6bnG4UQQkBvMCQWKqUUQJVmwwswmOc/3hVgVBL3uj//qqOEOdGOPw/WDN4gnGE/H3ANkCUgND+AA8btKgAHPwTXBqJVSdo+XfRQAqsKrj4fc+zLYbSPQklEmCZHv2FCUP+uDso1NEKYtPhwphUHQptxnyFXYdpB7CddZAMmrkGAt1AxSTqBQUibBVdTsFNBSuX3MV+AJkFocv82SLf5QAqmgj7AY81A23VDSEnLoEDGEJVSeDFzQDYrqvBk70VA8U157pcRGUBWfEF+ZKbsP7KBdLHZTpFAqKYk69AqekDbeGY41MdjQD8AZzHK501A1vcrrjubNkD5LnquvBYhQCbiRRD71QlAqt72EbOH8z8Eu+jL1YbdP4uaox/xUcY/abedg1XfsD+BsUdzJ4KZP5wE9YFySIM/rW1kAKMpbT+rZFthVRhWPy4PKlXIs0A/qMZLlwDnMEHByqEF0I0ZQQYSFD8lUQNBPpY+dFs07UAH8BZImBPWQN9RY0I0sMBA2T7kLfc6qUByFYvfhBKTQMq+0Mis1XxA0XQbeQXMZUBJJ5aEGXpQQP7/SY0a6ThAaMD92b/UIkAs8s8yqXoMQNIegOvCk/U/aOi7NZJP4D8AAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAD/////AAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA/////wAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAP////8AAAAABQAAAAAAAAAAAAAAAAAAAAAAAAD/////BQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAEAAQAAAQEAAAAAAAEAAAABAAAAAQABAAAAAAAAAAAAAAAAAAAAAAcAAAAHAAAAAQAAAAIAAAAEAAAAAwAAAAAAAAAAAAAABwAAAAMAAAABAAAAAgAAAAUAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAGAAAAAgAAAAMAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAwAAAAEAAAAFAAAABAAAAAAAAAAAAAAABwAAAAUAAAADAAAABAAAAAEAAAAAAAAAAgAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAGFsZ29zLmMAaDNOZWlnaGJvclJvdGF0aW9ucwBjb29yZGlqay5jAF91cEFwN0NoZWNrZWQAX3VwQXA3ckNoZWNrZWQAZGlyZWN0ZWRFZGdlLmMAZGlyZWN0ZWRFZGdlVG9Cb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0NlbGxCb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbY2VudGVySUpLLmZhY2VdW2ZhY2UyXSA9PSBLSQBfZmFjZUlqa1RvQ2VsbEJvdW5kYXJ5AGgzSW5kZXguYwBjb21wYWN0Q2VsbHMAbGF0TG5nVG9DZWxsAGNlbGxUb0NoaWxkUG9zAHZhbGlkYXRlQ2hpbGRQb3MAbGF0TG5nLmMAY2VsbEFyZWFSYWRzMgBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGNlbGxUb0xvY2FsSWprAGJhc2VDZWxsICE9IG9yaWdpbkJhc2VDZWxsACEob3JpZ2luT25QZW50ICYmIGluZGV4T25QZW50KQBiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvQ2VsbAAhX2lzQmFzZUNlbGxQZW50YWdvbihiYXNlQ2VsbCkAYmFzZUNlbGxSb3RhdGlvbnMgPj0gMABncmlkUGF0aENlbGxzADAAdmVydGV4LmMAY2VsbFRvVmVydGV4AGdyYXBoLT5idWNrZXRzICE9IE5VTEwAdmVydGV4R3JhcGguYwBpbml0VmVydGV4R3JhcGgAbm9kZSAhPSBOVUxMAGFkZFZlcnRleE5vZGU=";function Y(A){return A}function z(A){return A.replace(/\b__Z[\w\d_]+/g,(function(A){return A===A?A:A+" ["+A+"]"}))}function Z(){var A=new Error;if(!A.stack){try{throw new Error(0)}catch(e){A=e}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function j(){return g.length}function H(A){try{var e=new ArrayBuffer(A);if(e.byteLength!=A)return;return new Int8Array(e).set(g),X(e),E(e),1}catch(r){}}var $="function"===typeof atob?atob:function(A){var e,r,t,n,i,f,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="",u=0;A=A.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=a.indexOf(A.charAt(u++))<<2|(n=a.indexOf(A.charAt(u++)))>>4,r=(15&n)<<4|(i=a.indexOf(A.charAt(u++)))>>2,t=(3&i)<<6|(f=a.indexOf(A.charAt(u++))),o+=String.fromCharCode(e),64!==i&&(o+=String.fromCharCode(r)),64!==f&&(o+=String.fromCharCode(t))}while(u=0){if((0|r)>13780509){if(0|(a=0|ee(15,o)))break;o=0|n[(u=o)>>2],u=0|n[u+4>>2]}else c=0|Fe(0|r,0|(a=((0|r)<0)<<31>>31),3,0),u=0|k(),a=0|Ie(0|r,0|a,1,0),a=0|Ie(0|(a=0|Fe(0|c,0|u,0|a,0|k())),0|k(),1,0),u=0|k(),n[o>>2]=a,n[o+4>>2]=u,o=a;if($e(0|t,0,o<<3|0),0|i){$e(0|i,0,o<<2|0),a=0|O(A,e,r,t,i,o,u,0);break}(a=0|Pe(o,4))?(c=0|O(A,e,r,t,a,o,u,0),Qe(a),a=c):a=13}else a=2}while(0);return I=f,0|(c=a)}function T(A,e,r,t,i){A|=0,e|=0,r|=0,t|=0,i|=0;var f,a,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0;if(a=I,I=I+16|0,g=a+8|0,n[(h=f=a)>>2]=A,n[h+4>>2]=e,(0|r)<0)return I=a,0|(g=2);if(n[(o=t)>>2]=A,n[o+4>>2]=e,(o=0!=(0|i))&&(n[i>>2]=0),0|FA(A,e))return I=a,0|(g=9);n[g>>2]=0;A:do{if((0|r)>=1)if(o)for(d=1,l=0,b=0,h=1,o=A;;){if(!(l|b)){if(0|(o=0|F(o,e,4,g,f)))break A;if(0|FA(o=0|n[(e=f)>>2],e=0|n[e+4>>2])){o=9;break A}}if(0|(o=0|F(o,e,0|n[22384+(b<<2)>>2],g,f)))break A;if(o=0|n[(e=f)>>2],e=0|n[e+4>>2],n[(A=t+(d<<3)|0)>>2]=o,n[A+4>>2]=e,n[i+(d<<2)>>2]=h,u=(0|(A=l+1|0))==(0|h),s=6==(0|(c=b+1|0)),0|FA(o,e)){o=9;break A}if((0|(h=h+(s&u&1)|0))>(0|r)){o=0;break}d=d+1|0,l=u?0:A,b=u?s?0:c:b}else for(d=1,l=0,b=0,h=1,o=A;;){if(!(l|b)){if(0|(o=0|F(o,e,4,g,f)))break A;if(0|FA(o=0|n[(e=f)>>2],e=0|n[e+4>>2])){o=9;break A}}if(0|(o=0|F(o,e,0|n[22384+(b<<2)>>2],g,f)))break A;if(o=0|n[(e=f)>>2],e=0|n[e+4>>2],n[(A=t+(d<<3)|0)>>2]=o,n[A+4>>2]=e,u=(0|(A=l+1|0))==(0|h),s=6==(0|(c=b+1|0)),0|FA(o,e)){o=9;break A}if((0|(h=h+(s&u&1)|0))>(0|r)){o=0;break}d=d+1|0,l=u?0:A,b=u?s?0:c:b}else o=0}while(0);return I=a,0|(g=o)}function O(A,e,r,t,i,f,a,o){r|=0,t|=0,i|=0,o|=0;var u,c,s,l=0,d=0,b=0,h=0,g=0,v=0,p=0;if(s=I,I=I+16|0,u=s+8|0,c=s,l=0|Le(0|(A|=0),0|(e|=0),0|(f|=0),0|(a|=0)),b=0|k(),!(0==(0|(p=0|n[(v=h=t+(l<<3)|0)>>2]))&0==(0|(v=0|n[v+4>>2]))|(d=(0|p)==(0|A)&(0|v)==(0|e))))do{l=0|Ge(0|(l=0|Ie(0|l,0|b,1,0)),0|k(),0|f,0|a),b=0|k(),d=(0|(v=0|n[(p=h=t+(l<<3)|0)>>2]))==(0|A)&(0|(p=0|n[p+4>>2]))==(0|e)}while(!(0==(0|v)&0==(0|p)|d));if(l=i+(l<<2)|0,d&&(0|n[l>>2])<=(0|o))return I=s,0|(p=0);if(n[(p=h)>>2]=A,n[p+4>>2]=e,n[l>>2]=o,(0|o)>=(0|r))return I=s,0|(p=0);switch(d=o+1|0,n[u>>2]=0,0|(l=0|F(A,e,2,u,c))){case 9:g=9;break;case 0:(l=0|O(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d))||(g=9)}A:do{if(9==(0|g)){switch(n[u>>2]=0,0|(l=0|F(A,e,3,u,c))){case 9:break;case 0:if(0|(l=0|O(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|F(A,e,1,u,c))){case 9:break;case 0:if(0|(l=0|O(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|F(A,e,5,u,c))){case 9:break;case 0:if(0|(l=0|O(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|F(A,e,4,u,c))){case 9:break;case 0:if(0|(l=0|O(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|F(A,e,6,u,c))){case 9:break;case 0:if(0|(l=0|O(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}return I=s,0|(p=0)}}while(0);return I=s,0|(p=l)}function F(A,e,r,t,i){A|=0,e|=0,i|=0;var f,a,o=0,u=0,c=0,s=0,l=0,d=0,b=0;if((r|=0)>>>0>6)return 0|(i=1);if(l=(0|n[(t|=0)>>2])%6|0,n[t>>2]=l,(0|l)>0){o=0;do{r=0|bA(r),o=o+1|0}while((0|o)<(0|n[t>>2]))}if(l=0|Ne(0|A,0|e,45),k(),(a=127&l)>>>0>121)return 0|(i=5);f=0|GA(A,e),o=0|Ne(0|A,0|e,52),k(),o&=15;A:do{if(o){for(;;){if(c=0|Ne(0|A,0|e,0|(u=3*(15-o|0)|0)),k(),7==(0|(c&=7))){e=5;break}if(b=0==(0|zA(o)),o=o+-1|0,d=0|Ye(7,0,0|u),e&=~(0|k()),A=0|Ye(0|n[(b?432:16)+(28*c|0)+(r<<2)>>2],0,0|u)|A&~d,e|=u=0|k(),!(r=0|n[(b?640:224)+(28*c|0)+(r<<2)>>2])){r=0;break A}if(!o){s=8;break A}}return 0|e}s=8}while(0);8==(0|s)&&(A|=0|Ye(0|(b=0|n[848+(28*a|0)+(r<<2)>>2]),0,45),e=0|k()|-1040385&e,r=0|n[4272+(28*a|0)+(r<<2)>>2],127==(127&b|0)&&(b=0|Ye(0|n[848+(28*a|0)+20>>2],0,45),e=0|k()|-1040385&e,r=0|n[4272+(28*a|0)+20>>2],A=0|UA(b|A,e),e=0|k(),n[t>>2]=1+(0|n[t>>2]))),c=0|Ne(0|A,0|e,45),k(),c&=127;A:do{if(0|U(c)){e:do{if(1==(0|GA(A,e))){if((0|a)!=(0|c)){if(0|Z(c,0|n[7696+(28*a|0)>>2])){A=0|YA(A,e),u=1,e=0|k();break}x(23313,22416,436,22424)}switch(0|f){case 3:A=0|UA(A,e),e=0|k(),n[t>>2]=1+(0|n[t>>2]),u=0;break e;case 5:A=0|YA(A,e),e=0|k(),n[t>>2]=5+(0|n[t>>2]),u=0;break e;case 0:return 0|(b=9);default:return 0|(b=1)}}else u=0}while(0);if((0|r)>0){o=0;do{A=0|LA(A,e),e=0|k(),o=o+1|0}while((0|o)!=(0|r))}if((0|a)!=(0|c)){if(!(0|N(c))){if(0!=(0|u)|5!=(0|GA(A,e)))break;n[t>>2]=1+(0|n[t>>2]);break}switch(127&l){case 8:case 118:break A}3!=(0|GA(A,e))&&(n[t>>2]=1+(0|n[t>>2]))}}else if((0|r)>0){o=0;do{A=0|UA(A,e),e=0|k(),o=o+1|0}while((0|o)!=(0|r))}}while(0);return n[t>>2]=((0|n[t>>2])+r|0)%6|0,n[(b=i)>>2]=A,n[b+4>>2]=e,0|(b=0)}function G(A,e,r,t){r|=0,t|=0;var i,f,a,o=0,u=0;for(a=I,I=I+16|0,i=a,f=a+8|0,o=(o=0==(0|FA(A|=0,e|=0)))?1:2;;){if(n[f>>2]=0,0==(0|F(A,e,o,f,i))&((0|n[(u=i)>>2])==(0|r)?(0|n[u+4>>2])==(0|t):0)){A=4;break}if((o=o+1|0)>>>0>=7){o=7,A=4;break}}return 4==(0|A)?(I=a,0|o):0}function L(A,e,r,t,f,a,o){e|=0,r|=0,t|=0,f|=0,a|=0,o|=0;var u,c,s,l,d,b,h,g,v,p,w=0,y=0,_=0,m=0,E=0,B=0,x=0,D=0,M=0,C=0,Q=0,P=0,S=0,R=0,T=0,O=0,F=0,G=0,L=0;if(p=I,I=I+64|0,h=p+48|0,g=p+32|0,v=p+24|0,u=p+8|0,c=p,(0|(y=0|n[(A|=0)>>2]))<=0)return I=p,0|(T=0);for(s=A+4|0,l=h+8|0,d=g+8|0,b=u+8|0,w=0,S=0;;){P=(_=0|n[s>>2])+(S<<4)|0,n[h>>2]=n[P>>2],n[h+4>>2]=n[P+4>>2],n[h+8>>2]=n[P+8>>2],n[h+12>>2]=n[P+12>>2],(0|S)==(y+-1|0)?(n[g>>2]=n[_>>2],n[g+4>>2]=n[_+4>>2],n[g+8>>2]=n[_+8>>2],n[g+12>>2]=n[_+12>>2]):(P=_+(S+1<<4)|0,n[g>>2]=n[P>>2],n[g+4>>2]=n[P+4>>2],n[g+8>>2]=n[P+8>>2],n[g+12>>2]=n[P+12>>2]),y=0|K(h,g,t,v);A:do{if(y)_=0,w=y;else if(y=0|n[(_=v)>>2],(0|(_=0|n[_+4>>2]))>0|0==(0|_)&y>>>0>0){Q=0,P=0;e:for(;;){if(L=+i[h>>3],G=+((C=0|Se(0|y,0|_,0|Q,0|P))>>>0)+4294967296*+(0|k()),O=+(y>>>0)+4294967296*+(0|_),F=+(Q>>>0)+4294967296*+(0|P),i[u>>3]=L*G/O+ +i[g>>3]*F/O,i[b>>3]=+i[l>>3]*G/O+ +i[d>>3]*F/O,0|(y=0|ZA(u,t,c))){w=y;break}B=0|Le(0|(M=0|n[(C=c)>>2]),0|(C=0|n[C+4>>2]),0|e,0|r),m=0|k(),_=0|n[(E=y=o+(B<<3)|0)>>2],E=0|n[E+4>>2];r:do{if(0==(0|_)&0==(0|E))R=y,T=16;else for(x=0,D=0;;){if((0|x)>(0|r)|(0|x)==(0|r)&D>>>0>e>>>0){w=1;break e}if((0|_)==(0|M)&(0|E)==(0|C))break r;if(B=0|Ge(0|(y=0|Ie(0|B,0|m,1,0)),0|k(),0|e,0|r),m=0|k(),D=0|Ie(0|D,0|x,1,0),x=0|k(),0==(0|(_=0|n[(E=y=o+(B<<3)|0)>>2]))&0==(0|(E=0|n[E+4>>2]))){R=y,T=16;break}}}while(0);if(16!=(0|T)||(T=0,0==(0|M)&0==(0|C))||(n[(D=R)>>2]=M,n[D+4>>2]=C,D=a+(n[f>>2]<<3)|0,n[D>>2]=M,n[D+4>>2]=C,D=0|Ie(0|n[(D=f)>>2],0|n[D+4>>2],1,0),M=0|k(),n[(C=f)>>2]=D,n[C+4>>2]=M),Q=0|Ie(0|Q,0|P,1,0),P=0|k(),y=0|n[(_=v)>>2],!((0|(_=0|n[_+4>>2]))>(0|P)|(0|_)==(0|P)&y>>>0>Q>>>0)){_=1;break A}}_=0}else _=1}while(0);if(S=S+1|0,!_){T=21;break}if((0|S)>=(0|(y=0|n[A>>2]))){w=0,T=21;break}}return 21==(0|T)?(I=p,0|w):0}function U(A){return(A|=0)>>>0>121?0|(A=0):0|(A=0|n[7696+(28*A|0)+16>>2])}function N(A){return 4==(0|(A|=0))|117==(0|A)|0}function Y(A){return 0|n[11120+(216*(0|n[(A|=0)>>2])|0)+(72*(0|n[A+4>>2])|0)+(24*(0|n[A+8>>2])|0)+(n[A+12>>2]<<3)>>2]}function z(A){return 0|n[11120+(216*(0|n[(A|=0)>>2])|0)+(72*(0|n[A+4>>2])|0)+(24*(0|n[A+8>>2])|0)+(n[A+12>>2]<<3)+4>>2]}function Z(A,e){return e|=0,(0|n[7696+(28*(A|=0)|0)+20>>2])==(0|e)?0|(e=1):0|(e=(0|n[7696+(28*A|0)+24>>2])==(0|e))}function j(A,e){return 0|n[848+(28*(A|=0)|0)+((e|=0)<<2)>>2]}function H(A,e){return e|=0,(0|n[848+(28*(A|=0)|0)>>2])==(0|e)?0|(e=0):(0|n[848+(28*A|0)+4>>2])==(0|e)?0|(e=1):(0|n[848+(28*A|0)+8>>2])==(0|e)?0|(e=2):(0|n[848+(28*A|0)+12>>2])==(0|e)?0|(e=3):(0|n[848+(28*A|0)+16>>2])==(0|e)?0|(e=4):(0|n[848+(28*A|0)+20>>2])==(0|e)?0|(e=5):0|((0|n[848+(28*A|0)+24>>2])==(0|e)?6:7)}function $(A){return+i[(A|=0)+16>>3]<+i[A+24>>3]|0}function V(A,e){A|=0;var r,t,n=0;return(n=+i[(e|=0)>>3])>=+i[A+8>>3]&&n<=+i[A>>3]?(r=+i[A+16>>3],n=+i[A+24>>3],e=(t=+i[e+8>>3])>=n,A=t<=r&1,r>2]=0,h=h+4|0}while((0|h)<(0|g));return 0|(e=0|WA(e,v))?(I=d,0|(m=e)):($A(v=0|n[(g=v)>>2],g=0|n[g+4>>2],l),VA(v,g,p),s=+Ae(l,p+8|0),i[l>>3]=+i[A>>3],i[(g=l+8|0)>>3]=+i[A+16>>3],i[p>>3]=+i[A+8>>3],i[(v=p+8|0)>>3]=+i[A+24>>3],a=+Ae(l,p),E=+i[g>>3]-+i[v>>3],c=+u(+E),b=+i[l>>3]-+i[p>>3],t=+u(+b),0==E|0==b||(E=+ze(+c,+t),E=+w(+a*a/+Ze(+E/+Ze(+c,+t),3)/(s*(2.59807621135*s)*.8)),i[f>>3]=E,y=~~E>>>0,m=+u(E)>=1?E>0?~~+_(+o(E/4294967296),4294967295)>>>0:~~+w((E-+(~~E>>>0))/4294967296)>>>0:0,2146435072==(2146435072&n[f+4>>2]|0))?e=1:(p=0==(0|y)&0==(0|m),n[(e=r)>>2]=p?1:y,n[e+4>>2]=p?0:m,e=0),I=d,0|(m=e))}function K(A,e,r,t){A|=0,e|=0,r|=0,t|=0;var a,c,s,l,d=0,b=0,h=0;l=I,I=I+288|0,c=l+264|0,s=l+96|0,a=(d=b=l)+96|0;do{n[d>>2]=0,d=d+4|0}while((0|d)<(0|a));return 0|(r=0|WA(r,b))?(I=l,0|(t=r)):($A(d=0|n[(r=b)>>2],r=0|n[r+4>>2],c),VA(d,r,s),h=+Ae(c,s+8|0),h=+w(+ +Ae(A,e)/(2*h)),i[f>>3]=h,r=~~h>>>0,d=+u(h)>=1?h>0?~~+_(+o(h/4294967296),4294967295)>>>0:~~+w((h-+(~~h>>>0))/4294967296)>>>0:0,2146435072==(2146435072&n[f+4>>2]|0)?(I=l,0|(t=1)):(b=0==(0|r)&0==(0|d),n[t>>2]=b?1:r,n[t+4>>2]=b?0:d,I=l,0|(t=0)))}function J(A,e,r,t){e|=0,r|=0,t|=0,n[(A|=0)>>2]=e,n[A+4>>2]=r,n[A+8>>2]=t}function X(A,e){A|=0;var r,t,f,a,o=0,c=0,s=0,l=0,d=0,b=0,h=0;n[(a=(e|=0)+8|0)>>2]=0,t=+i[A>>3],l=+u(+t),f=+i[A+8>>3],l+=.5*(d=+u(+f)/.8660254037844386),l-=+(0|(o=~~l)),d-=+(0|(A=~~d));do{if(l<.5){if(l<.3333333333333333){if(n[e>>2]=o,d<.5*(l+1)){n[e+4>>2]=A;break}A=A+1|0,n[e+4>>2]=A;break}if(A=(1&!(d<(h=1-l)))+A|0,n[e+4>>2]=A,h<=d&d<2*l){o=o+1|0,n[e>>2]=o;break}n[e>>2]=o;break}if(!(l<.6666666666666666)){if(o=o+1|0,n[e>>2]=o,d<.5*l){n[e+4>>2]=A;break}A=A+1|0,n[e+4>>2]=A;break}if(d<1-l){if(n[e+4>>2]=A,2*l-1>2]=o;break}}else A=A+1|0,n[e+4>>2]=A;o=o+1|0,n[e>>2]=o}while(0);do{if(t<0){if(1&A){o=~~(+(0|o)-(2*(+((b=0|Se(0|o,((0|o)<0)<<31>>31|0,0|(b=(A+1|0)/2|0),((0|b)<0)<<31>>31|0))>>>0)+4294967296*+(0|k()))+1)),n[e>>2]=o;break}o=~~(+(0|o)-2*(+((b=0|Se(0|o,((0|o)<0)<<31>>31|0,0|(b=(0|A)/2|0),((0|b)<0)<<31>>31|0))>>>0)+4294967296*+(0|k()))),n[e>>2]=o;break}}while(0);b=e+4|0,f<0&&(o=o-((1|A<<1)/2|0)|0,n[e>>2]=o,A=0-A|0,n[b>>2]=A),c=A-o|0,(0|o)<0?(s=0-o|0,n[b>>2]=c,n[a>>2]=s,n[e>>2]=0,A=c,o=0):s=0,(0|A)<0&&(o=o-A|0,n[e>>2]=o,s=s-A|0,n[a>>2]=s,n[b>>2]=0,A=0),r=o-s|0,c=A-s|0,(0|s)<0&&(n[e>>2]=r,n[b>>2]=c,n[a>>2]=0,A=c,o=r,s=0),(0|(c=(0|s)<(0|(c=(0|A)<(0|o)?A:o))?s:c))<=0||(n[e>>2]=o-c,n[b>>2]=A-c,n[a>>2]=s-c)}function q(A){var e,r=0,t=0,i=0,f=0,a=0;r=0|n[(A|=0)>>2],t=0|n[(e=A+4|0)>>2],(0|r)<0&&(t=t-r|0,n[e>>2]=t,n[(a=A+8|0)>>2]=(0|n[a>>2])-r,n[A>>2]=0,r=0),(0|t)<0?(r=r-t|0,n[A>>2]=r,f=(0|n[(a=A+8|0)>>2])-t|0,n[a>>2]=f,n[e>>2]=0,t=0):(a=f=A+8|0,f=0|n[f>>2]),(0|f)<0&&(r=r-f|0,n[A>>2]=r,t=t-f|0,n[e>>2]=t,n[a>>2]=0,f=0),(0|(i=(0|f)<(0|(i=(0|t)<(0|r)?t:r))?f:i))<=0||(n[A>>2]=r-i,n[e>>2]=t-i,n[a>>2]=f-i)}function AA(A,e){e|=0;var r,t;t=0|n[(A|=0)+8>>2],r=+((0|n[A+4>>2])-t|0),i[e>>3]=+((0|n[A>>2])-t|0)-.5*r,i[e+8>>3]=.8660254037844386*r}function eA(A,e,r){A|=0,e|=0,n[(r|=0)>>2]=(0|n[e>>2])+(0|n[A>>2]),n[r+4>>2]=(0|n[e+4>>2])+(0|n[A+4>>2]),n[r+8>>2]=(0|n[e+8>>2])+(0|n[A+8>>2])}function rA(A,e,r){A|=0,e|=0,n[(r|=0)>>2]=(0|n[A>>2])-(0|n[e>>2]),n[r+4>>2]=(0|n[A+4>>2])-(0|n[e+4>>2]),n[r+8>>2]=(0|n[A+8>>2])-(0|n[e+8>>2])}function tA(A,e){e|=0;var r,t=0;t=0|y(0|n[(A|=0)>>2],e),n[A>>2]=t,r=0|y(0|n[(t=A+4|0)>>2],e),n[t>>2]=r,e=0|y(0|n[(A=A+8|0)>>2],e),n[A>>2]=e}function nA(A){var e,r,t=0,i=0,f=0,a=0,o=0;o=(0|(r=0|n[(A|=0)>>2]))<0,A=(A=(i=(0|(a=((e=(0|(f=(0|n[A+4>>2])-(o?r:0)|0))<0)?0-f|0:0)+((0|n[A+8>>2])-(o?r:0))|0))<0)?0:a)-((f=(0|(i=(0|A)<(0|(i=(0|(t=(e?0:f)-(i?a:0)|0))<(0|(a=(o?0:r)-(e?f:0)-(i?a:0)|0))?t:a))?A:i))>0)?i:0)|0,t=t-(f?i:0)|0;A:do{switch(a-(f?i:0)|0){case 0:switch(0|t){case 0:return 0|(o=0==(0|A)?0:1==(0|A)?1:7);case 1:return 0|(o=0==(0|A)?2:1==(0|A)?3:7);default:break A}case 1:switch(0|t){case 0:return 0|(o=0==(0|A)?4:1==(0|A)?5:7);case 1:if(A)break A;return 0|(A=6);default:break A}}}while(0);return 0|(o=7)}function iA(A){var e,r=0,t=0,i=0,f=0,a=0,o=0;f=0|n[(e=(A|=0)+8|0)>>2],a=(0|n[A>>2])-f|0,f=(0|n[(o=A+4|0)>>2])-f|0;do{if(a>>>0>715827881|f>>>0>715827881){if(t=(0|a)>0){if((2147483647-a|0)<(0|a))return 0|(o=1);if((2147483647-(a<<1)|0)<(0|a))return 0|(o=1)}else{if((-2147483648-a|0)>(0|a))return 0|(o=1);if((-2147483648-(a<<1)|0)>(0|a))return 0|(o=1)}if(r=3*a|0,(0|f)>0){if((2147483647-f|0)<(0|f))return 0|(o=1)}else if((-2147483648-f|0)>(0|f))return 0|(o=1);if(i=f<<1,(0|a)>-1){if((-2147483648|r|0)>=(0|f))return 0|(o=1)}else if((-2147483648^r|0)<(0|f))return 0|(o=1);if(t){if(!((2147483647-a|0)<(0|i))){t=i;break}return 0|(r=1)}if(!((-2147483648-a|0)>(0|i))){t=i;break}return 0|(r=1)}t=f<<1,r=3*a|0}while(0);i=0|Me(+(r-f|0)/7),n[A>>2]=i,f=0|Me(+(t+a|0)/7),n[o>>2]=f,n[e>>2]=0,r=(t=(0|f)<(0|i))?i:f,t=t?f:i;do{if((0|t)<0){if((0|r)>0){if((-2147483648|r|0)<(0|t)&-2147483648!=(0|t)&(2147483647-r|0)>=(0|t))break;x(23313,22444,355,22455)}if(-2147483648==(0|t)|(-2147483648-r|0)>(0|t)&&x(23313,22444,355,22455),(0|r)>-1){if((-2147483648|r|0)<(0|t))break;x(23313,22444,355,22455)}else{if((-2147483648^r|0)>=(0|t))break;x(23313,22444,355,22455)}}}while(0);return r=f-i|0,(0|i)<0?(t=0-i|0,n[o>>2]=r,n[e>>2]=t,n[A>>2]=0,i=0):(r=f,t=0),(0|r)<0&&(i=i-r|0,n[A>>2]=i,t=t-r|0,n[e>>2]=t,n[o>>2]=0,r=0),a=i-t|0,f=r-t|0,(0|t)<0?(n[A>>2]=a,n[o>>2]=f,n[e>>2]=0,r=f,f=a,t=0):f=i,(0|(i=(0|t)<(0|(i=(0|r)<(0|f)?r:f))?t:i))<=0||(n[A>>2]=f-i,n[o>>2]=r-i,n[e>>2]=t-i),0|(o=0)}function fA(A){var e,r=0,t=0,i=0,f=0,a=0,o=0;f=0|n[(e=(A|=0)+8|0)>>2],a=(0|n[A>>2])-f|0,f=(0|n[(o=A+4|0)>>2])-f|0;do{if(a>>>0>715827881|f>>>0>715827881){if(t=(0|a)>0){if((2147483647-a|0)<(0|a))return 0|(o=1)}else if((-2147483648-a|0)>(0|a))return 0|(o=1);if(r=a<<1,(0|f)>0){if((2147483647-f|0)<(0|f))return 0|(o=1);if((2147483647-(f<<1)|0)<(0|f))return 0|(o=1)}else{if((-2147483648-f|0)>(0|f))return 0|(o=1);if((-2147483648-(f<<1)|0)>(0|f))return 0|(o=1)}if(i=3*f|0,t){if((2147483647-r|0)<(0|f))return 0|(o=1)}else if((-2147483648-r|0)>(0|f))return 0|(o=1);if((0|f)>-1){if((-2147483648|i|0)<(0|a)){t=i;break}return 0|(r=1)}if(!((-2147483648^i|0)<(0|a))){t=i;break}return 0|(r=1)}t=3*f|0,r=a<<1}while(0);i=0|Me(+(r+f|0)/7),n[A>>2]=i,f=0|Me(+(t-a|0)/7),n[o>>2]=f,n[e>>2]=0,r=(t=(0|f)<(0|i))?i:f,t=t?f:i;do{if((0|t)<0){if((0|r)>0){if((-2147483648|r|0)<(0|t)&-2147483648!=(0|t)&(2147483647-r|0)>=(0|t))break;x(23313,22444,404,22469)}if(-2147483648==(0|t)|(-2147483648-r|0)>(0|t)&&x(23313,22444,404,22469),(0|r)>-1){if((-2147483648|r|0)<(0|t))break;x(23313,22444,404,22469)}else{if((-2147483648^r|0)>=(0|t))break;x(23313,22444,404,22469)}}}while(0);return r=f-i|0,(0|i)<0?(t=0-i|0,n[o>>2]=r,n[e>>2]=t,n[A>>2]=0,i=0):(r=f,t=0),(0|r)<0&&(i=i-r|0,n[A>>2]=i,t=t-r|0,n[e>>2]=t,n[o>>2]=0,r=0),a=i-t|0,f=r-t|0,(0|t)<0?(n[A>>2]=a,n[o>>2]=f,n[e>>2]=0,r=f,f=a,t=0):f=i,(0|(i=(0|t)<(0|(i=(0|r)<(0|f)?r:f))?t:i))<=0||(n[A>>2]=f-i,n[o>>2]=r-i,n[e>>2]=t-i),0|(o=0)}function aA(A){var e,r,t=0,i=0,f=0,a=0,o=0;i=0|n[(e=(A|=0)+8|0)>>2],f=0|Me(+((3*(t=(0|n[A>>2])-i|0)|0)-(i=(0|n[(r=A+4|0)>>2])-i|0)|0)/7),n[A>>2]=f,t=0|Me(+((i<<1)+t|0)/7),n[r>>2]=t,n[e>>2]=0,i=t-f|0,(0|f)<0?(o=0-f|0,n[r>>2]=i,n[e>>2]=o,n[A>>2]=0,t=i,f=0,i=o):i=0,(0|t)<0&&(f=f-t|0,n[A>>2]=f,i=i-t|0,n[e>>2]=i,n[r>>2]=0,t=0),o=f-i|0,a=t-i|0,(0|i)<0?(n[A>>2]=o,n[r>>2]=a,n[e>>2]=0,t=a,a=o,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|t)<(0|a)?t:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=t-f,n[e>>2]=i-f)}function oA(A){var e,r,t=0,i=0,f=0,a=0,o=0;i=0|n[(e=(A|=0)+8|0)>>2],f=0|Me(+(((t=(0|n[A>>2])-i|0)<<1)+(i=(0|n[(r=A+4|0)>>2])-i|0)|0)/7),n[A>>2]=f,t=0|Me(+((3*i|0)-t|0)/7),n[r>>2]=t,n[e>>2]=0,i=t-f|0,(0|f)<0?(o=0-f|0,n[r>>2]=i,n[e>>2]=o,n[A>>2]=0,t=i,f=0,i=o):i=0,(0|t)<0&&(f=f-t|0,n[A>>2]=f,i=i-t|0,n[e>>2]=i,n[r>>2]=0,t=0),o=f-i|0,a=t-i|0,(0|i)<0?(n[A>>2]=o,n[r>>2]=a,n[e>>2]=0,t=a,a=o,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|t)<(0|a)?t:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=t-f,n[e>>2]=i-f)}function uA(A){var e,r,t,i=0,f=0,a=0,o=0;i=0|n[(A|=0)>>2],f=0|n[(r=A+4|0)>>2],a=0|n[(t=A+8|0)>>2],o=f+(3*i|0)|0,n[A>>2]=o,f=a+(3*f|0)|0,n[r>>2]=f,i=(3*a|0)+i|0,n[t>>2]=i,a=f-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=a,n[t>>2]=i,n[A>>2]=0,f=a,a=0):a=o,(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function cA(A){var e,r,t,i=0,f=0,a=0,o=0;o=0|n[(A|=0)>>2],a=(3*(i=0|n[(r=A+4|0)>>2])|0)+o|0,o=(f=0|n[(t=A+8|0)>>2])+(3*o|0)|0,n[A>>2]=o,n[r>>2]=a,i=(3*f|0)+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,o=0):f=a,(0|f)<0&&(o=o-f|0,n[A>>2]=o,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=o-i|0,a=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=a,n[t>>2]=0,o=e,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|a)<(0|o)?a:o))?i:f))<=0||(n[A>>2]=o-f,n[r>>2]=a-f,n[t>>2]=i-f)}function sA(A,e){A|=0;var r,t,i,f=0,a=0,o=0;((e|=0)+-1|0)>>>0>=6||(o=(0|n[15440+(12*e|0)>>2])+(0|n[A>>2])|0,n[A>>2]=o,i=A+4|0,a=(0|n[15440+(12*e|0)+4>>2])+(0|n[i>>2])|0,n[i>>2]=a,t=A+8|0,e=(0|n[15440+(12*e|0)+8>>2])+(0|n[t>>2])|0,n[t>>2]=e,f=a-o|0,(0|o)<0?(e=e-o|0,n[i>>2]=f,n[t>>2]=e,n[A>>2]=0,a=0):(f=a,a=o),(0|f)<0&&(a=a-f|0,n[A>>2]=a,e=e-f|0,n[t>>2]=e,n[i>>2]=0,f=0),r=a-e|0,o=f-e|0,(0|e)<0?(n[A>>2]=r,n[i>>2]=o,n[t>>2]=0,a=r,e=0):o=f,(0|(f=(0|e)<(0|(f=(0|o)<(0|a)?o:a))?e:f))<=0||(n[A>>2]=a-f,n[i>>2]=o-f,n[t>>2]=e-f))}function lA(A){var e,r,t,i=0,f=0,a=0,o=0;o=0|n[(A|=0)>>2],a=(i=0|n[(r=A+4|0)>>2])+o|0,o=(f=0|n[(t=A+8|0)>>2])+o|0,n[A>>2]=o,n[r>>2]=a,i=f+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,a=0):(f=a,a=o),(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function dA(A){var e,r,t,i=0,f=0,a=0,o=0;i=0|n[(A|=0)>>2],a=0|n[(r=A+4|0)>>2],f=0|n[(t=A+8|0)>>2],o=a+i|0,n[A>>2]=o,a=f+a|0,n[r>>2]=a,i=f+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,a=0):(f=a,a=o),(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function bA(A){switch(0|(A|=0)){case 1:A=5;break;case 5:A=4;break;case 4:A=6;break;case 6:A=2;break;case 2:A=3;break;case 3:A=1}return 0|A}function hA(A){switch(0|(A|=0)){case 1:A=3;break;case 3:A=2;break;case 2:A=6;break;case 6:A=4;break;case 4:A=5;break;case 5:A=1}return 0|A}function gA(A){var e,r,t,i=0,f=0,a=0,o=0;i=0|n[(A|=0)>>2],f=0|n[(r=A+4|0)>>2],a=0|n[(t=A+8|0)>>2],o=f+(i<<1)|0,n[A>>2]=o,f=a+(f<<1)|0,n[r>>2]=f,i=(a<<1)+i|0,n[t>>2]=i,a=f-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=a,n[t>>2]=i,n[A>>2]=0,f=a,a=0):a=o,(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function vA(A){var e,r,t,i=0,f=0,a=0,o=0;o=0|n[(A|=0)>>2],a=((i=0|n[(r=A+4|0)>>2])<<1)+o|0,o=(f=0|n[(t=A+8|0)>>2])+(o<<1)|0,n[A>>2]=o,n[r>>2]=a,i=(f<<1)+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,o=0):f=a,(0|f)<0&&(o=o-f|0,n[A>>2]=o,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=o-i|0,a=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=a,n[t>>2]=0,o=e,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|a)<(0|o)?a:o))?i:f))<=0||(n[A>>2]=o-f,n[r>>2]=a-f,n[t>>2]=i-f)}function pA(A,e){e|=0;var r,t,i,f=0,a=0,o=0;return i=(0|(t=(0|n[(A|=0)>>2])-(0|n[e>>2])|0))<0,r=(0|(a=(0|n[A+4>>2])-(0|n[e+4>>2])-(i?t:0)|0))<0,e=(e=(A=(0|(o=(i?0-t|0:0)+(0|n[A+8>>2])-(0|n[e+8>>2])+(r?0-a|0:0)|0))<0)?0:o)-((a=(0|(A=(0|e)<(0|(A=(0|(f=(r?0:a)-(A?o:0)|0))<(0|(o=(i?0:t)-(r?a:0)-(A?o:0)|0))?f:o))?e:A))>0)?A:0)|0,f=f-(a?A:0)|0,0|((0|(A=(0|(A=o-(a?A:0)|0))>-1?A:0-A|0))>(0|(e=(0|(f=(0|f)>-1?f:0-f|0))>(0|(e=(0|e)>-1?e:0-e|0))?f:e))?A:e)}function wA(A,e){e|=0;var r;r=0|n[(A|=0)+8>>2],n[e>>2]=(0|n[A>>2])-r,n[e+4>>2]=(0|n[A+4>>2])-r}function yA(A,e){e|=0;var r,t,i,f=0,a=0,o=0;a=0|n[(A|=0)>>2],n[e>>2]=a,o=0|n[A+4>>2],n[(t=e+4|0)>>2]=o,n[(i=e+8|0)>>2]=0,A=(f=(0|o)<(0|a))?a:o,f=f?o:a;do{if((0|f)<0){if((0|A)>0){if((-2147483648|A|0)<(0|f)&-2147483648!=(0|f)&(2147483647-A|0)>=(0|f))break;return 0|(A=1)}if(-2147483648==(0|f)|(-2147483648-A|0)>(0|f))return 0|(e=1);if((0|A)>-1){if((-2147483648|A|0)<(0|f))break;return 0|(A=1)}if(!((-2147483648^A|0)<(0|f)))break;return 0|(A=1)}}while(0);return A=o-a|0,(0|a)<0?(f=0-a|0,n[t>>2]=A,n[i>>2]=f,n[e>>2]=0,a=0):(A=o,f=0),(0|A)<0&&(a=a-A|0,n[e>>2]=a,f=f-A|0,n[i>>2]=f,n[t>>2]=0,A=0),r=a-f|0,o=A-f|0,(0|f)<0?(n[e>>2]=r,n[t>>2]=o,n[i>>2]=0,A=o,o=r,f=0):o=a,(0|(a=(0|f)<(0|(a=(0|A)<(0|o)?A:o))?f:a))<=0||(n[e>>2]=o-a,n[t>>2]=A-a,n[i>>2]=f-a),0|(e=0)}function _A(A){var e,r,t,i;r=(i=0|n[(e=(A|=0)+8|0)>>2])-(0|n[A>>2])|0,n[A>>2]=r,A=(0|n[(t=A+4|0)>>2])-i|0,n[t>>2]=A,n[e>>2]=0-(A+r)}function mA(A){var e,r,t=0,i=0,f=0,a=0,o=0;t=0-(i=0|n[(A|=0)>>2])|0,n[A>>2]=t,n[(e=A+8|0)>>2]=0,a=(f=0|n[(r=A+4|0)>>2])+i|0,(0|i)>0?(n[r>>2]=a,n[e>>2]=i,n[A>>2]=0,t=0,f=a):i=0,(0|f)<0?(o=t-f|0,n[A>>2]=o,i=i-f|0,n[e>>2]=i,n[r>>2]=0,a=o-i|0,t=0-i|0,(0|i)<0?(n[A>>2]=a,n[r>>2]=t,n[e>>2]=0,f=t,i=0):(f=0,a=o)):a=t,(0|(t=(0|i)<(0|(t=(0|f)<(0|a)?f:a))?i:t))<=0||(n[A>>2]=a-t,n[r>>2]=f-t,n[e>>2]=i-t)}function EA(A,e,r){r|=0;var t,i,f=0,a=0;return i=I,I=I+16|0,t=i,a=-2130706433&(e|=0)|134217728,!0&268435456==(2013265920&e|0)?(f=0|Ne(0|(A|=0),0|e,56),k(),f=0|function(A,e,r){A|=0,e|=0,r|=0;var t=0,i=0,f=0;if(f=I,I=I+16|0,i=f,t=0|FA(A,e),(r+-1|0)>>>0>5)return I=f,0|(i=-1);if(t=0!=(0|t),1==(0|r)&t)return I=f,0|(i=-1);do{if(!(0|we(A,e,i))){if(t){t=(5+(0|n[21936+(r<<2)>>2])-(0|n[i>>2])|0)%5|0;break}t=(6+(0|n[21968+(r<<2)>>2])-(0|n[i>>2])|0)%6|0;break}t=-1}while(0);return i=t,I=f,0|i}(A,a,7&f),-1==(0|f)?(n[r>>2]=0,I=i,0|(a=6)):(0|HA(A,a,t)&&x(23313,22484,282,22499),e=0|Ne(0|A,0|e,52),k(),e&=15,0|FA(A,a)?DA(t,e,f,2,r):PA(t,e,f,2,r),I=i,0|(a=0))):(I=i,0|(a=6))}function BA(A,e,r,t){e|=0,t|=0;var f,a=0,o=0,u=0,c=0;if(f=I,I=I+16|0,function(A,e,r){A|=0,e|=0,r|=0;var t=0,f=0,a=0;a=I,I=I+32|0,f=a,function(A,e){A|=0,e|=0;var r=0,t=0,n=0;r=+i[A>>3],t=+l(+r),r=+d(+r),i[e+16>>3]=r,r=+i[A+8>>3],n=t*+l(+r),i[e>>3]=n,r=t*+d(+r),i[e+8>>3]=r}(A,f),n[e>>2]=0,i[r>>3]=5,t=+pe(16400,f),t<+i[r>>3]&&(n[e>>2]=0,i[r>>3]=t);t=+pe(16424,f),t<+i[r>>3]&&(n[e>>2]=1,i[r>>3]=t);t=+pe(16448,f),t<+i[r>>3]&&(n[e>>2]=2,i[r>>3]=t);t=+pe(16472,f),t<+i[r>>3]&&(n[e>>2]=3,i[r>>3]=t);t=+pe(16496,f),t<+i[r>>3]&&(n[e>>2]=4,i[r>>3]=t);t=+pe(16520,f),t<+i[r>>3]&&(n[e>>2]=5,i[r>>3]=t);t=+pe(16544,f),t<+i[r>>3]&&(n[e>>2]=6,i[r>>3]=t);t=+pe(16568,f),t<+i[r>>3]&&(n[e>>2]=7,i[r>>3]=t);t=+pe(16592,f),t<+i[r>>3]&&(n[e>>2]=8,i[r>>3]=t);t=+pe(16616,f),t<+i[r>>3]&&(n[e>>2]=9,i[r>>3]=t);t=+pe(16640,f),t<+i[r>>3]&&(n[e>>2]=10,i[r>>3]=t);t=+pe(16664,f),t<+i[r>>3]&&(n[e>>2]=11,i[r>>3]=t);t=+pe(16688,f),t<+i[r>>3]&&(n[e>>2]=12,i[r>>3]=t);t=+pe(16712,f),t<+i[r>>3]&&(n[e>>2]=13,i[r>>3]=t);t=+pe(16736,f),t<+i[r>>3]&&(n[e>>2]=14,i[r>>3]=t);t=+pe(16760,f),t<+i[r>>3]&&(n[e>>2]=15,i[r>>3]=t);t=+pe(16784,f),t<+i[r>>3]&&(n[e>>2]=16,i[r>>3]=t);t=+pe(16808,f),t<+i[r>>3]&&(n[e>>2]=17,i[r>>3]=t);t=+pe(16832,f),t<+i[r>>3]&&(n[e>>2]=18,i[r>>3]=t);if(t=+pe(16856,f),!(t<+i[r>>3]))return void(I=a);n[e>>2]=19,i[r>>3]=t,I=a}(A|=0,r|=0,c=f),(o=+h(+(1-.5*+i[c>>3])))<1e-16)return n[t>>2]=0,n[t+4>>2]=0,n[t+8>>2]=0,n[t+12>>2]=0,void(I=f);if(c=0|n[r>>2],a=+XA((a=+i[15920+(24*c|0)>>3])-+XA(+function(A,e){A|=0,e|=0;var r=0,t=0,n=0,f=0,a=0;return f=+i[e>>3],t=+l(+f),n=+i[e+8>>3]-+i[A+8>>3],a=t*+d(+n),r=+i[A>>3],+ +p(+a,+(+d(+f)*+l(+r)-+l(+n)*(t*+d(+r))))}(15600+(c<<4)|0,A))),u=0|zA(e)?+XA(a+-.3334731722518321):a,a=+b(+o)/.381966011250105,(0|e)>0){A=0;do{a*=2.6457513110645907,A=A+1|0}while((0|A)!=(0|e))}o=+l(+u)*a,i[t>>3]=o,u=+d(+u)*a,i[t+8>>3]=u,I=f}function kA(A,e,r,t,f){e|=0,r|=0,t|=0,f|=0;var a=0,o=0;if(a=+function(A){A|=0;var e=0,r=0;return r=+i[A>>3],e=+i[A+8>>3],+ +c(+(r*r+e*e))}(A|=0),a<1e-16)return e=15600+(e<<4)|0,n[f>>2]=n[e>>2],n[f+4>>2]=n[e+4>>2],n[f+8>>2]=n[e+8>>2],void(n[f+12>>2]=n[e+12>>2]);if(o=+p(+ +i[A+8>>3],+ +i[A>>3]),(0|r)>0){A=0;do{a/=2.6457513110645907,A=A+1|0}while((0|A)!=(0|r))}t?(a/=3,r=0==(0|zA(r)),a=+v(.381966011250105*(r?a:a/2.6457513110645907))):(a=+v(.381966011250105*a),0|zA(r)&&(o=+XA(o+.3334731722518321))),function(A,e,r,t){A|=0,e=+e,r=+r,t|=0;var f=0,a=0,o=0,c=0;if(r<1e-16)return n[t>>2]=n[A>>2],n[t+4>>2]=n[A+4>>2],n[t+8>>2]=n[A+8>>2],void(n[t+12>>2]=n[A+12>>2]);a=e<0?e+6.283185307179586:e,a=e>=6.283185307179586?a+-6.283185307179586:a;do{if(!(a<1e-16)){if(f=+u(+(a+-3.141592653589793))<1e-16,e=+i[A>>3],f){e-=r,i[t>>3]=e,f=t;break}if(o=+l(+r),r=+d(+r),e=o*+d(+e)+ +l(+a)*(r*+l(+e)),e=+g(+((e=e>1?1:e)<-1?-1:e)),i[t>>3]=e,+u(+(e+-1.5707963267948966))<1e-16)return i[t>>3]=1.5707963267948966,void(i[t+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return i[t>>3]=-1.5707963267948966,void(i[t+8>>3]=0);if(c=+l(+e),a=r*+d(+a)/c,r=+i[A>>3],e=(o-+d(+e)*+d(+r))/+l(+r)/c,o=a>1?1:a,e=e>1?1:e,(e=+i[A+8>>3]+ +p(+(o<-1?-1:o),+(e<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(i[t+8>>3]=e)}e=+i[A>>3]+r,i[t>>3]=e,f=t}while(0);if(+u(+(e+-1.5707963267948966))<1e-16)return i[f>>3]=1.5707963267948966,void(i[t+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return i[f>>3]=-1.5707963267948966,void(i[t+8>>3]=0);if(e=+i[A+8>>3],e>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);i[t+8>>3]=e}(15600+(e<<4)|0,+XA(+i[15920+(24*e|0)>>3]-o),a,f)}function xA(A,e,r){e|=0,r|=0;var t,i;t=I,I=I+16|0,AA((A|=0)+4|0,i=t),kA(i,0|n[A>>2],e,0,r),I=t}function DA(A,e,r,t,f){A|=0,e|=0,r|=0,t|=0,f|=0;var a,o,u,c,s,l,d,b,h,g,v,p,w,y,_,m,E,B,k,D,M,C,Q=0,P=0,S=0,R=0,T=0,O=0;if(C=I,I=I+272|0,R=C+240|0,k=C,D=C+224|0,M=C+208|0,v=C+176|0,p=C+160|0,w=C+192|0,y=C+144|0,_=C+128|0,m=C+112|0,E=C+96|0,B=C+80|0,n[(Q=C+256|0)>>2]=e,n[R>>2]=n[A>>2],n[R+4>>2]=n[A+4>>2],n[R+8>>2]=n[A+8>>2],n[R+12>>2]=n[A+12>>2],MA(R,Q,k),n[f>>2]=0,(0|(R=t+r+(5==(0|t)&1)|0))<=(0|r))I=C;else{o=D+4|0,u=v+4|0,c=r+5|0,s=16880+((a=0|n[Q>>2])<<2)|0,l=16960+(a<<2)|0,d=_+8|0,b=m+8|0,h=E+8|0,g=M+4|0,S=r;A:for(;;){P=k+(((0|S)%5|0)<<4)|0,n[M>>2]=n[P>>2],n[M+4>>2]=n[P+4>>2],n[M+8>>2]=n[P+8>>2],n[M+12>>2]=n[P+12>>2];do{}while(2==(0|CA(M,a,0,1)));if((0|S)>(0|r)&0!=(0|zA(e))){if(n[v>>2]=n[M>>2],n[v+4>>2]=n[M+4>>2],n[v+8>>2]=n[M+8>>2],n[v+12>>2]=n[M+12>>2],AA(o,p),t=0|n[v>>2],Q=0|n[17040+(80*t|0)+(n[D>>2]<<2)>>2],n[v>>2]=n[18640+(80*t|0)+(20*Q|0)>>2],(0|(P=0|n[18640+(80*t|0)+(20*Q|0)+16>>2]))>0){A=0;do{lA(u),A=A+1|0}while((0|A)<(0|P))}switch(P=18640+(80*t|0)+(20*Q|0)+4|0,n[w>>2]=n[P>>2],n[w+4>>2]=n[P+4>>2],n[w+8>>2]=n[P+8>>2],tA(w,3*(0|n[s>>2])|0),eA(u,w,u),q(u),AA(u,y),T=+(0|n[l>>2]),i[_>>3]=3*T,i[d>>3]=0,O=-1.5*T,i[m>>3]=O,i[b>>3]=2.598076211353316*T,i[E>>3]=O,i[h>>3]=-2.598076211353316*T,0|n[17040+(80*(0|n[v>>2])|0)+(n[M>>2]<<2)>>2]){case 1:A=m,t=_;break;case 3:A=E,t=m;break;case 2:A=_,t=E;break;default:A=12;break A}ge(p,y,t,A,B),kA(B,0|n[v>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2])}if((0|S)<(0|c)&&(AA(g,v),kA(v,0|n[M>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2])),n[D>>2]=n[M>>2],n[D+4>>2]=n[M+4>>2],n[D+8>>2]=n[M+8>>2],n[D+12>>2]=n[M+12>>2],(0|(S=S+1|0))>=(0|R)){A=3;break}}3!=(0|A)?12==(0|A)&&x(22522,22569,571,22579):I=C}}function MA(A,e,r){A|=0,e|=0,r|=0;var t,i=0,f=0,a=0,o=0,u=0;t=I,I=I+128|0,f=t,o=20240,u=(a=i=t+64|0)+60|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));o=20304,u=(a=f)+60|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));i=(u=0==(0|zA(0|n[e>>2])))?i:f,gA(f=A+4|0),vA(f),0|zA(0|n[e>>2])&&(cA(f),n[e>>2]=1+(0|n[e>>2])),n[r>>2]=n[A>>2],eA(f,i,e=r+4|0),q(e),n[r+16>>2]=n[A>>2],eA(f,i+12|0,e=r+20|0),q(e),n[r+32>>2]=n[A>>2],eA(f,i+24|0,e=r+36|0),q(e),n[r+48>>2]=n[A>>2],eA(f,i+36|0,e=r+52|0),q(e),n[r+64>>2]=n[A>>2],eA(f,i+48|0,r=r+68|0),q(r),I=t}function CA(A,e,r,t){r|=0,t|=0;var i,f,a,o,u,c,s=0,l=0,d=0,b=0,h=0;if(c=I,I=I+32|0,u=c+12|0,f=c,h=(A|=0)+4|0,b=0|n[16960+((e|=0)<<2)>>2],b=(o=0!=(0|t))?3*b|0:b,s=0|n[h>>2],i=0|n[(a=A+8|0)>>2],o){if((0|(s=i+s+(t=0|n[(l=A+12|0)>>2])|0))==(0|b))return I=c,0|(h=1);d=l}else s=i+s+(t=0|n[(d=A+12|0)>>2])|0;if((0|s)<=(0|b))return I=c,0|(h=0);do{if((0|t)>0){if(t=0|n[A>>2],(0|i)>0){l=18640+(80*t|0)+60|0,t=A;break}t=18640+(80*t|0)+40|0,r?(J(u,b,0,0),rA(h,u,f),dA(f),eA(f,u,h),l=t,t=A):(l=t,t=A)}else l=18640+(80*(0|n[A>>2])|0)+20|0,t=A}while(0);if(n[t>>2]=n[l>>2],(0|n[(s=l+16|0)>>2])>0){t=0;do{lA(h),t=t+1|0}while((0|t)<(0|n[s>>2]))}return A=l+4|0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],n[u+8>>2]=n[A+8>>2],e=0|n[16880+(e<<2)>>2],tA(u,o?3*e|0:e),eA(h,u,h),q(h),t=o&&((0|n[a>>2])+(0|n[h>>2])+(0|n[d>>2])|0)==(0|b)?1:2,I=c,0|(h=t)}function QA(A,e){A|=0,e|=0;var r=0;do{r=0|CA(A,e,0,1)}while(2==(0|r));return 0|r}function PA(A,e,r,t,f){A|=0,e|=0,r|=0,t|=0,f|=0;var a,o,u,c,s,l,d,b,h,g,v,p,w,y,_,m,E,B,k=0,D=0,M=0,C=0,Q=0;if(B=I,I=I+240|0,y=B+208|0,_=B,m=B+192|0,E=B+176|0,h=B+160|0,g=B+144|0,v=B+128|0,p=B+112|0,w=B+96|0,n[(k=B+224|0)>>2]=e,n[y>>2]=n[A>>2],n[y+4>>2]=n[A+4>>2],n[y+8>>2]=n[A+8>>2],n[y+12>>2]=n[A+12>>2],IA(y,k,_),n[f>>2]=0,(0|(b=t+r+(6==(0|t)&1)|0))<=(0|r))I=B;else{o=r+6|0,u=16960+((a=0|n[k>>2])<<2)|0,c=g+8|0,s=v+8|0,l=p+8|0,d=m+4|0,D=0,M=r,t=-1;A:for(;;){if(A=_+((k=(0|M)%6|0)<<4)|0,n[m>>2]=n[A>>2],n[m+4>>2]=n[A+4>>2],n[m+8>>2]=n[A+8>>2],n[m+12>>2]=n[A+12>>2],A=D,D=0|CA(m,a,0,1),(0|M)>(0|r)&0!=(0|zA(e))&&(1!=(0|A)&&(0|n[m>>2])!=(0|t))){switch(AA(_+(((k+5|0)%6|0)<<4)+4|0,E),AA(_+(k<<4)+4|0,h),C=+(0|n[u>>2]),i[g>>3]=3*C,i[c>>3]=0,Q=-1.5*C,i[v>>3]=Q,i[s>>3]=2.598076211353316*C,i[p>>3]=Q,i[l>>3]=-2.598076211353316*C,k=0|n[y>>2],0|n[17040+(80*k|0)+(((0|t)==(0|k)?0|n[m>>2]:t)<<2)>>2]){case 1:A=v,t=g;break;case 3:A=p,t=v;break;case 2:A=g,t=p;break;default:A=8;break A}ge(E,h,t,A,w),0|ve(E,w)||0|ve(h,w)||(kA(w,0|n[y>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2]))}if((0|M)<(0|o)&&(AA(d,E),kA(E,0|n[m>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2])),(0|(M=M+1|0))>=(0|b)){A=3;break}t=0|n[m>>2]}3!=(0|A)?8==(0|A)&&x(22606,22569,736,22651):I=B}}function IA(A,e,r){A|=0,e|=0,r|=0;var t,i=0,f=0,a=0,o=0,u=0;t=I,I=I+160|0,f=t,o=20368,u=(a=i=t+80|0)+72|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));o=20448,u=(a=f)+72|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));i=(u=0==(0|zA(0|n[e>>2])))?i:f,gA(f=A+4|0),vA(f),0|zA(0|n[e>>2])&&(cA(f),n[e>>2]=1+(0|n[e>>2])),n[r>>2]=n[A>>2],eA(f,i,e=r+4|0),q(e),n[r+16>>2]=n[A>>2],eA(f,i+12|0,e=r+20|0),q(e),n[r+32>>2]=n[A>>2],eA(f,i+24|0,e=r+36|0),q(e),n[r+48>>2]=n[A>>2],eA(f,i+36|0,e=r+52|0),q(e),n[r+64>>2]=n[A>>2],eA(f,i+48|0,e=r+68|0),q(e),n[r+80>>2]=n[A>>2],eA(f,i+60|0,r=r+84|0),q(r),I=t}function SA(A,e){return e=0|Ne(0|(A|=0),0|(e|=0),45),k(),127&e|0}function RA(A,e){var r=0,t=0,n=0,i=0,f=0,a=0;if(!(!0&134217728==(-16777216&(e|=0)|0)))return 0|(e=0);if(f=0|Ne(0|(A|=0),0|e,45),k(),(f&=127)>>>0>121)return 0|(e=0);r=0|Ne(0|A,0|e,52),k(),r&=15;do{if(0|r){for(n=1,t=0;;){if(i=0|Ne(0|A,0|e,3*(15-n|0)|0),k(),0!=(0|(i&=7))&(1^t)){if(1==(0|i)&0!=(0|U(f))){a=0,t=13;break}t=1}if(7==(0|i)){a=0,t=13;break}if(!(n>>>0>>0)){t=9;break}n=n+1|0}if(9==(0|t)){if(15!=(0|r))break;return 0|(a=1)}if(13==(0|t))return 0|a}}while(0);for(;;){if(a=0|Ne(0|A,0|e,3*(14-r|0)|0),k(),!(7==(7&a|0)&!0)){a=0,t=13;break}if(!(r>>>0<14)){a=1,t=13;break}r=r+1|0}return 13==(0|t)?0|a:0}function TA(A,e,r,t){r|=0,t|=0;var i=0,f=0;if(f=0|Ne(0|(A|=0),0|(e|=0),52),k(),r>>>0>15)return 0|(t=4);if((0|(f&=15))<(0|r))return 0|(t=12);if((0|f)==(0|r))return n[t>>2]=A,n[t+4>>2]=e,0|(t=0);if(i=0|Ye(0|r,0,52),i|=A,A=0|k()|-15728641&e,(0|f)>(0|r))do{e=0|Ye(7,0,3*(14-r|0)|0),r=r+1|0,i|=e,A=0|k()|A}while((0|r)<(0|f));return n[t>>2]=i,n[t+4>>2]=A,0|(t=0)}function OA(A,e,r,t){r|=0,t|=0;var i=0,f=0,a=0;if(f=0|Ne(0|(A|=0),0|(e|=0),52),k(),!((0|r)<16&(0|(f&=15))<=(0|r)))return 0|(t=4);i=r-f|0,r=0|Ne(0|A,0|e,45),k();A:do{if(0|U(127&r)){e:do{if(0|f){for(r=1;0==((a=0|Ye(7,0,3*(15-r|0)|0))&A|0)&0==((0|k())&e|0);){if(!(r>>>0>>0))break e;r=r+1|0}r=0|se(7,0,i,((0|i)<0)<<31>>31),i=0|k();break A}}while(0);r=0|Ie(0|(r=0|Fe(0|(r=0|se(7,0,i,((0|i)<0)<<31>>31)),0|k(),5,0)),0|k(),-5,-1),r=0|Ie(0|(r=0|Oe(0|r,0|k(),6,0)),0|k(),1,0),i=0|k()}else r=0|se(7,0,i,((0|i)<0)<<31>>31),i=0|k()}while(0);return n[(a=t)>>2]=r,n[a+4>>2]=i,0|(a=0)}function FA(A,e){var r=0,t=0,n=0;if(n=0|Ne(0|(A|=0),0|(e|=0),45),k(),!(0|U(127&n)))return 0|(n=0);n=0|Ne(0|A,0|e,52),k(),n&=15;A:do{if(n)for(t=1;;){if(r=0|Ne(0|A,0|e,3*(15-t|0)|0),k(),0|(r&=7))break A;if(!(t>>>0>>0)){r=0;break}t=t+1|0}else r=0}while(0);return 0|(n=0==(0|r)&1)}function GA(A,e){var r=0,t=0,n=0;if(n=0|Ne(0|(A|=0),0|(e|=0),52),k(),!(n&=15))return 0|(n=0);for(t=1;;){if(r=0|Ne(0|A,0|e,3*(15-t|0)|0),k(),0|(r&=7)){t=5;break}if(!(t>>>0>>0)){r=0,t=5;break}t=t+1|0}return 5==(0|t)?0|r:0}function LA(A,e){var r=0,t=0,n=0,i=0,f=0,a=0,o=0;if(o=0|Ne(0|(A|=0),0|(e|=0),52),k(),!(o&=15))return o=A,B(0|(a=e)),0|o;for(a=1,r=0;;){t=0|Ye(7,0,0|(i=3*(15-a|0)|0)),n=0|k(),f=0|Ne(0|A,0|e,0|i),k(),A=(i=0|Ye(0|bA(7&f),0,0|i))|A&~t,e=(f=0|k())|e&~n;A:do{if(!r)if(0==(i&t|0)&0==(f&n|0))r=0;else if(t=0|Ne(0|A,0|e,52),k(),t&=15){r=1;e:for(;;){switch(f=0|Ne(0|A,0|e,3*(15-r|0)|0),k(),7&f){case 1:break e;case 0:break;default:r=1;break A}if(!(r>>>0>>0)){r=1;break A}r=r+1|0}for(r=1;;){if(n=0|Ne(0|A,0|e,0|(f=3*(15-r|0)|0)),k(),i=0|Ye(7,0,0|f),e&=~(0|k()),A=A&~i|(f=0|Ye(0|bA(7&n),0,0|f)),e=0|e|k(),!(r>>>0>>0)){r=1;break}r=r+1|0}}else r=1}while(0);if(!(a>>>0>>0))break;a=a+1|0}return B(0|e),0|A}function UA(A,e){var r=0,t=0,n=0,i=0,f=0;if(t=0|Ne(0|(A|=0),0|(e|=0),52),k(),!(t&=15))return t=A,B(0|(r=e)),0|t;for(r=1;f=0|Ne(0|A,0|e,0|(i=3*(15-r|0)|0)),k(),n=0|Ye(7,0,0|i),e&=~(0|k()),A=(i=0|Ye(0|bA(7&f),0,0|i))|A&~n,e=0|k()|e,r>>>0>>0;)r=r+1|0;return B(0|e),0|A}function NA(A,e){var r=0,t=0,n=0,i=0,f=0,a=0,o=0;if(o=0|Ne(0|(A|=0),0|(e|=0),52),k(),!(o&=15))return o=A,B(0|(a=e)),0|o;for(a=1,r=0;;){t=0|Ye(7,0,0|(i=3*(15-a|0)|0)),n=0|k(),f=0|Ne(0|A,0|e,0|i),k(),A=(i=0|Ye(0|hA(7&f),0,0|i))|A&~t,e=(f=0|k())|e&~n;A:do{if(!r)if(0==(i&t|0)&0==(f&n|0))r=0;else if(t=0|Ne(0|A,0|e,52),k(),t&=15){r=1;e:for(;;){switch(f=0|Ne(0|A,0|e,3*(15-r|0)|0),k(),7&f){case 1:break e;case 0:break;default:r=1;break A}if(!(r>>>0>>0)){r=1;break A}r=r+1|0}for(r=1;;){if(i=0|Ye(7,0,0|(n=3*(15-r|0)|0)),f=e&~(0|k()),e=0|Ne(0|A,0|e,0|n),k(),A=A&~i|(e=0|Ye(0|hA(7&e),0,0|n)),e=0|f|k(),!(r>>>0>>0)){r=1;break}r=r+1|0}}else r=1}while(0);if(!(a>>>0>>0))break;a=a+1|0}return B(0|e),0|A}function YA(A,e){var r=0,t=0,n=0,i=0,f=0;if(t=0|Ne(0|(A|=0),0|(e|=0),52),k(),!(t&=15))return t=A,B(0|(r=e)),0|t;for(r=1;i=0|Ye(7,0,0|(f=3*(15-r|0)|0)),n=e&~(0|k()),e=0|Ne(0|A,0|e,0|f),k(),A=(e=0|Ye(0|hA(7&e),0,0|f))|A&~i,e=0|k()|n,r>>>0>>0;)r=r+1|0;return B(0|e),0|A}function zA(A){return 0|(0|(A|=0))%2}function ZA(A,e,r){r|=0;var t,i=0;return t=I,I=I+16|0,i=t,(e|=0)>>>0>15?(I=t,0|(i=4)):2146435072==(2146435072&n[(A|=0)+4>>2]|0)||2146435072==(2146435072&n[A+8+4>>2]|0)?(I=t,0|(i=3)):(function(A,e,r){var t,n;t=I,I=I+16|0,BA(A|=0,e|=0,r|=0,n=t),X(n,r+4|0),I=t}(A,e,i),e=0|function(A,e){A|=0;var r,t=0,i=0,f=0,a=0,o=0,u=0,c=0,s=0;if(r=I,I=I+64|0,u=r+40|0,i=r+24|0,f=r+12|0,a=r,Ye(0|(e|=0),0,52),t=134225919|k(),!e)return(0|n[A+4>>2])>2||(0|n[A+8>>2])>2||(0|n[A+12>>2])>2?(u=0,B(0|(o=0)),I=r,0|u):(Ye(0|Y(A),0,45),o=0|k()|t,u=-1,B(0|o),I=r,0|u);if(n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],n[u+8>>2]=n[A+8>>2],n[u+12>>2]=n[A+12>>2],o=u+4|0,(0|e)>0)for(A=-1;n[i>>2]=n[o>>2],n[i+4>>2]=n[o+4>>2],n[i+8>>2]=n[o+8>>2],1&e?(aA(o),n[f>>2]=n[o>>2],n[f+4>>2]=n[o+4>>2],n[f+8>>2]=n[o+8>>2],uA(f)):(oA(o),n[f>>2]=n[o>>2],n[f+4>>2]=n[o+4>>2],n[f+8>>2]=n[o+8>>2],cA(f)),rA(i,f,a),q(a),c=0|Ye(7,0,0|(s=3*(15-e|0)|0)),t&=~(0|k()),A=(s=0|Ye(0|nA(a),0,0|s))|A&~c,t=0|k()|t,(0|e)>1;)e=e+-1|0;else A=-1;A:do{if((0|n[o>>2])<=2&&(0|n[u+8>>2])<=2&&(0|n[u+12>>2])<=2){if(e=0|Ye(0|(i=0|Y(u)),0,45),e|=A,A=0|k()|-1040385&t,a=0|z(u),!(0|U(i))){if((0|a)<=0)break;for(f=0;;){if(i=0|Ne(0|e,0|A,52),k(),i&=15)for(t=1;u=0|Ne(0|e,0|A,0|(s=3*(15-t|0)|0)),k(),c=0|Ye(7,0,0|s),A&=~(0|k()),e=e&~c|(s=0|Ye(0|bA(7&u),0,0|s)),A=0|A|k(),t>>>0>>0;)t=t+1|0;if((0|(f=f+1|0))==(0|a))break A}}f=0|Ne(0|e,0|A,52),k(),f&=15;e:do{if(f){t=1;r:for(;;){switch(s=0|Ne(0|e,0|A,3*(15-t|0)|0),k(),7&s){case 1:break r;case 0:break;default:break e}if(!(t>>>0>>0))break e;t=t+1|0}if(0|Z(i,0|n[u>>2]))for(t=1;c=0|Ye(7,0,0|(u=3*(15-t|0)|0)),s=A&~(0|k()),A=0|Ne(0|e,0|A,0|u),k(),e=e&~c|(A=0|Ye(0|hA(7&A),0,0|u)),A=0|s|k(),t>>>0>>0;)t=t+1|0;else for(t=1;u=0|Ne(0|e,0|A,0|(s=3*(15-t|0)|0)),k(),c=0|Ye(7,0,0|s),A&=~(0|k()),e=e&~c|(s=0|Ye(0|bA(7&u),0,0|s)),A=0|A|k(),t>>>0>>0;)t=t+1|0}}while(0);if((0|a)>0){t=0;do{e=0|LA(e,A),A=0|k(),t=t+1|0}while((0|t)!=(0|a))}}else e=0,A=0}while(0);return s=e,B(0|(c=A)),I=r,0|s}(i,e),i=0|k(),n[r>>2]=e,n[r+4>>2]=i,0==(0|e)&0==(0|i)&&x(23313,22674,786,22697),I=t,0|(i=0))}function jA(A,e,r){var t,i=0,f=0,a=0;if(t=(r|=0)+4|0,f=0|Ne(0|(A|=0),0|(e|=0),52),k(),f&=15,a=0|Ne(0|A,0|e,45),k(),i=0==(0|f),0|U(127&a)){if(i)return 0|(a=1);i=1}else{if(i)return 0|(a=0);i=0==(0|n[t>>2])&&0==(0|n[r+8>>2])?0!=(0|n[r+12>>2])&1:1}for(r=1;1&r?uA(t):cA(t),a=0|Ne(0|A,0|e,3*(15-r|0)|0),k(),sA(t,7&a),r>>>0>>0;)r=r+1|0;return 0|i}function HA(A,e,r){r|=0;var t,i,f=0,a=0,o=0,u=0,c=0,s=0;if(i=I,I=I+16|0,t=i,s=0|Ne(0|(A|=0),0|(e|=0),45),k(),(s&=127)>>>0>121)return n[r>>2]=0,n[r+4>>2]=0,n[r+8>>2]=0,n[r+12>>2]=0,I=i,0|(s=5);A:do{if(0!=(0|U(s))&&(o=0|Ne(0|A,0|e,52),k(),0!=(0|(o&=15)))){f=1;e:for(;;){switch(c=0|Ne(0|A,0|e,3*(15-f|0)|0),k(),7&c){case 5:break e;case 0:break;default:f=e;break A}if(!(f>>>0>>0)){f=e;break A}f=f+1|0}for(a=1,f=e;u=0|Ye(7,0,0|(e=3*(15-a|0)|0)),c=f&~(0|k()),f=0|Ne(0|A,0|f,0|e),k(),A=A&~u|(f=0|Ye(0|hA(7&f),0,0|e)),f=0|c|k(),a>>>0>>0;)a=a+1|0}else f=e}while(0);if(c=7696+(28*s|0)|0,n[r>>2]=n[c>>2],n[r+4>>2]=n[c+4>>2],n[r+8>>2]=n[c+8>>2],n[r+12>>2]=n[c+12>>2],!(0|jA(A,f,r)))return I=i,0|(s=0);if(u=r+4|0,n[t>>2]=n[u>>2],n[t+4>>2]=n[u+4>>2],n[t+8>>2]=n[u+8>>2],o=0|Ne(0|A,0|f,52),k(),c=15&o,1&o?(cA(u),o=c+1|0):o=c,0|U(s)){A:do{if(c)for(e=1;;){if(a=0|Ne(0|A,0|f,3*(15-e|0)|0),k(),0|(a&=7)){f=a;break A}if(!(e>>>0>>0)){f=0;break}e=e+1|0}else f=0}while(0);f=4==(0|f)&1}else f=0;if(0|CA(r,o,f,0)){if(0|U(s))do{}while(0!=(0|CA(r,o,0,0)));(0|o)!=(0|c)&&oA(u)}else(0|o)!=(0|c)&&(n[u>>2]=n[t>>2],n[u+4>>2]=n[t+4>>2],n[u+8>>2]=n[t+8>>2]);return I=i,0|(s=0)}function $A(A,e,r){r|=0;var t,n,i=0;return n=I,I=I+16|0,0|(i=0|HA(A|=0,e|=0,t=n))?(I=n,0|i):(i=0|Ne(0|A,0|e,52),k(),xA(t,15&i,r),I=n,0|(i=0))}function VA(A,e,r){r|=0;var t,n=0,i=0,f=0;if(t=I,I=I+16|0,0|(n=0|HA(A|=0,e|=0,f=t)))return I=t,0|(f=n);n=0|Ne(0|A,0|e,45),k(),n=0==(0|U(127&n)),i=0|Ne(0|A,0|e,52),k(),i&=15;A:do{if(!n){if(0|i)for(n=1;;){if(!(0==((0|Ye(7,0,3*(15-n|0)|0))&A|0)&0==((0|k())&e|0)))break A;if(!(n>>>0>>0))break;n=n+1|0}return DA(f,i,0,5,r),I=t,0|0}}while(0);return PA(f,i,0,6,r),I=t,0|0}function WA(A,e){e|=0;var r=0,t=0,i=0,f=0,a=0,o=0,u=0;if((A|=0)>>>0>15)return 0|(o=4);if(Ye(0|A,0,52),o=134225919|k(),!A){r=0,t=0;do{0|U(t)&&(Ye(0|t,0,45),a=0|o|k(),n[(A=e+(r<<3)|0)>>2]=-1,n[A+4>>2]=a,r=r+1|0),t=t+1|0}while(122!=(0|t));return 0|(r=0)}r=0,a=0;do{if(0|U(a)){for(Ye(0|a,0,45),t=1,i=-1,f=0|o|k();i&=~(u=0|Ye(7,0,3*(15-t|0)|0)),f&=~(0|k()),(0|t)!=(0|A);)t=t+1|0;n[(u=e+(r<<3)|0)>>2]=i,n[u+4>>2]=f,r=r+1|0}a=a+1|0}while(122!=(0|a));return 0|(r=0)}function KA(A,e,r,t){A|=0,t|=0;var i=0,f=0;i=0|Ne(0|(e|=0),0|(r|=0),52),k(),0==(0|e)&0==(0|r)|(0|t)>15|(0|(i&=15))>(0|t)?(t=-1,i=-1,e=0,r=0):(f=0|function(A,e,r,t){return A|=0,e|=0,(0|(t|=0))<(0|(r|=0))?(t=A,B(0|(r=e)),0|t):(r=0|Ye(-1,-1,3+(3*(t-r|0)|0)|0),t=0|Ye(0|~r,0|~(0|k()),3*(15-t|0)|0),r=~(0|k())&e,t=~t&A,B(0|r),0|t)}(e,r,i+1|0,t),r=-15728641&(0|k()),e=0|Ye(0|t,0,52),t=(f=0==(0|FA(e|=f,r=0|r|k())))?-1:t),n[(f=A)>>2]=e,n[f+4>>2]=r,n[A+8>>2]=i,n[A+12>>2]=t}function JA(A){var e,r=0,t=0,i=0,f=0,a=0,o=0,u=0,c=0;if(!(0==(0|(r=0|n[(t=A|=0)>>2]))&0==(0|(t=0|n[t+4>>2])))&&(i=0|Ne(0|r,0|t,52),k(),r=0|Ie(0|(u=0|Ye(1,0,3*(15^(i&=15))|0)),0|k(),0|r,0|t),t=0|k(),n[(u=A)>>2]=r,n[u+4>>2]=t,!((0|i)<(0|(o=0|n[(u=A+8|0)>>2]))))){for(e=A+12|0,a=i;;){if((0|a)==(0|o)){i=5;break}if(c=(0|a)==(0|n[e>>2]),i=0|Ne(0|r,0|t,0|(f=3*(15-a|0)|0)),k(),c&1==(0|(i&=7))&!0){i=7;break}if(!(7==(0|i)&!0)){i=10;break}if(r=0|Ie(0|r,0|t,0|(c=0|Ye(1,0,0|f)),0|k()),t=0|k(),n[(c=A)>>2]=r,n[c+4>>2]=t,!((0|a)>(0|o))){i=10;break}a=a+-1|0}if(5==(0|i))return n[(c=A)>>2]=0,n[c+4>>2]=0,n[u>>2]=-1,void(n[e>>2]=-1);if(7==(0|i))return o=0|Ie(0|r,0|t,0|(o=0|Ye(1,0,0|f)),0|k()),u=0|k(),n[(c=A)>>2]=o,n[c+4>>2]=u,void(n[e>>2]=a+-1)}}function XA(A){var e;return e=(A=+A)<0?A+6.283185307179586:A,+(A>=6.283185307179586?e+-6.283185307179586:e)}function qA(A,e){return e|=0,+u(+(+i[(A|=0)>>3]-+i[e>>3]))<17453292519943298e-27?0|(e=+u(+(+i[A+8>>3]-+i[e+8>>3]))<17453292519943298e-27):0|(e=0)}function Ae(A,e){A|=0;var r,t,n,f=0;return t=+i[(e|=0)>>3],r=+i[A>>3],f=(n=+d(.5*(t-r)))*n+(f=+d(.5*(+i[e+8>>3]-+i[A+8>>3])))*(+l(+t)*+l(+r)*f),2*+p(+ +c(+f),+ +c(+(1-f)))*6371.007180918475}function ee(A,e){e|=0;var r=0;return(A|=0)>>>0>15?0|(e=4):(r=0|Fe(0|(r=0|se(7,0,A,((0|A)<0)<<31>>31)),0|k(),120,0),A=0|k(),n[e>>2]=2|r,n[e+4>>2]=A,0|(e=0))}function re(A,e,r){A|=0,r|=0;var t,n,f,a,o=0,u=0,s=0,h=0,g=0,w=0;return w=+i[(e|=0)>>3],f=+i[A>>3],g=+d(.5*(w-f)),s=+i[e+8>>3],n=+i[A+8>>3],h=+d(.5*(s-n)),t=+l(+f),a=+l(+w),h=2*+p(+ +c(+(h=g*g+h*(a*t*h))),+ +c(+(1-h))),g=+i[r>>3],w=+d(.5*(g-w)),o=+i[r+8>>3],s=+d(.5*(o-s)),u=+l(+g),s=2*+p(+ +c(+(s=w*w+s*(a*u*s))),+ +c(+(1-s))),g=+d(.5*(f-g)),o=+d(.5*(n-o)),o=2*+p(+ +c(+(o=g*g+o*(t*u*o))),+ +c(+(1-o))),4*+v(+ +c(+ +b(.5*(u=.5*(h+s+o)))*+b(.5*(u-h))*+b(.5*(u-s))*+b(.5*(u-o))))}function te(A,e,r){r|=0;var t,f,a,o=0,u=0;if(a=I,I=I+192|0,f=a,0|(u=0|$A(A|=0,e|=0,t=a+168|0)))return I=a,0|(r=u);if(0|VA(A,e,f)&&x(23313,22742,386,22751),(0|(e=0|n[f>>2]))>0){if(o=+re(f+8|0,f+8+((1!=(0|e)&1)<<4)|0,t)+0,1!=(0|e)){A=1;do{o+=+re(f+8+((u=A)<<4)|0,f+8+(((0|(A=A+1|0))%(0|e)|0)<<4)|0,t)}while((0|A)<(0|e))}}else o=0;return i[r>>3]=o,I=a,0|(r=0)}function ne(A){A|=0;var e,r,t=0;return(e=0|Pe(1,12))||x(22832,22787,49,22845),0|(t=0|n[(r=A+4|0)>>2])?(n[(t=t+8|0)>>2]=e,n[r>>2]=e,0|e):(0|n[A>>2]&&x(22862,22787,61,22885),n[(t=A)>>2]=e,n[r>>2]=e,0|e)}function ie(A,e){A|=0,e|=0;var r,t;return(t=0|Ce(24))||x(22899,22787,78,22913),n[t>>2]=n[e>>2],n[t+4>>2]=n[e+4>>2],n[t+8>>2]=n[e+8>>2],n[t+12>>2]=n[e+12>>2],n[t+16>>2]=0,0|(r=0|n[(e=A+4|0)>>2])?(n[r+16>>2]=t,n[e>>2]=t,0|t):(0|n[A>>2]&&x(22928,22787,82,22913),n[A>>2]=t,n[e>>2]=t,0|t)}function fe(A){var e=0,r=0,t=0,i=0;if(A|=0)for(t=1;;){if(0|(e=0|n[A>>2]))do{if(0|(r=0|n[e>>2]))do{i=r,r=0|n[r+16>>2],Qe(i)}while(0!=(0|r));i=e,e=0|n[e+8>>2],Qe(i)}while(0!=(0|e));if(e=A,A=0|n[A+8>>2],t||Qe(e),!A)break;t=0}}function ae(A){var e,r,t=0,f=0,a=0,o=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0,m=0,E=0,B=0,k=0,D=0,M=0,C=0,Q=0,P=0,I=0,S=0,R=0,T=0,O=0;if(0|n[(o=(A|=0)+8|0)>>2])return 0|(O=1);if(!(a=0|n[A>>2]))return 0|(O=0);t=a,f=0;do{f=f+1|0,t=0|n[t+8>>2]}while(0!=(0|t));if(f>>>0<2)return 0|(O=0);(r=0|Ce(f<<2))||x(22948,22787,317,22967),(e=0|Ce(f<<5))||x(22989,22787,321,22967),n[A>>2]=0,n[(M=A+4|0)>>2]=0,n[o>>2]=0,f=0,R=0,D=0,g=0;A:for(;;){if(h=0|n[a>>2]){c=0,s=h;do{if(d=+i[s+8>>3],t=s,s=0|n[s+16>>2],l=+i[(o=(b=0==(0|s))?h:s)+8>>3],+u(+(d-l))>3.141592653589793){O=14;break}c+=(l-d)*(+i[t>>3]+ +i[o>>3])}while(!b);if(14==(0|O)){O=0,c=0,t=h;do{k=+i[t+8>>3],I=0|n[(S=t+16|0)>>2],B=+i[(I=0==(0|I)?h:I)+8>>3],c+=(+i[t>>3]+ +i[I>>3])*((B<0?B+6.283185307179586:B)-(k<0?k+6.283185307179586:k)),t=0|n[(0==(0|t)?a:S)>>2]}while(0!=(0|t))}c>0?(n[r+(R<<2)>>2]=a,R=R+1|0,o=D,t=g):O=19}else O=19;if(19==(0|O)){O=0;do{if(!f){if(g){o=M,s=g+8|0,t=a,f=A;break}if(0|n[A>>2]){O=27;break A}o=M,s=A,t=a,f=A;break}if(0|n[(t=f+8|0)>>2]){O=21;break A}if(!(f=0|Pe(1,12))){O=23;break A}n[t>>2]=f,o=f+4|0,s=f,t=g}while(0);if(n[s>>2]=a,n[o>>2]=a,s=e+(D<<5)|0,b=0|n[a>>2]){for(i[(h=e+(D<<5)+8|0)>>3]=17976931348623157e292,i[(g=e+(D<<5)+24|0)>>3]=17976931348623157e292,i[s>>3]=-17976931348623157e292,i[(v=e+(D<<5)+16|0)>>3]=-17976931348623157e292,m=17976931348623157e292,E=-17976931348623157e292,o=0,p=b,d=17976931348623157e292,y=17976931348623157e292,_=-17976931348623157e292,l=-17976931348623157e292;c=+i[p>>3],k=+i[p+8>>3],p=0|n[p+16>>2],B=+i[((w=0==(0|p))?b:p)+8>>3],c>3]=c,d=c),k>3]=k,y=k),c>_?i[s>>3]=c:c=_,k>l&&(i[v>>3]=k,l=k),m=k>0&kE?k:E,o|=+u(+(k-B))>3.141592653589793,!w;)_=c;o&&(i[v>>3]=E,i[g>>3]=m)}else n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,n[s+12>>2]=0,n[s+16>>2]=0,n[s+20>>2]=0,n[s+24>>2]=0,n[s+28>>2]=0;o=D+1|0}if(a=0|n[(S=a+8|0)>>2],n[S>>2]=0,!a){O=45;break}D=o,g=t}if(21==(0|O))x(22765,22787,35,22799);else if(23==(0|O))x(22819,22787,37,22799);else if(27==(0|O))x(22862,22787,61,22885);else if(45==(0|O)){A:do{if((0|R)>0){for(S=0==(0|o),P=o<<2,I=0==(0|A),Q=0,t=0;;){if(C=0|n[r+(Q<<2)>>2],S)O=73;else{if(!(D=0|Ce(P))){O=50;break}if(!(M=0|Ce(P))){O=52;break}e:do{if(I)f=0;else{for(o=0,f=0,s=A;a=e+(o<<5)|0,0|oe(0|n[s>>2],a,0|n[C>>2])?(n[D+(f<<2)>>2]=s,n[M+(f<<2)>>2]=a,w=f+1|0):w=f,s=0|n[s+8>>2];)o=o+1|0,f=w;if((0|w)>0)if(a=0|n[D>>2],1==(0|w))f=a;else for(v=0,p=-1,f=a,g=a;;){for(b=0|n[g>>2],a=0,s=0;h=(0|(o=0|n[n[D+(s<<2)>>2]>>2]))==(0|b)?a:a+(1&(0|oe(o,0|n[M+(s<<2)>>2],0|n[b>>2])))|0,(0|(s=s+1|0))!=(0|w);)a=h;if(f=(o=(0|h)>(0|p))?g:f,(0|(a=v+1|0))==(0|w))break e;v=a,p=o?h:p,g=0|n[D+(a<<2)>>2]}else f=0}}while(0);if(Qe(D),Qe(M),f){if(a=0|n[(o=f+4|0)>>2])f=a+8|0;else if(0|n[f>>2]){O=70;break}n[f>>2]=C,n[o>>2]=C}else O=73}if(73==(0|O)){if(O=0,0|(t=0|n[C>>2]))do{M=t,t=0|n[t+16>>2],Qe(M)}while(0!=(0|t));Qe(C),t=1}if((0|(Q=Q+1|0))>=(0|R)){T=t;break A}}50==(0|O)?x(23004,22787,249,23023):52==(0|O)?x(23042,22787,252,23023):70==(0|O)&&x(22862,22787,61,22885)}else T=0}while(0);return Qe(r),Qe(e),0|(O=T)}return 0}function oe(A,e,r){A|=0;var t=0,f=0,a=0,o=0,u=0,c=0,s=0,l=0;if(!(0|V(e|=0,r|=0)))return 0|(A=0);if(e=0|$(e),t=+i[r>>3],f=e&(f=+i[r+8>>3])<0?f+6.283185307179586:f,!(A=0|n[A>>2]))return 0|(A=0);if(e){e=0,s=f,r=A;A:for(;;){for(;o=+i[r>>3],f=+i[r+8>>3],l=0|n[(r=r+16|0)>>2],a=+i[(l=0==(0|l)?A:l)>>3],u=+i[l+8>>3],o>a?(c=o,o=u):(c=a,a=o,o=f,f=u),(t=t==a|t==c?t+2220446049250313e-31:t)c;)if(!(r=0|n[r>>2])){r=22;break A}if(((c=(u=o<0?o+6.283185307179586:o)+(t-a)/(c-a)*((o=f<0?f+6.283185307179586:f)-u))<0?c+6.283185307179586:c)>(s=u==s|o==s?s+-2220446049250313e-31:s)&&(e^=1),!(r=0|n[r>>2])){r=22;break}}if(22==(0|r))return 0|e}else{e=0,s=f,r=A;A:for(;;){for(;o=+i[r>>3],f=+i[r+8>>3],l=0|n[(r=r+16|0)>>2],a=+i[(l=0==(0|l)?A:l)>>3],u=+i[l+8>>3],o>a?(c=o,o=u):(c=a,a=o,o=f,f=u),(t=t==a|t==c?t+2220446049250313e-31:t)c;)if(!(r=0|n[r>>2])){r=22;break A}if(o+(t-a)/(c-a)*(f-o)>(s=o==s|f==s?s+-2220446049250313e-31:s)&&(e^=1),!(r=0|n[r>>2])){r=22;break}}if(22==(0|r))return 0|e}return 0}function ue(A,e,r,i,f){r|=0,i|=0,f|=0;var a,o,u,c,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0;if(c=I,I=I+32|0,y=c+16|0,u=c,s=0|Ne(0|(A|=0),0|(e|=0),52),k(),s&=15,v=0|Ne(0|r,0|i,52),k(),(0|s)!=(15&v|0))return I=c,0|(y=12);if(h=0|Ne(0|A,0|e,45),k(),h&=127,g=0|Ne(0|r,0|i,45),k(),h>>>0>121|(g&=127)>>>0>121)return I=c,0|(y=5);if(v=(0|h)!=(0|g)){if(7==(0|(d=0|H(h,g))))return I=c,0|(y=1);7==(0|(b=0|H(g,h)))?x(23066,23090,161,23100):(p=d,l=b)}else p=0,l=0;a=0|U(h),o=0|U(g),n[y>>2]=0,n[y+4>>2]=0,n[y+8>>2]=0,n[y+12>>2]=0;do{if(p){if(d=(0|(g=0|n[4272+(28*h|0)+(p<<2)>>2]))>0,o)if(d){h=0,b=r,d=i;do{b=0|NA(b,d),d=0|k(),1==(0|(l=0|hA(l)))&&(l=0|hA(1)),h=h+1|0}while((0|h)!=(0|g));g=l,h=b,b=d}else g=l,h=r,b=i;else if(d){h=0,b=r,d=i;do{b=0|YA(b,d),d=0|k(),l=0|hA(l),h=h+1|0}while((0|h)!=(0|g));g=l,h=b,b=d}else g=l,h=r,b=i;if(jA(h,b,y),v||x(23115,23090,191,23100),(d=0!=(0|a))&(l=0!=(0|o))&&x(23142,23090,192,23100),d){if(7==(0|(l=0|GA(A,e)))){s=5;break}if(0|t[21872+(7*l|0)+p>>0]){s=1;break}h=b=0|n[21040+(28*l|0)+(p<<2)>>2]}else if(l){if(7==(0|(l=0|GA(h,b)))){s=5;break}if(0|t[21872+(7*l|0)+g>>0]){s=1;break}h=0,b=0|n[21040+(28*g|0)+(l<<2)>>2]}else h=0,b=0;if((h|b|0)<0)s=5;else{if((0|b)>0){d=y+4|0,l=0;do{dA(d),l=l+1|0}while((0|l)!=(0|b))}if(n[u>>2]=0,n[u+4>>2]=0,n[u+8>>2]=0,sA(u,p),0|s)for(;0|zA(s)?uA(u):cA(u),(0|s)>1;)s=s+-1|0;if((0|h)>0){s=0;do{dA(u),s=s+1|0}while((0|s)!=(0|h))}eA(w=y+4|0,u,w),q(w),w=51}}else if(jA(r,i,y),0!=(0|a)&0!=(0|o))if((0|g)!=(0|h)&&x(23173,23090,261,23100),7==(0|(l=0|GA(A,e)))|7==(0|(s=0|GA(r,i))))s=5;else if(0|t[21872+(7*l|0)+s>>0])s=1;else if((0|(l=0|n[21040+(28*l|0)+(s<<2)>>2]))>0){d=y+4|0,s=0;do{dA(d),s=s+1|0}while((0|s)!=(0|l));w=51}else w=51;else w=51}while(0);return 51==(0|w)&&(s=y+4|0,n[f>>2]=n[s>>2],n[f+4>>2]=n[s+4>>2],n[f+8>>2]=n[s+8>>2],s=0),I=c,0|(y=s)}function ce(A,e,r,t){r|=0,t|=0;var i,f,a,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0;if(a=I,I=I+48|0,i=a+36|0,c=a+24|0,s=a+12|0,l=a,o=0|Ne(0|(A|=0),0|(e|=0),52),k(),o&=15,b=0|Ne(0|A,0|e,45),k(),(b&=127)>>>0>121)return I=a,0|(t=5);if(f=0|U(b),Ye(0|o,0,52),v=134225919|k(),n[(u=t)>>2]=-1,n[u+4>>2]=v,!o)return 7==(0|(o=0|nA(r)))||127==(0|(o=0|j(b,o)))?(I=a,0|(v=1)):(h=0|Ye(0|o,0,45),g=0|k(),g=-1040385&n[(b=t)+4>>2]|g,n[(v=t)>>2]=n[b>>2]|h,n[v+4>>2]=g,I=a,0|(v=0));for(n[i>>2]=n[r>>2],n[i+4>>2]=n[r+4>>2],n[i+8>>2]=n[r+8>>2],r=o;;){if(u=r,r=r+-1|0,n[c>>2]=n[i>>2],n[c+4>>2]=n[i+4>>2],n[c+8>>2]=n[i+8>>2],0|zA(u)){if(0|(o=0|iA(i))){r=13;break}n[s>>2]=n[i>>2],n[s+4>>2]=n[i+4>>2],n[s+8>>2]=n[i+8>>2],uA(s)}else{if(0|(o=0|fA(i))){r=13;break}n[s>>2]=n[i>>2],n[s+4>>2]=n[i+4>>2],n[s+8>>2]=n[i+8>>2],cA(s)}if(rA(c,s,l),q(l),w=0|n[(o=t)>>2],o=0|n[o+4>>2],p=0|Ye(7,0,0|(y=3*(15-u|0)|0)),o&=~(0|k()),y=0|Ye(0|nA(l),0,0|y),o=0|k()|o,n[(v=t)>>2]=y|w&~p,n[v+4>>2]=o,(0|u)<=1){r=14;break}}A:do{if(13!=(0|r)&&14==(0|r))if((0|n[i>>2])<=1&&(0|n[i+4>>2])<=1&&(0|n[i+8>>2])<=1){l=127==(0|(o=0|j(b,r=0|nA(i))))?0:0|U(o);e:do{if(r){if(f){if(7==(0|(o=0|GA(A,e)))){o=5;break A}if((0|(u=0|n[21248+(28*o|0)+(r<<2)>>2]))>0){o=r,r=0;do{o=0|bA(o),r=r+1|0}while((0|r)!=(0|u))}else o=r;if(1==(0|o)){o=9;break A}127==(0|(r=0|j(b,o)))&&x(23200,23090,411,23230),0|U(r)?x(23245,23090,412,23230):(g=r,h=u,d=o)}else g=o,h=0,d=r;if((0|(s=0|n[4272+(28*b|0)+(d<<2)>>2]))<=-1&&x(23276,23090,419,23230),!l){if((0|h)<0){o=5;break A}if(0|h){o=0,r=0|n[(u=t)>>2],u=0|n[u+4>>2];do{r=0|UA(r,u),u=0|k(),n[(y=t)>>2]=r,n[y+4>>2]=u,o=o+1|0}while((0|o)<(0|h))}if((0|s)<=0){o=g,r=58;break}for(o=0,r=0|n[(u=t)>>2],u=0|n[u+4>>2];;)if(r=0|UA(r,u),u=0|k(),n[(y=t)>>2]=r,n[y+4>>2]=u,(0|(o=o+1|0))==(0|s)){o=g,r=58;break e}}if(7==(0|(c=0|H(g,b)))&&x(23066,23090,428,23230),r=0|n[(o=t)>>2],o=0|n[o+4>>2],(0|s)>0){u=0;do{r=0|UA(r,o),o=0|k(),n[(y=t)>>2]=r,n[y+4>>2]=o,u=u+1|0}while((0|u)!=(0|s))}if(7==(0|(o=0|GA(r,o)))&&x(23313,23090,440,23230),r=0|N(g),(0|(r=0|n[(r?21664:21456)+(28*c|0)+(o<<2)>>2]))<0&&x(23313,23090,454,23230),r){o=0,u=0|n[(c=t)>>2],c=0|n[c+4>>2];do{u=0|LA(u,c),c=0|k(),n[(y=t)>>2]=u,n[y+4>>2]=c,o=o+1|0}while((0|o)<(0|r));o=g,r=58}else o=g,r=58}else if(0!=(0|f)&0!=(0|l)){if(7==(0|(r=0|GA(A,e)))|7==(0|(u=0|GA(0|n[(u=t)>>2],0|n[u+4>>2])))){o=5;break A}if((0|(u=0|n[21248+(28*r|0)+(u<<2)>>2]))<0){o=5;break A}if(u){r=0,c=0|n[(s=t)>>2],s=0|n[s+4>>2];do{c=0|UA(c,s),s=0|k(),n[(y=t)>>2]=c,n[y+4>>2]=s,r=r+1|0}while((0|r)<(0|u));r=58}else r=59}else r=58}while(0);if(58==(0|r)&&l&&(r=59),59==(0|r)&&1==(0|GA(0|n[(y=t)>>2],0|n[y+4>>2]))){o=9;break}p=0|n[(y=t)>>2],y=-1040385&n[y+4>>2],w=0|Ye(0|o,0,45),y=0|y|k(),n[(o=t)>>2]=p|w,n[o+4>>2]=y,o=0}else o=1}while(0);return I=a,0|(y=o)}function se(A,e,r,t){A|=0,e|=0;var n=0,i=0,f=0;if(0==(0|(r|=0))&0==(0|(t|=0)))return i=1,B(0|(n=0)),0|i;i=A,n=e,A=1,e=0;do{A=0|Fe(0|((f=0==(1&r|0)&!0)?1:i),0|(f?0:n),0|A,0|e),e=0|k(),r=0|Ue(0|r,0|t,1),t=0|k(),i=0|Fe(0|i,0|n,0|i,0|n),n=0|k()}while(!(0==(0|r)&0==(0|t)));return B(0|e),0|A}function le(A,e,r){A|=0;var t,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0;if(!(0|V(e|=0,r|=0)))return 0|(b=0);if(e=0|$(e),f=+i[r>>3],a=e&(a=+i[r+8>>3])<0?a+6.283185307179586:a,(0|(b=0|n[A>>2]))<=0)return 0|(b=0);if(t=0|n[A+4>>2],e){e=0,d=a,r=-1,A=0;A:for(;;){for(l=A;u=+i[t+(l<<4)>>3],a=+i[t+(l<<4)+8>>3],o=+i[t+((A=(r+2|0)%(0|b)|0)<<4)>>3],c=+i[t+(A<<4)+8>>3],u>o?(s=u,u=c):(s=o,o=u,u=a,a=c),(f=f==o|f==s?f+2220446049250313e-31:f)s;){if((0|(r=l+1|0))>=(0|b)){r=22;break A}A=l,l=r,r=A}if(((s=(c=u<0?u+6.283185307179586:u)+(f-o)/(s-o)*((u=a<0?a+6.283185307179586:a)-c))<0?s+6.283185307179586:s)>(d=c==d|u==d?d+-2220446049250313e-31:d)&&(e^=1),(0|(A=l+1|0))>=(0|b)){r=22;break}r=l}if(22==(0|r))return 0|e}else{e=0,d=a,r=-1,A=0;A:for(;;){for(l=A;u=+i[t+(l<<4)>>3],a=+i[t+(l<<4)+8>>3],o=+i[t+((A=(r+2|0)%(0|b)|0)<<4)>>3],c=+i[t+(A<<4)+8>>3],u>o?(s=u,u=c):(s=o,o=u,u=a,a=c),(f=f==o|f==s?f+2220446049250313e-31:f)s;){if((0|(r=l+1|0))>=(0|b)){r=22;break A}A=l,l=r,r=A}if(u+(f-o)/(s-o)*(a-u)>(d=u==d|a==d?d+-2220446049250313e-31:d)&&(e^=1),(0|(A=l+1|0))>=(0|b)){r=22;break}r=l}if(22==(0|r))return 0|e}return 0}function de(A,e){e|=0;var r,t,f,a,o,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0;if(!(t=0|n[(A|=0)>>2]))return n[e>>2]=0,n[e+4>>2]=0,n[e+8>>2]=0,n[e+12>>2]=0,n[e+16>>2]=0,n[e+20>>2]=0,n[e+24>>2]=0,void(n[e+28>>2]=0);if(i[(f=e+8|0)>>3]=17976931348623157e292,i[(a=e+24|0)>>3]=17976931348623157e292,i[e>>3]=-17976931348623157e292,i[(o=e+16|0)>>3]=-17976931348623157e292,!((0|t)<=0)){for(r=0|n[A+4>>2],v=17976931348623157e292,p=-17976931348623157e292,w=0,A=-1,d=17976931348623157e292,b=17976931348623157e292,g=-17976931348623157e292,s=-17976931348623157e292,y=0;c=+i[r+(y<<4)>>3],h=+i[r+(y<<4)+8>>3],l=+i[r+(((0|(A=A+2|0))==(0|t)?0:A)<<4)+8>>3],c>3]=c,d=c),h>3]=h,b=h),c>g?i[e>>3]=c:c=g,h>s&&(i[o>>3]=h,s=h),v=h>0&hp?h:p,w|=+u(+(h-l))>3.141592653589793,(0|(A=y+1|0))!=(0|t);)_=y,g=c,y=A,A=_;w&&(i[o>>3]=p,i[a>>3]=v)}}function be(A,e){e|=0;var r,t=0,f=0,a=0,o=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0,m=0,E=0,B=0,k=0,x=0;if(p=0|n[(A|=0)>>2]){if(i[(w=e+8|0)>>3]=17976931348623157e292,i[(y=e+24|0)>>3]=17976931348623157e292,i[e>>3]=-17976931348623157e292,i[(_=e+16|0)>>3]=-17976931348623157e292,(0|p)>0){for(a=0|n[A+4>>2],g=17976931348623157e292,v=-17976931348623157e292,f=0,t=-1,l=17976931348623157e292,d=17976931348623157e292,h=-17976931348623157e292,c=-17976931348623157e292,m=0;o=+i[a+(m<<4)>>3],b=+i[a+(m<<4)+8>>3],s=+i[a+(((0|(k=t+2|0))==(0|p)?0:k)<<4)+8>>3],o>3]=o,l=o),b>3]=b,d=b),o>h?i[e>>3]=o:o=h,b>c&&(i[_>>3]=b,c=b),g=b>0&bv?b:v,f|=+u(+(b-s))>3.141592653589793,(0|(t=m+1|0))!=(0|p);)k=m,h=o,m=t,t=k;f&&(i[_>>3]=v,i[y>>3]=g)}}else n[e>>2]=0,n[e+4>>2]=0,n[e+8>>2]=0,n[e+12>>2]=0,n[e+16>>2]=0,n[e+20>>2]=0,n[e+24>>2]=0,n[e+28>>2]=0;if(!((0|(t=0|n[(k=A+8|0)>>2]))<=0)){r=A+12|0,B=0;do{if(a=0|n[r>>2],f=B,y=e+((B=B+1|0)<<5)|0,_=0|n[a+(f<<3)>>2]){if(i[(m=e+(B<<5)+8|0)>>3]=17976931348623157e292,i[(A=e+(B<<5)+24|0)>>3]=17976931348623157e292,i[y>>3]=-17976931348623157e292,i[(E=e+(B<<5)+16|0)>>3]=-17976931348623157e292,(0|_)>0){for(p=0|n[a+(f<<3)+4>>2],g=17976931348623157e292,v=-17976931348623157e292,a=0,f=-1,w=0,l=17976931348623157e292,d=17976931348623157e292,b=-17976931348623157e292,c=-17976931348623157e292;o=+i[p+(w<<4)>>3],h=+i[p+(w<<4)+8>>3],s=+i[p+(((0|(f=f+2|0))==(0|_)?0:f)<<4)+8>>3],o>3]=o,l=o),h>3]=h,d=h),o>b?i[y>>3]=o:o=b,h>c&&(i[E>>3]=h,c=h),g=h>0&hv?h:v,a|=+u(+(h-s))>3.141592653589793,(0|(f=w+1|0))!=(0|_);)x=w,w=f,b=o,f=x;a&&(i[E>>3]=v,i[A>>3]=g)}}else n[y>>2]=0,n[y+4>>2]=0,n[y+8>>2]=0,n[y+12>>2]=0,n[y+16>>2]=0,n[y+20>>2]=0,n[y+24>>2]=0,n[y+28>>2]=0,t=0|n[k>>2]}while((0|B)<(0|t))}}function he(A,e,r){var t=0,i=0,f=0;if(!(0|le(A|=0,e|=0,r|=0)))return 0|(i=0);if((0|n[(i=A+8|0)>>2])<=0)return 0|(i=1);for(t=A+12|0,A=0;;){if(f=A,A=A+1|0,0|le((0|n[t>>2])+(f<<3)|0,e+(A<<5)|0,r)){A=0,t=6;break}if((0|A)>=(0|n[i>>2])){A=1,t=6;break}}return 6==(0|t)?0|A:0}function ge(A,e,r,t,n){e|=0,r|=0,t|=0,n|=0;var f,a,o,u,c,s,l,d=0;u=+i[(A|=0)>>3],o=+i[e>>3]-u,a=+i[A+8>>3],f=+i[e+8>>3]-a,s=+i[r>>3],d=((d=+i[t>>3]-s)*(a-(l=+i[r+8>>3]))-(u-s)*(c=+i[t+8>>3]-l))/(o*c-f*d),i[n>>3]=u+o*d,i[n+8>>3]=a+f*d}function ve(A,e){return e|=0,+u(+(+i[(A|=0)>>3]-+i[e>>3]))<1.1920928955078125e-7?0|(e=+u(+(+i[A+8>>3]-+i[e+8>>3]))<1.1920928955078125e-7):0|(e=0)}function pe(A,e){e|=0;var r,t,n;return+((n=+i[(A|=0)>>3]-+i[e>>3])*n+(t=+i[A+8>>3]-+i[e+8>>3])*t+(r=+i[A+16>>3]-+i[e+16>>3])*r)}function we(A,e,r){r|=0;var t,i,f,a,o=0,u=0,c=0;if(a=I,I=I+32|0,c=a,0|(o=0|HA(A|=0,e|=0,i=a+16|0)))return I=a,0|(r=o);t=0|SA(A,e),f=0|GA(A,e),function(A,e){A=7696+(28*(A|=0)|0)|0,n[(e|=0)>>2]=n[A>>2],n[e+4>>2]=n[A+4>>2],n[e+8>>2]=n[A+8>>2],n[e+12>>2]=n[A+12>>2]}(t,c),o=0|function(A,e){A|=0;var r=0,t=0;if((e|=0)>>>0>20)return-1;do{if((0|n[11120+(216*e|0)>>2])!=(0|A))if((0|n[11120+(216*e|0)+8>>2])!=(0|A))if((0|n[11120+(216*e|0)+16>>2])!=(0|A))if((0|n[11120+(216*e|0)+24>>2])!=(0|A))if((0|n[11120+(216*e|0)+32>>2])!=(0|A))if((0|n[11120+(216*e|0)+40>>2])!=(0|A))if((0|n[11120+(216*e|0)+48>>2])!=(0|A))if((0|n[11120+(216*e|0)+56>>2])!=(0|A))if((0|n[11120+(216*e|0)+64>>2])!=(0|A))if((0|n[11120+(216*e|0)+72>>2])!=(0|A))if((0|n[11120+(216*e|0)+80>>2])!=(0|A))if((0|n[11120+(216*e|0)+88>>2])!=(0|A))if((0|n[11120+(216*e|0)+96>>2])!=(0|A))if((0|n[11120+(216*e|0)+104>>2])!=(0|A))if((0|n[11120+(216*e|0)+112>>2])!=(0|A))if((0|n[11120+(216*e|0)+120>>2])!=(0|A))if((0|n[11120+(216*e|0)+128>>2])!=(0|A)){if((0|n[11120+(216*e|0)+136>>2])!=(0|A)){if((0|n[11120+(216*e|0)+144>>2])==(0|A)){A=0,r=2,t=0;break}if((0|n[11120+(216*e|0)+152>>2])==(0|A)){A=0,r=2,t=1;break}if((0|n[11120+(216*e|0)+160>>2])==(0|A)){A=0,r=2,t=2;break}if((0|n[11120+(216*e|0)+168>>2])==(0|A)){A=1,r=2,t=0;break}if((0|n[11120+(216*e|0)+176>>2])==(0|A)){A=1,r=2,t=1;break}if((0|n[11120+(216*e|0)+184>>2])==(0|A)){A=1,r=2,t=2;break}if((0|n[11120+(216*e|0)+192>>2])==(0|A)){A=2,r=2,t=0;break}if((0|n[11120+(216*e|0)+200>>2])==(0|A)){A=2,r=2,t=1;break}if((0|n[11120+(216*e|0)+208>>2])==(0|A)){A=2,r=2,t=2;break}return-1}A=2,r=1,t=2}else A=2,r=1,t=1;else A=2,r=1,t=0;else A=1,r=1,t=2;else A=1,r=1,t=1;else A=1,r=1,t=0;else A=0,r=1,t=2;else A=0,r=1,t=1;else A=0,r=1,t=0;else A=2,r=0,t=2;else A=2,r=0,t=1;else A=2,r=0,t=0;else A=1,r=0,t=2;else A=1,r=0,t=1;else A=1,r=0,t=0;else A=0,r=0,t=2;else A=0,r=0,t=1;else A=0,r=0,t=0}while(0);return 0|n[11120+(216*e|0)+(72*r|0)+(24*A|0)+(t<<3)+4>>2]}(t,0|n[i>>2]);A:do{if(0|U(t)){switch(0|t){case 4:A=0;break;case 14:A=1;break;case 24:A=2;break;case 38:A=3;break;case 49:A=4;break;case 58:A=5;break;case 63:A=6;break;case 72:A=7;break;case 83:A=8;break;case 97:A=9;break;case 107:A=10;break;case 117:A=11;break;default:o=1;break A}if(u=0|n[22e3+(24*A|0)+8>>2],e=0|n[22e3+(24*A|0)+16>>2],(0|(A=0|n[i>>2]))!=(0|n[c>>2])&&(c=0|N(t))|(0|(A=0|n[i>>2]))==(0|e)&&(o=(o+1|0)%6|0),3==(0|f)&(0|A)==(0|e)){o=(o+5|0)%6|0,u=22;break}5==(0|f)&(0|A)==(0|u)?(o=(o+1|0)%6|0,u=22):u=22}else u=22}while(0);return 22==(0|u)&&(n[r>>2]=o,o=0),I=a,0|(r=o)}function ye(A,e,r,t){r|=0,t|=0;var i,f,a,o,u,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0;if(u=I,I=I+32|0,y=u+24|0,o=u+20|0,a=u+8|0,f=u+16|0,i=u,b=(b=0==(0|FA(A|=0,e|=0)))?6:5,g=0|Ne(0|A,0|e,52),k(),b>>>0<=r>>>0)return I=u,0|(t=2);!(v=0==(0|(g&=15)))&&0==((p=0|Ye(7,0,3*(15^g)|0))&A|0)&0==((0|k())&e|0)?c=r:s=4;A:do{if(4==(0|s)){if((0|((c=0!=(0|FA(A,e)))?4:5))<(0|r))return I=u,0|(t=1);if(0|we(A,e,y))return I=u,0|(t=1);if(s=(0|n[y>>2])+r|0,7==(0|(p=0|n[(c=c?22288+(((0|s)%5|0)<<2)|0:22320+(((0|s)%6|0)<<2)|0)>>2])))return I=u,0|(t=1);n[o>>2]=0,c=0|F(A,e,p,o,a);do{if(!c){if(h=0|n[(d=a)>>2],s=(l=(d=0|n[d+4>>2])>>>0>>0|(0|d)==(0|e)&h>>>0>>0)?h:A,l=l?d:e,!v&&0==(h&(v=0|Ye(7,0,3*(15^g)|0))|0)&0==(d&(0|k())|0))c=r;else{if(d=(r+-1+b|0)%(0|b)|0,c=0|FA(A,e),(0|d)<0&&x(23313,23315,245,23324),(0|((b=0!=(0|c))?4:5))<(0|d)&&x(23313,23315,245,23324),0|we(A,e,y)&&x(23313,23315,245,23324),c=(0|n[y>>2])+d|0,7==(0|(d=0|n[(c=b?22288+(((0|c)%5|0)<<2)|0:22320+(((0|c)%6|0)<<2)|0)>>2]))&&x(23313,23315,245,23324),n[f>>2]=0,0|(c=0|F(A,e,d,f,i)))break;b=0|n[(h=i)>>2],h=0|n[h+4>>2];do{if(h>>>0>>0|(0|h)==(0|l)&b>>>0>>0){if(s=0|FA(b,h)?0|G(b,h,A,e):0|n[22384+((((0|n[f>>2])+(0|n[22352+(d<<2)>>2])|0)%6|0)<<2)>>2],c=0|FA(b,h),(s+-1|0)>>>0>5){c=-1,s=b,l=h;break}if(1==(0|s)&(c=0!=(0|c))){c=-1,s=b,l=h;break}do{if(!(0|we(b,h,y))){if(c){c=(5+(0|n[21936+(s<<2)>>2])-(0|n[y>>2])|0)%5|0;break}c=(6+(0|n[21968+(s<<2)>>2])-(0|n[y>>2])|0)%6|0;break}c=-1}while(0);s=b,l=h}else c=r}while(0);h=0|n[(d=a)>>2],d=0|n[d+4>>2]}if((0|s)==(0|h)&(0|l)==(0|d)){if(A=(b=0!=(0|FA(h,d)))?0|G(h,d,A,e):0|n[22384+((((0|n[o>>2])+(0|n[22352+(p<<2)>>2])|0)%6|0)<<2)>>2],c=0|FA(h,d),(A+-1|0)>>>0<=5&&!(1==(0|A)&(w=0!=(0|c))))do{if(!(0|we(h,d,y))){if(w){c=(5+(0|n[21936+(A<<2)>>2])-(0|n[y>>2])|0)%5|0;break}c=(6+(0|n[21968+(A<<2)>>2])-(0|n[y>>2])|0)%6|0;break}c=-1}while(0);else c=-1;c=6==(0|(c=c+1|0))|b&5==(0|c)?0:c}e=l,A=s;break A}}while(0);return I=u,0|(t=c)}}while(0);return w=0|Ye(0|c,0,56),y=0|k()|-2130706433&e|536870912,n[t>>2]=w|A,n[t+4>>2]=y,I=u,0|(t=0)}function _e(A,e,r){A|=0,r|=0;var t=0;(0|(e|=0))>0?(t=0|Pe(e,4),n[A>>2]=t,t||x(23337,23360,40,23374)):n[A>>2]=0,n[A+4>>2]=e,n[A+8>>2]=0,n[A+12>>2]=r}function me(A){var e,r,t,f=0,a=0,o=0,c=0;e=(A|=0)+4|0,r=A+12|0,t=A+8|0;A:for(;;){for(a=0|n[e>>2],f=0;;){if((0|f)>=(0|a))break A;if(o=0|n[A>>2],c=0|n[o+(f<<2)>>2])break;f=f+1|0}f=o+(~~(+u(+ +s(10,+ +(15-(0|n[r>>2])|0))*(+i[c>>3]+ +i[c+8>>3]))%+(0|a))>>>0<<2)|0,a=0|n[f>>2];e:do{if(0|a){if(o=c+32|0,(0|a)==(0|c))n[f>>2]=n[o>>2];else{if(!(f=0|n[(a=a+32|0)>>2]))break;for(;(0|f)!=(0|c);)if(!(f=0|n[(a=f+32|0)>>2]))break e;n[a>>2]=n[o>>2]}Qe(c),n[t>>2]=(0|n[t>>2])-1}}while(0)}Qe(0|n[A>>2])}function Ee(A){var e,r=0,t=0;for(e=0|n[(A|=0)+4>>2],t=0;;){if((0|t)>=(0|e)){r=0,t=4;break}if(r=0|n[(0|n[A>>2])+(t<<2)>>2]){t=4;break}t=t+1|0}return 4==(0|t)?0|r:0}function Be(A,e){e|=0;var r=0,t=0,f=0,a=0;if(r=~~(+u(+ +s(10,+ +(15-(0|n[(A|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,r=(0|n[A>>2])+(r<<2)|0,!(t=0|n[r>>2]))return 0|(a=1);a=e+32|0;do{if((0|t)!=(0|e)){if(!(r=0|n[t+32>>2]))return 0|(a=1);for(f=r;;){if((0|f)==(0|e)){f=8;break}if(!(r=0|n[f+32>>2])){r=1,f=10;break}t=f,f=r}if(8==(0|f)){n[t+32>>2]=n[a>>2];break}if(10==(0|f))return 0|r}else n[r>>2]=n[a>>2]}while(0);return Qe(e),n[(a=A+8|0)>>2]=(0|n[a>>2])-1,0|(a=0)}function ke(A,e,r){A|=0,e|=0,r|=0;var t,f=0,a=0,o=0;(t=0|Ce(40))||x(23390,23360,98,23403),n[t>>2]=n[e>>2],n[t+4>>2]=n[e+4>>2],n[t+8>>2]=n[e+8>>2],n[t+12>>2]=n[e+12>>2],n[(a=t+16|0)>>2]=n[r>>2],n[a+4>>2]=n[r+4>>2],n[a+8>>2]=n[r+8>>2],n[a+12>>2]=n[r+12>>2],n[t+32>>2]=0,a=~~(+u(+ +s(10,+ +(15-(0|n[A+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,a=(0|n[A>>2])+(a<<2)|0,f=0|n[a>>2];do{if(f){for(;!(0|qA(f,e)&&0|qA(f+16|0,r));)if(a=0|n[f+32>>2],!(0|n[(f=0==(0|a)?f:a)+32>>2])){o=10;break}if(10==(0|o)){n[f+32>>2]=t;break}return Qe(t),0|(o=f)}n[a>>2]=t}while(0);return n[(o=A+8|0)>>2]=1+(0|n[o>>2]),0|(o=t)}function xe(A,e,r){e|=0,r|=0;var t=0,f=0;if(f=~~(+u(+ +s(10,+ +(15-(0|n[(A|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,!(f=0|n[(0|n[A>>2])+(f<<2)>>2]))return 0|(r=0);if(!r){for(A=f;;){if(0|qA(A,e)){t=10;break}if(!(A=0|n[A+32>>2])){A=0,t=10;break}}if(10==(0|t))return 0|A}for(A=f;;){if(0|qA(A,e)&&0|qA(A+16|0,r)){t=10;break}if(!(A=0|n[A+32>>2])){A=0,t=10;break}}return 10==(0|t)?0|A:0}function De(A,e){e|=0;var r=0;if(r=~~(+u(+ +s(10,+ +(15-(0|n[(A|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,!(A=0|n[(0|n[A>>2])+(r<<2)>>2]))return 0|(r=0);for(;;){if(0|qA(A,e)){e=5;break}if(!(A=0|n[A+32>>2])){A=0,e=5;break}}return 5==(0|e)?0|A:0}function Me(A){return 0|~~+function(A){return+ +Ve(+(A=+A))}(A=+A)}function Ce(A){A|=0;var e,r=0,t=0,i=0,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0,m=0;e=I,I=I+16|0,b=e;do{if(A>>>0<245){if(A=(s=A>>>0<11?16:A+11&-8)>>>3,3&(t=(d=0|n[5857])>>>A)|0)return i=0|n[(t=(A=23468+((r=(1&t^1)+A|0)<<1<<2)|0)+8|0)>>2],(0|(a=0|n[(f=i+8|0)>>2]))==(0|A)?n[5857]=d&~(1<>2]=A,n[t>>2]=a),m=r<<3,n[i+4>>2]=3|m,n[(m=i+m+4|0)>>2]=1|n[m>>2],I=e,0|(m=f);if(s>>>0>(l=0|n[5859])>>>0){if(0|t)return r=((r=t<>>=u=r>>>12&16)>>>5&8)|u|(a=(r>>>=t)>>>2&4)|(A=(r>>>=a)>>>1&2)|(i=(r>>>=A)>>>1&1))+(r>>>i)|0)<<1<<2)|0)+8|0)>>2],(0|(t=0|n[(u=a+8|0)>>2]))==(0|r)?(A=d&~(1<>2]=r,n[A>>2]=t,A=d),o=(m=i<<3)-s|0,n[a+4>>2]=3|s,n[(f=a+s|0)+4>>2]=1|o,n[a+m>>2]=o,0|l&&(i=0|n[5862],t=23468+((r=l>>>3)<<1<<2)|0,A&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=i,n[r+12>>2]=i,n[i+8>>2]=r,n[i+12>>2]=t),n[5859]=o,n[5862]=f,I=e,0|(m=u);if(a=0|n[5858]){for(t=(a&0-a)-1|0,t=c=0|n[23732+(((i=(t>>>=f=t>>>12&16)>>>5&8)|f|(o=(t>>>=i)>>>2&4)|(u=(t>>>=o)>>>1&2)|(c=(t>>>=u)>>>1&1))+(t>>>c)<<2)>>2],u=c,c=(-8&n[c+4>>2])-s|0;(A=0|n[t+16>>2])||(A=0|n[t+20>>2]);)t=A,u=(f=(o=(-8&n[A+4>>2])-s|0)>>>0>>0)?A:u,c=f?o:c;if((o=u+s|0)>>>0>u>>>0){f=0|n[u+24>>2],r=0|n[u+12>>2];do{if((0|r)==(0|u)){if(!(r=0|n[(A=u+20|0)>>2])&&!(r=0|n[(A=u+16|0)>>2])){t=0;break}for(;;)if(t=0|n[(i=r+20|0)>>2])r=t,A=i;else{if(!(t=0|n[(i=r+16|0)>>2]))break;r=t,A=i}n[A>>2]=0,t=r}else t=0|n[u+8>>2],n[t+12>>2]=r,n[r+8>>2]=t,t=r}while(0);do{if(0|f){if(r=0|n[u+28>>2],(0|u)==(0|n[(A=23732+(r<<2)|0)>>2])){if(n[A>>2]=t,!t){n[5858]=a&~(1<>2])==(0|u)?m:f+20|0)>>2]=t,!t)break;n[t+24>>2]=f,0|(r=0|n[u+16>>2])&&(n[t+16>>2]=r,n[r+24>>2]=t),0|(r=0|n[u+20>>2])&&(n[t+20>>2]=r,n[r+24>>2]=t)}}while(0);return c>>>0<16?(m=c+s|0,n[u+4>>2]=3|m,n[(m=u+m+4|0)>>2]=1|n[m>>2]):(n[u+4>>2]=3|s,n[o+4>>2]=1|c,n[o+c>>2]=c,0|l&&(i=0|n[5862],t=23468+((r=l>>>3)<<1<<2)|0,(r=1<>2]:(n[5857]=r|d,r=t,A=t+8|0),n[A>>2]=i,n[r+12>>2]=i,n[i+8>>2]=r,n[i+12>>2]=t),n[5859]=c,n[5862]=o),I=e,0|(m=u+8|0)}d=s}else d=s}else d=s}else if(A>>>0<=4294967231)if(s=-8&(A=A+11|0),i=0|n[5858]){f=0-s|0,c=(A>>>=8)?s>>>0>16777215?31:s>>>((c=14-((u=((v=A<<(d=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|d|(c=((v<<=u)+245760|0)>>>16&2))+(v<>>15)|0)+7|0)&1|c<<1:0,t=0|n[23732+(c<<2)>>2];A:do{if(t)for(A=0,u=s<<(31==(0|c)?0:25-(c>>>1)|0),a=0;;){if((o=(-8&n[t+4>>2])-s|0)>>>0>>0){if(!o){A=t,f=0,v=65;break A}A=t,f=o}if(a=0==(0|(v=0|n[t+20>>2]))|(0|v)==(0|(t=0|n[t+16+(u>>>31<<2)>>2]))?a:v,!t){t=a,v=61;break}u<<=1}else t=0,A=0,v=61}while(0);if(61==(0|v)){if(0==(0|t)&0==(0|A)){if(!(A=((A=2<>>=o=d>>>12&16)>>>5&8)|o|(u=(d>>>=a)>>>2&4)|(c=(d>>>=u)>>>1&2)|(t=(d>>>=c)>>>1&1))+(d>>>t)<<2)>>2]}t?v=65:(u=A,o=f)}if(65==(0|v))for(a=t;;){if(f=(t=(d=(-8&n[a+4>>2])-s|0)>>>0>>0)?d:f,A=t?a:A,(t=0|n[a+16>>2])||(t=0|n[a+20>>2]),!t){u=A,o=f;break}a=t}if(0!=(0|u)&&o>>>0<((0|n[5859])-s|0)>>>0&&(l=u+s|0)>>>0>u>>>0){a=0|n[u+24>>2],r=0|n[u+12>>2];do{if((0|r)==(0|u)){if(!(r=0|n[(A=u+20|0)>>2])&&!(r=0|n[(A=u+16|0)>>2])){r=0;break}for(;;)if(t=0|n[(f=r+20|0)>>2])r=t,A=f;else{if(!(t=0|n[(f=r+16|0)>>2]))break;r=t,A=f}n[A>>2]=0}else m=0|n[u+8>>2],n[m+12>>2]=r,n[r+8>>2]=m}while(0);do{if(a){if(A=0|n[u+28>>2],(0|u)==(0|n[(t=23732+(A<<2)|0)>>2])){if(n[t>>2]=r,!r){i&=~(1<>2])==(0|u)?m:a+20|0)>>2]=r,!r)break;n[r+24>>2]=a,0|(A=0|n[u+16>>2])&&(n[r+16>>2]=A,n[A+24>>2]=r),(A=0|n[u+20>>2])&&(n[r+20>>2]=A,n[A+24>>2]=r)}}while(0);A:do{if(o>>>0<16)m=o+s|0,n[u+4>>2]=3|m,n[(m=u+m+4|0)>>2]=1|n[m>>2];else{if(n[u+4>>2]=3|s,n[l+4>>2]=1|o,n[l+o>>2]=o,r=o>>>3,o>>>0<256){t=23468+(r<<1<<2)|0,(A=0|n[5857])&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=l,n[r+12>>2]=l,n[l+8>>2]=r,n[l+12>>2]=t;break}if(r=23732+((t=(r=o>>>8)?o>>>0>16777215?31:o>>>((t=14-((y=((m=r<<(_=(r+1048320|0)>>>16&8))+520192|0)>>>16&4)|_|(t=((m<<=y)+245760|0)>>>16&2))+(m<>>15)|0)+7|0)&1|t<<1:0)<<2)|0,n[l+28>>2]=t,n[(A=l+16|0)+4>>2]=0,n[A>>2]=0,!(i&(A=1<>2]=l,n[l+24>>2]=r,n[l+12>>2]=l,n[l+8>>2]=l;break}r=0|n[r>>2];e:do{if((-8&n[r+4>>2]|0)!=(0|o)){for(i=o<<(31==(0|t)?0:25-(t>>>1)|0);A=0|n[(t=r+16+(i>>>31<<2)|0)>>2];){if((-8&n[A+4>>2]|0)==(0|o)){r=A;break e}i<<=1,r=A}n[t>>2]=l,n[l+24>>2]=r,n[l+12>>2]=l,n[l+8>>2]=l;break A}}while(0);m=0|n[(_=r+8|0)>>2],n[m+12>>2]=l,n[_>>2]=l,n[l+8>>2]=m,n[l+12>>2]=r,n[l+24>>2]=0}}while(0);return I=e,0|(m=u+8|0)}d=s}else d=s;else d=-1}while(0);if((t=0|n[5859])>>>0>=d>>>0)return r=t-d|0,A=0|n[5862],r>>>0>15?(m=A+d|0,n[5862]=m,n[5859]=r,n[m+4>>2]=1|r,n[A+t>>2]=r,n[A+4>>2]=3|d):(n[5859]=0,n[5862]=0,n[A+4>>2]=3|t,n[(m=A+t+4|0)>>2]=1|n[m>>2]),I=e,0|(m=A+8|0);if((o=0|n[5860])>>>0>d>>>0)return y=o-d|0,n[5860]=y,_=(m=0|n[5863])+d|0,n[5863]=_,n[_+4>>2]=1|y,n[m+4>>2]=3|d,I=e,0|(m=m+8|0);if(0|n[5975]?A=0|n[5977]:(n[5977]=4096,n[5976]=4096,n[5978]=-1,n[5979]=-1,n[5980]=0,n[5968]=0,n[5975]=-16&b^1431655768,A=4096),u=d+48|0,(s=(a=A+(c=d+47|0)|0)&(f=0-A|0))>>>0<=d>>>0)return I=e,0|(m=0);if(0|(A=0|n[5967])&&(b=(l=0|n[5965])+s|0)>>>0<=l>>>0|b>>>0>A>>>0)return I=e,0|(m=0);A:do{if(4&n[5968])r=0,v=143;else{t=0|n[5863];e:do{if(t){for(i=23876;!((b=0|n[i>>2])>>>0<=t>>>0&&(b+(0|n[i+4>>2])|0)>>>0>t>>>0);){if(!(A=0|n[i+8>>2])){v=128;break e}i=A}if((r=a-o&f)>>>0<2147483647)if((0|(A=0|We(0|r)))==((0|n[i>>2])+(0|n[i+4>>2])|0)){if(-1!=(0|A)){o=r,a=A,v=145;break A}}else i=A,v=136;else r=0}else v=128}while(0);do{if(128==(0|v))if(-1!=(0|(t=0|We(0)))&&(r=t,g=(r=(0==((g=(h=0|n[5976])+-1|0)&r|0)?0:(g+r&0-h)-r|0)+s|0)+(h=0|n[5965])|0,r>>>0>d>>>0&r>>>0<2147483647)){if(0|(b=0|n[5967])&&g>>>0<=h>>>0|g>>>0>b>>>0){r=0;break}if((0|(A=0|We(0|r)))==(0|t)){o=r,a=t,v=145;break A}i=A,v=136}else r=0}while(0);do{if(136==(0|v)){if(t=0-r|0,!(u>>>0>r>>>0&r>>>0<2147483647&-1!=(0|i))){if(-1==(0|i)){r=0;break}o=r,a=i,v=145;break A}if((A=c-r+(A=0|n[5977])&0-A)>>>0>=2147483647){o=r,a=i,v=145;break A}if(-1==(0|We(0|A))){We(0|t),r=0;break}o=A+r|0,a=i,v=145;break A}}while(0);n[5968]=4|n[5968],v=143}}while(0);if(143==(0|v)&&s>>>0<2147483647&&!(-1==(0|(y=0|We(0|s)))|1^(w=(p=(g=0|We(0))-y|0)>>>0>(d+40|0)>>>0)|y>>>0>>0&-1!=(0|y)&-1!=(0|g)^1)&&(o=w?p:r,a=y,v=145),145==(0|v)){r=(0|n[5965])+o|0,n[5965]=r,r>>>0>(0|n[5966])>>>0&&(n[5966]=r),c=0|n[5863];A:do{if(c){for(r=23876;;){if((0|a)==((A=0|n[r>>2])+(t=0|n[r+4>>2])|0)){v=154;break}if(!(i=0|n[r+8>>2]))break;r=i}if(154==(0|v)&&(_=r+4|0,0==(8&n[r+12>>2]|0))&&a>>>0>c>>>0&A>>>0<=c>>>0){n[_>>2]=t+o,_=c+(y=0==(7&(y=c+8|0)|0)?0:0-y&7)|0,y=(m=(0|n[5860])+o|0)-y|0,n[5863]=_,n[5860]=y,n[_+4>>2]=1|y,n[c+m+4>>2]=40,n[5864]=n[5979];break}for(a>>>0<(0|n[5861])>>>0&&(n[5861]=a),t=a+o|0,r=23876;;){if((0|n[r>>2])==(0|t)){v=162;break}if(!(A=0|n[r+8>>2]))break;r=A}if(162==(0|v)&&0==(8&n[r+12>>2]|0)){n[r>>2]=a,n[(l=r+4|0)>>2]=(0|n[l>>2])+o,s=(l=a+(0==(7&(l=a+8|0)|0)?0:0-l&7)|0)+d|0,u=(r=t+(0==(7&(r=t+8|0)|0)?0:0-r&7)|0)-l-d|0,n[l+4>>2]=3|d;e:do{if((0|c)==(0|r))m=(0|n[5860])+u|0,n[5860]=m,n[5863]=s,n[s+4>>2]=1|m;else{if((0|n[5862])==(0|r)){m=(0|n[5859])+u|0,n[5859]=m,n[5862]=s,n[s+4>>2]=1|m,n[s+m>>2]=m;break}if(1==(3&(A=0|n[r+4>>2])|0)){o=-8&A,i=A>>>3;r:do{if(A>>>0<256){if(A=0|n[r+8>>2],(0|(t=0|n[r+12>>2]))==(0|A)){n[5857]=n[5857]&~(1<>2]=t,n[t+8>>2]=A;break}a=0|n[r+24>>2],A=0|n[r+12>>2];do{if((0|A)==(0|r)){if(A=0|n[(i=(t=r+16|0)+4|0)>>2])t=i;else if(!(A=0|n[t>>2])){A=0;break}for(;;)if(i=0|n[(f=A+20|0)>>2])A=i,t=f;else{if(!(i=0|n[(f=A+16|0)>>2]))break;A=i,t=f}n[t>>2]=0}else m=0|n[r+8>>2],n[m+12>>2]=A,n[A+8>>2]=m}while(0);if(!a)break;i=23732+((t=0|n[r+28>>2])<<2)|0;do{if((0|n[i>>2])==(0|r)){if(n[i>>2]=A,0|A)break;n[5858]=n[5858]&~(1<>2])==(0|r)?m:a+20|0)>>2]=A,!A)break r}while(0);if(n[A+24>>2]=a,0|(i=0|n[(t=r+16|0)>>2])&&(n[A+16>>2]=i,n[i+24>>2]=A),!(t=0|n[t+4>>2]))break;n[A+20>>2]=t,n[t+24>>2]=A}while(0);r=r+o|0,f=o+u|0}else f=u;if(n[(r=r+4|0)>>2]=-2&n[r>>2],n[s+4>>2]=1|f,n[s+f>>2]=f,r=f>>>3,f>>>0<256){t=23468+(r<<1<<2)|0,(A=0|n[5857])&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=s,n[r+12>>2]=s,n[s+8>>2]=r,n[s+12>>2]=t;break}r=f>>>8;do{if(r){if(f>>>0>16777215){i=31;break}i=f>>>((i=14-((y=((m=r<<(_=(r+1048320|0)>>>16&8))+520192|0)>>>16&4)|_|(i=((m<<=y)+245760|0)>>>16&2))+(m<>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=23732+(i<<2)|0,n[s+28>>2]=i,n[(A=s+16|0)+4>>2]=0,n[A>>2]=0,!((A=0|n[5858])&(t=1<>2]=s,n[s+24>>2]=r,n[s+12>>2]=s,n[s+8>>2]=s;break}r=0|n[r>>2];r:do{if((-8&n[r+4>>2]|0)!=(0|f)){for(i=f<<(31==(0|i)?0:25-(i>>>1)|0);A=0|n[(t=r+16+(i>>>31<<2)|0)>>2];){if((-8&n[A+4>>2]|0)==(0|f)){r=A;break r}i<<=1,r=A}n[t>>2]=s,n[s+24>>2]=r,n[s+12>>2]=s,n[s+8>>2]=s;break e}}while(0);m=0|n[(_=r+8|0)>>2],n[m+12>>2]=s,n[_>>2]=s,n[s+8>>2]=m,n[s+12>>2]=r,n[s+24>>2]=0}}while(0);return I=e,0|(m=l+8|0)}for(r=23876;!((A=0|n[r>>2])>>>0<=c>>>0&&(m=A+(0|n[r+4>>2])|0)>>>0>c>>>0);)r=0|n[r+8>>2];r=(A=(A=(f=m+-47|0)+(0==(7&(A=f+8|0)|0)?0:0-A&7)|0)>>>0<(f=c+16|0)>>>0?c:A)+8|0,_=a+(y=0==(7&(y=a+8|0)|0)?0:0-y&7)|0,y=(t=o+-40|0)-y|0,n[5863]=_,n[5860]=y,n[_+4>>2]=1|y,n[a+t+4>>2]=40,n[5864]=n[5979],n[(t=A+4|0)>>2]=27,n[r>>2]=n[5969],n[r+4>>2]=n[5970],n[r+8>>2]=n[5971],n[r+12>>2]=n[5972],n[5969]=a,n[5970]=o,n[5972]=0,n[5971]=r,r=A+24|0;do{_=r,n[(r=r+4|0)>>2]=7}while((_+8|0)>>>0>>0);if((0|A)!=(0|c)){if(a=A-c|0,n[t>>2]=-2&n[t>>2],n[c+4>>2]=1|a,n[A>>2]=a,r=a>>>3,a>>>0<256){t=23468+(r<<1<<2)|0,(A=0|n[5857])&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=c,n[r+12>>2]=c,n[c+8>>2]=r,n[c+12>>2]=t;break}if(t=23732+((i=(r=a>>>8)?a>>>0>16777215?31:a>>>((i=14-((y=((m=r<<(_=(r+1048320|0)>>>16&8))+520192|0)>>>16&4)|_|(i=((m<<=y)+245760|0)>>>16&2))+(m<>>15)|0)+7|0)&1|i<<1:0)<<2)|0,n[c+28>>2]=i,n[c+20>>2]=0,n[f>>2]=0,!((r=0|n[5858])&(A=1<>2]=c,n[c+24>>2]=t,n[c+12>>2]=c,n[c+8>>2]=c;break}r=0|n[t>>2];e:do{if((-8&n[r+4>>2]|0)!=(0|a)){for(i=a<<(31==(0|i)?0:25-(i>>>1)|0);A=0|n[(t=r+16+(i>>>31<<2)|0)>>2];){if((-8&n[A+4>>2]|0)==(0|a)){r=A;break e}i<<=1,r=A}n[t>>2]=c,n[c+24>>2]=r,n[c+12>>2]=c,n[c+8>>2]=c;break A}}while(0);m=0|n[(_=r+8|0)>>2],n[m+12>>2]=c,n[_>>2]=c,n[c+8>>2]=m,n[c+12>>2]=r,n[c+24>>2]=0}}else 0==(0|(m=0|n[5861]))|a>>>0>>0&&(n[5861]=a),n[5969]=a,n[5970]=o,n[5972]=0,n[5866]=n[5975],n[5865]=-1,n[5870]=23468,n[5869]=23468,n[5872]=23476,n[5871]=23476,n[5874]=23484,n[5873]=23484,n[5876]=23492,n[5875]=23492,n[5878]=23500,n[5877]=23500,n[5880]=23508,n[5879]=23508,n[5882]=23516,n[5881]=23516,n[5884]=23524,n[5883]=23524,n[5886]=23532,n[5885]=23532,n[5888]=23540,n[5887]=23540,n[5890]=23548,n[5889]=23548,n[5892]=23556,n[5891]=23556,n[5894]=23564,n[5893]=23564,n[5896]=23572,n[5895]=23572,n[5898]=23580,n[5897]=23580,n[5900]=23588,n[5899]=23588,n[5902]=23596,n[5901]=23596,n[5904]=23604,n[5903]=23604,n[5906]=23612,n[5905]=23612,n[5908]=23620,n[5907]=23620,n[5910]=23628,n[5909]=23628,n[5912]=23636,n[5911]=23636,n[5914]=23644,n[5913]=23644,n[5916]=23652,n[5915]=23652,n[5918]=23660,n[5917]=23660,n[5920]=23668,n[5919]=23668,n[5922]=23676,n[5921]=23676,n[5924]=23684,n[5923]=23684,n[5926]=23692,n[5925]=23692,n[5928]=23700,n[5927]=23700,n[5930]=23708,n[5929]=23708,n[5932]=23716,n[5931]=23716,_=a+(y=0==(7&(y=a+8|0)|0)?0:0-y&7)|0,y=(m=o+-40|0)-y|0,n[5863]=_,n[5860]=y,n[_+4>>2]=1|y,n[a+m+4>>2]=40,n[5864]=n[5979]}while(0);if((r=0|n[5860])>>>0>d>>>0)return y=r-d|0,n[5860]=y,_=(m=0|n[5863])+d|0,n[5863]=_,n[_+4>>2]=1|y,n[m+4>>2]=3|d,I=e,0|(m=m+8|0)}return n[(m=23424)>>2]=12,I=e,0|(m=0)}function Qe(A){var e=0,r=0,t=0,i=0,f=0,a=0,o=0,u=0;if(A|=0){r=A+-8|0,i=0|n[5861],u=r+(e=-8&(A=0|n[A+-4>>2]))|0;do{if(1&A)o=r,a=r;else{if(t=0|n[r>>2],!(3&A))return;if(f=t+e|0,(a=r+(0-t)|0)>>>0>>0)return;if((0|n[5862])==(0|a)){if(3!=(3&(e=0|n[(A=u+4|0)>>2])|0)){o=a,e=f;break}return n[5859]=f,n[A>>2]=-2&e,n[a+4>>2]=1|f,void(n[a+f>>2]=f)}if(r=t>>>3,t>>>0<256){if(A=0|n[a+8>>2],(0|(e=0|n[a+12>>2]))==(0|A)){n[5857]=n[5857]&~(1<>2]=e,n[e+8>>2]=A,o=a,e=f;break}i=0|n[a+24>>2],A=0|n[a+12>>2];do{if((0|A)==(0|a)){if(A=0|n[(r=(e=a+16|0)+4|0)>>2])e=r;else if(!(A=0|n[e>>2])){A=0;break}for(;;)if(r=0|n[(t=A+20|0)>>2])A=r,e=t;else{if(!(r=0|n[(t=A+16|0)>>2]))break;A=r,e=t}n[e>>2]=0}else o=0|n[a+8>>2],n[o+12>>2]=A,n[A+8>>2]=o}while(0);if(i){if(e=0|n[a+28>>2],(0|n[(r=23732+(e<<2)|0)>>2])==(0|a)){if(n[r>>2]=A,!A){n[5858]=n[5858]&~(1<>2])==(0|a)?o:i+20|0)>>2]=A,!A){o=a,e=f;break}n[A+24>>2]=i,0|(r=0|n[(e=a+16|0)>>2])&&(n[A+16>>2]=r,n[r+24>>2]=A),(e=0|n[e+4>>2])?(n[A+20>>2]=e,n[e+24>>2]=A,o=a,e=f):(o=a,e=f)}else o=a,e=f}}while(0);if(!(a>>>0>=u>>>0)&&1&(t=0|n[(A=u+4|0)>>2])){if(2&t)n[A>>2]=-2&t,n[o+4>>2]=1|e,n[a+e>>2]=e,i=e;else{if((0|n[5863])==(0|u)){if(u=(0|n[5860])+e|0,n[5860]=u,n[5863]=o,n[o+4>>2]=1|u,(0|o)!=(0|n[5862]))return;return n[5862]=0,void(n[5859]=0)}if((0|n[5862])==(0|u))return u=(0|n[5859])+e|0,n[5859]=u,n[5862]=a,n[o+4>>2]=1|u,void(n[a+u>>2]=u);i=(-8&t)+e|0,r=t>>>3;do{if(t>>>0<256){if(e=0|n[u+8>>2],(0|(A=0|n[u+12>>2]))==(0|e)){n[5857]=n[5857]&~(1<>2]=A,n[A+8>>2]=e;break}f=0|n[u+24>>2],A=0|n[u+12>>2];do{if((0|A)==(0|u)){if(A=0|n[(r=(e=u+16|0)+4|0)>>2])e=r;else if(!(A=0|n[e>>2])){r=0;break}for(;;)if(r=0|n[(t=A+20|0)>>2])A=r,e=t;else{if(!(r=0|n[(t=A+16|0)>>2]))break;A=r,e=t}n[e>>2]=0,r=A}else r=0|n[u+8>>2],n[r+12>>2]=A,n[A+8>>2]=r,r=A}while(0);if(0|f){if(A=0|n[u+28>>2],(0|n[(e=23732+(A<<2)|0)>>2])==(0|u)){if(n[e>>2]=r,!r){n[5858]=n[5858]&~(1<>2])==(0|u)?t:f+20|0)>>2]=r,!r)break;n[r+24>>2]=f,0|(e=0|n[(A=u+16|0)>>2])&&(n[r+16>>2]=e,n[e+24>>2]=r),0|(A=0|n[A+4>>2])&&(n[r+20>>2]=A,n[A+24>>2]=r)}}while(0);if(n[o+4>>2]=1|i,n[a+i>>2]=i,(0|o)==(0|n[5862]))return void(n[5859]=i)}if(A=i>>>3,i>>>0<256)return r=23468+(A<<1<<2)|0,(e=0|n[5857])&(A=1<>2]:(n[5857]=e|A,A=r,e=r+8|0),n[e>>2]=o,n[A+12>>2]=o,n[o+8>>2]=A,void(n[o+12>>2]=r);A=23732+((t=(A=i>>>8)?i>>>0>16777215?31:i>>>((t=14-((f=((u=A<<(a=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(t=((u<<=f)+245760|0)>>>16&2))+(u<>>15)|0)+7|0)&1|t<<1:0)<<2)|0,n[o+28>>2]=t,n[o+20>>2]=0,n[o+16>>2]=0,e=0|n[5858],r=1<>2];e:do{if((-8&n[A+4>>2]|0)!=(0|i)){for(t=i<<(31==(0|t)?0:25-(t>>>1)|0);e=0|n[(r=A+16+(t>>>31<<2)|0)>>2];){if((-8&n[e+4>>2]|0)==(0|i)){A=e;break e}t<<=1,A=e}n[r>>2]=o,n[o+24>>2]=A,n[o+12>>2]=o,n[o+8>>2]=o;break A}}while(0);u=0|n[(a=A+8|0)>>2],n[u+12>>2]=o,n[a>>2]=o,n[o+8>>2]=u,n[o+12>>2]=A,n[o+24>>2]=0}else n[5858]=e|r,n[A>>2]=o,n[o+24>>2]=A,n[o+12>>2]=o,n[o+8>>2]=o}while(0);if(u=(0|n[5865])-1|0,n[5865]=u,!(0|u)){for(A=23884;A=0|n[A>>2];)A=A+8|0;n[5865]=-1}}}}function Pe(A,e){e|=0;var r=0;return(A|=0)?(r=0|y(e,A),(e|A)>>>0>65535&&(r=(0|(r>>>0)/(A>>>0))==(0|e)?r:-1)):r=0,(A=0|Ce(r))&&3&n[A+-4>>2]?($e(0|A,0,0|r),0|A):0|A}function Ie(A,e,r,t){return 0|(B((e|=0)+(t|=0)+((r=(A|=0)+(r|=0)>>>0)>>>0>>0|0)>>>0|0),0|r)}function Se(A,e,r,t){return 0|(B(0|(t=(e|=0)-(t|=0)-((r|=0)>>>0>(A|=0)>>>0|0)>>>0)),A-r>>>0|0)}function Re(A){return 0|((A|=0)?31-(0|E(A^A-1))|0:32)}function Te(A,e,r,t,i){i|=0;var f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0;if(s=A|=0,a=r|=0,o=d=t|=0,!(c=u=e|=0))return f=0!=(0|i),o?f?(n[i>>2]=0|A,n[i+4>>2]=0&e,i=0,0|(B(0|(d=0)),i)):(i=0,0|(B(0|(d=0)),i)):(f&&(n[i>>2]=(s>>>0)%(a>>>0),n[i+4>>2]=0),i=(s>>>0)/(a>>>0)>>>0,0|(B(0|(d=0)),i));f=0==(0|o);do{if(a){if(!f){if((f=(0|E(0|o))-(0|E(0|c))|0)>>>0<=31){a=l=f+1|0,A=s>>>(l>>>0)&(e=f-31>>31)|c<<(o=31-f|0),e&=c>>>(l>>>0),f=0,o=s<>2]=0|A,n[i+4>>2]=u|0&e,i=0,0|(B(0|(d=0)),i)):(i=0,0|(B(0|(d=0)),i))}if((f=a-1|0)&a|0){a=o=33+(0|E(0|a))-(0|E(0|c))|0,A=(l=32-o|0)-1>>31&c>>>((b=o-32|0)>>>0)|(c<>>(o>>>0))&(e=b>>31),e&=c>>>(o>>>0),f=s<<(h=64-o|0)&(u=l>>31),o=(c<>>(b>>>0))&u|s<>31;break}return 0|i&&(n[i>>2]=f&s,n[i+4>>2]=0),1==(0|a)?(h=0|A,0|(B(0|(b=u|0&e)),h)):(b=c>>>((h=0|Re(0|a))>>>0)|0,h=c<<32-h|s>>>(h>>>0)|0,0|(B(0|b),h))}if(f)return 0|i&&(n[i>>2]=(c>>>0)%(a>>>0),n[i+4>>2]=0),h=(c>>>0)/(a>>>0)>>>0,0|(B(0|(b=0)),h);if(!s)return 0|i&&(n[i>>2]=0,n[i+4>>2]=(c>>>0)%(o>>>0)),h=(c>>>0)/(o>>>0)>>>0,0|(B(0|(b=0)),h);if(!((f=o-1|0)&o))return 0|i&&(n[i>>2]=0|A,n[i+4>>2]=f&c|0&e),b=0,h=c>>>((0|Re(0|o))>>>0),0|(B(0|b),h);if((f=(0|E(0|o))-(0|E(0|c))|0)>>>0<=30){a=e=f+1|0,A=c<<(o=31-f|0)|s>>>(e>>>0),e=c>>>(e>>>0),f=0,o=s<>2]=0|A,n[i+4>>2]=u|0&e,h=0,0|(B(0|(b=0)),h)):(h=0,0|(B(0|(b=0)),h))}while(0);if(a){c=0|Ie(0|(l=0|r),0|(s=d|0&t),-1,-1),r=0|k(),u=o,o=0;do{t=u,u=f>>>31|u<<1,f=o|f<<1,Se(0|c,0|r,0|(t=A<<1|t>>>31|0),0|(d=A>>>31|e<<1|0)),o=1&(b=(h=0|k())>>31|((0|h)<0?-1:0)<<1),A=0|Se(0|t,0|d,b&l|0,(((0|h)<0?-1:0)>>31|((0|h)<0?-1:0)<<1)&s|0),e=0|k(),a=a-1|0}while(0!=(0|a));c=u,u=0}else c=o,u=0,o=0;return a=0,0|i&&(n[i>>2]=A,n[i+4>>2]=e),h=-2&(f<<1|0)|o,0|(B(0|(b=(0|f)>>>31|(c|a)<<1|0&(a<<1|f>>>31)|u)),h)}function Oe(A,e,r,t){r|=0;var n,i,f,a,o;return i=(t|=0)>>31|((0|t)<0?-1:0)<<1,n=((0|t)<0?-1:0)>>31|((0|t)<0?-1:0)<<1,f=0|Se((o=(e|=0)>>31|((0|e)<0?-1:0)<<1)^(A|=0)|0,(a=((0|e)<0?-1:0)>>31|((0|e)<0?-1:0)<<1)^e|0,0|o,0|a),A=i^o,e=n^a,0|Se((0|Te(f,0|k(),0|Se(i^r|0,n^t|0,0|i,0|n),0|k(),0))^A|0,(0|k())^e|0,0|A,0|e)}function Fe(A,e,r,t){e|=0,t|=0;var n,i;return r=0|function(A,e){var r,t,n,i=0;return A=((r=0|y(i=65535&(e|=0),n=65535&(A|=0)))>>>16)+(0|y(i,t=A>>>16))|0,e=0|y(i=e>>>16,n),0|(B((A>>>16)+(0|y(i,t))+(((65535&A)+e|0)>>>16)|0),A+e<<16|65535&r|0)}(n=A|=0,i=r|=0),A=0|k(),0|(B((0|y(e,i))+(0|y(t,n))+A|0&A|0),0|r)}function Ge(A,e,r,t){r|=0;var i,f,a,o,u,c;return i=I,I=I+16|0,o=0|i,c=(t|=0)>>31|((0|t)<0?-1:0)<<1,u=((0|t)<0?-1:0)>>31|((0|t)<0?-1:0)<<1,Te(A=0|Se((a=(e|=0)>>31|((0|e)<0?-1:0)<<1)^(A|=0)|0,(f=((0|e)<0?-1:0)>>31|((0|e)<0?-1:0)<<1)^e|0,0|a,0|f),e=0|k(),0|Se(c^r|0,u^t|0,0|c,0|u),0|k(),o),t=0|Se(n[o>>2]^a|0,n[o+4>>2]^f|0,0|a,0|f),r=0|k(),I=i,0|(B(0|r),t)}function Le(A,e,r,t){var i,f;return f=I,I=I+16|0,Te(A|=0,e|=0,r|=0,t|=0,i=0|f),I=f,0|(B(0|n[i+4>>2]),0|n[i>>2])}function Ue(A,e,r){return A|=0,e|=0,(0|(r|=0))<32?(B(e>>r|0),A>>>r|(e&(1<>r-32|0)}function Ne(A,e,r){return A|=0,e|=0,(0|(r|=0))<32?(B(e>>>r|0),A>>>r|(e&(1<>>r-32|0)}function Ye(A,e,r){return A|=0,e|=0,(0|(r|=0))<32?(B(e<>>32-r|0),A<=0?+o(A+.5):+w(A-.5)}function He(A,e,r){A|=0,e|=0;var i,f,a=0;if((0|(r|=0))>=8192)return C(0|A,0|e,0|r),0|A;if(f=0|A,i=A+r|0,(3&A)==(3&e)){for(;3&A;){if(!r)return 0|f;t[A>>0]=0|t[e>>0],A=A+1|0,e=e+1|0,r=r-1|0}for(a=(r=-4&i|0)-64|0;(0|A)<=(0|a);)n[A>>2]=n[e>>2],n[A+4>>2]=n[e+4>>2],n[A+8>>2]=n[e+8>>2],n[A+12>>2]=n[e+12>>2],n[A+16>>2]=n[e+16>>2],n[A+20>>2]=n[e+20>>2],n[A+24>>2]=n[e+24>>2],n[A+28>>2]=n[e+28>>2],n[A+32>>2]=n[e+32>>2],n[A+36>>2]=n[e+36>>2],n[A+40>>2]=n[e+40>>2],n[A+44>>2]=n[e+44>>2],n[A+48>>2]=n[e+48>>2],n[A+52>>2]=n[e+52>>2],n[A+56>>2]=n[e+56>>2],n[A+60>>2]=n[e+60>>2],A=A+64|0,e=e+64|0;for(;(0|A)<(0|r);)n[A>>2]=n[e>>2],A=A+4|0,e=e+4|0}else for(r=i-4|0;(0|A)<(0|r);)t[A>>0]=0|t[e>>0],t[A+1>>0]=0|t[e+1>>0],t[A+2>>0]=0|t[e+2>>0],t[A+3>>0]=0|t[e+3>>0],A=A+4|0,e=e+4|0;for(;(0|A)<(0|i);)t[A>>0]=0|t[e>>0],A=A+1|0,e=e+1|0;return 0|f}function $e(A,e,r){e|=0;var i,f=0,a=0,o=0;if(i=(A|=0)+(r|=0)|0,e&=255,(0|r)>=67){for(;3&A;)t[A>>0]=e,A=A+1|0;for(o=e|e<<8|e<<16|e<<24,a=(f=-4&i|0)-64|0;(0|A)<=(0|a);)n[A>>2]=o,n[A+4>>2]=o,n[A+8>>2]=o,n[A+12>>2]=o,n[A+16>>2]=o,n[A+20>>2]=o,n[A+24>>2]=o,n[A+28>>2]=o,n[A+32>>2]=o,n[A+36>>2]=o,n[A+40>>2]=o,n[A+44>>2]=o,n[A+48>>2]=o,n[A+52>>2]=o,n[A+56>>2]=o,n[A+60>>2]=o,A=A+64|0;for(;(0|A)<(0|f);)n[A>>2]=o,A=A+4|0}for(;(0|A)<(0|i);)t[A>>0]=e,A=A+1|0;return i-r|0}function Ve(A){return(A=+A)>=0?+o(A+.5):+w(A-.5)}function We(A){A|=0;var e,r,t;return t=0|M(),(0|A)>0&(0|(e=(r=0|n[a>>2])+A|0))<(0|r)|(0|e)<0?(P(0|e),D(12),-1):(0|e)>(0|t)&&!(0|Q(0|e))?(D(12),-1):(n[a>>2]=e,0|r)}return{___divdi3:Oe,___muldi3:Fe,___remdi3:Ge,___uremdi3:Le,_areNeighborCells:function(A,e,r,t,i){i|=0;var f,a,o,u=0,c=0,s=0,l=0;if(o=I,I=I+64|0,a=o,f=o+56|0,!(!0&134217728==(2013265920&(e|=0)|0)&!0&134217728==(2013265920&(t|=0)|0)))return I=o,0|(i=5);if((0|(A|=0))==(0|(r|=0))&(0|e)==(0|t))return n[i>>2]=0,I=o,0|(i=0);if(c=0|Ne(0|A,0|e,52),k(),c&=15,l=0|Ne(0|r,0|t,52),k(),(0|c)!=(15&l|0))return I=o,0|(i=12);if(u=c+-1|0,c>>>0>1){TA(A,e,u,a),TA(r,t,u,f),s=0|n[(l=a)>>2],l=0|n[l+4>>2];A:do{if((0|s)==(0|n[f>>2])&&(0|l)==(0|n[f+4>>2])){u=0|Ne(0|A,0|e,0|(c=3*(15^c)|0)),k(),u&=7,c=0|Ne(0|r,0|t,0|c),k(),c&=7;do{if(0==(0|u)|0==(0|c))n[i>>2]=1,u=0;else if(7==(0|u))u=5;else{if(1==(0|u)|1==(0|c)&&0|FA(s,l)){u=5;break}if((0|n[15536+(u<<2)>>2])!=(0|c)&&(0|n[15568+(u<<2)>>2])!=(0|c))break A;n[i>>2]=1,u=0}}while(0);return I=o,0|(i=u)}}while(0)}c=(u=a)+56|0;do{n[u>>2]=0,u=u+4|0}while((0|u)<(0|c));return S(A,e,1,a),u=(0|n[(e=a)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+8|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+16|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+24|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+32|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+40|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)?1:1&((0|n[(u=a+48|0)>>2])==(0|r)?(0|n[u+4>>2])==(0|t):0),n[i>>2]=u,I=o,0|(i=0)},_bitshift64Ashr:Ue,_bitshift64Lshr:Ne,_bitshift64Shl:Ye,_calloc:Pe,_cellAreaKm2:function(A,e,r){return 0|(A=0|te(A|=0,e|=0,r|=0))||(i[r>>3]=6371.007180918475*+i[r>>3]*6371.007180918475),0|A},_cellAreaM2:function(A,e,r){return 0|(A=0|te(A|=0,e|=0,r|=0))||(i[r>>3]=6371.007180918475*+i[r>>3]*6371.007180918475*1e3*1e3),0|A},_cellAreaRads2:te,_cellToBoundary:VA,_cellToCenterChild:function(A,e,r,t){r|=0,t|=0;var i=0;return i=0|Ne(0|(A|=0),0|(e|=0),52),k(),(0|r)<16&(0|(i&=15))<=(0|r)?((0|i)<(0|r)&&(i=0|Ye(-1,-1,3+(3*(r+-1-i|0)|0)|0),i=0|Ye(0|~i,0|~(0|k()),3*(15-r|0)|0),e=~(0|k())&e,A&=~i),i=0|Ye(0|r,0,52),r=-15728641&e|0|k(),n[t>>2]=A|i,n[t+4>>2]=r,0|(t=0)):0|(t=4)},_cellToChildPos:function(A,e,r,t){r|=0,t|=0;var i,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0;if(i=I,I=I+16|0,p=i,w=0|Ne(0|(A|=0),0|(e|=0),52),k(),w&=15,r>>>0>15)return I=i,0|(w=4);if((0|w)<(0|r))return I=i,0|(w=12);if((0|w)!=(0|r))if(a=0|Ye(0|r,0,52),a|=A,u=0|k()|-15728641&e,(0|w)>(0|r)){c=r;do{v=0|Ye(7,0,3*(14-c|0)|0),c=c+1|0,a|=v,u=0|k()|u}while((0|c)<(0|w));v=a}else v=a;else v=A,u=e;g=0|Ne(0|v,0|u,45),k();A:do{if(0|U(127&g)){if(c=0|Ne(0|v,0|u,52),k(),0|(c&=15))for(a=1;;){if(!(0==((g=0|Ye(7,0,3*(15-a|0)|0))&v|0)&0==((0|k())&u|0))){s=33;break A}if(!(a>>>0>>0))break;a=a+1|0}if(n[(g=t)>>2]=0,n[g+4>>2]=0,(0|w)>(0|r)){for(g=-15728641&e,h=w;;){if(b=h,(h=h+-1|0)>>>0>15|(0|w)<(0|h)){s=19;break}if((0|w)!=(0|h))if(a=0|Ye(0|h,0,52),a|=A,c=0|k()|g,(0|w)<(0|b))d=a;else{s=h;do{d=0|Ye(7,0,3*(14-s|0)|0),s=s+1|0,a|=d,c=0|k()|c}while((0|s)<(0|w));d=a}else d=A,c=e;if(l=0|Ne(0|d,0|c,45),k(),0|U(127&l)){l=0|Ne(0|d,0|c,52),k(),l&=15;e:do{if(l)for(s=1;;){if(a=0|Ne(0|d,0|c,3*(15-s|0)|0),k(),0|(a&=7))break e;if(!(s>>>0>>0)){a=0;break}s=s+1|0}else a=0}while(0);a=0==(0|a)&1}else a=0;if(c=0|Ne(0|A,0|e,3*(15-b|0)|0),k(),7==(0|(c&=7))){f=5,s=42;break}if(1==(0|c)&(a=0!=(0|a))){f=5,s=42;break}if(0|(d=c+((0!=(0|c)&a)<<31>>31)|0)&&(s=0|se(7,0,s=w-b|0,((0|s)<0)<<31>>31),l=0|k(),a?(a=0|Ie(0|(a=0|Fe(0|s,0|l,5,0)),0|k(),-5,-1),a=0|Ie(0|(a=0|Oe(0|a,0|k(),6,0)),0|k(),1,0),c=0|k()):(a=s,c=l),b=0|Ie(0|a,0|c,0|(b=0|Fe(0|s,0|l,0|(b=d+-1|0),((0|b)<0)<<31>>31|0)),0|k()),l=0|Ie(0|b,0|(d=0|k()),0|n[(l=t)>>2],0|n[l+4>>2]),d=0|k(),n[(b=t)>>2]=l,n[b+4>>2]=d),(0|h)<=(0|r)){s=37;break}}if(19==(0|s))x(23313,22674,1099,22710);else{if(37==(0|s)){f=0|n[(o=t)+4>>2],o=0|n[o>>2];break}if(42==(0|s))return I=i,0|f}}else f=0,o=0}else s=33}while(0);A:do{if(33==(0|s)){if(n[(g=t)>>2]=0,n[g+4>>2]=0,(0|w)>(0|r)){for(a=w;;){if(f=0|Ne(0|A,0|e,3*(15-a|0)|0),k(),7==(0|(f&=7))){f=5;break}if(f=0|Fe(0|(o=0|se(7,0,o=w-a|0,((0|o)<0)<<31>>31)),0|k(),0|f,0),o=0|k(),o=0|Ie(0|n[(g=t)>>2],0|n[g+4>>2],0|f,0|o),f=0|k(),n[(g=t)>>2]=o,n[g+4>>2]=f,(0|(a=a+-1|0))<=(0|r))break A}return I=i,0|f}f=0,o=0}}while(0);return 0|OA(v,u,w,p)&&x(23313,22674,1063,22725),((0|f)>-1|-1==(0|f)&o>>>0>4294967295)&((0|(p=0|n[(w=p)+4>>2]))>(0|f)|((0|p)==(0|f)?(0|n[w>>2])>>>0>o>>>0:0))?(I=i,0|(w=0)):(x(23313,22674,1139,22710),0)},_cellToChildren:function(A,e,r,t){t|=0;var i,f,a=0,o=0;if(f=I,I=I+16|0,KA(i=f,A|=0,e|=0,r|=0),0==(0|(A=0|n[(e=i)>>2]))&0==(0|(e=0|n[e+4>>2])))return I=f,0;a=0,r=0;do{n[(o=t+(a<<3)|0)>>2]=A,n[o+4>>2]=e,a=0|Ie(0|a,0|r,1,0),r=0|k(),JA(i),A=0|n[(o=i)>>2],e=0|n[o+4>>2]}while(!(0==(0|A)&0==(0|e)));return I=f,0},_cellToChildrenSize:OA,_cellToLatLng:$A,_cellToLocalIj:function(A,e,r,t,n,i){var f,a;return A|=0,e|=0,r|=0,t|=0,i|=0,a=I,I=I+16|0,f=a,(n|=0)?A=15:(A=0|ue(A,e,r,t,f))||(wA(f,i),A=0),I=a,0|A},_cellToParent:TA,_cellToVertex:ye,_cellToVertexes:function(A,e,r){r|=0;var t,i=0,f=0;return f=0==(0|FA(A|=0,e|=0)),t=0==(0|(i=0|ye(A,e,0,r))),f?t?0|(i=0|ye(A,e,1,r+8|0))||0|(i=0|ye(A,e,2,r+16|0))||0|(i=0|ye(A,e,3,r+24|0))||(i=0|ye(A,e,4,r+32|0))?0|(f=i):0|ye(A,e,5,r+40|0):0|(f=i):t?0|(i=0|ye(A,e,1,r+8|0))||0|(i=0|ye(A,e,2,r+16|0))||0|(i=0|ye(A,e,3,r+24|0))||0|(i=0|ye(A,e,4,r+32|0))?0|(f=i):(n[(f=r+40|0)>>2]=0,n[f+4>>2]=0,0|(f=0)):0|(f=i)},_cellsToDirectedEdge:function(A,e,r,t,i){return i|=0,7==(0|(r=0|G(A|=0,e|=0,r|=0,t|=0)))?0|(i=11):(t=0|Ye(0|r,0,56),e=-2130706433&e|0|k()|268435456,n[i>>2]=A|t,n[i+4>>2]=e,0|(i=0))},_cellsToLinkedMultiPolygon:function(A,e,r){r|=0;var t,i,f,a=0;if(f=I,I=I+32|0,t=f,A=0|function(A,e,r){A|=0,r|=0;var t,i,f=0,a=0,o=0,u=0,c=0,s=0;if(i=I,I=I+176|0,t=i,(0|(e|=0))<1)return _e(r,0,0),I=i,0;for(c=0|Ne(0|n[(c=A)>>2],0|n[c+4>>2],52),k(),_e(r,(0|e)>6?e:6,15&c),c=0;!(0|(f=0|VA(0|n[(f=A+(c<<3)|0)>>2],0|n[f+4>>2],t)));){if((0|(f=0|n[t>>2]))>0){u=0;do{o=t+8+(u<<4)|0,(a=0|xe(r,f=t+8+(((0|(u=u+1|0))%(0|f)|0)<<4)|0,o))?Be(r,a):ke(r,o,f),f=0|n[t>>2]}while((0|u)<(0|f))}if((0|(c=c+1|0))>=(0|e)){f=0,s=13;break}}return 13==(0|s)?(I=i,0|f):(me(r),I=i,0|(s=f))}(A|=0,e|=0,i=f+16|0),0|A)return I=f,0|(r=A);if(n[r>>2]=0,n[r+4>>2]=0,n[r+8>>2]=0,0|(A=0|Ee(i)))do{e=0|ne(r);do{ie(e,A),a=A+16|0,n[t>>2]=n[a>>2],n[t+4>>2]=n[a+4>>2],n[t+8>>2]=n[a+8>>2],n[t+12>>2]=n[a+12>>2],Be(i,A),A=0|De(i,t)}while(0!=(0|A));A=0|Ee(i)}while(0!=(0|A));return me(i),(A=0|ae(r))?(fe(r),I=f,0|(a=A)):(I=f,0|(a=0))},_childPosToCell:function(A,e,r,t,i,f){A|=0,e|=0,f|=0;var a,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0;if(a=I,I=I+16|0,o=a,(i|=0)>>>0>15)return I=a,0|(f=4);if(u=0|Ne(0|(r|=0),0|(t|=0),52),k(),(0|(u&=15))>(0|i))return I=a,0|(f=12);if(0|OA(r,t,i,o)&&x(23313,22674,1063,22725),!(((0|e)>-1|-1==(0|e)&A>>>0>4294967295)&((0|(s=0|n[(l=o)+4>>2]))>(0|e)|((0|s)==(0|e)?(0|n[l>>2])>>>0>A>>>0:0))))return I=a,0|(f=2);l=i-u|0,i=0|Ye(0|i,0,52),c=0|k()|-15728641&t,n[(s=f)>>2]=i|r,n[s+4>>2]=c,s=0|Ne(0|r,0|t,45),k();A:do{if(0|U(127&s)){if(0|u)for(o=1;;){if(!(0==((s=0|Ye(7,0,3*(15-o|0)|0))&r|0)&0==((0|k())&t|0)))break A;if(!(o>>>0>>0))break;o=o+1|0}if((0|l)<1)return I=a,0|(f=0);for(s=15^u,t=-1,c=1,o=1;;){u=0|se(7,0,u=l-c|0,((0|u)<0)<<31>>31),r=0|k();do{if(o){if(o=0|Oe(0|(o=0|Ie(0|(o=0|Fe(0|u,0|r,5,0)),0|k(),-5,-1)),0|k(),6,0),(0|e)>(0|(i=0|k()))|(0|e)==(0|i)&A>>>0>o>>>0){e=0|Se(0|(e=0|Ie(0|A,0|e,-1,-1)),0|k(),0|o,0|i),o=0|k(),h=0|n[(d=f)>>2],d=0|n[d+4>>2],b=0|Ye(7,0,0|(g=3*(s+t|0)|0)),d&=~(0|k()),g=0|Ye(0|(i=0|Ie(0|(t=0|Oe(0|e,0|o,0|u,0|r)),0|(A=0|k()),2,0)),0|k(),0|g),d=0|k()|d,n[(i=f)>>2]=g|h&~b,n[i+4>>2]=d,A=0|Se(0|e,0|o,0|(A=0|Fe(0|t,0|A,0|u,0|r)),0|k()),o=0,e=0|k();break}b=0|n[(g=f)>>2],g=0|n[g+4>>2],h=0|Ye(7,0,3*(s+t|0)|0),g&=~(0|k()),n[(o=f)>>2]=b&~h,n[o+4>>2]=g,o=1;break}i=0|n[(b=f)>>2],b=0|n[b+4>>2],d=0|Ye(7,0,0|(t=3*(s+t|0)|0)),b&=~(0|k()),t=0|Ye(0|(g=0|Oe(0|A,0|e,0|u,0|r)),0|(o=0|k()),0|t),b=0|k()|b,n[(h=f)>>2]=t|i&~d,n[h+4>>2]=b,A=0|Se(0|A,0|e,0|(o=0|Fe(0|g,0|o,0|u,0|r)),0|k()),o=0,e=0|k()}while(0);if(!((0|l)>(0|c))){e=0;break}t=~c,c=c+1|0}return I=a,0|e}}while(0);if((0|l)<1)return I=a,0|(g=0);for(i=15^u,o=1;;){if(h=0|se(7,0,h=l-o|0,((0|h)<0)<<31>>31),g=0|k(),r=0|n[(c=f)>>2],c=0|n[c+4>>2],t=0|Ye(7,0,0|(u=3*(i-o|0)|0)),c&=~(0|k()),u=0|Ye(0|(d=0|Oe(0|A,0|e,0|h,0|g)),0|(b=0|k()),0|u),c=0|k()|c,n[(s=f)>>2]=u|r&~t,n[s+4>>2]=c,A=0|Se(0|A,0|e,0|(g=0|Fe(0|d,0|b,0|h,0|g)),0|k()),e=0|k(),(0|l)<=(0|o)){e=0;break}o=o+1|0}return I=a,0|e},_compactCells:function(A,e,r,t){e|=0;var i,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0,m=0,E=0,B=0,D=0;if(0==(0|(r|=0))&0==(0|(t|=0)))return 0|(B=0);if(a=0|n[(f=A|=0)>>2],!0&0==(15728640&(f=0|n[f+4>>2])|0)){if(!((0|t)>0|0==(0|t)&r>>>0>0))return 0|(B=0);if(n[(B=e)>>2]=a,n[B+4>>2]=f,1==(0|r)&0==(0|t))return 0|(B=0);f=1;do{E=0|n[(m=A+(f<<3)|0)+4>>2],n[(B=e+(f<<3)|0)>>2]=n[m>>2],n[B+4>>2]=E,f=f+1|0}while(0<(0|t)|0==(0|t)&f>>>0>>0);return 0|(f=0)}if(!(E=0|Ce(i=r<<3)))return 0|(B=13);if(He(0|E,0|A,0|i),!(m=0|Pe(r,8)))return Qe(E),0|(B=13);A:do{if(0|r){e:for(;;){y=0|Ne(0|(w=0|n[(f=E)>>2]),0|(f=0|n[f+4>>2]),52),k(),_=(y&=15)+-1|0,p=(0|r)>0;r:do{if(0!=(0|y)&p){if(h=((0|r)<0)<<31>>31,g=0|Ye(0|_,0,52),v=0|k(),_>>>0>15){if(!(0==(0|w)&0==(0|f))){B=17;break e}for(a=0;;){if((0|(a=a+1|0))>=(0|r))break r;if(!(0==(0|(v=0|n[(t=E+(a<<3)|0)>>2]))&0==(0|(t=0|n[t+4>>2])))){f=t,B=17;break e}}}for(a=0,A=w,t=f;;){if(!(0==(0|A)&0==(0|t))){if(!(!0&0==(117440512&t|0))){B=22;break e}if(u=0|Ne(0|A,0|t,52),k(),(0|(u&=15))<(0|_)){f=12,B=28;break e}if((0|u)!=(0|_)&&(A|=g,t=-15728641&t|v,u>>>0>=y>>>0)){o=_;do{b=0|Ye(7,0,3*(14-o|0)|0),o=o+1|0,A|=b,t=0|k()|t}while(o>>>0>>0)}if(o=0|Le(0|A,0|t,0|r,0|h),k(),0==(0|(c=0|n[(u=s=m+(o<<3)|0)>>2]))&0==(0|(u=0|n[u+4>>2])))o=s;else for(b=0;;){if((0|b)>(0|r)){B=32;break e}if((0|c)==(0|A)&(-117440513&u|0)==(0|t)){l=0|Ne(0|c,0|u,56),k(),d=(l&=7)+1|0,D=0|Ne(0|c,0|u,45),k();t:do{if(0|U(127&D)){if(c=0|Ne(0|c,0|u,52),k(),!(c&=15)){u=6;break}for(u=1;;){if(!(0==((D=0|Ye(7,0,3*(15-u|0)|0))&A|0)&0==((0|k())&t|0))){u=7;break t}if(!(u>>>0>>0)){u=6;break}u=u+1|0}}else u=7}while(0);if((l+2|0)>>>0>u>>>0){B=42;break e}D=0|Ye(0|d,0,56),t=0|k()|-117440513&t,n[(d=s)>>2]=0,n[d+4>>2]=0,A|=D}else o=(o+1|0)%(0|r)|0;if(0==(0|(c=0|n[(u=s=m+(o<<3)|0)>>2]))&0==(0|(u=0|n[u+4>>2]))){o=s;break}b=b+1|0}n[(D=o)>>2]=A,n[D+4>>2]=t}if((0|(a=a+1|0))>=(0|r))break r;A=0|n[(t=E+(a<<3)|0)>>2],t=0|n[t+4>>2]}}}while(0);if((r+5|0)>>>0<11){B=85;break}if(!(v=0|Pe((0|r)/6|0,8))){B=49;break}r:do{if(p){b=0,d=0;do{if(!(0==(0|(a=0|n[(t=u=m+(b<<3)|0)>>2]))&0==(0|(t=0|n[t+4>>2])))){c=0|Ne(0|a,0|t,56),k(),A=(c&=7)+1|0,s=-117440513&t,D=0|Ne(0|a,0|t,45),k();t:do{if(0|U(127&D)){if(l=0|Ne(0|a,0|t,52),k(),0|(l&=15))for(o=1;;){if(!(0==(a&(D=0|Ye(7,0,3*(15-o|0)|0))|0)&0==(s&(0|k())|0)))break t;if(!(o>>>0>>0))break;o=o+1|0}a|=t=0|Ye(0|A,0,56),t=0|k()|s,n[(A=u)>>2]=a,n[A+4>>2]=t,A=c+2|0}}while(0);7==(0|A)&&(n[(D=v+(d<<3)|0)>>2]=a,n[D+4>>2]=-117440513&t,d=d+1|0)}b=b+1|0}while((0|b)!=(0|r));if(p){if(b=((0|r)<0)<<31>>31,h=0|Ye(0|_,0,52),g=0|k(),_>>>0>15){if(!(0==(0|w)&0==(0|f))){f=4,B=84;break e}for(f=0;;){if((0|(f=f+1|0))>=(0|r)){a=0,f=d;break r}if(!(0==(0|n[(D=E+(f<<3)|0)>>2])&0==(0|n[D+4>>2]))){f=4,B=84;break e}}}for(l=0,a=0,s=w;;){do{if(!(0==(0|s)&0==(0|f))){if(u=0|Ne(0|s,0|f,52),k(),(0|(u&=15))<(0|_)){f=12,B=84;break e}do{if((0|u)==(0|_))t=s,u=f;else{if(t=s|h,A=-15728641&f|g,u>>>0>>0){u=A;break}o=_;do{D=0|Ye(7,0,3*(14-o|0)|0),o=o+1|0,t|=D,A=0|k()|A}while(o>>>0>>0);u=A}}while(0);for(o=0|Le(0|t,0|u,0|r,0|b),k(),A=0;;){if((0|A)>(0|r)){B=77;break e}if((-117440513&(c=0|n[(D=m+(o<<3)|0)+4>>2])|0)==(0|u)&&(0|n[D>>2])==(0|t)){B=79;break}if((0|n[(D=m+((o=(o+1|0)%(0|r)|0)<<3)|0)>>2])==(0|t)&&(0|n[D+4>>2])==(0|u))break;A=A+1|0}if(79==(0|B)&&(B=0,!0&100663296==(117440512&c|0)))break;n[(D=e+(a<<3)|0)>>2]=s,n[D+4>>2]=f,a=a+1|0}}while(0);if((0|(f=l+1|0))>=(0|r)){f=d;break r}l=f,s=0|n[(D=E+(f<<3)|0)>>2],f=0|n[D+4>>2]}}else a=0,f=d}else a=0,f=0}while(0);if($e(0|m,0,0|i),He(0|E,0|v,f<<3|0),Qe(v),!f)break A;e=e+(a<<3)|0,r=f}if(17==(0|B))!0&0==(117440512&f|0)?(f=4,B=28):B=22;else if(32==(0|B))x(23313,22674,362,22684);else{if(42==(0|B))return Qe(E),Qe(m),0|(D=10);if(49==(0|B))return Qe(E),Qe(m),0|(D=13);if(77==(0|B))x(23313,22674,462,22684);else{if(84==(0|B))return Qe(v),Qe(E),Qe(m),0|(D=f);if(85==(0|B)){He(0|e,0|E,r<<3|0);break}}}if(22==(0|B))return Qe(E),Qe(m),0|(D=5);if(28==(0|B))return Qe(E),Qe(m),0|(D=f)}}while(0);return Qe(E),Qe(m),0|(D=0)},_destroyLinkedMultiPolygon:fe,_directedEdgeToBoundary:EA,_directedEdgeToCells:function(A,e,r){A|=0;var t,i,f,a=0;return t=I,I=I+16|0,a=t,!0&268435456==(2013265920&(e|=0)|0)?(i=-2130706433&e|134217728,n[(f=r|=0)>>2]=A,n[f+4>>2]=i,n[a>>2]=0,e=0|Ne(0|A,0|e,56),k(),a=0|F(A,i,7&e,a,r+8|0),I=t,0|a):(I=t,0|(a=6))},_edgeLengthKm:function(A,e,r){r|=0;var t,f=0,a=0,o=0,u=0,s=0,b=0,h=0;if(t=I,I=I+176|0,0|(A=0|EA(A|=0,e|=0,u=t)))return u=A,o=+i[r>>3],o*=6371.007180918475,i[r>>3]=o,I=t,0|u;if(i[r>>3]=0,(0|(A=0|n[u>>2]))<=1)return u=0,o=0,o*=6371.007180918475,i[r>>3]=o,I=t,0|u;e=A+-1|0,A=0,f=+i[u+8>>3],a=+i[u+16>>3],o=0;do{b=f,f=+i[u+8+((A=A+1|0)<<4)>>3],h=+d(.5*(f-b)),s=a,a=+i[u+8+(A<<4)+8>>3],s=h*h+(s=+d(.5*(a-s)))*(+l(+b)*+l(+f)*s),o+=2*+p(+ +c(+s),+ +c(+(1-s)))}while((0|A)!=(0|e));return i[r>>3]=o,u=0,h=o,h*=6371.007180918475,i[r>>3]=h,I=t,0|u},_edgeLengthM:function(A,e,r){r|=0;var t,f=0,a=0,o=0,u=0,s=0,b=0,h=0;if(t=I,I=I+176|0,0|(A=0|EA(A|=0,e|=0,u=t)))return u=A,o=+i[r>>3],o*=6371.007180918475,o*=1e3,i[r>>3]=o,I=t,0|u;if(i[r>>3]=0,(0|(A=0|n[u>>2]))<=1)return u=0,o=0,o*=6371.007180918475,o*=1e3,i[r>>3]=o,I=t,0|u;e=A+-1|0,A=0,f=+i[u+8>>3],a=+i[u+16>>3],o=0;do{b=f,f=+i[u+8+((A=A+1|0)<<4)>>3],h=+d(.5*(f-b)),s=a,a=+i[u+8+(A<<4)+8>>3],s=h*h+(s=+d(.5*(a-s)))*(+l(+b)*+l(+f)*s),o+=2*+p(+ +c(+s),+ +c(+(1-s)))}while((0|A)!=(0|e));return i[r>>3]=o,u=0,h=o,h*=6371.007180918475,h*=1e3,i[r>>3]=h,I=t,0|u},_edgeLengthRads:function(A,e,r){r|=0;var t,f=0,a=0,o=0,u=0,s=0,b=0,h=0;if(t=I,I=I+176|0,0|(A=0|EA(A|=0,e|=0,u=t)))return I=t,0|(u=A);if(i[r>>3]=0,(0|(A=0|n[u>>2]))<=1)return I=t,0|(u=0);e=A+-1|0,A=0,f=+i[u+8>>3],a=+i[u+16>>3],o=0;do{b=f,f=+i[u+8+((A=A+1|0)<<4)>>3],h=+d(.5*(f-b)),s=a,a=+i[u+8+(A<<4)+8>>3],s=h*h+(s=+d(.5*(a-s)))*(+l(+f)*+l(+b)*s),o+=2*+p(+ +c(+s),+ +c(+(1-s)))}while((0|A)<(0|e));return i[r>>3]=o,I=t,0|(u=0)},_emscripten_replace_memory:function(A){return t=new Int8Array(A),new Uint8Array(A),n=new Int32Array(A),new Float32Array(A),i=new Float64Array(A),r=A,!0},_free:Qe,_getBaseCellNumber:SA,_getDirectedEdgeDestination:function(A,e,r){A|=0,e|=0,r|=0;var t,i,f=0;return t=I,I=I+16|0,n[(f=t)>>2]=0,!0&268435456==(2013265920&e|0)?(i=0|Ne(0|A,0|e,56),k(),f=0|F(A,-2130706433&e|134217728,7&i,f,r),I=t,0|f):(I=t,0|(f=6))},_getDirectedEdgeOrigin:function(A,e,r){return A|=0,r|=0,!0&268435456==(2013265920&(e|=0)|0)?(n[r>>2]=A,n[r+4>>2]=-2130706433&e|134217728,0|(r=0)):0|(r=6)},_getHexagonAreaAvgKm2:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20528+(A<<3)>>3],0|(e=0))},_getHexagonAreaAvgM2:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20656+(A<<3)>>3],0|(e=0))},_getHexagonEdgeLengthAvgKm:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20784+(A<<3)>>3],0|(e=0))},_getHexagonEdgeLengthAvgM:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20912+(A<<3)>>3],0|(e=0))},_getIcosahedronFaces:function A(e,r,t){t|=0;var i,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0;i=I,I=I+128|0,l=i+112|0,o=i+96|0,d=i,a=0|Ne(0|(e|=0),0|(r|=0),52),k(),c=15&a,n[l>>2]=c,u=0|Ne(0|e,0|r,45),k(),u&=127;A:do{if(0|U(u)){if(0|c)for(f=1;;){if(!(0==((s=0|Ye(7,0,3*(15-f|0)|0))&e|0)&0==((0|k())&r|0))){a=0;break A}if(!(f>>>0>>0))break;f=f+1|0}if(!(1&a))return s=0|Ye(c+1|0,0,52),d=0|k()|-15728641&r,d=0|A((s|e)&~(l=0|Ye(7,0,3*(14-c|0)|0)),d&~(0|k()),t),I=i,0|d;a=1}else a=0}while(0);if(!(f=0|HA(e,r,o))){a?(MA(o,l,d),s=5):(IA(o,l,d),s=6);A:do{if(0|U(u))if(c)for(f=1;;){if(!(0==((u=0|Ye(7,0,3*(15-f|0)|0))&e|0)&0==((0|k())&r|0))){e=2;break A}if(!(f>>>0>>0)){e=5;break}f=f+1|0}else e=5;else e=2}while(0);$e(0|t,-1,e<<2|0);A:do{if(a)for(o=0;;){if(QA(u=d+(o<<4)|0,0|n[l>>2]),u=0|n[u>>2],-1==(0|(c=0|n[t>>2]))|(0|c)==(0|u))f=t;else{a=0;do{if((a=a+1|0)>>>0>=e>>>0){f=1;break A}c=0|n[(f=t+(a<<2)|0)>>2]}while(!(-1==(0|c)|(0|c)==(0|u)))}if(n[f>>2]=u,(o=o+1|0)>>>0>=s>>>0){f=0;break}}else for(o=0;;){if(CA(u=d+(o<<4)|0,0|n[l>>2],0,1),u=0|n[u>>2],-1==(0|(c=0|n[t>>2]))|(0|c)==(0|u))f=t;else{a=0;do{if((a=a+1|0)>>>0>=e>>>0){f=1;break A}c=0|n[(f=t+(a<<2)|0)>>2]}while(!(-1==(0|c)|(0|c)==(0|u)))}if(n[f>>2]=u,(o=o+1|0)>>>0>=s>>>0){f=0;break}}}while(0)}return I=i,0|(d=f)},_getNumCells:ee,_getPentagons:WA,_getRes0Cells:function(A){A|=0;var e=0,r=0,t=0;e=0;do{Ye(0|e,0,45),t=134225919|k(),n[(r=A+(e<<3)|0)>>2]=-1,n[r+4>>2]=t,e=e+1|0}while(122!=(0|e));return 0},_getResolution:function(A,e){return e=0|Ne(0|(A|=0),0|(e|=0),52),k(),15&e|0},_greatCircleDistanceKm:Ae,_greatCircleDistanceM:function(A,e){A|=0;var r,t,n,f=0;return t=+i[(e|=0)>>3],r=+i[A>>3],f=(n=+d(.5*(t-r)))*n+(f=+d(.5*(+i[e+8>>3]-+i[A+8>>3])))*(+l(+t)*+l(+r)*f),2*+p(+ +c(+f),+ +c(+(1-f)))*6371.007180918475*1e3},_greatCircleDistanceRads:function(A,e){A|=0;var r,t,n,f=0;return t=+i[(e|=0)>>3],r=+i[A>>3],f=(n=+d(.5*(t-r)))*n+(f=+d(.5*(+i[e+8>>3]-+i[A+8>>3])))*(+l(+t)*+l(+r)*f),2*+p(+ +c(+f),+ +c(+(1-f)))},_gridDisk:S,_gridDiskDistances:R,_gridDistance:function(A,e,r,t,i){r|=0,t|=0,i|=0;var f,a,o=0,u=0;return a=I,I=I+32|0,u=a,0|(f=0|ue(A|=0,e|=0,A,e,o=a+12|0))?(I=a,0|(u=f)):0|(A=0|ue(A,e,r,t,u))?(I=a,0|(u=A)):(o=0|pA(o,u),n[(u=i)>>2]=o,n[u+4>>2]=((0|o)<0)<<31>>31,I=a,0|(u=0))},_gridPathCells:function(A,e,r,t,i){r|=0,t|=0,i|=0;var f,a=0,o=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0,m=0,E=0,B=0,D=0,M=0;if(f=I,I=I+48|0,c=f+12|0,D=f,!(a=0|ue(A|=0,e|=0,A,e,o=f+24|0))&&!(a=0|ue(A,e,r,t,c))){B=((0|(E=0|pA(o,c)))<0)<<31>>31,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[c>>2]=0,n[c+4>>2]=0,n[c+8>>2]=0,0|ue(A,e,A,e,o)&&x(23313,23090,691,23299),0|ue(A,e,r,t,c)&&x(23313,23090,696,23299),_A(o),_A(c),E?(v=+(0|E),m=o,t=b=0|n[o>>2],a=h=0|n[(y=o+4|0)>>2],r=g=0|n[(_=o+8|0)>>2],p=+((0|n[c>>2])-b|0)/v,w=+((0|n[c+4>>2])-h|0)/v,v=+((0|n[c+8>>2])-g|0)/v):(y=a=o+4|0,_=r=o+8|0,m=o,t=0|n[o>>2],a=0|n[a>>2],r=0|n[r>>2],p=0,w=0,v=0),n[D>>2]=t,n[(g=D+4|0)>>2]=a,n[(h=D+8|0)>>2]=r;A:do{if((0|E)<0)a=0;else for(d=0,b=0,a=t;;){M=p*(l=+(b>>>0)+4294967296*+(0|d))+ +(0|a),s=w*l+ +(0|n[y>>2]),l=v*l+ +(0|n[_>>2]),r=~~+je(+M),o=~~+je(+s),a=~~+je(+l),M=+u(+(+(0|r)-M)),s=+u(+(+(0|o)-s)),l=+u(+(+(0|a)-l));do{if(!(M>s&M>l)){if(c=0-r|0,s>l){t=c-a|0;break}t=o,a=c-o|0;break}r=0-(o+a)|0,t=o}while(0);if(n[D>>2]=r,n[g>>2]=t,n[h>>2]=a,mA(D),0|(a=0|ce(A,e,D,i+(b<<3)|0)))break A;if(!((0|d)<(0|B)|(0|d)==(0|B)&b>>>0>>0)){a=0;break A}a=0|Ie(0|b,0|d,1,0),d=c=0|k(),b=a,a=0|n[m>>2]}}while(0);return I=f,0|(D=a)}return I=f,0|(D=a)},_gridPathCellsSize:function(A,e,r,t,i){r|=0,t|=0,i|=0;var f,a=0,o=0,u=0;return f=I,I=I+32|0,u=f,(a=0|ue(A|=0,e|=0,A,e,o=f+12|0))||(a=0|ue(A,e,r,t,u))?(I=f,0|(u=a)):(t=0|Ie(0|(t=0|pA(o,u)),((0|t)<0)<<31>>31|0,1,0),o=0|k(),n[(u=i)>>2]=t,n[u+4>>2]=o,I=f,0|(u=0))},_gridRingUnsafe:function(A,e,r,t){A|=0,e|=0,r|=0,t|=0;var i,f,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0;if(f=I,I=I+16|0,h=f+8|0,n[(b=i=f)>>2]=A,n[b+4>>2]=e,!r)return n[(h=t)>>2]=A,n[h+4>>2]=e,I=f,0|(h=0);n[h>>2]=0;A:do{if(0|FA(A,e))A=9;else{if(o=(0|r)>0){a=0,b=A;do{if(0|(A=0|F(b,e,4,h,i)))break A;if(a=a+1|0,0|FA(b=0|n[(e=i)>>2],e=0|n[e+4>>2])){A=9;break A}}while((0|a)<(0|r));if(n[(d=t)>>2]=b,n[d+4>>2]=e,d=r+-1|0,o){l=0,A=1;do{if(a=22384+(l<<2)|0,5==(0|l))for(u=0|n[a>>2],o=0,a=A;;){if(0|(A=0|F(0|n[(A=i)>>2],0|n[A+4>>2],u,h,i)))break A;if((0|o)!=(0|d)){if(c=0|n[(s=i)>>2],s=0|n[s+4>>2],n[(A=t+(a<<3)|0)>>2]=c,n[A+4>>2]=s,0|FA(c,s)){A=9;break A}A=a+1|0}else A=a;if((0|(o=o+1|0))>=(0|r))break;a=A}else for(u=i,s=0|n[a>>2],c=0,a=A,o=0|n[u>>2],u=0|n[u+4>>2];;){if(0|(A=0|F(o,u,s,h,i)))break A;if(o=0|n[(u=i)>>2],u=0|n[u+4>>2],n[(A=t+(a<<3)|0)>>2]=o,n[A+4>>2]=u,A=a+1|0,0|FA(o,u)){A=9;break A}if((0|(c=c+1|0))>=(0|r))break;a=A}l=l+1|0}while(l>>>0<6);u=b,a=0|n[(A=i)>>2],o=e,A=0|n[A+4>>2]}else u=b,a=b,o=e,A=e}else n[(u=t)>>2]=A,n[u+4>>2]=e,u=A,a=A,o=e,A=e;A=(0|u)==(0|a)&(0|o)==(0|A)?0:9}}while(0);return I=f,0|(h=A)},_i64Add:Ie,_i64Subtract:Se,_isPentagon:FA,_isResClassIII:function(A,e){return e=0|Ne(0|(A|=0),0|(e|=0),52),k(),1&e|0},_isValidCell:RA,_isValidDirectedEdge:function(A,e){var r=0;switch(r=0|Ne(0|(A|=0),0|(e|=0),56),k(),7&r){case 0:case 7:return 0|(r=0)}return r=-2130706433&e|134217728,!0&268435456==(2013265920&e|0)?!0&16777216==(117440512&e|0)&0!=(0|FA(A,r))?0|(r=0):0|(r=0|RA(A,r)):0|(r=0)},_isValidVertex:function(A,e){A|=0;var r,t,i=0,f=0;return t=I,I=I+16|0,r=t,!0&536870912==(2013265920&(e|=0)|0)&&0|RA(A,i=-2130706433&e|134217728)?(f=0|Ne(0|A,0|e,56),k(),i=(f=0==(0|ye(A,i,7&f,r)))&((0|n[(i=r)>>2])==(0|A)?(0|n[i+4>>2])==(0|e):0)&1,I=t,0|i):(I=t,0|(i=0))},_latLngToCell:ZA,_llvm_maxnum_f64:ze,_llvm_minnum_f64:Ze,_llvm_round_f64:je,_localIjToCell:function(A,e,r,t,n){var i,f;return A|=0,e|=0,r|=0,n|=0,f=I,I=I+16|0,i=f,(t|=0)?r=15:(r=0|yA(r,i))||(r=0|ce(A,e,i,n)),I=f,0|r},_malloc:Ce,_maxFaceCount:function(A,e,r){r|=0;var t=0,i=0;if(i=0|Ne(0|(A|=0),0|(e|=0),45),k(),!(0|U(127&i)))return i=2,n[r>>2]=i,0;if(i=0|Ne(0|A,0|e,52),k(),!(i&=15))return i=5,n[r>>2]=i,0;for(t=1;;){if(!(0==((0|Ye(7,0,3*(15-t|0)|0))&A|0)&0==((0|k())&e|0))){t=2,A=6;break}if(!(t>>>0>>0)){t=5,A=6;break}t=t+1|0}return 6==(0|A)?(n[r>>2]=t,0):0},_maxGridDiskSize:function(A,e){e|=0;var r=0,t=0,i=0;return(0|(A|=0))<0?0|(e=2):(0|A)>13780509?0|(e=0|ee(15,e)):(i=0|Fe(0|A,0|(r=((0|A)<0)<<31>>31),3,0),t=0|k(),r=0|Ie(0|A,0|r,1,0),r=0|Ie(0|(r=0|Fe(0|i,0|t,0|r,0|k())),0|k(),1,0),A=0|k(),n[e>>2]=r,n[e+4>>2]=A,0|(e=0))},_maxPolygonToCellsSize:function(A,e,r,t){e|=0,t|=0;var i,f=0,a=0,o=0,u=0,c=0;if(i=I,I=I+48|0,f=i+16|0,a=i+8|0,o=i,0|(r|=0))return I=i,0|(o=15);if(u=0|n[(c=A|=0)+4>>2],n[(r=a)>>2]=n[c>>2],n[r+4>>2]=u,de(a,f),!(e=0|W(f,e,o))){if(r=0|n[a>>2],(0|(a=0|n[A+8>>2]))>0){f=0|n[A+12>>2],e=0;do{r=(0|n[f+(e<<3)>>2])+r|0,e=e+1|0}while((0|e)<(0|a))}f=0|n[(e=o)>>2],(0|(e=0|n[e+4>>2]))<(0|(a=((0|r)<0)<<31>>31))|(0|e)==(0|a)&f>>>0>>0?(n[(e=o)>>2]=r,n[e+4>>2]=a,e=a):r=f,u=0|Ie(0|r,0|e,12,0),c=0|k(),n[(e=o)>>2]=u,n[e+4>>2]=c,n[(e=t)>>2]=u,n[e+4>>2]=c,e=0}return I=i,0|(c=e)},_memcpy:He,_memset:$e,_originToDirectedEdges:function(A,e,r){r|=0;var t,i=0;return t=0==(0|FA(A|=0,e|=0)),e&=-2130706433,n[(i=r)>>2]=t?A:0,n[i+4>>2]=t?285212672|e:0,n[(i=r+8|0)>>2]=A,n[i+4>>2]=301989888|e,n[(i=r+16|0)>>2]=A,n[i+4>>2]=318767104|e,n[(i=r+24|0)>>2]=A,n[i+4>>2]=335544320|e,n[(i=r+32|0)>>2]=A,n[i+4>>2]=352321536|e,n[(r=r+40|0)>>2]=A,n[r+4>>2]=369098752|e,0},_pentagonCount:function(){return 12},_polygonToCells:function(A,e,r,t){e|=0,t|=0;var i,f,a,o,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,y=0,_=0,m=0,E=0,B=0,x=0,D=0,M=0,C=0,Q=0,P=0,S=0,R=0,F=0,G=0,U=0;if(o=I,I=I+112|0,i=o+80|0,d=o+72|0,f=o,a=o+56|0,0|(r|=0))return I=o,0|(U=15);if(!(U=0|Ce(32+(n[(b=(A|=0)+8|0)>>2]<<5)|0)))return I=o,0|(U=13);if(be(A,U),G=0|n[(F=A)+4>>2],n[(r=d)>>2]=n[F>>2],n[r+4>>2]=G,de(d,i),r=0|W(i,e,f))F=0,G=0;else{if(r=0|n[d>>2],(0|(c=0|n[b>>2]))>0){s=0|n[A+12>>2],u=0;do{r=(0|n[s+(u<<3)>>2])+r|0,u=u+1|0}while((0|u)!=(0|c));u=r}else u=r;c=0|n[(r=f)>>2],(0|(r=0|n[r+4>>2]))<(0|(s=((0|u)<0)<<31>>31))|(0|r)==(0|s)&c>>>0>>0?(n[(r=f)>>2]=u,n[r+4>>2]=s,r=s):u=c,F=0|Ie(0|u,0|r,12,0),G=0|k(),n[(r=f)>>2]=F,n[r+4>>2]=G,r=0}if(0|r)return Qe(U),I=o,0|(U=r);if(!(u=0|Pe(F,8)))return Qe(U),I=o,0|(U=13);if(!(l=0|Pe(F,8)))return Qe(U),Qe(u),I=o,0|(U=13);n[(S=i)>>2]=0,n[S+4>>2]=0,R=0|n[(S=A)+4>>2],n[(r=d)>>2]=n[S>>2],n[r+4>>2]=R,r=0|L(d,F,G,e,i,u,l);A:do{if(r)Qe(u),Qe(l),Qe(U);else{e:do{if((0|n[b>>2])>0){for(s=A+12|0,c=0;r=0|L((0|n[s>>2])+(c<<3)|0,F,G,e,i,u,l),c=c+1|0,!(0|r);)if((0|c)>=(0|n[b>>2]))break e;Qe(u),Qe(l),Qe(U);break A}}while(0);(0|G)>0|0==(0|G)&F>>>0>0&&$e(0|l,0,F<<3|0),S=0|n[(R=i)+4>>2];e:do{if((0|S)>0|0==(0|S)&(0|n[R>>2])>>>0>0){C=u,Q=l,P=u,S=l,R=u,r=u,x=u,D=l,M=l,u=l;r:for(;;){for(_=0,m=0,E=0,B=0,c=0,s=0;;){d=(l=f)+56|0;do{n[l>>2]=0,l=l+4|0}while((0|l)<(0|d));if(0|T(b=0|n[(e=C+(_<<3)|0)>>2],e=0|n[e+4>>2],1,f,0)){d=(l=f)+56|0;do{n[l>>2]=0,l=l+4|0}while((0|l)<(0|d));0|(l=0|Pe(7,4))&&(O(b,e,1,f,l,7,0,0),Qe(l))}for(y=0;;){p=0|n[(w=f+(y<<3)|0)>>2],w=0|n[w+4>>2];t:do{if(0==(0|p)&0==(0|w))l=c,d=s;else{if(h=0|Le(0|p,0|w,0|F,0|G),b=0|k(),!(0==(0|(d=0|n[(e=l=t+(h<<3)|0)>>2]))&0==(0|(e=0|n[e+4>>2])))){g=0,v=0;do{if((0|g)>(0|G)|(0|g)==(0|G)&v>>>0>F>>>0)break r;if((0|d)==(0|p)&(0|e)==(0|w)){l=c,d=s;break t}h=0|Ge(0|(l=0|Ie(0|h,0|b,1,0)),0|k(),0|F,0|G),b=0|k(),v=0|Ie(0|v,0|g,1,0),g=0|k(),d=0|n[(e=l=t+(h<<3)|0)>>2],e=0|n[e+4>>2]}while(!(0==(0|d)&0==(0|e)))}0==(0|p)&0==(0|w)?(l=c,d=s):($A(p,w,a),0|he(A,U,a)&&(v=0|Ie(0|c,0|s,1,0),s=0|k(),n[(g=l)>>2]=p,n[g+4>>2]=w,n[(c=Q+(c<<3)|0)>>2]=p,n[c+4>>2]=w,c=v),l=c,d=s)}}while(0);if((y=y+1|0)>>>0>=7)break;c=l,s=d}if(_=0|Ie(0|_,0|m,1,0),m=0|k(),E=0|Ie(0|E,0|B,1,0),B=0|k(),c=0|n[(s=i)>>2],!((0|B)<(0|(s=0|n[s+4>>2]))|(0|B)==(0|s)&E>>>0>>0))break;c=l,s=d}if((0|s)>0|0==(0|s)&c>>>0>0){c=0,s=0;do{n[(B=C+(c<<3)|0)>>2]=0,n[B+4>>2]=0,c=0|Ie(0|c,0|s,1,0),s=0|k(),E=0|n[(B=i)+4>>2]}while((0|s)<(0|E)|((0|s)==(0|E)?c>>>0<(0|n[B>>2])>>>0:0))}if(n[(B=i)>>2]=l,n[B+4>>2]=d,!((0|d)>0|0==(0|d)&l>>>0>0))break e;y=u,_=M,m=R,E=D,B=Q,u=x,M=r,D=P,x=y,r=_,R=S,S=m,P=E,Q=C,C=B}Qe(P),Qe(S),Qe(U),r=1;break A}r=l}while(0);Qe(U),Qe(u),Qe(r),r=0}}while(0);return I=o,0|(U=r)},_readInt64AsDoubleFromPointer:function(A){return+(+((0|n[(A|=0)>>2])>>>0)+4294967296*+(0|n[A+4>>2]))},_res0CellCount:function(){return 122},_round:Ve,_sbrk:We,_sizeOfCellBoundary:function(){return 168},_sizeOfCoordIJ:function(){return 8},_sizeOfGeoLoop:function(){return 8},_sizeOfGeoPolygon:function(){return 16},_sizeOfH3Index:function(){return 8},_sizeOfLatLng:function(){return 16},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompactCells:function(A,e,r,t,i,f,a){A|=0,t|=0,i|=0,f|=0;var o,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0;if(o=I,I=I+16|0,g=o,!((0|(r|=0))>0|0==(0|r)&(e|=0)>>>0>0))return I=o,0|(g=0);if((0|(a|=0))>=16)return I=o,0|(g=12);b=0,h=0,d=0,u=0;A:for(;;){if(l=0|Ne(0|(c=0|n[(s=A+(b<<3)|0)>>2]),0|(s=0|n[s+4>>2]),52),k(),(15&l|0)>(0|a)){u=12,c=11;break}if(KA(g,c,s,a),0==(0|(s=0|n[(l=g)>>2]))&0==(0|(l=0|n[l+4>>2])))c=d;else{c=d;do{if(!((0|u)<(0|f)|(0|u)==(0|f)&c>>>0>>0)){c=10;break A}n[(d=t+(c<<3)|0)>>2]=s,n[d+4>>2]=l,c=0|Ie(0|c,0|u,1,0),u=0|k(),JA(g),s=0|n[(d=g)>>2],l=0|n[d+4>>2]}while(!(0==(0|s)&0==(0|l)))}if(b=0|Ie(0|b,0|h,1,0),!((0|(h=0|k()))<(0|r)|(0|h)==(0|r)&b>>>0>>0)){u=0,c=11;break}d=c}return 10==(0|c)?(I=o,0|(g=14)):11==(0|c)?(I=o,0|u):0},_uncompactCellsSize:function(A,e,r,t,i){A|=0,e|=0,r|=0,t|=0,i|=0;var f,a,o=0,u=0,c=0,s=0,l=0,d=0;a=I,I=I+16|0,f=a;A:do{if((0|r)>0|0==(0|r)&e>>>0>0){for(l=0,u=0,o=0,d=0;;){if(!(0==(0|(c=0|n[(s=A+(l<<3)|0)>>2]))&0==(0|(s=0|n[s+4>>2])))&&(s=0==(0|OA(c,s,t,f)),u=0|Ie(0|n[(c=f)>>2],0|n[c+4>>2],0|u,0|o),o=0|k(),!s)){o=12;break}if(l=0|Ie(0|l,0|d,1,0),!((0|(d=0|k()))<(0|r)|(0|d)==(0|r)&l>>>0>>0))break A}return I=a,0|o}u=0,o=0}while(0);return n[i>>2]=u,n[i+4>>2]=o,I=a,0|(i=0)},_vertexToLatLng:function(A,e,r){r|=0;var t,i,f,a,o=0,u=0;return a=I,I=I+192|0,i=a,f=a+168|0,o=0|Ne(0|(A|=0),0|(e|=0),56),k(),o&=7,0|(t=0|HA(A,u=-2130706433&e|134217728,f))?(I=a,0|(u=t)):(e=0|Ne(0|A,0|e,52),k(),e&=15,0|FA(A,u)?DA(f,e,o,1,i):PA(f,e,o,1,i),u=i+8|0,n[r>>2]=n[u>>2],n[r+4>>2]=n[u+4>>2],n[r+8>>2]=n[u+8>>2],n[r+12>>2]=n[u+12>>2],I=a,0|(u=0))},establishStackSpace:function(A,e){I=A|=0},stackAlloc:function(A){var e;return e=I,I=(I=I+(A|=0)|0)+15&-16,0|e},stackRestore:function(A){I=A|=0},stackSave:function(){return 0|I}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:aA,b:function(A){u=A},c:function(){return u},d:function(A,e,r,t){aA("Assertion failed: "+b(A)+", at: "+[e?b(e):"unknown filename",r,t?b(t):"unknown function"])},e:function(A){return r.___errno_location&&(w[r.___errno_location()>>2]=A),A},f:j,g:function(A,e,r){v.set(v.subarray(e,e+r),A)},h:function(A){var e=j(),r=16777216,t=2130706432;if(A>t)return!1;for(var n=Math.max(e,16777216);n>0]=e;break;case"i16":p[A>>1]=e;break;case"i32":w[A>>2]=e;break;case"i64":G=[e>>>0,(F=e,+Q(F)>=1?F>0?(0|S(+I(F/4294967296),4294967295))>>>0:~~+P((F-+(~~F>>>0))/4294967296)>>>0:0)],w[A>>2]=G[0],w[A+4>>2]=G[1];break;case"float":y[A>>2]=e;break;case"double":_[A>>3]=e;break;default:aA("invalid type for setValue: "+r)}},r.getValue=function(A,e,r){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return g[A>>0];case"i16":return p[A>>1];case"i32":case"i64":return w[A>>2];case"float":return y[A>>2];case"double":return _[A>>3];default:aA("invalid type for getValue: "+e)}return null},L){N(L)||(W=L,L=r.locateFile?r.locateFile(W,f):f+W),R++,r.monitorRunDependencies&&r.monitorRunDependencies(R);var rA=function(A){A.byteLength&&(A=new Uint8Array(A)),v.set(A,8),r.memoryInitializerRequest&&delete r.memoryInitializerRequest.response,function(A){if(R--,r.monitorRunDependencies&&r.monitorRunDependencies(R),0==R&&(null!==T&&(clearInterval(T),T=null),O)){var e=O;O=null,e()}}()},tA=function(){n(L,rA,(function(){throw"could not load memory initializer "+L}))},nA=V(L);if(nA)rA(nA.buffer);else if(r.memoryInitializerRequest){var iA=function(){var A=r.memoryInitializerRequest,e=A.response;if(200!==A.status&&0!==A.status){var t=V(r.memoryInitializerRequestURL);if(!t)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+A.status+", retrying "+L),void tA();e=t.buffer}rA(e)};r.memoryInitializerRequest.response?setTimeout(iA,0):r.memoryInitializerRequest.addEventListener("load",iA)}else tA()}function fA(A){function e(){K||(K=!0,c||(k(D),k(M),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)A=r.postRun.shift(),C.unshift(A);var A;k(C)}()))}A=A||i,R>0||(!function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)A=r.preRun.shift(),x.unshift(A);var A;k(x)}(),R>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}function aA(A){throw r.onAbort&&r.onAbort(A),a(A+=""),o(A),c=!0,"abort("+A+"). Build with -s ASSERTIONS=1 for more info."}if(O=function A(){K||fA(),K||(O=A)},r.run=fA,r.abort=aA,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return fA(),A}("object"===typeof t?t:{}),n="number",i=[["sizeOfH3Index",n],["sizeOfLatLng",n],["sizeOfCellBoundary",n],["sizeOfGeoLoop",n],["sizeOfGeoPolygon",n],["sizeOfLinkedGeoPolygon",n],["sizeOfCoordIJ",n],["readInt64AsDoubleFromPointer",n],["isValidCell",n,[n,n]],["latLngToCell",n,[n,n,n,n]],["cellToLatLng",n,[n,n,n]],["cellToBoundary",n,[n,n,n]],["maxGridDiskSize",n,[n,n]],["gridDisk",n,[n,n,n,n]],["gridDiskDistances",n,[n,n,n,n,n]],["gridRingUnsafe",n,[n,n,n,n]],["maxPolygonToCellsSize",n,[n,n,n,n]],["polygonToCells",n,[n,n,n,n]],["cellsToLinkedMultiPolygon",n,[n,n,n]],["destroyLinkedMultiPolygon",null,[n]],["compactCells",n,[n,n,n,n]],["uncompactCells",n,[n,n,n,n,n,n]],["uncompactCellsSize",n,[n,n,n,n,n]],["isPentagon",n,[n,n]],["isResClassIII",n,[n,n]],["getBaseCellNumber",n,[n,n]],["getResolution",n,[n,n]],["maxFaceCount",n,[n,n,n]],["getIcosahedronFaces",n,[n,n,n]],["cellToParent",n,[n,n,n,n]],["cellToChildren",n,[n,n,n,n]],["cellToCenterChild",n,[n,n,n,n]],["cellToChildrenSize",n,[n,n,n,n]],["cellToChildPos",n,[n,n,n,n]],["childPosToCell",n,[n,n,n,n,n,n]],["areNeighborCells",n,[n,n,n,n,n]],["cellsToDirectedEdge",n,[n,n,n,n,n]],["getDirectedEdgeOrigin",n,[n,n,n]],["getDirectedEdgeDestination",n,[n,n,n]],["isValidDirectedEdge",n,[n,n]],["directedEdgeToCells",n,[n,n,n]],["originToDirectedEdges",n,[n,n,n]],["directedEdgeToBoundary",n,[n,n,n]],["gridDistance",n,[n,n,n,n,n]],["gridPathCells",n,[n,n,n,n,n]],["gridPathCellsSize",n,[n,n,n,n,n]],["cellToLocalIj",n,[n,n,n,n,n,n]],["localIjToCell",n,[n,n,n,n,n]],["getHexagonAreaAvgM2",n,[n,n]],["getHexagonAreaAvgKm2",n,[n,n]],["getHexagonEdgeLengthAvgM",n,[n,n]],["getHexagonEdgeLengthAvgKm",n,[n,n]],["greatCircleDistanceM",n,[n,n]],["greatCircleDistanceKm",n,[n,n]],["greatCircleDistanceRads",n,[n,n]],["cellAreaM2",n,[n,n,n]],["cellAreaKm2",n,[n,n,n]],["cellAreaRads2",n,[n,n,n]],["edgeLengthM",n,[n,n,n]],["edgeLengthKm",n,[n,n,n]],["edgeLengthRads",n,[n,n,n]],["getNumCells",n,[n,n]],["getRes0Cells",n,[n]],["res0CellCount",n],["getPentagons",n,[n,n]],["pentagonCount",n],["cellToVertex",n,[n,n,n,n]],["cellToVertexes",n,[n,n,n]],["vertexToLatLng",n,[n,n,n]],["isValidVertex",n,[n,n]]],f=4,a=5,o={0:"Success",1:"The operation failed but a more specific error is not available",2:"Argument was outside of acceptable range",3:"Latitude or longitude arguments were outside of acceptable range"};o[f]="Resolution argument was outside of acceptable range",o[a]="Cell argument was not valid",o[6]="Directed edge argument was not valid",o[7]="Undirected edge argument was not valid",o[8]="Vertex argument was not valid",o[9]="Pentagon distortion was encountered",o[10]="Duplicate input",o[11]="Cell arguments were not neighbors",o[12]="Cell arguments had incompatible resolutions",o[13]="Memory allocation failed",o[14]="Bounds of provided memory were insufficient",o[15]="Mode or flags argument was not valid";var u=1001,c=1002,s={1e3:"Unknown unit"};s[u]="Array length out of bounds",s[c]="Got unexpected null value for H3 index";var l="Unknown error";function d(A,e,r){var t=r&&"value"in r,n=new Error((A[e]||l)+" (code: "+e+(t?", value: "+r.value:"")+")");return n.code=e,n}function b(A,e){return d(o,A,2===arguments.length?{value:e}:{})}function h(A){if(0!==A)throw b(A)}var g={};i.forEach((function(A){g[A[0]]=t.cwrap.apply(t,A)}));var v=16,p=8,w=(g.sizeOfH3Index(),g.sizeOfLatLng());g.sizeOfCellBoundary(),g.sizeOfGeoPolygon(),g.sizeOfGeoLoop(),g.sizeOfLinkedGeoPolygon(),g.sizeOfCoordIJ();Math.pow(2,32);var y=/[^0-9a-fA-F]/;function _(A){if(Array.isArray(A)&&2===A.length&&Number.isInteger(A[0])&&Number.isInteger(A[1]))return A;if("string"!==typeof A||y.test(A))return[0,0];var e=parseInt(A.substring(0,A.length-8),v);return[parseInt(A.substring(A.length-8),v),e]}Math.pow(2,32);function m(A){return 180*t.getValue(A,"double")/Math.PI}function E(A){return[m(A),m(A+p)]}function B(A){var e=t._malloc(w),r=_(A),n=r[0],i=r[1];try{return h(g.cellToLatLng(n,i,e)),E(e)}finally{t._free(e)}}},94996:(A,e,r)=>{"use strict";var t=r(10255),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},f={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function o(A){return t.isMemo(A)?f:a[A.$$typeof]||n}a[t.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[t.Memo]=f;var u=Object.defineProperty,c=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,b=Object.prototype;A.exports=function A(e,r,t){if("string"!==typeof r){if(b){var n=d(r);n&&n!==b&&A(e,n,t)}var f=c(r);s&&(f=f.concat(s(r)));for(var a=o(e),h=o(r),g=0;g{var t=r(57552),n=r(15969);function i(A){this.__wrapped__=A,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=t(n.prototype),i.prototype.constructor=i,A.exports=i},72293:(A,e,r)=>{var t=r(57552),n=r(15969);function i(A,e){this.__wrapped__=A,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}i.prototype=t(n.prototype),i.prototype.constructor=i,A.exports=i},51105:A=>{A.exports=function(A,e,r){switch(r.length){case 0:return A.call(e);case 1:return A.call(e,r[0]);case 2:return A.call(e,r[0],r[1]);case 3:return A.call(e,r[0],r[1],r[2])}return A.apply(e,r)}},10519:(A,e,r)=>{var t=r(3328);A.exports=function(A,e){return!!(null==A?0:A.length)&&t(A,e,0)>-1}},17717:A=>{A.exports=function(A,e,r){for(var t=-1,n=null==A?0:A.length;++t{var t=r(70695)("length");A.exports=t},56467:A=>{A.exports=function(A){return A.split("")}},51104:(A,e,r)=>{var t=r(19267),n=r(41848),i=Object.prototype.hasOwnProperty;A.exports=function(A,e,r){var f=A[e];i.call(A,e)&&n(f,r)&&(void 0!==r||e in A)||t(A,e,r)}},68632:(A,e,r)=>{var t=r(86886),n=r(65301);A.exports=function(A,e){return A&&t(e,n(e),A)}},40057:(A,e,r)=>{var t=r(86886),n=r(84549);A.exports=function(A,e){return A&&t(e,n(e),A)}},19267:(A,e,r)=>{var t=r(64743);A.exports=function(A,e,r){"__proto__"==e&&t?t(A,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):A[e]=r}},1482:(A,e,r)=>{var t=r(91088),n=r(27622),i=r(51104),f=r(68632),a=r(40057),o=r(97390),u=r(46344),c=r(14758),s=r(13705),l=r(71762),d=r(29758),b=r(14055),h=r(73714),g=r(29510),v=r(39699),p=r(78587),w=r(3970),y=r(33261),_=r(75091),m=r(23532),E=r(65301),B=r(84549),k="[object Arguments]",x="[object Function]",D="[object Object]",M={};M[k]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[D]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[x]=M["[object WeakMap]"]=!1,A.exports=function A(e,r,C,Q,P,I){var S,R=1&r,T=2&r,O=4&r;if(C&&(S=P?C(e,Q,P,I):C(e)),void 0!==S)return S;if(!_(e))return e;var F=p(e);if(F){if(S=h(e),!R)return u(e,S)}else{var G=b(e),L=G==x||"[object GeneratorFunction]"==G;if(w(e))return o(e,R);if(G==D||G==k||L&&!P){if(S=T||L?{}:v(e),!R)return T?s(e,a(S,e)):c(e,f(S,e))}else{if(!M[G])return P?e:{};S=g(e,G,R)}}I||(I=new t);var U=I.get(e);if(U)return U;I.set(e,S),m(e)?e.forEach((function(t){S.add(A(t,r,C,t,e,I))})):y(e)&&e.forEach((function(t,n){S.set(n,A(t,r,C,n,e,I))}));var N=F?void 0:(O?T?d:l:T?B:E)(e);return n(N||e,(function(t,n){N&&(t=e[n=t]),i(S,n,A(t,r,C,n,e,I))})),S}},57552:(A,e,r)=>{var t=r(75091),n=Object.create,i=function(){function A(){}return function(e){if(!t(e))return{};if(n)return n(e);A.prototype=e;var r=new A;return A.prototype=void 0,r}}();A.exports=i},72101:(A,e,r)=>{var t=r(72475),n=r(10519),i=r(17717),f=r(8067),a=r(86113),o=r(16952);A.exports=function(A,e,r,u){var c=-1,s=n,l=!0,d=A.length,b=[],h=e.length;if(!d)return b;r&&(e=f(e,a(r))),u?(s=i,l=!1):e.length>=200&&(s=o,l=!1,e=new t(e));A:for(;++c{var t=r(12641);A.exports=function(A,e){var r=[];return t(A,(function(A,t,n){e(A,t,n)&&r.push(A)})),r}},35620:A=>{A.exports=function(A,e,r,t){for(var n=A.length,i=r+(t?1:-1);t?i--:++i{A.exports=function(A,e,r){var t;return r(A,(function(A,r,n){if(e(A,r,n))return t=r,!1})),t}},51232:(A,e,r)=>{var t=r(19596),n=r(26563);A.exports=function A(e,r,i,f,a){var o=-1,u=e.length;for(i||(i=n),a||(a=[]);++o0&&i(c)?r>1?A(c,r-1,i,f,a):t(a,c):f||(a[a.length]=c)}return a}},3328:(A,e,r)=>{var t=r(35620),n=r(2201),i=r(10603);A.exports=function(A,e,r){return e===e?i(A,e,r):t(A,n,r)}},13233:(A,e,r)=>{var t=r(14055),n=r(79501);A.exports=function(A){return n(A)&&"[object Map]"==t(A)}},2201:A=>{A.exports=function(A){return A!==A}},6824:(A,e,r)=>{var t=r(96320),n=r(79501);A.exports=function(A){return n(A)&&"[object RegExp]"==t(A)}},11950:(A,e,r)=>{var t=r(14055),n=r(79501);A.exports=function(A){return n(A)&&"[object Set]"==t(A)}},24345:(A,e,r)=>{var t=r(75091),n=r(24385),i=r(31556),f=Object.prototype.hasOwnProperty;A.exports=function(A){if(!t(A))return i(A);var e=n(A),r=[];for(var a in A)("constructor"!=a||!e&&f.call(A,a))&&r.push(a);return r}},15969:A=>{A.exports=function(){}},5162:(A,e,r)=>{var t=r(12641),n=r(99290);A.exports=function(A,e){var r=-1,i=n(A)?Array(A.length):[];return t(A,(function(A,t,n){i[++r]=e(A,t,n)})),i}},8506:(A,e,r)=>{var t=r(8067),n=r(39578),i=r(25258),f=r(5162),a=r(32572),o=r(86113),u=r(92442),c=r(82675),s=r(78587);A.exports=function(A,e,r){e=e.length?t(e,(function(A){return s(A)?function(e){return n(e,1===A.length?A[0]:A)}:A})):[c];var l=-1;e=t(e,o(i));var d=f(A,(function(A,r,n){return{criteria:t(e,(function(e){return e(A)})),index:++l,value:A}}));return a(d,(function(A,e){return u(A,e,r)}))}},41894:(A,e,r)=>{var t=r(22729),n=r(22819);A.exports=function(A,e){return t(A,e,(function(e,r){return n(A,r)}))}},22729:(A,e,r)=>{var t=r(39578),n=r(11231),i=r(65469);A.exports=function(A,e,r){for(var f=-1,a=e.length,o={};++f{var e=Math.ceil,r=Math.max;A.exports=function(A,t,n,i){for(var f=-1,a=r(e((t-A)/(n||1)),0),o=Array(a);a--;)o[i?a:++f]=A,A+=n;return o}},93850:A=>{var e=Math.floor;A.exports=function(A,r){var t="";if(!A||r<1||r>9007199254740991)return t;do{r%2&&(t+=A),(r=e(r/2))&&(A+=A)}while(r);return t}},97477:(A,e,r)=>{var t=r(82675),n=r(93521),i=r(26725);A.exports=function(A,e){return i(n(A,e,t),A+"")}},11231:(A,e,r)=>{var t=r(51104),n=r(65469),i=r(54940),f=r(75091),a=r(79813);A.exports=function(A,e,r,o){if(!f(A))return A;for(var u=-1,c=(e=n(e,A)).length,s=c-1,l=A;null!=l&&++u{var t=r(82675),n=r(82197),i=n?function(A,e){return n.set(A,e),A}:t;A.exports=i},71334:(A,e,r)=>{var t=r(77519),n=r(64743),i=r(82675),f=n?function(A,e){return n(A,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:i;A.exports=f},867:A=>{A.exports=function(A,e,r){var t=-1,n=A.length;e<0&&(e=-e>n?0:n+e),(r=r>n?n:r)<0&&(r+=n),n=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(n);++t{A.exports=function(A,e){var r=A.length;for(A.sort(e);r--;)A[r]=A[r].value;return A}},91504:(A,e,r)=>{var t=r(64742),n=/^\s+/;A.exports=function(A){return A?A.slice(0,t(A)+1).replace(n,""):A}},96352:(A,e,r)=>{var t=r(72475),n=r(10519),i=r(17717),f=r(16952),a=r(18004),o=r(30993);A.exports=function(A,e,r){var u=-1,c=n,s=A.length,l=!0,d=[],b=d;if(r)l=!1,c=i;else if(s>=200){var h=e?null:a(A);if(h)return o(h);l=!1,c=f,b=new t}else b=e?[]:d;A:for(;++u{var t=r(867);A.exports=function(A,e,r){var n=A.length;return r=void 0===r?n:r,!e&&r>=n?A:t(A,e,r)}},88865:(A,e,r)=>{var t=r(8924);A.exports=function(A){var e=new A.constructor(A.byteLength);return new t(e).set(new t(A)),e}},97390:(A,e,r)=>{A=r.nmd(A);var t=r(89570),n=e&&!e.nodeType&&e,i=n&&A&&!A.nodeType&&A,f=i&&i.exports===n?t.Buffer:void 0,a=f?f.allocUnsafe:void 0;A.exports=function(A,e){if(e)return A.slice();var r=A.length,t=a?a(r):new A.constructor(r);return A.copy(t),t}},10840:(A,e,r)=>{var t=r(88865);A.exports=function(A,e){var r=e?t(A.buffer):A.buffer;return new A.constructor(r,A.byteOffset,A.byteLength)}},75533:A=>{var e=/\w*$/;A.exports=function(A){var r=new A.constructor(A.source,e.exec(A));return r.lastIndex=A.lastIndex,r}},81407:(A,e,r)=>{var t=r(72328),n=t?t.prototype:void 0,i=n?n.valueOf:void 0;A.exports=function(A){return i?Object(i.call(A)):{}}},75608:(A,e,r)=>{var t=r(88865);A.exports=function(A,e){var r=e?t(A.buffer):A.buffer;return new A.constructor(r,A.byteOffset,A.length)}},75397:(A,e,r)=>{var t=r(84193);A.exports=function(A,e){if(A!==e){var r=void 0!==A,n=null===A,i=A===A,f=t(A),a=void 0!==e,o=null===e,u=e===e,c=t(e);if(!o&&!c&&!f&&A>e||f&&a&&u&&!o&&!c||n&&a&&u||!r&&u||!i)return 1;if(!n&&!f&&!c&&A{var t=r(75397);A.exports=function(A,e,r){for(var n=-1,i=A.criteria,f=e.criteria,a=i.length,o=r.length;++n=o?u:u*("desc"==r[n]?-1:1)}return A.index-e.index}},99013:A=>{var e=Math.max;A.exports=function(A,r,t,n){for(var i=-1,f=A.length,a=t.length,o=-1,u=r.length,c=e(f-a,0),s=Array(u+c),l=!n;++o{var e=Math.max;A.exports=function(A,r,t,n){for(var i=-1,f=A.length,a=-1,o=t.length,u=-1,c=r.length,s=e(f-o,0),l=Array(s+c),d=!n;++i{A.exports=function(A,e){var r=-1,t=A.length;for(e||(e=Array(t));++r{var t=r(51104),n=r(19267);A.exports=function(A,e,r,i){var f=!r;r||(r={});for(var a=-1,o=e.length;++a{var t=r(86886),n=r(94330);A.exports=function(A,e){return t(A,n(A),e)}},13705:(A,e,r)=>{var t=r(86886),n=r(29972);A.exports=function(A,e){return t(A,n(A),e)}},3879:A=>{A.exports=function(A,e){for(var r=A.length,t=0;r--;)A[r]===e&&++t;return t}},81190:(A,e,r)=>{var t=r(59462),n=r(89570);A.exports=function(A,e,r){var i=1&e,f=t(A);return function e(){return(this&&this!==n&&this instanceof e?f:A).apply(i?r:this,arguments)}}},59462:(A,e,r)=>{var t=r(57552),n=r(75091);A.exports=function(A){return function(){var e=arguments;switch(e.length){case 0:return new A;case 1:return new A(e[0]);case 2:return new A(e[0],e[1]);case 3:return new A(e[0],e[1],e[2]);case 4:return new A(e[0],e[1],e[2],e[3]);case 5:return new A(e[0],e[1],e[2],e[3],e[4]);case 6:return new A(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new A(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=t(A.prototype),i=A.apply(r,e);return n(i)?i:r}}},33673:(A,e,r)=>{var t=r(51105),n=r(59462),i=r(73447),f=r(55424),a=r(21310),o=r(4280),u=r(89570);A.exports=function(A,e,r){var c=n(A);return function n(){for(var s=arguments.length,l=Array(s),d=s,b=a(n);d--;)l[d]=arguments[d];var h=s<3&&l[0]!==b&&l[s-1]!==b?[]:o(l,b);return(s-=h.length){var t=r(25258),n=r(99290),i=r(65301);A.exports=function(A){return function(e,r,f){var a=Object(e);if(!n(e)){var o=t(r,3);e=i(e),r=function(A){return o(a[A],A,a)}}var u=A(e,r,f);return u>-1?a[o?e[u]:u]:void 0}}},73447:(A,e,r)=>{var t=r(99013),n=r(98462),i=r(3879),f=r(59462),a=r(55424),o=r(21310),u=r(32039),c=r(4280),s=r(89570);A.exports=function A(e,r,l,d,b,h,g,v,p,w){var y=128&r,_=1&r,m=2&r,E=24&r,B=512&r,k=m?void 0:f(e);return function x(){for(var D=arguments.length,M=Array(D),C=D;C--;)M[C]=arguments[C];if(E)var Q=o(x),P=i(M,Q);if(d&&(M=t(M,d,b,E)),h&&(M=n(M,h,g,E)),D-=P,E&&D1&&M.reverse(),y&&p{var t=r(93850),n=r(18315),i=r(10977),f=r(86794),a=r(57105),o=r(57820),u=Math.ceil;A.exports=function(A,e){var r=(e=void 0===e?" ":n(e)).length;if(r<2)return r?t(e,A):e;var c=t(e,u(A/a(e)));return f(e)?i(o(c),0,A).join(""):c.slice(0,A)}},84322:(A,e,r)=>{var t=r(51105),n=r(59462),i=r(89570);A.exports=function(A,e,r,f){var a=1&e,o=n(A);return function e(){for(var n=-1,u=arguments.length,c=-1,s=f.length,l=Array(s+u),d=this&&this!==i&&this instanceof e?o:A;++c{var t=r(33723),n=r(787),i=r(41655);A.exports=function(A){return function(e,r,f){return f&&"number"!=typeof f&&n(e,r,f)&&(r=f=void 0),e=i(e),void 0===r?(r=e,e=0):r=i(r),f=void 0===f?e{var t=r(66718),n=r(25958),i=r(66522);A.exports=function(A,e,r,f,a,o,u,c,s,l){var d=8&e;e|=d?32:64,4&(e&=~(d?64:32))||(e&=-4);var b=[A,e,a,d?o:void 0,d?u:void 0,d?void 0:o,d?void 0:u,c,s,l],h=r.apply(void 0,b);return t(A)&&n(h,b),h.placeholder=f,i(h,A,e)}},18004:(A,e,r)=>{var t=r(40973),n=r(19087),i=r(30993),f=t&&1/i(new t([,-0]))[1]==1/0?function(A){return new t(A)}:n;A.exports=f},98585:(A,e,r)=>{var t=r(40492),n=r(81190),i=r(33673),f=r(73447),a=r(84322),o=r(62007),u=r(58349),c=r(25958),s=r(66522),l=r(41873),d=Math.max;A.exports=function(A,e,r,b,h,g,v,p){var w=2&e;if(!w&&"function"!=typeof A)throw new TypeError("Expected a function");var y=b?b.length:0;if(y||(e&=-97,b=h=void 0),v=void 0===v?v:d(l(v),0),p=void 0===p?p:l(p),y-=h?h.length:0,64&e){var _=b,m=h;b=h=void 0}var E=w?void 0:o(A),B=[A,e,r,b,h,_,m,g,v,p];if(E&&u(B,E),A=B[0],e=B[1],r=B[2],b=B[3],h=B[4],!(p=B[9]=void 0===B[9]?w?0:A.length:d(B[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)k=8==e||16==e?i(A,e,p):32!=e&&33!=e||h.length?f.apply(void 0,B):a(A,e,r,b);else var k=n(A,e,r);return s((E?t:c)(k,B),A,e)}},64743:(A,e,r)=>{var t=r(42542),n=function(){try{var A=t(Object,"defineProperty");return A({},"",{}),A}catch(e){}}();A.exports=n},57170:(A,e,r)=>{var t=r(27825),n=r(93521),i=r(26725);A.exports=function(A){return i(n(A,void 0,t),A+"")}},29758:(A,e,r)=>{var t=r(87367),n=r(29972),i=r(84549);A.exports=function(A){return t(A,i,n)}},62007:(A,e,r)=>{var t=r(82197),n=r(19087),i=t?function(A){return t.get(A)}:n;A.exports=i},35710:(A,e,r)=>{var t=r(32638),n=Object.prototype.hasOwnProperty;A.exports=function(A){for(var e=A.name+"",r=t[e],i=n.call(t,e)?r.length:0;i--;){var f=r[i],a=f.func;if(null==a||a==A)return f.name}return e}},21310:A=>{A.exports=function(A){return A.placeholder}},97882:(A,e,r)=>{var t=r(97392)(Object.getPrototypeOf,Object);A.exports=t},29972:(A,e,r)=>{var t=r(19596),n=r(97882),i=r(94330),f=r(89926),a=Object.getOwnPropertySymbols?function(A){for(var e=[];A;)t(e,i(A)),A=n(A);return e}:f;A.exports=a},50018:A=>{var e=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;A.exports=function(A){var t=A.match(e);return t?t[1].split(r):[]}},86794:A=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");A.exports=function(A){return e.test(A)}},73714:A=>{var e=Object.prototype.hasOwnProperty;A.exports=function(A){var r=A.length,t=new A.constructor(r);return r&&"string"==typeof A[0]&&e.call(A,"index")&&(t.index=A.index,t.input=A.input),t}},29510:(A,e,r)=>{var t=r(88865),n=r(10840),i=r(75533),f=r(81407),a=r(75608);A.exports=function(A,e,r){var o=A.constructor;switch(e){case"[object ArrayBuffer]":return t(A);case"[object Boolean]":case"[object Date]":return new o(+A);case"[object DataView]":return n(A,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(A,r);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(A);case"[object RegExp]":return i(A);case"[object Symbol]":return f(A)}}},39699:(A,e,r)=>{var t=r(57552),n=r(97882),i=r(24385);A.exports=function(A){return"function"!=typeof A.constructor||i(A)?{}:t(n(A))}},40206:A=>{var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;A.exports=function(A,r){var t=r.length;if(!t)return A;var n=t-1;return r[n]=(t>1?"& ":"")+r[n],r=r.join(t>2?", ":" "),A.replace(e,"{\n/* [wrapped with "+r+"] */\n")}},26563:(A,e,r)=>{var t=r(72328),n=r(73171),i=r(78587),f=t?t.isConcatSpreadable:void 0;A.exports=function(A){return i(A)||n(A)||!!(f&&A&&A[f])}},787:(A,e,r)=>{var t=r(41848),n=r(99290),i=r(54940),f=r(75091);A.exports=function(A,e,r){if(!f(r))return!1;var a=typeof e;return!!("number"==a?n(r)&&i(e,r.length):"string"==a&&e in r)&&t(r[e],A)}},66718:(A,e,r)=>{var t=r(69820),n=r(62007),i=r(35710),f=r(3849);A.exports=function(A){var e=i(A),r=f[e];if("function"!=typeof r||!(e in t.prototype))return!1;if(A===r)return!0;var a=n(r);return!!a&&A===a[0]}},58349:(A,e,r)=>{var t=r(99013),n=r(98462),i=r(4280),f="__lodash_placeholder__",a=128,o=Math.min;A.exports=function(A,e){var r=A[1],u=e[1],c=r|u,s=c<131,l=u==a&&8==r||u==a&&256==r&&A[7].length<=e[8]||384==u&&e[7].length<=e[8]&&8==r;if(!s&&!l)return A;1&u&&(A[2]=e[2],c|=1&r?0:4);var d=e[3];if(d){var b=A[3];A[3]=b?t(b,d,e[4]):d,A[4]=b?i(A[3],f):e[4]}return(d=e[5])&&(b=A[5],A[5]=b?n(b,d,e[6]):d,A[6]=b?i(A[5],f):e[6]),(d=e[7])&&(A[7]=d),u&a&&(A[8]=null==A[8]?e[8]:o(A[8],e[8])),null==A[9]&&(A[9]=e[9]),A[0]=e[0],A[1]=c,A}},82197:(A,e,r)=>{var t=r(88036),n=t&&new t;A.exports=n},31556:A=>{A.exports=function(A){var e=[];if(null!=A)for(var r in Object(A))e.push(r);return e}},93521:(A,e,r)=>{var t=r(51105),n=Math.max;A.exports=function(A,e,r){return e=n(void 0===e?A.length-1:e,0),function(){for(var i=arguments,f=-1,a=n(i.length-e,0),o=Array(a);++f{A.exports={}},32039:(A,e,r)=>{var t=r(46344),n=r(54940),i=Math.min;A.exports=function(A,e){for(var r=A.length,f=i(e.length,r),a=t(A);f--;){var o=e[f];A[f]=n(o,r)?a[o]:void 0}return A}},4280:A=>{var e="__lodash_placeholder__";A.exports=function(A,r){for(var t=-1,n=A.length,i=0,f=[];++t{var t=r(40492),n=r(92531)(t);A.exports=n},26725:(A,e,r)=>{var t=r(71334),n=r(92531)(t);A.exports=n},66522:(A,e,r)=>{var t=r(50018),n=r(40206),i=r(26725),f=r(94468);A.exports=function(A,e,r){var a=e+"";return i(A,n(a,f(t(a),r)))}},92531:A=>{var e=Date.now;A.exports=function(A){var r=0,t=0;return function(){var n=e(),i=16-(n-t);if(t=n,i>0){if(++r>=800)return arguments[0]}else r=0;return A.apply(void 0,arguments)}}},10603:A=>{A.exports=function(A,e,r){for(var t=r-1,n=A.length;++t{var t=r(40037),n=r(86794),i=r(43657);A.exports=function(A){return n(A)?i(A):t(A)}},57820:(A,e,r)=>{var t=r(56467),n=r(86794),i=r(74206);A.exports=function(A){return n(A)?i(A):t(A)}},64742:A=>{var e=/\s/;A.exports=function(A){for(var r=A.length;r--&&e.test(A.charAt(r)););return r}},43657:A=>{var e="\\ud800-\\udfff",r="["+e+"]",t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",i="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+t+"|"+n+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+o+("(?:\\u200d(?:"+[i,f,a].join("|")+")"+u+o+")*"),s="(?:"+[i+t+"?",t,f,a,r].join("|")+")",l=RegExp(n+"(?="+n+")|"+s+c,"g");A.exports=function(A){for(var e=l.lastIndex=0;l.test(A);)++e;return e}},74206:A=>{var e="\\ud800-\\udfff",r="["+e+"]",t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",i="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+t+"|"+n+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+o+("(?:\\u200d(?:"+[i,f,a].join("|")+")"+u+o+")*"),s="(?:"+[i+t+"?",t,f,a,r].join("|")+")",l=RegExp(n+"(?="+n+")|"+s+c,"g");A.exports=function(A){return A.match(l)||[]}},94468:(A,e,r)=>{var t=r(27622),n=r(10519),i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];A.exports=function(A,e){return t(i,(function(r){var t="_."+r[0];e&r[1]&&!n(A,t)&&A.push(t)})),A.sort()}},42945:(A,e,r)=>{var t=r(69820),n=r(72293),i=r(46344);A.exports=function(A){if(A instanceof t)return A.clone();var e=new n(A.__wrapped__,A.__chain__);return e.__actions__=i(A.__actions__),e.__index__=A.__index__,e.__values__=A.__values__,e}},77519:A=>{A.exports=function(A){return function(){return A}}},23903:(A,e,r)=>{var t=r(31456)(r(63679));A.exports=t},63679:(A,e,r)=>{var t=r(35620),n=r(25258),i=r(41873),f=Math.max;A.exports=function(A,e,r){var a=null==A?0:A.length;if(!a)return-1;var o=null==r?0:i(r);return o<0&&(o=f(a+o,0)),t(A,n(e,3),o)}},46881:(A,e,r)=>{var t=r(19708),n=r(66429),i=r(25258);A.exports=function(A,e){return t(A,i(e,3),n)}},27825:(A,e,r)=>{var t=r(51232);A.exports=function(A){return(null==A?0:A.length)?t(A,1):[]}},51680:(A,e,r)=>{var t=r(99290),n=r(79501);A.exports=function(A){return n(A)&&t(A)}},88716:(A,e,r)=>{var t=r(591),n=r(14055),i=r(73171),f=r(78587),a=r(99290),o=r(3970),u=r(24385),c=r(78031),s=Object.prototype.hasOwnProperty;A.exports=function(A){if(null==A)return!0;if(a(A)&&(f(A)||"string"==typeof A||"function"==typeof A.splice||o(A)||c(A)||i(A)))return!A.length;var e=n(A);if("[object Map]"==e||"[object Set]"==e)return!A.size;if(u(A))return!t(A).length;for(var r in A)if(s.call(A,r))return!1;return!0}},33261:(A,e,r)=>{var t=r(13233),n=r(86113),i=r(26426),f=i&&i.isMap,a=f?n(f):t;A.exports=a},55349:A=>{A.exports=function(A){return null==A}},85942:(A,e,r)=>{var t=r(6824),n=r(86113),i=r(26426),f=i&&i.isRegExp,a=f?n(f):t;A.exports=a},23532:(A,e,r)=>{var t=r(11950),n=r(86113),i=r(26426),f=i&&i.isSet,a=f?n(f):t;A.exports=a},64459:(A,e,r)=>{var t=r(96320),n=r(78587),i=r(79501);A.exports=function(A){return"string"==typeof A||!n(A)&&i(A)&&"[object String]"==t(A)}},74933:(A,e,r)=>{var t=r(19267),n=r(63336)((function(A,e,r){t(A,r,e)}));A.exports=n},84549:(A,e,r)=>{var t=r(44318),n=r(24345),i=r(99290);A.exports=function(A){return i(A)?t(A,!0):n(A)}},15288:(A,e,r)=>{var t=r(19267),n=r(66429),i=r(25258);A.exports=function(A,e){var r={};return e=i(e,3),n(A,(function(A,n,i){t(r,n,e(A,n,i))})),r}},82285:A=>{A.exports=function(A){if("function"!=typeof A)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!A.call(this);case 1:return!A.call(this,e[0]);case 2:return!A.call(this,e[0],e[1]);case 3:return!A.call(this,e[0],e[1],e[2])}return!A.apply(this,e)}}},84527:(A,e,r)=>{var t=r(41894),n=r(57170)((function(A,e){return null==A?{}:t(A,e)}));A.exports=n},65066:(A,e,r)=>{var t=r(8067),n=r(25258),i=r(22729),f=r(29758);A.exports=function(A,e){if(null==A)return{};var r=t(f(A),(function(A){return[A]}));return e=n(e),i(A,r,(function(A,r){return e(A,r[0])}))}},18263:(A,e,r)=>{var t=r(36430)();A.exports=t},41655:(A,e,r)=>{var t=r(99540),n=1/0;A.exports=function(A){return A?(A=t(A))===n||A===-1/0?17976931348623157e292*(A<0?-1:1):A===A?A:0:0===A?A:0}},41873:(A,e,r)=>{var t=r(41655);A.exports=function(A){var e=t(A),r=e%1;return e===e?r?e-r:e:0}},99540:(A,e,r)=>{var t=r(91504),n=r(75091),i=r(84193),f=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;A.exports=function(A){if("number"==typeof A)return A;if(i(A))return NaN;if(n(A)){var e="function"==typeof A.valueOf?A.valueOf():A;A=n(e)?e+"":e}if("string"!=typeof A)return 0===A?A:+A;A=t(A);var r=a.test(A);return r||o.test(A)?u(A.slice(2),r?2:8):f.test(A)?NaN:+A}},58674:(A,e,r)=>{var t=r(72101),n=r(97477),i=r(51680),f=n((function(A,e){return i(A)?t(A,e):[]}));A.exports=f},3849:(A,e,r)=>{var t=r(69820),n=r(72293),i=r(15969),f=r(78587),a=r(79501),o=r(42945),u=Object.prototype.hasOwnProperty;function c(A){if(a(A)&&!f(A)&&!(A instanceof t)){if(A instanceof n)return A;if(u.call(A,"__wrapped__"))return o(A)}return new n(A)}c.prototype=i.prototype,c.prototype.constructor=c,A.exports=c},26625:function(A){A.exports=function(){"use strict";function A(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function e(A,e){for(var r=0;re?1:A0))break;if(null===e.right)break;if(r(A,e.right.key)>0&&(o=e.right,e.right=o.left,o.left=e,null===(e=o).right))break;i.right=e,i=e,e=e.right}}return i.right=e.left,f.left=e.right,e.left=n.right,e.right=n.left,e}function f(A,e,r,n){var f=new t(A,e);if(null===r)return f.left=f.right=null,f;var a=n(A,(r=i(A,r,n)).key);return a<0?(f.left=r.left,f.right=r,r.left=null):a>=0&&(f.right=r.right,f.left=r,r.right=null),f}function a(A,e,r){var t=null,n=null;if(e){var f=r((e=i(A,e,r)).key,A);0===f?(t=e.left,n=e.right):f<0?(n=e.right,e.right=null,t=e):(t=e.left,e.left=null,n=e)}return{left:t,right:n}}function o(A,e,r){return null===e?A:(null===A||((e=i(A.key,e,r)).left=A),e)}function u(A,e,r,t,n){if(A){t(e+(r?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+n(A)+"\n");var i=e+(r?" ":"\u2502 ");A.left&&u(A.left,i,!1,t,n),A.right&&u(A.right,i,!0,t,n)}}var c=function(){function A(A){void 0===A&&(A=n),this._root=null,this._size=0,this._comparator=A}return A.prototype.insert=function(A,e){return this._size++,this._root=f(A,e,this._root,this._comparator)},A.prototype.add=function(A,e){var r=new t(A,e);null===this._root&&(r.left=r.right=null,this._size++,this._root=r);var n=this._comparator,f=i(A,this._root,n),a=n(A,f.key);return 0===a?this._root=f:(a<0?(r.left=f.left,r.right=f,f.left=null):a>0&&(r.right=f.right,r.left=f,f.right=null),this._size++,this._root=r),this._root},A.prototype.remove=function(A){this._root=this._remove(A,this._root,this._comparator)},A.prototype._remove=function(A,e,r){var t;return null===e?null:0===r(A,(e=i(A,e,r)).key)?(null===e.left?t=e.right:(t=i(A,e.left,r)).right=e.right,this._size--,t):e},A.prototype.pop=function(){var A=this._root;if(A){for(;A.left;)A=A.left;return this._root=i(A.key,this._root,this._comparator),this._root=this._remove(A.key,this._root,this._comparator),{key:A.key,data:A.data}}return null},A.prototype.findStatic=function(A){for(var e=this._root,r=this._comparator;e;){var t=r(A,e.key);if(0===t)return e;e=t<0?e.left:e.right}return null},A.prototype.find=function(A){return this._root&&(this._root=i(A,this._root,this._comparator),0!==this._comparator(A,this._root.key))?null:this._root},A.prototype.contains=function(A){for(var e=this._root,r=this._comparator;e;){var t=r(A,e.key);if(0===t)return!0;e=t<0?e.left:e.right}return!1},A.prototype.forEach=function(A,e){for(var r=this._root,t=[],n=!1;!n;)null!==r?(t.push(r),r=r.left):0!==t.length?(r=t.pop(),A.call(e,r),r=r.right):n=!0;return this},A.prototype.range=function(A,e,r,t){for(var n=[],i=this._comparator,f=this._root;0!==n.length||f;)if(f)n.push(f),f=f.left;else{if(i((f=n.pop()).key,e)>0)break;if(i(f.key,A)>=0&&r.call(t,f))return this;f=f.right}return this},A.prototype.keys=function(){var A=[];return this.forEach((function(e){var r=e.key;return A.push(r)})),A},A.prototype.values=function(){var A=[];return this.forEach((function(e){var r=e.data;return A.push(r)})),A},A.prototype.min=function(){return this._root?this.minNode(this._root).key:null},A.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},A.prototype.minNode=function(A){if(void 0===A&&(A=this._root),A)for(;A.left;)A=A.left;return A},A.prototype.maxNode=function(A){if(void 0===A&&(A=this._root),A)for(;A.right;)A=A.right;return A},A.prototype.at=function(A){for(var e=this._root,r=!1,t=0,n=[];!r;)if(e)n.push(e),e=e.left;else if(n.length>0){if(e=n.pop(),t===A)return e;t++,e=e.right}else r=!0;return null},A.prototype.next=function(A){var e=this._root,r=null;if(A.right){for(r=A.right;r.left;)r=r.left;return r}for(var t=this._comparator;e;){var n=t(A.key,e.key);if(0===n)break;n<0?(r=e,e=e.left):e=e.right}return r},A.prototype.prev=function(A){var e=this._root,r=null;if(null!==A.left){for(r=A.left;r.right;)r=r.right;return r}for(var t=this._comparator;e;){var n=t(A.key,e.key);if(0===n)break;n<0?e=e.left:(r=e,e=e.right)}return r},A.prototype.clear=function(){return this._root=null,this._size=0,this},A.prototype.toList=function(){return d(this._root)},A.prototype.load=function(A,e,r){void 0===e&&(e=[]),void 0===r&&(r=!1);var t=A.length,n=this._comparator;if(r&&g(A,e,0,t-1,n),null===this._root)this._root=s(A,e,0,t),this._size=t;else{var i=h(this.toList(),l(A,e),n);t=this._size+t,this._root=b({head:i},0,t)}return this},A.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(A.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(A.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),A.prototype.toString=function(A){void 0===A&&(A=function(A){return String(A.key)});var e=[];return u(this._root,"",!0,(function(A){return e.push(A)}),A),e.join("")},A.prototype.update=function(A,e,r){var t=this._comparator,n=a(A,this._root,t),i=n.left,u=n.right;t(A,e)<0?u=f(e,r,u,t):i=f(e,r,i,t),this._root=o(i,u,t)},A.prototype.split=function(A){return a(A,this._root,this._comparator)},A}();function s(A,e,r,n){var i=n-r;if(i>0){var f=r+Math.floor(i/2),a=A[f],o=e[f],u=new t(a,o);return u.left=s(A,e,r,f),u.right=s(A,e,f+1,n),u}return null}function l(A,e){for(var r=new t(null,null),n=r,i=0;i0?e=(e=f=f.next=r.pop()).right:n=!0;return f.next=null,i.next}function b(A,e,r){var t=r-e;if(t>0){var n=e+Math.floor(t/2),i=b(A,e,n),f=A.head;return f.left=i,A.head=A.head.next,f.right=b(A,n+1,r),f}return null}function h(A,e,r){for(var n=new t(null,null),i=n,f=A,a=e;null!==f&&null!==a;)r(f.key,a.key)<0?(i.next=f,f=f.next):(i.next=a,a=a.next),i=i.next;return null!==f?i.next=f:null!==a&&(i.next=a),n.next}function g(A,e,r,t,n){if(!(r>=t)){for(var i=A[r+t>>1],f=r-1,a=t+1;;){do{f++}while(n(A[f],i)<0);do{a--}while(n(A[a],i)>0);if(f>=a)break;var o=A[f];A[f]=A[a],A[a]=o,o=e[f],e[f]=e[a],e[a]=o}g(A,e,r,a,n),g(A,e,a+1,t,n)}}var v=function(A,e){return A.ll.x<=e.x&&e.x<=A.ur.x&&A.ll.y<=e.y&&e.y<=A.ur.y},p=function(A,e){if(e.ur.xe.x?1:A.ye.y?1:0}}]),r(e,[{key:"link",value:function(A){if(A.point===this.point)throw new Error("Tried to link already linked events");for(var e=A.point.events,r=0,t=e.length;r=0&&o>=0?fu?-1:0:i<0&&o<0?fu?1:0:oi?1:0}}}]),e}(),T=0,O=function(){function e(r,t,n,i){A(this,e),this.id=++T,this.leftSE=r,r.segment=this,r.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=r,this.rings=n,this.windings=i}return r(e,null,[{key:"compare",value:function(A,e){var r=A.leftSE.point.x,t=e.leftSE.point.x,n=A.rightSE.point.x,i=e.rightSE.point.x;if(if&&a>o)return-1;var c=A.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var s=e.comparePoint(A.rightSE.point);return 0!==s?s:-1}if(r>t){if(fa&&f>u)return 1;var l=e.comparePoint(A.leftSE.point);if(0!==l)return l;var d=A.comparePoint(e.rightSE.point);return d<0?1:d>0?-1:1}if(fa)return 1;if(ni){var h=A.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(n!==i){var g=o-f,v=n-r,p=u-a,w=i-t;if(g>v&&pw)return-1}return n>i?1:nu?1:A.ide.id?1:0}}]),r(e,[{key:"replaceRightSE",value:function(A){this.rightSE=A,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var A=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:Ae?A:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(A){return A.x===this.leftSE.point.x&&A.y===this.leftSE.point.y||A.x===this.rightSE.point.x&&A.y===this.rightSE.point.y}},{key:"comparePoint",value:function(A){if(this.isAnEndpoint(A))return 0;var e=this.leftSE.point,r=this.rightSE.point,t=this.vector();if(e.x===r.x)return A.x===e.x?0:A.x0&&a.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),t&&(n.checkForConsuming(),i.checkForConsuming()),r}},{key:"swapEvents",value:function(){var A=this.rightSE;this.rightSE=this.leftSE,this.leftSE=A,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,r=this.windings.length;e0){var i=r;r=t,t=i}if(r.prev===t){var f=r;r=t,t=f}for(var a=0,o=t.rings.length;a0))throw new Error("Tried to create degenerate segment at [".concat(A.x,", ").concat(A.y,"]"));n=r,i=A,f=-1}return new e(new R(n,!0),new R(i,!1),[t],[f])}}]),e}(),F=function(){function e(r,t,n){if(A(this,e),!Array.isArray(r)||0===r.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=n,this.segments=[],"number"!==typeof r[0][0]||"number"!==typeof r[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=B.round(r[0][0],r[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var f=i,a=1,o=r.length;athis.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),f=u)}i.x===f.x&&i.y===f.y||this.segments.push(O.fromRing(f,i,this))}return r(e,[{key:"getSweepEvents",value:function(){for(var A=[],e=0,r=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=f.bbox.ur.x),f.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=f.bbox.ur.y),this.interiorRings.push(f)}this.multiPoly=t}return r(e,[{key:"getSweepEvents",value:function(){for(var A=this.exteriorRing.getSweepEvents(),e=0,r=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=f.bbox.ur.x),f.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=f.bbox.ur.y),this.polys.push(f)}this.isSubject=t}return r(e,[{key:"getSweepEvents",value:function(){for(var A=[],e=0,r=this.polys.length;e0&&(A=t)}for(var n=A.segment.prevInResult(),i=n?n.prevInResult():null;;){if(!n)return null;if(!i)return n.ringOut;if(i.ringOut!==n.ringOut)return i.ringOut.enclosingRing()!==n.ringOut?n.ringOut:n.ringOut.enclosingRing();n=i.prevInResult(),i=n?n.prevInResult():null}}}]),e}(),N=function(){function e(r){A(this,e),this.exteriorRing=r,r.poly=this,this.interiorRings=[]}return r(e,[{key:"addInterior",value:function(A){this.interiorRings.push(A),A.poly=this}},{key:"getGeom",value:function(){var A=[this.exteriorRing.getGeom()];if(null===A[0])return null;for(var e=0,r=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:O.compare;A(this,e),this.queue=r,this.tree=new c(t),this.segments=[]}return r(e,[{key:"process",value:function(A){var e=A.segment,r=[];if(A.consumedBy)return A.isLeft?this.queue.remove(A.otherSE):this.tree.remove(e),r;var t=A.isLeft?this.tree.insert(e):this.tree.find(e);if(!t)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var n=t,i=t,f=void 0,a=void 0;void 0===f;)null===(n=this.tree.prev(n))?f=null:void 0===n.key.consumedBy&&(f=n.key);for(;void 0===a;)null===(i=this.tree.next(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);if(A.isLeft){var o=null;if(f){var u=f.getIntersection(e);if(null!==u&&(e.isAnEndpoint(u)||(o=u),!f.isAnEndpoint(u)))for(var c=this._splitSafely(f,u),s=0,l=c.length;s0?(this.tree.remove(e),r.push(A)):(this.segments.push(e),e.prev=f)}else{if(f&&a){var m=f.getIntersection(a);if(null!==m){if(!f.isAnEndpoint(m))for(var E=this._splitSafely(f,m),B=0,k=E.length;BZ)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new z(b),m=b.size,E=b.pop();E;){var k=E.key;if(b.size===m){var x=k.segment;throw new Error("Unable to pop() ".concat(k.isLeft?"left":"right"," SweepEvent ")+"[".concat(k.point.x,", ").concat(k.point.y,"] from segment #").concat(x.id," ")+"[".concat(x.leftSE.point.x,", ").concat(x.leftSE.point.y,"] -> ")+"[".concat(x.rightSE.point.x,", ").concat(x.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(b.size>Z)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>j)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var D=_.process(k),M=0,C=D.length;M1?e-1:0),t=1;t1?e-1:0),t=1;t1?e-1:0),t=1;t1?e-1:0),t=1;t{"use strict";r.d(e,{Rj:()=>u,e8:()=>c});var t,n,i=r(43815),f=r(57435),a=r(43398);!function(A){A.formatDate="FormattedDate",A.formatTime="FormattedTime",A.formatNumber="FormattedNumber",A.formatList="FormattedList",A.formatDisplayName="FormattedDisplayName"}(t||(t={})),function(A){A.formatDate="FormattedDateParts",A.formatTime="FormattedTimeParts",A.formatNumber="FormattedNumberParts",A.formatList="FormattedListParts"}(n||(n={}));var o=function(A){var e=(0,a.Z)(),r=A.value,t=A.children,n=(0,i._T)(A,["value","children"]);return t(e.formatNumberToParts(r,n))};o.displayName="FormattedNumberParts";function u(A){var e=function(e){var r=(0,a.Z)(),t=e.value,n=e.children,f=(0,i._T)(e,["value","children"]),o="string"===typeof t?new Date(t||0):t;return n("formatDate"===A?r.formatDateToParts(o,f):r.formatTimeToParts(o,f))};return e.displayName=n[A],e}function c(A){var e=function(e){var r=(0,a.Z)(),t=e.value,n=e.children,o=(0,i._T)(e,["value","children"]),u=r[A](t,o);if("function"===typeof n)return n(u);var c=r.textComponent||f.Fragment;return f.createElement(c,null,u)};return e.displayName=t[A],e}o.displayName="FormattedNumberParts"},43398:(A,e,r)=>{"use strict";r.d(e,{Z:()=>f});var t=r(57435),n=r(79017),i=r(10964);function f(){var A=t.useContext(n._y);return(0,i.lq)(A),A}},5386:(A,e)=>{"use strict";var r="function"===typeof Symbol&&Symbol.for,t=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,f=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,o=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,s=r?Symbol.for("react.concurrent_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,b=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,p=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,y=r?Symbol.for("react.scope"):60119;function _(A){if("object"===typeof A&&null!==A){var e=A.$$typeof;switch(e){case t:switch(A=A.type){case c:case s:case i:case a:case f:case d:return A;default:switch(A=A&&A.$$typeof){case u:case l:case g:case h:case o:return A;default:return e}}case n:return e}}}function m(A){return _(A)===s}e.AsyncMode=c,e.ConcurrentMode=s,e.ContextConsumer=u,e.ContextProvider=o,e.Element=t,e.ForwardRef=l,e.Fragment=i,e.Lazy=g,e.Memo=h,e.Portal=n,e.Profiler=a,e.StrictMode=f,e.Suspense=d,e.isAsyncMode=function(A){return m(A)||_(A)===c},e.isConcurrentMode=m,e.isContextConsumer=function(A){return _(A)===u},e.isContextProvider=function(A){return _(A)===o},e.isElement=function(A){return"object"===typeof A&&null!==A&&A.$$typeof===t},e.isForwardRef=function(A){return _(A)===l},e.isFragment=function(A){return _(A)===i},e.isLazy=function(A){return _(A)===g},e.isMemo=function(A){return _(A)===h},e.isPortal=function(A){return _(A)===n},e.isProfiler=function(A){return _(A)===a},e.isStrictMode=function(A){return _(A)===f},e.isSuspense=function(A){return _(A)===d},e.isValidElementType=function(A){return"string"===typeof A||"function"===typeof A||A===i||A===s||A===a||A===f||A===d||A===b||"object"===typeof A&&null!==A&&(A.$$typeof===g||A.$$typeof===h||A.$$typeof===o||A.$$typeof===u||A.$$typeof===l||A.$$typeof===p||A.$$typeof===w||A.$$typeof===y||A.$$typeof===v)},e.typeOf=_},10255:(A,e,r)=>{"use strict";A.exports=r(5386)},58205:A=>{let e=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,r=new RegExp("^"+e.source+"(\\s"+e.source+"){1,}");const t=A=>{function e(A){return A.join(" ")}function r(A){return A.map(e).join(", ")}function n(A){return A.map(r).map(f).join(", ")}function i(A){return A.map(n).map(f).join(", ")}function f(A){return"("+A+")"}"Feature"===A.type&&(A=A.geometry);let a=A;switch(a.type){case"Point":return a.coordinates&&3===a.coordinates.length?"POINT Z ("+e(a.coordinates)+")":"POINT ("+e(a.coordinates)+")";case"LineString":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"LINESTRING Z ("+r(a.coordinates)+")":"LINESTRING ("+r(a.coordinates)+")";case"Polygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"POLYGON Z ("+n(a.coordinates)+")":"POLYGON ("+n(a.coordinates)+")";case"MultiPoint":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"MULTIPOINT Z ("+r(a.coordinates)+")":"MULTIPOINT ("+r(a.coordinates)+")";case"MultiLineString":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"MULTILINESTRING Z ("+n(a.coordinates)+")":"MULTILINESTRING ("+n(a.coordinates)+")";case"MultiPolygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&a.coordinates[0][0]&&3===a.coordinates[0][0][0].length?"MULTIPOLYGON Z ("+i(a.coordinates)+")":"MULTIPOLYGON ("+i(a.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+a.geometries.map(t).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};A.exports={parse:A=>{let e=A.split(";"),t=e.pop(),n=(e.shift()||"").split("=").pop(),i=0;function f(A){let e=t.substring(i).match(A);return e?(i+=e[0].length,e[0]):null}function a(){f(/^\s*/)}function o(){a();let A,e=0,t=[],n=[t],i=t;for(;A=f(/^(\()/)||f(/^(\))/)||f(/^(,)/)||f(r);){if("("===A)n.push(i),i=[],n[n.length-1].push(i),e++;else if(")"===A){if(0===i.length)return null;if(i=n.pop(),!i)return null;if(e--,0===e)break}else if(","===A)i=[],n[n.length-1].push(i);else{if(A.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(i,A.split(/\s/g).map(parseFloat))}a()}return 0!==e?null:t}function u(){let A,e,t=[];for(;e=f(r)||f(/^(,)/);)","===e?(t.push(A),A=[]):e.split(/\s/g).some(isNaN)||(A||(A=[]),Array.prototype.push.apply(A,e.split(/\s/g).map(parseFloat))),a();return A?(t.push(A),t.length?t:null):null}function c(){return function(){if(!f(/^(point(\sz)?)/i))return null;if(a(),!f(/^(\()/))return null;let A=u();return A?(a(),f(/^(\))/)?{type:"Point",coordinates:A[0]}:null):null}()||function(){if(!f(/^(linestring(\sz)?)/i))return null;if(a(),!f(/^(\()/))return null;let A=u();return A&&f(/^(\))/)?{type:"LineString",coordinates:A}:null}()||function(){if(!f(/^(polygon(\sz)?)/i))return null;a();let A=o();return A?{type:"Polygon",coordinates:A}:null}()||function(){if(!f(/^(multipoint(\sz)?)/i))return null;a();let A=t.substring(t.indexOf("(")+1,t.length-1).replace(/\(/g,"").replace(/\)/g,"");t="MULTIPOINT ("+A+")";let e=o();return e?(a(),{type:"MultiPoint",coordinates:e}):null}()||function(){if(!f(/^(multilinestring(\sz)?)/i))return null;a();let A=o();return A?(a(),{type:"MultiLineString",coordinates:A}):null}()||function(){if(!f(/^(multipolygon(\sz)?)/i))return null;a();let A=o();return A?{type:"MultiPolygon",coordinates:A}:null}()||function(){let A,e=[];if(!f(/^(geometrycollection)/i))return null;if(a(),!f(/^(\()/))return null;for(;A=c();)e.push(A),a(),f(/^(,)/),a();return f(/^(\))/)?{type:"GeometryCollection",geometries:e}:null}()}return(s=c())&&n.match(/\d+/)&&(s.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+n}}),s;var s},stringify:t}},17527:(A,e,r)=>{"use strict";r(40517)},82086:(A,e,r)=>{"use strict";r.d(e,{Z:()=>i});var t=r(48024);function n(A){var e=[1/0,1/0,-1/0,-1/0];return(0,t.pZ)(A,(function(A){e[0]>A[0]&&(e[0]=A[0]),e[1]>A[1]&&(e[1]=A[1]),e[2]{"use strict";r.d(e,{Z:()=>n});var t=r(81011);function n(A,e,r){if(void 0===r&&(r={}),!A)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=(0,t.c9)(A),f=(0,t.wA)(e),a=f.type,o=e.bbox,u=f.coordinates;if(o&&!1===function(A,e){return e[0]<=A[0]&&e[1]<=A[1]&&e[2]>=A[0]&&e[3]>=A[1]}(n,o))return!1;"Polygon"===a&&(u=[u]);for(var c=!1,s=0;sA[1]!==u>A[1]&&A[0]<(o-f)*(A[1]-a)/(u-a)+f&&(t=!t)}return t}},40590:(A,e,r)=>{"use strict";r.d(e,{Z:()=>i});var t=r(82086),n=r(40517);const i=function(A,e){void 0===e&&(e={});var r=(0,t.Z)(A),i=(r[0]+r[2])/2,f=(r[1]+r[3])/2;return(0,n.xm)([i,f],e.properties,e)}},31890:(A,e,r)=>{"use strict";r(40517),r(81011),r(48024),r(52675),r(26625)},52675:(A,e,r)=>{"use strict";r(48024),r(40517)},88874:(A,e,r)=>{"use strict";r.d(e,{Z:()=>i});var t=r(25945),n=r(52593);function i(A){let e,r,i;function a(A,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.length;if(n>>1;r(A[e],t)<0?n=e+1:i=e}while(n(0,t.Z)(A(e),r),i=(e,r)=>A(e)-r):(e=A===t.Z||A===n.Z?A:f,r=A,i=A),{left:a,center:function(A,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const t=a(A,e,r,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.length)-1);return t>r&&i(A[t-1],e)>-i(A[t],e)?t-1:t},right:function(A,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.length;if(n>>1;r(A[e],t)<=0?n=e+1:i=e}while(n{"use strict";function t(A,e){return null==A||null==e?NaN:eA?1:e>=A?0:NaN}r.d(e,{Z:()=>t})},6072:(A,e,r)=>{"use strict";r.d(e,{G9:()=>o,ZP:()=>a,ly:()=>u});const t=Math.sqrt(50),n=Math.sqrt(10),i=Math.sqrt(2);function f(A,e,r){const a=(e-A)/Math.max(0,r),o=Math.floor(Math.log10(a)),u=a/Math.pow(10,o),c=u>=t?10:u>=n?5:u>=i?2:1;let s,l,d;return o<0?(d=Math.pow(10,-o)/c,s=Math.round(A*d),l=Math.round(e*d),s/de&&--l,d=-d):(d=Math.pow(10,o)*c,s=Math.round(A/d),l=Math.round(e/d),s*de&&--l),l0))return[];if((A=+A)===(e=+e))return[A];const t=e=n))return[];const o=i-n+1,u=new Array(o);if(t)if(a<0)for(let f=0;f{"use strict";r.d(e,{WU:()=>s,jH:()=>l});var t=r(94657);var n=r(8674);var i,f=r(36142);function a(A,e){var r=(0,f.V)(A,e);if(!r)return A+"";var t=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+t:t.length>n+1?t.slice(0,n+1)+"."+t.slice(n+1):t+new Array(n-t.length+2).join("0")}const o={"%":(A,e)=>(100*A).toFixed(e),b:A=>Math.round(A).toString(2),c:A=>A+"",d:f.Z,e:(A,e)=>A.toExponential(e),f:(A,e)=>A.toFixed(e),g:(A,e)=>A.toPrecision(e),o:A=>Math.round(A).toString(8),p:(A,e)=>a(100*A,e),r:a,s:function(A,e){var r=(0,f.V)(A,e);if(!r)return A+"";var t=r[0],n=r[1],a=n-(i=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,o=t.length;return a===o?t:a>o?t+new Array(a-o+1).join("0"):a>0?t.slice(0,a)+"."+t.slice(a):"0."+new Array(1-a).join("0")+(0,f.V)(A,Math.max(0,e+a-1))[0]},X:A=>Math.round(A).toString(16).toUpperCase(),x:A=>Math.round(A).toString(16)};function u(A){return A}var c,s,l,d=Array.prototype.map,b=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function h(A){var e,r,f=void 0===A.grouping||void 0===A.thousands?u:(e=d.call(A.grouping,Number),r=A.thousands+"",function(A,t){for(var n=A.length,i=[],f=0,a=e[0],o=0;n>0&&a>0&&(o+a+1>t&&(a=Math.max(1,t-o)),i.push(A.substring(n-=a,n+a)),!((o+=a+1)>t));)a=e[f=(f+1)%e.length];return i.reverse().join(r)}),a=void 0===A.currency?"":A.currency[0]+"",c=void 0===A.currency?"":A.currency[1]+"",s=void 0===A.decimal?".":A.decimal+"",l=void 0===A.numerals?u:function(A){return function(e){return e.replace(/[0-9]/g,(function(e){return A[+e]}))}}(d.call(A.numerals,String)),h=void 0===A.percent?"%":A.percent+"",g=void 0===A.minus?"\u2212":A.minus+"",v=void 0===A.nan?"NaN":A.nan+"";function p(A){var e=(A=(0,n.Z)(A)).fill,r=A.align,t=A.sign,u=A.symbol,d=A.zero,p=A.width,w=A.comma,y=A.precision,_=A.trim,m=A.type;"n"===m?(w=!0,m="g"):o[m]||(void 0===y&&(y=12),_=!0,m="g"),(d||"0"===e&&"="===r)&&(d=!0,e="0",r="=");var E="$"===u?a:"#"===u&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",B="$"===u?c:/[%p]/.test(m)?h:"",k=o[m],x=/[defgprs%]/.test(m);function D(A){var n,a,o,u=E,c=B;if("c"===m)c=k(A)+c,A="";else{var h=(A=+A)<0||1/A<0;if(A=isNaN(A)?v:k(Math.abs(A),y),_&&(A=function(A){A:for(var e,r=A.length,t=1,n=-1;t0&&(n=0)}return n>0?A.slice(0,n)+A.slice(e+1):A}(A)),h&&0===+A&&"+"!==t&&(h=!1),u=(h?"("===t?t:g:"-"===t||"("===t?"":t)+u,c=("s"===m?b[8+i/3]:"")+c+(h&&"("===t?")":""),x)for(n=-1,a=A.length;++n(o=A.charCodeAt(n))||o>57){c=(46===o?s+A.slice(n+1):A.slice(n))+c,A=A.slice(0,n);break}}w&&!d&&(A=f(A,1/0));var D=u.length+A.length+c.length,M=D>1)+u+A+c+M.slice(D);break;default:A=M+u+A+c}return l(A)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return A+""},D}return{format:p,formatPrefix:function(A,e){var r=p(((A=(0,n.Z)(A)).type="f",A)),i=3*Math.max(-8,Math.min(8,Math.floor((0,t.Z)(e)/3))),f=Math.pow(10,-i),a=b[8+i/3];return function(A){return r(f*A)+a}}}}c=h({thousands:",",grouping:[3],currency:["$",""]}),s=c.format,l=c.formatPrefix},94657:(A,e,r)=>{"use strict";r.d(e,{Z:()=>n});var t=r(36142);function n(A){return(A=(0,t.V)(Math.abs(A)))?A[1]:NaN}},36142:(A,e,r)=>{"use strict";function t(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function n(A,e){if((r=(A=e?A.toExponential(e-1):A.toExponential()).indexOf("e"))<0)return null;var r,t=A.slice(0,r);return[t.length>1?t[0]+t.slice(2):t,+A.slice(r+1)]}r.d(e,{V:()=>n,Z:()=>t})},8674:(A,e,r)=>{"use strict";r.d(e,{Z:()=>n});var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(A){if(!(e=t.exec(A)))throw new Error("invalid format: "+A);var e;return new i({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function i(A){this.fill=void 0===A.fill?" ":A.fill+"",this.align=void 0===A.align?">":A.align+"",this.sign=void 0===A.sign?"-":A.sign+"",this.symbol=void 0===A.symbol?"":A.symbol+"",this.zero=!!A.zero,this.width=void 0===A.width?void 0:+A.width,this.comma=!!A.comma,this.precision=void 0===A.precision?void 0:+A.precision,this.trim=!!A.trim,this.type=void 0===A.type?"":A.type+""}n.prototype=i.prototype,i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}},86183:(A,e,r)=>{"use strict";r.d(e,{Z:()=>a});var t=r(31600),n=r(62145),i=r(25945),f=r(23263);function a(){var A,e=[],r=[],o=[];function u(){var A=0,n=Math.max(1,r.length);for(o=new Array(n-1);++A0?o[t-1]:e[0],t{"use strict";r.d(e,{Z:()=>f});var t=r(62145),n=r(29449),i=r(23263);function f(){var A,e=0,r=1,a=1,o=[.5],u=[0,1];function c(e){return null!=e&&e<=e?u[(0,t.ZP)(o,e,0,a)]:A}function s(){var A=-1;for(o=new Array(a);++A=a?[o[a-1],r]:[o[t-1],o[t]]},c.unknown=function(e){return arguments.length?(A=e,c):c},c.thresholds=function(){return o.slice()},c.copy=function(){return f().domain([e,r]).range(u).unknown(A)},i.o.apply((0,n.Q)(c),arguments)}},56585:(A,e,r)=>{"use strict";r.d(e,{Z:()=>a});var t=r(6072),n=r(8674),i=r(94657);var f=r(56867);function a(A,e,r,a){var o,u=(0,t.ly)(A,e,r);switch((a=(0,n.Z)(null==a?",f":a)).type){case"s":var c=Math.max(Math.abs(A),Math.abs(e));return null!=a.precision||isNaN(o=function(A,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor((0,i.Z)(e)/3)))-(0,i.Z)(Math.abs(A)))}(u,c))||(a.precision=o),(0,f.jH)(a,c);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(o=function(A,e){return A=Math.abs(A),e=Math.abs(e)-A,Math.max(0,(0,i.Z)(e)-(0,i.Z)(A))+1}(u,Math.max(Math.abs(A),Math.abs(e))))||(a.precision=o-("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(o=function(A){return Math.max(0,-(0,i.Z)(Math.abs(A)))}(u))||(a.precision=o-2*("%"===a.type))}return(0,f.WU)(a)}},42552:(A,e,r)=>{"use strict";r.d(e,{kP:()=>n});let t=A=>crypto.getRandomValues(new Uint8Array(A)),n=function(A){return((A,e,r)=>{let t=(2<0&&void 0!==arguments[0]?arguments[0]:e,f="";for(;;){let e=r(n),a=n;for(;a--;)if(f+=A[e[a]&t]||"",f.length===i)return f}}})(A,arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,t)}},31343:(A,e,r)=>{"use strict";r.d(e,{Q:()=>t});let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"}}]); \ No newline at end of file diff --git a/static/js/564.d8207515.chunk.js b/dist/static/js/564.d8207515.chunk.js similarity index 100% rename from static/js/564.d8207515.chunk.js rename to dist/static/js/564.d8207515.chunk.js diff --git a/dist/static/js/596.ac6ec2ca.chunk.js b/dist/static/js/596.ac6ec2ca.chunk.js new file mode 100644 index 0000000..e89b50f --- /dev/null +++ b/dist/static/js/596.ac6ec2ca.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[596],{17646:(t,e,n)=>{var i=n(27622),r=n(12641),o=n(41017),s=n(78587);t.exports=function(t,e){return(s(t)?i:r)(t,o(e))}},74720:(t,e,n)=>{var i=n(39578);t.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}},78587:t=>{var e=Array.isArray;t.exports=e},88716:(t,e,n)=>{var i=n(591),r=n(14055),o=n(73171),s=n(78587),a=n(99290),u=n(3970),l=n(24385),c=n(78031),p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(s(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||o(t)))return!t.length;var e=r(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(l(t))return!i(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},75091:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},15196:(t,e,n)=>{var i=n(63336)((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));t.exports=i},38981:(t,e,n)=>{var i=n(18315);t.exports=function(t){return null==t?"":i(t)}},26625:function(t){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;ne?1:t0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(u=e.right,e.right=u.left,u.left=e,null===(e=u).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var s=new i(t,e);if(null===n)return s.left=s.right=null,s;var a=r(t,(n=o(t,n,r)).key);return a<0?(s.left=n.left,s.right=n,n.left=null):a>=0&&(s.right=n.right,s.left=n,n.right=null),s}function a(t,e,n){var i=null,r=null;if(e){var s=n((e=o(t,e,n)).key,t);0===s?(i=e.left,r=e.right):s<0?(r=e.right,e.right=null,i=e):(i=e.left,e.left=null,r=e)}return{left:i,right:r}}function u(t,e,n){return null===e?t:(null===t||((e=o(t.key,e,n)).left=t),e)}function l(t,e,n,i,r){if(t){i(e+(n?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+r(t)+"\n");var o=e+(n?" ":"\u2502 ");t.left&&l(t.left,o,!1,i,r),t.right&&l(t.right,o,!0,i,r)}}var c=function(){function t(t){void 0===t&&(t=r),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,s=o(t,this._root,r),a=r(t,s.key);return 0===a?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var i;return null===e?null:0===n(t,(e=o(t,e,n)).key)?(null===e.left?i=e.right:(i=o(t,e.left,n)).right=e.right,this._size--,i):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(0===i)return e;e=i<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(0===i)return!0;e=i<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,i=[],r=!1;!r;)null!==n?(i.push(n),n=n.left):0!==i.length?(n=i.pop(),t.call(e,n),n=n.right):r=!0;return this},t.prototype.range=function(t,e,n,i){for(var r=[],o=this._comparator,s=this._root;0!==r.length||s;)if(s)r.push(s),s=s.left;else{if(o((s=r.pop()).key,e)>0)break;if(o(s.key,t)>=0&&n.call(i,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,i=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;e;){var r=i(t.key,e.key);if(0===r)break;r<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;e;){var r=i(t.key,e.key);if(0===r)break;r<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return f(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var i=t.length,r=this._comparator;if(n&&d(t,e,0,i-1,r),null===this._root)this._root=p(t,e,0,i),this._size=i;else{var o=y(this.toList(),h(t,e),r);i=this._size+i,this._root=g({head:o},0,i)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return l(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var i=this._comparator,r=a(t,this._root,i),o=r.left,l=r.right;i(t,e)<0?l=s(e,n,l,i):o=s(e,n,o,i),this._root=u(o,l,i)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function p(t,e,n,r){var o=r-n;if(o>0){var s=n+Math.floor(o/2),a=t[s],u=e[s],l=new i(a,u);return l.left=p(t,e,n,s),l.right=p(t,e,s+1,r),l}return null}function h(t,e){for(var n=new i(null,null),r=n,o=0;o0?e=(e=s=s.next=n.pop()).right:r=!0;return s.next=null,o.next}function g(t,e,n){var i=n-e;if(i>0){var r=e+Math.floor(i/2),o=g(t,e,r),s=t.head;return s.left=o,t.head=t.head.next,s.right=g(t,r+1,n),s}return null}function y(t,e,n){for(var r=new i(null,null),o=r,s=t,a=e;null!==s&&null!==a;)n(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),r.next}function d(t,e,n,i,r){if(!(n>=i)){for(var o=t[n+i>>1],s=n-1,a=i+1;;){do{s++}while(r(t[s],o)<0);do{a--}while(r(t[a],o)>0);if(s>=a)break;var u=t[s];t[s]=t[a],t[a]=u,u=e[s],e[s]=e[a],e[a]=u}d(t,e,n,a,r),d(t,e,a+1,i,r)}}var _=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},m=function(t,e){if(e.ur.xe.x?1:t.ye.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,i=e.length;n=0&&u>=0?sl?-1:0:o<0&&u<0?sl?1:0:uo?1:0}}}]),e}(),M=0,F=function(){function e(n,i,r,o){t(this,e),this.id=++M,this.leftSE=n,n.segment=this,n.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=n,this.rings=r,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,i=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(os&&a>u)return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var p=e.comparePoint(t.rightSE.point);return 0!==p?p:-1}if(n>i){if(sa&&s>l)return 1;var h=e.comparePoint(t.leftSE.point);if(0!==h)return h;var f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(sa)return 1;if(ro){var y=t.comparePoint(e.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(r!==o){var d=u-s,_=r-n,m=l-a,v=o-i;if(d>_&&mv)return-1}return r>o?1:rl?1:t.ide.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:te?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&a.swapEvents(),D.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),i&&(r.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e0){var o=n;n=i,i=o}if(n.prev===i){var s=n;n=i,i=s}for(var a=0,u=i.rings.length;a0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));r=n,o=t,s=-1}return new e(new D(r,!0),new D(o,!1),[i],[s])}}]),e}(),G=function(){function e(n,i,r){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=r,this.segments=[],"number"!==typeof n[0][0]||"number"!==typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=C.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,u=n.length;athis.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}o.x===s.x&&o.y===s.y||this.segments.push(F.fromRing(s,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e0&&(t=i)}for(var r=t.segment.prevInResult(),o=r?r.prevInResult():null;;){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}}]),e}(),U=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:F.compare;t(this,e),this.queue=n,this.tree=new c(i),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var i=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!i)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var r=i,o=i,s=void 0,a=void 0;void 0===s;)null===(r=this.tree.prev(r))?s=null:void 0===r.key.consumedBy&&(s=r.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var u=null;if(s){var l=s.getIntersection(e);if(null!==l&&(e.isAnEndpoint(l)||(u=l),!s.isAnEndpoint(l)))for(var c=this._splitSafely(s,l),p=0,h=c.length;p0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var I=s.getIntersection(a);if(null!==I){if(!s.isAnEndpoint(I))for(var N=this._splitSafely(s,I),C=0,S=N.length;CY)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var x=new V(g),I=g.size,N=g.pop();N;){var S=N.key;if(g.size===I){var b=S.segment;throw new Error("Unable to pop() ".concat(S.isLeft?"left":"right"," SweepEvent ")+"[".concat(S.point.x,", ").concat(S.point.y,"] from segment #").concat(b.id," ")+"[".concat(b.leftSE.point.x,", ").concat(b.leftSE.point.y,"] -> ")+"[".concat(b.rightSE.point.x,", ").concat(b.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(g.size>Y)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(x.segments.length>X)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var w=x.process(S),L=0,P=w.length;L1?e-1:0),i=1;i1?e-1:0),i=1;i1?e-1:0),i=1;i1?e-1:0),i=1;ie.x?1:this.ye.y?1:0},C.prototype.clone=function(){},C.prototype.copy=function(){return new C(this)},C.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},C.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},C.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},C.prototype.hashCode=function(){var t=17;return 37*(t=37*t+C.hashCode(this.x))+C.hashCode(this.y)},C.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},C.prototype.interfaces_=function(){return[x,I,e]},C.prototype.getClass=function(){return C},C.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=v.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},S.DimensionalComparator.get=function(){return b},S.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},S.NULL_ORDINATE.get=function(){return v.NaN},S.X.get=function(){return 0},S.Y.get=function(){return 1},S.Z.get=function(){return 2},Object.defineProperties(C,S);var b=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new m("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};b.prototype.compare=function(t,e){var n=t,i=e,r=b.compare(n.x,i.x);if(0!==r)return r;var o=b.compare(n.y,i.y);return 0!==o?o:this._dimensionsToTest<=2?0:b.compare(n.z,i.z)},b.prototype.interfaces_=function(){return[N]},b.prototype.getClass=function(){return b},b.compare=function(t,e){return te?1:v.isNaN(t)?v.isNaN(e)?0:-1:v.isNaN(e)?1:0};var w=function(){};w.prototype.create=function(){},w.prototype.interfaces_=function(){return[]},w.prototype.getClass=function(){return w};var L=function(){},P={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};L.prototype.interfaces_=function(){return[]},L.prototype.getClass=function(){return L},L.toLocationSymbol=function(t){switch(t){case L.EXTERIOR:return"e";case L.BOUNDARY:return"b";case L.INTERIOR:return"i";case L.NONE:return"-"}throw new m("Unknown location value: "+t)},P.INTERIOR.get=function(){return 0},P.BOUNDARY.get=function(){return 1},P.EXTERIOR.get=function(){return 2},P.NONE.get=function(){return-1},Object.defineProperties(L,P);var R=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},O=function(){},T={LOG_10:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.log10=function(t){var e=Math.log(t);return v.isInfinite(e)||v.isNaN(e)?e:e/O.LOG_10},O.min=function(t,e,n,i){var r=t;return en?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],o=arguments[2];return io?o:i}},O.wrap=function(t,e){return t<0?e- -t%e:t%e},O.max=function(){if(3===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[0];return t>n&&(n=t),e>n&&(n=e),n}if(4===arguments.length){var i=arguments[1],r=arguments[2],o=arguments[3],s=arguments[0];return i>s&&(s=i),r>s&&(s=r),o>s&&(s=o),s}},O.average=function(t,e){return(t+e)/2},T.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(O,T);var A=function(t){this.str=t};A.prototype.append=function(t){this.str+=t},A.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},A.prototype.toString=function(t){return this.str};var D=function(t){this.value=t};D.prototype.intValue=function(){return this.value},D.prototype.compareTo=function(t){return this.valuet?1:0},D.isNaN=function(t){return Number.isNaN(t)};var M=function(){};M.isWhitespace=function(t){return t<=32&&t>=0||127===t},M.toUpperCase=function(t){return t.toUpperCase()};var F=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length)if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else"string"==typeof arguments[0]&&t.call(this,t.parse(arguments[0]));else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i,r)}},G={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};F.prototype.le=function(t){return(this._hi9?(c=!0,p="9"):p="0"+l,s.append(p),n=n.subtract(F.valueOf(l)).multiply(F.TEN),c&&n.selfAdd(F.TEN);var h=!0,f=F.magnitude(n._hi);if(f<0&&Math.abs(f)>=a-u&&(h=!1),!h)break}return e[0]=i,s.toString()},F.prototype.sqr=function(){return this.multiply(this)},F.prototype.doubleValue=function(){return this._hi+this._lo},F.prototype.subtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},F.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},F.prototype.isZero=function(){return 0===this._hi&&0===this._lo},F.prototype.selfSubtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},F.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},F.prototype.min=function(t){return this.le(t)?this:t},F.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null,c=null,p=null;return u=this._hi/n,p=(r=(l=F.SPLIT*u)-(r=l-u))*(s=(p=F.SPLIT*n)-(s=p-n))-(c=u*n)+r*(a=n-s)+(o=u-r)*s+o*a,p=u+(l=(this._hi-c-p+this._lo-u*i)/n),this._hi=p,this._lo=u-p+l,this}},F.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},F.prototype.divide=function(){if(arguments[0]instanceof F){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,s=null,a=null,u=null;return n=(o=this._hi/t._hi)-(e=(s=F.SPLIT*o)-(e=s-o)),u=e*(i=(u=F.SPLIT*t._hi)-(i=u-t._hi))-(a=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,s=(this._hi-a-u+this._lo-o*t._lo)/t._hi,new F(u=o+s,o-u+s)}if("number"==typeof arguments[0]){var l=arguments[0];return v.isNaN(l)?F.createNaN():F.copy(this).selfDivide(l,0)}},F.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},F.prototype.pow=function(t){if(0===t)return F.valueOf(1);var e=new F(this),n=F.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},F.prototype.ceil=function(){if(this.isNaN())return F.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new F(t,e)},F.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0},F.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},F.prototype.setValue=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},F.prototype.max=function(t){return this.ge(t)?this:t},F.prototype.sqrt=function(){if(this.isZero())return F.valueOf(0);if(this.isNegative())return F.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=F.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},F.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,s=null,a=null;return o=(r=this._hi+e)-(s=r-this._hi),i=(a=(o=e-s+(this._hi-o))+this._lo)+(r-(n=r+a)),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,p=null,h=null,f=null,g=null,y=null,d=null;f=this._hi+u,p=this._lo+l,g=f-(y=f-this._hi),h=p-(d=p-this._lo);var _=(c=f+(y=(g=u-y+(this._hi-g))+p))+(y=(h=l-d+(this._lo-h))+(y+(f-c))),m=y+(c-_);return this._hi=_,this._lo=m,this}},F.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null;r=(u=F.SPLIT*this._hi)-this._hi,l=F.SPLIT*n,r=u-r,o=this._hi-r,s=l-n;var c=(u=this._hi*n)+(l=r*(s=l-s)-u+r*(a=n-s)+o*s+o*a+(this._hi*i+this._lo*n)),p=l+(r=u-c);return this._hi=c,this._lo=p,this}},F.prototype.selfSqr=function(){return this.selfMultiply(this)},F.prototype.floor=function(){if(this.isNaN())return F.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new F(t,e)},F.prototype.negate=function(){return this.isNaN()?this:new F(-this._hi,-this._lo)},F.prototype.clone=function(){},F.prototype.multiply=function(){if(arguments[0]instanceof F){var t=arguments[0];return t.isNaN()?F.createNaN():F.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)?F.createNaN():F.copy(this).selfMultiply(e,0)}},F.prototype.isNaN=function(){return v.isNaN(this._hi)},F.prototype.intValue=function(){return Math.trunc(this._hi)},F.prototype.toString=function(){var t=F.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},F.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+F.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){var o=i-n.length;r=n+F.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+r:r},F.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,s=null,a=null;e=(r=1/this._hi)-(t=(o=F.SPLIT*r)-(t=o-r)),n=(a=F.SPLIT*this._hi)-this._hi;var u=r+(o=(1-(s=r*this._hi)-(a=t*(n=a-n)-s+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new F(u,r-u+o)},F.prototype.toSciNotation=function(){if(this.isZero())return F.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=F.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var r="";n.length>1&&(r=n.substring(1));var o=n.charAt(0)+"."+r;return this.isNegative()?"-"+o+i:o+i},F.prototype.abs=function(){return this.isNaN()?F.NaN:this.isNegative()?this.negate():new F(this)},F.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},F.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo},F.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},F.prototype.trunc=function(){return this.isNaN()?F.NaN:this.isPositive()?this.floor():this.ceil()},F.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},F.prototype.interfaces_=function(){return[e,x,I]},F.prototype.getClass=function(){return F},F.sqr=function(t){return F.valueOf(t).selfMultiply(t)},F.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return F.parse(t)}if("number"==typeof arguments[0])return new F(arguments[0])},F.sqrt=function(t){return F.valueOf(t).sqrt()},F.parse=function(t){for(var e=0,n=t.length;M.isWhitespace(t.charAt(e));)e++;var i=!1;if(e=n);){var l=t.charAt(e);if(e++,M.isDigit(l)){var c=l-"0";o.selfMultiply(F.TEN),o.selfAdd(c),s++}else{if("."!==l){if("e"===l||"E"===l){var p=t.substring(e);try{u=D.parseInt(p)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+p+" in string "+t):e}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}a=s}}var h=o,f=s-a-u;if(0===f)h=o;else if(f>0){var g=F.TEN.pow(f);h=o.divide(g)}else if(f<0){var y=F.TEN.pow(-f);h=o.multiply(y)}return i?h.negate():h},F.createNaN=function(){return new F(v.NaN,v.NaN)},F.copy=function(t){return new F(t)},F.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},F.stringOfChar=function(t,e){for(var n=new A,i=0;i0){if(o<=0)return B.signum(s);i=r+o}else{if(!(r<0))return B.signum(s);if(o>=0)return B.signum(s);i=-r-o}var a=B.DP_SAFE_EPSILON*i;return s>=a||-s>=a?B.signum(s):2},B.signum=function(t){return t>0?1:t<0?-1:0},q.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(B,q);var k=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},k.prototype.setOrdinate=function(t,e,n){},k.prototype.size=function(){},k.prototype.getOrdinate=function(t,e){},k.prototype.getCoordinate=function(){},k.prototype.getCoordinateCopy=function(t){},k.prototype.getDimension=function(){},k.prototype.getX=function(t){},k.prototype.clone=function(){},k.prototype.expandEnvelope=function(t){},k.prototype.copy=function(){},k.prototype.getY=function(t){},k.prototype.toCoordinateArray=function(){},k.prototype.interfaces_=function(){return[I]},k.prototype.getClass=function(){return k},Object.defineProperties(k,U);var z=function(){},V=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(z),Y=function(){};Y.arraycopy=function(t,e,n,i,r){for(var o=0,s=e;st._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},j.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||ithis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(nthis._maxx&&(this._maxx=n),ithis._maxy&&(this._maxy=i))}},j.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},j.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},j.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},j.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},j.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},j.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},j.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},j.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof C){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},j.prototype.centre=function(){return this.isNull()?null:new C((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},j.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];rt._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},j.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+C.hashCode(this._minx))+C.hashCode(this._maxx))+C.hashCode(this._miny))+C.hashCode(this._maxy)},j.prototype.interfaces_=function(){return[x,e]},j.prototype.getClass=function(){return j},j.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),l=Math.min(i.x,r.x),c=Math.max(i.x,r.x);return!(l>u)&&!(cu)&&!(cthis.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;er?i:r;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=i>r?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,o=Math.sqrt(i*i+r*r);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},it.DONT_INTERSECT.get=function(){return 0},it.DO_INTERSECT.get=function(){return 1},it.COLLINEAR.get=function(){return 2},it.NO_INTERSECTION.get=function(){return 0},it.POINT_INTERSECTION.get=function(){return 1},it.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,it);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new j(this._inputLines[0][0],this._inputLines[0][1]),n=new j(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2];if(this._isProper=!1,j.intersects(n,i,e)&&0===at.orientationIndex(n,i,e)&&0===at.orientationIndex(i,n,e))return this._isProper=!0,(e.equals(n)||e.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,n,i,r){var o=null;try{o=X.intersection(t,n,i,r)}catch(s){if(!(s instanceof V))throw s;o=e.nearestEndpoint(t,n,i,r)}return o},e.prototype.intersection=function(t,n,i,r){var o=this.intersectionWithNormalization(t,n,i,r);return this.isInSegmentEnvelopes(o)||(o=new C(e.nearestEndpoint(t,n,i,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,i){var r=t,o=Math.abs(r);return Math.abs(e)1e-4&&Y.out.println("Distance = "+r.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,i){var r=new C(t),o=new C(e),s=new C(n),a=new C(i),u=new C;this.normalizeToEnvCentre(r,o,s,a,u);var l=this.safeHCoordinateIntersection(r,o,s,a);return l.x+=u.x,l.y+=u.y,l},e.prototype.computeCollinearIntersection=function(e,n,i,r){var o=j.intersects(e,n,i),s=j.intersects(e,n,r),a=j.intersects(i,r,e),u=j.intersects(i,r,n);return o&&s?(this._intPt[0]=i,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||s||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,i,r){var o=t.xe.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.xi.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=((o>l?o:l)+(ac?s:c)+(u0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),u=at.orientationIndex(i,r,n);return a>0&&u>0||a<0&&u<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===u?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new C(i):0===s?this._intPt[0]=new C(r):0===a?this._intPt[0]=new C(e):0===u&&(this._intPt[0]=new C(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if((i-=(s=Math.floor(n/t))*e)<0)return-r;if(i>e)return r;if(t>(n-=s*t)+n){if(ei+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if((e-=(s=Math.floor(t/n))*i)<0)return r;if(e>i)return-r;if(n>(t-=s*n)+t){if(ie+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.xi&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,u=ot.signOfDet2x2(r,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==L.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?L.BOUNDARY:this._crossingCount%2==1?L.INTERIOR:L.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof C&&R(arguments[1],k)){for(var t=arguments[1],e=new st(arguments[0]),n=new C,i=new C,r=1;r1||a<0||a>1)&&(r=!0)}}else r=!0;return r?O.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==L.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new C;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;sn.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var u=t[s],l=t[a];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=at.computeOrientation(u,n,l);return 0===c?u.x>l.x:c>0},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new m("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i=1)return o.distance(a);var c=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(c)*Math.sqrt(u)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i0},_t.prototype.interfaces_=function(){return[gt]},_t.prototype.getClass=function(){return _t};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>1},mt.prototype.interfaces_=function(){return[gt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[gt]},vt.prototype.getClass=function(){return vt};var Et=function(){};Et.prototype.add=function(){},Et.prototype.addAll=function(){},Et.prototype.isEmpty=function(){},Et.prototype.iterator=function(){},Et.prototype.size=function(){},Et.prototype.toArray=function(){},Et.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var xt=function(){};xt.prototype.hasNext=function(){},xt.prototype.next=function(){},xt.prototype.remove=function(){};var It=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(Et);(i.prototype=new Error).name="NoSuchElementException";var Nt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Et&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,Et]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=1&&this.get(this.size()-1).equals2D(r))return null;t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l=0;c--)this.add(a[c],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(p>0&&this.get(p-1).equals2D(h))return null;if(p_&&(m=-1);for(var v=d;v!==_;v+=m)this.add(g[v],y);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(Nt),bt=function(){},wt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};wt.ForwardComparator.get=function(){return Lt},wt.BidirectionalComparator.get=function(){return Pt},wt.coordArrayType.get=function(){return new Array(0).fill(null)},bt.prototype.interfaces_=function(){return[]},bt.prototype.getClass=function(){return bt},bt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},bt.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},bt.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},bt.extract=function(t,e,n){e=O.clamp(e,0,t.length);var i=(n=O.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),ni.length)return 1;if(0===n.length)return 0;var r=bt.compare(n,i);return bt.isEqualReversed(n,i)?0:r},Pt.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.lengthi.length)return 1;if(0===n.length)return 0;for(var r=bt.increasingDirection(n),o=bt.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u0))return e.value;e=e.right}}return null},p.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},p.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===l(a(a(t)))){var e=c(a(a(t)));1===s(e)?(u(a(t),Dt),u(e,Dt),u(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),u(a(t),Dt),u(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=l(a(a(t)));1===s(n)?(u(a(t),Dt),u(n,Dt),u(a(a(t)),1),t=a(a(t))):(t===l(a(t))&&(t=a(t),this.rotateRight(t)),u(a(t),Dt),u(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Dt},p.prototype.values=function(){var t=new Nt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=p.successor(e));)t.add(e.value);return t},p.prototype.entrySet=function(){var t=new Tt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=p.successor(e));)t.add(e);return t},p.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},p.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},p.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},p.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},p.prototype.size=function(){return this.size_};var Mt=function(){};Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt},h.prototype=new o,(f.prototype=new h).contains=function(t){for(var e=0,n=this.array_.length;e=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),u=0;u0)for(var o=r;o0&&i.append(" ");for(var o=0;o0&&i.append(","),i.append(jt.toString(t.getOrdinate(r,o)))}return i.append(")"),i.toString()}},Wt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Wt.createClosedRing(t,e,4):e.getOrdinate(0,k.X)===e.getOrdinate(n-1,k.X)&&e.getOrdinate(0,k.Y)===e.getOrdinate(n-1,k.Y)?e:Wt.createClosedRing(t,e,n+1)},Wt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Wt.copy(e,0,i,0,r);for(var o=r;o0&&Wt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Bt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Wt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Zt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Zt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var ue=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e0){var t=new A(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e3&&(e=3),e<2?new ue(t):new ue(t,e)}},ce.prototype.interfaces_=function(){return[w,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},pe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},pe.instanceObject.get=function(){return new ce},Object.defineProperties(ce,pe);var he=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new Nt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Tt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(Rt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof ye){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},ge={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new D(n).compareTo(new D(i))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===fe.FLOATING?t="Floating":this._modelType===fe.FLOATING_SINGLE?t="Floating-Single":this._modelType===fe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},fe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return v.isNaN(t)||this._modelType===fe.FLOATING_SINGLE?t:this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,x]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},ge.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},ge.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,ge);var ye=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},de={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ye.prototype.readResolve=function(){return ye.nameToTypeMap.get(this._name)},ye.prototype.toString=function(){return this._name},ye.prototype.interfaces_=function(){return[e]},ye.prototype.getClass=function(){return ye},de.serialVersionUID.get=function(){return-552860263173159e4},de.nameToTypeMap.get=function(){return new he},Object.defineProperties(ye,de),fe.Type=ye,fe.FIXED=new ye("FIXED"),fe.FLOATING=new ye("FLOATING"),fe.FLOATING_SINGLE=new ye("FLOATING SINGLE");var _e=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?R(arguments[0],w)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},me={serialVersionUID:{configurable:!0}};_e.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},_e.prototype.createLineString=function(t){return t?t instanceof Array?new Zt(this.getCoordinateSequenceFactory().create(t),this):R(t,k)?new Zt(t,this):void 0:new Zt(this.getCoordinateSequenceFactory().create([]),this)},_e.prototype.createMultiLineString=function(){return 0===arguments.length?new Vt(null,this):1===arguments.length?new Vt(arguments[0],this):void 0},_e.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(_e.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(_e.toPolygonArray(t));if(a instanceof Zt)return this.createMultiLineString(_e.toLineStringArray(t));if(a instanceof Jt)return this.createMultiPoint(_e.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},_e.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},_e.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(R(arguments[0],k))return new Jt(arguments[0],this)}},_e.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_e.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(R(arguments[0],k)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length)return new $t(arguments[0],arguments[1],this)},_e.prototype.getSRID=function(){return this._SRID},_e.prototype.createGeometryCollection=function(){return 0===arguments.length?new zt(null,this):1===arguments.length?new zt(arguments[0],this):void 0},_e.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},_e.prototype.getPrecisionModel=function(){return this._precisionModel},_e.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],k))return new ee(arguments[0],this)}},_e.prototype.createMultiPolygon=function(){return 0===arguments.length?new ne(null,this):1===arguments.length?new ne(arguments[0],this):void 0},_e.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new te(arguments[0],this);if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],k)){var e=arguments[0];if(null===e)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(e.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[t]},d.prototype.push=function(t){return this.array_.push(t),t},d.prototype.pop=function(t){if(0===this.array_.length)throw new y;return this.array_.pop()},d.prototype.peek=function(){if(0===this.array_.length)throw new y;return this.array_[this.array_.length-1]},d.prototype.empty=function(){return 0===this.array_.length},d.prototype.isEmpty=function(){return this.empty()},d.prototype.search=function(t){return this.array_.indexOf(t)},d.prototype.size=function(){return this.array_.length},d.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)},we.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Se.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},we.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},we.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Se.LEFT&&(this._orientedDe=this._minDe.getSym())},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var Le=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new C(i):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),Pe=function(){this.array_=[]};Pe.prototype.addLast=function(t){this.array_.push(t)},Pe.prototype.removeFirst=function(){return this.array_.shift()},Pe.prototype.isEmpty=function(){return 0===this.array_.length};var Re=function(){this._finder=null,this._dirEdgeList=new Nt,this._nodes=new Nt,this._rightMostCoord=null,this._env=null,this._finder=new we};Re.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Re.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Re.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Le("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Re.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Se.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Re.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Re.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Se.RIGHT)>=1&&e.getDepth(Se.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Re.prototype.computeDepths=function(t){var e=new Tt,n=new Pe,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Re.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Re.prototype.getEnvelope=function(){if(null===this._env){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;ithis.location.length){var e=new Array(3).fill(null);e[Se.ON]=this.location[Se.ON],e[Se.LEFT]=L.NONE,e[Se.RIGHT]=L.NONE,this.location=e}for(var n=0;n1&&t.append(L.toLocationSymbol(this.location[Se.LEFT])),t.append(L.toLocationSymbol(this.location[Se.ON])),this.location.length>1&&t.append(L.toLocationSymbol(this.location[Se.RIGHT])),t.toString()},Oe.prototype.setLocations=function(t,e,n){this.location[Se.ON]=t,this.location[Se.LEFT]=e,this.location[Se.RIGHT]=n},Oe.prototype.get=function(t){return t1},Oe.prototype.isAnyNull=function(){for(var t=0;tthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Ae.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o=0;a--)this._pts.add(i[a])}},Ae.prototype.isHole=function(){return this._isHole},Ae.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Ae.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Ae.prototype.addHole=function(t){this._holes.add(t)},Ae.prototype.isShell=function(){return null===this._shell},Ae.prototype.getLabel=function(){return this._label},Ae.prototype.getEdges=function(){return this._edges},Ae.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Ae.prototype.getShell=function(){return this._shell},Ae.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[1],n=arguments[0].getLocation(e,Se.RIGHT);if(n===L.NONE)return null;if(this._label.getLocation(e)===L.NONE)return this._label.setLocation(e,n),null}},Ae.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Ae.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(t)},Fe.prototype.isInResult=function(){return this._isInResult},Fe.prototype.isVisited=function(){return this._isVisited},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Ge=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Te(0,L.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=L.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==L.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Te(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Te)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===L.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=L.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case L.BOUNDARY:n=L.INTERIOR;break;case L.INTERIOR:default:n=L.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),Be=function(){this.nodeMap=new p,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Be.prototype.find=function(t){return this.nodeMap.get(t)},Be.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ge){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Be.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Be.prototype.iterator=function(){return this.nodeMap.values().iterator()},Be.prototype.values=function(){return this.nodeMap.values()},Be.prototype.getBoundaryNodes=function(t){for(var e=new Nt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===L.BOUNDARY&&e.add(i)}return e},Be.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var qe=function(){},ke={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.isNorthern=function(t){return t===qe.NE||t===qe.NW},qe.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},qe.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=te?t:e)?3:n},qe.isInHalfPlane=function(t,e){return e===qe.SE?t===qe.SE||t===qe.SW:t===e||t===e+1},qe.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?qe.NE:qe.SE:e>=0?qe.NW:qe.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new m("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?qe.NE:qe.SE:i.y>=n.y?qe.NW:qe.SW}},ke.NE.get=function(){return 0},ke.NW.get=function(){return 1},ke.SW.get=function(){return 2},ke.SE.get=function(){return 3},Object.defineProperties(qe,ke);var Ue=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};Ue.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},Xe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Xe.prototype.buildMaximalEdgeRings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new Me(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},Xe.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},Xe.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Xe.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(i)&&at.isPointInRing(r,l.getCoordinates())&&(p=!0),p&&(null===o||s.contains(c))&&(o=u)}return o},Xe.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Xe.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ye.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new Nt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var je=function(){};je.prototype.getBounds=function(){},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var He=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};He.prototype.getItem=function(){return this._item},He.prototype.getBounds=function(){return this._bounds},He.prototype.interfaces_=function(){return[je,e]},He.prototype.getClass=function(){return He};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new Nt,this._items.add(null)};We.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},We.prototype.size=function(){return this._size},We.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Ze=function(){};Ze.prototype.visitItem=function(t){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var Ke=function(){};Ke.prototype.insert=function(t,e){},Ke.prototype.remove=function(t,e){},Ke.prototype.query=function(){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Je=function(){if(this._childBoundables=new Nt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Qe={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[je,e]},Je.prototype.getClass=function(){return Je},Qe.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,Qe);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Gt.sort(n,e):Gt.sort(n);for(var i=t.iterator(),r=0,o=n.length;rtn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new m("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof He&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof He&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Nt:t}if(1===arguments.length){for(var e=arguments[0],n=new Nt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Je){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof He?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new He(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Je?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof He),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new Nt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(R(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var r=arguments[0],o=arguments[2],s=arguments[1].getChildBoundables(),a=0;at&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new Nt;n.add(this.createNode(e));var i=new Nt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t0);for(var n=new Nt,i=0;i0;){var p=c.poll(),h=p.getDistance();if(h>=u)break;p.isLeaves()?(u=h,l=p):p.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[2],g=new He(arguments[0],arguments[1]),y=new tn(this.getRoot(),g,f);return this.nearestNeighbour(y)[0]}},n.prototype.interfaces_=function(){return[Ke,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new j(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(t,e){return te?1:0},un.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=un.relativeSign(e.x,n.x),r=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(i,r);case 1:return un.compareValue(r,i);case 2:return un.compareValue(r,-i);case 3:return un.compareValue(-i,r);case 4:return un.compareValue(-i,-r);case 5:return un.compareValue(-r,-i);case 6:return un.compareValue(-r,i);case 7:return un.compareValue(i,-r)}return et.shouldNeverReachHere("invalid octant value"),0},un.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ln=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ln.prototype.getCoordinate=function(){return this.coord},ln.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ln.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:un.compare(this._segmentOctant,this.coord,e.coord)},ln.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ln.prototype.isInterior=function(){return this._isInterior},ln.prototype.interfaces_=function(){return[x]},ln.prototype.getClass=function(){return ln};var cn=function(){this._nodeMap=new p,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new St;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new Nt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new m("Cannot compute the octant for two identical points "+r);return pn.octant(s,a)}};var hn=function(){};hn.prototype.getCoordinates=function(){},hn.prototype.size=function(){},hn.prototype.getCoordinate=function(t){},hn.prototype.isClosed=function(){},hn.prototype.setData=function(t){},hn.prototype.getData=function(){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[hn]},fn.prototype.getClass=function(){return fn};var gn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};gn.prototype.getCoordinates=function(){return this._pts},gn.prototype.size=function(){return this._pts.length},gn.prototype.getCoordinate=function(t){return this._pts[t]},gn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},gn.prototype.setData=function(t){this._data=t},gn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},gn.prototype.getData=function(){return this._data},gn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[1],i=arguments[3],r=new C(arguments[0].getIntersection(i));this.addIntersection(r,n)}},gn.prototype.toString=function(){return Q.toLineString(new ue(this._pts))},gn.prototype.getNodeList=function(){return this._nodeList},gn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof C){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},yn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},yn.prototype.isVertical=function(){return this.p0.x===this.p1.x},yn.prototype.equals=function(t){if(!(t instanceof yn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},yn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},yn.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),n=new C;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof yn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new yn(s,a)}},yn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},yn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},yn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},yn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},yn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},yn.prototype.midPoint=function(){return yn.midPoint(this.p0,this.p1)},yn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?v.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},yn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=v.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||v.isNaN(e))&&(e=1),e},yn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},yn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},yn.prototype.distance=function(){if(arguments[0]instanceof yn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},yn.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},yn.prototype.hashCode=function(){var t=v.doubleToLongBits(this.p0.x);t^=31*v.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=v.doubleToLongBits(this.p1.x);return n^=31*v.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},yn.prototype.interfaces_=function(){return[x,e]},yn.prototype.getClass=function(){return yn},yn.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},dn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(yn,dn);var _n=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new yn,this._overlapSeg2=new yn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[3];arguments[0].getLineSegment(t,this._overlapSeg1),e.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var mn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};mn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},mn.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var i=qe.quadrant(t[n],t[n+1]),r=e+1;rn.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Nn},Object.defineProperties(e,n),e}(xn),Nn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[1],n=arguments[2],i=arguments[3],r=arguments[0].getContext(),o=n.getContext();this._si.processIntersections(r,e,o,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),Cn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Sn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Cn.prototype.getEndCapStyle=function(){return this._endCapStyle},Cn.prototype.isSingleSided=function(){return this._isSingleSided},Cn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Cn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Cn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Cn.JOIN_ROUND&&(this._quadrantSegments=Cn.DEFAULT_QUADRANT_SEGMENTS)},Cn.prototype.getJoinStyle=function(){return this._joinStyle},Cn.prototype.setJoinStyle=function(t){this._joinStyle=t},Cn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Cn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Cn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Cn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Cn.prototype.getMitreLimit=function(){return this._mitreLimit},Cn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Cn.prototype.setSingleSided=function(t){this._isSingleSided=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Sn.CAP_ROUND.get=function(){return 1},Sn.CAP_FLAT.get=function(){return 2},Sn.CAP_SQUARE.get=function(){return 3},Sn.JOIN_ROUND.get=function(){return 1},Sn.JOIN_MITRE.get=function(){return 2},Sn.JOIN_BEVEL.get=function(){return 3},Sn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Sn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Sn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Cn,Sn);var bn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},wn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};bn.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i)},bn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n=0;i--)this.addPt(t[i])},Ln.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)Math.PI;)t-=Rn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Rn.PI_TIMES_2;return t},Rn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},Rn.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},Rn.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},Rn.interiorAngle=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n);return Math.abs(r-i)},Rn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Rn.PI_TIMES_2;t>=Rn.PI_TIMES_2&&(t=0)}else{for(;t>=Rn.PI_TIMES_2;)t-=Rn.PI_TIMES_2;t<0&&(t=0)}return t},Rn.angleBetween=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n);return Rn.diff(i,r)},Rn.diff=function(t,e){var n=null;return(n=tMath.PI&&(n=2*Math.PI-n),n},Rn.toRadians=function(t){return t*Math.PI/180},Rn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Rn.COUNTERCLOCKWISE:n<0?Rn.CLOCKWISE:Rn.NONE},Rn.angleBetweenOriented=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n)-i;return r<=-Math.PI?r+Rn.PI_TIMES_2:r>Math.PI?r-Rn.PI_TIMES_2:r},On.PI_TIMES_2.get=function(){return 2*Math.PI},On.PI_OVER_2.get=function(){return Math.PI/2},On.PI_OVER_4.get=function(){return Math.PI/4},On.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},On.CLOCKWISE.get=function(){return at.CLOCKWISE},On.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Rn,On);var Tn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new yn,this._seg1=new yn,this._offset0=new yn,this._offset1=new yn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Cn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},An={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Tn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===Se.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Se.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Tn.prototype.addLineEndCap=function(t,e){var n=new yn(t,e),i=new yn;this.computeOffsetSegment(n,Se.LEFT,this._distance,i);var r=new yn;this.computeOffsetSegment(n,Se.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case Cn.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case Cn.CAP_SQUARE:var u=new C;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new C(i.p1.x+u.x,i.p1.y+u.y),c=new C(r.p1.x+u.x,r.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Tn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Tn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=X.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof V))throw t;o=new C(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Tn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);i===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,i,r),this._segList.addPt(n)},Tn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new C((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new C((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Tn.prototype.createCircle=function(t){var e=new C(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Tn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Tn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Ln,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Tn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Tn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Tn.prototype.closeRing=function(){this._segList.closeRing()},Tn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},An.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},An.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},An.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},An.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Tn,An);var Dn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Dn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&bt.reverse(o),o},Dn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=bn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Se.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=bn.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Se.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment(),n.closeRing()},Dn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===Se.RIGHT&&(i=-i);var r=bn.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Dn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=bn.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],Se.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=bn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Se.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Dn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:e.createCircle(t);break;case Cn.CAP_SQUARE:e.createSquare(t)}},Dn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Dn.prototype.getBufferParameters=function(){return this._bufParams},Dn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Dn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Dn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Dn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=bn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Se.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=bn.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Se.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment()},Dn.prototype.getSegGen=function(t){return new Tn(this._precisionModel,this._bufParams,t)},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;nr.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(R(arguments[2],It)&&arguments[0]instanceof C&&arguments[1]instanceof ze){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),l=0;lthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var c=s.getDepth(Se.LEFT);this._seg.p0.equals(u[l])||(c=s.getDepth(Se.RIGHT));var p=new Gn(this._seg,c);a.add(p)}}else if(R(arguments[2],It)&&arguments[0]instanceof C&&R(arguments[1],It))for(var h=arguments[0],f=arguments[2],g=arguments[1].iterator();g.hasNext();){var y=g.next();y.isForward()&&this.findStabbedSegments(h,y,f)}},Mn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:$e.min(e)._leftDepth},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Fn.DepthSegment.get=function(){return Gn},Object.defineProperties(Mn,Fn);var Gn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new yn(t),this._leftDepth=e};Gn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Gn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Gn.prototype.toString=function(){return this._upwardSeg.toString()},Gn.prototype.interfaces_=function(){return[x]},Gn.prototype.getClass=function(){return Gn};var Bn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Bn.prototype.area=function(){return Bn.area(this.p0,this.p1,this.p2)},Bn.prototype.signedArea=function(){return Bn.signedArea(this.p0,this.p1,this.p2)},Bn.prototype.interpolateZ=function(t){if(null===t)throw new m("Supplied point is null.");return Bn.interpolateZ(t,this.p0,this.p1,this.p2)},Bn.prototype.longestSideLength=function(){return Bn.longestSideLength(this.p0,this.p1,this.p2)},Bn.prototype.isAcute=function(){return Bn.isAcute(this.p0,this.p1,this.p2)},Bn.prototype.circumcentre=function(){return Bn.circumcentre(this.p0,this.p1,this.p2)},Bn.prototype.area3D=function(){return Bn.area3D(this.p0,this.p1,this.p2)},Bn.prototype.centroid=function(){return Bn.centroid(this.p0,this.p1,this.p2)},Bn.prototype.inCentre=function(){return Bn.inCentre(this.p0,this.p1,this.p2)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Bn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Bn.det=function(t,e,n,i){return t*i-e*n},Bn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,u=n.y-o,l=i.y-o,c=s*l-a*u,p=t.x-r,h=t.y-o,f=(l*p-a*h)/c,g=(-u*p+s*h)/c;return e.z+f*(n.z-e.z)+g*(i.z-e.z)},Bn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},Bn.isAcute=function(t,e,n){return!!Rn.isAcute(t,e,n)&&!!Rn.isAcute(e,n,t)&&!!Rn.isAcute(n,t,e)},Bn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,u=e.y-r,l=2*Bn.det(o,s,a,u),c=Bn.det(s,o*o+s*s,u,a*a+u*u),p=Bn.det(o,o*o+s*s,a,a*a+u*u);return new C(i-c/l,r+p/l)},Bn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new X(t.x+n/2,t.y+i/2,1),o=new X(t.x-i+n/2,t.y+n+i/2,1);return new X(r,o)},Bn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new C(t.x+r*o,t.y+r*s)},Bn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,l=r*u-o*a,c=o*s-i*u,p=i*a-r*s,h=l*l+c*c+p*p;return Math.sqrt(h)/2},Bn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new C(i,r)},Bn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,u=(i*t.y+r*e.y+o*n.y)/s;return new C(a,u)};var qn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};qn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,L.EXTERIOR,L.INTERIOR)},qn.prototype.addPolygon=function(t){var e=this._distance,n=Se.LEFT;this._distance<0&&(e=-this._distance,n=Se.RIGHT);var i=t.getExteriorRing(),r=bt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,L.EXTERIOR,L.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Se.opposite(n),L.INTERIOR,L.EXTERIOR)}},qn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Bn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=Se.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},qn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Zt?this.addLineString(t):t instanceof Jt?this.addPoint(t):(t instanceof te||t instanceof Vt||t instanceof ne||t instanceof zt)&&this.addCollection(t)},qn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},qn.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof zt?(this._subcollectionIterator=new Un(t),this._subcollectionIterator.next()):t},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Un.prototype.interfaces_=function(){return[xt]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(t){return!(t instanceof zt)};var zn=function(){this._geom=null;var t=arguments[0];this._geom=t};zn.prototype.locate=function(t){return zn.locate(t,this._geom)},zn.prototype.interfaces_=function(){return[kn]},zn.prototype.getClass=function(){return zn},zn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},zn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!zn.isPointInRing(t,n))return!1;for(var i=0;i=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Se.LEFT),i=t.getDepth(Se.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new Le("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[1],s=arguments[2],a=arguments[0];a=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();)r.next().getEdgeRing()===n&&i++;return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=L.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=L.INTERIOR;break}if(i.isInResult()){t=L.EXTERIOR;break}}}if(t===L.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===L.INTERIOR):(s.isInResult()&&(r=L.EXTERIOR),a.isInResult()&&(r=L.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Te(L.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==L.INTERIOR&&o!==L.BOUNDARY||this._label.setLocation(r,L.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Vn),Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ge(t,new Yn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ve),jn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};jn.prototype.compareTo=function(t){var e=t;return jn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},jn.prototype.interfaces_=function(){return[x]},jn.prototype.getClass=function(){return jn},jn.orientation=function(t){return 1===bt.increasingDirection(t)},jn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,u=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var p=(u+=r)===s,h=(l+=o)===a;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}};var Hn=function(){this._edges=new Nt,this._ocaMap=new p};Hn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var i=n.getCoordinates(),r=0;r0&&t.print(","),t.print(i[r].x+" "+i[r].y);t.println(")")}t.print(") ")},Hn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Hn.prototype.findEdgeIndex=function(t){for(var e=0;e0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Te(this.edge._label))},Jn.prototype.add=function(t,e,n){var i=new Kn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var Qn=function(){};Qn.prototype.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new D(e));do{var i=this.findChainEnd(t,e);n.add(new D(i)),e=i}while(en?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return ee&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][Se.RIGHT]-this._depth[t][Se.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?L.EXTERIOR:L.INTERIOR},ti.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==L.EXTERIOR&&i!==L.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===L.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===L.EXTERIOR?0:t===L.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Te.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new j;for(var t=0;t0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;ei||this._maxyo;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new C(this._maxx,this._maxy),this._corner[1]=new C(this._minx,this._maxy),this._corner[2]=new C(this._minx,this._miny),this._corner[3]=new C(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!i)||!!t.equals(this._pt)||!!e.equals(this._pt))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ui.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,ui);var li=function(){this.tempEnv1=new j,this.selectedSegment=new yn};li.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[1];arguments[0].getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li};var ci=function(){this._index=null;var t=arguments[0];this._index=t},pi={HotPixelSnapAction:{configurable:!0}};ci.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new hi(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ze]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},pi.HotPixelSnapAction.get=function(){return hi},Object.defineProperties(ci,pi);var hi=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[1],n=arguments[0].getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(li),fi=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Nt};fi.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Le))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=yi.precisionScaleFactor(this._argGeom,this._distance,n),r=new fe(i);this.bufferFixedPrecision(r)}},yi.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},yi.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},yi.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},yi.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},yi.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi},yi.bufferOp=function(){if(2===arguments.length){var t=arguments[1];return new yi(arguments[0]).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var e=arguments[1],n=arguments[2],i=new yi(arguments[0]);return i.setQuadrantSegments(n),i.getResultGeometry(e)}if(arguments[2]instanceof Cn&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var r=arguments[1];return new yi(arguments[0],arguments[2]).getResultGeometry(r)}}else if(4===arguments.length){var o=arguments[1],s=arguments[2],a=arguments[3],u=new yi(arguments[0]);return u.setQuadrantSegments(s),u.setEndCapStyle(a),u.getResultGeometry(o)}},yi.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=O.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},di.CAP_ROUND.get=function(){return Cn.CAP_ROUND},di.CAP_BUTT.get=function(){return Cn.CAP_FLAT},di.CAP_FLAT.get=function(){return Cn.CAP_FLAT},di.CAP_SQUARE.get=function(){return Cn.CAP_SQUARE},di.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(yi,di);var _i=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};_i.prototype.getCoordinates=function(){return this._pt},_i.prototype.getCoordinate=function(t){return this._pt[t]},_i.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);ithis._distance&&this.initialize(e,n,i)}},_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var mi=function(){};mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi},mi.computeDistance=function(){if(arguments[2]instanceof _i&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[1],e=arguments[2],n=arguments[0].getCoordinates(),i=new yn,r=0;r0||this._isIn?L.INTERIOR:L.EXTERIOR)},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si};var bi=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length)t.call(this,arguments[0],t.INSIDE_AREA,arguments[1]);else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._component=e,this._segIndex=n,this._pt=i}},wi={INSIDE_AREA:{configurable:!0}};bi.prototype.isInsideArea=function(){return this._segIndex===bi.INSIDE_AREA},bi.prototype.getCoordinate=function(){return this._pt},bi.prototype.getGeometryComponent=function(){return this._component},bi.prototype.getSegmentIndex=function(){return this._segIndex},bi.prototype.interfaces_=function(){return[]},bi.prototype.getClass=function(){return bi},wi.INSIDE_AREA.get=function(){return-1},Object.defineProperties(bi,wi);var Li=function(t){this._pts=t||null};Li.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Li.prototype.interfaces_=function(){return[kt]},Li.prototype.getClass=function(){return Li},Li.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?$e.singletonList(t):Li.getPoints(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof zt&&e.apply(new Li(n)),n}};var Pi=function(){this._locations=null;var t=arguments[0];this._locations=t};Pi.prototype.filter=function(t){(t instanceof Jt||t instanceof Zt||t instanceof $t)&&this._locations.add(new bi(t,0,t.getCoordinate()))},Pi.prototype.interfaces_=function(){return[kt]},Pi.prototype.getClass=function(){return Pi},Pi.getLocations=function(t){var e=new Nt;return t.apply(new Pi(e)),e};var Ri=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Si,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ri.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=Ni.getPolygons(this._geom[e]);if(r.size()>0){var o=Pi.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&R(arguments[0],It)&&R(arguments[1],It)){for(var s=arguments[0],a=arguments[1],u=arguments[2],l=0;lthis._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;othis._minDistance)return null;for(var p=u.getCoordinates(),h=l.getCoordinates(),f=0;fthis._distance&&this.initialize(e,n,i)}},Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi};var Ti=function(){};Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti},Ti.computeDistance=function(){if(arguments[2]instanceof Oi&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new yn,r=t.getCoordinates(),o=0;o1||t<=0)throw new m("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Ai.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Ai.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Ai.prototype.computeOrientedDistance=function(t,e,n){var i=new Mi(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Fi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Ai.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Ai.prototype.interfaces_=function(){return[]},Ai.prototype.getClass=function(){return Ai},Ai.distance=function(){if(2===arguments.length)return new Ai(arguments[0],arguments[1]).distance();if(3===arguments.length){var t=arguments[2],e=new Ai(arguments[0],arguments[1]);return e.setDensifyFraction(t),e.distance()}},Di.MaxPointDistanceFilter.get=function(){return Mi},Di.MaxDensifiedByFractionDistanceFilter.get=function(){return Fi},Object.defineProperties(Ai,Di);var Mi=function(){this._maxPtDist=new Oi,this._minPtDist=new Oi,this._euclideanDist=new Ti,this._geom=null;var t=arguments[0];this._geom=t};Mi.prototype.filter=function(t){this._minPtDist.initialize(),Ti.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mi.prototype.interfaces_=function(){return[ft]},Mi.prototype.getClass=function(){return Mi};var Fi=function(){this._maxPtDist=new Oi,this._minPtDist=new Oi,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;sn){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Q.toLineString(r[0],r[1])+")"}},Gi.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Gi.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Gi.VERBOSE&&Y.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Gi.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof zt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Gi.prototype.getErrorIndicator=function(){return this._errorIndicator},Gi.prototype.checkMinimumDistance=function(t,e,n){var i=new Ri(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},qi.prototype.report=function(t){if(!qi.VERBOSE)return null;Y.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},qi.prototype.getErrorMessage=function(){return this._errorMsg},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi},qi.isValidMsg=function(t,e,n){var i=new qi(t,e,n);return i.isValid()?null:i.getErrorMessage()},qi.isValid=function(t,e,n){return!!new qi(t,e,n).isValid()},ki.VERBOSE.get=function(){return!1},ki.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(qi,ki);var Ui=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ui.prototype.getCoordinates=function(){return this._pts},Ui.prototype.size=function(){return this._pts.length},Ui.prototype.getCoordinate=function(t){return this._pts[t]},Ui.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ui.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Ui.prototype.setData=function(t){this._data=t},Ui.prototype.getData=function(){return this._data},Ui.prototype.toString=function(){return Q.toLineString(new ue(this._pts))},Ui.prototype.interfaces_=function(){return[hn]},Ui.prototype.getClass=function(){return Ui};var zi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Nt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};zi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},zi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},zi.prototype.getIntersectionSegments=function(){return this._intSegments},zi.prototype.count=function(){return this._intersectionCount},zi.prototype.getIntersections=function(){return this._intersections},zi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},zi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},zi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,i))return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},zi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},zi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},zi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},zi.prototype.interfaces_=function(){return[Wn]},zi.prototype.getClass=function(){return zi},zi.createAllIntersectionsFinder=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e},zi.createAnyIntersectionFinder=function(t){return new zi(t)},zi.createIntersectionCounter=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Vi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Vi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Vi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vi.prototype.isValid=function(){return this.execute(),this._isValid},Vi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new zi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new In;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Le(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vi.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Q.toLineString(t[0],t[1])+" and "+Q.toLineString(t[2],t[3])},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi},Vi.computeIntersections=function(t){var e=new Vi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yi=function t(){this._nv=null;var e=arguments[0];this._nv=new Vi(t.toSegmentStrings(e))};Yi.prototype.checkValid=function(){this._nv.checkValid()},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi},Yi.toSegmentStrings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Ui(i.getCoordinates(),i))}return e},Yi.checkValid=function(t){new Yi(t).checkValid()};var Xi=function(t){this._mapOp=t};Xi.prototype.map=function(t){for(var e=new Nt,n=0;n0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Zi=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new yn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Zt&&"number"==typeof arguments[1]){var e=arguments[1];t.call(this,arguments[0].getCoordinates(),e)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=i}};Zi.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(o+1,new C(r),!1)}},Zi.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,i=-1,r=0;re&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(Ki.computeOverlaySnapTolerance(r),Ki.computeOverlaySnapTolerance(o))}},Ki.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Ki.SNAP_PRECISION_FACTOR},Ki.snapToSelf=function(t,e,n){return new Ki(t).snapToSelf(e,n)},Ji.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Ki,Ji);var Qi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Zi(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=v.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null):$i.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+v.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<>52},$i.zeroLowerBits=function(t,e){return t&~((1<=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new C(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new C(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[ft]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[Ut]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new Ki(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=br.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||Y.out.println("Snapped geometry is invalid")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=Ki.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return Ki.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,br.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,br.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,br.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,br.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=br.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,br.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,br.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,br.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,br.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},ur={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[x]},ar.prototype.getClass=function(){return ar},ur.INSERT.get=function(){return 1},ur.DELETE.get=function(){return 2},Object.defineProperties(ar,ur);var lr=function(){};lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var cr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};cr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(cr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},cr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cr.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},cr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cr.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},cr.prototype.hasProperIntersection=function(){return this._hasProper},cr.prototype.hasIntersection=function(){return this._hasIntersection},cr.prototype.isDone=function(){return this._isDone},cr.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},cr.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},cr.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pr=function(t){function e(){t.call(this),this.events=new Nt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;te||this._maxo?1:0},gr.prototype.interfaces_=function(){return[N]},gr.prototype.getClass=function(){return gr};var yr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),dr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),_r=function(){this._leaves=new Nt,this._root=null,this._level=0};_r.prototype.buildTree=function(){$e.sort(this._leaves,new hr.NodeComparator);for(var t=this._leaves,e=null,n=new Nt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_r.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new yr(t,e,n))},_r.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_r.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},_r.prototype.printNode=function(t){Y.out.println(Q.toLineString(new C(t._min,this._level),new C(t._max,this._level)))},_r.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},_r.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===L.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=bt.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Te(this._argIndex,L.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],L.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Te(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Zt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Vt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof zt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e50?(null===this._areaPtLocator&&(this._areaPtLocator=new vr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?L.BOUNDARY:L.INTERIOR},e}(Ye),Cr=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Nr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,e,i),this._arg[1]=new Nr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,r,s),this._arg[1]=new Nr(1,o,s)}};Cr.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Cr.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr};var Sr=function(){};Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Sr.map=function(){if(arguments[0]instanceof ct&&R(arguments[1],Sr.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Nt,i=0;i=t.size()?null:t.get(e)},Ar.union=function(t){return new Ar(t).union()},Dr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ar,Dr);var Mr=function(){};Mr.prototype.interfaces_=function(){return[]},Mr.prototype.getClass=function(){return Mr},Mr.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return br.createEmptyResult(br.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,br.UNION)},t.GeoJSONReader=Ne,t.GeoJSONWriter=Ce,t.OverlayOp=br,t.UnionOp=Mr,t.BufferOp=yi,Object.defineProperty(t,"__esModule",{value:!0})}(e)},58205:t=>{let e=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,n=new RegExp("^"+e.source+"(\\s"+e.source+"){1,}");const i=t=>{function e(t){return t.join(" ")}function n(t){return t.map(e).join(", ")}function r(t){return t.map(n).map(s).join(", ")}function o(t){return t.map(r).map(s).join(", ")}function s(t){return"("+t+")"}"Feature"===t.type&&(t=t.geometry);let a=t;switch(a.type){case"Point":return a.coordinates&&3===a.coordinates.length?"POINT Z ("+e(a.coordinates)+")":"POINT ("+e(a.coordinates)+")";case"LineString":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"LINESTRING Z ("+n(a.coordinates)+")":"LINESTRING ("+n(a.coordinates)+")";case"Polygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"POLYGON Z ("+r(a.coordinates)+")":"POLYGON ("+r(a.coordinates)+")";case"MultiPoint":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"MULTIPOINT Z ("+n(a.coordinates)+")":"MULTIPOINT ("+n(a.coordinates)+")";case"MultiLineString":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"MULTILINESTRING Z ("+r(a.coordinates)+")":"MULTILINESTRING ("+r(a.coordinates)+")";case"MultiPolygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&a.coordinates[0][0]&&3===a.coordinates[0][0][0].length?"MULTIPOLYGON Z ("+o(a.coordinates)+")":"MULTIPOLYGON ("+o(a.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+a.geometries.map(i).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};t.exports={parse:t=>{let e=t.split(";"),i=e.pop(),r=(e.shift()||"").split("=").pop(),o=0;function s(t){let e=i.substring(o).match(t);return e?(o+=e[0].length,e[0]):null}function a(){s(/^\s*/)}function u(){a();let t,e=0,i=[],r=[i],o=i;for(;t=s(/^(\()/)||s(/^(\))/)||s(/^(,)/)||s(n);){if("("===t)r.push(o),o=[],r[r.length-1].push(o),e++;else if(")"===t){if(0===o.length)return null;if(o=r.pop(),!o)return null;if(e--,0===e)break}else if(","===t)o=[],r[r.length-1].push(o);else{if(t.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(o,t.split(/\s/g).map(parseFloat))}a()}return 0!==e?null:i}function l(){let t,e,i=[];for(;e=s(n)||s(/^(,)/);)","===e?(i.push(t),t=[]):e.split(/\s/g).some(isNaN)||(t||(t=[]),Array.prototype.push.apply(t,e.split(/\s/g).map(parseFloat))),a();return t?(i.push(t),i.length?i:null):null}function c(){return function(){if(!s(/^(point(\sz)?)/i))return null;if(a(),!s(/^(\()/))return null;let t=l();return t?(a(),s(/^(\))/)?{type:"Point",coordinates:t[0]}:null):null}()||function(){if(!s(/^(linestring(\sz)?)/i))return null;if(a(),!s(/^(\()/))return null;let t=l();return t&&s(/^(\))/)?{type:"LineString",coordinates:t}:null}()||function(){if(!s(/^(polygon(\sz)?)/i))return null;a();let t=u();return t?{type:"Polygon",coordinates:t}:null}()||function(){if(!s(/^(multipoint(\sz)?)/i))return null;a();let t=i.substring(i.indexOf("(")+1,i.length-1).replace(/\(/g,"").replace(/\)/g,"");i="MULTIPOINT ("+t+")";let e=u();return e?(a(),{type:"MultiPoint",coordinates:e}):null}()||function(){if(!s(/^(multilinestring(\sz)?)/i))return null;a();let t=u();return t?(a(),{type:"MultiLineString",coordinates:t}):null}()||function(){if(!s(/^(multipolygon(\sz)?)/i))return null;a();let t=u();return t?{type:"MultiPolygon",coordinates:t}:null}()||function(){let t,e=[];if(!s(/^(geometrycollection)/i))return null;if(a(),!s(/^(\()/))return null;for(;t=c();)e.push(t),a(),s(/^(,)/),a();return s(/^(\))/)?{type:"GeometryCollection",geometries:e}:null}()}return(p=c())&&r.match(/\d+/)&&(p.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+r}}),p;var p},stringify:i}},17527:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(40517);function r(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),o=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[n,r],u=[n,s],l=[o,s],c=[o,r];return(0,i.yu)([[a,c,l,u,a]],e.properties,{bbox:t,id:e.id})}},82086:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024);function r(t){var e=[1/0,1/0,-1/0,-1/0];return(0,i.pZ)(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";n.d(e,{Z:()=>r});var i=n(81011);function r(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=(0,i.c9)(t),s=(0,i.wA)(e),a=s.type,u=e.bbox,l=s.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,u))return!1;"Polygon"===a&&(l=[l]);for(var c=!1,p=0;pt[1]!==l>t[1]&&t[0]<(u-s)*(t[1]-a)/(l-a)+s&&(i=!i)}return i}},936:(t,e,n)=>{"use strict";n.d(e,{Z:()=>jt});var i=n(40590),r=n(28774),o=n(48024);function s(){return new a}function a(){this.reset()}a.prototype={constructor:a,reset:function(){this.s=this.t=0},add:function(t){l(u,t,this.t),l(this,u.s,this.s),this.s?this.t+=u.t:this.s=u.t},valueOf:function(){return this.s}};var u=new a;function l(t,e,n){var i=t.s=e+n,r=i-e,o=i-r;t.t=e-o+(n-r)}var c=1e-6,p=Math.PI,h=p/2,f=p/4,g=2*p,y=180/p,d=p/180,_=Math.abs,m=Math.atan,v=Math.atan2,E=Math.cos,x=(Math.ceil,Math.exp),I=(Math.floor,Math.log),N=(Math.pow,Math.sin),C=(Math.sign,Math.sqrt),S=Math.tan;function b(t){return t>1?0:t<-1?p:Math.acos(t)}function w(t){return t>1?h:t<-1?-h:Math.asin(t)}function L(){}function P(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var R={Feature:function(t,e){P(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++ip?t-g:t<-p?t+g:t,e]}function Y(t,e,n){return(t%=g)?e||n?z(j(t),H(e,n)):j(t):e||n?H(e,n):V}function X(t){return function(e,n){return[(e+=t)>p?e-g:e<-p?e+g:e,n]}}function j(t){var e=X(t);return e.invert=X(-t),e}function H(t,e){var n=E(t),i=N(t),r=E(e),o=N(e);function s(t,e){var s=E(e),a=E(t)*s,u=N(t)*s,l=N(e),c=l*n+a*i;return[v(u*r-c*o,a*n-l*i),w(c*r+u*o)]}return s.invert=function(t,e){var s=E(e),a=E(t)*s,u=N(t)*s,l=N(e),c=l*r-u*o;return[v(u*r+l*o,a*n+c*i),w(c*n-a*i)]},s}function W(t,e,n,i,r,o){if(n){var s=E(e),a=N(e),u=i*n;null==r?(r=e+i*g,o=e-u/2):(r=Z(s,r),o=Z(s,o),(i>0?ro)&&(r+=i*g));for(var l,c=r;i>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function J(t,e){return _(t[0]-e[0])=0;--o)r.point((c=l[o])[0],c[1]);else i(h.x,h.p.x,-1,r);h=h.p}l=(h=h.o).z,f=!f}while(!h.v);r.lineEnd()}}}function tt(t){if(e=t.length){for(var e,n,i=0,r=t[0];++ie?1:t>=e?0:NaN}V.invert=V;var nt=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return et(e(t),n)}),{left:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i>>1;t(e[o],n)<0?i=o+1:r=o}return i},right:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i>>1;t(e[o],n)>0?r=o:i=o+1}return i}}}(et);nt.right,nt.left;var it=Array.prototype;it.slice,it.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function rt(t){for(var e,n,i,r=t.length,o=-1,s=0;++o=0;)for(e=(i=t[r]).length;--e>=0;)n[--s]=i[e];return n}var ot=1e9,st=-ot;function at(t,e,n,i){function r(r,o){return t<=r&&r<=n&&e<=o&&o<=i}function o(r,o,a,l){var c=0,p=0;if(null==r||(c=s(r,a))!==(p=s(o,a))||u(r,o)<0^a>0)do{l.point(0===c||3===c?t:n,c>1?i:e)}while((c=(c+a+4)%4)!==p);else l.point(o[0],o[1])}function s(i,r){return _(i[0]-t)0?0:3:_(i[0]-n)0?2:1:_(i[1]-e)0?1:0:r>0?3:2}function a(t,e){return u(t.x,e.x)}function u(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var u,l,c,p,h,f,g,y,d,_,m,v=s,E=K(),x={point:I,lineStart:function(){x.point=N,l&&l.push(c=[]);_=!0,d=!1,g=y=NaN},lineEnd:function(){u&&(N(p,h),f&&d&&E.rejoin(),u.push(E.result()));x.point=I,d&&v.lineEnd()},polygonStart:function(){v=E,u=[],l=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=l.length;ni&&(h-o)*(i-s)>(f-s)*(t-o)&&++e:f<=i&&(h-o)*(i-s)<(f-s)*(t-o)&&--e;return e}(),n=m&&e,r=(u=rt(u)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),r&&$(u,a,e,o,s),s.polygonEnd());v=s,u=l=c=null}};function I(t,e){r(t,e)&&v.point(t,e)}function N(o,s){var a=r(o,s);if(l&&c.push([o,s]),_)p=o,h=s,f=a,_=!1,a&&(v.lineStart(),v.point(o,s));else if(a&&d)v.point(o,s);else{var u=[g=Math.max(st,Math.min(ot,g)),y=Math.max(st,Math.min(ot,y))],E=[o=Math.max(st,Math.min(ot,o)),s=Math.max(st,Math.min(ot,s))];!function(t,e,n,i,r,o){var s,a=t[0],u=t[1],l=0,c=1,p=e[0]-a,h=e[1]-u;if(s=n-a,p||!(s>0)){if(s/=p,p<0){if(s0){if(s>c)return;s>l&&(l=s)}if(s=r-a,p||!(s<0)){if(s/=p,p<0){if(s>c)return;s>l&&(l=s)}else if(p>0){if(s0)){if(s/=h,h<0){if(s0){if(s>c)return;s>l&&(l=s)}if(s=o-u,h||!(s<0)){if(s/=h,h<0){if(s>c)return;s>l&&(l=s)}else if(h>0){if(s0&&(t[0]=a+l*p,t[1]=u+l*h),c<1&&(e[0]=a+c*p,e[1]=u+c*h),!0}}}}}(u,E,t,e,n,i)?a&&(v.lineStart(),v.point(o,s),m=!1):(d||(v.lineStart(),v.point(u[0],u[1])),v.point(E[0],E[1]),a||v.lineEnd(),m=!1)}g=o,y=s,d=a}return x}}var ut=s();function lt(t,e){var n=e[0],i=e[1],r=[N(n),-E(n),0],o=0,s=0;ut.reset();for(var a=0,u=t.length;a=0?1:-1,T=O*R,A=T>p,D=m*L;if(ut.add(v(D*O*N(T),x*P+D*E(T))),o+=A?R+O*g:R,A^d>=n^S>=n){var M=B(F(y),F(C));U(M);var G=B(r,M);U(G);var q=(A^R>=0?-1:1)*w(G[2]);(i>q||i===q&&(M[0]||M[1]))&&(s+=A^R>=0?1:-1)}}return(o<-c||oht&&(ht=t);eft&&(ft=e)},lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var t=[[ct,pt],[ht,ft]];return ht=ft=-(pt=ct=1/0),t}};const yt=gt;s();function dt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _t(t,e,n,i){return function(r,o){var s,a,u,l=e(o),c=r.invert(i[0],i[1]),p=K(),h=e(p),f=!1,g={point:y,lineStart:_,lineEnd:m,polygonStart:function(){g.point=v,g.lineStart=E,g.lineEnd=x,a=[],s=[]},polygonEnd:function(){g.point=y,g.lineStart=_,g.lineEnd=m,a=rt(a);var t=lt(s,c);a.length?(f||(o.polygonStart(),f=!0),$(a,vt,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=s=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function y(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function d(t,e){var n=r(t,e);l.point(n[0],n[1])}function _(){g.point=d,l.lineStart()}function m(){g.point=y,l.lineEnd()}function v(t,e){u.push([t,e]);var n=r(t,e);h.point(n[0],n[1])}function E(){h.lineStart(),u=[]}function x(){v(u[0][0],u[0][1]),h.lineEnd();var t,e,n,i,r=h.clean(),l=p.result(),c=l.length;if(u.pop(),s.push(u),u=null,c)if(1&r){if((e=(n=l[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t1&&2&r&&l.push(l.pop().concat(l.shift())),a.push(l.filter(mt))}return g}}function mt(t){return t.length>1}function vt(t,e){return((t=t.x)[0]<0?t[1]-h-c:h-t[1])-((e=e.x)[0]<0?e[1]-h-c:h-e[1])}dt(4.5);const Et=_t((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?p:-p,u=_(o-n);_(u-p)0?h:-h),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&u>=p&&(_(n-r)c?m((N(e)*(o=E(i))*N(n)-N(i)*(r=E(e))*N(t))/(r*o*s)):(e+i)/2}(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=o,i=s),r=a},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*h,i.point(-p,r),i.point(0,r),i.point(p,r),i.point(p,0),i.point(p,-r),i.point(0,-r),i.point(-p,-r),i.point(-p,0),i.point(-p,r);else if(_(t[0]-e[0])>c){var o=t[0]4*e&&d--){var N=s+f,S=a+g,b=u+y,L=C(N*N+S*S+b*b),P=w(b/=L),R=_(_(b)-1)e||_((E*D+x*M)/I-.5)>.3||s*f+a*g+u*y0,r=_(n)>c;function o(t,e){return E(t)*E(e)>n}function s(t,e,i){var r=[1,0,0],o=B(F(t),F(e)),s=G(o,o),a=o[0],u=s-a*a;if(!u)return!i&&t;var l=n*s/u,h=-n*a/u,f=B(r,o),g=k(r,l);q(g,k(o,h));var y=f,d=G(g,y),m=G(y,y),v=d*d-m*(G(g,g)-1);if(!(v<0)){var E=C(v),x=k(y,(-d-E)/m);if(q(x,g),x=M(x),!i)return x;var I,N=t[0],S=e[0],b=t[1],w=e[1];S0^x[1]<(_(x[0]-N)p^(N<=x[0]&&x[0]<=S)){var R=k(y,(-d+E)/m);return q(R,g),[x,M(R)]}}}function a(e,n){var r=i?t:p-t,o=0;return e<-r?o|=1:e>r&&(o|=2),n<-r?o|=4:n>r&&(o|=8),o}return _t(o,(function(t){var e,n,u,l,h;return{lineStart:function(){l=u=!1,h=1},point:function(f,g){var y,d=[f,g],_=o(f,g),m=i?_?0:a(f,g):_?a(f+(f<0?p:-p),g):0;if(!e&&(l=u=_)&&t.lineStart(),_!==u&&(!(y=s(e,d))||J(e,y)||J(d,y))&&(d[0]+=c,d[1]+=c,_=o(d[0],d[1])),_!==u)h=0,_?(t.lineStart(),y=s(d,e),t.point(y[0],y[1])):(y=s(e,d),t.point(y[0],y[1]),t.lineEnd()),e=y;else if(r&&e&&i^_){var v;m&n||!(v=s(d,e,!0))||(h=0,i?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!_||e&&J(e,d)||t.point(d[0],d[1]),e=d,u=_,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return h|(l&&u)<<1}}}),(function(n,i,r,o){W(o,t,e,r,n,i)}),i?[0,-t]:[-p,t-p])}(b=t*d,6*d):(b=null,Et),V()):b*y},T.clipExtent=function(t){return arguments.length?(P=null==t?(L=s=a=u=null,xt):at(L=+t[0][0],s=+t[0][1],a=+t[1][0],u=+t[1][1]),V()):null==L?null:[[L,s],[a,u]]},T.scale=function(t){return arguments.length?(f=+t,U()):f},T.translate=function(t){return arguments.length?(g=+t[0],m=+t[1],U()):[g,m]},T.center=function(t){return arguments.length?(v=t[0]%360*d,x=t[1]%360*d,U()):[v*y,x*y]},T.rotate=function(t){return arguments.length?(I=t[0]%360*d,N=t[1]%360*d,S=t.length>2?t[2]%360*d:0,U()):[I*y,N*y,S*y]},T.precision=function(t){return arguments.length?(O=wt(D,R=t*t),V()):C(R)},T.fitExtent=function(t,e){return Ct(T,t,e)},T.fitSize=function(t,e){return function(t,e,n){return Ct(t,[[0,0],e],n)}(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&A,U()}}((function(){return t}))()}function Rt(t){return function(e,n){var i=E(e),r=E(n),o=t(i*r);return[o*r*N(e),o*N(n)]}}function Ot(t){return function(e,n){var i=C(e*e+n*n),r=t(i),o=N(r),s=E(r);return[v(e*o,i*s),w(i&&n*o/i)]}}var Tt=Rt((function(t){return C(2/(1+t))}));Tt.invert=Ot((function(t){return 2*w(t/2)}));var At=Rt((function(t){return(t=b(t))&&t/N(t)}));function Dt(t,e){return[t,I(S((h+e)/2))]}function Mt(t,e){return[t,e]}function Ft(t,e){var n=E(e),i=E(t)*n;return[n*N(t)/i,N(e)/i]}function Gt(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function Bt(t,e){return[E(e)*N(t),N(e)]}function qt(t,e){var n=E(e),i=1+E(t)*n;return[n*N(t)/i,N(e)/i]}function kt(t,e){return[I(S((h+e)/2)),-t]}At.invert=Ot((function(t){return t})),Dt.invert=function(t,e){return[t,2*m(x(e))-h]},Mt.invert=Mt,Ft.invert=Ot(m),Gt.invert=function(t,e){var n,i=e,r=25;do{var o=i*i,s=o*o;i-=n=(i*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(_(n)>c&&--r>0);return[t/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]},Bt.invert=Ot(w),qt.invert=Ot((function(t){return 2*m(t)})),kt.invert=function(t,e){return[-e,2*m(x(t))-h]};var Ut=n(40517);function zt(t,e,n,s){var a=t.properties||{},u="Feature"===t.type?t.geometry:t;if("GeometryCollection"===u.type){var l=[];return(0,o.on)(t,(function(t){var i=zt(t,e,n,s);i&&l.push(i)})),(0,Ut.uf)(l)}var c=function(t){var e=(0,i.Z)(t).geometry.coordinates,n=[-e[0],-e[1]];return Pt(At).scale(79.4188).clipAngle(179.999).rotate(n).scale(Ut.rQ)}(u),p={type:u.type,coordinates:Yt(u.coordinates,c)},h=(new r.GeoJSONReader).read(p),f=(0,Ut.DL)((0,Ut.lF)(e,n),"meters"),g=r.BufferOp.bufferOp(h,f,s);if(!Vt((g=(new r.GeoJSONWriter).write(g)).coordinates)){var y={type:g.type,coordinates:Xt(g.coordinates,c)};return(0,Ut.zL)(y,a)}}function Vt(t){return Array.isArray(t[0])?Vt(t[0]):isNaN(t[0])}function Yt(t,e){return"object"!==typeof t[0]?e(t):t.map((function(t){return Yt(t,e)}))}function Xt(t,e){return"object"!==typeof t[0]?e.invert(t):t.map((function(t){return Xt(t,e)}))}const jt=function(t,e,n){var i=(n=n||{}).units||"kilometers",r=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!==typeof n)throw new Error("options must be an object");if("number"!==typeof r)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(r<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return(0,o.on)(t,(function(t){var n=zt(t,e,i,r);n&&s.push(n)})),(0,Ut.uf)(s);case"FeatureCollection":return(0,o.By)(t,(function(t){var n=zt(t,e,i,r);n&&(0,o.By)(n,(function(t){t&&s.push(t)}))})),(0,Ut.uf)(s)}return zt(t,e,i,r)}},40590:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(82086),r=n(40517);const o=function(t,e){void 0===e&&(e={});var n=(0,i.Z)(t),o=(n[0]+n[2])/2,s=(n[1]+n[3])/2;return(0,r.xm)([o,s],e.properties,e)}},35434:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024),r=n(40517);const o=function(t,e){void 0===e&&(e={});var n=0,o=0,s=0;return(0,i.pZ)(t,(function(t){n+=t[0],o+=t[1],s++}),!0),(0,r.xm)([n/s,o/s],e.properties)}},56720:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(40517),r=n(48024);const o=function(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return(0,r.By)(t,(function(t){var n,i,r,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(i=e.MultiLineString.coordinates).push.apply(i,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(r=e.MultiPolygon.coordinates).push.apply(r,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties)}})),(0,i.uf)(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){var n={type:t,coordinates:e[t].coordinates},r={collectedProperties:e[t].properties};return(0,i.zL)(n,r)})))}},31890:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(40517),r=n(81011),o=n(48024),s=n(52675),a=n(26625);const u=function(t,e){if(e=e||{},!(0,i.Kn)(e))throw new Error("options is invalid");var n=e.propertyName;(0,r.qI)(t,"Polygon","dissolve");var u=[];if(!e.propertyName)return(0,s.Z)((0,i.tw)(a.union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var l={};(0,o.By)(t,(function(t){Object.prototype.hasOwnProperty.call(l,t.properties[n])||(l[t.properties[n]]=[]),l[t.properties[n]].push(t)}));for(var c=Object.keys(l),p=0;p{"use strict";n.d(e,{Z:()=>o});var i=n(81011),r=n(40517);const o=function(t,e,n){void 0===n&&(n={});var o=(0,i.c9)(t),s=(0,i.c9)(e),a=(0,r.Ht)(s[1]-o[1]),u=(0,r.Ht)(s[0]-o[0]),l=(0,r.Ht)(o[1]),c=(0,r.Ht)(s[1]),p=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return(0,r.DL)(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n.units)}},52675:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024),r=n(40517);const o=function(t){if(!t)throw new Error("geojson is required");var e=[];return(0,i.nG)(t,(function(t){e.push(t)})),(0,r.uf)(e)}},40517:(t,e,n)=>{"use strict";n.d(e,{DL:()=>g,Ht:()=>_,Kn:()=>v,Tu:()=>l,Ym:()=>a,_R:()=>p,lF:()=>y,ot:()=>h,rQ:()=>i,tw:()=>f,uf:()=>c,vi:()=>d,xm:()=>s,yu:()=>u,zL:()=>o});var i=6371008.8,r={centimeters:100*i,centimetres:100*i,degrees:i/111325,feet:3.28084*i,inches:39.37*i,kilometers:i/1e3,kilometres:i/1e3,meters:i,metres:i,miles:i/1609.344,millimeters:1e3*i,millimetres:1e3*i,nauticalmiles:i/1852,radians:1,yards:1.0936*i};function o(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function s(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!m(t[0])||!m(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return s(t,e)})),n)}function u(t,e,n){void 0===n&&(n={});for(var i=0,r=t;i{"use strict";n.d(e,{Z:()=>s});var i=n(40517),r=n(81011),o=n(26625);function s(t,e,n){void 0===n&&(n={});var s=(0,r.wA)(t),a=(0,r.wA)(e),u=o.intersection(s.coordinates,a.coordinates);return 0===u.length?null:1===u.length?(0,i.yu)(u[0],n.properties):(0,i.tw)(u,n.properties)}},81011:(t,e,n)=>{"use strict";n.d(e,{c9:()=>i,oL:()=>a,qI:()=>o,r7:()=>r,wA:()=>s});n(40517);function i(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function r(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var i=0,r=t.features;i{"use strict";n.d(e,{By:()=>o,nG:()=>u,on:()=>a,pZ:()=>r,pl:()=>s});var i=n(40517);function r(t,e,n){if(null!==t)for(var i,o,s,a,u,l,c,p,h=0,f=0,g=t.type,y="FeatureCollection"===g,d="Feature"===g,_=y?t.features.length:1,m=0;m<_;m++){u=(p=!!(c=y?t.features[m].geometry:d?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v{"use strict";n.d(e,{Z:()=>h});var i=n(48024),r=n(40517);const o=function(t){var e=[];return"FeatureCollection"===t.type?(0,i.By)(t,(function(t){(0,i.pZ)(t,(function(n){e.push((0,r.xm)(n,t.properties))}))})):(0,i.pZ)(t,(function(n){e.push((0,r.xm)(n,t.properties))})),(0,r.uf)(e)};var s=n(40590),a=n(56875),u=n(64505);const l=function(t,e){if(!t)throw new Error("targetPoint is required");if(!e)throw new Error("points is required");var n,r=1/0,o=0;return(0,i.By)(e,(function(e,n){var i=(0,u.Z)(t,e);i{"use strict";function*i(t,e){if(void 0===e)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(i=+i)>=i&&(yield i)}}n.d(e,{K:()=>i})},31600:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>a});var i=n(6200),r=n(42514),o=n(14755),s=n(20639);function a(t,e,n){if((a=(t=Float64Array.from((0,s.K)(t,n))).length)&&!isNaN(e=+e)){if(e<=0||a<2)return(0,r.Z)(t);if(e>=1)return(0,i.Z)(t);var a,u=(a-1)*e,l=Math.floor(u),c=(0,i.Z)((0,o.Z)(t,l).subarray(0,l+1));return c+((0,r.Z)(t.subarray(l+1))-c)*(u-l)}}}}]); \ No newline at end of file diff --git a/dist/static/js/819.05f8e7ab.js b/dist/static/js/819.05f8e7ab.js new file mode 100644 index 0000000..d927b1d --- /dev/null +++ b/dist/static/js/819.05f8e7ab.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[819],{37383:(t,r,e)=>{"use strict";e.d(r,{default:()=>H});var n=function(){return n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e=72.004&&t<=137.8347&&r>=.8293&&r<=55.8271}function l(t,r){var e=function(t,r){var e=300+t+2*r+.1*t*t+.1*t*r+.1*i(u(t));return e+=2*(20*o(6*t*s)+20*o(2*t*s))/3,e+=2*(20*o(t*s)+40*o(t/3*s))/3,e+2*(150*o(t/12*s)+300*o(t/30*s))/3}(t-105,r-35),n=function(t,r){var e=2*t-100+3*r+.2*r*r+.1*t*r+.2*i(u(t));return e+=2*(20*o(6*t*s)+20*o(2*t*s))/3,e+=2*(20*o(r*s)+40*o(r/3*s))/3,e+2*(160*o(r/12*s)+320*o(r*s/30))/3}(t-105,r-35),p=r/180*s,l=o(p),v=i(l=1-f*l*l);return[e=180*e/(c/v*a(p)*s),n=180*n/(c*(1-f)/(l*v)*s)]}function v(t){var r=t[0],e=t[1];if(!p(r,e))return[r,e];var n=l(r,e);return[r+n[0],e+n[1]]}function h(t){var r=t[0],e=t[1];if(!p(r,e))return[r,e];for(var n=[r,e],o=n[0],a=n[1],i=v([o,a]),s=i[0]-r,c=i[1]-e;u(s)>1e-6||u(c)>1e-6;)s=(i=v([o-=s,a-=c]))[0]-r,c=i[1]-e;return[o,a]}var y=Math.sin,b=Math.cos,x=Math.atan2,d=Math.sqrt,g=3e3*Math.PI/180;function _(t){var r=t[0]-.0065,e=t[1]-.006,n=d(r*r+e*e)-2e-5*y(e*g),o=x(e,r)-3e-6*b(r*g);return[n*b(o),n*y(o)]}function j(t){var r=t[0],e=t[1],n=d(r*r+e*e)+2e-5*y(e*g),o=x(e,r)+3e-6*b(r*g);return[n*b(o)+.0065,n*y(o)+.006]}var m=180/Math.PI,w=Math.PI/180,M=6378137,S=20037508.342789244;function O(t){return[t[0]*m/M,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/M)))*m]}function P(t){var r=Math.abs(t[0])<=180?t[0]:t[0]-360*(t[0]<0?-1:1),e=[M*r*w,M*Math.log(Math.tan(.25*Math.PI+.5*t[1]*w))];return e[0]>S&&(e[0]=S),e[0]<-S&&(e[0]=-S),e[1]>S&&(e[1]=S),e[1]<-S&&(e[1]=-S),e}var G,E,C,A,B,k,D=Math.abs,z=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],I=[75,60,45,30,15,0],F=[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],T=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]];function W(t,r,e){var n=D(r)/e[9],o=e[0]+e[1]*D(t),a=e[2]+e[3]*n+e[4]*Math.pow(n,2)+e[5]*Math.pow(n,3)+e[6]*Math.pow(n,4)+e[7]*Math.pow(n,5)+e[8]*Math.pow(n,6);return[o*=t<0?-1:1,a*=r<0?-1:1]}function N(t){for(var r=t[0],e=t[1],n=[],o=0;oI[o]){n=T[o];break}return W(r,e,n)}function L(t){for(var r=t[0],e=t[1],n=[],o=0;o=z[o]){n=F[o];break}return W(r,e,n)}function J(t,r){if(!t)throw new Error(r)}function $(t){return!!t&&"[object Array]"===Object.prototype.toString.call(t)}function q(t){return!isNaN(Number(t))&&null!==t&&!$(t)}function U(){for(var t=[],r=0;r=2,"Invalid input coordinate: "+t),J(q(t[0])&&q(t[1]),"Invalid input coordinate: "+t),t=t.map(Number),i=!0);var u=o;return i?u(t):(Z(t,(function(t){var r;r=u(t),t[0]=r[0],t[1]=r[1]})),t)}});const H=V},79960:(t,r,e)=>{var n=e(42542)(e(89570),"DataView");t.exports=n},11854:(t,r,e)=>{var n=e(74009),o=e(68576),a=e(15979),i=e(79274),u=e(16649);function s(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r{var n=e(96388),o=e(76235),a=e(69722),i=e(91371),u=e(86431);function s(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r{var n=e(42542)(e(89570),"Map");t.exports=n},41858:(t,r,e)=>{var n=e(57182),o=e(66224),a=e(20042),i=e(49111),u=e(87650);function s(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r{var n=e(42542)(e(89570),"Promise");t.exports=n},40973:(t,r,e)=>{var n=e(42542)(e(89570),"Set");t.exports=n},72475:(t,r,e)=>{var n=e(41858),o=e(26743),a=e(16862);function i(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new n;++r{var n=e(29710),o=e(38064),a=e(11712),i=e(74102),u=e(4085),s=e(28612);function c(t){var r=this.__data__=new n(t);this.size=r.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,t.exports=c},72328:(t,r,e)=>{var n=e(89570).Symbol;t.exports=n},8924:(t,r,e)=>{var n=e(89570).Uint8Array;t.exports=n},88036:(t,r,e)=>{var n=e(42542)(e(89570),"WeakMap");t.exports=n},31013:t=>{t.exports=function(t,r,e,n){for(var o=-1,a=null==t?0:t.length;++o{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length;++e{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length,o=0,a=[];++e{var n=e(67644),o=e(73171),a=e(78587),i=e(3970),u=e(54940),s=e(78031),c=Object.prototype.hasOwnProperty;t.exports=function(t,r){var e=a(t),f=!e&&o(t),p=!e&&!f&&i(t),l=!e&&!f&&!p&&s(t),v=e||f||p||l,h=v?n(t.length,String):[],y=h.length;for(var b in t)!r&&!c.call(t,b)||v&&("length"==b||p&&("offset"==b||"parent"==b)||l&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||u(b,y))||h.push(b);return h}},8067:t=>{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e{t.exports=function(t,r){for(var e=-1,n=r.length,o=t.length;++e{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length;++e{var n=e(41848);t.exports=function(t,r){for(var e=t.length;e--;)if(n(t[e][0],r))return e;return-1}},6669:(t,r,e)=>{var n=e(12641);t.exports=function(t,r,e,o){return n(t,(function(t,n,a){r(o,t,e(t),a)})),o}},12641:(t,r,e)=>{var n=e(66429),o=e(91213)(n);t.exports=o},89550:(t,r,e)=>{var n=e(15512)();t.exports=n},66429:(t,r,e)=>{var n=e(89550),o=e(65301);t.exports=function(t,r){return t&&n(t,r,o)}},39578:(t,r,e)=>{var n=e(65469),o=e(79813);t.exports=function(t,r){for(var e=0,a=(r=n(r,t)).length;null!=t&&e{var n=e(19596),o=e(78587);t.exports=function(t,r,e){var a=r(t);return o(t)?a:n(a,e(t))}},96320:(t,r,e)=>{var n=e(72328),o=e(4003),a=e(80607),i=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?o(t):a(t)}},84240:t=>{t.exports=function(t,r){return null!=t&&r in Object(t)}},99216:(t,r,e)=>{var n=e(96320),o=e(79501);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},20825:(t,r,e)=>{var n=e(36344),o=e(79501);t.exports=function t(r,e,a,i,u){return r===e||(null==r||null==e||!o(r)&&!o(e)?r!==r&&e!==e:n(r,e,a,i,t,u))}},36344:(t,r,e)=>{var n=e(91088),o=e(51809),a=e(25913),i=e(23141),u=e(14055),s=e(78587),c=e(3970),f=e(78031),p="[object Arguments]",l="[object Array]",v="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,r,e,y,b,x){var d=s(t),g=s(r),_=d?l:u(t),j=g?l:u(r),m=(_=_==p?v:_)==v,w=(j=j==p?v:j)==v,M=_==j;if(M&&c(t)){if(!c(r))return!1;d=!0,m=!1}if(M&&!m)return x||(x=new n),d||f(t)?o(t,r,e,y,b,x):a(t,r,_,e,y,b,x);if(!(1&e)){var S=m&&h.call(t,"__wrapped__"),O=w&&h.call(r,"__wrapped__");if(S||O){var P=S?t.value():t,G=O?r.value():r;return x||(x=new n),b(P,G,e,y,x)}}return!!M&&(x||(x=new n),i(t,r,e,y,b,x))}},49875:(t,r,e)=>{var n=e(91088),o=e(20825);t.exports=function(t,r,e,a){var i=e.length,u=i,s=!a;if(null==t)return!u;for(t=Object(t);i--;){var c=e[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i{var n=e(12262),o=e(5722),a=e(75091),i=e(16275),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,p=c.hasOwnProperty,l=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||o(t))&&(n(t)?l:u).test(i(t))}},26617:(t,r,e)=>{var n=e(96320),o=e(16790),a=e(79501),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&o(t.length)&&!!i[n(t)]}},25258:(t,r,e)=>{var n=e(88533),o=e(57011),a=e(82675),i=e(78587),u=e(49818);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?i(t)?o(t[0],t[1]):n(t):u(t)}},591:(t,r,e)=>{var n=e(24385),o=e(76856),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var r=[];for(var e in Object(t))a.call(t,e)&&"constructor"!=e&&r.push(e);return r}},88533:(t,r,e)=>{var n=e(49875),o=e(18005),a=e(49455);t.exports=function(t){var r=o(t);return 1==r.length&&r[0][2]?a(r[0][0],r[0][1]):function(e){return e===t||n(e,t,r)}}},57011:(t,r,e)=>{var n=e(20825),o=e(74720),a=e(22819),i=e(4640),u=e(31576),s=e(49455),c=e(79813);t.exports=function(t,r){return i(t)&&u(r)?s(c(t),r):function(e){var i=o(e,t);return void 0===i&&i===r?a(e,t):n(r,i,3)}}},70695:t=>{t.exports=function(t){return function(r){return null==r?void 0:r[t]}}},19854:(t,r,e)=>{var n=e(39578);t.exports=function(t){return function(r){return n(r,t)}}},67644:t=>{t.exports=function(t,r){for(var e=-1,n=Array(t);++e{var n=e(72328),o=e(8067),a=e(78587),i=e(84193),u=n?n.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(r){if("string"==typeof r)return r;if(a(r))return o(r,t)+"";if(i(r))return s?s.call(r):"";var e=r+"";return"0"==e&&1/r==-Infinity?"-0":e}},86113:t=>{t.exports=function(t){return function(r){return t(r)}}},16952:t=>{t.exports=function(t,r){return t.has(r)}},65469:(t,r,e)=>{var n=e(78587),o=e(4640),a=e(28803),i=e(38981);t.exports=function(t,r){return n(t)?t:o(t,r)?[t]:a(i(t))}},21894:(t,r,e)=>{var n=e(89570)["__core-js_shared__"];t.exports=n},63336:(t,r,e)=>{var n=e(31013),o=e(6669),a=e(25258),i=e(78587);t.exports=function(t,r){return function(e,u){var s=i(e)?n:o,c=r?r():{};return s(e,t,a(u,2),c)}}},91213:(t,r,e)=>{var n=e(99290);t.exports=function(t,r){return function(e,o){if(null==e)return e;if(!n(e))return t(e,o);for(var a=e.length,i=r?a:-1,u=Object(e);(r?i--:++i{t.exports=function(t){return function(r,e,n){for(var o=-1,a=Object(r),i=n(r),u=i.length;u--;){var s=i[t?u:++o];if(!1===e(a[s],s,a))break}return r}}},51809:(t,r,e)=>{var n=e(72475),o=e(31118),a=e(16952);t.exports=function(t,r,e,i,u,s){var c=1&e,f=t.length,p=r.length;if(f!=p&&!(c&&p>f))return!1;var l=s.get(t),v=s.get(r);if(l&&v)return l==r&&v==t;var h=-1,y=!0,b=2&e?new n:void 0;for(s.set(t,r),s.set(r,t);++h{var n=e(72328),o=e(8924),a=e(41848),i=e(51809),u=e(23606),s=e(30993),c=n?n.prototype:void 0,f=c?c.valueOf:void 0;t.exports=function(t,r,e,n,c,p,l){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!p(new o(t),new o(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var v=u;case"[object Set]":var h=1&n;if(v||(v=s),t.size!=r.size&&!h)return!1;var y=l.get(t);if(y)return y==r;n|=2,l.set(t,r);var b=i(v(t),v(r),n,c,p,l);return l.delete(t),b;case"[object Symbol]":if(f)return f.call(t)==f.call(r)}return!1}},23141:(t,r,e)=>{var n=e(71762),o=Object.prototype.hasOwnProperty;t.exports=function(t,r,e,a,i,u){var s=1&e,c=n(t),f=c.length;if(f!=n(r).length&&!s)return!1;for(var p=f;p--;){var l=c[p];if(!(s?l in r:o.call(r,l)))return!1}var v=u.get(t),h=u.get(r);if(v&&h)return v==r&&h==t;var y=!0;u.set(t,r),u.set(r,t);for(var b=s;++p{var n="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g;t.exports=n},71762:(t,r,e)=>{var n=e(87367),o=e(94330),a=e(65301);t.exports=function(t){return n(t,a,o)}},16547:(t,r,e)=>{var n=e(88831);t.exports=function(t,r){var e=t.__data__;return n(r)?e["string"==typeof r?"string":"hash"]:e.map}},18005:(t,r,e)=>{var n=e(31576),o=e(65301);t.exports=function(t){for(var r=o(t),e=r.length;e--;){var a=r[e],i=t[a];r[e]=[a,i,n(i)]}return r}},42542:(t,r,e)=>{var n=e(51560),o=e(6938);t.exports=function(t,r){var e=o(t,r);return n(e)?e:void 0}},4003:(t,r,e)=>{var n=e(72328),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var r=a.call(t,u),e=t[u];try{t[u]=void 0;var n=!0}catch(s){}var o=i.call(t);return n&&(r?t[u]=e:delete t[u]),o}},94330:(t,r,e)=>{var n=e(59032),o=e(89926),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,u=i?function(t){return null==t?[]:(t=Object(t),n(i(t),(function(r){return a.call(t,r)})))}:o;t.exports=u},14055:(t,r,e)=>{var n=e(79960),o=e(75785),a=e(12678),i=e(40973),u=e(88036),s=e(96320),c=e(16275),f="[object Map]",p="[object Promise]",l="[object Set]",v="[object WeakMap]",h="[object DataView]",y=c(n),b=c(o),x=c(a),d=c(i),g=c(u),_=s;(n&&_(new n(new ArrayBuffer(1)))!=h||o&&_(new o)!=f||a&&_(a.resolve())!=p||i&&_(new i)!=l||u&&_(new u)!=v)&&(_=function(t){var r=s(t),e="[object Object]"==r?t.constructor:void 0,n=e?c(e):"";if(n)switch(n){case y:return h;case b:return f;case x:return p;case d:return l;case g:return v}return r}),t.exports=_},6938:t=>{t.exports=function(t,r){return null==t?void 0:t[r]}},14198:(t,r,e)=>{var n=e(65469),o=e(73171),a=e(78587),i=e(54940),u=e(16790),s=e(79813);t.exports=function(t,r,e){for(var c=-1,f=(r=n(r,t)).length,p=!1;++c{var n=e(13971);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},68576:t=>{t.exports=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}},15979:(t,r,e)=>{var n=e(13971),o=Object.prototype.hasOwnProperty;t.exports=function(t){var r=this.__data__;if(n){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return o.call(r,t)?r[t]:void 0}},79274:(t,r,e)=>{var n=e(13971),o=Object.prototype.hasOwnProperty;t.exports=function(t){var r=this.__data__;return n?void 0!==r[t]:o.call(r,t)}},16649:(t,r,e)=>{var n=e(13971);t.exports=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=n&&void 0===r?"__lodash_hash_undefined__":r,this}},54940:t=>{var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t{var n=e(78587),o=e(84193),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;t.exports=function(t,r){if(n(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!o(t))||(i.test(t)||!a.test(t)||null!=r&&t in Object(r))}},88831:t=>{t.exports=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}},5722:(t,r,e)=>{var n=e(21894),o=function(){var t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!o&&o in t}},24385:t=>{var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},31576:(t,r,e)=>{var n=e(75091);t.exports=function(t){return t===t&&!n(t)}},96388:t=>{t.exports=function(){this.__data__=[],this.size=0}},76235:(t,r,e)=>{var n=e(76370),o=Array.prototype.splice;t.exports=function(t){var r=this.__data__,e=n(r,t);return!(e<0)&&(e==r.length-1?r.pop():o.call(r,e,1),--this.size,!0)}},69722:(t,r,e)=>{var n=e(76370);t.exports=function(t){var r=this.__data__,e=n(r,t);return e<0?void 0:r[e][1]}},91371:(t,r,e)=>{var n=e(76370);t.exports=function(t){return n(this.__data__,t)>-1}},86431:(t,r,e)=>{var n=e(76370);t.exports=function(t,r){var e=this.__data__,o=n(e,t);return o<0?(++this.size,e.push([t,r])):e[o][1]=r,this}},57182:(t,r,e)=>{var n=e(11854),o=e(29710),a=e(75785);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},66224:(t,r,e)=>{var n=e(16547);t.exports=function(t){var r=n(this,t).delete(t);return this.size-=r?1:0,r}},20042:(t,r,e)=>{var n=e(16547);t.exports=function(t){return n(this,t).get(t)}},49111:(t,r,e)=>{var n=e(16547);t.exports=function(t){return n(this,t).has(t)}},87650:(t,r,e)=>{var n=e(16547);t.exports=function(t,r){var e=n(this,t),o=e.size;return e.set(t,r),this.size+=e.size==o?0:1,this}},23606:t=>{t.exports=function(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}},49455:t=>{t.exports=function(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}}},31901:(t,r,e)=>{var n=e(36827);t.exports=function(t){var r=n(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}},13971:(t,r,e)=>{var n=e(42542)(Object,"create");t.exports=n},76856:(t,r,e)=>{var n=e(97392)(Object.keys,Object);t.exports=n},26426:(t,r,e)=>{t=e.nmd(t);var n=e(44343),o=r&&!r.nodeType&&r,a=o&&t&&!t.nodeType&&t,i=a&&a.exports===o&&n.process,u=function(){try{var t=a&&a.require&&a.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(r){}}();t.exports=u},80607:t=>{var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},97392:t=>{t.exports=function(t,r){return function(e){return t(r(e))}}},89570:(t,r,e)=>{var n=e(44343),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();t.exports=a},26743:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},16862:t=>{t.exports=function(t){return this.__data__.has(t)}},30993:t=>{t.exports=function(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}},38064:(t,r,e)=>{var n=e(29710);t.exports=function(){this.__data__=new n,this.size=0}},11712:t=>{t.exports=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}},74102:t=>{t.exports=function(t){return this.__data__.get(t)}},4085:t=>{t.exports=function(t){return this.__data__.has(t)}},28612:(t,r,e)=>{var n=e(29710),o=e(75785),a=e(41858);t.exports=function(t,r){var e=this.__data__;if(e instanceof n){var i=e.__data__;if(!o||i.length<199)return i.push([t,r]),this.size=++e.size,this;e=this.__data__=new a(i)}return e.set(t,r),this.size=e.size,this}},28803:(t,r,e)=>{var n=e(31901),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=n((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(o,(function(t,e,n,o){r.push(n?o.replace(a,"$1"):e||t)})),r}));t.exports=i},79813:(t,r,e)=>{var n=e(84193);t.exports=function(t){if("string"==typeof t||n(t))return t;var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},16275:t=>{var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},41848:t=>{t.exports=function(t,r){return t===r||t!==t&&r!==r}},22819:(t,r,e)=>{var n=e(84240),o=e(14198);t.exports=function(t,r){return null!=t&&o(t,r,n)}},82675:t=>{t.exports=function(t){return t}},73171:(t,r,e)=>{var n=e(99216),o=e(79501),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},99290:(t,r,e)=>{var n=e(12262),o=e(16790);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},3970:(t,r,e)=>{t=e.nmd(t);var n=e(89570),o=e(82848),a=r&&!r.nodeType&&r,i=a&&t&&!t.nodeType&&t,u=i&&i.exports===a?n.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;t.exports=s},12262:(t,r,e)=>{var n=e(96320),o=e(75091);t.exports=function(t){if(!o(t))return!1;var r=n(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},16790:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},79501:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},84193:(t,r,e)=>{var n=e(96320),o=e(79501);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},78031:(t,r,e)=>{var n=e(26617),o=e(86113),a=e(26426),i=a&&a.isTypedArray,u=i?o(i):n;t.exports=u},65301:(t,r,e)=>{var n=e(44318),o=e(591),a=e(99290);t.exports=function(t){return a(t)?n(t):o(t)}},36827:(t,r,e)=>{var n=e(41858);function o(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,o=r?r.apply(this,n):n[0],a=e.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return e.cache=a.set(o,i)||a,i};return e.cache=new(o.Cache||n),e}o.Cache=n,t.exports=o},49818:(t,r,e)=>{var n=e(70695),o=e(19854),a=e(4640),i=e(79813);t.exports=function(t){return a(t)?n(i(t)):o(t)}},89926:t=>{t.exports=function(){return[]}},82848:t=>{t.exports=function(){return!1}},16110:(t,r,e)=>{var n=e(28947).default;t.exports=function(t,r){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,r||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},99654:(t,r,e)=>{var n=e(28947).default,o=e(16110);t.exports=function(t){var r=o(t,"string");return"symbol"==n(r)?r:r+""},t.exports.__esModule=!0,t.exports.default=t.exports},28947:t=>{function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},56875:(t,r,e)=>{"use strict";function n(t){var r={type:"Feature"};return Object.keys(t).forEach((function(e){switch(e){case"type":case"properties":case"geometry":return;default:r[e]=t[e]}})),r.properties=o(t.properties),r.geometry=a(t.geometry),r}function o(t){var r={};return t?(Object.keys(t).forEach((function(e){var n=t[e];"object"===typeof n?null===n?r[e]=null:Array.isArray(n)?r[e]=n.map((function(t){return t})):r[e]=o(n):r[e]=n})),r):r}function a(t){var r={type:t.type};return t.bbox&&(r.bbox=t.bbox),"GeometryCollection"===t.type?(r.geometries=t.geometries.map((function(t){return a(t)})),r):(r.coordinates=i(t.coordinates),r)}function i(t){var r=t;return"object"!==typeof r[0]?r.slice():r.map((function(t){return i(t)}))}e.d(r,{Z:()=>u});const u=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return n(t);case"FeatureCollection":return function(t){var r={type:"FeatureCollection"};return Object.keys(t).forEach((function(e){switch(e){case"type":case"features":return;default:r[e]=t[e]}})),r.features=t.features.map((function(t){return n(t)})),r}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return a(t);default:throw new Error("unknown GeoJSON type")}}},67045:(t,r,e)=>{"use strict";e.d(r,{Z:()=>i});var n=e(22787),o=e(40517),a=e(48024);const i=function(t,r){var e=[];return(0,a.By)(t,(function(t){var i=!1;if("Point"===t.geometry.type)(0,a.on)(r,(function(r){(0,n.Z)(t,r)&&(i=!0)})),i&&e.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var u=[];(0,a.on)(r,(function(r){(0,a.pZ)(t,(function(t){(0,n.Z)(t,r)&&(i=!0,u.push(t))}))})),i&&e.push((0,o.ot)(u))}})),(0,o.uf)(e)}},25945:(t,r,e)=>{"use strict";function n(t,r){return null==t||null==r?NaN:tr?1:t>=r?0:NaN}e.d(r,{Z:()=>n})}}]); \ No newline at end of file diff --git a/static/js/83.bbede6e0.chunk.js b/dist/static/js/83.bbede6e0.chunk.js similarity index 100% rename from static/js/83.bbede6e0.chunk.js rename to dist/static/js/83.bbede6e0.chunk.js diff --git a/static/js/907.c31a2ea6.chunk.js b/dist/static/js/907.c31a2ea6.chunk.js similarity index 100% rename from static/js/907.c31a2ea6.chunk.js rename to dist/static/js/907.c31a2ea6.chunk.js diff --git a/dist/static/js/938.eb4a23de.js b/dist/static/js/938.eb4a23de.js new file mode 100644 index 0000000..b96b7a7 --- /dev/null +++ b/dist/static/js/938.eb4a23de.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[938],{70363:function(e){"use strict";e.exports=function(){function e(e){var r=[];return e.AMapUI&&r.push(t(e.AMapUI)),e.Loca&&r.push(n(e.Loca)),Promise.all(r)}function t(e){return new Promise((function(t,n){var i=[];if(e.plugins)for(var l=0;l{e.exports={}},62810:(e,t,n)=>{"use strict";n.d(t,{iN:()=>x,R_:()=>v,EV:()=>w,ez:()=>y});var r=n(76471),i=n(18948),o=2,a=.16,s=.05,l=.05,c=.15,u=5,d=4,h=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function f(e){var t=e.r,n=e.g,i=e.b,o=(0,r.py)(t,n,i);return{h:360*o.h,s:o.s,v:o.v}}function p(e){var t=e.r,n=e.g,i=e.b;return"#".concat((0,r.vq)(t,n,i,!1))}function g(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function m(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-a*t:t===d?e.s+a:e.s+s*t)>1&&(r=1),n&&t===u&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function A(e,t,n){var r;return(r=n?e.v+l*t:e.v-c*t)>1&&(r=1),Number(r.toFixed(2))}function v(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,i.uA)(e),o=u;o>0;o-=1){var a=f(r),s=p((0,i.uA)({h:g(a,o,!0),s:m(a,o,!0),v:A(a,o,!0)}));n.push(s)}n.push(p(r));for(var l=1;l<=d;l+=1){var c=f(r),v=p((0,i.uA)({h:g(c,l),s:m(c,l),v:A(c,l)}));n.push(v)}return"dark"===t.theme?h.map((function(e){var r=e.index,o=e.opacity;return p(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}((0,i.uA)(t.backgroundColor||"#141414"),(0,i.uA)(n[r]),100*o))})):n}var y={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},b={},_={};Object.keys(y).forEach((function(e){b[e]=v(y[e]),b[e].primary=b[e][5],_[e]=v(y[e],{theme:"dark",backgroundColor:"#141414"}),_[e].primary=_[e][5]}));b.red,b.volcano;var w=b.gold,x=(b.orange,b.yellow,b.lime,b.green,b.cyan,b.blue);b.geekblue,b.purple,b.magenta,b.grey,b.grey},16831:(e,t,n)=>{"use strict";n.d(t,{E4:()=>st,jG:()=>M,ks:()=>j,bf:()=>N,CI:()=>ot,fp:()=>ee,xy:()=>rt});var r=n(68185),i=n(13747),o=n(22368),a=n(35194);const s=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};var l=n(86263),c=n(57435),u=n.t(c,2),d=(n(22121),n(46032),n(66375)),h=n(1959),f="%";function p(e){return e.join(f)}const g=function(){function e(t){(0,d.Z)(this,e),(0,r.Z)(this,"instanceId",void 0),(0,r.Z)(this,"cache",new Map),this.instanceId=t}return(0,h.Z)(e,[{key:"get",value:function(e){return this.opGet(p(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(p(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var m="data-token-hash",A="data-css-hash",v="__cssinjs_instance__";function y(){var e=Math.random().toString(12).slice(2);if("undefined"!==typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(A,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[v]=t[v]||e,t[v]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(A,"]"))).forEach((function(t){var n,i=t.getAttribute(A);r[i]?t[v]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0}))}return new g(e)}var b=c.createContext({hashPriority:"low",cache:y(),defaultCache:!0});const _=b;var w=n(69223),x=n(20749);var E=function(){function e(){(0,d.Z)(this,e),(0,r.Z)(this,"cache",void 0),(0,r.Z)(this,"keys",void 0),(0,r.Z)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,h.Z)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach((function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0})),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce((function(e,t){var n=(0,i.Z)(e,2)[1];return r.internalGet(t)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),C+=1}return(0,h.Z)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),T=new E;function M(e){var t=Array.isArray(e)?e:[e];return T.has(t)||T.set(t,new P(t)),T.get(t)}var k=new WeakMap,R={};var O=new WeakMap;function I(e){var t=O.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof P?t+=r.id:r&&"object"===(0,w.Z)(r)?t+=I(r):t+=r})),O.set(e,t)),t}function L(e,t){return s("".concat(t,"_").concat(I(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var D=(0,x.Z)();function N(e){return"number"===typeof e?"".concat(e,"px"):e}function F(e,t,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var s=(0,a.Z)((0,a.Z)({},o),{},(i={},(0,r.Z)(i,m,t),(0,r.Z)(i,A,n),i)),l=Object.keys(s).map((function(e){var t=s[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"")}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},B=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!==n&&void 0!==n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},z=function(e,t,n){var r={},o={};return Object.entries(e).forEach((function(e){var t,a,s=(0,i.Z)(e,2),l=s[0],c=s[1];if(null!==n&&void 0!==n&&null!==(t=n.preserve)&&void 0!==t&&t[l])o[l]=c;else if(("string"===typeof c||"number"===typeof c)&&(null===n||void 0===n||null===(a=n.ignore)||void 0===a||!a[l])){var u,d=j(l,null===n||void 0===n?void 0:n.prefix);r[d]="number"!==typeof c||null!==n&&void 0!==n&&null!==(u=n.unitless)&&void 0!==u&&u[l]?String(c):"".concat(c,"px"),o[l]="var(".concat(d,")")}})),[o,B(r,t,{scope:null===n||void 0===n?void 0:n.scope})]},Z=n(12750),U=(0,a.Z)({},u).useInsertionEffect;const H=U?function(e,t,n){return U((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,Z.Z)((function(){return t(!0)}),n)};const V="undefined"!==typeof(0,a.Z)({},u).useInsertionEffect?function(e){var t=[],n=!1;return c.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}};const G=function(){return!1};function W(e,t,n,r,a){var s=c.useContext(_).cache,l=p([e].concat((0,o.Z)(t))),u=V([l]),d=(G(),function(e){s.opUpdate(l,(function(t){var r=t||[void 0,void 0],o=(0,i.Z)(r,2),a=o[0];var s=[void 0===a?0:a,o[1]||n()];return e?e(s):s}))});c.useMemo((function(){d()}),[l]);var h=s.opGet(l)[1];return H((function(){null===a||void 0===a||a(h)}),(function(e){return d((function(t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];return e&&0===r&&(null===a||void 0===a||a(h)),[r+1,o]})),function(){s.opUpdate(l,(function(t){var n=t||[],o=(0,i.Z)(n,2),a=o[0],c=void 0===a?0:a,d=o[1];return 0===c-1?(u((function(){!e&&s.opGet(l)||null===r||void 0===r||r(d,!1)})),null):[c-1,d]}))}}),[l]),h}var q={},Y="css",X=new Map;var K=0;function Q(e,t){X.set(e,(X.get(e)||0)-1);var n=Array.from(X.keys()),r=n.filter((function(e){return(X.get(e)||0)<=0}));n.length-r.length>K&&r.forEach((function(e){!function(e,t){"undefined"!==typeof document&&document.querySelectorAll("style[".concat(m,'="').concat(e,'"]')).forEach((function(e){var n;e[v]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),X.delete(e)}))}var $=function(e,t,n,r){var i=n.getDerivativeToken(e),o=(0,a.Z)((0,a.Z)({},i),t);return r&&(o=r(o)),o},J="token";function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,c.useContext)(_),u=r.cache.instanceId,d=r.container,h=n.salt,f=void 0===h?"":h,p=n.override,g=void 0===p?q:p,y=n.formatToken,b=n.getComputedToken,w=n.cssVar,x=function(e,t){for(var n=k,r=0;r0?pe(Se,--xe):0,_e--,10===Ee&&(_e=1,be--),Ee}function Te(){return Ee=xe2||Oe(Ee)>3?"":" "}function Fe(e,t){for(;--t&&Te()&&!(Ee<48||Ee>102||Ee>57&&Ee<65||Ee>70&&Ee<97););return Re(e,ke()+(t<6&&32==Me()&&32==Te()))}function je(e){for(;Te();)switch(Ee){case e:return xe;case 34:case 39:34!==e&&39!==e&&je(Ee);break;case 40:41===e&&je(e);break;case 92:Te()}return xe}function Be(e,t){for(;Te()&&e+Ee!==57&&(e+Ee!==84||47!==Me()););return"/*"+Re(t,xe-1)+"*"+ue(47===e?e:Te())}function ze(e){for(;!Oe(Me());)Te();return Re(e,xe)}function Ze(e){return Le(Ue("",null,null,null,[""],e=Ie(e),0,[0],e))}function Ue(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,h=0,f=0,p=0,g=1,m=1,A=1,v=0,y="",b=i,_=o,w=r,x=y;m;)switch(p=v,v=Te()){case 40:if(108!=p&&58==pe(x,d-1)){-1!=fe(x+=he(De(v),"&","&\f"),"&\f")&&(A=-1);break}case 34:case 39:case 91:x+=De(v);break;case 9:case 10:case 13:case 32:x+=Ne(p);break;case 92:x+=Fe(ke()-1,7);continue;case 47:switch(Me()){case 42:case 47:Ae(Ve(Be(Te(),ke()),t,n,l),l);break;default:x+="/"}break;case 123*g:s[c++]=me(x)*A;case 125*g:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+u:-1==A&&(x=he(x,/\f/g,"")),f>0&&me(x)-d&&Ae(f>32?Ge(x+";",r,n,d-1,l):Ge(he(x," ","")+";",r,n,d-2,l),l);break;case 59:x+=";";default:if(Ae(w=He(x,t,n,c,u,i,s,y,b=[],_=[],d,o),o),123===v)if(0===u)Ue(x,t,w,w,b,o,d,s,_);else switch(99===h&&110===pe(x,3)?100:h){case 100:case 108:case 109:case 115:Ue(e,w,w,r&&Ae(He(e,w,w,0,0,i,s,y,i,b=[],d,_),_),i,_,d,s,r?b:_);break;default:Ue(x,w,w,w,[""],_,0,s,_)}}c=u=f=0,g=A=1,y=x="",d=a;break;case 58:d=1+me(x),f=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==Pe())continue;switch(x+=ue(v),v*g){case 38:A=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(me(x)-1)*A,A=1;break;case 64:45===Me()&&(x+=De(Te())),h=Me(),u=d=me(y=x+=ze(ke())),v++;break;case 45:45===p&&2==me(x)&&(g=0)}}return o}function He(e,t,n,r,i,o,a,s,l,c,u,d){for(var h=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,A=0;g0?f[v]+" "+y:he(y,/&\f/g,f[v])))&&(l[A++]=b);return Ce(e,t,n,0===i?ie:s,l,c,u,d)}function Ve(e,t,n,r){return Ce(e,t,n,re,ue(Ee),ge(e,2,-2),0,r)}function Ge(e,t,n,r,i){return Ce(e,t,n,oe,ge(e,0,r),ge(e,r+1,-1),r,i)}var We,qe="data-ant-cssinjs-cache-path",Ye="_FILE_STYLE__";var Xe=!0;function Ke(e){return function(){if(!We&&(We={},(0,x.Z)())){var e=document.createElement("div");e.className=qe,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=e.split(":"),n=(0,i.Z)(t,2),r=n[0],o=n[1];We[r]=o}));var n,r=document.querySelector("style[".concat(qe,"]"));r&&(Xe=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!We[e]}var Qe="_multi_value_";function $e(e){return ve(Ze(e),ye).replace(/\{%%%\:[^;];}/g,";")}var Je=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},s=r.root,l=r.injectHash,c=r.parentSelectors,u=n.hashId,d=n.layer,h=(n.path,n.hashPriority),f=n.transformers,p=void 0===f?[]:f,g=(n.linters,""),m={};function A(t){var r=t.getName(u);if(!m[r]){var o=e(t.style,n,{root:!1,parentSelectors:c}),a=(0,i.Z)(o,1)[0];m[r]="@keyframes ".concat(t.getName(u)).concat(a)}}var v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return v.forEach((function(t){var r="string"!==typeof t||s?t:{};if("string"===typeof r)g+="".concat(r,"\n");else if(r._keyframe)A(r);else{var d=p.reduce((function(e,t){var n;return(null===t||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(d).forEach((function(t){var r=d[t];if("object"!==(0,w.Z)(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===(0,w.Z)(e)&&e&&("_skip_check_"in e||Qe in e)}(r)){var f;function C(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;ne[e]||"number"!==typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!==t&&void 0!==t&&t._keyframe&&(A(t),r=t.getName(u)),g+="".concat(n,":").concat(r,";")}var p=null!==(f=null===r||void 0===r?void 0:r.value)&&void 0!==f?f:r;"object"===(0,w.Z)(r)&&null!==r&&void 0!==r&&r[Qe]&&Array.isArray(p)?p.forEach((function(e){C(t,e)})):C(t,p)}else{var v=!1,y=t.trim(),b=!1;(s||l)&&u?y.startsWith("@")?v=!0:y=function(e,t,n){if(!t)return e;var r=".".concat(t),i="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",a=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(a).concat(i).concat(r.slice(a.length))].concat((0,o.Z)(n.slice(1))).join(" ")})).join(",")}(t,u,h):!s||u||"&"!==y&&""!==y||(y="",b=!0);var _=e(r,n,{root:b,injectHash:v,parentSelectors:[].concat((0,o.Z)(c),[y])}),x=(0,i.Z)(_,2),E=x[0],S=x[1];m=(0,a.Z)((0,a.Z)({},m),S),g+="".concat(y).concat(E)}}))}})),s?d&&(g="@layer ".concat(d.name," {").concat(g,"}"),d.dependencies&&(m["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):g="{".concat(g,"}"),[g,m]};function et(e,t){return s("".concat(e.join("%")).concat(t))}function tt(){return null}var nt="style";function rt(e,t){var n=e.token,s=e.path,u=e.hashId,d=e.layer,h=e.nonce,f=e.clientOnly,p=e.order,g=void 0===p?0:p,y=c.useContext(_),b=y.autoClear,w=(y.mock,y.defaultCache),E=y.hashPriority,S=y.container,C=y.ssrInline,P=y.transformers,T=y.linters,M=y.cache,k=y.layer,R=n._tokenKey,O=[R];k&&O.push("layer"),O.push.apply(O,(0,o.Z)(s));var I=D;var L=W(nt,O,(function(){var e=O.join("|");if(Ke(e)){var n=function(e){var t=We[e],n=null;if(t&&(0,x.Z)())if(Xe)n=Ye;else{var r=document.querySelector("style[".concat(A,'="').concat(We[e],'"]'));r?n=r.innerHTML:delete We[e]}return[n,t]}(e),r=(0,i.Z)(n,2),o=r[0],a=r[1];if(o)return[o,R,a,{},f,g]}var l=t(),c=Je(l,{hashId:u,hashPriority:E,layer:k?d:void 0,path:s.join("-"),transformers:P,linters:T}),h=(0,i.Z)(c,2),p=h[0],m=h[1],v=$e(p),y=et(O,v);return[v,R,y,m,f,g]}),(function(e,t){var n=(0,i.Z)(e,3)[2];(t||b)&&D&&(0,l.jL)(n,{mark:A})}),(function(e){var t=(0,i.Z)(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(I&&n!==Ye){var s={mark:A,prepend:!k&&"queue",attachTo:S,priority:g},c="function"===typeof h?h():h;c&&(s.csp={nonce:c});var u=[],d=[];Object.keys(o).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.hq)($e(o[e]),"_layer-".concat(e),(0,a.Z)((0,a.Z)({},s),{},{prepend:!0}))}));var f=(0,l.hq)(n,r,s);f[v]=M.instanceId,f.setAttribute(m,R),d.forEach((function(e){(0,l.hq)($e(o[e]),"_effect-".concat(e),s)}))}})),N=(0,i.Z)(L,3),F=N[0],j=N[1],B=N[2];return function(e){var t,n;C&&!I&&w?t=c.createElement("style",(0,te.Z)({},(n={},(0,r.Z)(n,m,j),(0,r.Z)(n,A,B),n),{dangerouslySetInnerHTML:{__html:F}})):t=c.createElement(tt,null);return c.createElement(c.Fragment,null,t,e)}}var it="cssVar";const ot=function(e,t){var n=e.key,r=e.prefix,a=e.unitless,s=e.ignore,u=e.token,d=e.scope,h=void 0===d?"":d,f=(0,c.useContext)(_),p=f.cache.instanceId,g=f.container,y=u._tokenKey,b=[].concat((0,o.Z)(e.path),[n,h,y]);return W(it,b,(function(){var e=t(),o=z(e,n,{prefix:r,unitless:a,ignore:s,scope:h}),l=(0,i.Z)(o,2),c=l[0],u=l[1];return[c,u,et(b,u),n]}),(function(e){var t=(0,i.Z)(e,3)[2];D&&(0,l.jL)(t,{mark:A})}),(function(e){var t=(0,i.Z)(e,3),r=t[1],o=t[2];if(r){var a=(0,l.hq)(r,o,{mark:A,prepend:"queue",attachTo:g,priority:-999});a[v]=p,a.setAttribute(m,n)}}))};var at;at={},(0,r.Z)(at,nt,(function(e,t,n){var r=(0,i.Z)(e,6),o=r[0],a=r[1],s=r[2],l=r[3],c=r[4],u=r[5],d=(n||{}).plain;if(c)return null;var h=o,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=F(o,a,s,f,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=F($e(l[e]),a,"_effect-".concat(e),f,d);e.startsWith("@layer")?h=n+h:h+=n}})),[u,s,h]})),(0,r.Z)(at,J,(function(e,t,n){var r=(0,i.Z)(e,5),o=r[2],a=r[3],s=r[4],l=(n||{}).plain;if(!a)return null;var c=o._tokenKey;return[-999,c,F(a,s,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),(0,r.Z)(at,it,(function(e,t,n){var r=(0,i.Z)(e,4),o=r[1],a=r[2],s=r[3],l=(n||{}).plain;if(!o)return null;return[-999,a,F(o,s,a,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]}));const st=function(){function e(t,n){(0,d.Z)(this,e),(0,r.Z)(this,"name",void 0),(0,r.Z)(this,"style",void 0),(0,r.Z)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,h.Z)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function lt(e){return e.notSplit=!0,e}lt(["borderTop","borderBottom"]),lt(["borderTop"]),lt(["borderBottom"]),lt(["borderLeft","borderRight"]),lt(["borderLeft"]),lt(["borderRight"])},2567:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(91010),i=n(13747),o=n(68185),a=n(99309),s=n(57435),l=n(12356),c=n.n(l),u=n(62810),d=n(92255),h=n(35194),f=n(69223),p=n(86263),g=n(13834),m=n(98162);function A(e){return"object"===(0,f.Z)(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===(0,f.Z)(e.icon)||"function"===typeof e.icon)}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,i=e[n];if("class"===n)t.className=i,delete t.class;else delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i;return t}),{})}function y(e,t,n){return n?s.createElement(e.tag,(0,h.Z)((0,h.Z)({key:t},v(e.attrs)),n),(e.children||[]).map((function(n,r){return y(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):s.createElement(e.tag,(0,h.Z)({key:t},v(e.attrs)),(e.children||[]).map((function(n,r){return y(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function b(e){return(0,u.R_)(e)[0]}function _(e){return e?Array.isArray(e)?e:[e]:[]}var w=["icon","className","onClick","style","primaryColor","secondaryColor"],x={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var E=function(e){var t,n,r=e.icon,i=e.className,o=e.onClick,l=e.style,c=e.primaryColor,u=e.secondaryColor,f=(0,a.Z)(e,w),v=s.useRef(),_=x;if(c&&(_={primaryColor:c,secondaryColor:u||b(c)}),function(e){var t=(0,s.useContext)(d.Z),n=t.csp,r=t.prefixCls,i="\n.anticon {\n display: inline-flex;\n alignItems: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(i=i.replace(/anticon/g,r)),(0,s.useEffect)((function(){var t=e.current,r=(0,g.A)(t);(0,p.hq)(i,"@ant-design-icons",{prepend:!0,csp:n,attachTo:r})}),[])}(v),t=A(r),n="icon should be icon definiton, but got ".concat(r),(0,m.ZP)(t,"[@ant-design/icons] ".concat(n)),!A(r))return null;var E=r;return E&&"function"===typeof E.icon&&(E=(0,h.Z)((0,h.Z)({},E),{},{icon:E.icon(_.primaryColor,_.secondaryColor)})),y(E.icon,"svg-".concat(E.name),(0,h.Z)((0,h.Z)({className:i,onClick:o,style:l,"data-icon":E.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:v}))};E.displayName="IconReact",E.getTwoToneColors=function(){return(0,h.Z)({},x)},E.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;x.primaryColor=t,x.secondaryColor=n||b(t),x.calculated=!!n};const S=E;function C(e){var t=_(e),n=(0,i.Z)(t,2),r=n[0],o=n[1];return S.setTwoToneColors({primaryColor:r,secondaryColor:o})}var P=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];C(u.iN.primary);var T=s.forwardRef((function(e,t){var n=e.className,l=e.icon,u=e.spin,h=e.rotate,f=e.tabIndex,p=e.onClick,g=e.twoToneColor,m=(0,a.Z)(e,P),A=s.useContext(d.Z),v=A.prefixCls,y=void 0===v?"anticon":v,b=A.rootClassName,w=c()(b,y,(0,o.Z)((0,o.Z)({},"".concat(y,"-").concat(l.name),!!l.name),"".concat(y,"-spin"),!!u||"loading"===l.name),n),x=f;void 0===x&&p&&(x=-1);var E=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,C=_(g),T=(0,i.Z)(C,2),M=T[0],k=T[1];return s.createElement("span",(0,r.Z)({role:"img","aria-label":l.name},m,{ref:t,tabIndex:x,onClick:p,className:w}),s.createElement(S,{icon:l,primaryColor:M,secondaryColor:k,style:E}))}));T.displayName="AntdIcon",T.getTwoToneColor=function(){var e=S.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},T.setTwoToneColor=C;const M=T},92255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(57435).createContext)({})},55201:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},49527:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},15215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},16094:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},83480:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},94574:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},8662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},55159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},33049:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},88966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},1625:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},51701:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},46779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},73558:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},6069:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},25065:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},72557:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},90918:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},84415:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},37215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},91434:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},90304:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},81774:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},10786:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},85268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},66746:(e,t,n)=>{"use strict";n.d(t,{Z:()=>oe});var r=n(91010),i=n(35194),o=n(66375),a=n(1959),s=n(4041),l=n(22935),c=n(72693),u=n(64648),d=n(68185),h=n(57435),f=n(69223),p=n(99309);const g={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};var m=n(38078),A=n(12356),v=n.n(A);const y={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return h.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return h.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0,asNavFor:null};function b(e,t,n){return Math.max(t,Math.min(e,n))}var _=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()},w=function(e){for(var t=[],n=x(e),r=E(e),i=n;i0?1:0):0},C=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},P=function(e){return e&&e.offsetWidth||0},T=function(e){return e&&e.offsetHeight||0},M=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),(i=Math.round(180*r/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===o?i>=35&&i<=135?"up":"down":"vertical"},k=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},R=function(e,t){var n={};return t.forEach((function(t){return n[t]=e[t]})),n},O=function(e,t){var n=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?-1*e.slidesToShow:0,r=e.infinite?-1*e.slidesToShow:0,i=[];nn[n.length-1])t=n[n.length-1];else for(var i in n){if(t-1*e.swipeLeft)return n=r,!1}else if(r.offsetLeft-t+P(r)/2>-1*e.swipeLeft)return n=r,!1;return!0})),!n)return 0;var o=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-o)||1}return e.slidesToScroll},L=function(e,t){return t.reduce((function(t,n){return t&&e.hasOwnProperty(n)}),!0)?null:console.error("Keys Missing:",e)},D=function(e){var t,n;(L(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]),e.vertical)?n=(e.unslick?e.slideCount:e.slideCount+2*e.slidesToShow)*e.slideHeight:t=z(e)*e.slideWidth;var r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var o=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",s=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=(0,i.Z)((0,i.Z)({},r),{},{WebkitTransform:o,transform:a,msTransform:s})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t),n&&(r.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},N=function(e){L(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=D(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},F=function(e){if(e.unslick)return 0;L(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,o=e.infinite,a=e.centerMode,s=e.slideCount,l=e.slidesToShow,c=e.slidesToScroll,u=e.slideWidth,d=e.listWidth,h=e.variableWidth,f=e.slideHeight,p=e.fade,g=e.vertical;if(p||1===e.slideCount)return 0;var m=0;if(o?(m=-j(e),s%c!==0&&r+c>s&&(m=-(r>s?l-(r-s):s%c)),a&&(m+=parseInt(l/2))):(s%c!==0&&r+c>s&&(m=l-s%c),a&&(m=parseInt(l/2))),t=g?r*f*-1+m*f:r*u*-1+m*u,!0===h){var A,v=i&&i.node;if(A=r+j(e),t=(n=v&&v.childNodes[A])?-1*n.offsetLeft:0,!0===a){A=o?r+j(e):r,n=v&&v.children[A],t=0;for(var y=0;ye.currentSlide?e.targetSlide>e.currentSlide+U(e)?"left":"right":e.targetSlide0&&(o+=1),r&&t%2===0&&(o+=1),o}return r?0:t-1},H=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r||t%2!==0||(o+=1),o}return r?t-1:0},V=function(){return!("undefined"===typeof window||!window.document||!window.document.createElement)},G=Object.keys(y);var W=function(e){var t,n,r,i,o;return r=(o=e.rtl?e.slideCount-1-e.index:e.index)<0||o>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(o-e.currentSlide)%e.slideCount===0,o>e.currentSlide-i-1&&o<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=o&&o=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},q=function(e,t){return e.key+"-"+t},Y=function(e){var t,n=[],r=[],o=[],a=h.Children.count(e.children),s=x(e),l=E(e);return h.Children.forEach(e.children,(function(c,u){var d,f={message:"children",index:u,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};d=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(u)>=0?c:h.createElement("div",null);var p=function(e){var t={};return void 0!==e.variableWidth&&!1!==e.variableWidth||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical&&e.slideHeight?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,t.zIndex=e.currentSlide===e.index?999:998,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t}((0,i.Z)((0,i.Z)({},e),{},{index:u})),g=d.props.className||"",m=W((0,i.Z)((0,i.Z)({},e),{},{index:u}));if(n.push(h.cloneElement(d,{key:"original"+q(d,u),"data-index":u,className:v()(m,g),tabIndex:"-1","aria-hidden":!m["slick-active"],style:(0,i.Z)((0,i.Z)({outline:"none"},d.props.style||{}),p),onClick:function(t){d.props&&d.props.onClick&&d.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(f)}})),e.infinite&&a>1&&!1===e.fade&&!e.unslick){var A=a-u;A<=j(e)&&((t=-A)>=s&&(d=c),m=W((0,i.Z)((0,i.Z)({},e),{},{index:t})),r.push(h.cloneElement(d,{key:"precloned"+q(d,t),"data-index":t,tabIndex:"-1",className:v()(m,g),"aria-hidden":!m["slick-active"],style:(0,i.Z)((0,i.Z)({},d.props.style||{}),p),onClick:function(t){d.props&&d.props.onClick&&d.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(f)}}))),(t=a+u)=_&&u<=A:u===_}),x={message:"dots",index:g,slidesToScroll:s,currentSlide:u},E=this.clickHandler.bind(this,x);p=p.concat(h.createElement("li",{key:g,className:w},h.cloneElement(this.props.customPaging(g),{onClick:E})))}return h.cloneElement(this.props.appendDots(p),(0,i.Z)({className:this.props.dotsClass},f))}}])}(h.PureComponent);function Q(e,t,n){return t=(0,c.Z)(t),(0,s.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,c.Z)(e).constructor):t.apply(e,n))}var $=function(e){function t(){return(0,o.Z)(this,t),Q(this,t,arguments)}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:v()(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?h.cloneElement(this.props.prevArrow,(0,i.Z)((0,i.Z)({},n),o)):h.createElement("button",(0,r.Z)({key:"0",type:"button"},n)," ","Previous")}}])}(h.PureComponent),J=function(e){function t(){return(0,o.Z)(this,t),Q(this,t,arguments)}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});k(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:v()(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?h.cloneElement(this.props.nextArrow,(0,i.Z)((0,i.Z)({},n),o)):h.createElement("button",(0,r.Z)({key:"1",type:"button"},n)," ","Next")}}])}(h.PureComponent),ee=n(46890),te=["animating"];var ne=function(e){function t(e){var n,a,u,f;(0,o.Z)(this,t),a=this,u=t,f=[e],u=(0,c.Z)(u),n=(0,s.Z)(a,(0,l.Z)()?Reflect.construct(u,f||[],(0,c.Z)(a).constructor):u.apply(a,f)),(0,d.Z)(n,"listRefHandler",(function(e){return n.list=e})),(0,d.Z)(n,"trackRefHandler",(function(e){return n.track=e})),(0,d.Z)(n,"adaptHeight",(function(){if(n.props.adaptiveHeight&&n.list){var e=n.list.querySelector('[data-index="'.concat(n.state.currentSlide,'"]'));n.list.style.height=T(e)+"px"}})),(0,d.Z)(n,"componentDidMount",(function(){if(n.props.onInit&&n.props.onInit(),n.props.lazyLoad){var e=w((0,i.Z)((0,i.Z)({},n.props),n.state));e.length>0&&(n.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),n.props.onLazyLoad&&n.props.onLazyLoad(e))}var t=(0,i.Z)({listRef:n.list,trackRef:n.track},n.props);n.updateState(t,!0,(function(){n.adaptHeight(),n.props.autoplay&&n.autoPlay("playing")})),"progressive"===n.props.lazyLoad&&(n.lazyLoadTimer=setInterval(n.progressiveLazyLoad,1e3)),n.ro=new ee.Z((function(){n.state.animating?(n.onWindowResized(!1),n.callbackTimers.push(setTimeout((function(){return n.onWindowResized()}),n.props.speed))):n.onWindowResized()})),n.ro.observe(n.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),(function(e){e.onfocus=n.props.pauseOnFocus?n.onSlideFocus:null,e.onblur=n.props.pauseOnFocus?n.onSlideBlur:null})),window.addEventListener?window.addEventListener("resize",n.onWindowResized):window.attachEvent("onresize",n.onWindowResized)})),(0,d.Z)(n,"componentWillUnmount",(function(){n.animationEndCallback&&clearTimeout(n.animationEndCallback),n.lazyLoadTimer&&clearInterval(n.lazyLoadTimer),n.callbackTimers.length&&(n.callbackTimers.forEach((function(e){return clearTimeout(e)})),n.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",n.onWindowResized):window.detachEvent("onresize",n.onWindowResized),n.autoplayTimer&&clearInterval(n.autoplayTimer),n.ro.disconnect()})),(0,d.Z)(n,"componentDidUpdate",(function(e){if(n.checkImagesLoad(),n.props.onReInit&&n.props.onReInit(),n.props.lazyLoad){var t=w((0,i.Z)((0,i.Z)({},n.props),n.state));t.length>0&&(n.setState((function(e){return{lazyLoadedList:e.lazyLoadedList.concat(t)}})),n.props.onLazyLoad&&n.props.onLazyLoad(t))}n.adaptHeight();var r=(0,i.Z)((0,i.Z)({listRef:n.list,trackRef:n.track},n.props),n.state),o=n.didPropsChange(e);o&&n.updateState(r,o,(function(){n.state.currentSlide>=h.Children.count(n.props.children)&&n.changeSlide({message:"index",index:h.Children.count(n.props.children)-n.props.slidesToShow,currentSlide:n.state.currentSlide}),e.autoplay===n.props.autoplay&&e.autoplaySpeed===n.props.autoplaySpeed||(!e.autoplay&&n.props.autoplay?n.autoPlay("playing"):n.props.autoplay?n.autoPlay("update"):n.pause("paused"))}))})),(0,d.Z)(n,"onWindowResized",(function(e){n.debouncedResize&&n.debouncedResize.cancel(),n.debouncedResize=(0,m.D)(50,(function(){return n.resizeWindow(e)})),n.debouncedResize()})),(0,d.Z)(n,"resizeWindow",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(Boolean(n.track&&n.track.node)){var t=(0,i.Z)((0,i.Z)({listRef:n.list,trackRef:n.track},n.props),n.state);n.updateState(t,e,(function(){n.props.autoplay?n.autoPlay("update"):n.pause("paused")})),n.setState({animating:!1}),clearTimeout(n.animationEndCallback),delete n.animationEndCallback}})),(0,d.Z)(n,"updateState",(function(e,t,r){var o=function(e){var t,n=h.Children.count(e.children),r=e.listRef,o=Math.ceil(P(r)),a=e.trackRef&&e.trackRef.node,s=Math.ceil(P(a));if(e.vertical)t=o;else{var l=e.centerMode&&2*parseInt(e.centerPadding);"string"===typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(l*=o/100),t=Math.ceil((o-l)/e.slidesToShow)}var c=r&&T(r.querySelector('[data-index="0"]')),u=c*e.slidesToShow,d=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(d=n-1-e.initialSlide);var f=e.lazyLoadedList||[],p=w((0,i.Z)((0,i.Z)({},e),{},{currentSlide:d,lazyLoadedList:f})),g={slideCount:n,slideWidth:t,listWidth:o,trackWidth:s,currentSlide:d,slideHeight:c,listHeight:u,lazyLoadedList:f=f.concat(p)};return null===e.autoplaying&&e.autoplay&&(g.autoplaying="playing"),g}(e);e=(0,i.Z)((0,i.Z)((0,i.Z)({},e),o),{},{slideIndex:o.currentSlide});var a=F(e);e=(0,i.Z)((0,i.Z)({},e),{},{left:a});var s=D(e);(t||h.Children.count(n.props.children)!==h.Children.count(e.children))&&(o.trackStyle=s),n.setState(o,r)})),(0,d.Z)(n,"ssrInit",(function(){if(n.props.variableWidth){var e=0,t=0,r=[],o=j((0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{slideCount:n.props.children.length})),a=B((0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{slideCount:n.props.children.length}));n.props.children.forEach((function(t){r.push(t.props.style.width),e+=t.props.style.width}));for(var s=0;s=t&&n.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(t){o(t),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(n.props.lazyLoad?e.onload=function(){n.adaptHeight(),n.callbackTimers.push(setTimeout(n.onWindowResized,n.props.speed))}:(e.onload=i,e.onerror=function(){i(),n.props.onLazyLoadError&&n.props.onLazyLoadError()}))}))})),(0,d.Z)(n,"progressiveLazyLoad",(function(){for(var e=[],t=(0,i.Z)((0,i.Z)({},n.props),n.state),r=n.state.currentSlide;r=-j(t);o--)if(n.state.lazyLoadedList.indexOf(o)<0){e.push(o);break}e.length>0?(n.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),n.props.onLazyLoad&&n.props.onLazyLoad(e)):n.lazyLoadTimer&&(clearInterval(n.lazyLoadTimer),delete n.lazyLoadTimer)})),(0,d.Z)(n,"slideHandler",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n.props,o=r.asNavFor,a=r.beforeChange,s=r.onLazyLoad,l=r.speed,c=r.afterChange,u=n.state.currentSlide,d=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,o=e.infinite,a=e.index,s=e.slideCount,l=e.lazyLoad,c=e.currentSlide,u=e.centerMode,d=e.slidesToScroll,h=e.slidesToShow,f=e.useCSS,p=e.lazyLoadedList;if(t&&n)return{};var g,m,A,v=a,y={},_={},x=o?a:b(a,0,s-1);if(r){if(!o&&(a<0||a>=s))return{};a<0?v=a+s:a>=s&&(v=a-s),l&&p.indexOf(v)<0&&(p=p.concat(v)),y={animating:!0,currentSlide:v,lazyLoadedList:p,targetSlide:v},_={animating:!1,targetSlide:v}}else g=v,v<0?(g=v+s,o?s%d!==0&&(g=s-s%d):g=0):!k(e)&&v>c?v=g=c:u&&v>=s?(v=o?s:s-1,g=o?0:s-1):v>=s&&(g=v-s,o?s%d!==0&&(g=0):g=s-h),!o&&v+h>=s&&(g=s-h),m=F((0,i.Z)((0,i.Z)({},e),{},{slideIndex:v})),A=F((0,i.Z)((0,i.Z)({},e),{},{slideIndex:g})),o||(m===A&&(v=g),m=A),l&&(p=p.concat(w((0,i.Z)((0,i.Z)({},e),{},{currentSlide:v})))),f?(y={animating:!0,currentSlide:g,trackStyle:N((0,i.Z)((0,i.Z)({},e),{},{left:m})),lazyLoadedList:p,targetSlide:x},_={animating:!1,currentSlide:g,trackStyle:D((0,i.Z)((0,i.Z)({},e),{},{left:A})),swipeLeft:null,targetSlide:x}):y={currentSlide:g,trackStyle:D((0,i.Z)((0,i.Z)({},e),{},{left:A})),lazyLoadedList:p,targetSlide:x};return{state:y,nextState:_}}((0,i.Z)((0,i.Z)((0,i.Z)({index:e},n.props),n.state),{},{trackRef:n.track,useCSS:n.props.useCSS&&!t})),h=d.state,f=d.nextState;if(h){a&&a(u,h.currentSlide);var g=h.lazyLoadedList.filter((function(e){return n.state.lazyLoadedList.indexOf(e)<0}));s&&g.length>0&&s(g),!n.props.waitForAnimate&&n.animationEndCallback&&(clearTimeout(n.animationEndCallback),c&&c(u),delete n.animationEndCallback),n.setState(h,(function(){o&&n.asNavForIndex!==e&&(n.asNavForIndex=e,o.innerSlider.slideHandler(e)),f&&(n.animationEndCallback=setTimeout((function(){var e=f.animating,t=(0,p.Z)(f,te);n.setState(t,(function(){n.callbackTimers.push(setTimeout((function(){return n.setState({animating:e})}),10)),c&&c(h.currentSlide),delete n.animationEndCallback}))}),l))}))}})),(0,d.Z)(n,"changeSlide",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=function(e,t){var n,r,o,a,s=e.slidesToScroll,l=e.slidesToShow,c=e.slideCount,u=e.currentSlide,d=e.targetSlide,h=e.lazyLoad,f=e.infinite;if(n=c%s!==0?0:(c-u)%s,"previous"===t.message)a=u-(o=0===n?s:l-n),h&&!f&&(a=-1===(r=u-o)?c-1:r),f||(a=d-s);else if("next"===t.message)a=u+(o=0===n?s:n),h&&!f&&(a=(u+s)%c+n),f||(a=d+s);else if("dots"===t.message)a=t.index*t.slidesToScroll;else if("children"===t.message){if(a=t.index,f){var p=Z((0,i.Z)((0,i.Z)({},e),{},{targetSlide:a}));a>t.currentSlide&&"left"===p?a-=c:a10)return{scrolling:!0};s&&(v.swipeLength=C);var P=(l?-1:1)*(v.curX>v.startX?1:-1);s&&(P=v.curY>v.startY?1:-1);var T=Math.ceil(g/m),R=M(t.touchObject,s),O=v.swipeLength;return A||(0===c&&("right"===R||"down"===R)||c+1>=T&&("left"===R||"up"===R)||!k(t)&&("left"===R||"up"===R))&&(O=v.swipeLength*u,!1===d&&h&&(h(R),E.edgeDragged=!0)),!f&&y&&(y(R),E.swiped=!0),x=o?S+O*(b/w)*P:l?S-O*P:S+O*P,s&&(x=S+O*P),E=(0,i.Z)((0,i.Z)({},E),{},{touchObject:v,swipeLeft:x,trackStyle:D((0,i.Z)((0,i.Z)({},t),{},{left:x}))}),Math.abs(v.curX-v.startX)<.8*Math.abs(v.curY-v.startY)||v.swipeLength>10&&(E.swiping=!0,_(e)),E}}(e,(0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{trackRef:n.track,listRef:n.list,slideIndex:n.state.currentSlide}));t&&(t.swiping&&(n.clickable=!1),n.setState(t))})),(0,d.Z)(n,"swipeEnd",(function(e){var t=function(e,t){var n=t.dragging,r=t.swipe,o=t.touchObject,a=t.listWidth,s=t.touchThreshold,l=t.verticalSwiping,c=t.listHeight,u=t.swipeToSlide,d=t.scrolling,h=t.onSwipe,f=t.targetSlide,p=t.currentSlide,g=t.infinite;if(!n)return r&&_(e),{};var m=l?c/s:a/s,A=M(o,l),v={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(d)return v;if(!o.swipeLength)return v;if(o.swipeLength>m){var y,b;_(e),h&&h(A);var w=g?p:f;switch(A){case"left":case"up":b=w+I(t),y=u?O(t,b):b,v.currentDirection=0;break;case"right":case"down":b=w-I(t),y=u?O(t,b):b,v.currentDirection=1;break;default:y=w}v.triggerSlideHandler=y}else{var x=F(t);v.trackStyle=N((0,i.Z)((0,i.Z)({},t),{},{left:x}))}return v}(e,(0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{trackRef:n.track,listRef:n.list,slideIndex:n.state.currentSlide}));if(t){var r=t.triggerSlideHandler;delete t.triggerSlideHandler,n.setState(t),void 0!==r&&(n.slideHandler(r),n.props.verticalSwiping&&n.enableBodyScroll())}})),(0,d.Z)(n,"touchEnd",(function(e){n.swipeEnd(e),n.clickable=!0})),(0,d.Z)(n,"slickPrev",(function(){n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"previous"})}),0))})),(0,d.Z)(n,"slickNext",(function(){n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"next"})}),0))})),(0,d.Z)(n,"slickGoTo",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Number(e),isNaN(e))return"";n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"index",index:e,currentSlide:n.state.currentSlide},t)}),0))})),(0,d.Z)(n,"play",(function(){var e;if(n.props.rtl)e=n.state.currentSlide-n.props.slidesToScroll;else{if(!k((0,i.Z)((0,i.Z)({},n.props),n.state)))return!1;e=n.state.currentSlide+n.props.slidesToScroll}n.slideHandler(e)})),(0,d.Z)(n,"autoPlay",(function(e){n.autoplayTimer&&clearInterval(n.autoplayTimer);var t=n.state.autoplaying;if("update"===e){if("hovered"===t||"focused"===t||"paused"===t)return}else if("leave"===e){if("paused"===t||"focused"===t)return}else if("blur"===e&&("paused"===t||"hovered"===t))return;n.autoplayTimer=setInterval(n.play,n.props.autoplaySpeed+50),n.setState({autoplaying:"playing"})})),(0,d.Z)(n,"pause",(function(e){n.autoplayTimer&&(clearInterval(n.autoplayTimer),n.autoplayTimer=null);var t=n.state.autoplaying;"paused"===e?n.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==t&&"playing"!==t||n.setState({autoplaying:"focused"}):"playing"===t&&n.setState({autoplaying:"hovered"})})),(0,d.Z)(n,"onDotsOver",(function(){return n.props.autoplay&&n.pause("hovered")})),(0,d.Z)(n,"onDotsLeave",(function(){return n.props.autoplay&&"hovered"===n.state.autoplaying&&n.autoPlay("leave")})),(0,d.Z)(n,"onTrackOver",(function(){return n.props.autoplay&&n.pause("hovered")})),(0,d.Z)(n,"onTrackLeave",(function(){return n.props.autoplay&&"hovered"===n.state.autoplaying&&n.autoPlay("leave")})),(0,d.Z)(n,"onSlideFocus",(function(){return n.props.autoplay&&n.pause("focused")})),(0,d.Z)(n,"onSlideBlur",(function(){return n.props.autoplay&&"focused"===n.state.autoplaying&&n.autoPlay("blur")})),(0,d.Z)(n,"render",(function(){var e,t,o,a=v()("slick-slider",n.props.className,{"slick-vertical":n.props.vertical,"slick-initialized":!0}),s=(0,i.Z)((0,i.Z)({},n.props),n.state),l=R(s,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),c=n.props.pauseOnHover;if(l=(0,i.Z)((0,i.Z)({},l),{},{onMouseEnter:c?n.onTrackOver:null,onMouseLeave:c?n.onTrackLeave:null,onMouseOver:c?n.onTrackOver:null,focusOnSelect:n.props.focusOnSelect&&n.clickable?n.selectHandler:null}),!0===n.props.dots&&n.state.slideCount>=n.props.slidesToShow){var u=R(s,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),d=n.props.pauseOnDotsHover;u=(0,i.Z)((0,i.Z)({},u),{},{clickHandler:n.changeSlide,onMouseEnter:d?n.onDotsLeave:null,onMouseOver:d?n.onDotsOver:null,onMouseLeave:d?n.onDotsLeave:null}),e=h.createElement(K,u)}var f=R(s,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);f.clickHandler=n.changeSlide,n.props.arrows&&(t=h.createElement($,f),o=h.createElement(J,f));var p=null;n.props.vertical&&(p={height:n.state.listHeight});var g=null;!1===n.props.vertical?!0===n.props.centerMode&&(g={padding:"0px "+n.props.centerPadding}):!0===n.props.centerMode&&(g={padding:n.props.centerPadding+" 0px"});var m=(0,i.Z)((0,i.Z)({},p),g),A=n.props.touchMove,y={className:"slick-list",style:m,onClick:n.clickHandler,onMouseDown:A?n.swipeStart:null,onMouseMove:n.state.dragging&&A?n.swipeMove:null,onMouseUp:A?n.swipeEnd:null,onMouseLeave:n.state.dragging&&A?n.swipeEnd:null,onTouchStart:A?n.swipeStart:null,onTouchMove:n.state.dragging&&A?n.swipeMove:null,onTouchEnd:A?n.touchEnd:null,onTouchCancel:n.state.dragging&&A?n.swipeEnd:null,onKeyDown:n.props.accessibility?n.keyHandler:null},b={className:a,dir:"ltr",style:n.props.style};return n.props.unslick&&(y={className:"slick-list"},b={className:a,style:n.props.style}),h.createElement("div",b,n.props.unslick?"":t,h.createElement("div",(0,r.Z)({ref:n.listRefHandler},y),h.createElement(X,(0,r.Z)({ref:n.trackRefHandler},l),n.props.children)),n.props.unslick?"":o,n.props.unslick?"":e)})),n.list=null,n.track=null,n.state=(0,i.Z)((0,i.Z)({},g),{},{currentSlide:n.props.initialSlide,targetSlide:n.props.initialSlide?n.props.initialSlide:0,slideCount:h.Children.count(n.props.children)}),n.callbackTimers=[],n.clickable=!0,n.debouncedResize=null;var A=n.ssrInit();return n.state=(0,i.Z)((0,i.Z)({},n.state),A),n}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"didPropsChange",value:function(e){for(var t=!1,n=0,r=Object.keys(this.props);n1&&void 0!==arguments[1]&&arguments[1];return n.innerSlider.slickGoTo(e,t)})),(0,d.Z)(n,"slickPause",(function(){return n.innerSlider.pause("paused")})),(0,d.Z)(n,"slickPlay",(function(){return n.innerSlider.autoPlay("play")})),n.state={breakpoint:null},n._responsiveMediaHandlers=[],n}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"media",value:function(e,t){var n=window.matchMedia(e),r=function(e){e.matches&&t()};n.addListener(r),r(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:r})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map((function(e){return e.breakpoint}));t.sort((function(e,t){return e-t})),t.forEach((function(n,r){var i;i=0===r?ie()({minWidth:0,maxWidth:n}):ie()({minWidth:t[r-1]+1,maxWidth:n}),V()&&e.media(i,(function(){e.setState({breakpoint:n})}))}));var n=ie()({minWidth:t.slice(-1)[0]});V()&&this.media(n,(function(){e.setState({breakpoint:null})}))}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach((function(e){e.mql.removeListener(e.listener)}))}},{key:"render",value:function(){var e,t,n=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter((function(e){return e.breakpoint===n.state.breakpoint})))[0].settings?"unslick":(0,i.Z)((0,i.Z)((0,i.Z)({},y),this.props),t[0].settings):(0,i.Z)((0,i.Z)({},y),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var o=h.Children.toArray(this.props.children);o=o.filter((function(e){return"string"===typeof e?!!e.trim():!!e})),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var a=[],s=null,l=0;l=o.length));f+=1)d.push(h.cloneElement(o[f],{key:100*l+10*u+f,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));c.push(h.createElement("div",{key:10*l+u},d))}e.variableWidth?a.push(h.createElement("div",{key:l,style:{width:s}},c)):a.push(h.createElement("div",{key:l},c))}if("unslick"===e){var p="regular slider "+(this.props.className||"");return h.createElement("div",{className:p},o)}return a.length<=e.slidesToShow&&!e.infinite&&(e.unslick=!0),h.createElement(ne,(0,r.Z)({style:this.props.style,ref:this.innerSliderRefHandler},function(e){return G.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}(e)),a)}}])}(h.Component)},76471:(e,t,n)=>{"use strict";n.d(t,{T6:()=>f,VD:()=>p,WE:()=>c,Yt:()=>g,lC:()=>o,py:()=>l,rW:()=>i,s:()=>d,ve:()=>s,vq:()=>u});var r=n(39553);function i(e,t,n){return{r:255*(0,r.sh)(e,255),g:255*(0,r.sh)(t,255),b:255*(0,r.sh)(n,255)}}function o(e,t,n){e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=0,l=(i+o)/2;if(i===o)s=0,a=0;else{var c=i-o;switch(s=l>.5?c/(2-i-o):c/(i+o),i){case e:a=(t-n)/c+(t1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function s(e,t,n){var i,o,s;if(e=(0,r.sh)(e,360),t=(0,r.sh)(t,100),n=(0,r.sh)(n,100),0===t)o=n,s=n,i=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=a(c,l,e+1/3),o=a(c,l,e),s=a(c,l,e-1/3)}return{r:255*i,g:255*o,b:255*s}}function l(e,t,n){e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=i,l=i-o,c=0===i?0:l/i;if(i===o)a=0;else{switch(i){case e:a=(t-n)/l+(t>16,g:(65280&e)>>8,b:255&e}}},75109:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},18948:(e,t,n)=>{"use strict";n.d(t,{uA:()=>a});var r=n(76471),i=n(75109),o=n(39553);function a(e){var t={r:0,g:0,b:0},n=1,a=null,s=null,l=null,c=!1,h=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(i.R[e])e=i.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=u.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=u.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=u.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=u.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=u.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=u.hex8.exec(e),n)return{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),a:(0,r.T6)(n[4]),format:t?"name":"hex8"};if(n=u.hex6.exec(e),n)return{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),format:t?"name":"hex"};if(n=u.hex4.exec(e),n)return{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),a:(0,r.T6)(n[4]+n[4]),format:t?"name":"hex8"};if(n=u.hex3.exec(e),n)return{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,r.rW)(e.r,e.g,e.b),c=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(a=(0,o.JX)(e.s),s=(0,o.JX)(e.v),t=(0,r.WE)(e.h,a,s),c=!0,h="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(a=(0,o.JX)(e.s),l=(0,o.JX)(e.l),t=(0,r.ve)(e.h,a,l),c=!0,h="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,o.Yq)(n),{ok:c,format:e.format||h,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),l="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),c="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),u={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+l),rgba:new RegExp("rgba"+c),hsl:new RegExp("hsl"+l),hsla:new RegExp("hsla"+c),hsv:new RegExp("hsv"+l),hsva:new RegExp("hsva"+c),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function d(e){return Boolean(u.CSS_UNIT.exec(String(e)))}},79388:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(76471),i=n(75109),o=n(18948),a=n(39553),s=function(){function e(t,n){var i;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=(0,r.Yt)(t)),this.originalInput=t;var a=(0,o.uA)(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(i=n.format)&&void 0!==i?i:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=(0,a.Yq)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=(0,r.py)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=(0,r.py)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),i=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=(0,r.lC)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=(0,r.lC)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),i=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),(0,r.vq)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),(0,r.s)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*(0,a.sh)(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*(0,a.sh)(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+(0,r.vq)(this.r,this.g,this.b,!1),t=0,n=Object.entries(i.R);t=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a{"use strict";function r(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function i(e){return Math.min(1,Math.max(0,e))}function o(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?"".concat(100*Number(e),"%"):e}function s(e){return 1===e.length?"0"+e:String(e)}n.d(t,{FZ:()=>s,JX:()=>a,V2:()=>i,Yq:()=>o,sh:()=>r})},82253:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68185),i=n(32603),o=n(98641),a=n(21921),s=n(76195);function l(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}class c extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeAggregationLayer(e){super.initializeState(this.context),this.setState({ignoreProps:l(this.constructor._propTypes,e.data.props),dimensions:e})}updateState(e){super.updateState(e);const{changeFlags:t}=e;if(t.extensionsChanged){const e=this.getShaders({});e&&e.defines&&(e.defines.NON_INSTANCED_MODEL=1),this.updateShaders(e)}this._updateAttributes()}updateAttributes(e){this.setState({changedAttributes:e})}getAttributes(){return this.getAttributeManager().getShaderAttributes()}getModuleSettings(){const{viewport:e,mousePosition:t,gl:n}=this.context;return Object.assign(Object.create(this.props),{viewport:e,mousePosition:t,pickingActive:0,devicePixelRatio:(0,s.w)(n)})}updateShaders(e){}isAggregationDirty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{props:n,oldProps:r,changeFlags:i}=e,{compareAll:a=!1,dimension:s}=t,{ignoreProps:l}=this.state,{props:c,accessors:u=[]}=s,{updateTriggersChanged:d}=i;if(i.dataChanged)return!0;if(d){if(d.all)return!0;for(const e of u)if(d[e])return!0}if(a)return!!i.extensionsChanged||(0,o.tg)({oldProps:r,newProps:n,ignoreProps:l,propTypes:this.constructor._propTypes});for(const o of c)if(n[o]!==r[o])return!0;return!1}isAttributeChanged(e){const{changedAttributes:t}=this.state;return e?t&&void 0!==t[e]:!function(e){let t=!0;for(const n in e){t=!1;break}return t}(t)}_getAttributeManager(){return new a.Z(this.context.gl,{id:this.props.id,stats:this.context.stats})}}(0,r.Z)(c,"layerName","AggregationLayer")},81057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(68185),i=n(16621),o=n(39042);const a=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),s=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),l=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),c=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),u={POSITION:{size:3,value:new Float32Array(s)},NORMAL:{size:3,value:new Float32Array(l)},TEXCOORD_0:{size:2,value:new Float32Array(c)}};class d extends i.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=(0,o.hQ)("cube-geometry")}=e;super({...e,id:t,indices:{size:1,value:new Uint16Array(a)},attributes:{...u,...e.attributes}})}}var h=n(98029),f=n(13091);class p extends f.Z{getGeometry(e){return new d}draw(e){let{uniforms:t}=e;const{elevationScale:n,extruded:r,offset:i,coverage:o,cellSize:a,angle:s,radiusUnits:l}=this.props;this.state.model.setUniforms(t).setUniforms({radius:a/2,radiusUnits:h.iI[l],angle:s,offset:i,extruded:r,coverage:o,elevationScale:n,edgeDistance:1,isWireframe:!1}).draw()}}(0,r.Z)(p,"layerName","GridCellLayer"),(0,r.Z)(p,"defaultProps",{cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}});var g=n(67110),m=n(39179);const A=6378e3;function v(e,t){if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return{xOffset:t,yOffset:t};const{yMin:n,yMax:r}=e;return function(e,t){const n=(a=e,a/A*(180/Math.PI)),r=(i=t,o=e,o/A*(180/Math.PI)/Math.cos(i*Math.PI/180));var i,o;var a;return{yOffset:n,xOffset:r}}(t,(n+r)/2)}var y=n(20307),b=n(82253);function _(){}const w={colorDomain:null,colorRange:g.K,getColorValue:{type:"accessor",value:null},getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",lowerPercentile:{type:"number",min:0,max:100,value:0},upperPercentile:{type:"number",min:0,max:100,value:100},colorScaleType:"quantize",onSetColorDomain:_,elevationDomain:null,elevationRange:[0,1e3],getElevationValue:{type:"accessor",value:null},getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationLowerPercentile:{type:"number",min:0,max:100,value:0},elevationUpperPercentile:{type:"number",min:0,max:100,value:100},elevationScale:{type:"number",min:0,value:1},elevationScaleType:"linear",onSetElevationDomain:_,gridAggregator:function(e,t){const n=function(e,t){const{data:n=[],cellSize:r}=e,{attributes:i,viewport:o,projectPoints:a,numInstances:s}=t,l=i.positions.value,{size:c}=i.positions.getAccessor(),u=t.boundingBox||function(e,t){const n=e.value,{size:r}=e.getAccessor();let i,o,a=1/0,s=-1/0,l=1/0,c=-1/0;for(let u=0;us?i:s,l=oc?o:c);return{xMin:l,xMax:c,yMin:a,yMax:s}}(i.positions,s),d=t.posOffset||[180,90],h=t.gridOffset||v(u,r);if(h.xOffset<=0||h.yOffset<=0)return{gridHash:{},gridOffset:h};const{width:f,height:p}=o,g=Math.ceil(f/h.xOffset),A=Math.ceil(p/h.yOffset),y={},{iterable:b,objectInfo:_}=(0,m.jB)(n),w=new Array(3);for(const m of b){_.index++,w[0]=l[_.index*c],w[1]=l[_.index*c+1],w[2]=c>=3?l[_.index*c+2]:0;const[e,t]=a?o.project(w):w;if(Number.isFinite(e)&&Number.isFinite(t)){const n=Math.floor((t+d[1])/h.yOffset),r=Math.floor((e+d[0])/h.xOffset);if(!a||r>=0&&r=0&&ne.position},extruded:!1,material:!0,_filterData:{type:"function",value:null,optional:!0}};class x extends b.Z{initializeState(){const e=new y.Z({getAggregator:e=>e.gridAggregator,getCellSize:e=>e.cellSize});this.state={cpuAggregator:e,aggregatorState:e.state};this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"}})}updateState(e){super.updateState(e),this.setState({aggregatorState:this.state.cpuAggregator.updateState(e,{viewport:this.context.viewport,attributes:this.getAttributes(),numInstances:this.getNumInstances()})})}getPickingInfo(e){let{info:t}=e;return this.state.cpuAggregator.getPickingInfo({info:t})}_onGetSublayerColor(e){return this.state.cpuAggregator.getAccessor("fillColor")(e)}_onGetSublayerElevation(e){return this.state.cpuAggregator.getAccessor("elevation")(e)}_getSublayerUpdateTriggers(){return this.state.cpuAggregator.getUpdateTriggers(this.props)}renderLayers(){const{elevationScale:e,extruded:t,cellSize:n,coverage:r,material:i,transitions:o}=this.props,{cpuAggregator:a}=this.state,s=this.getSubLayerClass("grid-cell",p),l=this._getSublayerUpdateTriggers();return new s({cellSize:n,coverage:r,material:i,elevationScale:e,extruded:t,getFillColor:this._onGetSublayerColor.bind(this),getElevation:this._onGetSublayerElevation.bind(this),transitions:o&&{getFillColor:o.getColorValue||o.getColorWeight,getElevation:o.getElevationValue||o.getElevationWeight}},this.getSubLayerProps({id:"grid-cell",updateTriggers:l}),{data:a.state.layerData.data})}}(0,r.Z)(x,"layerName","CPUGridLayer"),(0,r.Z)(x,"defaultProps",w)},75770:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(68185),i=n(76195);const o=new Float32Array(12);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=0;for(const r of e)for(let e=0;e 0.) {\n maxValue = colorDomain[1];\n minValue = colorDomain[0];\n }\n vIntensityMax = intensity / maxValue;\n vIntensityMin = intensity / minValue;\n}\n",fs:"#define SHADER_NAME triangle-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D texture;\nuniform sampler2D colorTexture;\nuniform float aggregationMode;\n\nvarying vec2 vTexCoords;\nvarying float vIntensityMin;\nvarying float vIntensityMax;\n\nvec4 getLinearColor(float value) {\n float factor = clamp(value * vIntensityMax, 0., 1.);\n vec4 color = texture2D(colorTexture, vec2(factor, 0.5));\n color.a *= min(value * vIntensityMin, 1.0);\n return color;\n}\n\nvoid main(void) {\n vec4 weights = texture2D(texture, vTexCoords);\n float weight = weights.r;\n\n if (aggregationMode > 0.5) {\n weight /= max(1.0, weights.a);\n }\n if (weight <= 0.) {\n discard;\n }\n\n vec4 linearColor = getLinearColor(weight);\n linearColor.a *= opacity;\n gl_FragColor =linearColor;\n}\n",modules:[v.Z]}}initializeState(e){let{gl:t}=e;this.getAttributeManager().add({positions:{size:3,noAlloc:!0},texCoords:{size:2,noAlloc:!0}}),this.setState({model:this._getModel(t)})}_getModel(e){const{vertexCount:t}=this.props;return new g.Z(e,{...this.getShaders(),id:this.props.id,geometry:new m.Z({drawMode:6,vertexCount:t})})}draw(e){let{uniforms:t}=e;const{model:n}=this.state,{texture:r,maxTexture:i,colorTexture:o,intensity:a,threshold:s,aggregationMode:l,colorDomain:c}=this.props;n.setUniforms({...t,texture:r,maxTexture:i,colorTexture:o,intensity:a,threshold:s,aggregationMode:l,colorDomain:c}).draw()}}(0,r.Z)(y,"layerName","TriangleLayer");var b=n(82253),_=n(67110);const w={mipmaps:!1,parameters:{10240:9729,10241:9729,10242:33071,10243:33071},dataFormat:6408},x=[0,0],E={SUM:0,MEAN:1},S={getPosition:{type:"accessor",value:e=>e.position},getWeight:{type:"accessor",value:1},intensity:{type:"number",min:0,value:1},radiusPixels:{type:"number",min:1,max:100,value:50},colorRange:_.K,threshold:{type:"number",min:0,max:1,value:.05},colorDomain:{type:"array",value:null,optional:!0},aggregation:"SUM",weightsTextureSize:{type:"number",min:128,max:2048,value:2048},debounceTimeout:{type:"number",min:0,max:1e3,value:500}},C=[s.h.BLEND_EQUATION_MINMAX,s.h.TEXTURE_FLOAT],P=[s.h.COLOR_ATTACHMENT_RGBA32F,s.h.FLOAT_BLEND],T={data:{props:["radiusPixels"]}};class M extends b.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){const{gl:e}=this.context;if(!(0,l.ag)(e,C))return this.setState({supported:!1}),void h.Z.error("HeatmapLayer: ".concat(this.id," is not supported on this browser"))();super.initializeAggregationLayer(T),this.setState({supported:!0,colorDomain:x}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState(e){let{changeFlags:t}=e;return t.somethingChanged}updateState(e){this.state.supported&&(super.updateState(e),this._updateHeatmapState(e))}_updateHeatmapState(e){const{props:t,oldProps:n}=e,r=this._getChangeFlags(e);(r.dataChanged||r.viewportChanged)&&(r.boundsChanged=this._updateBounds(r.dataChanged),this._updateTextureRenderingBounds()),r.dataChanged||r.boundsChanged?(clearTimeout(this.state.updateTimer),this.setState({isWeightMapDirty:!0})):r.viewportZoomChanged&&this._debouncedUpdateWeightmap(),t.colorRange!==n.colorRange&&this._updateColorTexture(e),this.state.isWeightMapDirty&&this._updateWeightmap(),this.setState({zoom:e.context.viewport.zoom})}renderLayers(){if(!this.state.supported)return[];const{weightsTexture:e,triPositionBuffer:t,triTexCoordBuffer:n,maxWeightsTexture:r,colorTexture:i,colorDomain:o}=this.state,{updateTriggers:a,intensity:s,threshold:l,aggregation:c}=this.props;return new(this.getSubLayerClass("triangle",y))(this.getSubLayerProps({id:"triangle-layer",updateTriggers:a}),{coordinateSystem:f.Df.DEFAULT,data:{attributes:{positions:t,texCoords:n}},vertexCount:4,maxTexture:r,colorTexture:i,aggregationMode:E[c]||0,texture:e,intensity:s,threshold:l,colorDomain:o})}finalizeState(e){super.finalizeState(e);const{weightsTransform:t,weightsTexture:n,maxWeightTransform:r,maxWeightsTexture:i,triPositionBuffer:o,triTexCoordBuffer:a,colorTexture:s,updateTimer:l}=this.state;null===t||void 0===t||t.delete(),null===n||void 0===n||n.delete(),null===r||void 0===r||r.delete(),null===i||void 0===i||i.delete(),null===o||void 0===o||o.delete(),null===a||void 0===a||a.delete(),null===s||void 0===s||s.delete(),l&&clearTimeout(l)}_getAttributeManager(){return new p.Z(this.context.gl,{id:this.props.id,stats:this.context.stats})}_getChangeFlags(e){const t={},{dimensions:n}=this.state;t.dataChanged=this.isAttributeChanged()||this.isAggregationDirty(e,{compareAll:!0,dimension:n.data}),t.viewportChanged=e.changeFlags.viewportChanged;const{zoom:r}=this.state;return e.context.viewport&&e.context.viewport.zoom===r||(t.viewportZoomChanged=!0),t}_createTextures(){const{gl:e}=this.context,{textureSize:t,format:n,type:r}=this.state;this.setState({weightsTexture:new c.Z(e,{width:t,height:t,format:n,type:r,...w}),maxWeightsTexture:new c.Z(e,{format:n,type:r,...w})})}_setupAttributes(){this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"},weights:{size:1,accessor:"getWeight"}}),this.setState({positionAttributeName:"positions"})}_setupTextureParams(){const{gl:e}=this.context,{weightsTextureSize:t}=this.props,n=Math.min(t,(0,i.ZS)(e,3379)),r=(0,l.ag)(e,P),{format:o,type:a}=function(e){let{gl:t,floatTargetSupport:n}=e;return n?{format:(0,i.D0)(t)?34836:6408,type:5126}:{format:6408,type:5121}}({gl:e,floatTargetSupport:r}),s=r?1:1/255;this.setState({textureSize:n,format:o,type:a,weightsScale:s}),r||h.Z.warn("HeatmapLayer: ".concat(this.id," rendering to float texture not supported, fallingback to low precession format"))()}getShaders(e){return super.getShaders("max-weights-transform"===e?{vs:"attribute vec4 inTexture;\nvarying vec4 outTexture;\n\nvoid main()\n{\noutTexture = inTexture;\ngl_Position = vec4(0, 0, 0, 1.);\ngl_PointSize = 1.0;\n}\n",_fs:"varying vec4 outTexture;\nvoid main() {\n gl_FragColor = outTexture;\n gl_FragColor.g = outTexture.r / max(1.0, outTexture.a);\n}\n"}:{vs:"attribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float weights;\nvarying vec4 weightsTexture;\nuniform float radiusPixels;\nuniform float textureWidth;\nuniform vec4 commonBounds;\nuniform float weightsScale;\nvoid main()\n{\n weightsTexture = vec4(weights * weightsScale, 0., 0., 1.);\n\n float radiusTexels = project_pixel_size(radiusPixels) * textureWidth / (commonBounds.z - commonBounds.x);\n gl_PointSize = radiusTexels * 2.;\n\n vec3 commonPosition = project_position(positions, positions64Low);\n gl_Position.xy = (commonPosition.xy - commonBounds.xy) / (commonBounds.zw - commonBounds.xy) ;\n gl_Position.xy = (gl_Position.xy * 2.) - (1.);\n}\n",_fs:"varying vec4 weightsTexture;\nfloat gaussianKDE(float u){\n return pow(2.71828, -u*u/0.05555)/(1.77245385*0.166666);\n}\nvoid main()\n{\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n if (dist > 0.5) {\n discard;\n }\n gl_FragColor = weightsTexture * gaussianKDE(2. * dist);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"})}_createWeightsTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{gl:n}=this.context;let{weightsTransform:r}=this.state;const{weightsTexture:i}=this.state;null===(t=r)||void 0===t||t.delete(),r=new u.Z(n,{id:"".concat(this.id,"-weights-transform"),elementCount:1,_targetTexture:i,_targetTextureVarying:"weightsTexture",...e}),this.setState({weightsTransform:r})}_setupResources(){const{gl:e}=this.context;this._createTextures();const{textureSize:t,weightsTexture:n,maxWeightsTexture:r}=this.state,i=this.getShaders("weights-transform");this._createWeightsTransform(i);const o=this.getShaders("max-weights-transform"),a=new u.Z(e,{id:"".concat(this.id,"-max-weights-transform"),_sourceTextures:{inTexture:n},_targetTexture:r,_targetTextureVarying:"outTexture",...o,elementCount:t*t});this.setState({weightsTexture:n,maxWeightsTexture:r,maxWeightTransform:a,zoom:null,triPositionBuffer:new d.Z(e,{byteLength:48,accessor:{size:3}}),triTexCoordBuffer:new d.Z(e,{byteLength:48,accessor:{size:2}})})}updateShaders(e){this._createWeightsTransform(e)}_updateMaxWeightValue(){const{maxWeightTransform:e}=this.state;e.run({parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32776}})}_updateBounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{viewport:t}=this.context,n=[t.unproject([0,0]),t.unproject([t.width,0]),t.unproject([t.width,t.height]),t.unproject([0,t.height])].map((e=>e.map(Math.fround))),r=function(e){const t=e.map((e=>e[0])),n=e.map((e=>e[1])),r=Math.min.apply(null,t),i=Math.max.apply(null,t);return[r,Math.min.apply(null,n),i,Math.max.apply(null,n)]}(n),i={visibleWorldBounds:r,viewportCorners:n};let o=!1;if(e||!this.state.worldBounds||(a=this.state.worldBounds,!((s=r)[0]>=a[0]&&s[2]<=a[2]&&s[1]>=a[1]&&s[3]<=a[3]))){const e=this._worldToCommonBounds(r),t=this._commonToWorldBounds(e);this.props.coordinateSystem===f.Df.LNGLAT&&(t[1]=Math.max(t[1],-85.051129),t[3]=Math.min(t[3],85.051129),t[0]=Math.max(t[0],-360),t[2]=Math.min(t[2],360));const n=this._worldToCommonBounds(t);i.worldBounds=t,i.normalizedCommonBounds=n,o=!0}var a,s;return this.setState(i),o}_updateTextureRenderingBounds(){const{triPositionBuffer:e,triTexCoordBuffer:t,normalizedCommonBounds:n,viewportCorners:r}=this.state,{viewport:i}=this.context;e.subData(a(r,3));const o=r.map((e=>function(e,t){const[n,r,i,o]=t;return[(e[0]-n)/(i-n),(e[1]-r)/(o-r)]}(i.projectPosition(e),n)));t.subData(a(o,2))}_updateColorTexture(e){const{colorRange:t}=e.props;let{colorTexture:n}=this.state;const r=(0,_.P)(t,!1,Uint8Array);n?n.setImageData({data:r,width:t.length}):n=new c.Z(this.context.gl,{data:r,width:t.length,height:1,...w}),this.setState({colorTexture:n})}_updateWeightmap(){const{radiusPixels:e,colorDomain:t,aggregation:n}=this.props,{weightsTransform:r,worldBounds:o,textureSize:a,weightsTexture:s,weightsScale:l}=this.state;this.state.isWeightMapDirty=!1;const c=this._worldToCommonBounds(o,{useLayerCoordinateSystem:!0});if(t&&"SUM"===n){const{viewport:e}=this.context,n=e.distanceScales.metersPerUnit[2]*(c[2]-c[0])/a;this.state.colorDomain=t.map((e=>e*n*l))}else this.state.colorDomain=t||x;const u={radiusPixels:e,commonBounds:c,textureWidth:a,weightsScale:l};r.update({elementCount:this.getNumInstances()}),(0,i.s8)(this.context.gl,{clearColor:[0,0,0,0]},(()=>{r.run({uniforms:u,parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32774},clearRenderTarget:!0,attributes:this.getAttributes(),moduleSettings:this.getModuleSettings()})})),this._updateMaxWeightValue(),s.setParameters({10240:9729,10241:9729})}_debouncedUpdateWeightmap(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{updateTimer:t}=this.state;const{debounceTimeout:n}=this.props;e?(t=null,this._updateBounds(!0),this._updateTextureRenderingBounds(),this.setState({isWeightMapDirty:!0})):(this.setState({isWeightMapDirty:!1}),clearTimeout(t),t=setTimeout(this._debouncedUpdateWeightmap.bind(this,!0),n)),this.setState({updateTimer:t})}_worldToCommonBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{useLayerCoordinateSystem:n=!1}=t,[r,i,o,a]=e,{viewport:s}=this.context,{textureSize:l}=this.state,{coordinateSystem:c}=this.props,u=n&&(c===f.Df.LNGLAT_OFFSETS||c===f.Df.METER_OFFSETS),d=u?s.projectPosition(this.props.coordinateOrigin):[0,0],h=2*l/s.scale;let p,g;return n&&!u?(p=this.projectPosition([r,i,0]),g=this.projectPosition([o,a,0])):(p=s.projectPosition([r,i,0]),g=s.projectPosition([o,a,0])),function(e,t,n){const[r,i,o,a]=e,s=o-r,l=a-i;let c=s,u=l;s/l{"use strict";n.d(t,{Z:()=>m});var r=n(68185),i=n(65148),o=n(13091),a=n(67110),s=Math.PI/3,l=[0,s,2*s,3*s,4*s,5*s];function c(e){return e[0]}function u(e){return e[1]}var d=n(39179);var h=n(20307),f=n(82253);function p(){}const g={colorDomain:null,colorRange:a.K,getColorValue:{type:"accessor",value:null},getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",lowerPercentile:{type:"number",value:0,min:0,max:100},upperPercentile:{type:"number",value:100,min:0,max:100},colorScaleType:"quantize",onSetColorDomain:p,elevationDomain:null,elevationRange:[0,1e3],getElevationValue:{type:"accessor",value:null},getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationLowerPercentile:{type:"number",value:0,min:0,max:100},elevationUpperPercentile:{type:"number",value:100,min:0,max:100},elevationScale:{type:"number",min:0,value:1},elevationScaleType:"linear",onSetElevationDomain:p,radius:{type:"number",value:1e3,min:1},coverage:{type:"number",min:0,max:1,value:1},extruded:!1,hexagonAggregator:function(e,t){const{data:n,radius:r}=e,{viewport:o,attributes:a}=t,h=n.length?function(e,t){const{attributes:n}=t,r=n.positions.value,{size:i}=n.positions.getAccessor();let o,a=1/0,s=1/0,l=-1/0,c=-1/0;for(o=0;o1){var g=l-f,m=f+(lv*v+y*y&&(f=m+(1&u?1:-1)/2,u=A)}var b=f+"-"+u,_=i[b];_?_.push(s):(o.push(_=i[b]=[s]),_.x=(f+(1&u)/2)*t,_.y=u*n)}return o}function p(e){var t=0,n=0;return l.map((function(r){var i=Math.sin(r)*e,o=-Math.cos(r)*e,a=i-t,s=o-n;return t=i,n=o,[a,s]}))}return f.hexagon=function(t){return"m"+p(null==t?e:+t).join("l")+"z"},f.centers=function(){for(var s=[],l=Math.round(i/n),c=Math.round(r/t),u=l*n;ue.screenCoord[0])).y((e=>e.screenCoord[1]));return{hexagons:y(p).map(((e,t)=>({position:o.unprojectFlat([e.x,e.y]),points:e,index:t}))),radiusCommon:f}},getPosition:{type:"accessor",value:e=>e.position},material:!0,_filterData:{type:"function",value:null,optional:!0}};class m extends f.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){const e=new h.Z({getAggregator:e=>e.hexagonAggregator,getCellSize:e=>e.radius});this.state={cpuAggregator:e,aggregatorState:e.state,vertices:null};this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"}})}updateState(e){if(super.updateState(e),e.changeFlags.propsOrDataChanged){const t=this.state.cpuAggregator.updateState(e,{viewport:this.context.viewport,attributes:this.getAttributes()});if(this.state.aggregatorState.layerData!==t.layerData){const{hexagonVertices:e}=t.layerData||{};this.setState({vertices:e&&this.convertLatLngToMeterOffset(e)})}this.setState({aggregatorState:t})}}convertLatLngToMeterOffset(e){const{viewport:t}=this.context;if(Array.isArray(e)&&6===e.length){const n=e[0],r=e[3],i=[(n[0]+r[0])/2,(n[1]+r[1])/2],o=t.projectFlat(i),{metersPerUnit:a}=t.getDistanceScales(i);return e.map((e=>{const n=t.projectFlat(e);return[(n[0]-o[0])*a[0],(n[1]-o[1])*a[1]]}))}return i.Z.error("HexagonLayer: hexagonVertices needs to be an array of 6 points")(),null}getPickingInfo(e){let{info:t}=e;return this.state.cpuAggregator.getPickingInfo({info:t})}_onGetSublayerColor(e){return this.state.cpuAggregator.getAccessor("fillColor")(e)}_onGetSublayerElevation(e){return this.state.cpuAggregator.getAccessor("elevation")(e)}_getSublayerUpdateTriggers(){return this.state.cpuAggregator.getUpdateTriggers(this.props)}renderLayers(){const{elevationScale:e,extruded:t,coverage:n,material:r,transitions:i}=this.props,{aggregatorState:a,vertices:s}=this.state,l=this.getSubLayerClass("hexagon-cell",o.Z),c=this._getSublayerUpdateTriggers();return new l({...s?{vertices:s,radius:1}:{radius:a.layerData.radiusCommon||1,radiusUnits:"common",angle:90},diskResolution:6,elevationScale:e,extruded:t,coverage:n,material:r,getFillColor:this._onGetSublayerColor.bind(this),getElevation:this._onGetSublayerElevation.bind(this),transitions:i&&{getFillColor:i.getColorValue||i.getColorWeight,getElevation:i.getElevationValue||i.getElevationWeight}},this.getSubLayerProps({id:"hexagon-cell",updateTriggers:c}),{data:a.layerData.data})}}(0,r.Z)(m,"layerName","HexagonLayer"),(0,r.Z)(m,"defaultProps",g)},67110:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,P:()=>i});const r=[[255,255,178],[254,217,118],[254,178,76],[253,141,60],[240,59,32],[189,0,38]];function i(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float32Array;if(Number.isFinite(e[0]))t=new r(e);else{t=new r(4*e.length);let n=0;for(let r=0;r{"use strict";n.d(t,{Z:()=>O});var r=n(68185),i=n(65148);function o(e,t,n){const r=n;return r.domain=()=>e,r.range=()=>t,r}function a(e,t){return o(e,t,(n=>function(e,t,n){const r=e[1]-e[0];if(r<=0)return i.Z.warn("quantizeScale: invalid domain, returning range[0]")(),t[0];const o=r/t.length,a=Math.floor((n-e[0])/o),s=Math.max(Math.min(a,t.length-1),0);return t[s]}(e,t,n)))}function s(e,t){return o(e,t,(n=>function(e,t,n){return(n-e[0])/(e[1]-e[0])*(t[1]-t[0])+t[0]}(e,t,n)))}function l(e,t){const n=e.sort(c);let r=0;const i=Math.max(1,t.length),a=new Array(i-1);for(;++rfunction(e,t,n){return t[function(e,t){let n=0,r=e.length;for(;n>>1;c(e[i],t)>0?r=i:n=i+1}return n}(e,n)]}(a,t,e);return s.thresholds=()=>a,o(e,t,s)}function c(e,t){return e-t}function u(e,t){const n=e.length;if(t<=0||n<2)return e[0];if(t>=1)return e[n-1];const r=(n-1)*t,i=Math.floor(r),o=e[i];return o+(e[i+1]-o)*(r-i)}function d(e,t){const n=new Map,r=[];for(const i of e){const e="".concat(i);n.has(e)||n.set(e,r.push(i))}return o(e,t,(e=>function(e,t,n,r){const i="".concat(r);let o=t.get(i);return void 0===o&&(o=e.push(r),t.set(i,o)),n[(o-1)%n.length]}(r,n,t,e)))}function h(e){return void 0!==e&&null!==e}function f(e,t){return("function"===typeof t?e.map(t):e).filter(h)}function p(e,t){return f(e,t)}function g(e,t){return function(e){const t=[];return e.forEach((e=>{!t.includes(e)&&h(e)&&t.push(e)})),t}(f(e,t))}const m=e=>e.length,A=e=>e.points,v=e=>e.index,y=(e,t)=>et?1:e>=t?0:NaN,b={getValue:m,getPoints:A,getIndex:v,filterData:null};class _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;(0,r.Z)(this,"maxCount",void 0),(0,r.Z)(this,"maxValue",void 0),(0,r.Z)(this,"minValue",void 0),(0,r.Z)(this,"totalCount",void 0),(0,r.Z)(this,"aggregatedBins",void 0),(0,r.Z)(this,"sortedBins",void 0),(0,r.Z)(this,"binMap",void 0),this.aggregatedBins=this.getAggregatedBins(e,t),this._updateMinMaxValues(),this.binMap=this.getBinMap()}getAggregatedBins(e,t){const{getValue:n=m,getPoints:r=A,getIndex:i=v,filterData:o}=t,a="function"===typeof o,s=e.length,l=[];let c=0;for(let u=0;u{return t=e,n=0,r=100,Math.max(n,Math.min(r,t));var t,n,r}));return[Math.ceil(n/100*(t-1)),Math.floor(r/100*(t-1))]}getBinMap(){const e={};for(const t of this.aggregatedBins)e[t.i]=t;return e}_updateMinMaxValues(){let e=0,t=0,n=3402823466e29,r=0;for(const i of this.aggregatedBins)e=e>i.counts?e:i.counts,t=t>i.value?t:i.value,n=ny(e.value,t.value)))),!this.sortedBins.length)return[];let t=0,n=this.sortedBins.length-1;if(Array.isArray(e)){const r=this._percentileToIndex(e);t=r[0],n=r[1]}return[this.sortedBins[t].value,this.sortedBins[n].value]}getValueDomainByScale(e){let[t=0,n=100]=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.sortedBins||(this.sortedBins=this.aggregatedBins.sort(((e,t)=>y(e.value,t.value)))),!this.sortedBins.length)return[];const r=this._percentileToIndex([t,n]);return this._getScaleDomain(e,r)}_getScaleDomain(e,t){let[n,r]=t;const i=this.sortedBins;switch(e){case"quantize":case"linear":default:return[i[n].value,i[r].value];case"quantile":return p(i.slice(n,r+1),(e=>e.value));case"ordinal":return g(i,(e=>e.value))}}}const w={SUM:1,MEAN:2,MIN:3,MAX:4};function x(e,t){return e+t}function E(e,t){return t>e?t:e}function S(e,t){return t1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e;return n=>(t.index=n.index,e(n.source,t))}(t,n),r){case w.MIN:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(S,1/0):null}(e,t);case w.SUM:return e=>function(e,t){if(Number.isFinite(t))return e.length?e.length*t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(x,0):null}(e,t);case w.MEAN:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(x,0)/n.length:null}(e,t);case w.MAX:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(E,-1/0):null}(e,t);default:return null}}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>(t.indices=n.map((e=>e.index)),e(n.map((e=>e.source)),t))}function T(){}const M=["getBins","getDomain","getScaleFunc"],k=[{key:"fillColor",accessor:"getFillColor",pickingInfo:"colorValue",getBins:{triggers:{value:{prop:"getColorValue",updateTrigger:"getColorValue"},weight:{prop:"getColorWeight",updateTrigger:"getColorWeight"},aggregation:{prop:"colorAggregation"},filterData:{prop:"_filterData",updateTrigger:"_filterData"}}},getDomain:{triggers:{lowerPercentile:{prop:"lowerPercentile"},upperPercentile:{prop:"upperPercentile"},scaleType:{prop:"colorScaleType"}}},getScaleFunc:{triggers:{domain:{prop:"colorDomain"},range:{prop:"colorRange"}},onSet:{props:"onSetColorDomain"}},nullValue:[0,0,0,0]},{key:"elevation",accessor:"getElevation",pickingInfo:"elevationValue",getBins:{triggers:{value:{prop:"getElevationValue",updateTrigger:"getElevationValue"},weight:{prop:"getElevationWeight",updateTrigger:"getElevationWeight"},aggregation:{prop:"elevationAggregation"},filterData:{prop:"_filterData",updateTrigger:"_filterData"}}},getDomain:{triggers:{lowerPercentile:{prop:"elevationLowerPercentile"},upperPercentile:{prop:"elevationUpperPercentile"},scaleType:{prop:"elevationScaleType"}}},getScaleFunc:{triggers:{domain:{prop:"elevationDomain"},range:{prop:"elevationRange"}},onSet:{props:"onSetElevationDomain"}},nullValue:-1}],R=e=>e.cellSize;class O{constructor(e){this.state={layerData:{},dimensions:{}},this.changeFlags={},this.dimensionUpdaters={},this._getCellSize=e.getCellSize||R,this._getAggregator=e.getAggregator,this._addDimension(e.dimensions||k)}static defaultDimensions(){return k}updateState(e,t){const{oldProps:n,props:r,changeFlags:i}=e;this.updateGetValueFuncs(n,r,i);const o=this.needsReProjectPoints(n,r,i);let a=!1;if(i.dataChanged||o)this.getAggregatedData(r,t),a=!0;else{(this.getDimensionChanges(n,r,i)||[]).forEach((e=>"function"===typeof e&&e())),a=!0}return this.setState({aggregationDirty:a}),this.state}setState(e){this.state={...this.state,...e}}setDimensionState(e,t){this.setState({dimensions:{...this.state.dimensions,[e]:{...this.state.dimensions[e],...t}}})}normalizeResult(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.hexagons?{data:e.hexagons,...e}:e.layerData?{data:e.layerData,...e}:e}getAggregatedData(e,t){const n=this._getAggregator(e)(e,t);this.setState({layerData:this.normalizeResult(n)}),this.changeFlags={layerData:!0},this.getSortedBins(e)}updateGetValueFuncs(e,t,n){for(const r in this.dimensionUpdaters){const{value:i,weight:o,aggregation:a}=this.dimensionUpdaters[r].getBins.triggers;let s=t[i.prop];this.needUpdateDimensionStep(this.dimensionUpdaters[r].getBins,e,t,n)&&(s=s?P(s,{data:t.data}):C(t[a.prop],t[o.prop],{data:t.data})),s&&this.setDimensionState(r,{getValue:s})}}needsReProjectPoints(e,t,n){return this._getCellSize(e)!==this._getCellSize(t)||this._getAggregator(e)!==this._getAggregator(t)||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPosition)}addDimension(e){this._addDimension(e)}_addDimension(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{const{key:t}=e;this.dimensionUpdaters[t]=this.getDimensionUpdaters(e),this.state.dimensions[t]={getValue:null,domain:null,sortedBins:null,scaleFunc:T}}))}getDimensionUpdaters(e){let{key:t,accessor:n,pickingInfo:r,getBins:i,getDomain:o,getScaleFunc:a,nullValue:s}=e;return{key:t,accessor:n,pickingInfo:r,getBins:{updater:this.getDimensionSortedBins,...i},getDomain:{updater:this.getDimensionValueDomain,...o},getScaleFunc:{updater:this.getDimensionScale,...a},attributeAccessor:this.getSubLayerDimensionAttribute(t,s)}}needUpdateDimensionStep(e,t,n,r){return Object.values(e.triggers).some((e=>e.updateTrigger?r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged[e.updateTrigger]):t[e.prop]!==n[e.prop]))}getDimensionChanges(e,t,n){const r=[];for(const i in this.dimensionUpdaters){const o=M.find((r=>this.needUpdateDimensionStep(this.dimensionUpdaters[i][r],e,t,n)));o&&r.push(this.dimensionUpdaters[i][o].updater.bind(this,t,this.dimensionUpdaters[i]))}return r.length?r:null}getUpdateTriggers(e){const t=e.updateTriggers||{},n={};for(const r in this.dimensionUpdaters){const{accessor:i}=this.dimensionUpdaters[r];n[i]={},M.forEach((o=>{Object.values(this.dimensionUpdaters[r][o].triggers).forEach((r=>{let{prop:o,updateTrigger:a}=r;if(a){const e=t[a];"object"!==typeof e||Array.isArray(e)?void 0!==e&&(n[i][o]=e):Object.assign(n[i],e)}else n[i][o]=e[o]}))}))}return n}getSortedBins(e){for(const t in this.dimensionUpdaters)this.getDimensionSortedBins(e,this.dimensionUpdaters[t])}getDimensionSortedBins(e,t){const{key:n}=t,{getValue:r}=this.state.dimensions[n],i=new _(this.state.layerData.data||[],{getValue:r,filterData:e._filterData});this.setDimensionState(n,{sortedBins:i}),this.getDimensionValueDomain(e,t)}getDimensionValueDomain(e,t){const{getDomain:n,key:r}=t,{triggers:{lowerPercentile:i,upperPercentile:o,scaleType:a}}=n,s=this.state.dimensions[r].sortedBins.getValueDomainByScale(e[a.prop],[e[i.prop],e[o.prop]]);this.setDimensionState(r,{valueDomain:s}),this.getDimensionScale(e,t)}getDimensionScale(e,t){const{key:n,getScaleFunc:r,getDomain:i}=t,{domain:o,range:c}=r.triggers,{scaleType:u}=i.triggers,{onSet:h}=r,f=e[c.prop],p=e[o.prop]||this.state.dimensions[n].valueDomain,g=function(e){switch(e){case"quantize":default:return a;case"linear":return s;case"quantile":return l;case"ordinal":return d}}(u&&e[u.prop]),m=g(p,f);"object"===typeof h&&"function"===typeof e[h.props]&&e[h.props](m.domain()),this.setDimensionState(n,{scaleFunc:m})}getSubLayerDimensionAttribute(e,t){return n=>{const{sortedBins:r,scaleFunc:i}=this.state.dimensions[e],o=r.binMap[n.index];if(o&&0===o.counts)return t;const a=o&&o.value,s=i.domain();return a>=s[0]&&a<=s[s.length-1]?i(a):t}}getSubLayerAccessors(e){const t={};for(const n in this.dimensionUpdaters){const{accessor:r}=this.dimensionUpdaters[n];t[r]=this.getSubLayerDimensionAttribute(e,n)}return t}getPickingInfo(e){let{info:t}=e;let n=null;if(t.picked&&t.index>-1){const e=this.state.layerData.data[t.index],r={};for(const t in this.dimensionUpdaters){const{pickingInfo:n}=this.dimensionUpdaters[t],{sortedBins:i}=this.state.dimensions[t],o=i.binMap[e.index]&&i.binMap[e.index].value;r[n]=o}n=Object.assign(r,e,{points:e.filteredPoints||e.points})}return t.picked=Boolean(n),t.object=n,t}getAccessor(e){return this.dimensionUpdaters.hasOwnProperty(e)?this.dimensionUpdaters[e].attributeAccessor:T}}},6525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,z:()=>o});var r=n(65148);let i={};function o(e){i=e}function a(e,t,n,o){r.Z.level>0&&i[e]&&i[e].call(null,t,n,o)}},21921:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(68185),i=n(6509),o=n(87966),a=n(64180);class s{constructor(e,t){(0,r.Z)(this,"opts",void 0),(0,r.Z)(this,"source",void 0),this.opts=t,this.source=e}get value(){return this.source.value}getValue(){const e=this.source.getBuffer(),t=this.getAccessor();if(e)return[e,t];const{value:n}=this.source,{size:r}=t;let i=n;if(n&&n.length!==r){i=new Float32Array(r);const e=t.elementOffset||0;for(let t=0;t=i){const n=new Array(r).fill(1/0),o=new Array(r).fill(-1/0);for(let e=0;eo[i]&&(o[i]=r)}e=[n,o]}}return this.state.bounds=e,e}setData(e){const{state:t}=this;let n;n=ArrayBuffer.isView(e)?{value:e}:e instanceof a.Z?{buffer:e}:e;const r={...this.settings,...n};if(t.bufferAccessor=r,t.bounds=null,n.constant){let e=n.value;e=this._normalizeValue(e,[],0),this.settings.normalized&&(e=this.normalizeConstant(e));if(!(!t.constant||!this._areValuesEqual(e,this.value)))return!1;t.externalBuffer=null,t.constant=!0,this.value=e}else if(n.buffer){const e=n.buffer;t.externalBuffer=e,t.constant=!1,this.value=n.value||null;const i=n.value instanceof Float64Array;r.type=n.type||e.accessor.type,r.bytesPerElement=e.accessor.BYTES_PER_ELEMENT*(i?2:1),r.stride=d(r)}else if(n.value){this._checkExternalBuffer(n);let e=n.value;t.externalBuffer=null,t.constant=!1,this.value=e,r.bytesPerElement=e.BYTES_PER_ELEMENT,r.stride=d(r);const{buffer:i,byteOffset:o}=this;this.doublePrecision&&e instanceof Float64Array&&(e=(0,c.TK)(e,r));const a=e.byteLength+o+2*r.stride;i.byteLength0&&void 0!==arguments[0]?arguments[0]:{};this.state.bounds=null;const t=this.value,{startOffset:n=0,endOffset:r}=e;this.buffer.subData({data:this.doublePrecision&&t instanceof Float64Array?(0,c.TK)(t,{size:this.size,startIndex:n,endIndex:r}):t.subarray(n,r),offset:n*t.BYTES_PER_ELEMENT+this.byteOffset})}allocate(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{state:n}=this,r=n.allocatedValue,i=l.Z.allocate(r,e+1,{size:this.size,type:this.settings.defaultType,copy:t});this.value=i;const{buffer:o,byteOffset:a}=this;return o.byteLength(e+128)/255*2-1));case 5122:return new Float32Array(e).map((e=>(e+32768)/65535*2-1));case 5121:return new Float32Array(e).map((e=>e/255));case 5123:return new Float32Array(e).map((e=>e/65535));default:return e}}_normalizeValue(e,t,n){const{defaultValue:r,size:i}=this.settings;if(Number.isFinite(e))return t[n]=e,t;if(!e){let e=i;for(;--e>=0;)t[n+e]=r[e];return t}switch(i){case 4:t[n+3]=Number.isFinite(e[3])?e[3]:r[3];case 3:t[n+2]=Number.isFinite(e[2])?e[2]:r[2];case 2:t[n+1]=Number.isFinite(e[1])?e[1]:r[1];case 1:t[n+0]=Number.isFinite(e[0])?e[0]:r[0];break;default:let o=i;for(;--o>=0;)t[n+o]=Number.isFinite(e[o])?e[o]:r[o]}return t}_areValuesEqual(e,t){if(!e||!t)return!1;const{size:n}=this;for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:{};const t=this.state.needsRedraw;return this.state.needsRedraw=t&&!e,t}getUpdateTriggers(){const{accessor:e}=this.settings;return[this.id].concat("function"!==typeof e&&e||[])}supportsTransition(){return Boolean(this.settings.transition)}getTransitionSetting(e){if(!e||!this.supportsTransition())return null;const{accessor:t}=this.settings,n=this.settings.transition,r=Array.isArray(t)?e[t.find((t=>e[t]))]:e[t];return(0,y.M0)(r,n)}setNeedsUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,t=arguments.length>1?arguments[1]:void 0;if(this.state.needsUpdate=this.state.needsUpdate||e,this.setNeedsRedraw(e),t){const{startRow:e=0,endRow:n=1/0}=t;this.state.updateRanges=function(e,t){if(e===v)return e;if(t[0]<0&&(t[0]=0),t[0]>=t[1])return e;const n=[],r=e.length;let i=0;for(let o=0;ot[1]?n.push(r):t=[Math.min(r[0],t[0]),Math.max(r[1],t[1])]}return n.splice(i,0,t),n}(this.state.updateRanges,[e,n])}else this.state.updateRanges=v}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=A}setNeedsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;this.state.needsRedraw=this.state.needsRedraw||e}allocate(e){const{state:t,settings:n}=this;return!n.noAlloc&&(!!n.update&&(super.allocate(e,t.updateRanges!==v),!0))}updateBuffer(e){let{numInstances:t,data:n,props:r,context:i}=e;if(!this.needsUpdate())return!1;const{state:{updateRanges:o},settings:{update:a,noAlloc:s}}=this;let l=!0;if(a){for(const[e,s]of o)a.call(i,this,{data:n,startRow:e,endRow:s,props:r,numInstances:t});if(this.value)if(this.constant||this.buffer.byteLength1&&void 0!==arguments[1]?arguments[1]:null;const{state:n,settings:r}=this;if(!e)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===e)return this.clearNeedsUpdate(),!0;n.binaryValue=e,this.setNeedsRedraw();if(r.transform||t!==this.startIndices){ArrayBuffer.isView(e)&&(e={value:e});const i=e;(0,p.Z)(ArrayBuffer.isView(i.value),"invalid ".concat(r.accessor));const o=Boolean(i.size)&&i.size!==this.size;return n.binaryAccessor=(0,g.jr)(i.value,{size:i.size||this.size,stride:i.stride,offset:i.offset,startIndices:t,nested:o}),!1}return this.clearNeedsUpdate(),this.setData(e),!0}getVertexOffset(e){const{startIndices:t}=this;return(t?eu?c.set(t,v):(e._normalizeValue(t,b.target,0),(0,m.k)({target:c,source:b.target,start:v,count:n}));v+=n*u}else e._normalizeValue(t,c,v),v+=u}}_validateAttributeUpdaters(){const{settings:e}=this;if(!(e.noAlloc||"function"===typeof e.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}_checkAttributeArray(){const{value:e}=this,t=Math.min(4,this.size);if(e&&e.length>=t){let n=!0;switch(t){case 4:n=n&&Number.isFinite(e[3]);case 3:n=n&&Number.isFinite(e[2]);case 2:n=n&&Number.isFinite(e[1]);case 1:n=n&&Number.isFinite(e[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}}var _=n(12091),w=n(6525),x=n(15966),E=n(78191);const S="\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n";var C=n(77378),P=n(81786),T=n(64282);const M={interpolation:class{constructor(e){let{gl:t,attribute:n,timeline:i}=e;(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"type","interpolation"),(0,r.Z)(this,"attributeInTransition",void 0),(0,r.Z)(this,"settings",void 0),(0,r.Z)(this,"attribute",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"currentStartIndices",void 0),(0,r.Z)(this,"currentLength",void 0),(0,r.Z)(this,"transform",void 0),(0,r.Z)(this,"buffers",void 0),this.gl=t,this.transition=new E.Z(i),this.attribute=n,this.attributeInTransition=new b(t,n.settings),this.currentStartIndices=n.startIndices,this.currentLength=0,this.transform=function(e,t){const n=(0,y.w)(t.size);return new x.Z(e,{vs:S,defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(t,n);const o={byteLength:0,usage:35050};this.buffers=[new a.Z(t,o),new a.Z(t,o)]}get inProgress(){return this.transition.inProgress}start(e,t){if(e.duration<=0)return void this.transition.cancel();this.settings=e;const{gl:n,buffers:r,attribute:i}=this;(0,y.DY)(r);const o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const a of r)(0,y.IV)({buffer:a,...o});this.currentStartIndices=i.startIndices,this.currentLength=(0,y.pi)(i,t),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start(e),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:(0,y.AQ)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}update(){const e=this.transition.update();if(e){const{duration:e,easing:t}=this.settings,{time:n}=this.transition;let r=n/e;t&&(r=t(r)),this.transform.run({uniforms:{time:r}})}return e}cancel(){this.transition.cancel(),this.transform.delete();for(const e of this.buffers)e.delete();this.buffers.length=0}},spring:class{constructor(e){let{gl:t,attribute:n,timeline:i}=e;(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"type","spring"),(0,r.Z)(this,"attributeInTransition",void 0),(0,r.Z)(this,"settings",void 0),(0,r.Z)(this,"attribute",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"currentStartIndices",void 0),(0,r.Z)(this,"currentLength",void 0),(0,r.Z)(this,"texture",void 0),(0,r.Z)(this,"framebuffer",void 0),(0,r.Z)(this,"transform",void 0),(0,r.Z)(this,"buffers",void 0),this.gl=t,this.type="spring",this.transition=new E.Z(i),this.attribute=n,this.attributeInTransition=new b(t,{...n.settings,normalized:!1}),this.currentStartIndices=n.startIndices,this.currentLength=0,this.texture=function(e){return new P.Z(e,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(t),this.framebuffer=function(e,t){return new T.Z(e,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:{36064:t}})}(t,this.texture),this.transform=function(e,t,n){const r=(0,y.w)(t.size);return new x.Z(e,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n ATTRIBUTE_TYPE velocity = cur - prev;\n ATTRIBUTE_TYPE delta = dest - cur;\n ATTRIBUTE_TYPE spring = delta * stiffness;\n ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(t,n,this.framebuffer);const o={byteLength:0,usage:35050};this.buffers=[new a.Z(t,o),new a.Z(t,o),new a.Z(t,o)]}get inProgress(){return this.transition.inProgress}start(e,t){const{gl:n,buffers:r,attribute:i}=this,o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const a of r)(0,y.IV)({buffer:a,...o});this.settings=e,this.currentStartIndices=i.startIndices,this.currentLength=(0,y.pi)(i,t),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start({...e,duration:1/0}),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:(0,y.AQ)(n,i)}})}update(){const{buffers:e,transform:t,framebuffer:n,transition:r}=this;if(!r.update())return!1;const i=this.settings;t.update({sourceBuffers:{aPrev:e[0],aCur:e[1]},feedbackBuffers:{vNext:e[2]}}),t.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:i.stiffness,damping:i.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),(0,y.DY)(e),this.attributeInTransition.setData({buffer:e[1],value:this.attribute.value});return(0,C.z6)(n)[0]>0||r.end(),!0}cancel(){this.transition.cancel(),this.transform.delete();for(const e of this.buffers)e.delete();this.buffers.length=0,this.texture.delete(),this.framebuffer.delete()}}};class k{constructor(e,t){let{id:n,timeline:i}=t;(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"isSupported",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"timeline",void 0),(0,r.Z)(this,"transitions",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"numInstances",void 0),this.id=n,this.gl=e,this.timeline=i,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=x.Z.isSupported(e)}finalize(){for(const e in this.transitions)this._removeTransition(e)}update(e){let{attributes:t,transitions:n,numInstances:r}=e;this.numInstances=r||1;for(const i in t){const e=t[i],r=e.getTransitionSetting(n);r&&this._updateAttribute(i,e,r)}for(const i in this.transitions){const e=t[i];e&&e.getTransitionSetting(n)||this._removeTransition(i)}}hasAttribute(e){const t=this.transitions[e];return t&&t.inProgress}getAttributes(){const e={};for(const t in this.transitions){const n=this.transitions[t];n.inProgress&&(e[t]=n.attributeInTransition)}return e}run(){if(!this.isSupported||0===this.numInstances)return!1;for(const t in this.transitions){this.transitions[t].update()&&(this.needsRedraw=!0)}const e=this.needsRedraw;return this.needsRedraw=!1,e}_removeTransition(e){this.transitions[e].cancel(),delete this.transitions[e]}_updateAttribute(e,t,n){const r=this.transitions[e];let i=!r||r.type!==n.type;if(i){if(!this.isSupported)return void u.Z.warn("WebGL2 not supported by this browser. Transition for ".concat(e," is disabled."))();r&&this._removeTransition(e);const o=M[n.type];o?this.transitions[e]=new o({attribute:t,timeline:this.timeline,gl:this.gl}):(u.Z.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||t.needsRedraw())&&(this.needsRedraw=!0,this.transitions[e].start(n,this.numInstances))}}const R="attributeManager.invalidate";class O{constructor(e){let{id:t="attribute-manager",stats:n,timeline:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"attributes",void 0),(0,r.Z)(this,"updateTriggers",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"userData",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"attributeTransitionManager",void 0),(0,r.Z)(this,"mergeBoundsMemoized",(0,_.Z)(c.cc)),this.id=t,this.gl=e,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new k(e,{id:"".concat(t,"-transitions"),timeline:i}),Object.seal(this)}finalize(){for(const e in this.attributes)this.attributes[e].delete();this.attributeTransitionManager.finalize()}getNeedsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!e.clearRedrawFlags,t&&this.id}setNeedsRedraw(){this.needsRedraw=!0}add(e){this._add(e)}addInstanced(e){this._add(e,{instanced:1})}remove(e){for(const t of e)void 0!==this.attributes[t]&&(this.attributes[t].delete(),delete this.attributes[t])}invalidate(e,t){const n=this._invalidateTrigger(e,t);(0,w.Z)(R,this,e,n)}invalidateAll(e){for(const t in this.attributes)this.attributes[t].setNeedsUpdate(t,e);(0,w.Z)(R,this,"all")}update(e){let{data:t,numInstances:n,startIndices:r=null,transitions:i,props:o={},buffers:a={},context:s={}}=e,l=!1;(0,w.Z)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const c in this.attributes){const e=this.attributes[c],i=e.settings.accessor;e.startIndices=r,e.numInstances=n,o[c]&&u.Z.removed("props.".concat(c),"data.attributes.".concat(c))(),e.setExternalBuffer(a[c])||e.setBinaryValue("string"===typeof i?a[i]:void 0,t.startIndices)||"string"===typeof i&&!a[i]&&e.setConstantValue(o[i])||e.needsUpdate()&&(l=!0,this._updateAttribute({attribute:e,numInstances:n,data:t,props:o,context:s})),this.needsRedraw=this.needsRedraw||e.needsRedraw()}l&&(0,w.Z)("attributeManager.updateEnd",this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:i})}updateTransition(){const{attributeTransitionManager:e}=this,t=e.run();return this.needsRedraw=this.needsRedraw||t,t}getAttributes(){return this.attributes}getBounds(e){const t=e.map((e=>{var t;return null===(t=this.attributes[e])||void 0===t?void 0:t.getBounds()}));return this.mergeBoundsMemoized(t)}getChangedAttributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearChangedFlags:!1};const{attributes:t,attributeTransitionManager:n}=this,r={...n.getAttributes()};for(const i in t){const o=t[i];o.needsRedraw(e)&&!n.hasAttribute(i)&&(r[i]=o)}return r}getShaderAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e||(e=this.getAttributes());const n={};for(const r in e)t[r]||Object.assign(n,e[r].getShaderAttributes());return n}_add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(const n in e){const r=e[n];this.attributes[n]=this._createAttribute(n,r,t)}this._mapUpdateTriggersToAttributes()}_createAttribute(e,t,n){const r={...t,id:e,size:(t.isIndexed?1:t.size)||1,divisor:n.instanced?1:t.divisor||0};return new b(this.gl,r)}_mapUpdateTriggersToAttributes(){const e={};for(const t in this.attributes){this.attributes[t].getUpdateTriggers().forEach((n=>{e[n]||(e[n]=[]),e[n].push(t)}))}this.updateTriggers=e}_invalidateTrigger(e,t){const{attributes:n,updateTriggers:r}=this,i=r[e];return i&&i.forEach((e=>{const r=n[e];r&&r.setNeedsUpdate(r.id,t)})),i}_updateAttribute(e){const{attribute:t,numInstances:n}=e;if((0,w.Z)("attribute.updateStart",t),t.constant)return void t.setConstantValue(t.value);t.allocate(n)&&(0,w.Z)("attribute.allocate",t,n);t.updateBuffer(e)&&(this.needsRedraw=!0,(0,w.Z)("attribute.updateEnd",t,n))}}},83063:(e,t,n)=>{"use strict";function r(e){const{source:t,target:n,start:r=0,size:i,getData:o}=e,a=e.end||n.length,s=t.length,l=a-r;if(s>l)return void n.set(t.subarray(0,l),r);if(n.set(t,r),!o)return;let c=s;for(;cl,pi:()=>c,w:()=>s,AQ:()=>a,M0:()=>o,IV:()=>u});const i={interpolation:{duration:0,easing:e=>e},spring:{stiffness:.05,damping:.5}};function o(e,t){if(!e)return null;Number.isFinite(e)&&(e={type:"interpolation",duration:e});const n=e.type||"interpolation";return{...i[n],...t,...e,type:n}}function a(e,t){const n=t.getBuffer();return n?[n,{divisor:0,size:t.size,normalized:t.settings.normalized}]:t.value}function s(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(e,'"'))}}function l(e){e.push(e.shift())}function c(e,t){const{doublePrecision:n,settings:r,value:i,size:o}=e,a=n&&i instanceof Float64Array?2:1;return(r.noAlloc?i.length:t*o)*a}function u(e){let{buffer:t,numInstances:n,attribute:i,fromLength:o,fromStartIndices:a,getData:s=(e=>e)}=e;const l=i.doublePrecision&&i.value instanceof Float64Array?2:1,u=i.size*l,d=i.byteOffset,h=i.startIndices,f=a&&h,p=c(i,n),g=i.isConstant;if(!f&&o>=p)return;const m=g?i.value:i.getBuffer().getData({srcByteOffset:d});if(i.settings.normalized&&!g){const e=s;s=(t,n)=>i.normalizeConstant(e(t,n))}const A=g?(e,t)=>s(m,t):(e,t)=>s(m.subarray(e,e+u),t),v=t.getData({length:o}),y=new Float32Array(p);!function(e){let{source:t,target:n,size:i,getData:o,sourceStartIndices:a,targetStartIndices:s}=e;if(!Array.isArray(s))return r({source:t,target:n,size:i,getData:o}),n;let l=0,c=0;const u=o&&((e,t)=>o(e+c,t)),d=Math.min(a.length,s.length);for(let h=1;h{"use strict";n.d(t,{Z:()=>l});var r=n(68185),i=n(53104),o=n(6525),a=n(35395),s=n(15672);class l extends i.Z{get isComposite(){return!0}get isLoaded(){return super.isLoaded&&this.getSubLayers().every((e=>e.isLoaded))}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(e){}setState(e){super.setState(e),this.setNeedsUpdate()}getPickingInfo(e){let{info:t}=e;const{object:n}=t;return n&&n.__source&&n.__source.parent&&n.__source.parent.id===this.id?(t.object=n.__source.object,t.index=n.__source.index,t):t}filterSubLayer(e){return!0}shouldRenderSubLayer(e,t){return t&&t.length}getSubLayerClass(e,t){const{_subLayerProps:n}=this.props;return n&&n[e]&&n[e].type||t}getSubLayerRow(e,t,n){return e.__source={parent:this,object:t,index:n},e}getSubLayerAccessor(e){if("function"===typeof e){const t={index:-1,data:this.props.data,target:[]};return(n,r)=>n&&n.__source?(t.index=n.__source.index,e(n.__source.object,t)):e(n,r)}return e}getSubLayerProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:c,highlightColor:u,coordinateSystem:d,coordinateOrigin:h,wrapLongitude:f,positionFormat:p,modelMatrix:g,extensions:m,fetch:A,operation:v,_subLayerProps:y}=this.props,b={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:c,highlightColor:u,coordinateSystem:d,coordinateOrigin:h,wrapLongitude:f,positionFormat:p,modelMatrix:g,extensions:m,fetch:A,operation:v},_=y&&e.id&&y[e.id],w=_&&_.updateTriggers,x=e.id||"sublayer";if(_){const t=this.props[s.Wb],n=e.type?e.type._propTypes:{};for(const e in _){const r=n[e]||t[e];r&&"accessor"===r.type&&(_[e]=this.getSubLayerAccessor(_[e]))}}Object.assign(b,e,_),b.id="".concat(this.props.id,"-").concat(x),b.updateTriggers={all:null===(t=this.props.updateTriggers)||void 0===t?void 0:t.all,...e.updateTriggers,...w};for(const s of m){const e=s.getSubLayerProps.call(this,s);e&&Object.assign(b,e,{updateTriggers:Object.assign(b.updateTriggers,e.updateTriggers)})}return b}_updateAutoHighlight(e){for(const t of this.getSubLayers())t.updateAutoHighlight(e)}_getAttributeManager(){return null}_postUpdate(e,t){let n=this.internalState.subLayers;const r=!n||this.needsUpdate();if(r){const e=this.renderLayers();n=(0,a.x)(e,Boolean),this.internalState.subLayers=n}(0,o.Z)("compositeLayer.renderLayers",this,r,n);for(const i of n)i.parent=this}}(0,r.Z)(l,"layerName","CompositeLayer")},98029:(e,t,n)=>{"use strict";n.d(t,{Df:()=>i,FP:()=>s,iI:()=>a,zG:()=>o});var r=n(65148);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>(r.Z.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0)});const o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},a={common:0,meters:1,pixels:2},s={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}}},21999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>yn});var r=n(68185);let i=1,o=1;class a{constructor(){this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}addChannel(e){const{delay:t=0,duration:n=Number.POSITIVE_INFINITY,rate:r=1,repeat:o=1}=e,a=i++,s={time:0,delay:t,duration:n,rate:r,repeat:o};return this._setChannelTime(s,this.time),this.channels.set(a,s),a}removeChannel(e){this.channels.delete(e);for(const[t,n]of this.animations)n.channel===e&&this.detachAnimation(t)}isFinished(e){const t=this.channels.get(e);return void 0!==t&&this.time>=t.delay+t.duration*t.repeat}getTime(e){if(void 0===e)return this.time;const t=this.channels.get(e);return void 0===t?-1:t.time}setTime(e){this.time=Math.max(0,e);const t=this.channels.values();for(const r of t)this._setChannelTime(r,this.time);const n=this.animations.values();for(const r of n){const{animation:e,channel:t}=r;e.setTime(this.getTime(t))}}play(){this.playing=!0}pause(){this.playing=!1,this.lastEngineTime=-1}reset(){this.setTime(0)}attachAnimation(e,t){const n=o++;return this.animations.set(n,{animation:e,channel:t}),e.setTime(this.getTime(t)),n}detachAnimation(e){this.animations.delete(e)}update(e){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}_setChannelTime(e,t){const n=t-e.delay;n>=e.duration*e.repeat?e.time=e.duration*e.rate:(e.time=Math.max(0,n)%e.duration,e.time*=e.rate)}}var s=n(15672),l=n(65148),c=n(6525),u=n(35395),d=n(89069),h=n(63734);class f{constructor(e,t,n){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"isLoaded",void 0),(0,r.Z)(this,"persistent",void 0),(0,r.Z)(this,"_loadCount",0),(0,r.Z)(this,"_subscribers",new Set),(0,r.Z)(this,"_data",void 0),(0,r.Z)(this,"_loader",void 0),(0,r.Z)(this,"_error",void 0),(0,r.Z)(this,"_content",void 0),this.id=e,this.context=n,this.setData(t)}subscribe(e){this._subscribers.add(e)}unsubscribe(e){this._subscribers.delete(e)}inUse(){return this._subscribers.size>0}delete(){}getData(){return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then((()=>this.getData()))}setData(e,t){if(e===this._data&&!t)return;this._data=e;const n=++this._loadCount;let r=e;"string"===typeof e&&(r=(0,h.z)(e)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then((e=>{this._loadCount===n&&(this.isLoaded=!0,this._error=void 0,this._content=e)})).catch((e=>{this._loadCount===n&&(this.isLoaded=!0,this._error=e||!0)}))):(this.isLoaded=!0,this._error=void 0,this._content=e);for(const i of this._subscribers)i.onChange(this.getData())}}class p{constructor(e){let{gl:t,protocol:n}=e;(0,r.Z)(this,"protocol",void 0),(0,r.Z)(this,"_context",void 0),(0,r.Z)(this,"_resources",void 0),(0,r.Z)(this,"_consumers",void 0),(0,r.Z)(this,"_pruneRequest",void 0),this.protocol=n||"resource://",this._context={gl:t,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(e){return!!e.startsWith(this.protocol)||e in this._resources}add(e){let{resourceId:t,data:n,forceUpdate:r=!1,persistent:i=!0}=e,o=this._resources[t];o?o.setData(n,r):(o=new f(t,n,this._context),this._resources[t]=o),o.persistent=i}remove(e){const t=this._resources[e];t&&(t.delete(),delete this._resources[e])}unsubscribe(e){let{consumerId:t}=e;const n=this._consumers[t];if(n){for(const e in n){const t=n[e],r=this._resources[t.resourceId];r&&r.unsubscribe(t)}delete this._consumers[t],this.prune()}}subscribe(e){let{resourceId:t,onChange:n,consumerId:r,requestId:i="default"}=e;const{_resources:o,protocol:a}=this;t.startsWith(a)&&(t=t.replace(a,""),o[t]||this.add({resourceId:t,data:null,persistent:!1}));const s=o[t];if(this._track(r,i,s,n),s)return s.getData()}prune(){this._pruneRequest||(this._pruneRequest=setTimeout((()=>this._prune()),0))}finalize(){for(const e in this._resources)this._resources[e].delete()}_track(e,t,n,r){const i=this._consumers,o=i[e]=i[e]||{},a=o[t]||{},s=a.resourceId&&this._resources[a.resourceId];s&&(s.unsubscribe(a),this.prune()),n&&(o[t]=a,a.onChange=r,a.resourceId=n.id,n.subscribe(a))}_prune(){this._pruneRequest=null;for(const e of Object.keys(this._resources)){const t=this._resources[e];t.persistent||t.inUse()||(t.delete(),delete this._resources[e])}}}var g=n(43809),m=n(68833),A=n(61518);const v=[A.Z],y=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function b(e){const t=m.Z.getDefaultProgramManager(e);for(const n of v)t.addDefaultModule(n);for(const n of y)t.addShaderHook(n);return t}class _{constructor(e){let{deck:t,stats:n,viewport:i,timeline:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"layers",void 0),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"resourceManager",void 0),(0,r.Z)(this,"_lastRenderedLayers",[]),(0,r.Z)(this,"_needsRedraw",!1),(0,r.Z)(this,"_needsUpdate",!1),(0,r.Z)(this,"_nextLayers",null),(0,r.Z)(this,"_debug",!1),(0,r.Z)(this,"activateViewport",(e=>{(0,c.Z)("layerManager.activateViewport",this,e),e&&(this.context.viewport=e)})),this.layers=[],this.resourceManager=new p({gl:e,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:e,deck:t,programManager:e&&b(e),stats:n||new d.Z({id:"deck.gl"}),viewport:i||new g.Z({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:o||new a,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}finalize(){this.resourceManager.finalize();for(const e of this.layers)this._finalizeLayer(e)}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);for(const n of this.layers){const r=n.getNeedsRedraw(e);t=t||r}return t}needsUpdate(){return this._nextLayers&&this._nextLayers!==this._lastRenderedLayers?"layers changed":this._needsUpdate}setNeedsRedraw(e){this._needsRedraw=this._needsRedraw||e}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e}getLayers(){let{layerIds:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e?this.layers.filter((t=>e.find((e=>0===t.id.indexOf(e))))):this.layers}setProps(e){"debug"in e&&(this._debug=e.debug),"userData"in e&&(this.context.userData=e.userData),"layers"in e&&(this._nextLayers=e.layers),"onError"in e&&(this.context.onError=e.onError)}setLayers(e,t){(0,c.Z)("layerManager.setLayers",this,t,e),this._lastRenderedLayers=e;const n=(0,u.x)(e,Boolean);for(const r of n)r.context=this.context;this._updateLayers(this.layers,n)}updateLayers(){const e=this.needsUpdate();e&&(this.setNeedsRedraw("updating layers: ".concat(e)),this.setLayers(this._nextLayers||this._lastRenderedLayers,e)),this._nextLayers=null}_handleError(e,t,n){n.raiseError(t,"".concat(e," of ").concat(n))}_updateLayers(e,t){const n={};for(const o of e)n[o.id]?l.Z.warn("Multiple old layers with same id ".concat(o.id))():n[o.id]=o;const r=[];this._updateSublayersRecursively(t,n,r),this._finalizeOldLayers(n);let i=!1;for(const o of r)if(o.hasUniformTransition()){i="Uniform transition in ".concat(o);break}this._needsUpdate=i,this.layers=r}_updateSublayersRecursively(e,t,n){for(const i of e){i.context=this.context;const e=t[i.id];null===e&&l.Z.warn("Multiple new layers with same id ".concat(i.id))(),t[i.id]=null;let o=null;try{this._debug&&e!==i&&i.validateProps(),e?(this._transferLayerState(e,i),this._updateLayer(i)):this._initializeLayer(i),n.push(i),o=i.isComposite?i.getSubLayers():null}catch(r){this._handleError("matching",r,i)}o&&this._updateSublayersRecursively(o,t,n)}}_finalizeOldLayers(e){for(const t in e){const n=e[t];n&&this._finalizeLayer(n)}}_initializeLayer(e){try{e._initialize(),e.lifecycle=s.dt.INITIALIZED}catch(t){this._handleError("initialization",t,e)}}_transferLayerState(e,t){t._transferState(e),t.lifecycle=s.dt.MATCHED,t!==e&&(e.lifecycle=s.dt.AWAITING_GC)}_updateLayer(e){try{e._update()}catch(t){this._handleError("update",t,e)}}_finalizeLayer(e){this._needsRedraw=this._needsRedraw||"finalized ".concat(e),e.lifecycle=s.dt.AWAITING_FINALIZATION;try{e._finalize(),e.lifecycle=s.dt.FINALIZED}catch(t){this._handleError("finalization",t,e)}}}var w=n(63549);class x{constructor(e){(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"views",void 0),(0,r.Z)(this,"viewState",void 0),(0,r.Z)(this,"controllers",void 0),(0,r.Z)(this,"timeline",void 0),(0,r.Z)(this,"_viewports",void 0),(0,r.Z)(this,"_viewportMap",void 0),(0,r.Z)(this,"_isUpdating",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"_needsUpdate",void 0),(0,r.Z)(this,"_eventManager",void 0),(0,r.Z)(this,"_eventCallbacks",void 0),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=e.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="First render",this._needsUpdate="Initialize",this._eventManager=e.eventManager,this._eventCallbacks={onViewStateChange:e.onViewStateChange,onInteractionStateChange:e.onInteractionStateChange},Object.seal(this),this.setProps(e)}finalize(){for(const e in this.controllers){const t=this.controllers[e];t&&t.finalize()}this.controllers={}}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e,this._needsRedraw=this._needsRedraw||e}updateViewStates(){for(const e in this.controllers){const t=this.controllers[e];t&&t.updateTransition()}}getViewports(e){return e?this._viewports.filter((t=>t.containsPixel(e))):this._viewports}getViews(){const e={};return this.views.forEach((t=>{e[t.id]=t})),e}getView(e){return this.views.find((t=>t.id===e))}getViewState(e){const t="string"===typeof e?this.getView(e):e,n=t&&this.viewState[t.getViewStateId()]||this.viewState;return t?t.filterViewState(n):n}getViewport(e){return this._viewportMap[e]}unproject(e,t){const n=this.getViewports(),r={x:e[0],y:e[1]};for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.containsPixel(r)){const n=e.slice();return n[0]-=o.x,n[1]-=o.y,o.unproject(n,t)}}return null}setProps(e){e.views&&this._setViews(e.views),e.viewState&&this._setViewState(e.viewState),("width"in e||"height"in e)&&this._setSize(e.width,e.height),this._isUpdating||this._update()}_update(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}_setSize(e,t){e===this.width&&t===this.height||(this.width=e,this.height=t,this.setNeedsUpdate("Size changed"))}_setViews(e){e=(0,u.x)(e,Boolean);this._diffViews(e,this.views)&&this.setNeedsUpdate("views changed"),this.views=e}_setViewState(e){if(e){!(0,w.v)(e,this.viewState,3)&&this.setNeedsUpdate("viewState changed"),this.viewState=e}else l.Z.warn("missing `viewState` or `initialViewState`")()}_onViewStateChange(e,t){this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange({...t,viewId:e})}_createController(e,t){return new(0,t.type)({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,t.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:t=>{var n;return null===(n=this.getView(e.id))||void 0===n?void 0:n.makeViewport({viewState:t,width:this.width,height:this.height})}})}_updateController(e,t,n,r){const i=e.controller;if(i){const o={...t,...i,id:e.id,x:n.x,y:n.y,width:n.width,height:n.height};return r||(r=this._createController(e,o)),r&&r.setProps(o),r}return null}_rebuildViewports(){const{views:e}=this,t=this.controllers;this._viewports=[],this.controllers={};let n=!1;for(let r=e.length;r--;){const i=e[r],o=this.getViewState(i),a=i.makeViewport({viewState:o,width:this.width,height:this.height});let s=t[i.id];const l=Boolean(i.controller);l&&!s&&(n=!0),!n&&l||!s||(s.finalize(),s=null),this.controllers[i.id]=this._updateController(i,o,a,s),this._viewports.unshift(a)}for(const r in t){const e=t[r];e&&!this.controllers[r]&&e.finalize()}this._buildViewportMap()}_buildViewportMap(){this._viewportMap={},this._viewports.forEach((e=>{e.id&&(this._viewportMap[e.id]=this._viewportMap[e.id]||e)}))}_diffViews(e,t){return e.length!==t.length||e.some(((n,r)=>!e[r].equals(t[r])))}}const E=/([0-9]+\.?[0-9]*)(%|px)/;function S(e){switch(typeof e){case"number":return{position:e,relative:!1};case"string":const t=E.exec(e);if(t&&t.length>=3){const e="%"===t[2],n=parseFloat(t[1]);return{position:e?n/100:n,relative:e}}default:throw new Error("Could not parse position string ".concat(e))}}function C(e,t){return e.relative?Math.round(e.position*t):e.position}var P=n(37954);class T{constructor(e){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"viewportInstance",void 0),(0,r.Z)(this,"_x",void 0),(0,r.Z)(this,"_y",void 0),(0,r.Z)(this,"_width",void 0),(0,r.Z)(this,"_height",void 0),(0,r.Z)(this,"_padding",void 0),(0,r.Z)(this,"props",void 0);const{id:t,x:n=0,y:i=0,width:o="100%",height:a="100%",padding:s=null,viewportInstance:l}=e||{};(0,P.Z)(!l||l instanceof g.Z),this.viewportInstance=l,this.id=t||this.constructor.displayName||"view",this.props={...e,id:this.id},this._x=S(n),this._y=S(i),this._width=S(o),this._height=S(a),this._padding=s&&{left:S(s.left||0),right:S(s.right||0),top:S(s.top||0),bottom:S(s.bottom||0)},this.equals=this.equals.bind(this),Object.seal(this)}equals(e){return this===e||(this.viewportInstance?!!e.viewportInstance&&this.viewportInstance.equals(e.viewportInstance):this.ViewportType===e.ViewportType&&(0,w.v)(this.props,e.props,2))}makeViewport(e){let{width:t,height:n,viewState:r}=e;if(this.viewportInstance)return this.viewportInstance;r=this.filterViewState(r);const i=this.getDimensions({width:t,height:n});return new this.ViewportType({...r,...this.props,...i})}getViewStateId(){const{viewState:e}=this.props;return"string"===typeof e?e:(null===e||void 0===e?void 0:e.id)||this.id}filterViewState(e){if(this.props.viewState&&"object"===typeof this.props.viewState){if(!this.props.viewState.id)return this.props.viewState;const t={...e};for(const e in this.props.viewState)"id"!==e&&(t[e]=this.props.viewState[e]);return t}return e}getDimensions(e){let{width:t,height:n}=e;const r={x:C(this._x,t),y:C(this._y,n),width:C(this._width,t),height:C(this._height,n)};return this._padding&&(r.padding={left:C(this._padding.left,t),top:C(this._padding.top,n),right:C(this._padding.right,t),bottom:C(this._padding.bottom,n)}),r}get controller(){const e=this.props.controller;return e?!0===e?{type:this.ControllerType}:"function"===typeof e?{type:e}:{type:this.ControllerType,...e}:null}}var M=n(5550),k=n(30373),R=n(78191);const O=()=>{},I=2,L=3,D=e=>e,N=1;class F{constructor(e){(0,r.Z)(this,"getControllerState",void 0),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"propsInTransition",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"onViewStateChange",void 0),(0,r.Z)(this,"onStateChange",void 0),(0,r.Z)(this,"_onTransitionUpdate",(e=>{const{time:t,settings:{interpolator:n,startProps:r,endProps:i,duration:o,easing:a}}=e,s=a(t/o),l=n.interpolateProps(r,i,s);this.propsInTransition=this.getControllerState({...this.props,...l}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})})),this.getControllerState=e.getControllerState,this.propsInTransition=null,this.transition=new R.Z(e.timeline),this.onViewStateChange=e.onViewStateChange||O,this.onStateChange=e.onStateChange||O}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(e){let t=!1;const n=this.props;if(this.props=e,!n||this._shouldIgnoreViewportChange(n,e))return!1;if(this._isTransitionEnabled(e)){let r=n;if(this.transition.inProgress){const{interruption:e,endProps:t}=this.transition.settings;r={...n,...e===I?t:this.propsInTransition||n}}this._triggerTransition(r,e),t=!0}else this.transition.cancel();return t}updateTransition(){this.transition.update()}_isTransitionEnabled(e){const{transitionDuration:t,transitionInterpolator:n}=e;return(t>0||"auto"===t)&&Boolean(n)}_isUpdateDueToCurrentTransition(e){return!(!this.transition.inProgress||!this.propsInTransition)&&this.transition.settings.interpolator.arePropsEqual(e,this.propsInTransition)}_shouldIgnoreViewportChange(e,t){return this.transition.inProgress?this.transition.settings.interruption===L||this._isUpdateDueToCurrentTransition(t):!this._isTransitionEnabled(t)||t.transitionInterpolator.arePropsEqual(e,t)}_triggerTransition(e,t){const n=this.getControllerState(e),r=this.getControllerState(t).shortestPathFrom(n),i=t.transitionInterpolator,o=i.getDuration?i.getDuration(e,t):t.transitionDuration;if(0===o)return;const a=i.initializeProps(e,r);this.propsInTransition={};const s={duration:o,easing:t.transitionEasing||D,interpolator:i,interruption:t.transitionInterruption||N,startProps:a.start,endProps:a.end,onStart:t.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(t.onTransitionInterrupt),onEnd:this._onTransitionEnd(t.onTransitionEnd)};this.transition.start(s),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(e){return t=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),null===e||void 0===e||e(t)}}}class j{constructor(e){(0,r.Z)(this,"_propsToCompare",void 0),(0,r.Z)(this,"_propsToExtract",void 0),(0,r.Z)(this,"_requiredProps",void 0);const{compare:t,extract:n,required:i}=e;this._propsToCompare=t,this._propsToExtract=n||t,this._requiredProps=i}arePropsEqual(e,t){for(const n of this._propsToCompare)if(!(n in e)||!(n in t)||!(0,k.fS)(e[n],t[n]))return!1;return!0}initializeProps(e,t){const n={},r={};for(const i of this._propsToExtract)(i in e||i in t)&&(n[i]=e[i],r[i]=t[i]);return this._checkRequiredProps(n),this._checkRequiredProps(r),{start:n,end:r}}getDuration(e,t){return t.transitionDuration}_checkRequiredProps(e){this._requiredProps&&this._requiredProps.forEach((t=>{const n=e[t];(0,P.Z)(Number.isFinite(n)||Array.isArray(n),"".concat(t," is required for transition"))}))}}const B=["longitude","latitude","zoom","bearing","pitch"],z=["longitude","latitude","zoom"];class Z extends j{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Array.isArray(e)?e:e.transitionProps,n=Array.isArray(e)?{}:e;n.transitionProps=Array.isArray(t)?{compare:t,required:t}:t||{compare:B,required:z},super(n.transitionProps),(0,r.Z)(this,"opts",void 0),this.opts=n}initializeProps(e,t){const n=super.initializeProps(e,t),{makeViewport:r,around:i}=this.opts;if(r&&i){const o=r(e),a=r(t),s=o.unproject(i);n.start.around=i,Object.assign(n.end,{around:a.project(s),aroundPosition:s,width:t.width,height:t.height})}return n}interpolateProps(e,t,n){const r={};for(const i of this._propsToExtract)r[i]=(0,k.t7)(e[i]||0,t[i]||0,n);if(t.aroundPosition&&this.opts.makeViewport){const i=this.opts.makeViewport({...t,...r});Object.assign(r,i.panByPosition(t.aroundPosition,(0,k.t7)(e.around,t.around,n)))}return r}}const U={transitionDuration:0},H=e=>1-(1-e)*(1-e),V=["wheel"],G=["panstart","panmove","panend"],W=["pinchstart","pinchmove","pinchend"],q=["tripanstart","tripanmove","tripanend"],Y=["doubletap"],X=["keydown"],K={};class Q{constructor(e){(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"state",{}),(0,r.Z)(this,"transitionManager",void 0),(0,r.Z)(this,"eventManager",void 0),(0,r.Z)(this,"onViewStateChange",void 0),(0,r.Z)(this,"onStateChange",void 0),(0,r.Z)(this,"makeViewport",void 0),(0,r.Z)(this,"_controllerState",void 0),(0,r.Z)(this,"_events",{}),(0,r.Z)(this,"_interactionState",{isDragging:!1}),(0,r.Z)(this,"_customEvents",[]),(0,r.Z)(this,"_eventStartBlocked",null),(0,r.Z)(this,"_panMove",!1),(0,r.Z)(this,"invertPan",!1),(0,r.Z)(this,"dragMode","rotate"),(0,r.Z)(this,"inertia",0),(0,r.Z)(this,"scrollZoom",!0),(0,r.Z)(this,"dragPan",!0),(0,r.Z)(this,"dragRotate",!0),(0,r.Z)(this,"doubleClickZoom",!0),(0,r.Z)(this,"touchZoom",!0),(0,r.Z)(this,"touchRotate",!1),(0,r.Z)(this,"keyboard",!0),this.transitionManager=new F({...e,getControllerState:e=>new this.ControllerState(e),onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)}),this.handleEvent=this.handleEvent.bind(this),this.eventManager=e.eventManager,this.onViewStateChange=e.onViewStateChange||(()=>{}),this.onStateChange=e.onStateChange||(()=>{}),this.makeViewport=e.makeViewport}set events(e){this.toggleEvents(this._customEvents,!1),this.toggleEvents(e,!0),this._customEvents=e,this.props&&this.setProps(this.props)}finalize(){for(const t in this._events){var e;if(this._events[t])null===(e=this.eventManager)||void 0===e||e.off(t,this.handleEvent)}this.transitionManager.finalize()}handleEvent(e){this._controllerState=void 0;const t=this._eventStartBlocked;switch(e.type){case"panstart":return!t&&this._onPanStart(e);case"panmove":return this._onPan(e);case"panend":return this._onPanEnd(e);case"pinchstart":return!t&&this._onPinchStart(e);case"pinchmove":return this._onPinch(e);case"pinchend":return this._onPinchEnd(e);case"tripanstart":return!t&&this._onTriplePanStart(e);case"tripanmove":return this._onTriplePan(e);case"tripanend":return this._onTriplePanEnd(e);case"doubletap":return this._onDoubleTap(e);case"wheel":return this._onWheel(e);case"keydown":return this._onKeyDown(e);default:return!1}}get controllerState(){return this._controllerState=this._controllerState||new this.ControllerState({makeViewport:this.makeViewport,...this.props,...this.state}),this._controllerState}getCenter(e){const{x:t,y:n}=this.props,{offsetCenter:r}=e;return[r.x-t,r.y-n]}isPointInBounds(e,t){const{width:n,height:r}=this.props;if(t&&t.handled)return!1;const i=e[0]>=0&&e[0]<=n&&e[1]>=0&&e[1]<=r;return i&&t&&t.stopPropagation(),i}isFunctionKeyPressed(e){const{srcEvent:t}=e;return Boolean(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}isDragging(){return this._interactionState.isDragging||!1}blockEvents(e){const t=setTimeout((()=>{this._eventStartBlocked===t&&(this._eventStartBlocked=null)}),e);this._eventStartBlocked=t}setProps(e){e.dragMode&&(this.dragMode=e.dragMode),this.props=e,"transitionInterpolator"in e||(e.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(e);const{inertia:t}=e;this.inertia=Number.isFinite(t)?t:!0===t?300:0;const{scrollZoom:n=!0,dragPan:r=!0,dragRotate:i=!0,doubleClickZoom:o=!0,touchZoom:a=!0,touchRotate:s=!1,keyboard:l=!0}=e,c=Boolean(this.onViewStateChange);this.toggleEvents(V,c&&n),this.toggleEvents(G,c&&(r||i)),this.toggleEvents(W,c&&(a||s)),this.toggleEvents(q,c&&s),this.toggleEvents(Y,c&&o),this.toggleEvents(X,c&&l),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=a,this.touchRotate=s,this.keyboard=l}updateTransition(){this.transitionManager.updateTransition()}toggleEvents(e,t){this.eventManager&&e.forEach((e=>{this._events[e]!==t&&(this._events[e]=t,t?this.eventManager.on(e,this.handleEvent):this.eventManager.off(e,this.handleEvent))}))}updateViewport(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={...e.getViewportProps(),...t},i=this.controllerState!==e;if(this.state=e.getState(),this._setInteractionState(n),i){const e=this.controllerState&&this.controllerState.getViewportProps();this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:e})}}_onTransition(e){this.onViewStateChange({...e,interactionState:this._interactionState})}_setInteractionState(e){Object.assign(this._interactionState,e),this.onStateChange(this._interactionState)}_onPanStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;let n=this.isFunctionKeyPressed(e)||e.rightButton||!1;(this.invertPan||"pan"===this.dragMode)&&(n=!n);const r=this.controllerState[n?"panStart":"rotateStart"]({pos:t});return this._panMove=n,this.updateViewport(r,U,{isDragging:!0}),!0}_onPan(e){return!!this.isDragging()&&(this._panMove?this._onPanMove(e):this._onPanRotate(e))}_onPanEnd(e){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(e):this._onPanRotateEnd(e))}_onPanMove(e){if(!this.dragPan)return!1;const t=this.getCenter(e),n=this.controllerState.pan({pos:t});return this.updateViewport(n,U,{isDragging:!0,isPanning:!0}),!0}_onPanMoveEnd(e){const{inertia:t}=this;if(this.dragPan&&t&&e.velocity){const n=this.getCenter(e),r=[n[0]+e.velocityX*t/2,n[1]+e.velocityY*t/2],i=this.controllerState.pan({pos:r}).panEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:H},{isDragging:!1,isPanning:!0})}else{const e=this.controllerState.panEnd();this.updateViewport(e,null,{isDragging:!1,isPanning:!1})}return!0}_onPanRotate(e){if(!this.dragRotate)return!1;const t=this.getCenter(e),n=this.controllerState.rotate({pos:t});return this.updateViewport(n,U,{isDragging:!0,isRotating:!0}),!0}_onPanRotateEnd(e){const{inertia:t}=this;if(this.dragRotate&&t&&e.velocity){const n=this.getCenter(e),r=[n[0]+e.velocityX*t/2,n[1]+e.velocityY*t/2],i=this.controllerState.rotate({pos:r}).rotateEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:H},{isDragging:!1,isRotating:!0})}else{const e=this.controllerState.rotateEnd();this.updateViewport(e,null,{isDragging:!1,isRotating:!1})}return!0}_onWheel(e){if(!this.scrollZoom)return!1;e.srcEvent.preventDefault();const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const{speed:n=.01,smooth:r=!1}=!0===this.scrollZoom?{}:this.scrollZoom,{delta:i}=e;let o=2/(1+Math.exp(-Math.abs(i*n)));i<0&&0!==o&&(o=1/o);const a=this.controllerState.zoom({pos:t,scale:o});return this.updateViewport(a,{...this._getTransitionProps({around:t}),transitionDuration:r?250:1},{isZooming:!0,isPanning:!0}),!0}_onTriplePanStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.controllerState.rotateStart({pos:t});return this.updateViewport(n,U,{isDragging:!0}),!0}_onTriplePan(e){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;const t=this.getCenter(e);t[0]-=e.deltaX;const n=this.controllerState.rotate({pos:t});return this.updateViewport(n,U,{isDragging:!0,isRotating:!0}),!0}_onTriplePanEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this;if(this.touchRotate&&t&&e.velocityY){const n=this.getCenter(e),r=[n[0],n[1]+=e.velocityY*t/2],i=this.controllerState.rotate({pos:r});this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:H},{isDragging:!1,isRotating:!0}),this.blockEvents(t)}else{const e=this.controllerState.rotateEnd();this.updateViewport(e,null,{isDragging:!1,isRotating:!1})}return!0}_onPinchStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.controllerState.zoomStart({pos:t}).rotateStart({pos:t});return K._startPinchRotation=e.rotation,K._lastPinchEvent=e,this.updateViewport(n,U,{isDragging:!0}),!0}_onPinch(e){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;let t=this.controllerState;if(this.touchZoom){const{scale:n}=e,r=this.getCenter(e);t=t.zoom({pos:r,scale:n})}if(this.touchRotate){const{rotation:n}=e;t=t.rotate({deltaAngleX:K._startPinchRotation-n})}return this.updateViewport(t,U,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),K._lastPinchEvent=e,!0}_onPinchEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this,{_lastPinchEvent:n}=K;if(this.touchZoom&&t&&n&&e.scale!==n.scale){const r=this.getCenter(e);let i=this.controllerState.rotateEnd();const o=Math.log2(e.scale),a=(o-Math.log2(n.scale))/(e.deltaTime-n.deltaTime),s=Math.pow(2,o+a*t/2);i=i.zoom({pos:r,scale:s}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:t,transitionEasing:H},{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(t)}else{const e=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return K._startPinchRotation=null,K._lastPinchEvent=null,!0}_onDoubleTap(e){if(!this.doubleClickZoom)return!1;const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.isFunctionKeyPressed(e),r=this.controllerState.zoom({pos:t,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps({around:t}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}_onKeyDown(e){if(!this.keyboard)return!1;const t=this.isFunctionKeyPressed(e),{zoomSpeed:n,moveSpeed:r,rotateSpeedX:i,rotateSpeedY:o}=!0===this.keyboard?{}:this.keyboard,{controllerState:a}=this;let s;const l={};switch(e.srcEvent.code){case"Minus":s=t?a.zoomOut(n).zoomOut(n):a.zoomOut(n),l.isZooming=!0;break;case"Equal":s=t?a.zoomIn(n).zoomIn(n):a.zoomIn(n),l.isZooming=!0;break;case"ArrowLeft":t?(s=a.rotateLeft(i),l.isRotating=!0):(s=a.moveLeft(r),l.isPanning=!0);break;case"ArrowRight":t?(s=a.rotateRight(i),l.isRotating=!0):(s=a.moveRight(r),l.isPanning=!0);break;case"ArrowUp":t?(s=a.rotateUp(o),l.isRotating=!0):(s=a.moveUp(r),l.isPanning=!0);break;case"ArrowDown":t?(s=a.rotateDown(o),l.isRotating=!0):(s=a.moveDown(r),l.isPanning=!0);break;default:return!1}return this.updateViewport(s,this._getTransitionProps(),l),!0}_getTransitionProps(e){const{transition:t}=this;return t&&t.transitionInterpolator?e?{...t,transitionInterpolator:new Z({...e,...t.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:t:U}}class ${constructor(e,t){(0,r.Z)(this,"_viewportProps",void 0),(0,r.Z)(this,"_state",void 0),this._viewportProps=this.applyConstraints(e),this._state=t}getViewportProps(){return this._viewportProps}getState(){return this._state}}var J=n(1384);class ee extends ${constructor(e){const{width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s=0,pitch:l=0,altitude:c=1.5,position:u=[0,0,0],maxZoom:d=20,minZoom:h=0,maxPitch:f=60,minPitch:p=0,startPanLngLat:g,startZoomLngLat:m,startRotatePos:A,startBearing:v,startPitch:y,startZoom:b,normalize:_=!0}=e;(0,P.Z)(Number.isFinite(o)),(0,P.Z)(Number.isFinite(i)),(0,P.Z)(Number.isFinite(a)),super({width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s,pitch:l,altitude:c,maxZoom:d,minZoom:h,maxPitch:f,minPitch:p,normalize:_,position:u},{startPanLngLat:g,startZoomLngLat:m,startRotatePos:A,startBearing:v,startPitch:y,startZoom:b}),(0,r.Z)(this,"makeViewport",void 0),this.makeViewport=e.makeViewport}panStart(e){let{pos:t}=e;return this._getUpdatedState({startPanLngLat:this._unproject(t)})}pan(e){let{pos:t,startPos:n}=e;const r=this.getState().startPanLngLat||this._unproject(n);if(!r)return this;const i=this.makeViewport(this.getViewportProps()).panByPosition(r,t);return this._getUpdatedState(i)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart(e){let{pos:t}=e;return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate(e){let{pos:t,deltaAngleX:n=0,deltaAngleY:r=0}=e;const{startRotatePos:i,startBearing:o,startPitch:a}=this.getState();if(!i||void 0===o||void 0===a)return this;let s;return s=t?this._getNewRotation(t,i,a,o):{bearing:o+n,pitch:a+r},this._getUpdatedState(s)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart(e){let{pos:t}=e;return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom(e){let{pos:t,startPos:n,scale:r}=e,{startZoom:i,startZoomLngLat:o}=this.getState();if(o||(i=this.getViewportProps().zoom,o=this._unproject(n)||this._unproject(t)),!o)return this;const{maxZoom:a,minZoom:s}=this.getViewportProps();let l=i+Math.log2(r);l=(0,k.uZ)(l,s,a);const c=this.makeViewport({...this.getViewportProps(),zoom:l});return this._getUpdatedState({zoom:l,...c.panByPosition(o,t)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(e)}zoomOut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(1/e)}moveLeft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([e,0])}moveRight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([-e,0])}moveUp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,e])}moveDown(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,-e])}rotateLeft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing-e})}rotateRight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing+e})}rotateUp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch+e})}rotateDown(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch-e})}shortestPathFrom(e){const t=e.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}applyConstraints(e){const{maxZoom:t,minZoom:n,zoom:r}=e;e.zoom=(0,k.uZ)(r,n,t);const{maxPitch:i,minPitch:o,pitch:a}=e;e.pitch=(0,k.uZ)(a,o,i);const{normalize:s=!0}=e;return s&&Object.assign(e,(0,J.QA)(e)),e}_zoomFromCenter(e){const{width:t,height:n}=this.getViewportProps();return this.zoom({pos:[t/2,n/2],scale:e})}_panFromCenter(e){const{width:t,height:n}=this.getViewportProps();return this.pan({startPos:[t/2,n/2],pos:[t/2+e[0],n/2+e[1]]})}_getUpdatedState(e){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...e})}_unproject(e){const t=this.makeViewport(this.getViewportProps());return e&&t.unproject(e)}_getNewRotation(e,t,n,r){const i=e[0]-t[0],o=e[1]-t[1],a=e[1],s=t[1],{width:l,height:c}=this.getViewportProps(),u=i/l;let d=0;o>0?Math.abs(c-s)>5&&(d=o/(s-c)*1.2):o<0&&s>5&&(d=1-a/s),d=(0,k.uZ)(d,-1,1);const{minPitch:h,maxPitch:f}=this.getViewportProps();let p=n;return d>0?p=n+d*(f-n):d<0&&(p=n-d*(h-n)),{pitch:p,bearing:r+180*u}}}class te extends Q{constructor(){super(...arguments),(0,r.Z)(this,"ControllerState",ee),(0,r.Z)(this,"transition",{transitionDuration:300,transitionInterpolator:new Z({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})}),(0,r.Z)(this,"dragMode","pan")}setProps(e){e.position=e.position||[0,0,0];const t=this.props;super.setProps(e);(!t||t.height!==e.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...e,...this.state}))}}class ne extends T{get ViewportType(){return M.Z}get ControllerType(){return te}}(0,r.Z)(ne,"displayName","MapView");var re=n(81786);const ie=[255,255,255],oe=1;let ae=0;class se{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"color",void 0),(0,r.Z)(this,"intensity",void 0),(0,r.Z)(this,"type","ambient");const{color:t=ie}=e,{intensity:n=oe}=e;this.id=e.id||"ambient-".concat(ae++),this.color=t,this.intensity=n}}var le=n(31549);const ce=[255,255,255],ue=1,de=[0,0,-1];let he=0;class fe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"color",void 0),(0,r.Z)(this,"intensity",void 0),(0,r.Z)(this,"type","directional"),(0,r.Z)(this,"direction",void 0),(0,r.Z)(this,"shadow",void 0);const{color:t=ce}=e,{intensity:n=ue}=e,{direction:i=de}=e,{_shadow:o=!1}=e;this.id=e.id||"directional-".concat(he++),this.color=t,this.intensity=n,this.type="directional",this.direction=new le.Z(i).normalize().toArray(),this.shadow=o}getProjectedLight(e){return this}}var pe=n(39944),ge=n(66176),me=n(26277),Ae=n(64282),ve=n(76195);class ye extends ge.Z{constructor(e,t){super(e,t),(0,r.Z)(this,"shadowMap",void 0),(0,r.Z)(this,"depthBuffer",void 0),(0,r.Z)(this,"fbo",void 0),this.shadowMap=new re.Z(e,{width:1,height:1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.depthBuffer=new me.Z(e,{format:33189,width:1,height:1}),this.fbo=new Ae.Z(e,{id:"shadowmap",width:1,height:1,attachments:{36064:this.shadowMap,36096:this.depthBuffer}})}render(e){const t=this.fbo;(0,ve.s8)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(()=>{const n=e.viewports[0],r=(0,ve.w)(this.gl),i=n.width*r,o=n.height*r;i===t.width&&o===t.height||t.resize({width:i,height:o}),super.render({...e,target:t,pass:"shadow"})}))}shouldDrawLayer(e){return!1!==e.props.shadowEnabled}getModuleParameters(){return{drawToShadowMap:!0}}delete(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}var be=n(98029),_e=n(12091);const we=(0,_e.Z)((function(e){let{viewport:t,center:n}=e;return new pe.Z(t.viewProjectionMatrix).invert().transform(n)})),xe=(0,_e.Z)((function(e){let{viewport:t,shadowMatrices:n}=e;const r=[],i=t.pixelUnprojectionMatrix,o=t.isGeospatial?void 0:1,a=[[0,0,o],[t.width,0,o],[0,t.height,o],[t.width,t.height,o],[0,0,-1],[t.width,0,-1],[0,t.height,-1],[t.width,t.height,-1]].map((e=>function(e,t){const[n,r,i]=e,o=(0,J.CT)([n,r,i],t);if(Number.isFinite(i))return o;return[o[0],o[1],0]}(e,i)));for(const s of n){const e=s.clone().translate(new le.Z(t.center).negate()),n=a.map((t=>e.transform(t))),i=(new pe.Z).ortho({left:Math.min(...n.map((e=>e[0]))),right:Math.max(...n.map((e=>e[0]))),bottom:Math.min(...n.map((e=>e[1]))),top:Math.max(...n.map((e=>e[1]))),near:Math.min(...n.map((e=>-e[2]))),far:Math.max(...n.map((e=>-e[2])))});r.push(i.multiplyRight(s))}return r})),Ee=[0,0,0,1],Se=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];const Ce={name:"shadow",dependencies:[A.Z],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n position = shadow_setVertexPosition(geometry.position);\n ","fs:DECKGL_FILTER_COLOR":"\n color = shadow_filterShadowColor(color);\n "},getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"viewport"in e&&(e.drawToShadowMap||e.shadowMaps&&e.shadowMaps.length>0)?function(e,t){const{shadowEnabled:n=!0}=e;if(!n||!e.shadowMatrices||!e.shadowMatrices.length)return{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1};const r={shadow_uDrawShadowMap:Boolean(e.drawToShadowMap),shadow_uUseShadowMap:!!e.shadowMaps&&e.shadowMaps.length>0,shadow_uColor:e.shadowColor||Ee,shadow_uLightId:e.shadowLightId||0,shadow_uLightCount:e.shadowMatrices.length},i=we({viewport:e.viewport,center:t.project_uCenter}),o=[],a=xe({shadowMatrices:e.shadowMatrices,viewport:e.viewport}).slice();for(let s=0;s0?r["shadow_uShadowMap".concat(s)]=e.shadowMaps[s]:r["shadow_uShadowMap".concat(s)]=e.dummyShadowMap;return r}(e,t):{}}},Pe={color:[255,255,255],intensity:1},Te=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],Me=[0,0,0,200/255];class ke{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id","lighting-effect"),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"shadowColor",Me),(0,r.Z)(this,"shadow",void 0),(0,r.Z)(this,"ambientLight",void 0),(0,r.Z)(this,"directionalLights",void 0),(0,r.Z)(this,"pointLights",void 0),(0,r.Z)(this,"shadowPasses",[]),(0,r.Z)(this,"shadowMaps",[]),(0,r.Z)(this,"dummyShadowMap",null),(0,r.Z)(this,"programManager",void 0),(0,r.Z)(this,"shadowMatrices",void 0),this.setProps(e)}setProps(e){this.ambientLight=null,this.directionalLights=[],this.pointLights=[];for(const t in e){const n=e[t];switch(n.type){case"ambient":this.ambientLight=n;break;case"directional":this.directionalLights.push(n);break;case"point":this.pointLights.push(n)}}this._applyDefaultLights(),this.shadow=this.directionalLights.some((e=>e.shadow)),this.props=e}preRender(e,t){let{layers:n,layerFilter:r,viewports:i,onViewportActive:o,views:a}=t;if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(e),this.programManager||(this.programManager=m.Z.getDefaultProgramManager(e),Ce&&this.programManager.addDefaultModule(Ce)),this.dummyShadowMap||(this.dummyShadowMap=new re.Z(e,{width:1,height:1}));for(let e=0;et.getProjectedLight({layer:e}))),pointLights:this.pointLights.map((t=>t.getProjectedLight({layer:e})))},t}cleanup(){for(const e of this.shadowPasses)e.delete();this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(Ce),this.programManager=null)}_calculateMatrices(){const e=[];for(const t of this.directionalLights){const n=(new pe.Z).lookAt({eye:new le.Z(t.direction).negate()});e.push(n)}return e}_createShadowPasses(e){for(let t=0;tt.id===e.id))){const n=t.findIndex((t=>function(e,t){var n,r;return(null!==(n=e.order)&&void 0!==n?n:1/0)-(null!==(r=t.order)&&void 0!==r?r:1/0)}(t,e)>0));n<0?t.push(e):t.splice(n,0,e),this._setEffects(this.effects)}}setProps(e){"effects"in e&&((0,w.v)(e.effects,this.effects,1)||this._setEffects(e.effects))}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}getEffects(){return this._resolvedEffects}_setEffects(e){const t={};for(const r of this.effects)t[r.id]=r;const n=[];for(const r of e){const e=t[r.id];e&&e!==r?e.setProps?(e.setProps(r.props),n.push(e)):(e.cleanup(),n.push(r)):n.push(r),delete t[r.id]}for(const r in t)t[r].cleanup();this.effects=n,this._resolvedEffects=n.concat(this._defaultEffects),e.some((e=>e instanceof ke))||this._resolvedEffects.push(Re),this._needsRedraw="effects changed"}finalize(){for(const e of this._resolvedEffects)e.cleanup();this.effects.length=0,this._resolvedEffects.length=0,this._defaultEffects.length=0}}class Ie extends ge.Z{shouldDrawLayer(e){const{operation:t}=e.props;return t.includes("draw")||t.includes("terrain")}}const Le={blendFunc:[1,0,32771,0],blendEquation:32774};class De extends ge.Z{constructor(){super(...arguments),(0,r.Z)(this,"pickZ",void 0),(0,r.Z)(this,"_colorEncoderState",null)}render(e){return"pickingFBO"in e?this._drawPickingBuffer(e):super.render(e)}_drawPickingBuffer(e){let{layers:t,layerFilter:n,views:r,viewports:i,onViewportActive:o,pickingFBO:a,deviceRect:{x:s,y:l,width:c,height:u},cullRect:d,effects:h,pass:f="picking",pickZ:p,moduleParameters:g}=e;const m=this.gl;this.pickZ=p;const A=this._resetColorEncoder(p),v=(0,ve.s8)(m,{scissorTest:!0,scissor:[s,l,c,u],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0],...Le,blend:!p},(()=>super.render({target:a,layers:t,layerFilter:n,views:r,viewports:i,onViewportActive:o,cullRect:d,effects:null===h||void 0===h?void 0:h.filter((e=>e.useInPicking)),pass:f,isPicking:!0,moduleParameters:g})));this._colorEncoderState=null;return{decodePickingColor:A&&Ne.bind(null,A),stats:v}}shouldDrawLayer(e){const{pickable:t,operation:n}=e.props;return t&&n.includes("draw")||n.includes("terrain")}getModuleParameters(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}getLayerParameters(e,t,n){const r={...e.props.parameters},{pickable:i,operation:o}=e.props;return this._colorEncoderState?i&&o.includes("draw")&&(Object.assign(r,Le),r.blend=!0,r.blendColor=function(e,t,n){const{byLayer:r,byAlpha:i}=e;let o,a=r.get(t);a?(a.viewports.push(n),o=a.a):(o=r.size+1,o<=255?(a={a:o,layer:t,viewports:[n]},r.set(t,a),i[o]=a):(l.Z.warn("Too many pickable layers, only picking the first 255")(),o=0));return[0,0,0,o/255]}(this._colorEncoderState,e,n)):r.blend=!1,o.includes("terrain")&&(r.blend=!1),r}_resetColorEncoder(e){return this._colorEncoderState=e?null:{byLayer:new Map,byAlpha:[]},this._colorEncoderState}}function Ne(e,t){const n=e.byAlpha[t[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(t)}}class Fe{constructor(e){(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"layerFilter",void 0),(0,r.Z)(this,"drawPickingColors",void 0),(0,r.Z)(this,"drawLayersPass",void 0),(0,r.Z)(this,"pickLayersPass",void 0),(0,r.Z)(this,"renderCount",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"renderBuffers",void 0),(0,r.Z)(this,"lastPostProcessEffect",void 0),this.gl=e,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new Ie(e),this.pickLayersPass=new De(e),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}setProps(e){this.layerFilter!==e.layerFilter&&(this.layerFilter=e.layerFilter,this._needsRedraw="layerFilter changed"),this.drawPickingColors!==e.drawPickingColors&&(this.drawPickingColors=e.drawPickingColors,this._needsRedraw="drawPickingColors changed")}renderLayers(e){const t=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass,n={layerFilter:this.layerFilter,isPicking:this.drawPickingColors,...e,target:e.target||Ae.Z.getDefaultFramebuffer(this.gl)};n.effects&&this._preRender(n.effects,n);const r=this.lastPostProcessEffect?this.renderBuffers[0]:n.target,i=t.render({...n,target:r});n.effects&&this._postRender(n.effects,n),this.renderCount++,(0,c.Z)("deckRenderer.renderLayers",this,i,e)}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}finalize(){const{renderBuffers:e}=this;for(const t of e)t.delete();e.length=0}_preRender(e,t){this.lastPostProcessEffect=null,t.preRenderStats=t.preRenderStats||{};for(const n of e)t.preRenderStats[n.id]=n.preRender(this.gl,t),n.postRender&&(this.lastPostProcessEffect=n.id);this.lastPostProcessEffect&&this._resizeRenderBuffers()}_resizeRenderBuffers(){const{renderBuffers:e}=this;0===e.length&&e.push(new Ae.Z(this.gl),new Ae.Z(this.gl));for(const t of e)t.resize()}_postRender(e,t){const{renderBuffers:n}=this,r={...t,inputBuffer:n[0],swapBuffer:n[1],target:null};for(const i of e)if(i.postRender){if(i.id===this.lastPostProcessEffect){r.target=t.target,i.postRender(this.gl,r);break}const e=i.postRender(this.gl,r);r.inputBuffer=e,r.swapBuffer=e===n[0]?n[1]:n[0]}}}var je=n(77378);const Be={pickedColor:null,pickedObjectIndex:-1};function ze(e){let{pickedColors:t,decodePickingColor:n,deviceX:r,deviceY:i,deviceRadius:o,deviceRect:a}=e;const{x:s,y:c,width:u,height:d}=a;let h=o*o,f=-1,p=0;for(let l=0;lh)p+=4*u;else for(let i=0;i=0){const e=i+s-r,t=e*e+n;t<=h&&(h=t,f=p)}p+=4}}if(f>=0){const e=t.slice(f,f+4),r=n(e);if(r){const t=Math.floor(f/4/u),n=f/4-t*u;return{...r,pickedColor:e,pickedX:s+n,pickedY:c+t}}l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}return Be}function Ze(e){let t,{pickInfo:n,viewports:r,pixelRatio:i,x:o,y:a,z:s}=e,l=r[0];if(r.length>1&&(l=function(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.containsPixel(t))return r}return e[0]}((null===n||void 0===n?void 0:n.pickedViewports)||r,{x:o,y:a})),l){const e=[o-l.x,a-l.y];void 0!==s&&(e[2]=s),t=l.unproject(e)}return{color:null,layer:null,viewport:l,index:-1,picked:!1,x:o,y:a,pixel:[o,a],coordinate:t,devicePixel:n&&"pickedX"in n?[n.pickedX,n.pickedY]:void 0,pixelRatio:i}}function Ue(e){const{pickInfo:t,lastPickedInfo:n,mode:r,layers:i}=e,{pickedColor:o,pickedLayer:a,pickedObjectIndex:s}=t,l=a?[a]:[];if("hover"===r){const e=n.index,t=n.layerId,r=a?a.props.id:null;if(r!==t||s!==e){if(r!==t){const e=i.find((e=>e.props.id===t));e&&l.unshift(e)}n.layerId=r,n.index=s,n.info=null}}const c=Ze(e),u=new Map;return u.set(null,c),l.forEach((e=>{let t={...c};e===a&&(t.color=o,t.index=s,t.picked=!0),t=He({layer:e,info:t,mode:r});const i=t.layer;e===a&&"hover"===r&&(n.info=t),u.set(i.id,t),"hover"===r&&i.updateAutoHighlight(t)})),u}function He(e){let{layer:t,info:n,mode:r}=e;for(;t&&n;){const e=n.layer||null;n.sourceLayer=e,n.layer=t,n=t.getPickingInfo({info:n,mode:r,sourceLayer:e}),t=t.parent}return n}class Ve{constructor(e){(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"pickingFBO",void 0),(0,r.Z)(this,"depthFBO",void 0),(0,r.Z)(this,"pickLayersPass",void 0),(0,r.Z)(this,"layerFilter",void 0),(0,r.Z)(this,"lastPickedInfo",void 0),(0,r.Z)(this,"_pickable",!0),this.gl=e,this.pickLayersPass=new De(e),this.lastPickedInfo={index:-1,layerId:null,info:null}}setProps(e){"layerFilter"in e&&(this.layerFilter=e.layerFilter),"_pickable"in e&&(this._pickable=e._pickable)}finalize(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}pickObject(e){return this._pickClosestObject(e)}pickObjects(e){return this._pickVisibleObjects(e)}getLastPickedObject(e){let{x:t,y:n,layers:r,viewports:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info;const a=o&&o.layer&&o.layer.id,s=o&&o.viewport&&o.viewport.id,l=a?r.find((e=>e.id===a)):null,c=s&&i.find((e=>e.id===s))||i[0],u=c&&c.unproject([t-c.x,n-c.y]),d={x:t,y:n,viewport:c,coordinate:u,layer:l};return{...o,...d}}_resizeBuffer(){var e,t;const{gl:n}=this;if(!this.pickingFBO&&(this.pickingFBO=new Ae.Z(n),Ae.Z.isSupported(n,{colorBufferFloat:!0}))){const e=new Ae.Z(n);e.attach({36064:new re.Z(n,{format:(0,ve.D0)(n)?34836:6408,type:5126})}),this.depthFBO=e}null===(e=this.pickingFBO)||void 0===e||e.resize({width:n.canvas.width,height:n.canvas.height}),null===(t=this.depthFBO)||void 0===t||t.resize({width:n.canvas.width,height:n.canvas.height})}_getPickable(e){if(!1===this._pickable)return null;const t=e.filter((e=>this.pickLayersPass.shouldDrawLayer(e)&&!e.isComposite));return t.length?t:null}_pickClosestObject(e){let{layers:t,views:n,viewports:r,x:i,y:o,radius:a=0,depth:s=1,mode:l="query",unproject3D:c,onViewportActive:u,effects:d}=e;const h=this._getPickable(t),f=(0,ve.w)(this.gl);if(!h)return{result:[],emptyInfo:Ze({viewports:r,x:i,y:o,pixelRatio:f})};this._resizeBuffer();const p=(0,ve.JY)(this.gl,[i,o],!0),g=[p.x+Math.floor(p.width/2),p.y+Math.floor(p.height/2)],m=Math.round(a*f),{width:A,height:v}=this.pickingFBO,y=this._getPickingRect({deviceX:g[0],deviceY:g[1],deviceRadius:m,deviceWidth:A,deviceHeight:v}),b={x:i-a,y:o-a,width:2*a+1,height:2*a+1};let _;const w=[],x=new Set;for(let E=0;E=0){const e=t.slice(i,i+4),o=e.join(",");if(!r.has(o)){const t=n(e);t?r.set(o,{...t,color:e}):l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return Array.from(r.values())}(this._drawAndSample({layers:f,views:n,viewports:r,onViewportActive:d,deviceRect:_,cullRect:{x:i,y:o,width:a,height:s},effects:h,pass:"picking:".concat(c)})),x=new Map,E=Number.isFinite(u);for(let l=0;l=u);l++){const e=w[l];let t={color:e.pickedColor,layer:null,index:e.pickedObjectIndex,picked:!0,x:i,y:o,pixelRatio:p};t=He({layer:e.pickedLayer,info:t,mode:c}),x.has(t.object)||x.set(t.object,t)}return Array.from(x.values())}_drawAndSample(e){let{layers:t,views:n,viewports:r,onViewportActive:i,deviceRect:o,cullRect:a,effects:s,pass:l}=e,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const u=c?this.depthFBO:this.pickingFBO,d={layers:t,layerFilter:this.layerFilter,views:n,viewports:r,onViewportActive:i,pickingFBO:u,deviceRect:o,cullRect:a,effects:s,pass:l,pickZ:c,preRenderStats:{}};for(const v of s)v.useInPicking&&(d.preRenderStats[v.id]=v.preRender(this.gl,d));const{decodePickingColor:h}=this.pickLayersPass.render(d),{x:f,y:p,width:g,height:m}=o,A=new(c?Float32Array:Uint8Array)(g*m*4);return(0,je.z6)(u,{sourceX:f,sourceY:p,sourceWidth:g,sourceHeight:m,target:A}),{pickedColors:A,decodePickingColor:h}}_getPickingRect(e){let{deviceX:t,deviceY:n,deviceRadius:r,deviceWidth:i,deviceHeight:o}=e;const a=Math.max(0,t-r),s=Math.max(0,n-r),l=Math.min(i,t+r+1)-a,c=Math.min(o,n+r+1)-s;return l<=0||c<=0?null:{x:a,y:s,width:l,height:c}}}const Ge={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"};class We{constructor(e){(0,r.Z)(this,"el",null),(0,r.Z)(this,"isVisible",!1);const t=e.parentElement;t&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,Ge),t.appendChild(this.el))}setTooltip(e,t,n){const r=this.el;if(r){if("string"===typeof e)r.innerText=e;else{if(!e)return this.isVisible=!1,void(r.style.display="none");e.text&&(r.innerText=e.text),e.html&&(r.innerHTML=e.html),e.className&&(r.className=e.className),Object.assign(r.style,e.style)}this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(t,"px, ").concat(n,"px)")}}remove(){this.el&&(this.el.remove(),this.el=null)}}var qe=n(10468),Ye=n(44219);var Xe=n(69088),Ke=n(69113);const{_parseImageNode:Qe}=globalThis,$e="undefined"!==typeof Image,Je="undefined"!==typeof ImageBitmap,et=Boolean(Qe),tt=!!Ke.jU||et;function nt(e){const t=it(e);if(!t)throw new Error("Not an image");return t}function rt(e){switch(nt(e)){case"data":return e;case"image":case"imagebitmap":const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("getImageData");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),n.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function it(e){return"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&e instanceof Image?"image":e&&"object"===typeof e&&e.data&&e.width&&e.height?"data":null}const ot=/^data:image\/svg\+xml/,at=/\.svg((\?|#).*)?$/;function st(e){return e&&(ot.test(e)||at.test(e))}function lt(e,t){if(st(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function ct(e,t,n){const r=function(e,t){if(st(t)){let t=(new TextDecoder).decode(e);try{"function"===typeof unescape&&"function"===typeof encodeURIComponent&&(t=unescape(encodeURIComponent(t)))}catch(n){throw new Error(n.message)}return"data:image/svg+xml;base64,".concat(btoa(t))}return lt(e,t)}(e,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r);try{return await async function(e,t){const n=new Image;if(n.src=e,t.image&&t.image.decode&&n.decode)return await n.decode(),n;return await new Promise(((t,r)=>{try{n.onload=()=>t(n),n.onerror=t=>r(new Error("Could not load image ".concat(e,": ").concat(t)))}catch(i){r(i)}}))}(o||r,t)}finally{o&&i.revokeObjectURL(o)}}const ut={};let dt=!0;async function ht(e,t,n){let r;if(st(n)){r=await ct(e,t,n)}else r=lt(e,n);const i=t&&t.imagebitmap;return await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e){for(const t in e||ut)return!1;return!0}(t)&&dt||(t=null);if(t)try{return await createImageBitmap(e,t)}catch(n){console.warn(n),dt=!1}return await createImageBitmap(e)}(r,i)}const ft=!1,pt=!0;function gt(e){const t=mt(e);return function(e){const t=mt(e),n=t.byteLength>=24&&2303741511===t.getUint32(0,ft);if(!n)return null;return{mimeType:"image/png",width:t.getUint32(16,ft),height:t.getUint32(20,ft)}}(t)||function(e){const t=mt(e),n=t.byteLength>=3&&65496===t.getUint16(0,ft)&&255===t.getUint8(2);if(!n)return null;const{tableMarkers:r,sofMarkers:i}=function(){const e=new Set([65499,65476,65484,65501,65534]);for(let n=65504;n<65520;++n)e.add(n);const t=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:t}}();let o=2;for(;o+9=10&&1195984440===t.getUint32(0,ft);if(!n)return null;return{mimeType:"image/gif",width:t.getUint16(6,pt),height:t.getUint16(8,pt)}}(t)||function(e){const t=mt(e),n=t.byteLength>=14&&16973===t.getUint16(0,ft)&&t.getUint32(2,pt)===t.byteLength;if(!n)return null;return{mimeType:"image/bmp",width:t.getUint32(18,pt),height:t.getUint32(22,pt)}}(t)}function mt(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}const At={id:"image",module:"images",name:"Images",version:"3.3.3",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(e,t,n){const r=((t=t||{}).image||{}).type||"auto",{url:i}=n||{};let o;switch(function(e){switch(e){case"auto":case"data":return function(){if(Je)return"imagebitmap";if($e)return"image";if(tt)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return Je||$e||tt;case"imagebitmap":return Je;case"image":return $e;case"data":return tt;default:throw new Error("@loaders.gl/images: image ".concat(e," not supported in this environment"))}}(e),e}}(r)){case"imagebitmap":o=await ht(e,t,i);break;case"image":o=await ct(e,t,i);break;case"data":o=await async function(e,t){const{mimeType:n}=gt(e)||{},r=globalThis._parseImageNode;return(0,Xe.h)(r),await r(e,n)}(e);break;default:(0,Xe.h)(!1)}return"data"===r&&(o=rt(o)),o},tests:[e=>Boolean(gt(new DataView(e)))],options:{image:{type:"auto",decode:!0}}};const vt={id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(e){const t=e[0],n=e[e.length-1];return"{"===t&&"}"===n||"["===t&&"]"===n},parseTextSync:JSON.parse};const yt=function(){const e="8.9.7",t=globalThis.deck&&globalThis.deck.VERSION;if(t&&t!==e)throw new Error("deck.gl - multiple versions detected: ".concat(t," vs ").concat(e));return t||(l.Z.log(1,"deck.gl ".concat(e))(),globalThis.deck={...globalThis.deck,VERSION:e,version:e,log:l.Z,_registerLoggers:c.z},(0,Ye.fh)([vt,[At,{imagebitmap:{premultiplyAlpha:"none"}}]])),e}();var bt=n(21748),_t=n(53886),wt=n(59661),xt=n(1112),Et=n(6509),St=n(87966);class Ct extends xt.Z{get[Symbol.toStringTag](){return"Query"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,ve.D0)(e),r=(0,Et.ag)(e,St.h.TIMER_QUERY);let i=n||r;for(const o of t)switch(o){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:(0,wt.h)(!1)}return i}constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery(){let{conservative:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.begin(e?36202:35887)}beginTransformFeedbackQuery(){return this.begin(35976)}begin(e){return this._queryPending||(this.target=e,this.gl2.beginQuery(this.target,this.handle)),this}end(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}isResultAvailable(){if(!this._queryPending)return!1;const e=this.gl2.getQueryParameter(this.handle,34919);return e&&(this._queryPending=!1),e}isTimerDisjoint(){return this.gl2.getParameter(36795)}getResult(){return this.gl2.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}createPoll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;let t=0;return this._pollingPromise=new Promise(((n,r)=>{const i=()=>{this.isResultAvailable()?(n(this.getResult()),this._pollingPromise=null):t++>e?(r("Timed out"),this._pollingPromise=null):requestAnimationFrame(i)};requestAnimationFrame(i)})),this._pollingPromise}_createHandle(){return Ct.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}const Pt=(0,n(89258).Z)()&&"undefined"!==typeof document;let Tt=0;class Mt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onCreateContext:t=(e=>(0,ve.s9)(e)),onAddHTML:n=null,onInitialize:r=(()=>{}),onRender:i=(()=>{}),onFinalize:o=(()=>{}),onError:a,gl:s=null,glOptions:l={},debug:c=!1,createFramebuffer:u=!1,autoResizeViewport:d=!0,autoResizeDrawingBuffer:h=!0,stats:f=_t.lR.get("animation-loop-".concat(Tt++))}=e;let{useDevicePixels:p=!0}=e;"useDevicePixelRatio"in e&&(ve.cM.deprecated("useDevicePixelRatio","useDevicePixels")(),p=e.useDevicePixelRatio),this.props={onCreateContext:t,onAddHTML:n,onInitialize:r,onRender:i,onFinalize:o,onError:a,gl:s,glOptions:l,debug:c,createFramebuffer:u},this.gl=s,this.needsRedraw=null,this.timeline=null,this.stats=f,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:d,autoResizeDrawingBuffer:h,useDevicePixels:p}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}delete(){this.stop(),this._setDisplay(null)}setNeedsRedraw(e){return(0,wt.h)("string"===typeof e),this.needsRedraw=this.needsRedraw||e,this}setProps(e){return"autoResizeViewport"in e&&(this.autoResizeViewport=e.autoResizeViewport),"autoResizeDrawingBuffer"in e&&(this.autoResizeDrawingBuffer=e.autoResizeDrawingBuffer),"useDevicePixels"in e&&(this.useDevicePixels=e.useDevicePixels),this}start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;const t=this._getPageLoadPromise().then((()=>!this._running||this._initialized?null:(this._createWebGLContext(e),this._createFramebuffer(),this._startEventHandling(),this._initializeCallbackData(),this._updateCallbackData(),this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._gpuTimeQuery=Ct.isSupported(this.gl,["timers"])?new Ct(this.gl):null,this._initialized=!0,this.onInitialize(this.animationProps)))).then((e=>{this._running&&(this._addCallbackData(e||{}),!1!==e&&this._startLoop())}));return this.props.onError&&t.catch(this.props.onError),this}redraw(){return this.isContextLost()||(this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers()),this}stop(){return this._running&&(this._finalizeCallbackData(),this._cancelAnimationFrame(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}attachTimeline(e){return this.timeline=e,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((e=>{this._resolveNextFrame=e}))),this._nextFramePromise}async toDataURL(){return this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.gl.canvas.toDataURL()}isContextLost(){return this.gl.isContextLost()}onCreateContext(){return this.props.onCreateContext(...arguments)}onInitialize(){return this.props.onInitialize(...arguments)}onRender(){return this.props.onRender(...arguments)}onFinalize(){return this.props.onFinalize(...arguments)}getHTMLControlValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=document.getElementById(e);return n?Number(n.value):t}setViewParameters(){return ve.cM.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}_startLoop(){const e=()=>{this._running&&(this.redraw(),this._animationFrameId=this._requestAnimationFrame(e))};this._cancelAnimationFrame(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame(e)}_getPageLoadPromise(){return this._pageLoadPromise||(this._pageLoadPromise=Pt?new Promise(((e,t)=>{Pt&&"complete"===document.readyState?e(document):window.addEventListener("load",(()=>{e(document)}))})):Promise.resolve({})),this._pageLoadPromise}_setDisplay(e){this.display&&(this.display.delete(),this.display.animationLoop=null),e&&(e.animationLoop=this),this.display=e}_cancelAnimationFrame(e){return this.display&&this.display.cancelAnimationFrame?this.display.cancelAnimationFrame(e):(t=e,"undefined"!==typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t));var t}_requestAnimationFrame(e){if(this._running)return this.display&&this.display.requestAnimationFrame?this.display.requestAnimationFrame(e):(t=e,"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,1e3/60));var t}_renderFrame(){this.display?this.display._renderFrame(...arguments):this.onRender(...arguments)}_clearNeedsRedraw(){this.needsRedraw=null}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer()}_initializeCallbackData(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}_updateCallbackData(){const{width:e,height:t,aspect:n}=this._getSizeAndAspect();e===this.animationProps.width&&t===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=e,this.animationProps.height=t,this.animationProps.aspect=n,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}_finalizeCallbackData(){this.onFinalize(this.animationProps)}_addCallbackData(e){"object"===typeof e&&null!==e&&(this.animationProps=Object.assign({},this.animationProps,e))}_createWebGLContext(e){if(this.offScreen=e.canvas&&"undefined"!==typeof OffscreenCanvas&&e.canvas instanceof OffscreenCanvas,e=Object.assign({},e,this.props.glOptions),this.gl=this.props.gl?(0,ve.yW)(this.props.gl,e):this.onCreateContext(e),!(0,ve.UF)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");(0,ve.kL)(this.gl),this._createInfoDiv()}_createInfoDiv(){if(this.gl.canvas&&this.props.onAddHTML){const e=document.createElement("div");document.body.appendChild(e),e.style.position="relative";const t=document.createElement("div");t.style.position="absolute",t.style.left="10px",t.style.bottom="10px",t.style.width="300px",t.style.background="white",e.appendChild(this.gl.canvas),e.appendChild(t);const n=this.props.onAddHTML(t);n&&(t.innerHTML=n)}}_getSizeAndAspect(){const e=this.gl.drawingBufferWidth,t=this.gl.drawingBufferHeight;let n=1;const{canvas:r}=this.gl;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:e>0&&t>0&&(n=e/t),{width:e,height:t,aspect:n}}_resizeViewport(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){this.autoResizeDrawingBuffer&&(0,ve.aQ)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new Ae.Z(this.gl))}_resizeFramebuffer(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}_beginTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint()&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}_endTimers(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}_startEventHandling(){const{canvas:e}=this.gl;e&&(e.addEventListener("mousemove",this._onMousemove),e.addEventListener("mouseleave",this._onMouseleave))}_onMousemove(e){this.animationProps._mousePosition=[e.offsetX,e.offsetY]}_onMouseleave(e){this.animationProps._mousePosition=null}}var kt=n(37283);const Rt={mousedown:1,mousemove:2,mouseup:4};!function(e){const t=e.prototype.handler;e.prototype.handler=function(e){const n=this.store;e.button>0&&"pointerdown"===e.type&&(function(e,t){for(let n=0;nt.pointerId===e.pointerId))||n.push(e)),t.call(this,e)}}(kt.PointerEventInput),kt.MouseInput.prototype.handler=function(e){let t=Rt[e.type];1&t&&e.button>=0&&(this.pressed=!0),2&t&&0===e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))};const Ot=kt.Manager,It=kt;class Lt{constructor(e,t,n){this.element=e,this.callback=t,this.options={enable:!0,...n}}}const Dt=It?[[It.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[It.Rotate,{enable:!1}],[It.Pinch,{enable:!1}],[It.Swipe,{enable:!1}],[It.Pan,{threshold:0,enable:!1}],[It.Press,{enable:!1}],[It.Tap,{event:"doubletap",taps:2,enable:!1}],[It.Tap,{event:"anytap",enable:!1}],[It.Tap,{enable:!1}]]:null,Nt={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Ft={doubletap:["tap"]},jt={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Bt={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},zt={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},Zt={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},Ut="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Ht="undefined"!==typeof window?window:n.g;"undefined"!==typeof n.g?n.g:window,"undefined"!==typeof document&&document;let Vt=!1;try{const e={get passive(){return Vt=!0,!0}};Ht.addEventListener("test",null,e),Ht.removeEventListener("test",null)}catch(bn){Vt=!1}const Gt=-1!==Ut.indexOf("firefox"),{WHEEL_EVENTS:Wt}=Bt,qt="wheel",Yt=4.000244140625;class Xt extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{if(!this.options.enable)return;let t=e.deltaY;Ht.WheelEvent&&(Gt&&e.deltaMode===Ht.WheelEvent.DOM_DELTA_PIXEL&&(t/=Ht.devicePixelRatio),e.deltaMode===Ht.WheelEvent.DOM_DELTA_LINE&&(t*=40)),0!==t&&t%Yt===0&&(t=Math.floor(t/Yt)),e.shiftKey&&t&&(t*=.25),this.callback({type:qt,center:{x:e.clientX,y:e.clientY},delta:-t,srcEvent:e,pointerType:"mouse",target:e.target})},this.events=(this.options.events||[]).concat(Wt),this.events.forEach((t=>e.addEventListener(t,this.handleEvent,!!Vt&&{passive:!1})))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===qt&&(this.options.enable=t)}}const{MOUSE_EVENTS:Kt}=Bt,Qt="pointermove",$t="pointerover",Jt="pointerout",en="pointerenter",tn="pointerleave";class nn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{this.handleOverEvent(e),this.handleOutEvent(e),this.handleEnterEvent(e),this.handleLeaveEvent(e),this.handleMoveEvent(e)},this.pressed=!1;const{enable:r}=this.options;this.enableMoveEvent=r,this.enableLeaveEvent=r,this.enableEnterEvent=r,this.enableOutEvent=r,this.enableOverEvent=r,this.events=(this.options.events||[]).concat(Kt),this.events.forEach((t=>e.addEventListener(t,this.handleEvent)))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===Qt&&(this.enableMoveEvent=t),e===$t&&(this.enableOverEvent=t),e===Jt&&(this.enableOutEvent=t),e===en&&(this.enableEnterEvent=t),e===tn&&(this.enableLeaveEvent=t)}handleOverEvent(e){this.enableOverEvent&&"mouseover"===e.type&&this._emit($t,e)}handleOutEvent(e){this.enableOutEvent&&"mouseout"===e.type&&this._emit(Jt,e)}handleEnterEvent(e){this.enableEnterEvent&&"mouseenter"===e.type&&this._emit(en,e)}handleLeaveEvent(e){this.enableLeaveEvent&&"mouseleave"===e.type&&this._emit(tn,e)}handleMoveEvent(e){if(this.enableMoveEvent)switch(e.type){case"mousedown":e.button>=0&&(this.pressed=!0);break;case"mousemove":0===e.which&&(this.pressed=!1),this.pressed||this._emit(Qt,e);break;case"mouseup":this.pressed=!1}}_emit(e,t){this.callback({type:e,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}const{KEY_EVENTS:rn}=Bt,on="keydown",an="keyup";class sn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{const t=e.target||e.srcElement;"INPUT"===t.tagName&&"text"===t.type||"TEXTAREA"===t.tagName||(this.enableDownEvent&&"keydown"===e.type&&this.callback({type:on,srcEvent:e,key:e.key,target:e.target}),this.enableUpEvent&&"keyup"===e.type&&this.callback({type:an,srcEvent:e,key:e.key,target:e.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=(this.options.events||[]).concat(rn),e.tabIndex=this.options.tabIndex||0,e.style.outline="none",this.events.forEach((t=>e.addEventListener(t,this.handleEvent)))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===on&&(this.enableDownEvent=t),e===an&&(this.enableUpEvent=t)}}const ln="contextmenu";class cn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{this.options.enable&&this.callback({type:ln,center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})},e.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(e,t){e===ln&&(this.options.enable=t)}}const un={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};function dn(e){const t=un[e.srcEvent.type];if(!t)return null;const{buttons:n,button:r,which:i}=e.srcEvent;let o=!1,a=!1,s=!1;return 4===t||2===t&&!Number.isFinite(n)?(o=1===i,a=2===i,s=3===i):2===t?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===t&&(o=0===r,a=1===r,s=2===r),{leftButton:o,middleButton:a,rightButton:s}}function hn(e,t){const n=e.center;if(!n)return null;const r=t.getBoundingClientRect(),i=r.width/t.offsetWidth||1,o=r.height/t.offsetHeight||1;return{center:n,offsetCenter:{x:(n.x-r.left-t.clientLeft)/i,y:(n.y-r.top-t.clientTop)/o}}}const fn={srcElement:"root",priority:0};class pn{constructor(e){this.handleEvent=e=>{if(this.isEmpty())return;const t=this._normalizeEvent(e);let n=e.srcEvent.target;for(;n&&n!==t.rootElement;){if(this._emit(t,n),t.handled)return;n=n.parentNode}this._emit(t,"root")},this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{handlers:o,handlersByElement:a}=this;let s=fn;"string"===typeof n||n&&n.addEventListener?s={...fn,srcElement:n}:n&&(s={...fn,...n});let l=a.get(s.srcElement);l||(l=[],a.set(s.srcElement,l));const c={type:e,handler:t,srcElement:s.srcElement,priority:s.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let u=l.length-1;for(;u>=0&&!(l[u].priority>=c.priority);)u--;l.splice(u+1,0,c)}remove(e,t){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===e&&o.handler===t){n.splice(i,1);const e=r.get(o.srcElement);e.splice(e.indexOf(o),1),0===e.length&&r.delete(o.srcElement)}}this._active=n.some((e=>!e.passive))}_emit(e,t){const n=this.handlersByElement.get(t);if(n){let t=!1;const r=()=>{e.handled=!0},i=()=>{e.handled=!0,t=!0},o=[];for(let a=0;a{e.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:t}}}const gn={events:null,recognizers:null,recognizerOptions:{},Manager:Ot,touchAction:"none",tabIndex:0};class mn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;this._onBasicInput=e=>{const{srcEvent:t}=e,n=jt[t.type];n&&this.manager.emit(n,e)},this._onOtherEvent=e=>{this.manager.emit(e.type,e)},this.options={...gn,...t},this.events=new Map,this.setElement(e);const{events:n}=this.options;n&&this.on(n)}getElement(){return this.element}setElement(e){if(this.element&&this.destroy(),this.element=e,!e)return;const{options:t}=this,n=t.Manager;this.manager=new n(e,{touchAction:t.touchAction,recognizers:t.recognizers||Dt}).on("hammer.input",this._onBasicInput),t.recognizers||Object.keys(Nt).forEach((e=>{const t=this.manager.get(e);t&&Nt[e].forEach((e=>{t.recognizeWith(e)}))}));for(const r in t.recognizerOptions){const e=this.manager.get(r);if(e){const n=t.recognizerOptions[r];delete n.enable,e.set(n)}}this.wheelInput=new Xt(e,this._onOtherEvent,{enable:!1}),this.moveInput=new nn(e,this._onOtherEvent,{enable:!1}),this.keyInput=new sn(e,this._onOtherEvent,{enable:!1,tabIndex:t.tabIndex}),this.contextmenuInput=new cn(e,this._onOtherEvent,{enable:!1});for(const[r,i]of this.events)i.isEmpty()||(this._toggleRecognizer(i.recognizerName,!0),this.manager.on(r,i.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(e,t,n){this._addEventHandler(e,t,n,!1)}once(e,t,n){this._addEventHandler(e,t,n,!0)}watch(e,t,n){this._addEventHandler(e,t,n,!1,!0)}off(e,t){this._removeEventHandler(e,t)}_toggleRecognizer(e,t){const{manager:n}=this;if(!n)return;const r=n.get(e);if(r&&r.options.enable!==t){r.set({enable:t});const i=Ft[e];i&&!this.options.recognizers&&i.forEach((i=>{const o=n.get(i);t?(o.requireFailure(e),r.dropRequireFailure(i)):o.dropRequireFailure(e)}))}this.wheelInput.enableEventType(e,t),this.moveInput.enableEventType(e,t),this.keyInput.enableEventType(e,t),this.contextmenuInput.enableEventType(e,t)}_addEventHandler(e,t,n,r,i){if("string"!==typeof e){n=t;for(const t in e)this._addEventHandler(t,e[t],n,r,i);return}const{manager:o,events:a}=this,s=Zt[e]||e;let l=a.get(s);l||(l=new pn(this),a.set(s,l),l.recognizerName=zt[s]||s,o&&o.on(s,l.handleEvent)),l.add(e,t,n,r,i),l.isEmpty()||this._toggleRecognizer(l.recognizerName,!0)}_removeEventHandler(e,t){if("string"!==typeof e){for(const t in e)this._removeEventHandler(t,e[t]);return}const{events:n}=this,r=Zt[e]||e,i=n.get(r);if(i&&(i.remove(e,t),i.isEmpty())){const{recognizerName:e}=i;let t=!1;for(const r of n.values())if(r.recognizerName===e&&!r.isEmpty()){t=!0;break}t||this._toggleRecognizer(e,!1)}}}function An(){}const vn={id:"",width:"100%",height:"100%",style:null,viewState:null,initialViewState:null,pickingRadius:0,layerFilter:null,glOptions:{},parameters:{},parent:null,gl:null,canvas:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},_customRender:null,onWebGLInitialized:An,onResize:An,onViewStateChange:An,onInteractionStateChange:An,onBeforeRender:An,onAfterRender:An,onLoad:An,onError:e=>l.Z.error(e.message)(),onHover:null,onClick:null,onDragStart:null,onDrag:null,onDragEnd:null,_onMetrics:null,getCursor:e=>{let{isDragging:t}=e;return t?"grabbing":"grab"},getTooltip:null,debug:!1,drawPickingColors:!1};class yn{constructor(e){(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"width",0),(0,r.Z)(this,"height",0),(0,r.Z)(this,"userData",{}),(0,r.Z)(this,"canvas",null),(0,r.Z)(this,"viewManager",null),(0,r.Z)(this,"layerManager",null),(0,r.Z)(this,"effectManager",null),(0,r.Z)(this,"deckRenderer",null),(0,r.Z)(this,"deckPicker",null),(0,r.Z)(this,"eventManager",null),(0,r.Z)(this,"tooltip",null),(0,r.Z)(this,"metrics",void 0),(0,r.Z)(this,"animationLoop",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"viewState",void 0),(0,r.Z)(this,"cursorState",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"_pickRequest",void 0),(0,r.Z)(this,"_lastPointerDownInfo",null),(0,r.Z)(this,"_metricsCounter",void 0),(0,r.Z)(this,"_onPointerMove",(e=>{const{_pickRequest:t}=this;if("pointerleave"===e.type)t.x=-1,t.y=-1,t.radius=0;else{if(e.leftButton||e.rightButton)return;{const n=e.offsetCenter;if(!n)return;t.x=n.x,t.y=n.y,t.radius=this.props.pickingRadius}}this.layerManager&&(this.layerManager.context.mousePosition={x:t.x,y:t.y}),t.event=e})),(0,r.Z)(this,"_onEvent",(e=>{const t=be.FP[e.type],n=e.offsetCenter;if(!t||!n||!this.layerManager)return;const r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),{layer:o}=i,a=o&&(o[t.handler]||o.props[t.handler]),s=this.props[t.handler];let l=!1;a&&(l=a.call(o,i,e)),!l&&s&&s(i,e)})),(0,r.Z)(this,"_onPointerDown",(e=>{const t=e.offsetCenter,n=this._pick("pickObject","pickObject Time",{x:t.x,y:t.y,radius:this.props.pickingRadius});this._lastPointerDownInfo=n.result[0]||n.emptyInfo})),this.props={...vn,...e},e=this.props,this._needsRedraw="Initial render",this._pickRequest={mode:"hover",x:-1,y:-1,radius:0,event:null},this.cursorState={isHovering:!1,isDragging:!1},e.viewState&&e.initialViewState&&l.Z.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===(0,bt.Z)()&&l.Z.warn("IE 11 is not supported")(),this.viewState=e.initialViewState,e.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(e)),this.animationLoop=this._createAnimationLoop(e),this.stats=new d.Z({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(e),e._typedArrayManagerProps&&qe.Z.setOptions(e._typedArrayManagerProps),this.animationLoop.start()}finalize(){var e,t,n,r,i,o,a,s;(this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,null===(e=this.layerManager)||void 0===e||e.finalize(),this.layerManager=null,null===(t=this.viewManager)||void 0===t||t.finalize(),this.viewManager=null,null===(n=this.effectManager)||void 0===n||n.finalize(),this.effectManager=null,null===(r=this.deckRenderer)||void 0===r||r.finalize(),this.deckRenderer=null,null===(i=this.deckPicker)||void 0===i||i.finalize(),this.deckPicker=null,null===(o=this.eventManager)||void 0===o||o.destroy(),this.eventManager=null,null===(a=this.tooltip)||void 0===a||a.remove(),this.tooltip=null,this.props.canvas||this.props.gl||!this.canvas)||(null===(s=this.canvas.parentElement)||void 0===s||s.removeChild(this.canvas),this.canvas=null)}setProps(e){this.stats.get("setProps Time").timeStart(),"onLayerHover"in e&&l.Z.removed("onLayerHover","onHover")(),"onLayerClick"in e&&l.Z.removed("onLayerClick","onClick")(),e.initialViewState&&!(0,w.v)(this.props.initialViewState,e.initialViewState,3)&&(this.viewState=e.initialViewState),Object.assign(this.props,e),this._setCanvasSize(this.props);const t=Object.create(this.props);Object.assign(t,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(t),this.layerManager&&(this.viewManager.setProps(t),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(t),this.effectManager.setProps(t),this.deckRenderer.setProps(t),this.deckPicker.setProps(t)),this.stats.get("setProps Time").timeEnd()}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(!this.layerManager)return!1;if(this.props._animate)return"Deck._animate";let t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);const n=this.viewManager.needsRedraw(e),r=this.layerManager.needsRedraw(e),i=this.effectManager.needsRedraw(e),o=this.deckRenderer.needsRedraw(e);return t=t||n||r||i||o,t}redraw(e){if(!this.layerManager)return;let t=this.needsRedraw({clearRedrawFlags:!0});t=e||t,t&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(t):this._drawLayers(t))}get isInitialized(){return null!==this.viewManager}getViews(){return(0,P.Z)(this.viewManager),this.viewManager.views}getViewports(e){return(0,P.Z)(this.viewManager),this.viewManager.getViewports(e)}pickObject(e){const t=this._pick("pickObject","pickObject Time",e).result;return t.length?t[0]:null}pickMultipleObjects(e){return e.depth=e.depth||10,this._pick("pickObject","pickMultipleObjects Time",e).result}pickObjects(e){return this._pick("pickObjects","pickObjects Time",e)}_addResources(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(const n in e)this.layerManager.resourceManager.add({resourceId:n,data:e[n],forceUpdate:t})}_removeResources(e){for(const t of e)this.layerManager.resourceManager.remove(t)}_addDefaultEffect(e){this.effectManager.addDefaultEffect(e)}_pick(e,t,n){(0,P.Z)(this.deckPicker);const{stats:r}=this;r.get("Pick Count").incrementCount(),r.get(t).timeStart();const i=this.deckPicker[e]({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport,effects:this.effectManager.getEffects(),...n});return r.get(t).timeEnd(),i}_createCanvas(e){let t=e.canvas;if("string"===typeof t&&(t=document.getElementById(t),(0,P.Z)(t)),!t){t=document.createElement("canvas"),t.id=e.id||"deckgl-overlay";(e.parent||document.body).appendChild(t)}return Object.assign(t.style,e.style),t}_setCanvasSize(e){if(!this.canvas)return;const{width:t,height:n}=e;if(t||0===t){const e=Number.isFinite(t)?"".concat(t,"px"):t;this.canvas.style.width=e}if(n||0===n){var r;const t=Number.isFinite(n)?"".concat(n,"px"):n;this.canvas.style.position=(null===(r=e.style)||void 0===r?void 0:r.position)||"absolute",this.canvas.style.height=t}}_updateCanvasSize(){const{canvas:e}=this;if(!e)return;const t=e.clientWidth||e.width,n=e.clientHeight||e.height;var r;t===this.width&&n===this.height||(this.width=t,this.height=n,null===(r=this.viewManager)||void 0===r||r.setProps({width:t,height:n}),this.props.onResize({width:t,height:n}))}_createAnimationLoop(e){const{width:t,height:n,gl:r,glOptions:i,debug:o,onError:a,onBeforeRender:s,onAfterRender:l,useDevicePixels:c}=e;return new Mt({width:t,height:n,useDevicePixels:c,autoResizeViewport:!1,gl:r,onCreateContext:e=>(0,ve.s9)({...i,...e,canvas:this.canvas,debug:o,onContextLost:()=>this._onContextLost()}),onInitialize:e=>this._setGLContext(e.gl),onRender:this._onRenderFrame.bind(this),onBeforeRender:s,onAfterRender:l,onError:a})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){let e=this.props.views||[new ne({id:"default-view"})];return e=Array.isArray(e)?e:[e],e.length&&this.props.controller&&(e[0].props.controller=this.props.controller),e}_onContextLost(){const{onError:e}=this.props;this.animationLoop&&e&&e(new Error("WebGL context is lost"))}_pickAndCallback(){const{_pickRequest:e}=this;if(e.event){const{result:n,emptyInfo:r}=this._pick("pickObject","pickObject Time",e);this.cursorState.isHovering=n.length>0;let i=r,o=!1;for(const a of n){var t;i=a,o=(null===(t=a.layer)||void 0===t?void 0:t.onHover(a,e.event))||o}if(!o&&this.props.onHover&&this.props.onHover(i,e.event),this.props.getTooltip&&this.tooltip){const e=this.props.getTooltip(i);this.tooltip.setTooltip(e,i.x,i.y)}e.event=null}}_updateCursor(){const e=this.props.parent||this.canvas;e&&(e.style.cursor=this.props.getCursor(this.cursorState))}_setGLContext(e){if(this.layerManager)return;this.canvas||(this.canvas=e.canvas,(0,ve.yW)(e,{enable:!0,copyState:!0})),this.tooltip=new We(this.canvas),(0,ve.dR)(e,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(e);const t=new a;t.play(),this.animationLoop.attachTimeline(t),this.eventManager=new mn(this.props.parent||e.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}});for(const r in be.FP)this.eventManager.on(r,this._onEvent);this.viewManager=new x({timeline:t,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});const n=this.viewManager.getViewports()[0];this.layerManager=new _(e,{deck:this,stats:this.stats,viewport:n,timeline:t}),this.effectManager=new Oe,this.deckRenderer=new Fe(e),this.deckPicker=new Ve(e),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(e,t){const{gl:n}=this.layerManager.context;(0,ve.dR)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",effects:this.effectManager.getEffects(),...t}),this.props.onAfterRender({gl:n})}_onRenderFrame(e){this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),l.Z.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.tooltip.isVisible&&this.viewManager.needsRedraw()&&this.tooltip.setTooltip(null),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(),this.viewManager&&this.viewManager.updateViewStates()}_onViewStateChange(e){const t=this.props.onViewStateChange(e)||e.viewState;this.viewState&&(this.viewState={...this.viewState,[e.viewId]:t},this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}_onInteractionStateChange(e){this.cursorState.isDragging=e.isDragging||!1,this.props.onInteractionStateChange(e)}_getFrameStats(){const{stats:e}=this;e.get("frameRate").timeEnd(),e.get("frameRate").timeStart();const t=this.animationLoop.stats;e.get("GPU Time").addTime(t.get("GPU Time").lastTiming),e.get("CPU Time").addTime(t.get("CPU Time").lastTiming)}_getMetrics(){const{metrics:e,stats:t}=this;e.fps=t.get("frameRate").getHz(),e.setPropsTime=t.get("setProps Time").time,e.updateAttributesTime=t.get("Update Attributes").time,e.framesRedrawn=t.get("Redraw Count").count,e.pickTime=t.get("pickObject Time").time+t.get("pickMultipleObjects Time").time+t.get("pickObjects Time").time,e.pickCount=t.get("Pick Count").count,e.gpuTime=t.get("GPU Time").time,e.cpuTime=t.get("CPU Time").time,e.gpuTimePerFrame=t.get("GPU Time").getAverageTime(),e.cpuTimePerFrame=t.get("CPU Time").getAverageTime();const n=_t.lR.get("Memory Usage");e.bufferMemory=n.get("Buffer Memory").count,e.textureMemory=n.get("Texture Memory").count,e.renderbufferMemory=n.get("Renderbuffer Memory").count,e.gpuMemory=n.get("GPU Memory").count}}(0,r.Z)(yn,"defaultProps",vn),(0,r.Z)(yn,"VERSION",yt)},44602:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(68185),i=n(63549);class o{static get componentName(){return Object.prototype.hasOwnProperty.call(this,"extensionName")?this.extensionName:""}constructor(e){(0,r.Z)(this,"opts",void 0),e&&(this.opts=e)}equals(e){return this===e||this.constructor===e.constructor&&(0,i.v)(this.opts,e.opts,1)}getShaders(e){return null}getSubLayerProps(e){const{defaultProps:t}=e.constructor,n={updateTriggers:{}};for(const r in t)if(r in this.props){const e=t[r],i=this.props[r];n[r]=i,e&&"accessor"===e.type&&(n.updateTriggers[r]=this.props.updateTriggers[r],"function"===typeof i&&(n[r]=this.getSubLayerAccessor(i)))}return n}initializeState(e,t){}updateState(e,t){}onNeedsRedraw(e){}getNeedsPickingBuffer(e){return!1}draw(e,t){}finalizeState(e,t){}}(0,r.Z)(o,"defaultProps",{}),(0,r.Z)(o,"extensionName","LayerExtension")},53104:(e,t,n)=>{"use strict";n.d(t,{Z:()=>se});var r=n(68185),i=n(98029),o=n(21921),a=n(83063),s=n(30373),l=n(78191);class c extends l.Z{get value(){return this._value}_onUpdate(){const{time:e,settings:{fromValue:t,toValue:n,duration:r,easing:i}}=this,o=i(e/r);this._value=(0,s.t7)(t,n,o)}}const u=1e-5;function d(e,t,n,r,i){const o=t-e;return(n-t)*i+-o*r+o+t}function h(e,t){if(Array.isArray(e)){let n=0;for(let r=0;r0}add(e,t,n,r){const{transitions:i}=this;if(i.has(e)){const n=i.get(e),{value:r=n.settings.fromValue}=n;t=r,this.remove(e)}if(!(r=(0,a.M0)(r)))return;const o=g[r.type];if(!o)return void p.Z.error("unsupported transition type '".concat(r.type,"'"))();const s=new o(this.timeline);s.start({...r,fromValue:t,toValue:n}),i.set(e,s)}remove(e){const{transitions:t}=this;t.has(e)&&(t.get(e).cancel(),t.delete(e))}update(){const e={};for(const[t,n]of this.transitions)n.update(),e[t]=n.value,n.inProgress||this.remove(t);return e}clear(){for(const e of this.transitions.keys())this.remove(e)}}var A=n(98641),v=n(15672);function y(e){if(null===(t=e)||"object"!==typeof t)throw new Error("count(): argument not an object");var t;if("function"===typeof e.count)return e.count();if(Number.isFinite(e.size))return e.size;if(Number.isFinite(e.length))return e.length;if(function(e){return null!==e&&"object"===typeof e&&e.constructor===Object}(e))return Object.keys(e).length;throw new Error("count(): argument not a container")}var b=n(6525),_=n(76195),w=n(37954),x=n(12091);function E(e,t){if(!t)return e;const n={...e,...t};if("defines"in t&&(n.defines={...e.defines,...t.defines}),"modules"in t&&(n.modules=(e.modules||[]).concat(t.modules),t.modules.some((e=>"project64"===e.name)))){const e=n.modules.findIndex((e=>"project32"===e.name));e>=0&&n.modules.splice(e,1)}if("inject"in t)if(e.inject){const r={...e.inject};for(const e in t.inject)r[e]=(r[e]||"")+t.inject[e];n.inject=r}else n.inject=t.inject;return n}var S=n(26651),C=n(5550),P=n(81723),T=n(58034),M=n(1384);const k=[0,0,0];function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=t.projectPosition(e);if(n&&t instanceof C.Z){const[n,i,o=0]=e,a=t.getDistanceScales([n,i]);r[2]=o*a.unitsPerMeter[2]}return r}function O(e,t){let{viewport:n,modelMatrix:r,coordinateSystem:o,coordinateOrigin:a,offsetMode:s}=t,[l,c,u=0]=e;switch(r&&([l,c,u]=P.fF([],[l,c,u,1],r)),o){case i.Df.LNGLAT:return R([l,c,u],n,s);case i.Df.LNGLAT_OFFSETS:return R([l+a[0],c+a[1],u+(a[2]||0)],n,s);case i.Df.METER_OFFSETS:return R((0,M.eG)(a,[l,c,u]),n,s);case i.Df.CARTESIAN:default:return n.isGeospatial?[l+a[0],c+a[1],u+a[2]]:n.projectPosition([l,c,u])}}function I(e,t){const{viewport:n,coordinateSystem:r,coordinateOrigin:o,modelMatrix:a,fromCoordinateSystem:s,fromCoordinateOrigin:l}=function(e){const{viewport:t,modelMatrix:n,coordinateOrigin:r}=e;let{coordinateSystem:o,fromCoordinateSystem:a,fromCoordinateOrigin:s}=e;return o===i.Df.DEFAULT&&(o=t.isGeospatial?i.Df.LNGLAT:i.Df.CARTESIAN),void 0===a&&(a=o),void 0===s&&(s=r),{viewport:t,coordinateSystem:o,coordinateOrigin:r,modelMatrix:n,fromCoordinateSystem:a,fromCoordinateOrigin:s}}(t),{autoOffset:c=!0}=t,{geospatialOrigin:u=k,shaderCoordinateOrigin:d=k,offsetMode:h=!1}=c?(0,S.v)(n,r,o):{},f=O(e,{viewport:n,modelMatrix:a,coordinateSystem:s,coordinateOrigin:l,offsetMode:h});if(h){const e=n.projectPosition(u||d);T.lu(f,f,e)}return f}var L=n(10468),D=n(39179),N=n(81786);const F={10241:9987,10240:9729,10242:33071,10243:33071},j={};var B=n(63549);const z={boolean:{validate:(e,t)=>!0,equal:(e,t,n)=>Boolean(e)===Boolean(t)},number:{validate:(e,t)=>Number.isFinite(e)&&(!("max"in t)||e<=t.max)&&(!("min"in t)||e>=t.min)},color:{validate:(e,t)=>t.optional&&!e||H(e)&&(3===e.length||4===e.length),equal:(e,t,n)=>(0,B.v)(e,t,1)},accessor:{validate(e,t){const n=V(e);return"function"===n||n===V(t.value)},equal:(e,t,n)=>"function"===typeof t||(0,B.v)(e,t,1)},array:{validate:(e,t)=>t.optional&&!e||H(e),equal(e,t,n){const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?(0,B.v)(e,t,i):e===t}},object:{equal(e,t,n){if(n.ignore)return!0;const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?(0,B.v)(e,t,i):e===t}},function:{validate:(e,t)=>t.optional&&!e||"function"===typeof e,equal:(e,t,n)=>!n.compare&&!1!==n.ignore||e===t},data:{transform:(e,t,n)=>{const{dataTransform:r}=n.props;return r&&e?r(e):e}},image:{transform:(e,t,n)=>{const r=n.context;return r&&r.gl?function(e,t,n){if(t instanceof N.Z)return t;t.constructor&&"Object"!==t.constructor.name&&(t={data:t});let r=null;t.compressed&&(r={10241:t.data.length>1?9985:9729});const i=new N.Z(e,{...t,parameters:{...F,...r,...n}});return j[i.id]=!0,i}(r.gl,e,{...t.parameters,...n.props.textureParameters}):null},release:e=>{var t;(t=e)&&t instanceof N.Z&&j[t.id]&&(t.delete(),delete j[t.id])}}};function Z(e,t){switch(V(t)){case"object":return U(e,t);case"array":return U(e,{type:"array",value:t,compare:!1});case"boolean":return U(e,{type:"boolean",value:t});case"number":return U(e,{type:"number",value:t});case"function":return U(e,{type:"function",value:t,compare:!0});default:return{name:e,type:"unknown",value:t}}}function U(e,t){return"type"in t?{name:e,...z[t.type],...t}:"value"in t?{name:e,type:V(t.value),...t}:{name:e,type:"object",value:t}}function H(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function V(e){return H(e)?"array":null===e?"null":typeof e}const G="_mergedDefaultProps";function W(e,t){let n=G;if(t)for(const i of t){const e=i.constructor;e&&(n+=":".concat(e.extensionName||e.name))}const r=X(e,n);return r||(e[n]=function(e,t){const n=e.prototype;if(!n)return null;const r=Object.getPrototypeOf(e),i=W(r),o=X(e,"defaultProps")||{},a=function(e){const t={},n={},r={};for(const[i,o]of Object.entries(e)){const e=null===o||void 0===o?void 0:o.deprecatedFor;if(e)r[i]=Array.isArray(e)?e:[e];else{const e=Z(i,o);t[i]=e,n[i]=e.value}}return{propTypes:t,defaultProps:n,deprecatedProps:r}}(o),s=Object.assign(Object.create(null),i,a.defaultProps),l=Object.assign(Object.create(null),null===i||void 0===i?void 0:i[v.Wb],a.propTypes),c=Object.assign(Object.create(null),null===i||void 0===i?void 0:i[v.E7],a.deprecatedProps);for(const u of t){const e=W(u.constructor);e&&(Object.assign(s,e),Object.assign(l,e[v.Wb]),Object.assign(c,e[v.E7]))}(function(e,t){const n=function(e){const t=e.componentName;t||p.Z.warn("".concat(e.name,".componentName not specified"))();return t||e.name}(t);Object.defineProperties(e,{id:{writable:!0,value:n}})})(s,e),function(e,t){const n={},r={};for(const i in t){const e=t[i],{name:o,value:a}=e;e.async&&(n[o]=a,r[o]=q(o))}e[v.lY]=n,e[v.fO]={},Object.defineProperties(e,r)}(s,l),function(e,t){for(const n in t)Object.defineProperty(e,n,{enumerable:!1,set(e){const r="".concat(this.id,": ").concat(n);for(const i of t[n])Y(this,i)||(this[i]=e);p.Z.deprecated(r,t[n].join("/"))()}})}(s,c),s[v.Wb]=l,s[v.E7]=c,0!==t.length||Y(e,"_propTypes")||(e._propTypes=l);return s}(e,t||[]))}function q(e){return{enumerable:!0,set(t){"string"===typeof t||t instanceof Promise||(0,D.D0)(t)?this[v.fO][e]=t:this[v.bN][e]=t},get(){if(this[v.bN]){if(e in this[v.bN]){return this[v.bN][e]||this[v.lY][e]}if(e in this[v.fO]){const t=this[v.fm]&&this[v.fm].internalState;if(t&&t.hasAsyncProp(e))return t.getAsyncProp(e)||this[v.lY][e]}}return this[v.lY][e]}}}function Y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function X(e,t){return Y(e,t)&&e[t]}let K=0;class Q{constructor(){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"count",void 0);for(var e=arguments.length,t=new Array(e),n=0;n=0;o--){const e=t[o];"extensions"in e&&(n=e.extensions)}const r=W(e.constructor,n),i=Object.create(r);i[v.fm]=e,i[v.fO]={},i[v.bN]={};for(let o=0;o{},this.oldProps=null,this.oldAsyncProps=null}finalize(){for(const e in this.asyncProps){const t=this.asyncProps[e];t&&t.type&&t.type.release&&t.type.release(t.resolvedValue,t.type,this.component)}this.asyncProps={},this.component=null,this.resetOldProps()}getOldProps(){return this.oldAsyncProps||this.oldProps||$}resetOldProps(){this.oldAsyncProps=null,this.oldProps=this.component?this.component.props:null}hasAsyncProp(e){return e in this.asyncProps}getAsyncProp(e){const t=this.asyncProps[e];return t&&t.resolvedValue}isAsyncPropLoading(e){if(e){const t=this.asyncProps[e];return Boolean(t&&t.pendingLoadCount>0&&t.pendingLoadCount!==t.resolvedLoadCount)}for(const t in this.asyncProps)if(this.isAsyncPropLoading(t))return!0;return!1}reloadAsyncProp(e,t){this._watchPromise(e,Promise.resolve(t))}setAsyncProps(e){this.component=e[v.fm]||this.component;const t=e[v.bN]||{},n=e[v.fO]||e,r=e[v.lY]||{};for(const i in t){const e=t[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,e),t[i]=this.getAsyncProp(i)}for(const i in n){const e=n[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,e)}}_fetch(e,t){return null}_onResolve(e,t){}_onError(e,t){}_updateAsyncProp(e,t){this._didAsyncInputValueChange(e,t)&&("string"===typeof t&&(t=this._fetch(e,t)),t instanceof Promise?this._watchPromise(e,t):(0,D.D0)(t)?this._resolveAsyncIterable(e,t):this._setPropValue(e,t))}_freezeAsyncOldProps(){if(!this.oldAsyncProps&&this.oldProps){this.oldAsyncProps=Object.create(this.oldProps);for(const e in this.asyncProps)Object.defineProperty(this.oldAsyncProps,e,{enumerable:!0,value:this.oldProps[e]})}}_didAsyncInputValueChange(e,t){const n=this.asyncProps[e];return t!==n.resolvedValue&&t!==n.lastValue&&(n.lastValue=t,!0)}_setPropValue(e,t){this._freezeAsyncOldProps();const n=this.asyncProps[e];n&&(t=this._postProcessValue(n,t),n.resolvedValue=t,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount)}_setAsyncPropValue(e,t,n){const r=this.asyncProps[e];r&&n>=r.resolvedLoadCount&&void 0!==t&&(this._freezeAsyncOldProps(),r.resolvedValue=t,r.resolvedLoadCount=n,this.onAsyncPropUpdated(e,t))}_watchPromise(e,t){const n=this.asyncProps[e];if(n){n.pendingLoadCount++;const r=n.pendingLoadCount;t.then((t=>{this.component&&(t=this._postProcessValue(n,t),this._setAsyncPropValue(e,t,r),this._onResolve(e,t))})).catch((t=>{this._onError(e,t)}))}}async _resolveAsyncIterable(e,t){if("data"!==e)return void this._setPropValue(e,t);const n=this.asyncProps[e];if(!n)return;n.pendingLoadCount++;const r=n.pendingLoadCount;let i=[],o=0;for await(const a of t){if(!this.component)return;const{dataTransform:t}=this.component.props;i=t?t(a,i):i.concat(a),Object.defineProperty(i,"__diff",{enumerable:!1,value:[{startRow:o,endRow:i.length}]}),o=i.length,this._setAsyncPropValue(e,i,r)}this._onResolve(e,i)}_postProcessValue(e,t){const n=e.type;return n&&this.component&&(n.release&&n.release(e.resolvedValue,n,this.component),n.transform)?n.transform(t,n,this.component):t}_createAsyncPropData(e,t){if(!this.asyncProps[e]){const n=this.component&&this.component.props[v.Wb];this.asyncProps[e]={type:n&&n[e],lastValue:null,resolvedValue:t,pendingLoadCount:0,resolvedLoadCount:0}}}}class ee extends J{constructor(e){let{attributeManager:t,layer:n}=e;super(n),(0,r.Z)(this,"attributeManager",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"needsUpdate",void 0),(0,r.Z)(this,"subLayers",void 0),(0,r.Z)(this,"usesPickingColorCache",void 0),(0,r.Z)(this,"hasPickingBuffer",void 0),(0,r.Z)(this,"changeFlags",void 0),(0,r.Z)(this,"viewport",void 0),(0,r.Z)(this,"uniformTransitions",void 0),(0,r.Z)(this,"propsInTransition",void 0),this.attributeManager=t,this.needsRedraw=!0,this.needsUpdate=!0,this.subLayers=null,this.usesPickingColorCache=!1}get layer(){return this.component}_fetch(e,t){const n=this.layer,r=null===n||void 0===n?void 0:n.props.fetch;return r?r(t,{propName:e,layer:n}):super._fetch(e,t)}_onResolve(e,t){const n=this.layer;if(n){const r=n.props.onDataLoad;"data"===e&&r&&r(t,{propName:e,layer:n})}}_onError(e,t){const n=this.layer;n&&n.raiseError(t,"loading ".concat(e," of ").concat(this.layer))}}var te=n(63734);const ne=2**24-1,re=Object.freeze([]),ie=(0,x.Z)((e=>{let{oldViewport:t,viewport:n}=e;return t.equals(n)}));let oe=new Uint8ClampedArray(0);const ae={data:{type:"data",value:re,async:!0},dataComparator:{type:"function",value:null,optional:!0},_dataDiff:{type:"function",value:e=>e&&e.__diff,optional:!0},dataTransform:{type:"function",value:null,optional:!0},onDataLoad:{type:"function",value:null,optional:!0},onError:{type:"function",value:null,optional:!0},fetch:{type:"function",value:(e,t)=>{let{propName:n,layer:r,loaders:i,loadOptions:o,signal:a}=t;const{resourceManager:s}=r.context;var l;(o=o||r.getLoadOptions(),i=i||r.props.loaders,a)&&(o={...o,fetch:{...null===(l=o)||void 0===l?void 0:l.fetch,signal:a}});let c=s.contains(e);return c||o||(s.add({resourceId:e,data:(0,te.z)(e,i),persistent:!1}),c=!0),c?s.subscribe({resourceId:e,onChange:e=>{var t;return null===(t=r.internalState)||void 0===t?void 0:t.reloadAsyncProp(n,e)},consumerId:r.id,requestId:n}):(0,te.z)(e,i,o)}},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},operation:"draw",onHover:{type:"function",value:null,optional:!0},onClick:{type:"function",value:null,optional:!0},onDragStart:{type:"function",value:null,optional:!0},onDrag:{type:"function",value:null,optional:!0},onDragEnd:{type:"function",value:null,optional:!0},coordinateSystem:i.Df.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{type:"object",value:{},optional:!0,compare:2},loadOptions:{type:"object",value:null,optional:!0,ignore:!0},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,ignore:!0},getPolygonOffset:{type:"function",value:e=>{let{layerIndex:t}=e;return[0,100*-t]}},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};class se extends Q{constructor(){super(...arguments),(0,r.Z)(this,"internalState",null),(0,r.Z)(this,"lifecycle",v.dt.NO_STATE),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"parent",null)}static get componentName(){return Object.prototype.hasOwnProperty.call(this,"layerName")?this.layerName:""}get root(){let e=this;for(;e.parent;)e=e.parent;return e}toString(){const e=this.constructor.layerName||this.constructor.name;return"".concat(e,"({id: '").concat(this.props.id,"'})")}project(e){(0,w.Z)(this.internalState);const t=this.internalState.viewport||this.context.viewport,n=O(e,{viewport:t,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[r,i,o]=(0,M.aW)(n,t.pixelProjectionMatrix);return 2===e.length?[r,i]:[r,i,o]}unproject(e){(0,w.Z)(this.internalState);return(this.internalState.viewport||this.context.viewport).unproject(e)}projectPosition(e,t){(0,w.Z)(this.internalState);return I(e,{viewport:this.internalState.viewport||this.context.viewport,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem,...t})}get isComposite(){return!1}setState(e){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,e),this.setNeedsRedraw()}setNeedsRedraw(){this.internalState&&(this.internalState.needsRedraw=!0)}setNeedsUpdate(){this.internalState&&(this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0)}get isLoaded(){return!!this.internalState&&!this.internalState.isAsyncPropLoading()}get wrapLongitude(){return this.props.wrapLongitude}isPickable(){return this.props.pickable&&this.props.visible}getModels(){return this.state&&(this.state.models||this.state.model&&[this.state.model])||[]}setModuleParameters(e){for(const t of this.getModels())t.updateModuleSettings(e)}getAttributeManager(){return this.internalState&&this.internalState.attributeManager}getCurrentLayer(){return this.internalState&&this.internalState.layer}getLoadOptions(){return this.props.loadOptions}use64bitPositions(){const{coordinateSystem:e}=this.props;return e===i.Df.DEFAULT||e===i.Df.LNGLAT||e===i.Df.CARTESIAN}onHover(e,t){return this.props.onHover&&this.props.onHover(e,t)||!1}onClick(e,t){return this.props.onClick&&this.props.onClick(e,t)||!1}nullPickingColor(){return[0,0,0]}encodePickingColor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t[0]=e+1&255,t[1]=e+1>>8&255,t[2]=e+1>>8>>8&255,t}decodePickingColor(e){(0,w.Z)(e instanceof Uint8Array);const[t,n,r]=e;return t+256*n+65536*r-1}getNumInstances(){return Number.isFinite(this.props.numInstances)?this.props.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:y(this.props.data)}getStartIndices(){return this.props.startIndices?this.props.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}getBounds(){var e;return null===(e=this.getAttributeManager())||void 0===e?void 0:e.getBounds(["positions","instancePositions"])}getShaders(e){for(const t of this.props.extensions)e=E(e,t.getShaders.call(this,t));return e}shouldUpdateState(e){return e.changeFlags.propsOrDataChanged}updateState(e){const t=this.getAttributeManager(),{dataChanged:n}=e.changeFlags;if(n&&t)if(Array.isArray(n))for(const r of n)t.invalidateAll(r);else t.invalidateAll();if(t){const{props:n}=e,r=this.internalState.hasPickingBuffer,i=Number.isInteger(n.highlightedObjectIndex)||n.pickable||n.extensions.some((e=>e.getNeedsPickingBuffer.call(this,e)));if(r!==i){this.internalState.hasPickingBuffer=i;const{pickingColors:e,instancePickingColors:n}=t.attributes,r=e||n;r&&(i&&r.constant&&(r.constant=!1,t.invalidate(r.id)),r.value||i||(r.constant=!0,r.value=[0,0,0]))}}}finalizeState(e){for(const n of this.getModels())n.delete();const t=this.getAttributeManager();t&&t.finalize(),this.context&&this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState&&(this.internalState.uniformTransitions.clear(),this.internalState.finalize())}draw(e){for(const t of this.getModels())t.draw(e)}getPickingInfo(e){let{info:t,mode:n,sourceLayer:r}=e;const{index:i}=t;return i>=0&&Array.isArray(this.props.data)&&(t.object=this.props.data[i]),t}raiseError(e,t){var n,r,i,o;(t&&(e.message="".concat(t,": ").concat(e.message)),null!==(n=(r=this.props).onError)&&void 0!==n&&n.call(r,e))||(null===(i=this.context)||void 0===i||null===(o=i.onError)||void 0===o||o.call(i,e,this))}getNeedsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};return this._getNeedsRedraw(e)}needsUpdate(){return!!this.internalState&&(this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams()))}hasUniformTransition(){var e;return(null===(e=this.internalState)||void 0===e?void 0:e.uniformTransitions.active)||!1}activateViewport(e){if(!this.internalState)return;const t=this.internalState.viewport;this.internalState.viewport=e,t&&ie({oldViewport:t,viewport:e})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";const t=this.getAttributeManager();t&&("all"===e?t.invalidateAll():t.invalidate(e))}updateAttributes(e){for(const t of this.getModels())this._setModelAttributes(t,e)}_updateAttributes(){const e=this.getAttributeManager();if(!e)return;const t=this.props,n=this.getNumInstances(),r=this.getStartIndices();e.update({data:t.data,numInstances:n,startIndices:r,props:t,transitions:t.transitions,buffers:t.data.attributes,context:this});const i=e.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}_updateAttributeTransition(){const e=this.getAttributeManager();e&&e.updateTransition()}_updateUniformTransition(){const{uniformTransitions:e}=this.internalState;if(e.active){const t=e.update(),n=Object.create(this.props);for(const e in t)Object.defineProperty(n,e,{value:t[e]});return n}return this.props}calculateInstancePickingColors(e,t){let{numInstances:n}=t;if(e.constant)return;const r=Math.floor(oe.length/3);if(this.internalState.usesPickingColorCache=!0,rne&&p.Z.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),oe=L.Z.allocate(oe,n,{size:3,copy:!0,maxCount:Math.max(n,ne)});const e=Math.floor(oe.length/3),t=[];for(let n=r;n(p.Z.deprecated("layer.state.attributeManager","layer.getAttributeManager()")(),e)}),this.internalState.uniformTransitions=new m(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props),this.initializeState(this.context);for(const t of this.props.extensions)t.initializeState.call(this,this.context,t);this.setChangeFlags({dataChanged:"init",propsChanged:"init",viewportChanged:!0,extensionsChanged:!0}),this._update()}_transferState(e){(0,b.Z)("layer.matched",this,this===e);const{state:t,internalState:n}=e;this!==e&&(this.internalState=n,this.state=t,this.internalState.setAsyncProps(this.props),this._diffProps(this.props,this.internalState.getOldProps()))}_update(){const e=this.needsUpdate();if((0,b.Z)("layer.update",this,e),!e)return;const t=this.props,n=this.context,r=this.internalState,i=n.viewport,o=this._updateUniformTransition();r.propsInTransition=o,n.viewport=r.viewport||i,this.props=o;try{const e=this._getUpdateParams(),t=this.getModels();if(n.gl)this.updateState(e);else try{this.updateState(e)}catch(a){}for(const n of this.props.extensions)n.updateState.call(this,e,n);const r=this.getModels()[0]!==t[0];this._postUpdate(e,r)}finally{n.viewport=i,this.props=t,this._clearChangeFlags(),r.needsUpdate=!1,r.resetOldProps()}}_finalize(){(0,b.Z)("layer.finalize",this),this.finalizeState(this.context);for(const e of this.props.extensions)e.finalizeState.call(this,this.context,e)}_drawLayer(e){let{moduleParameters:t=null,uniforms:n={},parameters:r={}}=e;this._updateAttributeTransition();const i=this.props,o=this.context;this.props=this.internalState.propsInTransition||i;const a=this.props.opacity;n.opacity=Math.pow(a,1/2.2);try{t&&this.setModuleParameters(t);const{getPolygonOffset:e}=this.props,i=e&&e(n)||[0,0];(0,_.dR)(o.gl,{polygonOffset:i}),(0,_.s8)(o.gl,r,(()=>{const e={moduleParameters:t,uniforms:n,parameters:r,context:o};for(const t of this.props.extensions)t.draw.call(this,e,t);this.draw(e)}))}finally{this.props=i}}getChangeFlags(){var e;return null===(e=this.internalState)||void 0===e?void 0:e.changeFlags}setChangeFlags(e){if(!this.internalState)return;const{changeFlags:t}=this.internalState;for(const r in e)if(e[r]){let n=!1;if("dataChanged"===r){const i=e[r],o=t[r];i&&Array.isArray(o)&&(t.dataChanged=Array.isArray(i)?o.concat(i):i,n=!0)}t[r]||(t[r]=e[r],n=!0),n&&(0,b.Z)("layer.changeFlag",this,r,e)}const n=Boolean(t.dataChanged||t.updateTriggersChanged||t.propsChanged||t.extensionsChanged);t.propsOrDataChanged=n,t.somethingChanged=n||t.viewportChanged||t.stateChanged}_clearChangeFlags(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}_diffProps(e,t){const n=(0,A.Yt)(e,t);if(n.updateTriggersChanged)for(const i in n.updateTriggersChanged)n.updateTriggersChanged[i]&&this.invalidateAttribute(i);if(n.transitionsChanged)for(const i in n.transitionsChanged){var r;this.internalState.uniformTransitions.add(i,t[i],e[i],null===(r=e.transitions)||void 0===r?void 0:r[i])}return this.setChangeFlags(n)}validateProps(){(0,A.eQ)(this.props)}updateAutoHighlight(e){this.props.autoHighlight&&!Number.isInteger(this.props.highlightedObjectIndex)&&this._updateAutoHighlight(e)}_updateAutoHighlight(e){const t={pickingSelectedColor:e.picked?e.color:null},{highlightColor:n}=this.props;e.picked&&"function"===typeof n&&(t.pickingHighlightColor=n(e)),this.setModuleParameters(t),this.setNeedsRedraw()}_getAttributeManager(){const e=this.context;return new o.Z(e.gl,{id:this.props.id,stats:e.stats,timeline:e.timeline})}_postUpdate(e,t){const{props:n,oldProps:r}=e;this.setNeedsRedraw(),this._updateAttributes();const{model:i}=this.state;null===i||void 0===i||i.setInstanceCount(this.getNumInstances());const{autoHighlight:o,highlightedObjectIndex:a,highlightColor:s}=n;if(t||r.autoHighlight!==o||r.highlightedObjectIndex!==a||r.highlightColor!==s){const e={};o||(e.pickingSelectedColor=null),Array.isArray(s)&&(e.pickingHighlightColor=s),(t||a!==r.highlightedObjectIndex)&&(e.pickingSelectedColor=Number.isFinite(a)&&a>=0?this.encodePickingColor(a):null),this.setModuleParameters(e)}}_getUpdateParams(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}_getNeedsRedraw(e){if(!this.internalState)return!1;let t=!1;t=t||this.internalState.needsRedraw&&this.id;const n=this.getAttributeManager(),r=!!n&&n.getNeedsRedraw(e);if(t=t||r,t)for(const i of this.props.extensions)i.onNeedsRedraw.call(this,i);return this.internalState.needsRedraw=this.internalState.needsRedraw&&!e.clearRedrawFlags,t}_onAsyncPropUpdated(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}(0,r.Z)(se,"defaultProps",ae),(0,r.Z)(se,"layerName","Layer")},15672:(e,t,n)=>{"use strict";n.d(t,{E7:()=>a,Wb:()=>o,bN:()=>c,dt:()=>r,fO:()=>l,fm:()=>i,lY:()=>s});const r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i=Symbol.for("component"),o=Symbol.for("propTypes"),a=Symbol.for("deprecatedProps"),s=Symbol.for("asyncPropDefaults"),l=Symbol.for("asyncPropOriginal"),c=Symbol.for("asyncPropResolved")},98641:(e,t,n)=>{"use strict";n.d(t,{Yt:()=>o,eQ:()=>i,tg:()=>s});var r=n(15672);function i(e){const t=e[r.Wb];for(const n in t){const r=t[n],{validate:i}=r;if(i&&!i(e[n],r))throw new Error("Invalid prop ".concat(n,": ").concat(e[n]))}}function o(e,t){const n=s({newProps:e,oldProps:t,propTypes:e[r.Wb],ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),i=function(e,t){if(null===t)return"oldProps is null, initial diff";let n=!1;const{dataComparator:r,_dataDiff:i}=e;r?r(e.data,t.data)||(n="Data comparator detected a change"):e.data!==t.data&&(n="A new data container was supplied");n&&i&&(n=i(e.data,t.data)||n);return n}(e,t);let o=!1;return i||(o=function(e,t){if(null===t)return{all:!0};if("all"in e.updateTriggers){if(u(e,t,"all"))return{all:!0}}const n={};let r=!1;for(const i in e.updateTriggers)if("all"!==i){u(e,t,i)&&(n[i]=!0,r=!0)}return!!r&&n}(e,t)),{dataChanged:i,propsChanged:n,updateTriggersChanged:o,extensionsChanged:c(e,t),transitionsChanged:a(e,t)}}function a(e,t){if(!e.transitions)return!1;const n={},i=e[r.Wb];let o=!1;for(const r in e.transitions){const a=i[r],s=a&&a.type;("number"===s||"color"===s||"array"===s)&&l(e[r],t[r],a)&&(n[r]=!0,o=!0)}return!!o&&n}function s(e){let{newProps:t,oldProps:n,ignoreProps:r={},propTypes:i={},triggerName:o="props"}=e;if(n===t)return!1;if("object"!==typeof t||null===t)return"".concat(o," changed shallowly");if("object"!==typeof n||null===n)return"".concat(o," changed shallowly");for(const a of Object.keys(t))if(!(a in r)){if(!(a in n))return"".concat(o,".").concat(a," added");const e=l(t[a],n[a],i[a]);if(e)return"".concat(o,".").concat(a," ").concat(e)}for(const a of Object.keys(n))if(!(a in r)){if(!(a in t))return"".concat(o,".").concat(a," dropped");if(!Object.hasOwnProperty.call(t,a)){const e=l(t[a],n[a],i[a]);if(e)return"".concat(o,".").concat(a," ").concat(e)}}return!1}function l(e,t,n){let r=n&&n.equal;return r&&!r(e,t,n)?"changed deeply":r||(r=e&&t&&e.equals,!r||r.call(e,t))?r||t===e?null:"changed shallowly":"changed deeply"}function c(e,t){if(null===t)return!0;const n=t.extensions,{extensions:r}=e;if(r===n)return!1;if(!n||!r)return!0;if(r.length!==n.length)return!0;for(let i=0;i{"use strict";n.d(t,{Z:()=>s});var r=n(68185);class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:"pass"};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"props",void 0);const{id:n}=t;this.id=n,this.gl=e,this.props={...t}}setProps(e){Object.assign(this.props,e)}render(e){}cleanup(){}}var o=n(76195),a=n(36708);class s extends i{constructor(){super(...arguments),(0,r.Z)(this,"_lastRenderIndex",-1)}render(e){const t=this.gl;return(0,o.dR)(t,{framebuffer:e.target}),this._drawLayers(e)}_drawLayers(e){const{target:t,moduleParameters:n,viewports:r,views:i,onViewportActive:a,clearStack:s=!0,clearCanvas:l=!0}=e;e.pass=e.pass||"unknown";const c=this.gl;l&&function(e,t){const n=t?t.width:e.drawingBufferWidth,r=t?t.height:e.drawingBufferHeight;(0,o.dR)(e,{viewport:[0,0,n,r]}),e.clear(16640)}(c,t),s&&(this._lastRenderIndex=-1);const u=[];for(const o of r){const r=i&&i[o.id];null===a||void 0===a||a(o);const s=this._getDrawLayerParams(o,e),l=o.subViewports||[o];for(const i of l){const o=this._drawLayersInViewport(c,{target:t,moduleParameters:n,viewport:i,view:r,pass:e.pass,layers:e.layers},s);u.push(o)}}return u}_getDrawLayerParams(e,t){let{layers:n,pass:r,isPicking:i=!1,layerFilter:o,cullRect:a,effects:s,moduleParameters:c}=t,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const d=[],h=l(this._lastRenderIndex+1),f={layer:n[0],viewport:e,isPicking:i,renderPass:r,cullRect:a},p={};for(let l=0;l(0,a.Z)(e,t)))}const h={totalCount:r.length,visibleCount:0,compositeCount:0,pickableCount:0};(0,o.dR)(e,{viewport:d});for(let o=0;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={},r=(i,o)=>{const a=i.props._offset,s=i.id,c=i.parent&&i.parent.id;let u;if(c&&!(c in t)&&r(i.parent,!1),c in n){const e=n[c]=n[c]||l(t[c],t);u=e(i,o),n[s]=e}else Number.isFinite(a)?(u=a+(t[c]||0),n[s]=null):u=e;return o&&u>=e&&(e=u+1),t[s]=u,u};return r}},79463:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};const i={inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ","vs:DECKGL_FILTER_COLOR":"\n picking_setPickingColor(geometry.pickingColor);\n ","fs:#decl":"\nuniform bool picking_uAttribute;\n ","fs:DECKGL_FILTER_COLOR":{order:99,injection:"\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n "}},...{name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n return dot(color, vec3(1.0)) > 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n picking_uSelectedColorValid &&\n !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n if (picking_uActive) {\n picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n if (!picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n }\n } else {\n picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n }\n}\n\nvoid picking_setPickingAttribute(float value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.r = value;\n }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rg = value;\n }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = value;\n }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n if (picking_uActive) {\n return color;\n }\n bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n if (selected) {\n float highLightAlpha = picking_uHighlightColor.a;\n float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n float highLightRatio = highLightAlpha / blendedAlpha;\n\n vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n } else {\n return color;\n }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n if (picking_uActive) {\n if (picking_vRGBcolor_Avalid.a == 0.0) {\n discard;\n }\n return picking_vRGBcolor_Avalid;\n }\n return color;\n}\nvec4 picking_filterColor(vec4 color) {\n vec4 highightColor = picking_filterHighlightColor(color);\n return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const t={};if(void 0!==e.pickingSelectedColor)if(e.pickingSelectedColor){const n=e.pickingSelectedColor.slice(0,3);t.picking_uSelectedColorValid=1,t.picking_uSelectedColor=n}else t.picking_uSelectedColorValid=0;if(e.pickingHighlightColor){const n=Array.from(e.pickingHighlightColor,(e=>e/255));Number.isFinite(n[3])||(n[3]=1),t.picking_uHighlightColor=n}return void 0!==e.pickingActive&&(t.picking_uActive=Boolean(e.pickingActive),t.picking_uAttribute=Boolean(e.pickingAttribute)),t}}}},61518:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});const r={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n float r, s, t, x;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n x = -a * a;\n s = a;\n r = a;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_3;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_5;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_7;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_9;\n s = s + t;\n\n return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n if (a == 0.0) {\n sin_t = 0.0;\n cos_t = 1.0;\n }\n sin_t = sin_taylor_fp32(a);\n cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n float sin_a;\n float cos_a;\n\n if (a == 0.0) {\n return 0.0;\n }\n float z = floor(a / TWO_PI);\n float r = a - TWO_PI * z;\n\n float t;\n float q = floor(r / PI_2 + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return 1.0 / 0.0;\n }\n\n t = r - PI_2 * q;\n\n q = floor(t / PI_16 + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return 1.0 / 0.0;\n } else {\n t = t - PI_16 * q;\n }\n\n float u = 0.0;\n float v = 0.0;\n\n float sin_t, cos_t;\n float s, c;\n sincos_taylor_fp32(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0;\n v = SIN_TABLE_0;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1;\n v = SIN_TABLE_1;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2;\n v = SIN_TABLE_2;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3;\n v = SIN_TABLE_3;\n }\n if (k > 0) {\n s = u * sin_t + v * cos_t;\n c = u * cos_t - v * sin_t;\n } else {\n s = u * sin_t - v * cos_t;\n c = u * cos_t + v * sin_t;\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n return tan_taylor_fp32(a);\n#else\n return tan(a);\n#endif\n}\n",fs:null},i="#define SMOOTH_EDGE_RADIUS 0.5",o={name:"geometry",vs:"\n".concat(i,"\n\nstruct VertexGeometry {\n vec4 position;\n vec3 worldPosition;\n vec3 worldPositionAlt;\n vec3 normal;\n vec2 uv;\n vec3 pickingColor;\n} geometry = VertexGeometry(\n vec4(0.0, 0.0, 1.0, 0.0),\n vec3(0.0),\n vec3(0.0),\n vec3(0.0),\n vec2(0.0),\n vec3(0.0)\n);\n"),fs:"\n".concat(i,"\n\nstruct FragmentGeometry {\n vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n")};var a=n(98029);const s=Object.keys(a.Df).map((e=>"const int COORDINATE_SYSTEM_".concat(e," = ").concat(a.Df[e],";"))).join(""),l=Object.keys(a.zG).map((e=>"const int PROJECTION_MODE_".concat(e," = ").concat(a.zG[e],";"))).join(""),c=Object.keys(a.iI).map((e=>"const int UNIT_".concat(e.toUpperCase()," = ").concat(a.iI[e],";"))).join(""),u="".concat(s,"\n").concat(l,"\n").concat(c,"\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\nuniform vec3 project_uCommonOrigin;\nuniform bool project_uPseudoMeters;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0;\nconst float GLOBE_RADIUS = 256.0;\nfloat project_size_at_latitude(float lat) {\n float y = clamp(lat, -89.9, 89.9);\n return 1.0 / cos(radians(y));\n}\n\nfloat project_size() {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n project_uPseudoMeters == false) {\n \n if (geometry.position.w == 0.0) {\n return project_size_at_latitude(geometry.worldPosition.y);\n }\n \n float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;\n float y2 = y * y;\n float y4 = y2 * y2;\n float y6 = y4 * y2;\n return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;\n }\n return 1.0;\n}\n\nfloat project_size_at_latitude(float meters, float lat) {\n return meters * project_uCommonUnitsPerMeter.z * project_size_at_latitude(lat);\n}\nfloat project_size(float meters) {\n return meters * project_uCommonUnitsPerMeter.z * project_size();\n}\n\nvec2 project_size(vec2 meters) {\n return meters * project_uCommonUnitsPerMeter.xy * project_size();\n}\n\nvec3 project_size(vec3 meters) {\n return meters * project_uCommonUnitsPerMeter * project_size();\n}\n\nvec4 project_size(vec4 meters) {\n return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\nmat3 project_get_orientation_matrix(vec3 up) {\n vec3 uz = normalize(up);\n vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n vec3 uy = cross(uz, ux);\n return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n transform = project_get_orientation_matrix(commonPosition);\n return true;\n }\n return false;\n}\nvec3 project_normal(vec3 vector) {\n vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n vec3 n = normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n mat3 rotation;\n if (project_needs_rotation(geometry.position.xyz, rotation)) {\n n = rotation * n;\n }\n return n;\n}\n\nvec4 project_offset_(vec4 offset) {\n float dy = offset.y;\n vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\nvec2 project_mercator_(vec2 lnglat) {\n float x = lnglat.x;\n if (project_uWrapLongitude) {\n x = mod(x + 180., 360.0) - 180.;\n }\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n float lambda = radians(lnglatz.x);\n float phi = radians(lnglatz.y);\n float cosPhi = cos(phi);\n float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n return vec3(\n sin(lambda) * cosPhi,\n -cos(lambda) * cosPhi,\n sin(phi)\n ) * D;\n}\nvec4 project_position(vec4 position, vec3 position64Low) {\n vec4 position_world = project_uModelMatrix * position;\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator_(position_world.xy),\n project_size_at_latitude(position_world.z, position_world.y),\n position_world.w\n );\n }\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n position_world.xyz += project_uCoordinateOrigin;\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_globe_(position_world.xyz),\n position_world.w\n );\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n if (abs(position_world.y - project_uCoordinateOrigin.y) > 0.25) {\n return vec4(\n project_mercator_(position_world.xy) - project_uCommonOrigin.xy,\n project_size(position_world.z),\n position_world.w\n );\n }\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n position_world.xyz -= project_uCoordinateOrigin;\n }\n return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n return viewProjectionMatrix * position + center;\n}\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n return project_size(meters) * project_uScale;\n}\nfloat project_size_to_pixel(float size, int unit) {\n if (unit == UNIT_METERS) return project_size_to_pixel(size);\n if (unit == UNIT_COMMON) return size * project_uScale;\n return size;\n}\nfloat project_pixel_size(float pixels) {\n return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n return pixels / project_uScale;\n}\n");var d=n(26651);const h={};const f={name:"project",dependencies:[r,o],vs:u,getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return"viewport"in e?(0,d.C)(e):{}}}},26651:(e,t,n)=>{"use strict";n.d(t,{C:()=>p,v:()=>f});var r=n(44649),i=n(81723),o=n(98029),a=n(12091);const s=[0,0,0,0],l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=[0,0,0],d=[0,0,0],h=(0,a.Z)((function(e){let{viewport:t,devicePixelRatio:n,coordinateSystem:a,coordinateOrigin:d}=e;const{projectionCenter:h,viewProjectionMatrix:p,originCommon:g,cameraPosCommon:m,shaderCoordinateOrigin:A,geospatialOrigin:v}=function(e,t,n){const{viewMatrixUncentered:o,projectionMatrix:a}=e;let{viewMatrix:c,viewProjectionMatrix:u}=e,d=s,h=s,p=e.cameraPosition;const{geospatialOrigin:g,shaderCoordinateOrigin:m,offsetMode:A}=f(e,t,n);A&&(h=e.projectPosition(g||m),p=[p[0]-h[0],p[1]-h[1],p[2]-h[2]],h[3]=1,d=i.fF([],h,u),c=o||c,u=r.Jp([],a,c),u=r.Jp([],u,l));return{viewMatrix:c,viewProjectionMatrix:u,projectionCenter:d,originCommon:h,cameraPosCommon:p,shaderCoordinateOrigin:m,geospatialOrigin:g}}(t,a,d),y=t.getDistanceScales(),b=[t.width*n,t.height*n],_=i.fF([],[0,0,-t.focalDistance,1],t.projectionMatrix)[3]||1,w={project_uCoordinateSystem:a,project_uProjectionMode:t.projectionMode,project_uCoordinateOrigin:A,project_uCommonOrigin:g.slice(0,3),project_uCenter:h,project_uPseudoMeters:Boolean(t._pseudoMeters),project_uViewportSize:b,project_uDevicePixelRatio:n,project_uFocalDistance:_,project_uCommonUnitsPerMeter:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:u,project_uScale:t.scale,project_uWrapLongitude:!1,project_uViewProjectionMatrix:p,project_uModelMatrix:c,project_uCameraPosition:m};if(v){const e=t.getDistanceScales(v);switch(a){case o.Df.METER_OFFSETS:w.project_uCommonUnitsPerWorldUnit=e.unitsPerMeter,w.project_uCommonUnitsPerWorldUnit2=e.unitsPerMeter2;break;case o.Df.LNGLAT:case o.Df.LNGLAT_OFFSETS:t._pseudoMeters||(w.project_uCommonUnitsPerMeter=e.unitsPerMeter),w.project_uCommonUnitsPerWorldUnit=e.unitsPerDegree,w.project_uCommonUnitsPerWorldUnit2=e.unitsPerDegree2;break;case o.Df.CARTESIAN:w.project_uCommonUnitsPerWorldUnit=[1,1,e.unitsPerMeter[2]],w.project_uCommonUnitsPerWorldUnit2=[0,0,e.unitsPerMeter2[2]]}}return w}));function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;n.length<3&&(n=[n[0],n[1],0]);let r,i=n,a=!0;switch(r=t===o.Df.LNGLAT_OFFSETS||t===o.Df.METER_OFFSETS?n:e.isGeospatial?[Math.fround(e.longitude),Math.fround(e.latitude),0]:null,e.projectionMode){case o.zG.WEB_MERCATOR:t!==o.Df.LNGLAT&&t!==o.Df.CARTESIAN||(r=[0,0,0],a=!1);break;case o.zG.WEB_MERCATOR_AUTO_OFFSET:t===o.Df.LNGLAT?i=r:t===o.Df.CARTESIAN&&(i=[Math.fround(e.center[0]),Math.fround(e.center[1]),0],r=e.unprojectPosition(i),i[0]-=n[0],i[1]-=n[1],i[2]-=n[2]);break;case o.zG.IDENTITY:i=e.position.map(Math.fround),i[2]=i[2]||0;break;case o.zG.GLOBE:a=!1,r=null;break;default:a=!1}return{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:a}}function p(e){let{viewport:t,devicePixelRatio:n=1,modelMatrix:r=null,coordinateSystem:i=o.Df.DEFAULT,coordinateOrigin:a=d,autoWrapLongitude:s=!1}=e;i===o.Df.DEFAULT&&(i=t.isGeospatial?o.Df.LNGLAT:o.Df.CARTESIAN);const l=h({viewport:t,devicePixelRatio:n,coordinateSystem:i,coordinateOrigin:a});return l.project_uWrapLongitude=s,l.project_uModelMatrix=r||c,l}},58521:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={name:"project32",dependencies:[n(61518).Z],vs:"\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n vec3 projectedPosition = project_position(position, position64Low);\n mat3 rotation;\n if (project_needs_rotation(projectedPosition, rotation)) {\n // offset is specified as ENU\n // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n offset = rotation * offset;\n }\n commonPosition = vec4(projectedPosition + offset, 1.0);\n return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset\n) {\n vec4 commonPosition;\n return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},78191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(68185);class i{constructor(e){(0,r.Z)(this,"_inProgress",void 0),(0,r.Z)(this,"_handle",void 0),(0,r.Z)(this,"_timeline",void 0),(0,r.Z)(this,"time",void 0),(0,r.Z)(this,"settings",void 0),this._inProgress=!1,this._handle=null,this._timeline=e,this.time=0,this.settings={duration:0}}get inProgress(){return this._inProgress}start(e){var t,n;this.cancel(),this.settings=e,this._inProgress=!0,null===(t=(n=this.settings).onStart)||void 0===t||t.call(n,this)}end(){var e,t;this._inProgress&&(this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,null===(e=(t=this.settings).onEnd)||void 0===e||e.call(t,this))}cancel(){var e,t;this._inProgress&&(null===(e=(t=this.settings).onInterrupt)||void 0===e||e.call(t,this),this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}update(){var e,t;if(!this._inProgress)return!1;if(null===this._handle){const{_timeline:e,settings:t}=this;this._handle=e.addChannel({delay:e.getTime(),duration:t.duration})}return this.time=this._timeline.getTime(this._handle),this._onUpdate(),null===(e=(t=this.settings).onUpdate)||void 0===e||e.call(t,this),this._timeline.isFinished(this._handle)&&this.end(),!0}_onUpdate(){}}},37954:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error(t||"deck.gl: assertion failed.")}n.d(t,{Z:()=>r})},63549:(e,t,n)=>{"use strict";function r(e,t,n){if(e===t)return!0;if(!n||!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;ir})},35395:(e,t,n)=>{"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;return Array.isArray(e)?i(e,t,[]):t(e)?[e]:[]}function i(e,t,n){let r=-1;for(;++ro,x:()=>r})},39179:(e,t,n)=>{"use strict";n.d(t,{D0:()=>a,jB:()=>o,jr:()=>s});const r=[],i=[];function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=r;const a={index:-1,data:e,target:[]};return e?"function"===typeof e[Symbol.iterator]?o=e:e.length>0&&(i.length=e.length,o=i):o=r,(t>0||Number.isFinite(n))&&(o=(Array.isArray(o)?o:Array.from(o)).slice(t,n),a.index=t-1),{iterable:o,objectInfo:a}}function a(e){return e&&e[Symbol.asyncIterator]}function s(e,t){const{size:n,stride:r,offset:i,startIndices:o,nested:a}=t,s=e.BYTES_PER_ELEMENT,l=r?r/s:n,c=i?i/s:0,u=Math.floor((e.length-c)/l);return(t,r)=>{let{index:i,target:s}=r;if(!o){const t=i*l+c;for(let r=0;r{"use strict";n.d(t,{Z:()=>r});const r=new(n(20251).Z)({id:"deck"})},84557:(e,t,n)=>{"use strict";n.d(t,{Du:()=>s,TK:()=>d,Xt:()=>a,bS:()=>o,cc:()=>h});var r=n(10468),i=n(31549);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(e){return[e[12],e[13],e[14]]}function s(e){return{left:c(e[3]+e[0],e[7]+e[4],e[11]+e[8],e[15]+e[12]),right:c(e[3]-e[0],e[7]-e[4],e[11]-e[8],e[15]-e[12]),bottom:c(e[3]+e[1],e[7]+e[5],e[11]+e[9],e[15]+e[13]),top:c(e[3]-e[1],e[7]-e[5],e[11]-e[9],e[15]-e[13]),near:c(e[3]+e[2],e[7]+e[6],e[11]+e[10],e[15]+e[14]),far:c(e[3]-e[2],e[7]-e[6],e[11]-e[10],e[15]-e[14])}}const l=new i.Z;function c(e,t,n,r){l.set(e,t,n);const o=l.len();return{distance:r/o,normal:new i.Z(-e/o,-t/o,-n/o)}}let u;function d(e,t){const{size:n=1,startIndex:i=0}=t,o=void 0!==t.endIndex?t.endIndex:e.length,a=(o-i)/n;u=r.Z.allocate(u,a,{type:Float32Array,size:2*n});let s=i,l=0;for(;s{"use strict";function r(e,t){if(e===t)return!0;if(Array.isArray(e)){const n=e.length;if(!t||t.length!==n)return!1;for(let r=0;r{for(const o in i)if(!r(i[o],n[o])){t=e(i),n=i;break}return t}}n.d(t,{Z:()=>i})},3943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(68185),i=n(39179),o=n(10468),a=n(37954),s=n(64180);class l{constructor(e){(0,r.Z)(this,"opts",void 0),(0,r.Z)(this,"typedArrayManager",void 0),(0,r.Z)(this,"indexStarts",[0]),(0,r.Z)(this,"vertexStarts",[0]),(0,r.Z)(this,"vertexCount",0),(0,r.Z)(this,"instanceCount",0),(0,r.Z)(this,"attributes",void 0),(0,r.Z)(this,"_attributeDefs",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"getGeometry",void 0),(0,r.Z)(this,"geometryBuffer",void 0),(0,r.Z)(this,"buffers",void 0),(0,r.Z)(this,"positionSize",void 0),(0,r.Z)(this,"normalize",void 0);const{attributes:t={}}=e;this.typedArrayManager=o.Z,this.attributes={},this._attributeDefs=t,this.opts=e,this.updateGeometry(e)}updateGeometry(e){Object.assign(this.opts,e);const{data:t,buffers:n={},getGeometry:r,geometryBuffer:i,positionFormat:o,dataChanged:s,normalize:l=!0}=this.opts;if(this.data=t,this.getGeometry=r,this.positionSize=i&&i.size||("XY"===o?2:3),this.buffers=n,this.normalize=l,i&&((0,a.Z)(t.startIndices),this.getGeometry=this.getGeometryFromBuffer(i),l||(n.positions=i)),this.geometryBuffer=n.positions,Array.isArray(s))for(const a of s)this._rebuildGeometry(a);else this._rebuildGeometry()}updatePartialGeometry(e){let{startRow:t,endRow:n}=e;this._rebuildGeometry({startRow:t,endRow:n})}getGeometryFromBuffer(e){const t=e.value||e;return ArrayBuffer.isView(t)?(0,i.jr)(t,{size:this.positionSize,offset:e.offset,stride:e.stride,startIndices:this.data.startIndices}):null}_allocate(e,t){const{attributes:n,buffers:r,_attributeDefs:i,typedArrayManager:o}=this;for(const a in i)if(a in r)o.release(n[a]),n[a]=null;else{const r=i[a];r.copy=t,n[a]=o.allocate(n[a],e,r)}}_forEachGeometry(e,t,n){const{data:r,getGeometry:o}=this,{iterable:a,objectInfo:s}=(0,i.jB)(r,t,n);for(const i of a){s.index++;e(o?o(i,s):null,s.index)}}_rebuildGeometry(e){if(!this.data)return;let{indexStarts:t,vertexStarts:n,instanceCount:r}=this;const{data:i,geometryBuffer:o}=this,{startRow:a=0,endRow:l=1/0}=e||{},c={};if(e||(t=[0],n=[0]),this.normalize||!o)this._forEachGeometry(((e,t)=>{const r=e&&this.normalizeGeometry(e);c[t]=r,n[t+1]=n[t]+(r?this.getGeometrySize(r):0)}),a,l),r=n[n.length-1];else if(n=i.startIndices,r=n[i.length]||0,ArrayBuffer.isView(o))r=r||o.length/this.positionSize;else if(o instanceof s.Z){const e=o.accessor.stride||4*this.positionSize;r=r||o.byteLength/e}else if(o.buffer){const e=o.stride||4*this.positionSize;r=r||o.buffer.byteLength/e}else if(o.value){const e=o.value,t=o.stride/e.BYTES_PER_ELEMENT||this.positionSize;r=r||e.length/t}this._allocate(r,Boolean(e)),this.indexStarts=t,this.vertexStarts=n,this.instanceCount=r;const u={};this._forEachGeometry(((e,i)=>{const o=c[i]||e;u.vertexStart=n[i],u.indexStart=t[i];const a=i{"use strict";n.d(t,{Z:()=>i});var r=n(68185);const i=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"_pool",[]),(0,r.Z)(this,"opts",{overAlloc:2,poolSize:100}),this.setOptions(e)}setOptions(e){Object.assign(this.opts,e)}allocate(e,t,n){let{size:r=1,type:i,padding:o=0,copy:a=!1,initialize:s=!1,maxCount:l}=n;const c=i||e&&e.constructor||Float32Array,u=t*r+o;if(ArrayBuffer.isView(e)){if(u<=e.length)return e;if(u*e.BYTES_PER_ELEMENT<=e.buffer.byteLength)return new c(e.buffer,0,u)}let d=1/0;l&&(d=l*r+o);const h=this._allocate(c,u,s,d);return e&&a?h.set(e):s||h.fill(0,0,4),this._release(e),h}release(e){this._release(e)}_allocate(e,t,n,r){let i=Math.max(Math.ceil(t*this.opts.overAlloc),1);i>r&&(i=r);const o=this._pool,a=e.BYTES_PER_ELEMENT*i,s=o.findIndex((e=>e.byteLength>=a));if(s>=0){const t=new e(o.splice(s,1)[0],0,i);return n&&t.fill(0),t}return new e(i)}_release(e){if(!ArrayBuffer.isView(e))return;const t=this._pool,{buffer:n}=e,{byteLength:r}=n,i=t.findIndex((e=>e.byteLength>=r));i<0?t.push(n):(i>0||t.lengththis.opts.poolSize&&t.shift()}}},43809:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(68185),i=n(65148),o=n(84557),a=n(39944),s=n(30373),l=n(31549),c=n(44649),u=n(1384),d=n(98029);const h=Math.PI/180,f=(0,o.bS)(),p=[0,0,0],g={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};class m{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"x",void 0),(0,r.Z)(this,"y",void 0),(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"padding",void 0),(0,r.Z)(this,"isGeospatial",void 0),(0,r.Z)(this,"zoom",void 0),(0,r.Z)(this,"focalDistance",void 0),(0,r.Z)(this,"position",void 0),(0,r.Z)(this,"modelMatrix",void 0),(0,r.Z)(this,"distanceScales",void 0),(0,r.Z)(this,"scale",void 0),(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"cameraPosition",void 0),(0,r.Z)(this,"projectionMatrix",void 0),(0,r.Z)(this,"viewMatrix",void 0),(0,r.Z)(this,"viewMatrixUncentered",void 0),(0,r.Z)(this,"viewMatrixInverse",void 0),(0,r.Z)(this,"viewProjectionMatrix",void 0),(0,r.Z)(this,"pixelProjectionMatrix",void 0),(0,r.Z)(this,"pixelUnprojectionMatrix",void 0),(0,r.Z)(this,"resolution",void 0),(0,r.Z)(this,"_frustumPlanes",{}),this.id=e.id||this.constructor.displayName||"viewport",this.x=e.x||0,this.y=e.y||0,this.width=e.width||1,this.height=e.height||1,this.zoom=e.zoom||0,this.padding=e.padding,this.distanceScales=e.distanceScales||g,this.focalDistance=e.focalDistance||1,this.position=e.position||p,this.modelMatrix=e.modelMatrix||null;const{longitude:t,latitude:n}=e;this.isGeospatial=Number.isFinite(n)&&Number.isFinite(t),this._initProps(e),this._initMatrices(e),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}get subViewports(){return null}get metersPerPixel(){return this.distanceScales.metersPerUnit[2]/this.scale}get projectionMode(){return this.isGeospatial?this.zoom<12?d.zG.WEB_MERCATOR:d.zG.WEB_MERCATOR_AUTO_OFFSET:d.zG.IDENTITY}equals(e){return e instanceof m&&(this===e||e.width===this.width&&e.height===this.height&&e.scale===this.scale&&(0,s.fS)(e.projectionMatrix,this.projectionMatrix)&&(0,s.fS)(e.viewMatrix,this.viewMatrix))}project(e){let{topLeft:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.projectPosition(e),r=(0,u.aW)(n,this.pixelProjectionMatrix),[i,o]=r,a=t?o:this.height-o;return 2===e.length?[i,a]:[i,a,r[2]]}unproject(e){let{topLeft:t=!0,targetZ:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[r,i,o]=e,a=t?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],l=(0,u.CT)([r,a,o],this.pixelUnprojectionMatrix,s),[c,d,h]=this.unprojectPosition(l);return Number.isFinite(o)?[c,d,h]:Number.isFinite(n)?[c,d,n]:[c,d]}projectPosition(e){const[t,n]=this.projectFlat(e);return[t,n,(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}unprojectPosition(e){const[t,n]=this.unprojectFlat(e);return[t,n,(e[2]||0)*this.distanceScales.metersPerUnit[2]]}projectFlat(e){if(this.isGeospatial){const t=(0,u.w5)(e);return t[1]=(0,s.uZ)(t[1],-318,830),t}return e}unprojectFlat(e){return this.isGeospatial?(0,u.es)(e):e}getBounds(){const e={targetZ:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).z||0},t=this.unproject([0,0],e),n=this.unproject([this.width,0],e),r=this.unproject([0,this.height],e),i=this.unproject([this.width,this.height],e);return[Math.min(t[0],n[0],r[0],i[0]),Math.min(t[1],n[1],r[1],i[1]),Math.max(t[0],n[0],r[0],i[0]),Math.max(t[1],n[1],r[1],i[1])]}getDistanceScales(e){return e?(0,u.ro)({longitude:e[0],latitude:e[1],highPrecision:!0}):this.distanceScales}containsPixel(e){let{x:t,y:n,width:r=1,height:i=1}=e;return t{"use strict";n.d(t,{Z:()=>c});var r=n(68185),i=n(43809),o=n(1384),a=n(69291),s=n(30373),l=n(39944);class c extends i.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{latitude:t=0,longitude:n=0,zoom:i=0,pitch:a=0,bearing:c=0,nearZMultiplier:u=.1,farZMultiplier:d=1.01,orthographic:h=!1,projectionMatrix:f,repeat:p=!1,worldOffset:g=0,position:m,padding:A,legacyMeterSizes:v=!1}=e;let{width:y,height:b,altitude:_=1.5}=e;const w=Math.pow(2,i);let x;y=y||1,b=b||1;let E=null;if(f)_=f[5]/2,x=(0,o.Lu)(_);else{let n;if(e.fovy?(x=e.fovy,_=(0,o.sj)(x)):x=(0,o.Lu)(_),A){const{top:e=0,bottom:t=0}=A;n=[0,(0,s.uZ)((e+b-t)/2,0,b)-b/2]}E=(0,o.wl)({width:y,height:b,scale:w,center:m&&[0,0,m[2]*(0,o.NC)(t)],offset:n,pitch:a,fovy:x,nearZMultiplier:u,farZMultiplier:d})}let S=(0,o.lf)({height:b,pitch:a,bearing:c,scale:w,altitude:_});if(g){S=(new l.Z).translate([512*g,0,0]).multiplyLeft(S)}super({...e,width:y,height:b,viewMatrix:S,longitude:n,latitude:t,zoom:i,...E,fovy:x,focalDistance:_}),(0,r.Z)(this,"longitude",void 0),(0,r.Z)(this,"latitude",void 0),(0,r.Z)(this,"pitch",void 0),(0,r.Z)(this,"bearing",void 0),(0,r.Z)(this,"altitude",void 0),(0,r.Z)(this,"fovy",void 0),(0,r.Z)(this,"orthographic",void 0),(0,r.Z)(this,"_subViewports",void 0),(0,r.Z)(this,"_pseudoMeters",void 0),this.latitude=t,this.longitude=n,this.zoom=i,this.pitch=a,this.bearing=c,this.altitude=_,this.fovy=x,this.orthographic=h,this._subViewports=p?[]:null,this._pseudoMeters=v,Object.freeze(this)}get subViewports(){if(this._subViewports&&!this._subViewports.length){const e=this.getBounds(),t=Math.floor((e[0]+180)/360),n=Math.ceil((e[2]-180)/360);for(let r=t;r<=n;r++){const e=r?new c({...this,worldOffset:r}):this;this._subViewports.push(e)}}return this._subViewports}projectPosition(e){if(this._pseudoMeters)return super.projectPosition(e);const[t,n]=this.projectFlat(e);return[t,n,(e[2]||0)*(0,o.NC)(e[1])]}unprojectPosition(e){if(this._pseudoMeters)return super.unprojectPosition(e);const[t,n]=this.unprojectFlat(e);return[t,n,(e[2]||0)/(0,o.NC)(n)]}addMetersToLngLat(e,t){return(0,o.eG)(e,t)}panByPosition(e,t){const n=(0,o.CT)(t,this.pixelUnprojectionMatrix),r=this.projectFlat(e),i=a.IH([],r,a.tk([],n)),s=a.IH([],this.center,i),[l,c]=this.unprojectFlat(s);return{longitude:l,latitude:c}}getBounds(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.zX)(this,e.z||0);return[Math.min(t[0][0],t[1][0],t[2][0],t[3][0]),Math.min(t[0][1],t[1][1],t[2][1],t[3][1]),Math.max(t[0][0],t[1][0],t[2][0],t[3][0]),Math.max(t[0][1],t[1][1],t[2][1],t[3][1])]}fitBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{width:n,height:r}=this,{longitude:i,latitude:a,zoom:s}=(0,o.Xg)({width:n,height:r,bounds:e,...t});return new c({width:n,height:r,longitude:i,latitude:a,zoom:s})}}(0,r.Z)(c,"displayName","WebMercatorViewport")},46056:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var r=n(68185),i=n(44602);const o={name:"collision",dependencies:[n(61518).Z],vs:"\n#ifdef NON_INSTANCED_MODEL\nattribute float collisionPriorities;\n#else\nattribute float instanceCollisionPriorities;\n#endif\n\nuniform sampler2D collision_texture;\nuniform bool collision_sort;\nuniform bool collision_enabled;\n\nvec2 collision_getCoords(vec4 position) {\n vec4 collision_clipspace = project_common_position_to_clipspace(position);\n return (1.0 + collision_clipspace.xy / collision_clipspace.w) / 2.0;\n}\n\nfloat collision_match(vec2 tex, vec3 pickingColor) {\n vec4 collision_pickingColor = texture2D(collision_texture, tex);\n float delta = dot(abs(collision_pickingColor.rgb - pickingColor), vec3(1.0));\n float e = 0.001;\n return step(delta, e);\n}\n\nfloat collision_isVisible(vec2 texCoords, vec3 pickingColor) {\n if (!collision_enabled) {\n return 1.0;\n }\n\n // Visibility test, sample area of 5x5 pixels in order to fade in/out.\n // Due to the locality, the lookups will be cached\n // This reduces the flicker present when objects are shown/hidden\n const int N = 2;\n float accumulator = 0.0;\n vec2 step = vec2(1.0 / project_uViewportSize);\n\n const float floatN = float(N);\n vec2 delta = -floatN * step;\n for(int i = -N; i <= N; i++) {\n delta.x = -step.x * floatN;\n for(int j = -N; j <= N; j++) {\n accumulator += collision_match(texCoords + delta, pickingColor);\n delta.x += step.x;\n }\n delta.y += step.y;\n }\n\n float W = 2.0 * floatN + 1.0;\n return pow(accumulator / (W * W), 2.2);\n}\n",inject:{"vs:#decl":"\n float collision_fade = 1.0;\n","vs:DECKGL_FILTER_GL_POSITION":"\n if (collision_sort) {\n #ifdef NON_INSTANCED_MODEL\n float collisionPriority = collisionPriorities;\n #else\n float collisionPriority = instanceCollisionPriorities;\n #endif\n position.z = -0.001 * collisionPriority * position.w; // Support range -1000 -> 1000\n }\n\n if (collision_enabled) {\n vec4 collision_common_position = project_position(vec4(geometry.worldPosition, 1.0));\n vec2 collision_texCoords = collision_getCoords(collision_common_position);\n collision_fade = collision_isVisible(collision_texCoords, geometry.pickingColor / 255.0);\n if (collision_fade < 0.0001) {\n // Position outside clip space bounds to discard\n position = vec4(0.0, 0.0, 2.0, 1.0);\n }\n }\n ","vs:DECKGL_FILTER_COLOR":"\n color.a *= collision_fade;\n "},getUniforms:(e,t)=>{if(!e||!("dummyCollisionMap"in e))return{};const{collisionFBO:n,drawToCollisionMap:r,dummyCollisionMap:i}=e;return{collision_sort:Boolean(r),collision_texture:!r&&n?n:i}}};var a=n(81786),s=n(76195),l=n(26277),c=n(64282),u=n(30373),d=n(63549),h=n(66176);class f extends h.Z{renderCollisionMap(e,t){const n=this.gl;return(0,s.s8)(n,{scissorTest:!0,scissor:[1,1,e.width-2,e.height-2],clearColor:[0,0,0,0],blend:!1,depthTest:!0,depthRange:[0,1]},(()=>this.render({...t,target:e,pass:"collision"})))}getModuleParameters(){return{drawToCollisionMap:!0,pickingActive:1,pickingAttribute:!1,lightSources:{}}}}var p=n(65148);class g extends h.Z{constructor(e,t){super(e,t),(0,r.Z)(this,"maskMap",void 0),(0,r.Z)(this,"fbo",void 0);const{mapSize:n=2048}=t;this.maskMap=new a.Z(e,{width:n,height:n,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.fbo=new c.Z(e,{id:"maskmap",width:n,height:n,attachments:{36064:this.maskMap}})}render(e){const t=this.gl,n=[!1,!1,!1,!1];return n[e.channel]=!0,(0,s.s8)(t,{clearColor:[255,255,255,255],blend:!0,blendFunc:[0,1],blendEquation:32778,colorMask:n,depthTest:!1},(()=>super.render({...e,target:this.fbo,pass:"mask"})))}shouldDrawLayer(e){return e.props.operation.includes("mask")}delete(){this.fbo.delete(),this.maskMap.delete()}}var m=n(5550),A=n(43809),v=n(39944),y=n(1384),b=n(69291);const _=(new v.Z).lookAt({eye:[0,0,1]});function w(e){let{width:t,height:n,near:r,far:i,padding:o}=e,a=-t/2,s=t/2,l=-n/2,c=n/2;if(o){const{left:e=0,right:r=0,top:i=0,bottom:d=0}=o,h=(0,u.uZ)((e+t-r)/2,0,t)-t/2,f=(0,u.uZ)((i+n-d)/2,0,n)-n/2;a-=h,s-=h,l+=f,c+=f}return(new v.Z).ortho({left:a,right:s,bottom:l,top:c,near:r,far:i})}class x extends A.Z{constructor(e){const{width:t,height:n,near:r=.1,far:i=1e3,zoom:o=0,target:a=[0,0,0],padding:s=null,flipY:l=!0}=e,c=Array.isArray(o)?o[0]:o,u=Array.isArray(o)?o[1]:o,d=Math.min(c,u),h=Math.pow(2,d);let f;if(c!==u){const e=Math.pow(2,c),t=Math.pow(2,u);f={unitsPerMeter:[e/h,t/h,1],metersPerUnit:[h/e,h/t,1]}}super({...e,longitude:void 0,position:a,viewMatrix:_.clone().scale([h,h*(l?-1:1),h]),projectionMatrix:w({width:t||1,height:n||1,padding:s,near:r,far:i}),zoom:d,distanceScales:f})}projectFlat(e){let[t,n]=e;const{unitsPerMeter:r}=this.distanceScales;return[t*r[0],n*r[1]]}unprojectFlat(e){let[t,n]=e;const{metersPerUnit:r}=this.distanceScales;return[t*r[0],n*r[1]]}panByPosition(e,t){const n=(0,y.CT)(t,this.pixelUnprojectionMatrix),r=this.projectFlat(e),i=b.IH([],r,b.tk([],n)),o=b.IH([],this.center,i);return{target:this.unprojectFlat(o)}}}function E(e,t,n){if(!e)return[0,0,1,1];const r=function(e,t){let n;if(t&&2===t.length){const[r,i]=t,o=e.getBounds({z:r}),a=e.getBounds({z:i});n=[Math.min(o[0],a[0]),Math.min(o[1],a[1]),Math.max(o[2],a[2]),Math.max(o[3],a[3])]}else n=e.getBounds();const r=e.projectPosition(n.slice(0,2)),i=e.projectPosition(n.slice(2,4));return[r[0],r[1],i[0],i[1]]}(t,n),i=function(e){const t=e[2]-e[0],n=e[3]-e[1],r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return[r-t,i-n,r+t,i+n]}(r);return e[2]-e[0]<=i[2]-i[0]&&e[3]-e[1]<=i[3]-i[1]?e:[Math.max(e[0],i[0]),Math.max(e[1],i[1]),Math.min(e[2],i[2]),Math.min(e[3],i[3])]}class S{constructor(){(0,r.Z)(this,"id","mask-effect"),(0,r.Z)(this,"props",null),(0,r.Z)(this,"useInPicking",!0),(0,r.Z)(this,"order",0),(0,r.Z)(this,"dummyMaskMap",void 0),(0,r.Z)(this,"channels",[]),(0,r.Z)(this,"masks",null),(0,r.Z)(this,"maskPass",void 0),(0,r.Z)(this,"maskMap",void 0),(0,r.Z)(this,"lastViewport",void 0)}preRender(e,t){let{layers:n,layerFilter:r,viewports:i,onViewportActive:o,views:s,isPicking:l}=t,c=!1;if(this.dummyMaskMap||(this.dummyMaskMap=new a.Z(e,{width:1,height:1})),l)return{didRender:c};const u=n.filter((e=>e.props.visible&&e.props.operation.includes("mask")));if(0===u.length)return this.masks=null,this.channels.length=0,{didRender:c};this.masks={},this.maskPass||(this.maskPass=new g(e,{id:"default-mask"}),this.maskMap=this.maskPass.maskMap);const d=this._sortMaskChannels(u),h=i[0],f=!this.lastViewport||!this.lastViewport.equals(h);if(void 0!==h.resolution)return p.Z.warn("MaskExtension is not supported in GlobeView")(),{didRender:c};for(const a in d){const e=this._renderChannel(d[a],{layerFilter:r,onViewportActive:o,views:s,viewport:h,viewportChanged:f});c||(c=e)}return{didRender:c}}_renderChannel(e,t){let{layerFilter:n,onViewportActive:r,views:i,viewport:o,viewportChanged:a}=t,s=!1;const l=this.channels[e.index];if(!l)return s;const c=e===l||e.layers.length!==l.layers.length||e.layers.some(((e,t)=>e!==l.layers[t]||e.props.transitions))||e.layerBounds.some(((e,t)=>e!==l.layerBounds[t]));if(e.bounds=l.bounds,e.maskBounds=l.maskBounds,this.channels[e.index]=e,c||a){this.lastViewport=o;const t=function(e,t){const n=[1/0,1/0,-1/0,-1/0];for(const r of e){const e=r.getBounds();if(e){const i=r.projectPosition(e[0],{viewport:t,autoOffset:!1}),o=r.projectPosition(e[1],{viewport:t,autoOffset:!1});n[0]=Math.min(n[0],i[0]),n[1]=Math.min(n[1],i[1]),n[2]=Math.max(n[2],o[0]),n[3]=Math.max(n[3],o[1])}}return Number.isFinite(n[0])?n:null}(e.layers,o);if(e.bounds=t&&E(t,o),c||!(0,u.fS)(e.bounds,l.bounds)){const{maskPass:a,maskMap:l}=this,c=t&&function(e){const{bounds:t,viewport:n,border:r=0}=e,{isGeospatial:i}=n;if(t[2]<=t[0]||t[3]<=t[1])return null;const o=n.unprojectPosition([(t[0]+t[2])/2,(t[1]+t[3])/2,0]);let{width:a,height:s,zoom:l}=e;if(void 0===l){a-=2*r,s-=2*r;const e=Math.min(a/(t[2]-t[0]),s/(t[3]-t[1]));l=Math.min(Math.log2(e),20)}else if(!a||!s){const e=2**l;a=Math.round(Math.abs(t[2]-t[0])*e),s=Math.round(Math.abs(t[3]-t[1])*e);const n=2048-2*r;if(a>n||s>n){const e=n/Math.max(a,s);a=Math.round(a*e),s=Math.round(s*e),l+=Math.log2(e)}}return i?new m.Z({x:r,y:r,width:a,height:s,longitude:o[0],latitude:o[1],zoom:l,orthographic:!0}):new x({x:r,y:r,width:a,height:s,target:o,zoom:l,flipY:!1})}({bounds:e.bounds,viewport:o,width:l.width,height:l.height,border:1});e.maskBounds=c?c.getBounds():[0,0,1,1],a.render({pass:"mask",channel:e.index,layers:e.layers,layerFilter:n,viewports:c?[c]:[],onViewportActive:r,views:i,moduleParameters:{devicePixelRatio:1}}),s=!0}}return this.masks[e.id]={index:e.index,bounds:e.maskBounds,coordinateOrigin:e.coordinateOrigin,coordinateSystem:e.coordinateSystem},s}_sortMaskChannels(e){const t={};let n=0;for(const r of e){const{id:e}=r.root;let i=t[e];if(!i){if(++n>4){p.Z.warn("Too many mask layers. The max supported is 4")();continue}i={id:e,index:this.channels.findIndex((t=>(null===t||void 0===t?void 0:t.id)===e)),layers:[],layerBounds:[],coordinateOrigin:r.root.props.coordinateOrigin,coordinateSystem:r.root.props.coordinateSystem},t[e]=i}i.layers.push(r),i.layerBounds.push(r.getBounds())}for(let r=0;r<4;r++){const e=this.channels[r];e&&e.id in t||(this.channels[r]=null)}for(const r in t){const e=t[r];e.index<0&&(e.index=this.channels.findIndex((e=>!e)),this.channels[e.index]=e)}return t}getModuleParameters(){return{maskMap:this.masks?this.maskMap:this.dummyMaskMap,maskChannels:this.masks}}cleanup(){this.dummyMaskMap&&(this.dummyMaskMap.delete(),this.dummyMaskMap=void 0),this.maskPass&&(this.maskPass.delete(),this.maskPass=void 0,this.maskMap=void 0),this.lastViewport=void 0,this.masks=null,this.channels.length=0}}class C{constructor(){(0,r.Z)(this,"id","collision-filter-effect"),(0,r.Z)(this,"props",null),(0,r.Z)(this,"useInPicking",!0),(0,r.Z)(this,"order",1),(0,r.Z)(this,"channels",{}),(0,r.Z)(this,"collisionFilterPass",void 0),(0,r.Z)(this,"collisionFBOs",{}),(0,r.Z)(this,"dummyCollisionMap",void 0),(0,r.Z)(this,"lastViewport",void 0)}preRender(e,t){let{effects:n,layers:r,layerFilter:i,viewports:o,onViewportActive:s,views:l,isPicking:c,preRenderStats:u={}}=t;var d;if(this.dummyCollisionMap||(this.dummyCollisionMap=new a.Z(e,{width:1,height:1})),c)return;const h=r.filter((e=>{let{props:{visible:t,collisionEnabled:n}}=e;return t&&n}));if(0===h.length)return void(this.channels={});this.collisionFilterPass||(this.collisionFilterPass=new f(e,{id:"default-collision-filter"}));const p=null===n||void 0===n?void 0:n.filter((e=>e.constructor===S)),g=null===(d=u["mask-effect"])||void 0===d?void 0:d.didRender,m=this._groupByCollisionGroup(e,h),A=o[0],v=!this.lastViewport||!this.lastViewport.equals(A)||g;for(const a in m){const t=this.collisionFBOs[a],n=m[a];t.resize({width:e.canvas.width/2,height:e.canvas.height/2}),this._render(n,{effects:p,layerFilter:i,onViewportActive:s,views:l,viewport:A,viewportChanged:v})}}_render(e,t){let{effects:n,layerFilter:r,onViewportActive:i,views:o,viewport:a,viewportChanged:l}=t;const{collisionGroup:c}=e,h=this.channels[c];if(!h)return;const f=l||e===h||!(0,d.v)(h.layers,e.layers,1)||e.layerBounds.some(((e,t)=>!(0,u.fS)(e,h.layerBounds[t])))||e.allLayersLoaded!==h.allLayersLoaded||e.layers.some((e=>e.props.transitions));if(this.channels[c]=e,f){this.lastViewport=a;const t=this.collisionFBOs[c];this.collisionFilterPass.renderCollisionMap(t,{pass:"collision-filter",isPicking:!0,layers:e.layers,effects:n,layerFilter:r,viewports:a?[a]:[],onViewportActive:i,views:o,moduleParameters:{dummyCollisionMap:this.dummyCollisionMap,devicePixelRatio:(0,s.w)(t.gl)/2}})}}_groupByCollisionGroup(e,t){const n={};for(const r of t){const{collisionGroup:e}=r.props;let t=n[e];t||(t={collisionGroup:e,layers:[],layerBounds:[],allLayersLoaded:!0},n[e]=t),t.layers.push(r),t.layerBounds.push(r.getBounds()),r.isLoaded||(t.allLayersLoaded=!1)}for(const r of Object.keys(n))this.collisionFBOs[r]||this.createFBO(e,r),this.channels[r]||(this.channels[r]=n[r]);for(const r of Object.keys(this.collisionFBOs))n[r]||this.destroyFBO(r);return n}getModuleParameters(e){const{collisionGroup:t}=e.props,{collisionFBOs:n,dummyCollisionMap:r}=this;return{collisionFBO:n[t],dummyCollisionMap:r}}cleanup(){this.dummyCollisionMap&&(this.dummyCollisionMap.delete(),this.dummyCollisionMap=void 0),this.channels={};for(const e of Object.keys(this.collisionFBOs))this.destroyFBO(e);this.collisionFBOs={},this.lastViewport=void 0}createFBO(e,t){const{width:n,height:r}=e.canvas,i=new a.Z(e,{width:n,height:r,parameters:{10241:9728,10240:9728,10242:33071,10243:33071}}),o=new l.Z(e,{format:33189,width:n,height:r});this.collisionFBOs[t]=new c.Z(e,{id:"Collision-".concat(t),width:n,height:r,attachments:{36064:i,36096:o}})}destroyFBO(e){const t=this.collisionFBOs[e];for(const n of Object.values(t.attachments))n.delete();t.delete(),delete this.collisionFBOs[e]}}class P extends i.Z{getShaders(){return{modules:[o]}}draw(e){let{uniforms:t,context:n,moduleParameters:r}=e;const{collisionEnabled:i}=this.props,{collisionFBO:o,drawToCollisionMap:a}=r,s=i&&Boolean(o);t.collision_enabled=s,a&&(this.props=this.clone(this.props.collisionTestProps).props)}initializeState(e,t){var n;if(null===this.getAttributeManager())return;null===(n=this.context.deck)||void 0===n||n._addDefaultEffect(new C);this.getAttributeManager().add({collisionPriorities:{size:1,accessor:"getCollisionPriority",shaderAttributes:{collisionPriorities:{divisor:0},instanceCollisionPriorities:{divisor:1}}}})}getNeedsPickingBuffer(){return this.props.collisionEnabled}}(0,r.Z)(P,"defaultProps",{getCollisionPriority:{type:"accessor",value:0},collisionEnabled:!0,collisionGroup:{type:"string",value:"default"},collisionTestProps:{}}),(0,r.Z)(P,"extensionName","CollisionFilterExtension")},24099:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(68185),i=n(44602);const o="\nuniform DATAFILTER_TYPE filter_min;\nuniform DATAFILTER_TYPE filter_softMin;\nuniform DATAFILTER_TYPE filter_softMax;\nuniform DATAFILTER_TYPE filter_max;\nuniform bool filter_useSoftMargin;\nuniform bool filter_enabled;\nuniform bool filter_transformSize;\n\n#ifdef NON_INSTANCED_MODEL\n #define DATAFILTER_ATTRIB filterValues\n #define DATAFILTER_ATTRIB_64LOW filterValues64Low\n#else\n #define DATAFILTER_ATTRIB instanceFilterValues\n #define DATAFILTER_ATTRIB_64LOW instanceFilterValues64Low\n#endif\n\nattribute DATAFILTER_TYPE DATAFILTER_ATTRIB;\n#ifdef DATAFILTER_DOUBLE\n attribute DATAFILTER_TYPE DATAFILTER_ATTRIB_64LOW;\n\n uniform DATAFILTER_TYPE filter_min64High;\n uniform DATAFILTER_TYPE filter_max64High;\n#endif\n\nvarying float dataFilter_value;\n\nfloat dataFilter_reduceValue(float value) {\n return value;\n}\nfloat dataFilter_reduceValue(vec2 value) {\n return min(value.x, value.y);\n}\nfloat dataFilter_reduceValue(vec3 value) {\n return min(min(value.x, value.y), value.z);\n}\nfloat dataFilter_reduceValue(vec4 value) {\n return min(min(value.x, value.y), min(value.z, value.w));\n}\nvoid dataFilter_setValue(DATAFILTER_TYPE valueFromMin, DATAFILTER_TYPE valueFromMax) {\n if (filter_enabled) {\n if (filter_useSoftMargin) {\n dataFilter_value = dataFilter_reduceValue(\n smoothstep(filter_min, filter_softMin, valueFromMin) *\n (1.0 - smoothstep(filter_softMax, filter_max, valueFromMax))\n );\n } else {\n dataFilter_value = dataFilter_reduceValue(\n step(filter_min, valueFromMin) * step(valueFromMax, filter_max)\n );\n }\n } else {\n dataFilter_value = 1.0;\n }\n}\n",a="\nuniform bool filter_transformColor;\nvarying float dataFilter_value;\n";function s(e){if(!e||!("extensions"in e))return{};const{filterRange:t=[-1,1],filterEnabled:n=!0,filterTransformSize:r=!0,filterTransformColor:i=!0}=e,o=e.filterSoftRange||t;return{...Number.isFinite(t[0])?{filter_min:t[0],filter_softMin:o[0],filter_softMax:o[1],filter_max:t[1]}:{filter_min:t.map((e=>e[0])),filter_softMin:o.map((e=>e[0])),filter_softMax:o.map((e=>e[1])),filter_max:t.map((e=>e[1]))},filter_enabled:n,filter_useSoftMargin:Boolean(e.filterSoftRange),filter_transformSize:n&&r,filter_transformColor:n&&i}}const l={"vs:#main-start":"\n #ifdef DATAFILTER_DOUBLE\n dataFilter_setValue(\n DATAFILTER_ATTRIB - filter_min64High + DATAFILTER_ATTRIB_64LOW,\n DATAFILTER_ATTRIB - filter_max64High + DATAFILTER_ATTRIB_64LOW\n );\n #else\n dataFilter_setValue(DATAFILTER_ATTRIB, DATAFILTER_ATTRIB);\n #endif\n ","vs:#main-end":"\n if (dataFilter_value == 0.0) {\n gl_Position = vec4(0.);\n }\n ","vs:DECKGL_FILTER_SIZE":"\n if (filter_transformSize) {\n size = size * dataFilter_value;\n }\n ","fs:DECKGL_FILTER_COLOR":"\n if (dataFilter_value == 0.0) discard;\n if (filter_transformColor) {\n color.a *= dataFilter_value;\n }\n "},c={name:"data-filter",vs:o,fs:a,inject:l,getUniforms:s},u={name:"data-filter-fp64",vs:o,fs:a,inject:l,getUniforms:function(e){if(!e||!("extensions"in e))return{};const t=s(e);if(Number.isFinite(t.filter_min)){const e=Math.fround(t.filter_min);t.filter_min-=e,t.filter_softMin-=e,t.filter_min64High=e;const n=Math.fround(t.filter_max);t.filter_max-=n,t.filter_softMax-=n,t.filter_max64High=n}else{const e=t.filter_min.map(Math.fround);t.filter_min=t.filter_min.map(((t,n)=>t-e[n])),t.filter_softMin=t.filter_softMin.map(((t,n)=>t-e[n])),t.filter_min64High=e;const n=t.filter_max.map(Math.fround);t.filter_max=t.filter_max.map(((e,t)=>e-n[t])),t.filter_softMax=t.filter_softMax.map(((e,t)=>e-n[t])),t.filter_max64High=n}return t}};var d=n(64282),h=n(81786),f=n(76195),p=n(44548);const g={blend:!0,blendFunc:[1,1,1,1],blendEquation:[32774,32774],depthTest:!1};var m=n(36708),A=n(77378);const v={1:"float",2:"vec2",3:"vec3",4:"vec4"};class y extends i.Z{constructor(){let{filterSize:e=1,fp64:t=!1,countItems:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!v[e])throw new Error("filterSize out of range");super({filterSize:e,fp64:t,countItems:n})}getShaders(e){const{filterSize:t,fp64:n}=e.opts;return{modules:[n?u:c],defines:{DATAFILTER_TYPE:v[t],DATAFILTER_DOUBLE:Boolean(n)}}}initializeState(e,t){const n=this.getAttributeManager();n&&n.add({filterValues:{size:t.opts.filterSize,type:t.opts.fp64?5130:5126,accessor:"getFilterValue",shaderAttributes:{filterValues:{divisor:0},instanceFilterValues:{divisor:1}}}});const{gl:r}=this.context;if(n&&t.opts.countItems){const e=function(e){return Boolean(e.getExtension("EXT_float_blend")&&(e.getExtension("EXT_color_buffer_float")||e.getExtension("WEBGL_color_buffer_float")))}(r);n.add({filterIndices:{size:e?1:2,vertexOffset:1,type:5121,normalized:!0,accessor:(t,n)=>{let{index:r}=n;const i=t&&t.__source?t.__source.index:r;return e?(i+1)%255:[(i+1)%255,Math.floor(i/255)%255]},shaderAttributes:{filterPrevIndices:{vertexOffset:0},filterIndices:{vertexOffset:1}}}});const i=function(e,t){return t?new d.Z(e,{width:1,height:1,attachments:{36064:new h.Z(e,{format:(0,f.D0)(e)?34836:6408,type:5126,mipmaps:!1})}}):new d.Z(e,{width:256,height:64,depth:!1})}(r,e),o=function(e,t,n){return t.defines.NON_INSTANCED_MODEL=1,n&&(t.defines.FLOAT_TARGET=1),new p.Z(e,{id:"data-filter-aggregation-model",vertexCount:1,isInstanced:!1,drawMode:0,vs:"#define SHADER_NAME data-filter-vertex-shader\n\n#ifdef FLOAT_TARGET\n attribute float filterIndices;\n attribute float filterPrevIndices;\n#else\n attribute vec2 filterIndices;\n attribute vec2 filterPrevIndices;\n#endif\n\nvarying vec4 vColor;\nconst float component = 1.0 / 255.0;\n\nvoid main() {\n #ifdef FLOAT_TARGET\n dataFilter_value *= float(filterIndices != filterPrevIndices);\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n vColor = vec4(0.0, 0.0, 0.0, 1.0);\n #else\n // Float texture is not supported: pack result into 4 channels x 256 px x 64px\n dataFilter_value *= float(filterIndices.x != filterPrevIndices.x);\n float col = filterIndices.x;\n float row = filterIndices.y * 4.0;\n float channel = floor(row);\n row = fract(row);\n vColor = component * vec4(bvec4(channel == 0.0, channel == 1.0, channel == 2.0, channel == 3.0));\n gl_Position = vec4(col * 2.0 - 1.0, row * 2.0 - 1.0, 0.0, 1.0);\n #endif\n gl_PointSize = 1.0;\n}\n",fs:"#define SHADER_NAME data-filter-fragment-shader\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main() {\n if (dataFilter_value < 0.5) {\n discard;\n }\n gl_FragColor = vColor;\n}\n",...t})}(r,t.getShaders.call(this,t),e);this.setState({filterFBO:i,filterModel:o})}}updateState(e){let{props:t,oldProps:n}=e;if(this.state.filterModel){const e=this.getAttributeManager().attributes.filterValues.needsUpdate()||t.filterEnabled!==n.filterEnabled||t.filterRange!==n.filterRange||t.filterSoftRange!==n.filterSoftRange;e&&this.setState({filterNeedsUpdate:e})}}draw(e,t){const{filterFBO:n,filterModel:r,filterNeedsUpdate:i}=this.state,{onFilteredItemsChange:o}=this.props;if(i&&o&&r){const{attributes:{filterValues:t,filterIndices:i}}=this.getAttributeManager();r.setVertexCount(this.getNumInstances());const{gl:a}=this.context;(0,m.Z)(a,{framebuffer:n,color:[0,0,0,0]}),r.updateModuleSettings(e.moduleParameters).setAttributes({...t.getShaderAttributes(),...i&&i.getShaderAttributes()}).draw({framebuffer:n,parameters:{...g,viewport:[0,0,n.width,n.height]}});const s=(0,A.z6)(n);let l=0;for(let e=0;e{"use strict";n.d(t,{Z:()=>d});var r=n(68185),i=n(84444),o=n(39179),a=n(64359),s=n(32603),l=n(88264);const c={...l.Z.defaultProps};class u extends s.Z{indexToBounds(){return null}renderLayers(){const{elevationScale:e,extruded:t,wireframe:n,filled:r,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:s,lineWidthMaxPixels:c,lineJointRounded:u,lineMiterLimit:d,lineDashJustified:h,getElevation:f,getFillColor:p,getLineColor:g,getLineWidth:m}=this.props,{updateTriggers:A,material:v,transitions:y}=this.props;return new(this.getSubLayerClass("cell",l.Z))({filled:r,wireframe:n,extruded:t,elevationScale:e,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:s,lineWidthMaxPixels:c,lineJointRounded:u,lineMiterLimit:d,lineDashJustified:h,material:v,transitions:y,getElevation:f,getFillColor:p,getLineColor:g,getLineWidth:m},this.getSubLayerProps({id:"cell",updateTriggers:A&&{getElevation:A.getElevation,getFillColor:A.getFillColor,getLineColor:A.getLineColor,getLineWidth:A.getLineWidth}}),this.indexToBounds())}}(0,r.Z)(u,"layerName","GeoCellLayer"),(0,r.Z)(u,"defaultProps",c);class d extends u{initializeState(){a.ZP._checkH3Lib()}updateState(e){let{props:t,changeFlags:n}=e;if(n.dataChanged||n.updateTriggersChanged&&n.updateTriggersChanged.getHexagons){const{data:e,getHexagons:n}=t,r=[],{iterable:a,objectInfo:s}=(0,o.jB)(e);for(const t of a){s.index++;const e=n(t,s),o=(0,i.kU)(e,!0);for(const n of o)r.push(this.getSubLayerRow({polygon:n},t,s.index))}this.setState({polygons:r})}}indexToBounds(){const{getElevation:e,getFillColor:t,getLineColor:n,getLineWidth:r}=this.props;return{data:this.state.polygons,getPolygon:e=>e.polygon,getElevation:this.getSubLayerAccessor(e),getFillColor:this.getSubLayerAccessor(t),getLineColor:this.getSubLayerAccessor(n),getLineWidth:this.getSubLayerAccessor(r)}}}(0,r.Z)(d,"layerName","H3ClusterLayer"),(0,r.Z)(d,"defaultProps",{getHexagons:{type:"accessor",value:e=>e.hexagons}})},64359:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p});var r=n(68185),i=n(84444),o=n(30373),a=n(32603),s=n(39179),l=n(88264),c=n(13091);function u(e,t){t=void 0===t?e[0][0]:t;for(const n of e){const e=n[0]-t;e>180?n[0]-=360:e<-180&&(n[0]+=360)}}function d(e,t,n){const r=e(t,n),[o,a]=(0,i.VP)(r);return[a,o]}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=(0,i.Lg)(e,!0);return 1!==t?function(e,t,n){const[r,a]=(0,i.VP)(e),s=t.length;u(t,a);const l=t[0]===t[s-1]?s-1:s;for(let i=0;ie.hexagon},extruded:!0};class p extends a.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){p._checkH3Lib(),this.state={edgeLengthKM:0,resolution:-1}}shouldUpdateState(e){let{changeFlags:t}=e;return this._shouldUseHighPrecision()?t.propsOrDataChanged:t.somethingChanged}updateState(e){let{props:t,changeFlags:n}=e;if(!0!==t.highPrecision&&(n.dataChanged||n.updateTriggersChanged&&n.updateTriggersChanged.getHexagon)){const e=this._calculateH3DataProps();this.setState(e)}this._updateVertices(this.context.viewport)}_calculateH3DataProps(){let e=-1,t=!1,n=!1;const{iterable:r,objectInfo:o}=(0,s.jB)(this.props.data);for(const a of r){o.index++;const r=this.props.getHexagon(a,o),s=(0,i.AI)(r);if(e<0){if(e=s,!this.props.highPrecision)break}else if(e!==s){n=!0;break}if((0,i.v8)(r)){t=!0;break}}return{resolution:e,edgeLengthKM:e>=0?(0,i.U7)(e,"km"):0,hasMultipleRes:n,hasPentagon:t}}_shouldUseHighPrecision(){if("auto"===this.props.highPrecision){const{resolution:e,hasPentagon:t,hasMultipleRes:n}=this.state,{viewport:r}=this.context;return Boolean(null===r||void 0===r?void 0:r.resolution)||n||t||e>=0&&e<=5}return this.props.highPrecision}_updateVertices(e){if(this._shouldUseHighPrecision())return;const{resolution:t,edgeLengthKM:n,centerHex:r}=this.state;if(t<0)return;const o=this.props.centerHexagon||(0,i.Cx)(e.latitude,e.longitude,t);if(r===o)return;if(r){const e=(0,i.Ji)(r,o);if(e>=0&&e*n<10)return}const{unitsPerMeter:a}=e.distanceScales;let s=h(o);const[l,c]=(0,i.VP)(o),[u,d]=e.projectFlat([c,l]);s=s.map((t=>{const n=e.projectFlat(t);return[(n[0]-u)/a[0],(n[1]-d)/a[1]]})),this.setState({centerHex:o,vertices:s})}renderLayers(){return this._shouldUseHighPrecision()?this._renderPolygonLayer():this._renderColumnLayer()}_getForwardProps(){const{elevationScale:e,material:t,coverage:n,extruded:r,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:l,lineWidthMinPixels:c,lineWidthMaxPixels:u,getFillColor:d,getElevation:h,getLineColor:f,getLineWidth:p,transitions:g,updateTriggers:m}=this.props;return{elevationScale:e,extruded:r,coverage:n,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:l,lineWidthMinPixels:c,lineWidthMaxPixels:u,material:t,getElevation:h,getFillColor:d,getLineColor:f,getLineWidth:p,transitions:g,updateTriggers:{getFillColor:m.getFillColor,getElevation:m.getElevation,getLineColor:m.getLineColor,getLineWidth:m.getLineWidth}}}_renderPolygonLayer(){const{data:e,getHexagon:t,updateTriggers:n,coverage:r}=this.props,i=this.getSubLayerClass("hexagon-cell-hifi",l.Z),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(e,t){let n;return n=void 0===e||null===e?t:"object"===typeof e?{...e,coverage:t}:{getHexagon:e,coverage:t},n}(n.getHexagon,r),new i(o,this.getSubLayerProps({id:"hexagon-cell-hifi",updateTriggers:o.updateTriggers}),{data:e,_normalize:!1,_windingOrder:"CCW",positionFormat:"XY",getPolygon:(e,n)=>function(e){const t=new Float64Array(2*e.length);let n=0;for(const r of e)t[n++]=r[0],t[n++]=r[1];return t}(h(t(e,n),r))})}_renderColumnLayer(){const{data:e,getHexagon:t,updateTriggers:n}=this.props,r=this.getSubLayerClass("hexagon-cell",c.Z),i=this._getForwardProps();return i.updateTriggers.getPosition=n.getHexagon,new r(i,this.getSubLayerProps({id:"hexagon-cell",flatShading:!0,updateTriggers:i.updateTriggers}),{data:e,diskResolution:6,radius:1,vertices:this.state.vertices,getPosition:d.bind(null,t)})}}(0,r.Z)(p,"defaultProps",f),(0,r.Z)(p,"layerName","H3HexagonLayer"),(0,r.Z)(p,"_checkH3Lib",(()=>{}))},98173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>le});var r=n(68185),i=n(98029),o=n(65148),a=n(36741),s=n(44602);const l={clipBounds:[0,0,1,1],clipByInstance:void 0},c="\nuniform vec4 clip_bounds;\n\nbool clip_isInBounds(vec2 position) {\n return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];\n}\n",u={name:"clip-vs",vs:c},d={"vs:#decl":"\nvarying float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nvarying float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n if (clip_isVisible < 0.5) discard;\n"},h={name:"clip-fs",fs:c},f={"vs:#decl":"\nvarying vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nvarying vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n if (!clip_isInBounds(clip_commonPosition)) discard;\n"};class p extends s.Z{getShaders(){let e="instancePositions"in this.getAttributeManager().attributes;return void 0!==this.props.clipByInstance&&(e=Boolean(this.props.clipByInstance)),this.state.clipByInstance=e,e?{modules:[u],inject:d}:{modules:[h],inject:f}}draw(e){let{uniforms:t}=e;const{clipBounds:n}=this.props;if(this.state.clipByInstance)t.clip_bounds=n;else{const e=this.projectPosition([n[0],n[1],0]),r=this.projectPosition([n[2],n[3],0]);t.clip_bounds=[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[0],r[0]),Math.max(e[1],r[1])]}}}(0,r.Z)(p,"defaultProps",l),(0,r.Z)(p,"extensionName","ClipExtension");var g=n(39944),m=n(23140),A=n(30576),v=n.n(A);function y(e){let t=0;for(let n,r,i=0,o=e.length-1;i>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),1===n&&(s&&a.push(s),s=[]),s&&s.push([i,o]);else{if(7!==n)throw new Error("unknown command ".concat(n));s&&s.push(s[0].slice())}}return s&&a.push(s),a}bbox(){const e=this._pbf;e.pos=this._geometry;const t=e.readVarint()+e.pos;let n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,c=-1/0;for(;e.pos>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),is&&(s=i),oc&&(c=o);else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,l,s,c]}_toGeoJSON(e){let t,n,r=this.loadGeometry(),i=_.types[this.type];switch(this.type){case 1:const i=[];for(t=0;t=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];const t=this._pbf.readVarint()+this._pbf.pos;return new _(this._pbf,t,this.extent,this._keys,this._values)}}function x(e,t,n){t&&n&&(15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){let t=null;const n=e.readVarint()+e.pos;for(;e.pos>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}class E{constructor(e,t){(0,r.Z)(this,"layers",void 0),this.layers=e.readFields(S,{},t)}}function S(e,t,n){if(3===e&&n){const e=new w(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}var C=n(8766);function P(e){const t=e.indices.length,n="Polygon";if(t<=1)return{type:n,data:e.data,areas:[[(0,C.getPolygonSignedArea)(e.data)]],indices:[e.indices]};const r=[],i=[];let o,a=[],s=[],l=0;for(let c,u,d=0;d>3),O--,1===k||2===k)I+=e.readSVarint(),L+=e.readSVarint(),1===k&&t.push(D),n.push(I,L),D+=2;else{if(7!==k)throw new Error("unknown command ".concat(k));if(D>0){const e=t[t.length-1];n.push(n[e],n[e+1]),D+=2}}return{data:n,indices:t}}_toBinaryCoordinates(e){const t=this.loadGeometry();let n;e(t.data,this);switch(this.type){case 1:this._geometryInfo.pointFeaturesCount++,this._geometryInfo.pointPositionsCount+=t.indices.length,n={type:"Point",...t};break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=t.indices.length,this._geometryInfo.linePositionsCount+=t.data.length/2,n={type:"LineString",...t};break;case 3:n=P(t),this._geometryInfo.polygonFeaturesCount++,this._geometryInfo.polygonObjectsCount+=n.indices.length;for(const e of n.indices)this._geometryInfo.polygonRingsCount+=e.length;this._geometryInfo.polygonPositionsCount+=n.data.length/2;break;default:throw new Error("Invalid geometry type: ".concat(this.type))}const r={type:"Feature",geometry:n,properties:this.properties};return null!==this.id&&(r.id=this.id),r}toBinaryCoordinates(e){if("function"===typeof e)return this._toBinaryCoordinates(e);const{x:t,y:n,z:r}=e,i=this.extent*Math.pow(2,r),o=this.extent*t,a=this.extent*n;return this._toBinaryCoordinates((e=>function(e,t,n,r){for(let i=0,o=e.length;i=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];const n=this._pbf.readVarint()+this._pbf.pos;return new N(this._pbf,n,this.extent,this._keys,this._values,t)}}function j(e,t,n){t&&n&&(15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){let t=null;const n=e.readVarint()+e.pos;for(;e.pos>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}class B{constructor(e,t){(0,r.Z)(this,"layers",void 0),this.layers=e.readFields(z,{},t)}}function z(e,t,n){if(3===e&&n){const e=new F(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}function Z(e,t){var n,r;const i=function(e){var t;if(null===e||void 0===e||!e.mvt)throw new Error("mvt options required");const n="wgs84"===(null===(t=e.mvt)||void 0===t?void 0:t.coordinates),{tileIndex:r}=e.mvt,i=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)&&Number.isFinite(r.z);if(n&&!i)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property");return e.mvt}(t),o=(null===t||void 0===t||null===(n=t.gis)||void 0===n?void 0:n.format)||(null===t||void 0===t||null===(r=t.mvt)||void 0===r?void 0:r.shape);switch(o){case"columnar-table":return{shape:"columnar-table",data:U(e,i)};case"geojson-row-table":return{shape:"geojson-row-table",data:H(e,i)};case"geojson":return H(e,i);case"binary-geometry":case"binary":return U(e,i);default:throw new Error(o)}}function U(e,t){const[n,r]=function(e,t){const n=[],r={coordLength:2,pointPositionsCount:0,pointFeaturesCount:0,linePositionsCount:0,linePathsCount:0,lineFeaturesCount:0,polygonPositionsCount:0,polygonObjectsCount:0,polygonRingsCount:0,polygonFeaturesCount:0};if(e.byteLength<=0)return[n,r];const i=new B(new(v())(e)),o=t&&Array.isArray(t.layers)?t.layers:Object.keys(i.layers);return o.forEach((e=>{const o=i.layers[e];if(o)for(let i=0;i{const i=r.layers[e];if(i)for(let r=0;ree(e,t,n)))},Polygon:te,MultiPolygon:function(e,t,n){return e.map((e=>te(e,t,n)))}};function $(e,t,n){let[r,i]=e,[o,a]=t;const s=(0,K.t7)(o[0],a[0],r),l=(0,K.t7)(o[1],a[1],i);return n.unprojectFlat([s,l])}function J(e,t,n){return e.map((e=>$(e,t,n)))}function ee(e,t,n){return J(e,t,n)}function te(e,t,n){return e.map((e=>J(e,t,n)))}const ne=["points","lines","polygons"];function re(e,t,n,r){const i=e.featureIds.value;if(!i.length)return-1;let o=0,a=i[i.length-1]+1;if(r){const t=function(e,t){if(!e.__layers){const t={},{properties:n}=e;for(let e=0;ee===n&&i[t]>=o&&i[t]=0?e.globalFeatureIds.value[r]:-1}return t?s=ie(e.properties,(e=>e[t]===n),o,a):e.fields&&(s=ie(e.fields,(e=>e.id===n),o,a)),s>=0?function(e,t){if(!e.__ids){const t=[],n=e.featureIds.value,r=e.globalFeatureIds.value;for(let e=0;en&&(e.minZoom=t.minzoom),Number.isFinite(t.maxzoom)&&(!Number.isFinite(r)||t.maxzoom{const t=ce(e,i)===l,r=s||ue(e)===n;return t&&r})):a&&r?function(e,t,n,r){for(const i of ne){const o=e[i]&&re(e[i],t,n,r);if(o>=0)return o}return-1}(a,i,l,s?"":n):-1}_pickObjects(e){const{deck:t,viewport:n}=this.context,r=n.width,i=n.height,o=n.x,a=n.y,s=[this.id];return t.pickObjects({x:o,y:a,width:r,height:i,layerIds:s,maxObjects:e})}getRenderedFeatures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this._pickObjects(e),n=new Set,r=[];for(const i of t){const e=ce(i.object,this.props.uniqueIdProperty);void 0===e?r.push(i.object):n.has(e)||(n.add(e),r.push(i.object))}return r}_setWGS84PropertyForTiles(){const e="dataInWGS84";this.state.tileset.selectedTiles.forEach((t=>{t.hasOwnProperty(e)||Object.defineProperty(t,e,{get:()=>{if(!t.content)return null;if(this.state.binary&&Array.isArray(t.content)&&!t.content.length)return[];const{bbox:e}=t;if(void 0===t._contentWGS84&&(0,ae.ob)(e)){const n=this.state.binary?(0,X.F_)(t.content):t.content;t._contentWGS84=n.map((t=>he(t,e,this.context.viewport)))}return t._contentWGS84}})}))}}function ce(e,t){return e.properties&&t?e.properties[t]:"id"in e?e.id:void 0}function ue(e){var t;return(null===(t=e.properties)||void 0===t?void 0:t.layerName)||null}function de(e){return void 0!==e&&null!==e&&""!==e}function he(e,t,n){const r={...e,geometry:{type:e.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>{const r=function(e,t,n){const r=[n.projectFlat([t.west,t.north]),n.projectFlat([t.east,t.south])];return{...e,coordinates:Q[e.type](e.coordinates,r,n)}}(e.geometry,t,n);return r.coordinates}}),r}(0,r.Z)(le,"layerName","MVTLayer"),(0,r.Z)(le,"defaultProps",se)},17096:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(68185),i=n(32603),o=n(35395),a=n(36741),s=n(89069);const l={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"activeRequestCount",0),(0,r.Z)(this,"requestQueue",[]),(0,r.Z)(this,"requestMap",new Map),(0,r.Z)(this,"deferredUpdate",null),this.props={...l,...e},this.stats=new s.Z({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>0;if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(e))return this.requestMap.get(e);const n={handle:e,priority:0,getPriority:t},r=new Promise((e=>(n.resolve=e,n)));return this.requestQueue.push(n),this.requestMap.set(e,r),this._issueNewRequests(),r}_issueRequest(e){const{handle:t,resolve:n}=e;let r=!1;const i=()=>{r||(r=!0,this.requestMap.delete(t),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout((()=>this._issueNewRequestsAsync()),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==e){this._updateAllRequests();for(let t=0;te.priority-t.priority))}_updateRequest(e){return e.priority=e.getPriority(e.handle),!(e.priority<0)||(e.resolve(null),!1)}}var u=n(39944),d=n(30373);class h{constructor(e){(0,r.Z)(this,"index",void 0),(0,r.Z)(this,"isVisible",void 0),(0,r.Z)(this,"isSelected",void 0),(0,r.Z)(this,"parent",void 0),(0,r.Z)(this,"children",void 0),(0,r.Z)(this,"content",void 0),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"layers",void 0),(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"bbox",void 0),(0,r.Z)(this,"zoom",void 0),(0,r.Z)(this,"userData",void 0),(0,r.Z)(this,"_abortController",void 0),(0,r.Z)(this,"_loader",void 0),(0,r.Z)(this,"_loaderId",void 0),(0,r.Z)(this,"_isLoaded",void 0),(0,r.Z)(this,"_isCancelled",void 0),(0,r.Z)(this,"_needsReload",void 0),this.index=e,this.isVisible=!1,this.isSelected=!1,this.parent=null,this.children=[],this.content=null,this._loader=void 0,this._abortController=null,this._loaderId=0,this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1}get data(){return this.isLoading&&this._loader?this._loader.then((()=>this.data)):this.content}get isLoaded(){return this._isLoaded&&!this._needsReload}get isLoading(){return Boolean(this._loader)&&!this._isCancelled}get needsReload(){return this._needsReload||this._isCancelled}get byteLength(){const e=this.content?this.content.byteLength:0;return Number.isFinite(e)||console.error("byteLength not defined in tile data"),e}async _loadData(e){let{getData:t,requestScheduler:n,onLoad:r,onError:i}=e;const{index:o,id:a,bbox:s,userData:l,zoom:c}=this,u=this._loaderId;this._abortController=new AbortController;const{signal:d}=this._abortController,h=await n.scheduleRequest(this,(e=>e.isSelected?1:-1));if(!h)return void(this._isCancelled=!0);if(this._isCancelled)return void h.done();let f,p=null;try{p=await t({index:o,id:a,bbox:s,userData:l,zoom:c,signal:d})}catch(g){f=g||!0}finally{h.done()}u===this._loaderId&&(this._loader=void 0,this.content=p,!this._isCancelled||p?(this._isLoaded=!0,this._isCancelled=!1,f?i(f,this):r(this)):this._isLoaded=!1)}loadData(e){return this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1,this._loaderId++,this._loader=this._loadData(e),this._loader}setNeedsReload(){this.isLoading&&(this.abort(),this._loader=void 0),this._needsReload=!0}abort(){var e;this.isLoaded||(this._isCancelled=!0,null===(e=this._abortController)||void 0===e||e.abort())}}var f=n(25625);function p(e,t){if(e===t)return!0;if(Array.isArray(e)){const n=e.length;if(!t||t.length!==n)return!1;for(let r=0;re.zoom-t.zoom));for(const n of t)if(n.isVisible=Boolean(n.state&g),n.children&&(n.isVisible||1&n.state))for(const e of n.children)e.state=1;else n.isSelected&&b(n)},never:()=>{}},v={extent:null,tileSize:512,maxZoom:null,minZoom:null,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,maxRequests:6,zoomOffset:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{}};function y(e){let t=e;for(;t;){if(t.isLoaded||t.content)return t.state|=g,!0;t=t.parent}return!1}function b(e){for(const t of e.children)t.isLoaded||t.content?t.state|=g:b(t)}const _={TilesetClass:class{constructor(e){(0,r.Z)(this,"opts",void 0),(0,r.Z)(this,"_requestScheduler",void 0),(0,r.Z)(this,"_cache",void 0),(0,r.Z)(this,"_dirty",void 0),(0,r.Z)(this,"_tiles",void 0),(0,r.Z)(this,"_cacheByteSize",void 0),(0,r.Z)(this,"_viewport",void 0),(0,r.Z)(this,"_zRange",void 0),(0,r.Z)(this,"_selectedTiles",void 0),(0,r.Z)(this,"_frameNumber",void 0),(0,r.Z)(this,"_modelMatrix",void 0),(0,r.Z)(this,"_modelMatrixInverse",void 0),(0,r.Z)(this,"_maxZoom",void 0),(0,r.Z)(this,"_minZoom",void 0),(0,r.Z)(this,"onTileLoad",void 0),(0,r.Z)(this,"_getCullBounds",function(e){let t,n={};return r=>{for(const i in r)if(!p(r[i],n[i])){t=e(r),n=r;break}return t}}(f.XT)),this.opts={...v,...e},this.onTileLoad=e=>{var t,n;null===(t=(n=this.opts).onTileLoad)||void 0===t||t.call(n,e),this.opts.maxCacheByteSize&&(this._cacheByteSize+=e.byteLength,this._resizeCache())},this._requestScheduler=new c({maxRequests:e.maxRequests,throttleRequests:Boolean(e.maxRequests&&e.maxRequests>0)}),this._cache=new Map,this._tiles=[],this._dirty=!1,this._cacheByteSize=0,this._viewport=null,this._selectedTiles=null,this._frameNumber=0,this._modelMatrix=new u.Z,this._modelMatrixInverse=new u.Z,this.setOptions(e)}get tiles(){return this._tiles}get selectedTiles(){return this._selectedTiles}get isLoaded(){return null!==this._selectedTiles&&this._selectedTiles.every((e=>e.isLoaded))}get needsReload(){return null!==this._selectedTiles&&this._selectedTiles.some((e=>e.needsReload))}setOptions(e){Object.assign(this.opts,e),Number.isFinite(e.maxZoom)&&(this._maxZoom=Math.floor(e.maxZoom)),Number.isFinite(e.minZoom)&&(this._minZoom=Math.ceil(e.minZoom))}finalize(){for(const e of this._cache.values())e.isLoading&&e.abort();this._cache.clear(),this._tiles=[],this._selectedTiles=null}reloadAll(){for(const e of this._cache.keys()){const t=this._cache.get(e);this._selectedTiles&&this._selectedTiles.includes(t)?t.setNeedsReload():this._cache.delete(e)}}update(e){let{zRange:t,modelMatrix:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new u.Z(n),i=!r.equals(this._modelMatrix);if(this._viewport&&e.equals(this._viewport)&&(0,d.fS)(this._zRange,t)&&!i)this.needsReload&&(this._selectedTiles=this._selectedTiles.map((e=>this._getTile(e.index,!0))));else{i&&(this._modelMatrixInverse=r.clone().invert(),this._modelMatrix=r),this._viewport=e,this._zRange=t;const n=this.getTileIndices({viewport:e,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:t,modelMatrix:this._modelMatrix,modelMatrixInverse:this._modelMatrixInverse});this._selectedTiles=n.map((e=>this._getTile(e,!0))),this._dirty&&this._rebuildTree()}const o=this.updateTileStates();return this._pruneRequests(),this._dirty&&this._resizeCache(),o&&this._frameNumber++,this._frameNumber}isTileVisible(e,t){if(!e.isVisible)return!1;if(t&&this._viewport){const n=this._getCullBounds({viewport:this._viewport,z:this._zRange,cullRect:t}),{bbox:r}=e;for(const[e,t,i,o]of n){let n;if("west"in r)n=r.weste&&r.southt;else{const a=Math.min(r.top,r.bottom),s=Math.max(r.top,r.bottom);n=r.lefte&&at}if(n)return!0}return!1}return!0}getTileIndices(e){let{viewport:t,maxZoom:n,minZoom:r,zRange:i,modelMatrix:o,modelMatrixInverse:a}=e;const{tileSize:s,extent:l,zoomOffset:c}=this.opts;return(0,f.rJ)({viewport:t,maxZoom:n,minZoom:r,zRange:i,tileSize:s,extent:l,modelMatrix:o,modelMatrixInverse:a,zoomOffset:c})}getTileId(e){return"".concat(e.x,"-").concat(e.y,"-").concat(e.z)}getTileZoom(e){return e.z}getTileMetadata(e){const{tileSize:t}=this.opts;return{bbox:(0,f.z_)(this._viewport,e.x,e.y,e.z,t)}}getParentIndex(e){return{x:Math.floor(e.x/2),y:Math.floor(e.y/2),z:e.z-1}}updateTileStates(){const e=this.opts.refinementStrategy||m,t=new Array(this._cache.size);let n=0;for(const r of this._cache.values())t[n++]=r.isVisible,r.isSelected=!1,r.isVisible=!1;for(const r of this._selectedTiles)r.isSelected=!0,r.isVisible=!0;("function"===typeof e?e:A[e])(Array.from(this._cache.values())),n=0;for(const r of this._cache.values())if(t[n++]!==r.isVisible)return!0;return!1}_pruneRequests(){const{maxRequests:e=0}=this.opts,t=[];let n=0;for(const r of this._cache.values())r.isLoading&&(n++,r.isSelected||r.isVisible||t.push(r));for(;e>0&&n>e&&t.length>0;){t.shift().abort(),n--}}_rebuildTree(){const{_cache:e}=this;for(const t of e.values())t.parent=null,t.children&&(t.children.length=0);for(const t of e.values()){const e=this._getNearestAncestor(t);t.parent=e,null!==e&&void 0!==e&&e.children&&e.children.push(t)}}_resizeCache(){const{_cache:e,opts:t}=this,n=t.maxCacheSize||(t.maxCacheByteSize?1/0:5*this.selectedTiles.length),r=t.maxCacheByteSize||1/0;if(e.size>n||this._cacheByteSize>r){for(const[a,s]of e){var i,o;if(!s.isVisible&&!s.isSelected)this._cacheByteSize-=t.maxCacheByteSize?s.byteLength:0,e.delete(a),null===(i=(o=this.opts).onTileUnload)||void 0===i||i.call(o,s);if(e.size<=n&&this._cacheByteSize<=r)break}this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort(((e,t)=>e.zoom-t.zoom)),this._dirty=!1)}_getTile(e,t){const n=this.getTileId(e);let r=this._cache.get(n),i=!1;return!r&&t?(r=new h(e),Object.assign(r,this.getTileMetadata(r.index)),Object.assign(r,{id:n,zoom:this.getTileZoom(r.index)}),i=!0,this._cache.set(n,r),this._dirty=!0):r&&r.needsReload&&(i=!0),r&&i&&r.loadData({getData:this.opts.getTileData,requestScheduler:this._requestScheduler,onLoad:this.onTileLoad,onError:this.opts.onTileError}),r}_getNearestAncestor(e){const{_minZoom:t=0}=this;let n=e.index;for(;this.getTileZoom(n)>t;){n=this.getParentIndex(n);const e=this._getTile(n);if(e)return e}return null}},data:{type:"data",value:[]},dataComparator:f.zc.equal,renderSubLayers:{type:"function",value:e=>new a.Z(e)},getTileData:{type:"function",optional:!0,value:null},onViewportLoad:{type:"function",optional:!0,value:null},onTileLoad:{type:"function",value:e=>{}},onTileUnload:{type:"function",value:e=>{}},onTileError:{type:"function",value:e=>console.error(e)},extent:{type:"array",optional:!0,value:null,compare:!0},tileSize:512,maxZoom:null,minZoom:0,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:m,zRange:null,maxRequests:6,zoomOffset:0};class w extends i.Z{initializeState(){this.state={tileset:null,isLoaded:!1}}finalizeState(){var e,t;null===(e=this.state)||void 0===e||null===(t=e.tileset)||void 0===t||t.finalize()}get isLoaded(){var e,t;return null===(e=this.state)||void 0===e||null===(t=e.tileset)||void 0===t?void 0:t.selectedTiles.every((e=>e.isLoaded&&e.layers&&e.layers.every((e=>e.isLoaded))))}shouldUpdateState(e){let{changeFlags:t}=e;return t.somethingChanged}updateState(e){let{changeFlags:t}=e,{tileset:n}=this.state;const r=t.propsOrDataChanged||t.updateTriggersChanged,i=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getTileData);n?r&&(n.setOptions(this._getTilesetOptions()),i?n.reloadAll():this.state.tileset.tiles.forEach((e=>{e.layers=null}))):(n=new this.props.TilesetClass(this._getTilesetOptions()),this.setState({tileset:n})),this._updateTileset()}_getTilesetOptions(){const{tileSize:e,maxCacheSize:t,maxCacheByteSize:n,refinementStrategy:r,extent:i,maxZoom:o,minZoom:a,maxRequests:s,zoomOffset:l}=this.props;return{maxCacheSize:t,maxCacheByteSize:n,maxZoom:o,minZoom:a,tileSize:e,refinementStrategy:r,extent:i,maxRequests:s,zoomOffset:l,getTileData:this.getTileData.bind(this),onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this)}}_updateTileset(){const{tileset:e}=this.state,{zRange:t,modelMatrix:n}=this.props,r=e.update(this.context.viewport,{zRange:t,modelMatrix:n}),{isLoaded:i}=e,o=this.state.isLoaded!==i,a=this.state.frameNumber!==r;i&&(o||a)&&this._onViewportLoad(),a&&this.setState({frameNumber:r}),this.state.isLoaded=i}_onViewportLoad(){const{tileset:e}=this.state,{onViewportLoad:t}=this.props;t&&t(e.selectedTiles)}_onTileLoad(e){this.props.onTileLoad(e),e.layers=null,this.setNeedsUpdate()}_onTileError(e,t){this.props.onTileError(e),t.layers=null,this.setNeedsUpdate()}_onTileUnload(e){this.props.onTileUnload(e)}getTileData(e){const{data:t,getTileData:n,fetch:r}=this.props,{signal:i}=e;return e.url="string"===typeof t||Array.isArray(t)?(0,f.z0)(t,e):null,n?n(e):r&&e.url?r(e.url,{propName:"data",layer:this,signal:i}):null}renderSubLayers(e){return this.props.renderSubLayers(e)}getSubLayerPropsByTile(e){return null}getPickingInfo(e){let{info:t,sourceLayer:n}=e;const r=n.props.tile;return t.picked&&(t.tile=r),t.sourceTile=r,t}_updateAutoHighlight(e){const t=e.sourceTile;if(t&&t.layers)for(const n of t.layers)n.updateAutoHighlight(e)}renderLayers(){return this.state.tileset.tiles.map((e=>{const t=this.getSubLayerPropsByTile(e);if(e.isLoaded||e.content)if(e.layers)t&&e.layers[0]&&Object.keys(t).some((n=>e.layers[0].props[n]!==t[n]))&&(e.layers=e.layers.map((e=>e.clone(t))));else{const n=this.renderSubLayers({...this.props,id:"".concat(this.id,"-").concat(e.id),data:e.content,_offset:0,tile:e});e.layers=(0,o.x)(n,Boolean).map((n=>n.clone({tile:e,...t})))}else;return e.layers}))}filterSubLayer(e){let{layer:t,cullRect:n}=e;const{tile:r}=t.props;return this.state.tileset.isTileVisible(r,n)}}(0,r.Z)(w,"defaultProps",_),(0,r.Z)(w,"layerName","TileLayer")},25625:(e,t,n)=>{"use strict";n.d(t,{XT:()=>st,rJ:()=>pt,z0:()=>at,ob:()=>mt,Xj:()=>gt,hG:()=>ut,z_:()=>ht,zc:()=>it});var r=n(68185),i=n(39944),o=n(43809),a=n(98029),s=n(58034),l=n(81723);const c=Math.PI/180,u=180/Math.PI,d=6370972,h=256;function f(){const e=4018225162502676e-20,t=Math.PI/180*h;return{unitsPerMeter:[e,e,e],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[t,t,e],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/t,1/t,24886.609375]}}class p extends o.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{latitude:t=0,longitude:n=0,zoom:o=0,nearZMultiplier:a=.1,farZMultiplier:s=2,resolution:l=10}=e;let{height:u,altitude:d=1.5}=e;u=u||1,d=Math.max(.75,d);const h=(new i.Z).lookAt({eye:[0,-d,0],up:[0,0,1]}),p=Math.pow(2,o);h.rotateX(t*c),h.rotateZ(-n*c),h.scale(p/u);const g=Math.atan(.5/d),m=512*p/u;super({...e,height:u,viewMatrix:h,longitude:n,latitude:t,zoom:o,distanceScales:f(),fovyRadians:2*g,focalDistance:d,near:a,far:Math.min(2,1/m+1)*d*s}),(0,r.Z)(this,"longitude",void 0),(0,r.Z)(this,"latitude",void 0),(0,r.Z)(this,"resolution",void 0),this.latitude=t,this.longitude=n,this.resolution=l}get projectionMode(){return a.zG.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(){const e={targetZ:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).z||0},t=this.unproject([0,this.height/2],e),n=this.unproject([this.width/2,0],e),r=this.unproject([this.width,this.height/2],e),i=this.unproject([this.width/2,this.height],e);return r[0]this.longitude&&(t[0]-=360),[Math.min(t[0],r[0],n[0],i[0]),Math.min(t[1],r[1],n[1],i[1]),Math.max(t[0],r[0],n[0],i[0]),Math.max(t[1],r[1],n[1],i[1])]}unproject(e){let{topLeft:t=!0,targetZ:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[r,i,o]=e,a=t?i:this.height-i,{pixelUnprojectionMatrix:l}=this;let c;if(Number.isFinite(o))c=g(l,[r,a,o,1]);else{const e=g(l,[r,a,-1,1]),t=g(l,[r,a,1,1]),i=((n||0)/d+1)*h,o=s.x9(s.lu([],e,t)),u=s.x9(e),f=s.x9(t),p=4*((4*u*f-(o-u-f)**2)/16)/o,m=(Math.sqrt(u-p)-Math.sqrt(Math.max(0,i*i-p)))/Math.sqrt(o);c=s.t7([],e,t,m)}const[u,f,p]=this.unprojectPosition(c);return Number.isFinite(o)?[u,f,p]:Number.isFinite(n)?[u,f,n]:[u,f]}projectPosition(e){const[t,n,r=0]=e,i=t*c,o=n*c,a=Math.cos(o),s=(r/d+1)*h;return[Math.sin(i)*a*s,-Math.cos(i)*a*s,Math.sin(o)*s]}unprojectPosition(e){const[t,n,r]=e,i=s.Zh(e),o=Math.asin(r/i);return[Math.atan2(t,-n)*u,o*u,(i/h-1)*d]}projectFlat(e){return e}unprojectFlat(e){return e}panByPosition(e,t){const n=this.unproject(t);return{longitude:e[0]-n[0]+this.longitude,latitude:e[1]-n[1]+this.latitude}}}function g(e,t){const n=l.fF([],t,e);return l.bA(n,n,1/n[3]),n}var m=n(5550);const A=-1,v=0,y=1;var b=n(31549);const _=new b.Z,w=new b.Z;class x{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=arguments.length>2?arguments[2]:void 0;(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"halfDiagonal",void 0),(0,r.Z)(this,"minimum",void 0),(0,r.Z)(this,"maximum",void 0),n=n||_.copy(e).add(t).scale(.5),this.center=new b.Z(n),this.halfDiagonal=new b.Z(t).subtract(this.center),this.minimum=new b.Z(e),this.maximum=new b.Z(t)}clone(){return new x(this.minimum,this.maximum,this.center)}equals(e){return this===e||Boolean(e)&&this.minimum.equals(e.minimum)&&this.maximum.equals(e.maximum)}transform(e){return this.center.transformAsPoint(e),this.halfDiagonal.transform(e),this.minimum.transform(e),this.maximum.transform(e),this}intersectPlane(e){const{halfDiagonal:t}=this,n=w.from(e.normal),r=t.x*Math.abs(n.x)+t.y*Math.abs(n.y)+t.z*Math.abs(n.z),i=this.center.dot(n)+e.distance;return i-r>0?y:i+r<0?A:v}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=_.from(e).subtract(this.center),{halfDiagonal:n}=this;let r,i=0;return r=Math.abs(t.x)-n.x,r>0&&(i+=r*r),r=Math.abs(t.y)-n.y,r>0&&(i+=r*r),r=Math.abs(t.z)-n.z,r>0&&(i+=r*r),i}}var E=n(44649);const S=new b.Z,C=new b.Z;class P{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"radius",void 0),this.radius=-0,this.center=new b.Z,this.fromCenterRadius(e,t)}fromCenterRadius(e,t){return this.center.from(e),this.radius=t,this}fromCornerPoints(e,t){return t=S.from(t),this.center=(new b.Z).from(e).add(t).scale(.5),this.radius=this.center.distance(t),this}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.radius===e.radius}clone(){return new P(this.center,this.radius)}union(e){const t=this.center,n=this.radius,r=e.center,i=e.radius,o=S.copy(r).subtract(t),a=o.magnitude();if(n>=a+i)return this.clone();if(i>=a+n)return e.clone();const s=.5*(n+a+i);return C.copy(o).scale((-n+s)/a).add(t),this.center.copy(C),this.radius=s,this}expand(e){const t=S.from(e).subtract(this.center).magnitude();return t>this.radius&&(this.radius=t),this}transform(e){this.center.transform(e);const t=E.Q$(S,e);return this.radius=Math.max(t[0],Math.max(t[1],t[2]))*this.radius,this}distanceSquaredTo(e){const t=this.distanceTo(e);return t*t}distanceTo(e){const t=S.from(e).subtract(this.center);return Math.max(0,t.len()-this.radius)}intersectPlane(e){const t=this.center,n=this.radius,r=e.normal.dot(t)+e.distance;return r<-n?A:r1?t-1:0),r=1;r0?this.copy([e,...n]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(N)}fromObject(e){return this.check()}fromQuaternion(e){return function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,c=n*a,u=r*a,d=r*s,h=i*a,f=i*s,p=i*l,g=o*a,m=o*s,A=o*l;e[0]=1-d-p,e[3]=u-A,e[6]=h+m,e[1]=u+A,e[4]=1-c-p,e[7]=f-g,e[2]=h-m,e[5]=f+g,e[8]=1-c-d}(this,e),this.check()}set(e,t,n,r,i,o,a,s,l){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(e,t,n,r,i,o,a,s,l){return this[0]=e,this[1]=r,this[2]=a,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=o,this[8]=l,this.check()}determinant(){return function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*(c*o-a*l)+n*(-c*i+a*s)+r*(l*i-o*s)}(this)}transpose(){return function(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8]}(this,this),this.check()}invert(){return function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=u*a-s*c,h=-u*o+s*l,f=c*o-a*l,p=n*d+r*h+i*f;p&&(p=1/p,e[0]=d*p,e[1]=(-u*r+i*c)*p,e[2]=(s*r-i*a)*p,e[3]=h*p,e[4]=(u*n-i*l)*p,e[5]=(-s*n+i*o)*p,e[6]=f*p,e[7]=(-c*n+r*l)*p,e[8]=(a*n-r*o)*p)}(this,this),this.check()}multiplyLeft(e){return O(this,e,this),this.check()}multiplyRight(e){return O(this,this,e),this.check()}rotate(e){return function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=Math.sin(n),f=Math.cos(n);e[0]=f*r+h*a,e[1]=f*i+h*s,e[2]=f*o+h*l,e[3]=f*a-h*r,e[4]=f*s-h*i,e[5]=f*l-h*o,e[6]=c,e[7]=u,e[8]=d}(this,this,e),this.check()}scale(e){return Array.isArray(e)?I(this,this,e):I(this,this,[e,e]),this.check()}translate(e){return function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],h=n[0],f=n[1];e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=h*r+f*a+c,e[7]=h*i+f*s+u,e[8]=h*o+f*l+d}(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=D.kK(t||[-0,-0],e,this);break;case 3:n=s.kK(t||[-0,-0,-0],e,this);break;case 4:n=(0,k._x)(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return(0,M.IL)(n,e.length),n}transformVector(e,t){return this.transform(e,t)}transformVector2(e,t){return this.transform(e,t)}transformVector3(e,t){return this.transform(e,t)}}let j,B;var z=n(76624),Z=n(22070),U=n(30373);let H;class V extends Z.Z{static get ZERO(){return H||(H=new V(0,0,0,0),Object.freeze(H)),H}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;super(-0,-0,-0,-0),(0,U.kJ)(e)&&1===arguments.length?this.copy(e):(U.vc.debug&&((0,M.u5)(e),(0,M.u5)(t),(0,M.u5)(n),(0,M.u5)(r)),this[0]=e,this[1]=t,this[2]=n,this[3]=r)}set(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}fromObject(e){return U.vc.debug&&((0,M.u5)(e.x),(0,M.u5)(e.y),(0,M.u5)(e.z),(0,M.u5)(e.w)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}get ELEMENTS(){return 4}get z(){return this[2]}set z(e){this[2]=(0,M.u5)(e)}get w(){return this[3]}set w(e){this[3]=(0,M.u5)(e)}transform(e){return s.fF(this,this,e),this.check()}transformByMatrix3(e){return(0,k._x)(this,this,e),this.check()}transformByMatrix2(e){return(0,k.G7)(this,this,e),this.check()}transformByQuaternion(e){return s.VC(this,this,e),this.check()}applyMatrix4(e){return e.transform(this,this),this}}function G(){var e=new R.WT(4);return R.WT!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function W(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function q(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],l=n[1],c=n[2],u=n[3];return e[0]=r*u+a*s+i*c-o*l,e[1]=i*u+a*l+o*s-r*c,e[2]=o*u+a*c+r*l-i*s,e[3]=a*u-r*s-i*l-o*c,e}function Y(e,t,n,r){var i,o,a,s,l,c=t[0],u=t[1],d=t[2],h=t[3],f=n[0],p=n[1],g=n[2],m=n[3];return(o=c*f+u*p+d*g+h*m)<0&&(o=-o,f=-f,p=-p,g=-g,m=-m),1-o>R.Ib?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,l=Math.sin(r*i)/a):(s=1-r,l=r),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*d+l*g,e[3]=s*h+l*m,e}function X(e,t){var n,r=t[0]+t[4]+t[8];if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(t[3*i+i]-t[3*o+o]-t[3*a+a]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*o+a]-t[3*a+o])*n,e[o]=(t[3*o+i]+t[3*i+o])*n,e[a]=(t[3*a+i]+t[3*i+a])*n}return e}l.d9,l.al,l.JG,l.t8;var K=l.IH,Q=l.bA,$=l.AK,J=l.t7,ee=l.kE,te=l.we,ne=l.Fv,re=(l.I6,l.fS,function(){var e=s.Ue(),t=s.al(1,0,0),n=s.al(0,1,0);return function(r,i,o){var a=s.AK(i,o);return a<-.999999?(s.kC(e,t,i),s.Zh(e)<1e-6&&s.kC(e,n,i),s.Fv(e,e),W(r,e,Math.PI),r):a>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(s.kC(e,i,o),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1+a,ne(r,r))}}());(function(){var e=G(),t=G()})(),function(){var e=function(){var e=new R.WT(9);return R.WT!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}()}();const ie=[0,0,0,1];class oe extends z.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(-0,-0,-0,-0),Array.isArray(e)&&1===arguments.length?this.copy(e):this.set(e,t,n,r)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}set(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}fromObject(e){return this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this.check()}fromMatrix3(e){return X(this,e),this.check()}fromAxisRotation(e,t){return W(this,e,t),this.check()}identity(){var e;return(e=this)[0]=0,e[1]=0,e[2]=0,e[3]=1,this.check()}setAxisAngle(e,t){return this.fromAxisRotation(e,t)}get ELEMENTS(){return 4}get x(){return this[0]}set x(e){this[0]=(0,M.u5)(e)}get y(){return this[1]}set y(e){this[1]=(0,M.u5)(e)}get z(){return this[2]}set z(e){this[2]=(0,M.u5)(e)}get w(){return this[3]}set w(e){this[3]=(0,M.u5)(e)}len(){return ee(this)}lengthSquared(){return te(this)}dot(e){return $(this,e)}rotationTo(e,t){return re(this,e,t),this.check()}add(e){return K(this,this,e),this.check()}calculateW(){return function(e,t){var n=t[0],r=t[1],i=t[2];e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i))}(this,this),this.check()}conjugate(){var e,t;return t=this,(e=this)[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],this.check()}invert(){return function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=o*s}(this,this),this.check()}lerp(e,t,n){return void 0===n?this.lerp(this,e,t):(J(this,e,t,n),this.check())}multiplyRight(e){return q(this,this,e),this.check()}multiplyLeft(e){return q(this,e,this),this.check()}normalize(){const e=this.len(),t=e>0?1/e:0;return this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,0===e&&(this[3]=1),this.check()}rotateX(e){return function(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l+a*s,e[1]=i*l+o*s,e[2]=o*l-i*s,e[3]=a*l-r*s}(this,this,e),this.check()}rotateY(e){return function(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l-o*s,e[1]=i*l+a*s,e[2]=o*l+r*s,e[3]=a*l-i*s}(this,this,e),this.check()}rotateZ(e){return function(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l+i*s,e[1]=i*l-r*s,e[2]=o*l+a*s,e[3]=a*l-o*s}(this,this,e),this.check()}scale(e){return Q(this,this,e),this.check()}slerp(e,t,n){let r,i,o;switch(arguments.length){case 1:({start:r=ie,target:i,ratio:o}=e);break;case 2:r=this,i=e,o=t;break;default:r=e,i=t,o=n}return Y(this,r,i,o),this.check()}transformVector4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new V;return l.VC(t,e,this),(0,M.IL)(t,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(e,t){return this.setAxisAngle(e,t)}premultiply(e){return this.multiplyLeft(e)}multiply(e){return this.multiplyRight(e)}}const ae=new b.Z,se=new b.Z,le=new b.Z,ce=new b.Z,ue=new b.Z,de=new b.Z,he=new b.Z,fe=0,pe=1,ge=2,me=3,Ae=4,ve=5,ye=6,be=7,_e=8;class we{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0,0,0,0,0,0];(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"halfAxes",void 0),this.center=(new b.Z).from(e),this.halfAxes=new F(t)}get halfSize(){const e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2);return[new b.Z(e).len(),new b.Z(t).len(),new b.Z(n).len()]}get quaternion(){const e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2),r=new b.Z(e).normalize(),i=new b.Z(t).normalize(),o=new b.Z(n).normalize();return(new oe).fromMatrix3(new F([...r,...i,...o]))}fromCenterHalfSizeQuaternion(e,t,n){const r=new oe(n),i=(new F).fromQuaternion(r);return i[0]=i[0]*t[0],i[1]=i[1]*t[0],i[2]=i[2]*t[0],i[3]=i[3]*t[1],i[4]=i[4]*t[1],i[5]=i[5]*t[1],i[6]=i[6]*t[2],i[7]=i[7]*t[2],i[8]=i[8]*t[2],this.center=(new b.Z).from(e),this.halfAxes=i,this}clone(){return new we(this.center,this.halfAxes)}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.halfAxes.equals(e.halfAxes)}getBoundingSphere(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new P;const t=this.halfAxes,n=t.getColumn(0,le),r=t.getColumn(1,ce),i=t.getColumn(2,ue),o=ae.copy(n).add(r).add(i);return e.center.copy(this.center),e.radius=o.magnitude(),e}intersectPlane(e){const t=this.center,n=e.normal,r=this.halfAxes,i=n.x,o=n.y,a=n.z,s=Math.abs(i*r[fe]+o*r[pe]+a*r[ge])+Math.abs(i*r[me]+o*r[Ae]+a*r[ve])+Math.abs(i*r[ye]+o*r[be]+a*r[_e]),l=n.dot(t)+e.distance;return l<=-s?A:l>=s?y:v}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=se.from(e).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,le),i=n.getColumn(1,ce),o=n.getColumn(2,ue),a=r.magnitude(),s=i.magnitude(),l=o.magnitude();r.normalize(),i.normalize(),o.normalize();let c,u=0;return c=Math.abs(t.dot(r))-a,c>0&&(u+=c*c),c=Math.abs(t.dot(i))-s,c>0&&(u+=c*c),c=Math.abs(t.dot(o))-l,c>0&&(u+=c*c),u}computePlaneDistances(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-0,-0],r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,a=this.halfAxes,s=a.getColumn(0,le),l=a.getColumn(1,ce),c=a.getColumn(2,ue),u=de.copy(s).add(l).add(c).add(o),d=he.copy(u).subtract(e);let h=t.dot(d);return r=Math.min(h,r),i=Math.max(h,i),u.copy(o).add(s).add(l).subtract(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),u.copy(o).add(s).subtract(l).add(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),u.copy(o).add(s).subtract(l).subtract(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),o.copy(u).subtract(s).add(l).add(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),o.copy(u).subtract(s).add(l).subtract(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),o.copy(u).subtract(s).subtract(l).add(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),o.copy(u).subtract(s).subtract(l).subtract(c),d.copy(u).subtract(e),h=t.dot(d),r=Math.min(h,r),i=Math.max(h,i),n[0]=r,n[1]=i,n}transform(e){this.center.transformAsPoint(e);const t=this.halfAxes.getColumn(0,le);t.transformAsPoint(e);const n=this.halfAxes.getColumn(1,ce);n.transformAsPoint(e);const r=this.halfAxes.getColumn(2,ue);return r.transformAsPoint(e),this.halfAxes=new F([...t,...n,...r]),this}getTransform(){throw new Error("not implemented")}}var xe=n(83006);const Ee=new b.Z,Se=new b.Z;class Ce{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,1],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,r.Z)(this,"normal",void 0),(0,r.Z)(this,"distance",void 0),this.normal=new b.Z,this.distance=-0,this.fromNormalDistance(e,t)}fromNormalDistance(e,t){return(0,xe.Z)(Number.isFinite(t)),this.normal.from(e).normalize(),this.distance=t,this}fromPointNormal(e,t){e=Ee.from(e),this.normal.from(t).normalize();const n=-this.normal.dot(e);return this.distance=n,this}fromCoefficients(e,t,n,r){return this.normal.set(e,t,n),(0,xe.Z)((0,U.fS)(this.normal.len(),1)),this.distance=r,this}clone(){return new Ce(this.normal,this.distance)}equals(e){return(0,U.fS)(this.distance,e.distance)&&(0,U.fS)(this.normal,e.normal)}getPointDistance(e){return this.normal.dot(e)+this.distance}transform(e){const t=Se.copy(this.normal).transformAsVector(e).normalize(),n=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(n,t)}projectPointOntoPlane(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];e=Ee.from(e);const n=this.getPointDistance(e),r=Se.copy(this.normal).scale(n);return e.subtract(r).to(t)}}const Pe=[new b.Z([1,0,0]),new b.Z([0,1,0]),new b.Z([0,0,1])],Te=new b.Z,Me=new b.Z;new Ce(new b.Z(1,0,0),0);class ke{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,r.Z)(this,"planes",void 0),this.planes=e}fromBoundingSphere(e){this.planes.length=2*Pe.length;const t=e.center,n=e.radius;let r=0;for(const i of Pe){let e=this.planes[r],o=this.planes[r+1];e||(e=this.planes[r]=new Ce),o||(o=this.planes[r+1]=new Ce);const a=Te.copy(i).scale(-n).add(t);i.dot(a);e.fromPointNormal(a,i);const s=Te.copy(i).scale(n).add(t),l=Me.copy(i).negate();l.dot(s);o.fromPointNormal(s,l),r+=2}return this}computeVisibility(e){let t=y;for(const n of this.planes){switch(e.intersectPlane(n)){case A:return A;case v:t=v}}return t}computeVisibilityWithPlaneMask(e,t){if((0,xe.Z)(Number.isFinite(t),"parentPlaneMask is required."),t===ke.MASK_OUTSIDE||t===ke.MASK_INSIDE)return t;let n=ke.MASK_INSIDE;const r=this.planes;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};const n=Re.EPSILON20;let r=0,i=0;const o=Ie,a=Le;o.identity(),a.copy(e);const s=n*function(e){let t=0;for(let n=0;n<9;++n){const r=e[n];t+=r*r}return Math.sqrt(t)}(a);for(;i<10&&ze(a)>s;)Ze(a,De),Ne.copy(De).transpose(),a.multiplyRight(De),a.multiplyLeft(Ne),o.multiplyRight(De),++r>2&&(++i,r=0);return t.unitary=o.toTarget(t.unitary),t.diagonal=a.toTarget(t.diagonal),t}const je=[1,0,0],Be=[2,2,1];function ze(e){let t=0;for(let n=0;n<3;++n){const r=e[Oe.getElementIndex(Be[n],je[n])];t+=2*r*r}return Math.sqrt(t)}function Ze(e,t){const n=Re.EPSILON15;let r=0,i=1;for(let c=0;c<3;++c){const t=Math.abs(e[Oe.getElementIndex(Be[c],je[c])]);t>r&&(i=c,r=t)}const o=je[i],a=Be[i];let s=1,l=0;if(Math.abs(e[Oe.getElementIndex(a,o)])>n){const t=(e[Oe.getElementIndex(a,a)]-e[Oe.getElementIndex(o,o)])/2/e[Oe.getElementIndex(a,o)];let n;n=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),s=1/Math.sqrt(1+n*n),l=n*s}return F.IDENTITY.to(t),t[Oe.getElementIndex(o,o)]=t[Oe.getElementIndex(a,a)]=s,t[Oe.getElementIndex(a,o)]=l,t[Oe.getElementIndex(o,a)]=-l,t}const Ue=new b.Z,He=new b.Z,Ve=new b.Z,Ge=new b.Z,We=new b.Z,qe=new F,Ye={diagonal:new F,unitary:new F};var Xe=n(1384);const Ke=512,Qe=3,$e=[[.5,.5],[0,0],[0,1],[1,0],[1,1]],Je=$e.concat([[0,.5],[.5,0],[1,.5],[.5,1]]),et=Je.concat([[.25,.5],[.75,.5]]);class tt{constructor(e,t,n){(0,r.Z)(this,"x",void 0),(0,r.Z)(this,"y",void 0),(0,r.Z)(this,"z",void 0),(0,r.Z)(this,"childVisible",void 0),(0,r.Z)(this,"selected",void 0),(0,r.Z)(this,"_children",void 0),this.x=e,this.y=t,this.z=n}get children(){if(!this._children){const e=2*this.x,t=2*this.y,n=this.z+1;this._children=[new tt(e,t,n),new tt(e,t+1,n),new tt(e+1,t,n),new tt(e+1,t+1,n)]}return this._children}update(e){const{viewport:t,cullingVolume:n,elevationBounds:r,minZ:i,maxZ:o,bounds:a,offset:s,project:l}=e,c=this.getBoundingVolume(r,s,l);if(a&&!this.insideBounds(a))return!1;if(n.computeVisibility(c)<0)return!1;if(!this.childVisible){let{z:e}=this;if(e=i){const n=c.distanceTo(t.cameraPosition)*t.scale/t.height;e+=Math.floor(Math.log2(n))}if(e>=o)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;for(const u of this.children)u.update(e);return!0}getSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.selected&&e.push(this),this._children)for(const t of this._children)t.getSelected(e);return e}insideBounds(e){let[t,n,r,i]=e;const o=Math.pow(2,this.z),a=Ke/o;return this.x*at&&(this.y+1)*a>n}getBoundingVolume(e,t,n){if(n){const t=this.z<1?et:this.z<2?Je:$e,r=[];for(const i of t){const t=ut(this.x+i[0],this.y+i[1],this.z);t[2]=e[0],r.push(n(t)),e[0]!==e[1]&&(t[2]=e[1],r.push(n(t)))}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new we;if(!e||0===e.length)return t.halfAxes=new F([0,0,0,0,0,0,0,0,0]),t.center=new b.Z,t;const n=e.length,r=new b.Z(0,0,0);for(const b of e)r.add(b);const i=1/n;r.multiplyByScalar(i);let o=0,a=0,s=0,l=0,c=0,u=0;for(const b of e){const e=Ue.copy(b).subtract(r);o+=e.x*e.x,a+=e.x*e.y,s+=e.x*e.z,l+=e.y*e.y,c+=e.y*e.z,u+=e.z*e.z}o*=i,a*=i,s*=i,l*=i,c*=i,u*=i;const d=qe;d[0]=o,d[1]=a,d[2]=s,d[3]=a,d[4]=l,d[5]=c,d[6]=s,d[7]=c,d[8]=u;const{unitary:h}=Fe(d,Ye),f=t.halfAxes.copy(h);let p=f.getColumn(0,Ve),g=f.getColumn(1,Ge),m=f.getColumn(2,We),A=-Number.MAX_VALUE,v=-Number.MAX_VALUE,y=-Number.MAX_VALUE,_=Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE;for(const b of e)Ue.copy(b),A=Math.max(Ue.dot(p),A),v=Math.max(Ue.dot(g),v),y=Math.max(Ue.dot(m),y),_=Math.min(Ue.dot(p),_),w=Math.min(Ue.dot(g),w),x=Math.min(Ue.dot(m),x);p=p.multiplyByScalar(.5*(_+A)),g=g.multiplyByScalar(.5*(w+v)),m=m.multiplyByScalar(.5*(x+y)),t.center.copy(p).add(g).add(m);const E=He.set(A-_,v-w,y-x).multiplyByScalar(.5),S=new F([E[0],0,0,0,E[1],0,0,0,E[2]]);return t.halfAxes.multiplyRight(S),t}(r)}const r=Math.pow(2,this.z),i=Ke/r,o=this.x*i+t*Ke,a=Ke-(this.y+1)*i;return new x([o,a,e[0]],[o+i,a+i,e[1]])}}const nt=512,rt=[-1/0,-1/0,1/0,1/0],it={type:"object",value:null,validate:(e,t)=>t.optional&&null===e||"string"===typeof e||Array.isArray(e)&&e.every((e=>"string"===typeof e)),equal:(e,t)=>{if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;re[0]))),Math.min(...n.map((e=>e[1]))),Math.max(...n.map((e=>e[0]))),Math.max(...n.map((e=>e[1])))]}function at(e,t){if(!e||!e.length)return null;const{index:n,id:r}=t;if(Array.isArray(e)){e=e[(i=r,Math.abs(i.split("").reduce(((e,t)=>(e<<5)-e+t.charCodeAt(0)|0),0))%e.length)]}var i;let o=e;for(const a of Object.keys(n)){const e=new RegExp("{".concat(a,"}"),"g");o=o.replace(e,String(n[a]))}return Number.isInteger(n.y)&&Number.isInteger(n.z)&&(o=o.replace(/\{-y\}/g,String(Math.pow(2,n.z)-n.y-1))),o}function st(e){let{viewport:t,z:n=0,cullRect:r}=e;return(t.subViewports||[t]).map((e=>lt(e,n,r)))}function lt(e,t,n){if(!Array.isArray(t)){const r=n.x-e.x,i=n.y-e.y,{width:o,height:a}=n,s={targetZ:t},l=e.unproject([r,i],s),c=e.unproject([r+o,i],s),u=e.unproject([r,i+a],s),d=e.unproject([r+o,i+a],s);return[Math.min(l[0],c[0],u[0],d[0]),Math.min(l[1],c[1],u[1],d[1]),Math.max(l[0],c[0],u[0],d[0]),Math.max(l[1],c[1],u[1],d[1])]}const r=lt(e,t[0],n),i=lt(e,t[1],n);return[Math.min(r[0],i[0]),Math.min(r[1],i[1]),Math.max(r[2],i[2]),Math.max(r[3],i[3])]}function ct(e,t){return Math.pow(2,e)*nt/t}function ut(e,t,n){const r=ct(n,nt),i=e/r*360-180,o=Math.PI-2*Math.PI*t/r;return[i,180/Math.PI*Math.atan(.5*(Math.exp(o)-Math.exp(-o)))]}function dt(e,t,n,r){const i=ct(n,r);return[e/i*nt,t/i*nt]}function ht(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:nt;if(e.isGeospatial){const[e,i]=ut(t,n,r),[o,a]=ut(t+1,n+1,r);return{west:e,north:i,east:o,south:a}}const[o,a]=dt(t,n,r,i),[s,l]=dt(t+1,n+1,r,i);return{left:o,top:a,right:s,bottom:l}}function ft(e,t,n,r,i){const o=function(e,t,n){let r;if(t&&2===t.length){const[n,i]=t,o=e.getBounds({z:n}),a=e.getBounds({z:i});r=[Math.min(o[0],a[0]),Math.min(o[1],a[1]),Math.max(o[2],a[2]),Math.max(o[3],a[3])]}else r=e.getBounds();return e.isGeospatial?[Math.max(r[0],n[0]),Math.max(r[1],n[1]),Math.min(r[2],n[2]),Math.min(r[3],n[3])]:[Math.max(Math.min(r[0],n[2]),n[0]),Math.max(Math.min(r[1],n[3]),n[1]),Math.min(Math.max(r[2],n[0]),n[2]),Math.min(Math.max(r[3],n[1]),n[3])]}(e,null,r),a=ct(t,n),[s,l,c,u]=function(e,t,n){if(n)return ot(e,n).map((e=>e*t/nt));return e.map((e=>e*t/nt))}(o,a,i),d=[];for(let h=Math.floor(s);hn&&(u=n);let d=o;return s&&l&&o&&!t.isGeospatial&&(d=ot(o,s)),t.isGeospatial?function(e,t,n,r){const i=e instanceof p&&e.resolution?e.projectPosition:null,o=Object.values(e.getFrustumPlanes()).map((e=>{let{normal:t,distance:n}=e;return new Ce(t.clone().negate(),n)})),a=new ke(o),s=e.distanceScales.unitsPerMeter[2],l=n&&n[0]*s||0,c=n&&n[1]*s||0,u=e instanceof m.Z&&e.pitch<=60?t:0;if(r){const[e,t,n,i]=r,o=(0,Xe.w5)([e,i]),a=(0,Xe.w5)([n,t]);r=[o[0],Ke-o[1],a[0],Ke-a[1]]}const d=new tt(0,0,0),h={viewport:e,project:i,cullingVolume:a,elevationBounds:[l,c],minZ:u,maxZ:t,bounds:r,offset:0};if(d.update(h),e instanceof m.Z&&e.subViewports&&e.subViewports.length>1){for(h.offset=-1;d.update(h)&&!(--h.offset<-Qe););for(h.offset=1;d.update(h)&&!(++h.offset>Qe););}return d.getSelected()}(t,u,i,o):ft(t,u,a,d||rt,l)}function gt(e){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(e)}function mt(e){return Number.isFinite(e.west)&&Number.isFinite(e.north)&&Number.isFinite(e.east)&&Number.isFinite(e.south)}},39723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(68185),i=n(27469);class o extends i.Z{getShaders(){const e=super.getShaders();return e.inject={"vs:#decl":"uniform float trailLength;\nattribute float instanceTimestamps;\nattribute float instanceNextTimestamps;\nvarying float vTime;\n","vs:#main-end":"vTime = instanceTimestamps + (instanceNextTimestamps - instanceTimestamps) * vPathPosition.y / vPathLength;\n","fs:#decl":"uniform bool fadeTrail;\nuniform float trailLength;\nuniform float currentTime;\nvarying float vTime;\n","fs:#main-start":"if(vTime > currentTime || (fadeTrail && (vTime < currentTime - trailLength))) {\n discard;\n}\n","fs:DECKGL_FILTER_COLOR":"if(fadeTrail) {\n color.a *= 1.0 - (currentTime - vTime) / trailLength;\n}\n"},e}initializeState(){super.initializeState();this.getAttributeManager().addInstanced({timestamps:{size:1,accessor:"getTimestamps",shaderAttributes:{instanceTimestamps:{vertexOffset:0},instanceNextTimestamps:{vertexOffset:1}}}})}draw(e){const{fadeTrail:t,trailLength:n,currentTime:r}=this.props;e.uniforms={...e.uniforms,fadeTrail:t,trailLength:n,currentTime:r},super.draw(e)}}(0,r.Z)(o,"layerName","TripsLayer"),(0,r.Z)(o,"defaultProps",{fadeTrail:!0,trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:e=>e.timestamps}})},4105:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u=[0,0,0,255],d={getSourcePosition:{type:"accessor",value:e=>e.sourcePosition},getTargetPosition:{type:"accessor",value:e=>e.targetPosition},getSourceColor:{type:"accessor",value:u},getTargetColor:{type:"accessor",value:u},getWidth:{type:"accessor",value:1},getHeight:{type:"accessor",value:1},getTilt:{type:"accessor",value:0},greatCircle:!1,widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class h extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getBounds(){var e;return null===(e=this.getAttributeManager())||void 0===e?void 0:e.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instanceHeights;\nattribute float instanceTilts;\n\nuniform bool greatCircle;\nuniform bool useShortestPath;\nuniform float numSegments;\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nfloat paraboloid(float distance, float sourceZ, float targetZ, float ratio) {\n\n float deltaZ = targetZ - sourceZ;\n float dh = distance * instanceHeights;\n if (dh == 0.0) {\n return sourceZ + deltaZ * ratio;\n }\n float unitZ = deltaZ / dh;\n float p2 = unitZ * unitZ + 1.0;\n float dir = step(deltaZ, 0.0);\n float z0 = mix(sourceZ, targetZ, dir);\n float r = mix(ratio, 1.0 - ratio, dir);\n return sqrt(r * (p2 - r)) * dh + z0;\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 interpolateFlat(vec3 source, vec3 target, float segmentRatio) {\n float distance = length(source.xy - target.xy);\n float z = paraboloid(distance, source.z, target.z, segmentRatio);\n\n float tiltAngle = radians(instanceTilts);\n vec2 tiltDirection = normalize(target.xy - source.xy);\n vec2 tilt = vec2(-tiltDirection.y, tiltDirection.x) * z * sin(tiltAngle);\n\n return vec3(\n mix(source.xy, target.xy, segmentRatio) + tilt,\n z * cos(tiltAngle)\n );\n}\nfloat getAngularDist (vec2 source, vec2 target) {\n vec2 sourceRadians = radians(source);\n vec2 targetRadians = radians(target);\n vec2 sin_half_delta = sin((sourceRadians - targetRadians) / 2.0);\n vec2 shd_sq = sin_half_delta * sin_half_delta;\n\n float a = shd_sq.y + cos(sourceRadians.y) * cos(targetRadians.y) * shd_sq.x;\n return 2.0 * asin(sqrt(a));\n}\n\nvec3 interpolateGreatCircle(vec3 source, vec3 target, vec3 source3D, vec3 target3D, float angularDist, float t) {\n vec2 lngLat;\n if(abs(angularDist - PI) < 0.001) {\n lngLat = (1.0 - t) * source.xy + t * target.xy;\n } else {\n float a = sin((1.0 - t) * angularDist);\n float b = sin(t * angularDist);\n vec3 p = source3D.yxz * a + target3D.yxz * b;\n lngLat = degrees(vec2(atan(p.y, -p.x), atan(p.z, length(p.xy))));\n }\n\n float z = paraboloid(angularDist * EARTH_RADIUS, source.z, target.z, t);\n\n return vec3(lngLat, z);\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n float segmentIndex = positions.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n float prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n float nextSegmentRatio = getSegmentRatio(min(numSegments - 1.0, segmentIndex + 1.0));\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n isValid = 1.0;\n\n uv = vec2(segmentRatio, positions.y);\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n vec4 curr;\n vec4 next;\n vec3 source;\n vec3 target;\n\n if ((greatCircle || project_uProjectionMode == PROJECTION_MODE_GLOBE) && project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n source = project_globe_(vec3(instanceSourcePositions.xy, 0.0));\n target = project_globe_(vec3(instanceTargetPositions.xy, 0.0));\n float angularDist = getAngularDist(instanceSourcePositions.xy, instanceTargetPositions.xy);\n\n vec3 prevPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, prevSegmentRatio);\n vec3 currPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, segmentRatio);\n vec3 nextPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, nextSegmentRatio);\n\n if (abs(currPos.x - prevPos.x) > 180.0) {\n indexDir = -1.0;\n isValid = 0.0;\n } else if (abs(currPos.x - nextPos.x) > 180.0) {\n indexDir = 1.0;\n isValid = 0.0;\n }\n nextPos = indexDir < 0.0 ? prevPos : nextPos;\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n if (isValid == 0.0) {\n nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n currPos = mix(currPos, nextPos, t);\n segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n }\n\n vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n \n curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n \n } else {\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n if (useShortestPath) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n float deltaLng = target_world.x - source_world.x;\n if (deltaLng > 180.) target_world.x -= 360.;\n if (deltaLng < -180.) source_world.x -= 360.;\n }\n source = project_position(source_world, instanceSourcePositions64Low);\n target = project_position(target_world, instanceTargetPositions64Low);\n float antiMeridianX = 0.0;\n\n if (useShortestPath) {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n }\n float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n isValid = 0.0;\n indexDir = sign(segmentRatio - thresholdRatio);\n segmentRatio = thresholdRatio;\n }\n }\n\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n vec3 currPos = interpolateFlat(source, target, segmentRatio);\n vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n if (useShortestPath) {\n if (nextPos.x < antiMeridianX) {\n currPos.x += TILE_SIZE;\n nextPos.x += TILE_SIZE;\n }\n }\n\n curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n geometry.position = vec4(currPos, 1.0);\n }\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n vec3 offset = vec3(\n getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n DECKGL_FILTER_GL_POSITION(curr, geometry);\n gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n\n vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n vColor = vec4(color.rgb, color.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n if (isValid == 0.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n geometry.uv = uv;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceSourceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getSourceColor",defaultValue:u},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:u},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1},instanceHeights:{size:1,transition:!0,accessor:"getHeight",defaultValue:1},instanceTilts:{size:1,transition:!0,accessor:"getTilt",defaultValue:0}})}updateState(e){if(super.updateState(e),e.changeFlags.extensionsChanged){var t;const{gl:e}=this.context;null===(t=this.state.model)||void 0===t||t.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{widthUnits:n,widthScale:r,widthMinPixels:i,widthMaxPixels:o,greatCircle:a,wrapLongitude:l}=this.props;this.state.model.setUniforms(t).setUniforms({greatCircle:a,widthUnits:s.iI[n],widthScale:r,widthMinPixels:i,widthMaxPixels:o,useShortestPath:l}).draw()}_getModel(e){let t=[];for(let r=0;r<50;r++)t=t.concat([r,1,0,r,-1,0]);const n=new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:5,attributes:{positions:new Float32Array(t)}}),isInstanced:!0});return n.setUniforms({numSegments:50}),n}}(0,r.Z)(h,"layerName","ArcLayer"),(0,r.Z)(h,"defaultProps",d)},13091:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(68185),i=n(53104),o=n(58521),a=n(48424),s=n(79463),l=n(98029),c=n(76195),u=n(6509),d=n(87966),h=n(44548),f=n(65148),p=n(16621),g=n(39042),m=n(8766);class A extends p.Z{constructor(e){const{id:t=(0,g.hQ)("column-geometry")}=e,{indices:n,attributes:r}=function(e){const{radius:t,height:n=1,nradial:r=10}=e;let{vertices:i}=e;i&&(f.Z.assert(i.length>=r),i=i.flatMap((e=>[e[0],e[1]])),(0,m.modifyPolygonWindingDirection)(i,m.WINDING.COUNTER_CLOCKWISE));const o=n>0,a=r+1,s=o?3*a+1:r,l=2*Math.PI/r,c=new Uint16Array(o?3*r*2:0),u=new Float32Array(3*s),d=new Float32Array(3*s);let h=0;if(o){for(let e=0;ee.position},getFillColor:{type:"accessor",value:v},getLineColor:{type:"accessor",value:v},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class b extends i.Z{getShaders(){const{gl:e}=this.context,t=!(0,c.D0)(e),n={},r=this.props.flatShading&&(0,u.U6)(e,d.h.GLSL_DERIVATIVES);return r&&(n.FLAT_SHADING=1),super.getShaders({vs:"#version 300 es\n\n#define SHADER_NAME column-layer-vertex-shader\n\nin vec3 positions;\nin vec3 normals;\n\nin vec3 instancePositions;\nin float instanceElevations;\nin vec3 instancePositions64Low;\nin vec4 instanceFillColors;\nin vec4 instanceLineColors;\nin float instanceStrokeWidths;\n\nin vec3 instancePickingColors;\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform bool extruded;\nuniform bool stroked;\nuniform bool isStroke;\nuniform float coverage;\nuniform float elevationScale;\nuniform float edgeDistance;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int radiusUnits;\nuniform int widthUnits;\nout vec4 vColor;\n#ifdef FLAT_SHADING\nout vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n vec4 color = isStroke ? instanceLineColors : instanceFillColors;\n mat2 rotationMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n float elevation = 0.0;\n float strokeOffsetRatio = 1.0;\n\n if (extruded) {\n elevation = instanceElevations * (positions.z + 1.0) / 2.0 * elevationScale;\n } else if (stroked) {\n float widthPixels = clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0;\n float halfOffset = project_pixel_size(widthPixels) / project_size(edgeDistance * coverage * radius);\n if (isStroke) {\n strokeOffsetRatio -= sign(positions.z) * halfOffset;\n } else {\n strokeOffsetRatio -= halfOffset;\n }\n }\n float shouldRender = float(color.a > 0.0 && instanceElevations >= 0.0);\n float dotRadius = radius * coverage * shouldRender;\n\n geometry.pickingColor = instancePickingColors;\n vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n vec3 centroidPosition64Low = instancePositions64Low;\n vec2 offset = (rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius;\n if (radiusUnits == UNIT_METERS) {\n offset = project_size(offset);\n }\n vec3 pos = vec3(offset, 0.);\n DECKGL_FILTER_SIZE(pos, geometry);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n if (extruded && !isStroke) {\n#ifdef FLAT_SHADING\n position_commonspace = geometry.position;\n vColor = vec4(color.rgb, color.a * opacity);\n#else\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n vColor = vec4(lightColor, color.a * opacity);\n#endif\n } else {\n vColor = vec4(color.rgb, color.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nuniform vec3 project_uCameraPosition;\nuniform bool extruded;\nuniform bool isStroke;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n#ifdef FLAT_SHADING\nin vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n fragColor = vColor;\n#ifdef FLAT_SHADING\n if (extruded && !isStroke && !picking_uActive) {\n vec3 normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n fragColor.rgb = lighting_getLightColor(vColor.rgb, project_uCameraPosition, position_commonspace.xyz, normal);\n }\n#endif\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",defines:n,transpileToGLSL100:t,modules:[o.Z,r?a.s:a.N,s.Z]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getFillColor",defaultValue:v},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:v},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}updateState(e){super.updateState(e);const{props:t,oldProps:n,changeFlags:r}=e,i=r.extensionsChanged||t.flatShading!==n.flatShading;if(i){var o;const{gl:e}=this.context;null===(o=this.state.model)||void 0===o||o.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}(i||t.diskResolution!==n.diskResolution||t.vertices!==n.vertices||(t.extruded||t.stroked)!==(n.extruded||n.stroked))&&this._updateGeometry(t)}getGeometry(e,t,n){const r=new A({radius:1,height:n?2:0,vertices:t,nradial:e});let i=0;if(t)for(let o=0;o{"use strict";n.d(t,{Z:()=>E});var r=n(68185),i=n(32603),o=n(63962);var a=n(90286),s=n(99259),l=n(34929),c=n(27469),u=n(816);const d={circle:{type:s.Z,props:{filled:"filled",stroked:"stroked",lineWidthMaxPixels:"lineWidthMaxPixels",lineWidthMinPixels:"lineWidthMinPixels",lineWidthScale:"lineWidthScale",lineWidthUnits:"lineWidthUnits",pointRadiusMaxPixels:"radiusMaxPixels",pointRadiusMinPixels:"radiusMinPixels",pointRadiusScale:"radiusScale",pointRadiusUnits:"radiusUnits",pointAntialiasing:"antialiasing",pointBillboard:"billboard",getFillColor:"getFillColor",getLineColor:"getLineColor",getLineWidth:"getLineWidth",getPointRadius:"getRadius"}},icon:{type:a.Z,props:{iconAtlas:"iconAtlas",iconMapping:"iconMapping",iconSizeMaxPixels:"sizeMaxPixels",iconSizeMinPixels:"sizeMinPixels",iconSizeScale:"sizeScale",iconSizeUnits:"sizeUnits",iconAlphaCutoff:"alphaCutoff",iconBillboard:"billboard",getIcon:"getIcon",getIconAngle:"getAngle",getIconColor:"getColor",getIconPixelOffset:"getPixelOffset",getIconSize:"getSize"}},text:{type:l.Z,props:{textSizeMaxPixels:"sizeMaxPixels",textSizeMinPixels:"sizeMinPixels",textSizeScale:"sizeScale",textSizeUnits:"sizeUnits",textBackground:"background",textBackgroundPadding:"backgroundPadding",textFontFamily:"fontFamily",textFontWeight:"fontWeight",textLineHeight:"lineHeight",textMaxWidth:"maxWidth",textOutlineColor:"outlineColor",textOutlineWidth:"outlineWidth",textWordBreak:"wordBreak",textCharacterSet:"characterSet",textBillboard:"billboard",textFontSettings:"fontSettings",getText:"getText",getTextAngle:"getAngle",getTextColor:"getColor",getTextPixelOffset:"getPixelOffset",getTextSize:"getSize",getTextAnchor:"getTextAnchor",getTextAlignmentBaseline:"getAlignmentBaseline",getTextBackgroundColor:"getBackgroundColor",getTextBorderColor:"getBorderColor",getTextBorderWidth:"getBorderWidth"}}},h={type:c.Z,props:{lineWidthUnits:"widthUnits",lineWidthScale:"widthScale",lineWidthMinPixels:"widthMinPixels",lineWidthMaxPixels:"widthMaxPixels",lineJointRounded:"jointRounded",lineCapRounded:"capRounded",lineMiterLimit:"miterLimit",lineBillboard:"billboard",getLineColor:"getColor",getLineWidth:"getWidth"}},f={type:u.Z,props:{extruded:"extruded",filled:"filled",wireframe:"wireframe",elevationScale:"elevationScale",material:"material",_full3d:"_full3d",getElevation:"getElevation",getFillColor:"getFillColor",getLineColor:"getLineColor"}};function p(e){let{type:t,props:n}=e;const r={};for(const i in n)r[i]=t.defaultProps[n[i]];return r}function g(e,t){const{transitions:n,updateTriggers:r}=e.props,i={updateTriggers:{},transitions:n&&{getPosition:n.geometry}};for(const o in t){const a=t[o];let s=e.props[o];o.startsWith("get")&&(s=e.getSubLayerAccessor(s),i.updateTriggers[a]=r[o],n&&(i.transitions[a]=n[o])),i[a]=s}return i}var m=n(65148);function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},{startRow:i=0,endRow:o=e.length}=n;for(let a=i;a0;)t=t[0];return t&&Number.isFinite(t[0])}(o,a))switch(o){case"Point":s.push(n({geometry:e},r,i));break;case"MultiPoint":a.forEach((e=>{s.push(n({geometry:{type:"Point",coordinates:e}},r,i))}));break;case"LineString":l.push(n({geometry:e},r,i));break;case"MultiLineString":a.forEach((e=>{l.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}));break;case"Polygon":c.push(n({geometry:e},r,i)),a.forEach((e=>{u.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}));break;case"MultiPolygon":a.forEach((e=>{c.push(n({geometry:{type:"Polygon",coordinates:e}},r,i)),e.forEach((e=>{u.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}))}))}else m.Z.warn("".concat(o," coordinates are malformed"))()}const y={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function b(e){return e.geometry.coordinates}function _(e,t){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{points:r,lines:i,polygons:o}=e,a=function(e,t){const n={points:null,lines:null,polygons:null};for(const r in n){const i=e[r].globalFeatureIds.value;n[r]=new Uint8ClampedArray(3*i.length);const o=[];for(let e=0;ee.properties.icon},getText:{type:"accessor",value:e=>e.properties.text},pointType:"circle",getRadius:{deprecatedFor:"getPointRadius"}};class E extends i.Z{initializeState(){this.state={layerProps:{},features:{}}}updateState(e){let{props:t,changeFlags:n}=e;if(!n.dataChanged)return;const{data:r}=this.props,i=r&&"points"in r&&"polygons"in r&&"lines"in r;this.setState({binary:i}),i?this._updateStateBinary({props:t,changeFlags:n}):this._updateStateJSON({props:t,changeFlags:n})}_updateStateBinary(e){let{props:t,changeFlags:n}=e;const r=_(t.data,this.encodePickingColor);this.setState({layerProps:r})}_updateStateJSON(e){let{props:t,changeFlags:n}=e;const r=function(e){if(Array.isArray(e))return e;switch(m.Z.assert(e.type,"GeoJSON does not have type"),e.type){case"Feature":return[e];case"FeatureCollection":return m.Z.assert(Array.isArray(e.features),"GeoJSON does not have features array"),e.features;default:return[{geometry:e}]}}(t.data),i=this.getSubLayerRow.bind(this);let a={};const s={};if(Array.isArray(n.dataChanged)){const e=this.state.features;for(const t in e)a[t]=e[t].slice(),s[t]=[];for(const t of n.dataChanged){const n=A(r,i,t);for(const r in e)s[r].push((0,o.b)({data:a[r],getIndex:e=>e.__source.index,dataRange:t,replace:n[r]}))}}else a=A(r,i);const l=function(e,t){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{pointFeatures:r,lineFeatures:i,polygonFeatures:o,polygonOutlineFeatures:a}=e;return n.points.data=r,n.points._dataDiff=t.pointFeatures&&(()=>t.pointFeatures),n.points.getPosition=b,n.lines.data=i,n.lines._dataDiff=t.lineFeatures&&(()=>t.lineFeatures),n.lines.getPath=b,n.polygons.data=o,n.polygons._dataDiff=t.polygonFeatures&&(()=>t.polygonFeatures),n.polygons.getPolygon=b,n.polygonsOutline.data=a,n.polygonsOutline._dataDiff=t.polygonOutlineFeatures&&(()=>t.polygonOutlineFeatures),n.polygonsOutline.getPath=b,n}(a,s);this.setState({features:a,featuresDiff:s,layerProps:l})}getPickingInfo(e){const t=super.getPickingInfo(e),{index:n,sourceLayer:r}=t;return t.featureType=w.find((e=>r.id.startsWith("".concat(this.id,"-").concat(e,"-")))),n>=0&&r.id.startsWith("".concat(this.id,"-points-text"))&&this.state.binary&&(t.index=this.props.data.points.globalFeatureIds.value[n]),t}_updateAutoHighlight(e){const t="".concat(this.id,"-points-"),n="points"===e.featureType;for(const r of this.getSubLayers())r.id.startsWith(t)===n&&r.updateAutoHighlight(e)}_renderPolygonLayer(){const{extruded:e,wireframe:t}=this.props,{layerProps:n}=this.state,r="polygons-fill",i=this.shouldRenderSubLayer(r,n.polygons.data)&&this.getSubLayerClass(r,f.type);if(i){const o=g(this,f.props),a=e&&t;return a||delete o.getLineColor,o.updateTriggers.lineColors=a,new i(o,this.getSubLayerProps({id:r,updateTriggers:o.updateTriggers}),n.polygons)}return null}_renderLineLayers(){const{extruded:e,stroked:t}=this.props,{layerProps:n}=this.state,r="polygons-stroke",i="linestrings",o=!e&&t&&this.shouldRenderSubLayer(r,n.polygonsOutline.data)&&this.getSubLayerClass(r,h.type),a=this.shouldRenderSubLayer(i,n.lines.data)&&this.getSubLayerClass(i,h.type);if(o||a){const e=g(this,h.props);return[o&&new o(e,this.getSubLayerProps({id:r,updateTriggers:e.updateTriggers}),n.polygonsOutline),a&&new a(e,this.getSubLayerProps({id:i,updateTriggers:e.updateTriggers}),n.lines)]}return null}_renderPointLayers(){const{pointType:e}=this.props,{layerProps:t,binary:n}=this.state;let{highlightedObjectIndex:r}=this.props;!n&&Number.isFinite(r)&&(r=t.points.data.findIndex((e=>e.__source.index===r)));const i=new Set(e.split("+")),o=[];for(const a of i){const e="points-".concat(a),i=d[a],s=i&&this.shouldRenderSubLayer(e,t.points.data)&&this.getSubLayerClass(e,i.type);if(s){const l=g(this,i.props);let c=t.points;if("text"===a&&n){const{instancePickingColors:e,...t}=c.data.attributes;c={...c,data:{...c.data,attributes:t}}}o.push(new s(l,this.getSubLayerProps({id:e,updateTriggers:l.updateTriggers,highlightedObjectIndex:r}),c))}}return o}renderLayers(){const{extruded:e}=this.props,t=this._renderPolygonLayer();return[!e&&t,this._renderLineLayers(),this._renderPointLayers(),e&&t]}getSubLayerAccessor(e){const{binary:t}=this.state;return t&&"function"===typeof e?(t,n)=>{const{data:r,index:i}=n,o=function(e,t){if(!e)return null;const n="startIndices"in e?e.startIndices[t]:t,r=e.featureIds.value[n];return-1!==n?function(e,t,n){const r={properties:{...e.properties[t]}};for(const i in e.numericProps)r.properties[i]=e.numericProps[i].value[n];return r}(e,r,n):null}(r,i);return e(o,n)}:super.getSubLayerAccessor(e)}}(0,r.Z)(E,"layerName","GeoJsonLayer"),(0,r.Z)(E,"defaultProps",x)},90286:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(65148),c=n(44548),u=n(16621);var d=n(81786),h=n(77378),f=n(63734),p=n(39179);const g=()=>{},m={10241:9987,10240:9729,10242:33071,10243:33071};function A(e){return Math.pow(2,Math.ceil(Math.log2(e)))}function v(e,t,n,r){const i=Math.min(n/t.width,r/t.height),o=Math.floor(t.width*i),a=Math.floor(t.height*i);return 1===i?{data:t,width:o,height:a}:(e.canvas.height=a,e.canvas.width=o,e.clearRect(0,0,o,a),e.drawImage(t,0,0,t.width,t.height,0,0,o,a),{data:e.canvas,width:o,height:a})}function y(e){return e&&(e.id||e.url)}function b(e,t,n){for(let r=0;r0){const{mapping:e,xOffset:t,yOffset:r,rowHeight:i,canvasHeight:o}=function(e){let{icons:t,buffer:n,mapping:r={},xOffset:i=0,yOffset:o=0,rowHeight:a=0,canvasWidth:s}=e,l=[];for(let c=0;cs&&(b(r,l,o),i=0,o=a+o+n,a=0,l=[]),l.push({icon:e,xOffset:i}),i=i+c+n,a=Math.max(a,t)}}return l.length>0&&b(r,l,o),{mapping:r,rowHeight:a,xOffset:i,yOffset:o,canvasWidth:s,canvasHeight:A(a+o+n)}}({icons:n,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset});this._rowHeight=i,this._mapping=e,this._xOffset=t,this._yOffset=r,this._canvasHeight=o,this._texture||(this._texture=new d.Z(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:this._textureParameters||m})),this._texture.height!==this._canvasHeight&&(this._texture=function(e,t,n,r){const i=e.width,o=e.height,a=new d.Z(e.gl,{width:t,height:n,parameters:r});return(0,h.Lv)(e,a,{targetY:0,width:i,height:o}),e.delete(),a}(this._texture,this._canvasWidth,this._canvasHeight,this._textureParameters||m)),this.onUpdate(),this._canvas=this._canvas||document.createElement("canvas"),this._loadIcons(n)}}_loadIcons(e){const t=this._canvas.getContext("2d",{willReadFrequently:!0});for(const n of e)this._pendingCount++,(0,f.z)(n.url,this._loadOptions).then((e=>{const r=y(n),i=this._mapping[r],{x:o,y:a,width:s,height:l}=i,{data:c,width:u,height:d}=v(t,e,s,l);this._texture.setSubImageData({data:c,x:o+(s-u)/2,y:a+(l-d)/2,width:u,height:d}),i.width=u,i.height=d,this._texture.generateMipmap(),this.onUpdate()})).catch((e=>{this.onError({url:n.url,source:n.source,sourceIndex:n.sourceIndex,loadOptions:this._loadOptions,error:e})})).finally((()=>{this._pendingCount--}))}}const w=[0,0,0,255],x={iconAtlas:{type:"image",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:e=>e.position},getIcon:{type:"accessor",value:e=>e.icon},getColor:{type:"accessor",value:w},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},onIconError:{type:"function",value:null,optional:!0},textureParameters:{type:"object",ignore:!0}};class E extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\nuniform int sizeUnits;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = angle * PI / 180.0;\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n\n vec2 iconSize = instanceIconFrames.zw;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits), \n sizeMinPixels, sizeMaxPixels\n );\n float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n pixelOffset += instancePixelOffset;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n\n vTextureCoords = mix(\n instanceIconFrames.xy,\n instanceIconFrames.xy + iconSize,\n (positions.xy + 1.0) / 2.0\n ) / iconsTextureDim;\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n vColorMode = instanceColorModes;\n}\n",fs:"#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n float a = texColor.a * opacity * vColor.a;\n\n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color, a);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}initializeState(){this.state={iconManager:new _(this.context.gl,{onUpdate:this._onUpdate.bind(this),onError:this._onError.bind(this)})};this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:5121,accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:w},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}updateState(e){super.updateState(e);const{props:t,oldProps:n,changeFlags:r}=e,i=this.getAttributeManager(),{iconAtlas:o,iconMapping:a,data:s,getIcon:l,textureParameters:c}=t,{iconManager:u}=this.state,d=o||this.internalState.isAsyncPropLoading("iconAtlas");if(u.setProps({loadOptions:t.loadOptions,autoPacking:!d,iconAtlas:o,iconMapping:d?a:null,textureParameters:c}),d?n.iconMapping!==t.iconMapping&&i.invalidate("getIcon"):(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getIcon))&&u.packIcons(s,l),r.extensionsChanged){var h;const{gl:e}=this.context;null===(h=this.state.model)||void 0===h||h.delete(),this.state.model=this._getModel(e),i.invalidateAll()}}get isLoaded(){return super.isLoaded&&this.state.iconManager.isLoaded}finalizeState(e){super.finalizeState(e),this.state.iconManager.finalize()}draw(e){let{uniforms:t}=e;const{sizeScale:n,sizeMinPixels:r,sizeMaxPixels:i,sizeUnits:o,billboard:a,alphaCutoff:l}=this.props,{iconManager:c}=this.state,u=c.getTexture();u&&this.state.model.setUniforms(t).setUniforms({iconsTexture:u,iconsTextureDim:[u.width,u.height],sizeUnits:s.iI[o],sizeScale:n,sizeMinPixels:r,sizeMaxPixels:i,billboard:a,alphaCutoff:l}).draw()}_getModel(e){return new c.Z(e,{...this.getShaders(),id:this.props.id,geometry:new u.Z({drawMode:6,attributes:{positions:{size:2,value:new Float32Array([-1,-1,-1,1,1,1,1,-1])}}}),isInstanced:!0})}_onUpdate(){this.setNeedsRedraw()}_onError(e){var t;const n=null===(t=this.getCurrentLayer())||void 0===t?void 0:t.props.onIconError;n?n(e):l.Z.error(e.error.message)()}getInstanceOffset(e){const{width:t,height:n,anchorX:r=t/2,anchorY:i=n/2}=this.state.iconManager.getIconMapping(e);return[t/2-r,n/2-i]}getInstanceColorMode(e){return this.state.iconManager.getIconMapping(e).mask?1:0}getInstanceIconFrame(e){const{x:t,y:n,width:r,height:i}=this.state.iconManager.getIconMapping(e);return[t,n,r,i]}}(0,r.Z)(E,"defaultProps",x),(0,r.Z)(E,"layerName","IconLayer")},39986:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u={getSourcePosition:{type:"accessor",value:e=>e.sourcePosition},getTargetPosition:{type:"accessor",value:e=>e.targetPosition},getColor:{type:"accessor",value:[0,0,0,255]},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class d extends i.Z{getBounds(){var e;return null===(e=this.getAttributeManager())||void 0===e?void 0:e.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\n\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float useShortestPath;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvec3 splitLine(vec3 a, vec3 b, float x) {\n float t = (x - a.x) / (b.x - a.x);\n return vec3(x, mix(a.yz, b.yz, t));\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n vec3 source_world_64low = instanceSourcePositions64Low;\n vec3 target_world_64low = instanceTargetPositions64Low;\n\n if (useShortestPath > 0.5 || useShortestPath < -0.5) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n float deltaLng = target_world.x - source_world.x;\n\n if (deltaLng * useShortestPath > 180.) {\n source_world.x += 360. * useShortestPath;\n source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n source_world_64low = vec3(0.0);\n } else if (deltaLng * useShortestPath < -180.) {\n target_world.x += 360. * useShortestPath;\n target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n target_world_64low = vec3(0.0);\n } else if (useShortestPath < 0.) {\n gl_Position = vec4(0.);\n return;\n }\n }\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n DECKGL_FILTER_GL_POSITION(p, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}updateState(e){if(super.updateState(e),e.changeFlags.extensionsChanged){var t;const{gl:e}=this.context;null===(t=this.state.model)||void 0===t||t.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{widthUnits:n,widthScale:r,widthMinPixels:i,widthMaxPixels:o,wrapLongitude:a}=this.props;this.state.model.setUniforms(t).setUniforms({widthUnits:s.iI[n],widthScale:r,widthMinPixels:i,widthMaxPixels:o,useShortestPath:a?1:0}).draw(),a&&this.state.model.setUniforms({useShortestPath:-1}).draw()}_getModel(e){return new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0})}}(0,r.Z)(d,"layerName","LineLayer"),(0,r.Z)(d,"defaultProps",u)},27469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621),u=n(3943),d=n(8766);class h extends u.Z{constructor(e){super({...e,attributes:{positions:{size:3,padding:18,initialize:!0,type:e.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}})}get(e){return this.attributes[e]}getGeometryFromBuffer(e){return this.normalize?super.getGeometryFromBuffer(e):null}normalizeGeometry(e){return this.normalize?function(e,t,n,r){let i;if(Array.isArray(e[0])){const n=e.length*t;i=new Array(n);for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:[];const{positionSize:r}=this;t*r>=e.length&&(t+=1-e.length/r);const i=t*r;return n[0]=e[i],n[1]=e[i+1],n[2]=3===r&&e[i+2]||0,n}isClosed(e){if(!this.normalize)return Boolean(this.opts.loop);const{positionSize:t}=this,n=e.length-t;return e[0]===e[n]&&e[1]===e[n+1]&&(2===t||e[2]===e[n+2])}}function f(e){return Array.isArray(e[0])}const p=[0,0,0,255],g={widthUnits:"meters",widthScale:{type:"number",min:0,value:1},widthMinPixels:{type:"number",min:0,value:0},widthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},jointRounded:!1,capRounded:!1,miterLimit:{type:"number",min:0,value:4},billboard:!1,_pathType:null,getPath:{type:"accessor",value:e=>e.path},getColor:{type:"accessor",value:p},getWidth:{type:"accessor",value:1},rounded:{deprecatedFor:["jointRounded","capRounded"]}},m={enter:(e,t)=>t.length?t.subarray(t.length-e.length):e};class A extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute float instanceTypes;\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftPositions;\nattribute vec3 instanceRightPositions;\nattribute vec3 instanceLeftPositions64Low;\nattribute vec3 instanceStartPositions64Low;\nattribute vec3 instanceEndPositions64Low;\nattribute vec3 instanceRightPositions64Low;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float capType;\nuniform float miterLimit;\nuniform bool billboard;\nuniform int widthUnits;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\nvec3 getLineJoinOffset(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n vec2 dir = isEnd ? dirA : dirB;\n vec2 perp = isEnd ? perpA : perpB;\n float L = isEnd ? lenA : lenB;\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = capType;\n } else {\n vJointType = jointType;\n }\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return offset;\n}\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0);\n vec3 width;\n\n if (billboard) {\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n DECKGL_FILTER_GL_POSITION(currPositionScreen, geometry);\n gl_Position = vec4(currPositionScreen.xyz + offset * currPositionScreen.w, currPositionScreen.w);\n } else {\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(prevPosition, currPosition, nextPosition, width.xy);\n geometry.position = vec4(currPosition + offset, 1.0);\n gl_Position = project_common_position_to_clipspace(geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float miterLimit;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nvoid main(void) {\n geometry.uv = vPathPosition;\n\n if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n discard;\n }\n if (vJointType < 0.5 && vMiterLength > miterLimit + 1.0) {\n discard;\n }\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:m,accessor:"getPath",update:this.calculatePositions,noAlloc:true,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:true},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:m,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:m,defaultValue:p},instancePickingColors:{size:3,type:5121,accessor:(e,t)=>{let{index:n,target:r}=t;return this.encodePickingColor(e&&e.__source?e.__source.index:n,r)}}}),this.setState({pathTesselator:new h({fp64:this.use64bitPositions()})})}updateState(e){super.updateState(e);const{props:t,changeFlags:n}=e,r=this.getAttributeManager();if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPath)){const{pathTesselator:e}=this.state,i=t.data.attributes||{};e.updateGeometry({data:t.data,geometryBuffer:i.getPath,buffers:i,normalize:!t._pathType,loop:"loop"===t._pathType,getGeometry:t.getPath,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:n.dataChanged}),this.setState({numInstances:e.instanceCount,startIndices:e.vertexStarts}),n.dataChanged||r.invalidateAll()}if(n.extensionsChanged){var i;const{gl:e}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(e),r.invalidateAll()}}getPickingInfo(e){const t=super.getPickingInfo(e),{index:n}=t,{data:r}=this.props;return r[0]&&r[0].__source&&(t.object=r.find((e=>e.__source.index===n))),t}disablePickingIndex(e){const{data:t}=this.props;if(t[0]&&t[0].__source)for(let n=0;n{"use strict";n.d(t,{Z:()=>f});var r=n(68185),i=n(32603),o=n(65148),a=n(39179),s=n(816),l=n(27469),c=n(66784),u=n(63962);const d=[0,0,0,255],h={stroked:!0,filled:!0,extruded:!1,elevationScale:1,wireframe:!1,_normalize:!0,_windingOrder:"CW",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,getPolygon:{type:"accessor",value:e=>e.polygon},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:d},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0};class f extends i.Z{initializeState(){this.state={paths:[]},this.props.getLineDashArray&&o.Z.removed("getLineDashArray","PathStyleExtension")()}updateState(e){let{changeFlags:t}=e;const n=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getPolygon);if(n&&Array.isArray(t.dataChanged)){const e=this.state.paths.slice(),n=t.dataChanged.map((t=>(0,u.b)({data:e,getIndex:e=>e.__source.index,dataRange:t,replace:this._getPaths(t)})));this.setState({paths:e,pathsDiff:n})}else n&&this.setState({paths:this._getPaths(),pathsDiff:null})}_getPaths(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{data:t,getPolygon:n,positionFormat:r,_normalize:i}=this.props,o=[],s="XY"===r?2:3,{startRow:l,endRow:u}=e,{iterable:d,objectInfo:h}=(0,a.jB)(t,l,u);for(const a of d){h.index++;let e=n(a,h);i&&(e=c.Fv(e,s));const{holeIndices:t}=e,r=e.positions||e;if(t)for(let n=0;n<=t.length;n++){const e=r.slice(t[n-1]||0,t[n]||r.length);o.push(this.getSubLayerRow({path:e},a,h.index))}else o.push(this.getSubLayerRow({path:r},a,h.index))}return o}renderLayers(){const{data:e,_dataDiff:t,stroked:n,filled:r,extruded:i,wireframe:o,_normalize:a,_windingOrder:c,elevationScale:u,transitions:h,positionFormat:f}=this.props,{lineWidthUnits:p,lineWidthScale:g,lineWidthMinPixels:m,lineWidthMaxPixels:A,lineJointRounded:v,lineMiterLimit:y,lineDashJustified:b}=this.props,{getFillColor:_,getLineColor:w,getLineWidth:x,getLineDashArray:E,getElevation:S,getPolygon:C,updateTriggers:P,material:T}=this.props,{paths:M,pathsDiff:k}=this.state,R=this.getSubLayerClass("fill",s.Z),O=this.getSubLayerClass("stroke",l.Z),I=this.shouldRenderSubLayer("fill",M)&&new R({_dataDiff:t,extruded:i,elevationScale:u,filled:r,wireframe:o,_normalize:a,_windingOrder:c,getElevation:S,getFillColor:_,getLineColor:i&&o?w:d,material:T,transitions:h},this.getSubLayerProps({id:"fill",updateTriggers:P&&{getPolygon:P.getPolygon,getElevation:P.getElevation,getFillColor:P.getFillColor,lineColors:i&&o,getLineColor:P.getLineColor}}),{data:e,positionFormat:f,getPolygon:C});return[!i&&I,!i&&n&&this.shouldRenderSubLayer("stroke",M)&&new O({_dataDiff:k&&(()=>k),widthUnits:p,widthScale:g,widthMinPixels:m,widthMaxPixels:A,jointRounded:v,miterLimit:y,dashJustified:b,_pathType:"loop",transitions:h&&{getWidth:h.getLineWidth,getColor:h.getLineColor,getPath:h.getPolygon},getColor:this.getSubLayerAccessor(w),getWidth:this.getSubLayerAccessor(x),getDashArray:this.getSubLayerAccessor(E)},this.getSubLayerProps({id:"stroke",updateTriggers:P&&{getWidth:P.getLineWidth,getColor:P.getLineColor,getDashArray:P.getLineDashArray}}),{data:M,positionFormat:f,getPath:e=>e.path}),i&&I]}}(0,r.Z)(f,"layerName","PolygonLayer"),(0,r.Z)(f,"defaultProps",h)},99259:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u=[0,0,0,255],d={radiusUnits:"meters",radiusScale:{type:"number",min:0,value:1},radiusMinPixels:{type:"number",min:0,value:0},radiusMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},lineWidthUnits:"meters",lineWidthScale:{type:"number",min:0,value:1},lineWidthMinPixels:{type:"number",min:0,value:0},lineWidthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},stroked:!1,filled:!0,billboard:!1,antialiasing:!0,getPosition:{type:"accessor",value:e=>e.position},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:u},getLineColor:{type:"accessor",value:u},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class h extends i.Z{getShaders(){return super.getShaders({vs:"#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceRadius;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float lineWidthScale;\nuniform float lineWidthMinPixels;\nuniform float lineWidthMaxPixels;\nuniform float stroked;\nuniform bool filled;\nuniform bool antialiasing;\nuniform bool billboard;\nuniform int radiusUnits;\nuniform int lineWidthUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n outerRadiusPixels = clamp(\n project_size_to_pixel(radiusScale * instanceRadius, radiusUnits),\n radiusMinPixels, radiusMaxPixels\n );\n float lineWidthPixels = clamp(\n project_size_to_pixel(lineWidthScale * instanceLineWidths, lineWidthUnits),\n lineWidthMinPixels, lineWidthMaxPixels\n );\n outerRadiusPixels += stroked * lineWidthPixels / 2.0;\n float edgePadding = antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;\n unitPosition = edgePadding * positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n innerUnitRadius = 1.0 - stroked * lineWidthPixels / outerRadiusPixels;\n \n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = edgePadding * positions * outerRadiusPixels;\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME scatterplot-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool filled;\nuniform float stroked;\nuniform bool antialiasing;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n geometry.uv = unitPosition;\n\n float distToCenter = length(unitPosition) * outerRadiusPixels;\n float inCircle = antialiasing ? \n smoothedge(distToCenter, outerRadiusPixels) : \n step(distToCenter, outerRadiusPixels);\n\n if (inCircle == 0.0) {\n discard;\n }\n\n if (stroked > 0.5) {\n float isLine = antialiasing ? \n smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :\n step(innerUnitRadius * outerRadiusPixels, distToCenter);\n\n if (filled) {\n gl_FragColor = mix(vFillColor, vLineColor, isLine);\n } else {\n if (isLine == 0.0) {\n discard;\n }\n gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n }\n } else if (filled) {\n gl_FragColor = vFillColor;\n } else {\n discard;\n }\n\n gl_FragColor.a *= inCircle;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(e){if(super.updateState(e),e.changeFlags.extensionsChanged){var t;const{gl:e}=this.context;null===(t=this.state.model)||void 0===t||t.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{radiusUnits:n,radiusScale:r,radiusMinPixels:i,radiusMaxPixels:o,stroked:a,filled:l,billboard:c,antialiasing:u,lineWidthUnits:d,lineWidthScale:h,lineWidthMinPixels:f,lineWidthMaxPixels:p}=this.props;this.state.model.setUniforms(t).setUniforms({stroked:a?1:0,filled:l,billboard:c,antialiasing:u,radiusUnits:s.iI[n],radiusScale:r,radiusMinPixels:i,radiusMaxPixels:o,lineWidthUnits:s.iI[d],lineWidthScale:h,lineWidthMinPixels:f,lineWidthMaxPixels:p}).draw()}_getModel(e){return new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:6,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0})}}(0,r.Z)(h,"defaultProps",d),(0,r.Z)(h,"layerName","ScatterplotLayer")},66784:(e,t,n)=>{"use strict";n.d(t,{Fv:()=>f,Gd:()=>u,k8:()=>c,mD:()=>m});var r=n(49236),i=n.n(r),o=n(8766);const a=o.WINDING.CLOCKWISE,s=o.WINDING.COUNTER_CLOCKWISE,l={isClosed:!0};function c(e){return"positions"in e?e.positions:e}function u(e){return"holeIndices"in e?e.holeIndices:null}function d(e,t,n,r,i){let a=t;const s=n.length;for(let o=0;o4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;a=a||n.length;const c=a-i;if(c<=0)return t;let u=t;for(let o=0;o=1&&e[0].length>=2&&Number.isFinite(e[0][0])}(e)){let i=0;for(const[o,l]of e.entries())i=d(n,i,l,t,0===o?a:s),r.push(i);return r.pop(),{positions:n,holeIndices:r}}return d(n,0,e,t,a),n}function p(e,t,n){const r=e.length/3;let i=0;for(let o=0;oe/t)));let a=c(e);const s=r&&3===t;if(n){const e=a.length;a=a.slice();const r=[];for(let i=0;it&&e>r||(t>r?(n||(a=a.slice()),g(a,0,2,1)):(n||(a=a.slice()),g(a,1,2,0)))}return i()(a,o,t)}},816:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(68185),i=n(53104),o=n(58521),a=n(48424),s=n(79463),l=n(98029),c=n(6509),u=n(87966),d=n(44548),h=n(16621),f=n(66784),p=n(3943),g=n(8766);class m extends p.Z{constructor(e){const{fp64:t,IndexType:n=Uint32Array}=e;super({...e,attributes:{positions:{size:3,type:t?Float64Array:Float32Array},vertexValid:{type:Uint8ClampedArray,size:1},indices:{type:n,size:1}}})}get(e){const{attributes:t}=this;return"indices"===e?t.indices&&t.indices.subarray(0,this.vertexCount):t[e]}updateGeometry(e){super.updateGeometry(e);const t=this.buffers.indices;if(t)this.vertexCount=(t.value||t).length;else if(this.data&&!this.getGeometry)throw new Error("missing indices buffer")}normalizeGeometry(e){if(this.normalize){const t=f.Fv(e,this.positionSize);return this.opts.resolution?(0,g.cutPolygonByGrid)(f.k8(t),f.Gd(t),{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0}):this.opts.wrapLongitude?(0,g.cutPolygonByMercatorBounds)(f.k8(t),f.Gd(t),{size:this.positionSize,maxLatitude:86,edgeTypes:!0}):t}return e}getGeometrySize(e){if(A(e)){let t=0;for(const n of e)t+=this.getGeometrySize(n);return t}return f.k8(e).length/this.positionSize}getGeometryFromBuffer(e){return this.normalize||!this.buffers.indices?super.getGeometryFromBuffer(e):null}updateGeometryAttributes(e,t){if(e&&A(e))for(const n of e){const e=this.getGeometrySize(n);t.geometrySize=e,this.updateGeometryAttributes(n,t),t.vertexStart+=e,t.indexStart=this.indexStarts[t.geometryIndex+1]}else this._updateIndices(e,t),this._updatePositions(e,t),this._updateVertexValid(e,t)}_updateIndices(e,t){let{geometryIndex:n,vertexStart:r,indexStart:i}=t;const{attributes:o,indexStarts:a,typedArrayManager:s}=this;let l=o.indices;if(!l||!e)return;let c=i;const u=f.mD(e,this.positionSize,this.opts.preproject,this.opts.full3d);l=s.allocate(l,i+u.length,{copy:!0});for(let d=0;d2?a[l*o+2]:0;i[3*s]=e,i[3*s+1]=t,i[3*s+2]=n}}_updateVertexValid(e,t){let{vertexStart:n,geometrySize:r}=t;const{positionSize:i}=this,o=this.attributes.vertexValid,a=e&&f.Gd(e);if(e&&e.edgeTypes?o.set(e.edgeTypes,n):o.fill(1,n,n+r),a)for(let s=0;s0&&!Number.isFinite(e[0])}const v="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nstruct PolygonProps {\n vec4 fillColors;\n vec4 lineColors;\n vec3 positions;\n vec3 nextPositions;\n vec3 pickingColors;\n vec3 positions64Low;\n vec3 nextPositions64Low;\n float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n return normalize(vector * project_uCommonUnitsPerWorldUnit);\n }\n return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n#ifdef IS_SIDE_VERTEX\n if(vertexValid < 0.5){\n gl_Position = vec4(0.);\n return;\n }\n#endif\n\n vec3 pos;\n vec3 pos64Low;\n vec3 normal;\n vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n geometry.worldPosition = props.positions;\n geometry.worldPositionAlt = props.nextPositions;\n geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n#else\n pos = props.positions;\n pos64Low = props.positions64Low;\n#endif\n\n if (extruded) {\n pos.z += props.elevations * vertexPositions.y * elevationScale;\n }\n gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n if (extruded) {\n #ifdef IS_SIDE_VERTEX\n normal = vec3(\n props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n 0.0);\n normal = project_offset_normal(normal);\n #else\n normal = project_normal(vec3(0.0, 0.0, 1.0));\n #endif\n geometry.normal = normal;\n vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n vColor = vec4(lightColor, colors.a * opacity);\n } else {\n vColor = vec4(colors.rgb, colors.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",y="#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n".concat(v,"\n\nvoid main(void) {\n PolygonProps props;\n\n props.positions = positions;\n props.positions64Low = positions64Low;\n props.elevations = elevations;\n props.fillColors = fillColors;\n props.lineColors = lineColors;\n props.pickingColors = pickingColors;\n\n calculatePosition(props);\n}\n"),b="#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n".concat(v,"\n\nvoid main(void) {\n PolygonProps props;\n\n #if RING_WINDING_ORDER_CW == 1\n props.positions = instancePositions;\n props.positions64Low = instancePositions64Low;\n props.nextPositions = nextPositions;\n props.nextPositions64Low = nextPositions64Low;\n #else\n props.positions = nextPositions;\n props.positions64Low = nextPositions64Low;\n props.nextPositions = instancePositions;\n props.nextPositions64Low = instancePositions64Low;\n #endif\n props.elevations = instanceElevations;\n props.fillColors = instanceFillColors;\n props.lineColors = instanceLineColors;\n props.pickingColors = instancePickingColors;\n\n calculatePosition(props);\n}\n"),_=[0,0,0,255],w={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,_windingOrder:"CW",_full3d:!1,elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:e=>e.polygon},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:_},getLineColor:{type:"accessor",value:_},material:!0},x={enter:(e,t)=>t.length?t.subarray(t.length-e.length):e};class E extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(e){return super.getShaders({vs:"top"===e?y:b,fs:"#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",defines:{RING_WINDING_ORDER_CW:this.props._normalize||"CCW"!==this.props._windingOrder?1:0},modules:[o.Z,a.N,s.Z]})}get wrapLongitude(){return!1}initializeState(){const{gl:e,viewport:t}=this.context;let{coordinateSystem:n}=this.props;const{_full3d:r}=this.props;let i;t.isGeospatial&&n===l.Df.DEFAULT&&(n=l.Df.LNGLAT),n===l.Df.LNGLAT&&(i=r?t.projectPosition.bind(t):t.projectFlat.bind(t)),this.setState({numInstances:0,polygonTesselator:new m({preproject:i,fp64:this.use64bitPositions(),IndexType:!e||(0,c.ag)(e,u.h.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});const o=this.getAttributeManager(),a=!0;o.remove(["instancePickingColors"]),o.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:a},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:x,accessor:"getPolygon",update:this.calculatePositions,noAlloc:a,shaderAttributes:{positions:{vertexOffset:0,divisor:0},instancePositions:{vertexOffset:0,divisor:1},nextPositions:{vertexOffset:1,divisor:1}}},vertexValid:{size:1,divisor:1,type:5121,update:this.calculateVertexValid,noAlloc:a},elevations:{size:1,transition:x,accessor:"getElevation",shaderAttributes:{elevations:{divisor:0},instanceElevations:{divisor:1}}},fillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:x,accessor:"getFillColor",defaultValue:_,shaderAttributes:{fillColors:{divisor:0},instanceFillColors:{divisor:1}}},lineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:x,accessor:"getLineColor",defaultValue:_,shaderAttributes:{lineColors:{divisor:0},instanceLineColors:{divisor:1}}},pickingColors:{size:3,type:5121,accessor:(e,t)=>{let{index:n,target:r}=t;return this.encodePickingColor(e&&e.__source?e.__source.index:n,r)},shaderAttributes:{pickingColors:{divisor:0},instancePickingColors:{divisor:1}}}})}getPickingInfo(e){const t=super.getPickingInfo(e),{index:n}=t,{data:r}=this.props;return r[0]&&r[0].__source&&(t.object=r.find((e=>e.__source.index===n))),t}disablePickingIndex(e){const{data:t}=this.props;if(t[0]&&t[0].__source)for(let n=0;ne.delete())),this.setState(this._getModels(this.context.gl)),i.invalidateAll())}updateGeometry(e){let{props:t,oldProps:n,changeFlags:r}=e;if(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getPolygon)){const{polygonTesselator:e}=this.state,n=t.data.attributes||{};e.updateGeometry({data:t.data,normalize:t._normalize,geometryBuffer:n.getPolygon,buffers:n,getGeometry:t.getPolygon,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:r.dataChanged,full3d:t._full3d}),this.setState({numInstances:e.instanceCount,startIndices:e.vertexStarts}),r.dataChanged||this.getAttributeManager().invalidateAll()}}_getModels(e){const{id:t,filled:n,extruded:r}=this.props;let i,o;if(n){const n=this.getShaders("top");n.defines.NON_INSTANCED_MODEL=1,i=new d.Z(e,{...n,id:"".concat(t,"-top"),drawMode:4,attributes:{vertexPositions:new Float32Array([0,1])},uniforms:{isWireframe:!1,isSideVertex:!1},vertexCount:0,isIndexed:!0})}return r&&(o=new d.Z(e,{...this.getShaders("side"),id:"".concat(t,"-side"),geometry:new h.Z({drawMode:1,vertexCount:4,attributes:{vertexPositions:{size:2,value:new Float32Array([1,0,0,0,0,1,1,1])}}}),instanceCount:0,isInstanced:1}),o.userData.excludeAttributes={indices:!0}),{models:[o,i].filter(Boolean),topModel:i,sideModel:o}}calculateIndices(e){const{polygonTesselator:t}=this.state;e.startIndices=t.indexStarts,e.value=t.get("indices")}calculatePositions(e){const{polygonTesselator:t}=this.state;e.startIndices=t.vertexStarts,e.value=t.get("positions")}calculateVertexValid(e){e.value=this.state.polygonTesselator.get("vertexValid")}}(0,r.Z)(E,"defaultProps",w),(0,r.Z)(E,"layerName","SolidPolygonLayer")},55788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,padding:{type:"array",value:[0,0,0,0]},getPosition:{type:"accessor",value:e=>e.position},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},getBoundingRect:{type:"accessor",value:[0,0,0,0]},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:[0,0,0,255]},getLineWidth:{type:"accessor",value:1}};class d extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME text-background-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceRects;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec2 instancePixelOffsets;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform bool billboard;\nuniform float opacity;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform vec4 padding;\nuniform int sizeUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = radians(angle);\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n vLineWidth = instanceLineWidths;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits),\n sizeMinPixels, sizeMaxPixels\n );\n\n dimensions = instanceRects.zw * sizePixels + padding.xy + padding.zw;\n\n vec2 pixelOffset = (positions * instanceRects.zw + instanceRects.xy) * sizePixels + mix(-padding.xy, padding.zw, positions);\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles);\n pixelOffset += instancePixelOffsets;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME text-background-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool stroked;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec2 pixelPosition = uv * dimensions;\n if (stroked) {\n float distToEdge = min(\n min(pixelPosition.x, dimensions.x - pixelPosition.x),\n min(pixelPosition.y, dimensions.y - pixelPosition.y)\n );\n float isBorder = smoothedge(distToEdge, vLineWidth);\n gl_FragColor = mix(vFillColor, vLineColor, isBorder);\n } else {\n gl_FragColor = vFillColor;\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instanceRects:{size:4,accessor:"getBoundingRect"},instancePixelOffsets:{size:2,transition:!0,accessor:"getPixelOffset"},instanceFillColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(e){super.updateState(e);const{changeFlags:t}=e;if(t.extensionsChanged){var n;const{gl:e}=this.context;null===(n=this.state.model)||void 0===n||n.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{billboard:n,sizeScale:r,sizeUnits:i,sizeMinPixels:o,sizeMaxPixels:a,getLineWidth:l}=this.props;let{padding:c}=this.props;c.length<4&&(c=[c[0],c[1],c[0],c[1]]),this.state.model.setUniforms(t).setUniforms({billboard:n,stroked:Boolean(l),padding:c,sizeUnits:s.iI[i],sizeScale:r,sizeMinPixels:o,sizeMaxPixels:a}).draw()}_getModel(e){return new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:6,vertexCount:4,attributes:{positions:{size:2,value:new Float32Array([0,0,1,0,1,1,0,1])}}}),isInstanced:!0})}}(0,r.Z)(d,"defaultProps",u),(0,r.Z)(d,"layerName","TextBackgroundLayer")},34929:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(68185),i=n(32603),o=n(65148),a=n(39179),s=n(90286);const l=.75,c=[];class u extends s.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(){return{...super.getShaders(),fs:"#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float gamma;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform float sdfBuffer;\nuniform float outlineBuffer;\nuniform vec4 outlineColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n if (!picking_uActive) {\n float alpha = texture2D(iconsTexture, vTextureCoords).a;\n vec4 color = vColor;\n if (sdf) {\n float distance = alpha;\n alpha = smoothstep(sdfBuffer - gamma, sdfBuffer + gamma, distance);\n\n if (outlineBuffer > 0.0) {\n float inFill = alpha;\n float inBorder = smoothstep(outlineBuffer - gamma, outlineBuffer + gamma, distance);\n color = mix(outlineColor, vColor, inFill);\n alpha = inBorder;\n }\n }\n float a = alpha * color.a;\n \n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color.rgb, a * opacity);\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"}}initializeState(){super.initializeState();this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:(e,t)=>{let{index:n,target:r}=t;return this.encodePickingColor(n,r)}}})}updateState(e){super.updateState(e);const{props:t,oldProps:n}=e;let{outlineColor:r}=t;r!==n.outlineColor&&(r=r.map((e=>e/255)),r[3]=Number.isFinite(r[3])?r[3]:1,this.setState({outlineColor:r})),!t.sdf&&t.outlineWidth&&o.Z.warn("".concat(this.id,": fontSettings.sdf is required to render outline"))()}draw(e){const{sdf:t,smoothing:n,outlineWidth:r}=this.props,{outlineColor:i}=this.state,o=r?Math.max(n,l*(1-r)):-1;if(e.uniforms={...e.uniforms,sdfBuffer:l,outlineBuffer:o,gamma:n,sdf:Boolean(t),outlineColor:i},super.draw(e),t&&r){const{iconManager:e}=this.state;e.getTexture()&&this.state.model.draw({uniforms:{outlineBuffer:l}})}}getInstanceOffset(e){return e?Array.from(e).flatMap((e=>super.getInstanceOffset(e))):c}getInstanceColorMode(e){return 1}getInstanceIconFrame(e){return e?Array.from(e).flatMap((e=>super.getInstanceIconFrame(e))):c}}(0,r.Z)(u,"defaultProps",{getIconOffsets:{type:"accessor",value:e=>e.offsets},alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}}),(0,r.Z)(u,"layerName","MultiIconLayer");const d=1e20;class h{constructor(){let{fontSize:e=24,buffer:t=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.buffer=t,this.cutoff=r,this.radius=n;const s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font="".concat(a," ").concat(o," ").concat(e,"px ").concat(i),c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(e),a=Math.ceil(n),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o-i))),l=Math.min(this.size-this.buffer,a+Math.ceil(r)),c=s+2*this.buffer,u=l+2*this.buffer,h=Math.max(c*u,0),p=new Uint8ClampedArray(h),g={data:p,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return g;const{ctx:m,buffer:A,gridInner:v,gridOuter:y}=this;m.clearRect(A,A,s,l),m.fillText(e,A,A+a);const b=m.getImageData(A,A,s,l);y.fill(d,0,h),v.fill(0,0,h);for(let f=0;f0?e*e:0,v[n]=e<0?e*e:0}}f(y,0,0,c,u,c,this.f,this.v,this.z),f(v,A,A,s,l,c,this.f,this.v,this.z);for(let d=0;d-1);l++,o[l]=s,a[l]=c,a[l+1]=d}for(let s=0,l=0;sr&&(a4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;void 0===o&&(o=e.length);const a=[];return"break-all"===t?y(e,i,o,n,r,a):function(e,t,n,r,i,o){let a=t,s=t,l=t,c=0;for(let u=t;us){let t=v(e,s,l,i);c+t>r&&(ar&&(t=y(e,s,l,r,i,o),a=o[o.length-1])),s=l,c+=t}}(e,i,o,n,r,a),a}function _(e,t,n,r,i,a){let s=0,l=0;for(let c=t;c0&&void 0!==arguments[0]?arguments[0]:5;(0,r.Z)(this,"limit",void 0),(0,r.Z)(this,"_cache",{}),(0,r.Z)(this,"_order",[]),this.limit=e}get(e){const t=this._cache[e];return t&&(this._deleteOrder(e),this._appendOrder(e)),t}set(e,t){this._cache[e]?(this.delete(e),this._cache[e]=t,this._appendOrder(e)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[e]=t,this._appendOrder(e))}delete(e){this._cache[e]&&(delete this._cache[e],this._deleteOrder(e))}_deleteOrder(e){const t=this._order.indexOf(e);t>=0&&this._order.splice(t,1)}_appendOrder(e){this._order.push(e)}}const x={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:function(){const e=[];for(let t=32;t<128;t++)e.push(String.fromCharCode(t));return e}(),fontSize:64,buffer:4,sdf:!1,cutoff:.25,radius:12,smoothing:.1};let E=new w(3);function S(e,t){for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.props,e),this._key=this._getKey();const t=function(e,t){let n;n="string"===typeof t?new Set(Array.from(t)):new Set(t);const r=E.get(e);if(!r)return n;for(const i in r.mapping)n.has(i)&&n.delete(i);return n}(this._key,this.props.characterSet),n=E.get(this._key);if(n&&0===t.size)return void(this._atlas!==n&&(this._atlas=n));const r=this._generateFontAtlas(t,n);this._atlas=r,E.set(this._key,r)}_generateFontAtlas(e,t){const{fontFamily:n,fontWeight:r,fontSize:i,buffer:o,sdf:a,radius:s,cutoff:l}=this.props;let c=t&&t.data;c||(c=document.createElement("canvas"),c.width=1024);const u=c.getContext("2d",{willReadFrequently:!0});C(u,n,i,r);const{mapping:d,canvasHeight:f,xOffset:p,yOffset:g}=function(e){let{characterSet:t,getFontWidth:n,fontHeight:r,buffer:i,maxCanvasWidth:o,mapping:a={},xOffset:s=0,yOffset:l=0}=e,c=0,u=s;const d=r+2*i;for(const h of t)if(!a[h]){const e=n(h);u+e+2*i>o&&(u=0,c++),a[h]={x:u+i,y:l+c*d+i,width:e,height:d,layoutWidth:e,layoutHeight:r},u+=e+2*i}return{mapping:a,xOffset:u,yOffset:l+c*d,canvasHeight:A(l+(c+1)*d)}}({getFontWidth:e=>u.measureText(e).width,fontHeight:1.2*i,buffer:o,characterSet:e,maxCanvasWidth:1024,...t&&{mapping:t.mapping,xOffset:t.xOffset,yOffset:t.yOffset}});if(c.height!==f){const e=u.getImageData(0,0,c.width,c.height);c.height=f,u.putImageData(e,0,0)}if(C(u,n,i,r),a){const t=new h({fontSize:i,buffer:o,radius:s,cutoff:l,fontFamily:n,fontWeight:"".concat(r)});for(const n of e){const{data:e,width:r,height:o,glyphTop:a}=t.draw(n);d[n].width=r,d[n].layoutOffsetY=.9*i-a;const s=u.createImageData(r,o);S(e,s),u.putImageData(s,d[n].x,d[n].y)}}else for(const h of e)u.fillText(h,d[h].x,d[h].y+o+.9*i);return{xOffset:p,yOffset:g,mapping:d,data:c,width:c.width,height:c.height}}_getKey(){const{fontFamily:e,fontWeight:t,fontSize:n,buffer:r,sdf:i,radius:o,cutoff:a}=this.props;return i?"".concat(e," ").concat(t," ").concat(n," ").concat(r," ").concat(o," ").concat(a):"".concat(e," ").concat(t," ").concat(n," ").concat(r)}}var T=n(55788);const M={start:1,middle:0,end:-1},k={top:1,center:0,bottom:-1},R=[0,0,0,255],O={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,background:!1,getBackgroundColor:{type:"accessor",value:[255,255,255,255]},getBorderColor:{type:"accessor",value:R},getBorderWidth:{type:"accessor",value:0},backgroundPadding:{type:"array",value:[0,0,0,0]},characterSet:{type:"object",value:x.characterSet},fontFamily:x.fontFamily,fontWeight:x.fontWeight,lineHeight:1,outlineWidth:{type:"number",value:0,min:0},outlineColor:{type:"color",value:R},fontSettings:{type:"object",value:{},compare:1},wordBreak:"break-word",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:e=>e.text},getPosition:{type:"accessor",value:e=>e.position},getColor:{type:"accessor",value:R},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]},backgroundColor:{deprecatedFor:["background","getBackgroundColor"]}};class I extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"getBoundingRect",((e,t)=>{let{size:[n,r]}=this.transformParagraph(e,t);const{fontSize:i}=this.state.fontAtlasManager.props;n/=i,r/=i;const{getTextAnchor:o,getAlignmentBaseline:a}=this.props;return[(M["function"===typeof o?o(e,t):o]-1)*n/2,(k["function"===typeof a?a(e,t):a]-1)*r/2,n,r]})),(0,r.Z)(this,"getIconOffsets",((e,t)=>{const{getTextAnchor:n,getAlignmentBaseline:r}=this.props,{x:i,y:o,rowWidth:a,size:[s,l]}=this.transformParagraph(e,t),c=M["function"===typeof n?n(e,t):n],u=k["function"===typeof r?r(e,t):r],d=i.length,h=new Array(2*d);let f=0;for(let p=0;p0&&o.Z.warn("v8.9 breaking change: TextLayer maxWidth is now relative to text size")()}updateState(e){const{props:t,oldProps:n,changeFlags:r}=e;(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getText))&&this._updateText();(this._updateFontAtlas()||t.lineHeight!==n.lineHeight||t.wordBreak!==n.wordBreak||t.maxWidth!==n.maxWidth)&&this.setState({styleVersion:this.state.styleVersion+1})}getPickingInfo(e){let{info:t}=e;return t.object=t.index>=0?this.props.data[t.index]:null,t}_updateFontAtlas(){const{fontSettings:e,fontFamily:t,fontWeight:n}=this.props,{fontAtlasManager:r,characterSet:i}=this.state,o={...e,characterSet:i,fontFamily:t,fontWeight:n};if(!r.mapping)return r.setProps(o),!0;for(const a in o)if(o[a]!==r.props[a])return r.setProps(o),!0;return!1}_updateText(){var e;const{data:t,characterSet:n}=this.props,r=null===(e=t.attributes)||void 0===e?void 0:e.getText;let i,{getText:o}=this.props,s=t.startIndices;const l="auto"===n&&new Set;if(r&&s){const{texts:e,characterCount:n}=function(e){let{value:t,length:n,stride:r,offset:i,startIndices:o,characterSet:a}=e;const s=t.BYTES_PER_ELEMENT,l=r?r/s:1,c=i?i/s:0,u=o[n]||Math.ceil((t.length-c)/l),d=a&&new Set,h=new Array(n);let f=t;if(l>1||c>0){f=new(0,t.constructor)(u);for(let e=0;e{let{index:r}=n;return e[r]}}else{const{iterable:e,objectInfo:n}=(0,a.jB)(t);s=[0],i=0;for(const t of e){n.index++;const e=Array.from(o(t,n)||"");l&&e.forEach(l.add,l),i+=e.length,s.push(i)}}this.setState({getText:o,startIndices:s,numInstances:i,characterSet:l||n})}transformParagraph(e,t){const{fontAtlasManager:n}=this.state,r=n.mapping,i=this.state.getText,{wordBreak:o,lineHeight:a,maxWidth:s}=this.props;return function(e,t,n,r,i){const o=Array.from(e),a=o.length,s=new Array(a),l=new Array(a),c=new Array(a),u=("break-word"===n||"break-all"===n)&&isFinite(r)&&r>0,d=[0,0],h=[0,0];let f=0,p=0,g=0;for(let v=0;v<=a;v++){const e=o[v];if("\n"!==e&&v!==a||(g=v),g>p){const e=u?b(o,n,r,i,p,g):m;for(let n=0;n<=e.length;n++){const r=0===n?p:e[n-1],a=n=3,"Invalid cache limit"),E=new w(e)}(e)}}(0,r.Z)(I,"defaultProps",O),(0,r.Z)(I,"layerName","TextLayer")},63962:(e,t,n)=>{"use strict";function r(e){let{data:t,getIndex:n,dataRange:r,replace:i}=e;const{startRow:o=0,endRow:a=1/0}=r,s=t.length;let l=s,c=s;for(let h=0;hh&&e>=o&&(l=h),e>=a){c=h;break}}let u=l;const d=c-l!==i.length?t.slice(c):void 0;for(let h=0;hr})},91986:(e,t,n)=>{"use strict";n.d(t,{$G:()=>yo});var r=n(53104),i=n(58521),o=n(79463),a=n(21503),s=n(44548),l=n(16621);class c extends r.Z{constructor(e){super(e)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME animated-flow-lines-layer-vertex-shader\n#define SPEED 0.015\n#define NUM_PARTS 5.0\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instancePickable;\nattribute float instanceStaggering;\n\nuniform float opacity;\nuniform float currentTime;\nuniform float thicknessUnit;\n \nvarying vec4 vColor;\nvarying float sourceToTarget;\nvarying vec2 uv;\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n // Position\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(instanceSourcePositions, instanceSourcePositions64Low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(instanceTargetPositions, instanceTargetPositions64Low, vec3(0.), target_commonspace);\n\n float widthPixels = instanceWidths * thicknessUnit;\n \n \n // linear interpolation of source & target to pick right coord\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n if (instancePickable > 0.5) {\n geometry.pickingColor = instancePickingColors;\n }\n \n // extrude\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Color\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n sourceToTarget = positions.x * length(source - target) * NUM_PARTS - currentTime * SPEED + instanceStaggering; \n}\n",fs:"#define SHADER_NAME animated-flow-lines-layer-fragment-shader\n\nprecision highp float;\n\nuniform float animationTailLength;\n\nvarying vec4 vColor;\nvarying float sourceToTarget;\nvarying vec2 uv;\n \nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vec4(vColor.xyz, vColor.w * smoothstep(1.0 - animationTailLength, 1.0, fract(sourceToTarget)));\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z],shaderCache:this.context.shaderCache})}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:a.Z.DOUBLE,transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:a.Z.DOUBLE,transition:!0,accessor:"getTargetPosition"},instanceColors:{size:4,type:a.Z.UNSIGNED_BYTE,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getThickness",defaultValue:1},instanceStaggering:{accessor:"getStaggering",size:1,transition:!1},instancePickable:{accessor:"getPickable",size:1,transition:!1}})}getNeedsRedraw(){return!0}updateState(e){let{props:t,oldProps:n,changeFlags:r}=e;var i;if(super.updateState({props:t,oldProps:n,changeFlags:r}),r.extensionsChanged){const{gl:e}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{thicknessUnit:n,animationTailLength:r}=this.props,i=Date.now()/1e3%90/90*1800;this.state.model.setUniforms(Object.assign(Object.assign({},t),{thicknessUnit:4*n,animationTailLength:r,currentTime:i})).draw()}_getModel(e){return new s.Z(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new l.Z({drawMode:a.Z.TRIANGLE_STRIP,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0}))}}c.defaultProps={currentTime:0,animationTailLength:.7,getSourcePosition:{type:"accessor",value:e=>[0,0]},getTargetPosition:{type:"accessor",value:e=>[0,0]},getPickable:{type:"accessor",value:e=>1},getStaggering:{type:"accessor",value:(e,t)=>{let{index:n}=t;return Math.random()}},getColor:{type:"accessor",value:[0,132,193,255]},getThickness:{type:"accessor",value:1},thicknessUnit:30,parameters:{depthTest:!1}};const u=c,d=[1,0,0,1,2,-3,1,1,-3,1,0,0,1,1,-3,0,1,0,1,0,0,0,1,0,0,0,0];const h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];class f extends r.Z{constructor(e){super(e)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME flow-line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\nattribute vec4 instanceColors;\nattribute float instanceThickness; // 0..0.5\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute vec2 instanceEndpointOffsets;\nattribute float instancePickable;\n\nuniform vec4 outlineColor;\nuniform float thicknessUnit;\nuniform float gap;\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n \n // Position\n vec4 source_commonspace; \n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(instanceSourcePositions, instanceSourcePositions64Low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(instanceTargetPositions, instanceTargetPositions64Low, vec3(0.), target_commonspace);\n\n // linear interpolation of source & target to pick right coord\n float sourceOrTarget = positions.x;\n geometry.position = mix(source_commonspace, target_commonspace, sourceOrTarget);\n uv = positions.xy;\n geometry.uv = uv;\n if (instancePickable > 0.5) {\n geometry.pickingColor = instancePickingColors;\n }\n \n // set the clamp limits in pixel size \n float lengthCommon = length(target_commonspace - source_commonspace); \n vec2 offsetDistances = project_pixel_size(positions.yz) * thicknessUnit;\n \n vec2 limitedOffsetDistances = clamp( \n project_pixel_size(positions.yz) * thicknessUnit,\n -lengthCommon*.8, lengthCommon*.8\n );\n float startOffsetCommon = project_pixel_size(instanceEndpointOffsets[0]);\n float endOffsetCommon = project_pixel_size(instanceEndpointOffsets[1]);\n float endpointOffset = mix(\n clamp(startOffsetCommon, 0.0, lengthCommon*.2),\n -clamp(endOffsetCommon, 0.0, lengthCommon*.2),\n positions.x\n );\n\n vec2 flowlineDir = normalize(target_commonspace.xy - source_commonspace.xy);\n vec2 perpendicularDir = vec2(-flowlineDir.y, flowlineDir.x);\n vec2 normalsCommon = project_pixel_size(normals.xy);\n float gapCommon = project_pixel_size(gap);\n vec3 offsetCommon = vec3(\n flowlineDir * (instanceThickness * limitedOffsetDistances[1] + normalsCommon.y + endpointOffset * 1.05) -\n perpendicularDir * (instanceThickness * limitedOffsetDistances[0] + gapCommon + normalsCommon.x),\n 0.0\n );\n \n DECKGL_FILTER_SIZE(offsetCommon, geometry);\n vec4 position_commonspace = mix(source_commonspace, target_commonspace, sourceOrTarget);\n vec4 offset_commonspace = vec4(offsetCommon, 0.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace + offset_commonspace);\n \n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n \n vec4 fillColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n vColor = mix(fillColor, vec4(outlineColor.xyz, outlineColor.w * fillColor.w), normals.z);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME flow-line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n if (vColor.a == 0.0) {\n discard;\n }\n\n geometry.uv = uv;\n gl_FragColor = vColor;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z],shaderCache:this.context.shaderCache})}initializeState(){const{attributeManager:e}=this.state;e.addInstanced({instanceSourcePositions:{accessor:"getSourcePosition",size:3,transition:!1,type:a.Z.DOUBLE},instanceTargetPositions:{accessor:"getTargetPosition",size:3,transition:!1,type:a.Z.DOUBLE},instanceThickness:{accessor:"getThickness",size:1,transition:!1},instanceEndpointOffsets:{accessor:"getEndpointOffsets",size:2,transition:!1},instanceColors:{accessor:"getColor",size:4,type:a.Z.UNSIGNED_BYTE,transition:!1},instancePickable:{accessor:"getPickable",size:1,transition:!1}})}updateState(e){let{props:t,oldProps:n,changeFlags:r}=e;if(super.updateState({props:t,oldProps:n,changeFlags:r}),r.extensionsChanged){const{gl:e}=this.context;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(e)}),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{gl:n}=this.context,{outlineColor:r,thicknessUnit:i}=this.props;n.lineWidth(1),this.state.model.setUniforms(Object.assign(Object.assign({},t),{outlineColor:r.map((e=>e/255)),thicknessUnit:2*i,gap:.5})).draw()}_getModel(e){let t=[],n=[];const{drawOutline:r,outlineThickness:i}=this.props;if(r){t=t.concat(d);const e=i,r=1;n=n.concat(function(e,t){return[-t,2*e,1,2*e,-e,1,e,-e,1,-t,2*e,1,e,-e,1,e,-e,1,-t,2*e,1,e,-e,1,-t,-e,1]}(e,r))}return t=t.concat(d),n=n.concat(h),new s.Z(e,Object.assign(Object.assign({id:this.props.id},this.getShaders()),{geometry:new l.Z({drawMode:a.Z.TRIANGLES,attributes:{positions:new Float32Array(t),normals:new Float32Array(n)}}),isInstanced:!0,shaderCache:this.context.shaderCache}))}}f.layerName="FlowLinesLayer",f.defaultProps={getSourcePosition:{type:"accessor",value:e=>[0,0]},getTargetPosition:{type:"accessor",value:e=>[0,0]},getColor:{type:"accessor",value:[0,132,193,255]},getThickness:{type:"accessor",value:e=>e.count},getPickable:{type:"accessor",value:e=>1},drawOutline:!0,thicknessUnit:12,outlineThickness:1,outlineColor:[255,255,255,255],parameters:{depthTest:!1}};const p=f,g=[0,0,0,255];class m extends r.Z{constructor(e){super(e)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME flow-circles-layer-vertex-shader\n#define radiusScale 100\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceInRadius;\nattribute float instanceOutRadius;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform vec4 emptyColor;\nuniform float outlineEmptyMix;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float unitInRadius;\nvarying float unitOutRadius;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n float outerRadiusPixels = max(instanceInRadius, instanceOutRadius);\n unitInRadius = instanceInRadius / outerRadiusPixels; \n unitOutRadius = instanceOutRadius / outerRadiusPixels; \n\n // position on the containing square in [-1, 1] space\n unitPosition = positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n \n // Find the center of the point and add the current vertex\n vec3 offset = positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n \n // Apply opacity to instance color, or return instance picking color\n vColor = vec4(instanceColors.rgb / 255., instanceColors.a / 255. * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME flow-circles-layer-fragment-shader\n#define SOFT_OUTLINE 0.05\n#define EPS 0.05\nprecision highp float;\n\nuniform vec4 emptyColor;\nuniform float outlineEmptyMix;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float unitInRadius;\nvarying float unitOutRadius;\n\nfloat when_gt(float x, float y) {\n return max(sign(x - y), 0.0);\n}\n\nvoid main(void) {\n geometry.uv = unitPosition;\n float distToCenter = length(unitPosition);\n if (distToCenter > 1.0) {\n discard;\n }\n\n // See https://stackoverflow.com/questions/47285778\n vec4 ringColor = mix(\n emptyColor / 255., vColor,\n when_gt(unitInRadius, unitOutRadius)\n );\n vec4 outlineColor = mix(\n mix(vColor, emptyColor / 255., outlineEmptyMix),\n vColor,\n when_gt(unitInRadius, unitOutRadius)\n );\n \n float innerR = min(unitInRadius, unitOutRadius) * (1.0 - SOFT_OUTLINE);\n \n // Inner circle\n float step2 = innerR - 2.0 * EPS; \n float step3 = innerR - EPS;\n \n // Ring\n float step4 = innerR;\n // float step5 = 1.0 - SOFT_OUTLINE - EPS;\n // float step6 = 1.0 - SOFT_OUTLINE;\n float step5 = 1.0 - 5.0 * EPS;\n float step6 = 1.0;\n \n gl_FragColor = vColor;\n gl_FragColor = mix(gl_FragColor, emptyColor / 255., smoothstep(step2, step3, distToCenter));\n gl_FragColor = mix(gl_FragColor, ringColor, smoothstep(step3, step4, distToCenter));\n gl_FragColor = mix(gl_FragColor, outlineColor, smoothstep(step5, step6, distToCenter));\n // gl_FragColor = mix(gl_FragColor, emptyColor / 255., smoothstep(step6, 1.0, distToCenter));\n gl_FragColor.a = vColor.a;\n gl_FragColor.a *= smoothstep(0.0, SOFT_OUTLINE, 1.0 - distToCenter);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:a.Z.DOUBLE,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceInRadius:{size:1,transition:!0,accessor:"getInRadius",defaultValue:1},instanceOutRadius:{size:1,transition:!0,accessor:"getOutRadius",defaultValue:1},instanceColors:{size:4,transition:!0,type:a.Z.UNSIGNED_BYTE,accessor:"getColor",defaultValue:g}})}updateState(e){let{props:t,oldProps:n,changeFlags:r}=e;if(super.updateState({props:t,oldProps:n,changeFlags:r}),r.extensionsChanged){const{gl:e}=this.context;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(e)}),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{emptyColor:n,outlineEmptyMix:r}=this.props;this.state.model.setUniforms(Object.assign(Object.assign({},t),{emptyColor:n,outlineEmptyMix:r})).draw()}_getModel(e){return new s.Z(e,Object.assign(this.getShaders(),{id:this.props.id,geometry:new l.Z({drawMode:a.Z.TRIANGLE_FAN,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0}))}}m.layerName="FlowCirclesLayer",m.defaultProps={getColor:{type:"accessor",value:g},emptyColor:{type:"accessor",value:[255,255,255,255]},outlineEmptyMix:{type:"accessor",value:.4},getPosition:{type:"accessor",value:e=>e.position},getInRadius:{type:"accessor",value:1},getOutRadius:{type:"accessor",value:1},parameters:{depthTest:!1}};const A=m;var v,y=n(32603),b=n(99259),_=n(34929);function w(e){const{children:t}=e;return t&&t.length>0}function x(e){const{zoom:t}=e;return void 0!==t}function E(e){return e&&!!e.aggregate}function S(e){for(var t=e.length/6|0,n=new Array(t),r=0;r(0,C.hD)(e[e.length-1]);var T=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(S);P(T);var M=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(S);P(M);var k=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(S);P(k);var R=n(15917),O=n(22732),I=n(96153),L=-.14861,D=1.78277,N=-.29227,F=-.90649,j=1.97294,B=j*F,z=j*D,Z=D*N-F*L;function U(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof H)return new H(e.h,e.s,e.l,e.opacity);e instanceof O.Ss||(e=(0,O.SU)(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Z*r+B*t-z*n)/(Z+B-z),o=r-i,a=(j*(n-i)-N*o)/F,s=Math.sqrt(a*a+o*o)/(j*i*(1-i)),l=s?Math.atan2(a,o)*I.R-120:NaN;return new H(l<0?l+360:l,s,i,e.opacity)}(e):new H(e,t,n,null==r?1:r)}function H(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}(0,R.Z)(H,U,(0,R.l)(O.Il,{brighter(e){return e=null==e?O.J5:Math.pow(O.J5,e),new H(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?O.xV:Math.pow(O.xV,e),new H(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*I.u,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new O.Ss(255*(t+n*(L*r+D*i)),255*(t+n*(N*r+F*i)),255*(t+n*(j*r)),this.opacity)}}));var V=n(60265);function G(e){return function t(n){function r(t,r){var i=e((t=U(t)).h,(r=U(r)).h),o=(0,V.ZP)(t.s,r.s),a=(0,V.ZP)(t.l,r.l),s=(0,V.ZP)(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}G(V.wx);var W=G(V.ZP),q=W(U(-100,.75,.35),U(80,1.5,.8)),Y=W(U(260,.75,.35),U(80,1.5,.8));U();var X=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(S);P(X);var K=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(S);P(K);var Q=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(S);P(Q);function $(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const J=$(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var ee=$(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),te=$(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ne=$(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),re=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(S);P(re);var ie=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(S);P(ie);var oe=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(S);P(oe);var ae=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(S);P(ae);var se=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(S);P(se);var le=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(S);P(le);var ce=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(S);P(ce);var ue=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(S);P(ue);var de=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(S);P(de);var he=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(S);P(he);var fe=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(S);P(fe);var pe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(S);P(pe);var ge=n(88406),me=n(92429),Ae=n(28458),ve=n(82620),ye=n(23263),be=n(29449),_e=n(41176);function we(){var e,t,n,r,i,o=0,a=1,s=ve.yR,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(me.Z),c.rangeRound=u(Ae.Z),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function xe(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Ee(){var e=(0,be.Q)(we()(ve.yR));return e.copy=function(){return xe(e,Ee())},ye.O.apply(e,arguments)}function Se(){var e=(0,_e.Hh)(we());return e.copy=function(){return xe(e,Se()).exponent(e.exponent())},ye.O.apply(e,arguments)}var Ce=n(52719),Pe=n(15598);const Te="#fff",Me=.4,ke="rgba(240,240,240,0.5)",Re=[ke,"#137CBD"],Oe="rgba(220,220,220,0.5)",Ie=[ke,"#f6654e"],Le=[ke,"#00a9cc"],De=[255,255,255,255];function Ne(e,t){const n=(0,O.ZP)(e);if(!n)return console.warn("Invalid color: ",e),"rgba(255, 255, 255, ".concat(t,")");const r=n.rgb();return"rgba(".concat(r.r,", ").concat(r.g,", ").concat(r.b,", ").concat(t,")")}function Fe(e){if(Array.isArray(e))return e;const t=(0,O.ZP)(e);if(!t)return console.warn("Invalid color: ",e),De;const n=t.rgb();return[Math.floor(n.r),Math.floor(n.g),Math.floor(n.b),(r=t.opacity,Math.round(255*r))];var r}function je(e,t){return e?Fe(e):"string"===typeof t?Fe(t):t}const Be=e=>e[e.length-1];var ze;!function(e){e.primary="#162d3c"}(ze||(ze={}));const Ze=e=>(0,ge.Z)(0,21).map((t=>e(t/20))).reverse(),Ue="rgba(240,240,240,0.5)",He=[Ue,ze.primary],Ve=["#d1eeea","#a8dbd9","#85c4c9","#68abb8","#4f90a6","#3b738f","#2a5674"],Ge=Ve,We={Blues:Be(T),BluGrn:["#c4e6c3","#96d2a4","#6dbc90","#4da284","#36877a","#266b6e","#1d4f60"],BluYl:["#f7feae","#b7e6a5","#7ccba2","#46aea0","#089099","#00718b","#045275"],BrwnYl:["#ede5cf","#e0c2a2","#d39c83","#c1766f","#a65461","#813753","#541f3f"],BuGn:Be(M),BuPu:Be(k),Burg:["#ffc6c4","#f4a3a8","#e38191","#cc607d","#ad466c","#8b3058","#672044"],BurgYl:["#fbe6c5","#f5ba98","#ee8a82","#dc7176","#c8586c","#9c3f5d","#70284a"],Cool:Ze(Y),DarkMint:["#d2fbd4","#a5dbc2","#7bbcb0","#559c9e","#3a7c89","#235d72","#123f5a"],Emrld:["#d3f2a3","#97e196","#6cc08b","#4c9b82","#217a79","#105965","#074050"],GnBu:Be(X),Grayish:He,Greens:Be(K),Greys:Be(Q),Inferno:Ze(te),Magenta:["#f3cbd3","#eaa9bd","#dd88ac","#ca699d","#b14d8e","#91357d","#6c2167"],Magma:Ze(ee),Mint:["#e4f1e1","#b4d9cc","#89c0b6","#63a6a0","#448c8a","#287274","#0d585f"],Oranges:Be(re),OrRd:Be(ie),OrYel:["#ecda9a","#efc47e","#f3ad6a","#f7945d","#f97b57","#f66356","#ee4d5a"],Peach:["#fde0c5","#facba6","#f8b58b","#f59e72","#f2855d","#ef6a4c","#eb4a40"],Plasma:Ze(ne),PinkYl:["#fef6b5","#ffdd9a","#ffc285","#ffa679","#fa8a76","#f16d7a","#e15383"],PuBu:Be(oe),PuBuGn:Be(ae),PuRd:Be(se),Purp:["#f3e0f7","#e4c7f1","#d1afe8","#b998dd","#9f82ce","#826dba","#63589f"],Purples:Be(le),PurpOr:["#f9ddda","#f2b9c4","#e597b9","#ce78b3","#ad5fad","#834ba0","#573b88"],RdPu:Be(ce),RedOr:["#f6d2a9","#f5b78e","#f19c7c","#ea8171","#dd686c","#ca5268","#b13f64"],Reds:Be(ue),Sunset:["#f3e79b","#fac484","#f8a07e","#eb7f86","#ce6693","#a059a0","#5c53a5"],SunsetDark:["#fcde9c","#faa476","#f0746e","#e34f6f","#dc3977","#b9257a","#7c1d6f"],Teal:Ve,TealGrn:["#b0f2bc","#89e8ac","#67dba5","#4cc8a3","#38b2a3","#2c98a0","#257d98"],Viridis:Ze(J),Warm:Ze(q),YlGn:Be(de),YlGnBu:Be(he),YlOrBr:Be(fe),YlOrRd:Be(pe)},qe=(Object.keys(We),{negative:{flows:{scheme:[Ue,"#17a5be"]}},positive:{flows:{scheme:[Ue,"#f52020"]}},locationAreas:{outline:"rgba(92,112,128,0.5)",normal:"rgba(220,220,220,0.5)"},outlineColor:"rgb(230,233,237)"});function Ye(e,t,n,r,i,o,a){if(e)return qe;let s;Array.isArray(t)?s=t:(s=t&&We[t]||Ge,n&&(s=s.slice().reverse()));{const e=(0,ge.Z)(0,Math.max(10,s.length)),t=e.length-1,a=Ee((0,C.hD)(s)).domain([0,t]);if(r&&0!==o){const r=(0,_e.ZP)().exponent(1.5).domain([t,0]).range([0,2*o/100]);s=e.map(((e,t)=>{const o=a(t),s=r(t);if(null==o||null==s)return"#000";const l=(0,Pe.Uc)(o);return l.l=n?l.l-l.l*s:l.l+(100-l.l)*s,l.c=l.c-l.c*(s/4),i&&(l.opacity=l.opacity*(1-s)),l.toString()}))}else s=e.map(((e,t)=>a(t)))}return{darkMode:n,flows:{scheme:s},locationCircles:{outgoing:n?"#000":"#fff"},outlineColor:n?"#000":"rgba(255, 255, 255, 0.5)"}}function Xe(e,t,n){const r=Se(function(e){const t=Ce.Z,n=e.length;let r,i,o=new Array(n),a=new Array(n),s=new Array(n),l=new Array(n);for(r=0;rFe(r(e))}function Ke(e){return void 0!==e.positive}function Qe(e,t){const n=e&&e.normal||Oe,r=(0,Pe.Uc)(n),i=Fe(n);return{normal:i,connected:je(e&&e.connected,i),highlighted:je(e&&e.highlighted,Ne(r[t?"brighter":"darker"](1).toString(),.5)),selected:je(e&&e.selected,Ne(r[t?"brighter":"darker"](2).toString(),.8)),outline:je(e&&e.outline,Fe(r[t?"brighter":"darker"](4).toString()))}}function $e(e,t,n){var r,i,o;const a=e&&e.flows&&e.flows.scheme||t,s=(0,Pe.Uc)(a[a.length-1]),l=je(e&&e.flows&&e.flows.highlighted,Fe(s[n?"brighter":"darker"](.7).toString())),c=je(null===(r=null===e||void 0===e?void 0:e.locationCircles)||void 0===r?void 0:r.empty,n?"#000":"#fff");return{flows:{scheme:a,highlighted:l},locationCircles:{inner:je(e&&e.locationCircles&&e.locationCircles.inner,s.toString()),outgoing:je(e&&e.locationCircles&&e.locationCircles.outgoing,n?"#000":"#fff"),incoming:je(e&&e.locationCircles&&e.locationCircles.incoming,s[n?"brighter":"darker"](1.25).toString()),highlighted:je(e&&e.locationCircles&&e.locationCircles.highlighted,l),empty:c,outlineEmptyMix:null!==(o=null===(i=null===e||void 0===e?void 0:e.locationCircles)||void 0===i?void 0:i.outlineEmptyMix)&&void 0!==o?o:.4}}}function Je(e){const t=!(!e||!e.darkMode);return{darkMode:t,locationAreas:Qe(e&&e.locationAreas,t),outlineColor:Fe(e&&e.outlineColor||Te),dimmedOpacity:e&&null!=e.dimmedOpacity?e.dimmedOpacity:Me}}const et=Ye;var tt=n(52593),nt=n(42514);function rt(e,t){let n,r;if(void 0===t)for(const i of e)null!=i&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r=o&&(n=r=o):(n>o&&(n=o),r2?n-2:0),i=2;i=r.length)return n(i);const a=new ot.L,s=r[o++];let l=-1;for(const t of i){const e=s(t,++l,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(const[t,n]of a)a.set(t,e(n,o));return t(a)}(e,0)}function ct(e,t,n,r,i,o){if(i-r<=n)return;const a=r+i>>1;ut(e,t,a,r,i,o%2),ct(e,t,n,r,a-1,o+1),ct(e,t,n,a+1,i,o+1)}function ut(e,t,n,r,i,o){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);ut(e,t,n,Math.max(r,Math.floor(n-s*c/a+u)),Math.min(i,Math.floor(n+(a-s)*c/a+u)),o)}const a=t[2*n+o];let s=r,l=i;for(dt(e,t,r,n),t[2*i+o]>a&&dt(e,t,r,i);sa;)l--}t[2*r+o]===a?dt(e,t,r,l):(l++,dt(e,t,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function dt(e,t,n,r){ht(e,n,r),ht(t,2*n,2*r),ht(t,2*n+1,2*r+1)}function ht(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ft(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}const pt=e=>e[0],gt=e=>e[1];class mt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gt,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;this.nodeSize=r,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new i(2*e.length);for(let l=0;l=n&&c<=i&&u>=r&&u<=o&&l.push(e[a]);continue}const p=Math.floor((f+h)/2);c=t[2*p],u=t[2*p+1],c>=n&&c<=i&&u>=r&&u<=o&&l.push(e[p]);const g=(d+1)%2;(0===d?n<=c:r<=u)&&(s.push(f),s.push(p-1),s.push(g)),(0===d?i>=c:o>=u)&&(s.push(p+1),s.push(h),s.push(g))}return l}(this.ids,this.coords,e,t,n,r,this.nodeSize)}within(e,t,n){return function(e,t,n,r,i,o){const a=[0,e.length-1,0],s=[],l=i*i;for(;a.length;){const c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o){for(let i=d;i<=u;i++)ft(t[2*i],t[2*i+1],n,r)<=l&&s.push(e[i]);continue}const h=Math.floor((d+u)/2),f=t[2*h],p=t[2*h+1];ft(f,p,n,r)<=l&&s.push(e[h]);const g=(c+1)%2;(0===c?n-i<=f:r-i<=p)&&(a.push(d),a.push(h-1),a.push(g)),(0===c?n+i>=f:r+i>=p)&&(a.push(h+1),a.push(u),a.push(g))}return s}(this.ids,this.coords,e,t,n,this.nodeSize)}}var At="NOT_FOUND";var vt=function(e,t){return e===t};function yt(e,t){var n="object"===typeof t?t:{equalityCheck:t},r=n.equalityCheck,i=void 0===r?vt:r,o=n.maxSize,a=void 0===o?1:o,s=n.resultEqualityCheck,l=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return At}return{get:r,put:function(t,i){r(t)===At&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(a,l);function u(){var t=c.get(arguments);if(t===At){if(t=e.apply(null,arguments),s){var n=c.getEntries().find((function(e){return s(e.value,t)}));n&&(t=n.value)}c.put(arguments,t)}return t}return u.clearCache=function(){return c.clear()},u}function bt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{},makeClusterId:e=>"{[".concat(e,"]}")};function Et(e){const{index:t}=e;return null!=t}function St(e){const{id:t}=e;return null!=t}function Ct(e,t,n,r){const{getLocationLon:i,getLocationLat:o,getLocationId:a}=t,s=Object.assign(Object.assign({},xt),r),{minZoom:l,maxZoom:c,nodeSize:u,makeClusterName:d,makeClusterId:h}=s,f=new Array(c+1);let p=new Array,g=0;for(const E of e){const e=i(E),t=o(E);p.push({x:(m=e,m/360+.5),y:Rt(t),weight:n(a(E)),zoom:1/0,index:g,parentId:-1,location:E}),g++}var m;f[c+1]=new mt(p,Ot,It,u,Float32Array);let A=c+1;for(let E=c;E>=l;E--){const e=Tt(p,E,f[A],s);e.length===p.length?(f[E]=f[A],f[A]=void 0,A=E,p=e):(A=E,p=e,f[E]=new mt(p,Ot,It,u,Float32Array))}if(0===f.length)return[];const v=f.map((e=>null===e||void 0===e?void 0:e.points.length)),y=(0,nt.Z)(v.filter((e=>e>0))),b=function(e,t){const{getLocationLon:n,getLocationLat:r}=t,i=new Map;let o=0;for(const s of e){const e=n(s),t=r(s),a="".concat(e,",").concat(t),l=i.get(a);i.set(a,l?l+1:1),o++}let a=0;for(const[s,l]of i)l>1&&a++;return o-a}(e,t);let _=v.indexOf(b);b=w;E--){let e;const t=f[E];if(!t)continue;E<_&&(e=st(f[A].points,(e=>e.map((e=>e.id?h(e.id):a(e.location)))),(e=>e.parentId)));const n=[];for(const r of t.points){const{x:t,y:s,numPoints:l,location:c}=r;if(Et(r))n.push({id:a(c),zoom:E,lat:o(c),lon:i(c)});else if(St(r)){const{id:i}=r,o=e&&e.get(i);if(!o)throw new Error("Cluster ".concat(i," doesn't have children"));n.push({id:h(i),name:d(i,l),zoom:E,lat:kt(s),lon:Mt(t),children:o})}}x.push({zoom:E,nodes:n}),A=E}return x}function Pt(e,t,n,r,i){return{x:e,y:t,zoom:1/0,id:n,parentId:-1,numPoints:r,weight:i}}function Tt(e,t,n,r){const i=[],{radius:o,extent:a}=r,s=o/(a*Math.pow(2,t));for(let l=0;l1?1:n}function Ot(e){return e.x}function It(e){return e.y}var Lt=n(62145);class Dt{constructor(e){this.getLocationId=e=>x(e)?e.id:this.accessors.getLocationId(e),this.getLocationName=e=>{let t;return x(e)&&w(e)?t=e.name:this.accessors.getLocationName&&(t=this.accessors.getLocationName(e)),t||(t="".concat(this.getLocationId(e))),t},this.getLocationLat=e=>x(e)?e.lat:this.accessors.getLocationLat(e),this.getLocationLon=e=>x(e)?e.lon:this.accessors.getLocationLon(e),this.getFlowOriginId=e=>E(e)?e.origin:this.accessors.getFlowOriginId(e),this.getFlowDestId=e=>E(e)?e.dest:this.accessors.getFlowDestId(e),this.getFlowMagnitude=e=>E(e)?e.count:this.accessors.getFlowMagnitude(e),this.getFlowTime=e=>{const{getFlowTime:t}=this.accessors;return t?t(e):void 0},this.accessors=e}setAccessors(e){this.accessors=e}getFlowmapDataAccessors(){return this.accessors}}var Nt=n(1384);const Ft=function(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=new Nt.DW(Object.assign(Object.assign({},e),{width:e.width+2*t,height:e.height+2*t})).getBounds();return[n[0][0],n[0][1],n[1][0],n[1][1]]},jt=e=>{if(e)return(0,be.Z)().range([.025,.5]).domain([0,Math.max.apply(null,e.map((e=>Math.abs(e||0))))])};var Bt=new Date,zt=new Date;function Zt(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return Bt.setTime(+t),zt.setTime(+r),e(Bt),e(zt),Math.floor(n(Bt,zt))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}const Ut=1e3,Ht=6e4,Vt=36e5,Gt=864e5,Wt=6048e5;function qt(e){return Zt((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Wt}))}var Yt=qt(0),Xt=qt(1),Kt=qt(2),Qt=qt(3),$t=qt(4),Jt=qt(5),en=qt(6),tn=(Yt.range,Xt.range,Kt.range,Qt.range,$t.range,Jt.range,en.range,Zt((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Gt}),(function(e){return e.getUTCDate()-1})));const nn=tn;tn.range;function rn(e){return Zt((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ht)/Wt}))}var on=rn(0),an=rn(1),sn=rn(2),ln=rn(3),cn=rn(4),un=rn(5),dn=rn(6),hn=(on.range,an.range,sn.range,ln.range,cn.range,un.range,dn.range,Zt((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ht)/Gt),(e=>e.getDate()-1)));const fn=hn;hn.range;var pn=Zt((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));pn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Zt((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};const gn=pn;pn.range;var mn=Zt((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Zt((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};const An=mn;mn.range;function vn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function yn(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function bn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var _n,wn,xn,En={"-":"",_:" ",0:"0"},Sn=/^\s*\d+/,Cn=/^%/,Pn=/[\\^$*+?|[\]().{}]/g;function Tn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[e.toLowerCase(),t])))}function On(e,t,n){var r=Sn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function In(e,t,n){var r=Sn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ln(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Dn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Nn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Fn(e,t,n){var r=Sn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Bn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function zn(e,t,n){var r=Sn.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Zn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Un(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Hn(e,t,n){var r=Sn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Vn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Gn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function qn(e,t,n){var r=Sn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=Sn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xn(e,t,n){var r=Cn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Kn(e,t,n){var r=Sn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=Sn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function $n(e,t){return Tn(e.getDate(),t,2)}function Jn(e,t){return Tn(e.getHours(),t,2)}function er(e,t){return Tn(e.getHours()%12||12,t,2)}function tr(e,t){return Tn(1+fn.count(gn(e),e),t,3)}function nr(e,t){return Tn(e.getMilliseconds(),t,3)}function rr(e,t){return nr(e,t)+"000"}function ir(e,t){return Tn(e.getMonth()+1,t,2)}function or(e,t){return Tn(e.getMinutes(),t,2)}function ar(e,t){return Tn(e.getSeconds(),t,2)}function sr(e){var t=e.getDay();return 0===t?7:t}function lr(e,t){return Tn(on.count(gn(e)-1,e),t,2)}function cr(e){var t=e.getDay();return t>=4||0===t?cn(e):cn.ceil(e)}function ur(e,t){return e=cr(e),Tn(cn.count(gn(e),e)+(4===gn(e).getDay()),t,2)}function dr(e){return e.getDay()}function hr(e,t){return Tn(an.count(gn(e)-1,e),t,2)}function fr(e,t){return Tn(e.getFullYear()%100,t,2)}function pr(e,t){return Tn((e=cr(e)).getFullYear()%100,t,2)}function gr(e,t){return Tn(e.getFullYear()%1e4,t,4)}function mr(e,t){var n=e.getDay();return Tn((e=n>=4||0===n?cn(e):cn.ceil(e)).getFullYear()%1e4,t,4)}function Ar(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tn(t/60|0,"0",2)+Tn(t%60,"0",2)}function vr(e,t){return Tn(e.getUTCDate(),t,2)}function yr(e,t){return Tn(e.getUTCHours(),t,2)}function br(e,t){return Tn(e.getUTCHours()%12||12,t,2)}function _r(e,t){return Tn(1+nn.count(An(e),e),t,3)}function wr(e,t){return Tn(e.getUTCMilliseconds(),t,3)}function xr(e,t){return wr(e,t)+"000"}function Er(e,t){return Tn(e.getUTCMonth()+1,t,2)}function Sr(e,t){return Tn(e.getUTCMinutes(),t,2)}function Cr(e,t){return Tn(e.getUTCSeconds(),t,2)}function Pr(e){var t=e.getUTCDay();return 0===t?7:t}function Tr(e,t){return Tn(Yt.count(An(e)-1,e),t,2)}function Mr(e){var t=e.getUTCDay();return t>=4||0===t?$t(e):$t.ceil(e)}function kr(e,t){return e=Mr(e),Tn($t.count(An(e),e)+(4===An(e).getUTCDay()),t,2)}function Rr(e){return e.getUTCDay()}function Or(e,t){return Tn(Xt.count(An(e)-1,e),t,2)}function Ir(e,t){return Tn(e.getUTCFullYear()%100,t,2)}function Lr(e,t){return Tn((e=Mr(e)).getUTCFullYear()%100,t,2)}function Dr(e,t){return Tn(e.getUTCFullYear()%1e4,t,4)}function Nr(e,t){var n=e.getUTCDay();return Tn((e=n>=4||0===n?$t(e):$t.ceil(e)).getUTCFullYear()%1e4,t,4)}function Fr(){return"+0000"}function jr(){return"%"}function Br(e){return+e}function zr(e){return Math.floor(+e/1e3)}_n=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=kn(i),u=Rn(i),d=kn(o),h=Rn(o),f=kn(a),p=Rn(a),g=kn(s),m=Rn(s),A=kn(l),v=Rn(l),y={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:$n,e:$n,f:rr,g:pr,G:mr,H:Jn,I:er,j:tr,L:nr,m:ir,M:or,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Br,s:zr,S:ar,u:sr,U:lr,V:ur,w:dr,W:hr,x:null,X:null,y:fr,Y:gr,Z:Ar,"%":jr},b={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:vr,e:vr,f:xr,g:Lr,G:Nr,H:yr,I:br,j:_r,L:wr,m:Er,M:Sr,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Br,s:zr,S:Cr,u:Pr,U:Tr,V:kr,w:Rr,W:Or,x:null,X:null,y:Ir,Y:Dr,Z:Fr,"%":jr},_={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=A.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:Un,e:Un,f:Yn,g:jn,G:Fn,H:Vn,I:Vn,j:Hn,L:qn,m:Zn,M:Gn,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:zn,Q:Kn,s:Qn,S:Wn,u:In,U:Ln,V:Dn,w:On,W:Nn,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:jn,Y:Fn,Z:Bn,"%":Xn};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=yn(bn(o.y,0,1))).getUTCDay(),r=i>4||0===i?Xt.ceil(r):Xt(r),r=nn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=vn(bn(o.y,0,1))).getDay(),r=i>4||0===i?an.ceil(r):an(r),r=fn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?yn(bn(o.y,0,1)).getUTCDay():vn(bn(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,yn(o)):vn(o)}}function E(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=_[i in En?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=w(n,y),y.X=w(r,y),y.c=w(t,y),b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),{format:function(e){var t=w(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),wn=_n.format,xn=_n.parse,_n.utcFormat,_n.utcParse;var Zr=Zt((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*Ut)}),(function(e,t){return(t-e)/Ut}),(function(e){return e.getUTCSeconds()}));const Ur=Zr;Zr.range;var Hr=Zt((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut)}),(function(e,t){e.setTime(+e+t*Ht)}),(function(e,t){return(t-e)/Ht}),(function(e){return e.getMinutes()}));const Vr=Hr;Hr.range;var Gr=Zt((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut-e.getMinutes()*Ht)}),(function(e,t){e.setTime(+e+t*Vt)}),(function(e,t){return(t-e)/Vt}),(function(e){return e.getHours()}));const Wr=Gr;Gr.range;var qr=Zt((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));const Yr=qr;qr.range;xn("%Y-%m-%d"),xn("%Y-%m-%d %H:%M"),xn("%Y-%m-%d %H:%M:%S"),xn("%Y"),xn("%Y-%m");var Xr;!function(e){e.SECOND="SECOND",e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.MONTH="MONTH",e.YEAR="YEAR"}(Xr||(Xr={}));wn(".%L");const Kr=wn(":%S"),Qr=wn("%I:%M"),$r=wn("%I %p"),Jr=wn("%a %d"),ei=(wn("%b %d"),wn("%b")),ti=wn("%Y");const ni=[{order:0,key:Xr.SECOND,interval:Ur,format:Kr,formatFull:wn("%Y-%m-%d %H:%M:%S")},{order:1,key:Xr.MINUTE,interval:Vr,format:Qr,formatFull:wn("%Y-%m-%d %H:%M")},{order:2,key:Xr.HOUR,interval:Wr,format:$r,formatFull:wn("%a %d %b %Y, %I %p")},{order:3,key:Xr.DAY,interval:fn,format:Jr,formatFull:wn("%a %d %b %Y")},{order:4,key:Xr.MONTH,interval:Yr,format:ei,formatFull:wn("%b %Y")},{order:5,key:Xr.YEAR,interval:gn,format:ti,formatFull:wn("%Y")}];function ri(e){return ni.find((t=>t.key===e))}class ii{constructor(e){this.getFlowsFromProps=(e,t)=>t.flows,this.getLocationsFromProps=(e,t)=>t.locations,this.getClusterLevelsFromProps=(e,t)=>t.clusterLevels,this.getMaxTopFlowsDisplayNum=(e,t)=>e.settings.maxTopFlowsDisplayNum,this.getSelectedLocations=(e,t)=>{var n;return null===(n=e.filter)||void 0===n?void 0:n.selectedLocations},this.getLocationFilterMode=(e,t)=>{var n;return null===(n=e.filter)||void 0===n?void 0:n.locationFilterMode},this.getClusteringEnabled=(e,t)=>e.settings.clusteringEnabled,this.getLocationTotalsEnabled=(e,t)=>e.settings.locationTotalsEnabled,this.getLocationLabelsEnabled=(e,t)=>e.settings.locationLabelsEnabled,this.getZoom=(e,t)=>e.viewport.zoom,this.getViewport=(e,t)=>e.viewport,this.getSelectedTimeRange=(e,t)=>{var n;return null===(n=e.filter)||void 0===n?void 0:n.selectedTimeRange},this.getColorScheme=(e,t)=>e.settings.colorScheme,this.getDarkMode=(e,t)=>e.settings.darkMode,this.getFadeEnabled=(e,t)=>e.settings.fadeEnabled,this.getFadeOpacityEnabled=(e,t)=>e.settings.fadeOpacityEnabled,this.getFadeAmount=(e,t)=>e.settings.fadeAmount,this.getAnimate=(e,t)=>e.settings.animationEnabled,this.getInvalidLocationIds=_t(this.getLocationsFromProps,(e=>{if(!e)return;const t=[];for(const n of e){const e=this.accessors.getLocationId(n),r=this.accessors.getLocationLon(n),i=this.accessors.getLocationLat(n);-90<=i&&i<=90&&-180<=r&&r<=180||t.push(e)}return t.length>0?t:void 0})),this.getLocations=_t(this.getLocationsFromProps,this.getInvalidLocationIds,((e,t)=>{if(!e)return;if(!t||0===t.length)return e;const n=new Set(t),r=[];for(const i of e){const e=this.accessors.getLocationId(i);n.has(e)||r.push(i)}return r})),this.getLocationIds=_t(this.getLocations,(e=>{if(!e)return;const t=new Set;for(const n of e)t.add(this.accessors.getLocationId(n));return t})),this.getSelectedLocationsSet=_t(this.getSelectedLocations,(e=>e&&e.length>0?new Set(e):void 0)),this.getSortedFlowsForKnownLocations=_t(this.getFlowsFromProps,this.getLocationIds,((e,t)=>{if(!t||!e)return;const n=[];for(const r of e){const e=this.accessors.getFlowOriginId(r),i=this.accessors.getFlowDestId(r);t.has(e)&&t.has(i)&&n.push(r)}return n.sort(((e,t)=>(0,tt.Z)(Math.abs(this.accessors.getFlowMagnitude(e)),Math.abs(this.accessors.getFlowMagnitude(t)))))})),this.getActualTimeExtent=_t(this.getSortedFlowsForKnownLocations,(e=>{if(!e)return;let t=null,n=null;for(const r of e){const e=this.accessors.getFlowTime(r);e&&((null==t||t>e)&&(t=e),(null==n||n{if(!e||!t)return;const n=(0,nt.Z)(e,(e=>{const t=this.accessors.getFlowTime(e);return t?function(e){let t;for(const n of ni){const{interval:r}=n;if(r(e)e.order===i)));var i;return r?r.key:void 0})),this.getTimeExtent=_t(this.getActualTimeExtent,this.getTimeGranularityKey,((e,t)=>{const n=t?ri(t):void 0;if(!e||!(null===n||void 0===n?void 0:n.interval))return;const{interval:r}=n;return[e[0],r.offset(r.floor(e[1]),1)]})),this.getSortedFlowsForKnownLocationsFilteredByTime=_t(this.getSortedFlowsForKnownLocations,this.getTimeExtent,this.getSelectedTimeRange,((e,t,n)=>{if(e)return!t||!n||t[0]===n[0]&&t[1]===n[1]?e:e.filter((e=>{const t=this.accessors.getFlowTime(e);return t&&n[0]<=t&&t{if(!t||!e)return t;const n=new Set;for(const i of e)n.add(this.accessors.getFlowOriginId(i)),n.add(this.accessors.getFlowDestId(i));const r=[];for(const i of t)n.has(this.accessors.getLocationId(i))&&r.push(i);return r})),this.getLocationsById=_t(this.getLocationsHavingFlows,(e=>{if(!e)return;const t=new Map;for(const n of e)t.set(this.accessors.getLocationId(n),n);return t})),this.getLocationWeightGetter=_t(this.getSortedFlowsForKnownLocations,(e=>{if(!e)return;const t=function(e,t){let{getFlowOriginId:n,getFlowDestId:r,getFlowMagnitude:i}=t;const o={incoming:new Map,outgoing:new Map};for(const a of e){const e=n(a),t=r(a),s=i(a);o.incoming.set(t,(o.incoming.get(t)||0)+s),o.outgoing.set(e,(o.outgoing.get(e)||0)+s)}return e=>Math.max(Math.abs(o.incoming.get(e)||0),Math.abs(o.outgoing.get(e)||0))}(e,this.accessors.getFlowmapDataAccessors());return t})),this.getClusterLevels=_t(this.getClusterLevelsFromProps,this.getLocationsHavingFlows,this.getLocationWeightGetter,((e,t,n)=>{if(e)return e;if(!t||!n)return;return Ct(t,this.accessors.getFlowmapDataAccessors(),n,{maxZoom:20})})),this.getClusterIndex=_t(this.getLocationsById,this.getLocationWeightGetter,this.getClusterLevels,((e,t,n)=>{if(!e||!t||!n)return;const r=function(e){const t=new Map,n=new Map,r=new Map;for(const{zoom:c,nodes:u}of e){t.set(c,u);for(const e of u)if(w(e))n.set(e.id,e);else{const{id:t}=e,n=r.get(t);(null==n||n>c)&&r.set(t,c)}}const[i,o]=rt(e,(e=>e.zoom));if(null==i||null==o)throw new Error("Could not determine minZoom or maxZoom");const a=new Map;for(const c of n.values()){const{zoom:e}=c;let t=a.get(e);t||(t=new Map,a.set(e,t)),s(c,(e=>{null===t||void 0===t||t.set(e,c)}))}function s(e,t){for(const r of e.children){const e=n.get(r);e?s(e,t):t(r)}}function l(e,t){const n=a.get(t);if(!n)return;const r=n.get(e);return r?r.id:void 0}return{availableZoomLevels:e.map((e=>+e.zoom)).sort(((e,t)=>(0,it.Z)(e,t))),getClusterNodesFor:e=>{if(void 0!==e)return t.get(e)},getClusterById:e=>n.get(e),getMinZoomForLocation:e=>r.get(e)||i,expandCluster:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;const r=[],i=(e,r)=>{if(t>e.zoom)for(const t of e.children){const e=n.get(t);e?i(e,r):r.push(t)}else r.push(e.id)};return i(e,r),r},findClusterFor:l,aggregateFlows:function(e,t,n){let{getFlowOriginId:r,getFlowDestId:i,getFlowMagnitude:a}=n,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t>o)return e;const c=[],u=new Map,d=(e,t)=>"".concat(e,":").concat(t),{flowCountsMapReduce:h={map:a,reduce:(e,t)=>(e||0)+t}}=s;for(const o of e){const e=r(o),n=i(o),a=l(e,t)||e,s=l(n,t)||n,f=d(a,s);if(a===e&&s===n)c.push(o);else{let e=u.get(f);e?e.count=h.reduce(e.count,h.map(o)):(e={origin:a,dest:s,count:h.map(o),aggregate:!0},c.push(e),u.set(f,e))}}return c}}}(n);return function(e,t,n,r,i){const{getLocationId:o,getLocationName:a,getLocationClusterName:s}=r,l=e=>{const t=n.get(e);return t?a?a(t):o(t)||e:'"'.concat(e,'"')};for(const c of t)for(const t of c.nodes)if(w(t)){const n=e.expandCluster(t);if(n.sort(((e,t)=>(0,tt.Z)(i(e),i(t)))),s)t.name=s(n);else{const e=n[0],r=2===n.length?n[1]:void 0;t.name='"'.concat(l(e),'" and ').concat(r?'"'.concat(l(r),'"'):"".concat(n.length-1," others"))}}else t.name=l(t.id)}(r,n,e,this.accessors.getFlowmapDataAccessors(),t),r})),this.getAvailableClusterZoomLevels=_t(this.getClusterIndex,this.getSelectedLocations,((e,t)=>{if(!e)return;let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const i=t=>{const i=e.getClusterById(t);if(i)r=Math.max(r,i.zoom),n=Math.min(n,i.zoom);else{const n=e.getMinZoomForLocation(t);r=Math.max(r,n)}};if(t)for(const o of t)i(o);return e.availableZoomLevels.filter((e=>r<=e&&e<=n))})),this._getClusterZoom=_t(this.getClusterIndex,this.getZoom,this.getAvailableClusterZoomLevels,((e,t,n)=>{if(!e)return;if(!n||null==t)return;return function(e,t){if(!e.length)throw new Error("No available zoom levels");return e[Math.min((0,Lt.Nw)(e,Math.floor(t)),e.length-1)]}(n,t)})),this.getClusterZoom=(e,t)=>{const{settings:n}=e;if(n.clusteringEnabled)return n.clusteringAuto||null==n.clusteringLevel?this._getClusterZoom(e,t):n.clusteringLevel},this.getLocationsForSearchBox=_t(this.getClusteringEnabled,this.getLocationsHavingFlows,this.getSelectedLocations,this.getClusterZoom,this.getClusterIndex,((e,t,n,r,i)=>{if(!t)return;let o=Array.from(t);if(i&&n){const e=[];for(const t of n){const n=i.getClusterById(t);n&&!o.find((e=>(x(e)?e.id:this.accessors.getLocationId(e))===t))&&e.push(n)}e.length>0&&(o=o.concat(e))}return o})),this.getDiffMode=_t(this.getFlowsFromProps,(e=>{if(e)for(const t of e)if(this.accessors.getFlowMagnitude(t)<0)return!0;return!1})),this._getFlowmapColors=_t(this.getDiffMode,this.getColorScheme,this.getDarkMode,this.getFadeEnabled,this.getFadeOpacityEnabled,this.getFadeAmount,this.getAnimate,et),this.getFlowmapColorsRGBA=_t(this._getFlowmapColors,(e=>function(e){return void 0!==e.positive}(e)?function(e){const t=Je(e);return Object.assign(Object.assign({},t),{positive:$e(e&&e.positive,Ie,t.darkMode),negative:$e(e&&e.negative,Le,t.darkMode)})}(e):function(e){const t=Je(e);return Object.assign(Object.assign({},t),$e(e,Re,t.darkMode))}(e))),this.getUnknownLocations=_t(this.getLocationIds,this.getFlowsFromProps,this.getSortedFlowsForKnownLocations,((e,t,n)=>{if(!e||!t)return;if(n)return;const r=new Set;for(const i of t)e.has(this.accessors.getFlowOriginId(i))||r.add(this.accessors.getFlowOriginId(i)),e.has(this.accessors.getFlowDestId(i))||r.add(this.accessors.getFlowDestId(i));return r})),this.getSortedAggregatedFilteredFlows=_t(this.getClusterIndex,this.getClusteringEnabled,this.getSortedFlowsForKnownLocationsFilteredByTime,this.getClusterZoom,this.getTimeExtent,((e,t,n,r,i)=>{if(!n)return;let o;return o=t&&e&&null!=r?e.aggregateFlows(n,r,this.accessors.getFlowmapDataAccessors()):function(e,t){const n=st(e,(e=>({aggregate:!0,origin:t.getFlowOriginId(e[0]),dest:t.getFlowDestId(e[0]),count:e.reduce(((e,n)=>{const r=t.getFlowMagnitude(n);return r&&!isNaN(r)&&isFinite(r)?e+r:e}),0)})),t.getFlowOriginId,t.getFlowDestId),r=[];for(const i of n.values())for(const e of i.values())r.push(e);return r}(n,this.accessors.getFlowmapDataAccessors()),o.sort(((e,t)=>(0,tt.Z)(Math.abs(this.accessors.getFlowMagnitude(e)),Math.abs(this.accessors.getFlowMagnitude(t))))),o})),this.getExpandedSelectedLocationsSet=_t(this.getClusteringEnabled,this.getSelectedLocationsSet,this.getClusterIndex,((e,t,n)=>{if(!t||!n)return t;const r=new Set;for(const i of t){const e=n.getClusterById(i);if(e){const t=n.expandCluster(e);for(const e of t)r.add(e)}else r.add(i)}return r})),this.getTotalCountsByTime=_t(this.getSortedFlowsForKnownLocations,this.getTimeGranularityKey,this.getTimeExtent,this.getExpandedSelectedLocationsSet,this.getLocationFilterMode,((e,t,n,r,i)=>{const o=t?ri(t):void 0;if(!e||!o||!n)return;const a=e.reduce(((e,t)=>{var n;if(this.isFlowInSelection(t,r,i)){const r=o.interval(this.accessors.getFlowTime(t)).getTime();e.set(r,(null!==(n=e.get(r))&&void 0!==n?n:0)+this.accessors.getFlowMagnitude(t))}return e}),new Map);return Array.from(a.entries()).map((e=>{let[t,n]=e;return{time:new Date(t),count:n}}))})),this.getMaxLocationCircleSize=_t(this.getLocationTotalsEnabled,(e=>e?17:1)),this.getViewportBoundingBox=_t(this.getViewport,this.getMaxLocationCircleSize,Ft),this.getLocationsForZoom=_t(this.getClusteringEnabled,this.getLocationsHavingFlows,this.getClusterIndex,this.getClusterZoom,((e,t,n,r)=>e&&n?n.getClusterNodesFor(r):t)),this.getLocationTotals=_t(this.getLocationsForZoom,this.getSortedAggregatedFilteredFlows,this.getSelectedLocationsSet,this.getLocationFilterMode,((e,t,n,r)=>{if(!t)return;const i=new Map,o=(e,t)=>{var n;const r=null!==(n=i.get(e))&&void 0!==n?n:{incomingCount:0,outgoingCount:0,internalCount:0};return null!=t.incomingCount&&(r.incomingCount+=t.incomingCount),null!=t.outgoingCount&&(r.outgoingCount+=t.outgoingCount),null!=t.internalCount&&(r.internalCount+=t.internalCount),r};for(const a of t)if(this.isFlowInSelection(a,n,r)){const e=this.accessors.getFlowOriginId(a),t=this.accessors.getFlowDestId(a),n=this.accessors.getFlowMagnitude(a);e===t?i.set(e,o(e,{internalCount:n})):(i.set(e,o(e,{outgoingCount:n})),i.set(t,o(t,{incomingCount:n})))}return i})),this.getLocationsTree=_t(this.getLocationsForZoom,(e=>{if(e)return new mt(e,(e=>ai(this.accessors.getLocationLon(e))),(e=>si(this.accessors.getLocationLat(e))))})),this._getLocationIdsInViewport=_t(this.getLocationsTree,this.getViewportBoundingBox,((e,t)=>{const n=this._getLocationsInBboxIndices(e,t);if(n)return new Set(n.map((t=>e.points[t].id)))})),this.getLocationIdsInViewport=bt(yt,((e,t,n)=>{if(e===t)return!0;if(null==e||null==t)return!1;if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}))(this._getLocationIdsInViewport,(e=>{if(e)return e})),this.getTotalUnfilteredCount=_t(this.getSortedFlowsForKnownLocations,(e=>{if(e)return e.reduce(((e,t)=>e+this.accessors.getFlowMagnitude(t)),0)})),this.getTotalFilteredCount=_t(this.getSortedAggregatedFilteredFlows,this.getSelectedLocationsSet,this.getLocationFilterMode,((e,t,n)=>{if(!e)return;return e.reduce(((e,r)=>this.isFlowInSelection(r,t,n)?e+this.accessors.getFlowMagnitude(r):e),0)})),this._getLocationTotalsExtent=_t(this.getLocationTotals,(e=>oi(e,void 0))),this._getLocationTotalsForViewportExtent=_t(this.getLocationTotals,this.getLocationIdsInViewport,((e,t)=>oi(e,t))),this.getLocationTotalsExtent=(e,t)=>e.settings.adaptiveScalesEnabled?this._getLocationTotalsForViewportExtent(e,t):this._getLocationTotalsExtent(e,t),this.getFlowsForFlowmapLayer=_t(this.getSortedAggregatedFilteredFlows,this.getLocationIdsInViewport,this.getSelectedLocationsSet,this.getLocationFilterMode,this.getMaxTopFlowsDisplayNum,((e,t,n,r,i)=>{if(!e||!t)return;const o=[];let a=0;for(const s of e){const e=this.accessors.getFlowOriginId(s),l=this.accessors.getFlowDestId(s);if((t.has(e)||t.has(l))&&this.isFlowInSelection(s,n,r)&&e!==l&&(o.push(s),a++),a>i)break}return o.reverse()})),this._getFlowMagnitudeExtent=_t(this.getSortedAggregatedFilteredFlows,this.getSelectedLocationsSet,this.getLocationFilterMode,((e,t,n)=>{if(!e)return;let r;for(const i of e)if(this.accessors.getFlowOriginId(i)!==this.accessors.getFlowDestId(i)&&this.isFlowInSelection(i,t,n)){const e=this.accessors.getFlowMagnitude(i);null==r?r=[e,e]:(er[1]&&(r[1]=e))}return r})),this._getAdaptiveFlowMagnitudeExtent=_t(this.getFlowsForFlowmapLayer,(e=>{if(!e)return;const t=rt(e,this.accessors.getFlowMagnitude);return void 0!==t[0]&&void 0!==t[1]?t:void 0})),this.getFlowMagnitudeExtent=(e,t)=>e.settings.adaptiveScalesEnabled?this._getAdaptiveFlowMagnitudeExtent(e,t):this._getFlowMagnitudeExtent(e,t),this.getLocationMaxAbsTotalGetter=_t(this.getLocationTotals,(e=>t=>{const n=null===e||void 0===e?void 0:e.get(t);if(n)return Math.max(Math.abs(n.incomingCount+n.internalCount),Math.abs(n.outgoingCount+n.internalCount))})),this.getFlowThicknessScale=_t(this.getFlowMagnitudeExtent,jt),this.getCircleSizeScale=_t(this.getMaxLocationCircleSize,this.getLocationTotalsEnabled,this.getLocationTotalsExtent,((e,t,n)=>t?n?(0,_e._b)().range([0,e]).domain([0,Math.max.apply(null,n.map((e=>Math.abs(e||0))))]):void 0:()=>e)),this.getInCircleSizeGetter=_t(this.getCircleSizeScale,this.getLocationTotals,((e,t)=>n=>{const r=null===t||void 0===t?void 0:t.get(n);return r&&e&&e(Math.abs(r.incomingCount+r.internalCount))||0})),this.getOutCircleSizeGetter=_t(this.getCircleSizeScale,this.getLocationTotals,((e,t)=>n=>{const r=null===t||void 0===t?void 0:t.get(n);return r&&e&&e(Math.abs(r.outgoingCount+r.internalCount))||0})),this.getSortedLocationsForZoom=_t(this.getLocationsForZoom,this.getInCircleSizeGetter,this.getOutCircleSizeGetter,((e,t,n)=>{if(!e)return;return[...e].sort(((e,r)=>{const i=this.accessors.getLocationId(e),o=this.accessors.getLocationId(r);return(0,it.Z)(Math.max(t(i),n(i)),Math.max(t(o),n(o)))}))})),this.getLocationsForFlowmapLayer=_t(this.getSortedLocationsForZoom,(e=>e)),this.getLocationsForFlowmapLayerById=_t(this.getLocationsForFlowmapLayer,(e=>{if(e)return e.reduce(((e,t)=>(e.set(this.accessors.getLocationId(t),t),e)),new Map)})),this.getLocationOrClusterByIdGetter=_t(this.getClusterIndex,this.getLocationsById,((e,t)=>n=>{var r;return null!==(r=null===e||void 0===e?void 0:e.getClusterById(n))&&void 0!==r?r:null===t||void 0===t?void 0:t.get(n)})),this.getLayersData=_t(this.getLocationsForFlowmapLayer,this.getFlowsForFlowmapLayer,this.getFlowmapColorsRGBA,this.getLocationsForFlowmapLayerById,this.getLocationIdsInViewport,this.getInCircleSizeGetter,this.getOutCircleSizeGetter,this.getFlowThicknessScale,this.getAnimate,this.getLocationLabelsEnabled,((e,t,n,r,i,o,a,s,l,c)=>this._prepareLayersData(e,t,n,r,i,o,a,s,l,c))),this.accessors=new Dt(e),this.setAccessors(e)}setAccessors(e){this.accessors=new Dt(e)}getAggregateAccessors(){return this.accessors}prepareLayersData(e,t){const n=this.getLocationsForFlowmapLayer(e,t)||[],r=this.getFlowsForFlowmapLayer(e,t)||[],i=this.getFlowmapColorsRGBA(e,t),o=this.getLocationsForFlowmapLayerById(e,t),a=this.getLocationIdsInViewport(e,t),s=this.getInCircleSizeGetter(e,t),l=this.getOutCircleSizeGetter(e,t),c=this.getFlowThicknessScale(e,t),u=this.getLocationLabelsEnabled(e,t);return this._prepareLayersData(n,r,i,o,a,s,l,c,e.settings.animationEnabled,u)}_prepareLayersData(e,t,n,r,i,o,a,s,l,c){e||(e=[]),t||(t=[]);const{getFlowOriginId:u,getFlowDestId:d,getFlowMagnitude:h,getLocationId:f,getLocationLon:p,getLocationLat:g,getLocationName:m}=this.accessors,A=function(e,t,n){const r=t?t[0]:0,i=t?t[1]:0;if(Ke(e)){const t=Xe([0,i],e.positive.flows.scheme,n),o=Xe([0,r],e.negative.flows.scheme,n);return e=>e>=0?t(e):o(e)}const o=Xe([0,i||0],e.flows.scheme,n);return e=>o(e)}(n,rt(t,(e=>h(e))),!1),v=Float32Array.from(function*(){for(const t of e)yield p(t),yield g(t)}()),y=Ke(n)?n.positive.locationCircles.inner:n.locationCircles.inner,b=Uint8Array.from(function*(){for(const t of e)yield*y}()),_=Float32Array.from(function*(){for(const t of e){const e=f(t);yield(null===i||void 0===i?void 0:i.has(e))?o(e):1}}()),w=Float32Array.from(function*(){for(const t of e){const e=f(t);yield(null===i||void 0===i?void 0:i.has(e))?a(e):1}}()),x=Float32Array.from(function*(){for(const e of t){const t=null===r||void 0===r?void 0:r.get(u(e));yield t?p(t):0,yield t?g(t):0}}()),E=Float32Array.from(function*(){for(const e of t){const t=null===r||void 0===r?void 0:r.get(d(e));yield t?p(t):0,yield t?g(t):0}}()),S=Float32Array.from(function*(){for(const e of t)yield s&&s(h(e))||0}()),C=Float32Array.from(function*(){for(const e of t){const t=u(e),n=d(e);yield Math.max(o(t),a(t)),yield Math.max(o(n),a(n))}}()),P=Uint8Array.from(function*(){for(const e of t)yield*A(h(e))}()),T=l?Float32Array.from(function*(){for(const e of t)yield new wt.alea("".concat(u(e),"-").concat(d(e)))()}()):void 0;return Object.assign({circleAttributes:{length:e.length,attributes:{getPosition:{value:v,size:2},getColor:{value:b,size:4},getInRadius:{value:_,size:1},getOutRadius:{value:w,size:1}}},lineAttributes:{length:t.length,attributes:Object.assign({getSourcePosition:{value:x,size:2},getTargetPosition:{value:E,size:2},getThickness:{value:S,size:1},getColor:{value:P,size:4},getEndpointOffsets:{value:C,size:2}},T?{getStaggering:{value:T,size:1}}:{})}},c?{locationLabels:e.map(m)}:void 0)}getLocationsInBbox(e,t){if(e)return this._getLocationsInBboxIndices(e,t).map((t=>e.points[t]))}_getLocationsInBboxIndices(e,t){if(!e)return;const[n,r,i,o]=t,[a,s,l,c]=[ai(n),si(r),ai(i),si(o)];return e.range(Math.min(a,l),Math.min(s,c),Math.max(a,l),Math.max(s,c))}isFlowInSelection(e,t,n){const r=this.accessors.getFlowOriginId(e),i=this.accessors.getFlowDestId(e);if(t)switch(n){case v.ALL:return t.has(r)||t.has(i);case v.BETWEEN:return t.has(r)&&t.has(i);case v.INCOMING:return t.has(i);case v.OUTGOING:return t.has(r)}return!0}}function oi(e,t){if(!e)return;let n;for(const[r,{incomingCount:i,outgoingCount:o,internalCount:a}]of e.entries())if(null==t||t.has(r)){const e=Math.min(i+a,o+a,a),t=Math.max(i+a,o+a,a);n?(en[1]&&(n[1]=t)):n=[e,t]}return n}function ai(e){return e/360+.5}function si(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function li(e,t){const{getInRadius:n,getOutRadius:r}=e.attributes;return Math.max(n.value[t],r.value[t])}function ci(e,t){const{getPosition:n}=e.attributes;return[n.value[2*t],n.value[2*t+1]]}class ui{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}var di=1e-6,hi=Math.PI,fi=hi/2,pi=hi/4,gi=2*hi,mi=180/hi,Ai=hi/180,vi=Math.abs,yi=(Math.atan,Math.atan2),bi=Math.cos,_i=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),wi=(Math.sign,Math.sqrt);Math.tan;function xi(){}var Ei,Si,Ci,Pi,Ti,Mi=new ui,ki=new ui,Ri={point:xi,lineStart:xi,lineEnd:xi,polygonStart:function(){Mi=new ui,Ri.lineStart=Oi,Ri.lineEnd=Ii},polygonEnd:function(){var e=+Mi;ki.add(e<0?gi+e:e),this.lineStart=this.lineEnd=this.point=xi},sphere:function(){ki.add(gi)}};function Oi(){Ri.point=Li}function Ii(){Di(Ei,Si)}function Li(e,t){Ri.point=Di,Ei=e,Si=t,Ci=e*=Ai,Pi=bi(t=(t*=Ai)/2+pi),Ti=_i(t)}function Di(e,t){var n=(e*=Ai)-Ci,r=n>=0?1:-1,i=r*n,o=bi(t=(t*=Ai)/2+pi),a=_i(t),s=Ti*a,l=Pi*o+s*bi(i),c=s*r*_i(i);Mi.add(yi(c,l)),Ci=e,Pi=o,Ti=a}function Ni(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Fi(e,t){e&&Ki.hasOwnProperty(e.type)&&Ki[e.type](e,t)}var ji,Bi,zi,Zi,Ui,Hi,Vi,Gi,Wi,qi,Yi,Xi={Feature:function(e,t){Fi(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rdi?Zi=90:Wi<-di&&(Bi=-90),Yi[0]=ji,Yi[1]=zi},sphere:function(){ji=-(zi=180),Bi=-(Zi=90)}};function eo(e,t){qi.push(Yi=[ji=e,zi=e]),tZi&&(Zi=t)}function to(e,t){var n=function(e){var t=e[0],n=e[1],r=bi(n);return[r*bi(t),r*_i(t),_i(n)]}([e*Ai,t*Ai]);if(Gi){var r=Ni(Gi,n),i=Ni([r[1],-r[0],0],r);!function(e){var t=wi(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}(i),i=function(e){return[yi(e[1],e[0]),(t=e[2],t>1?fi:t<-1?-fi:Math.asin(t))];var t}(i);var o,a=e-Ui,s=a>0?1:-1,l=i[0]*mi*s,c=vi(a)>180;c^(s*UiZi&&(Zi=o):c^(s*Ui<(l=(l+360)%360-180)&&lZi&&(Zi=t)),c?eso(ji,zi)&&(zi=e):so(e,zi)>so(ji,zi)&&(ji=e):zi>=ji?(ezi&&(zi=e)):e>Ui?so(ji,e)>so(ji,zi)&&(zi=e):so(e,zi)>so(ji,zi)&&(ji=e)}else qi.push(Yi=[ji=e,zi=e]);tZi&&(Zi=t),Gi=n,Ui=e}function no(){Ji.point=to}function ro(){Yi[0]=ji,Yi[1]=zi,Ji.point=eo,Gi=null}function io(e,t){if(Gi){var n=e-Ui;Wi.add(vi(n)>180?n+(n>0?360:-360):n)}else Hi=e,Vi=t;Ri.point(e,t),to(e,t)}function oo(){Ri.lineStart()}function ao(){io(Hi,Vi),Ri.lineEnd(),vi(Wi)>di&&(ji=-(zi=180)),Yi[0]=ji,Yi[1]=zi,Gi=null}function so(e,t){return(t-=e)<0?t+360:t}function lo(e,t){return e[0]-t[0]}function co(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tso(r[0],r[1])&&(r[1]=i[1]),so(i[0],r[1])>so(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=so(r[1],i[0]))>a&&(a=s,ji=i[0],zi=r[1])}return qi=Yi=null,ji===1/0||Bi===1/0?[[NaN,NaN],[NaN,NaN]]:[[ji,Bi],[zi,Zi]]}function ho(e,t,n,r){const i=e=>({type:"Point",coordinates:t(e)});let o;if(Array.isArray(e))o=e.map(i);else{o=[];for(const t of e)o.push(i(t))}return function(e,t,n){const{pad:r=.05,maxZoom:i=100}=n||{},o=uo(e),[[a,s],[l,c]]=o,u=r?[[a-r*(l-a),s-r*(c-s)],[l+r*(l-a),c+r*(c-s)]]:o,[d,h]=t;return Object.assign(Object.assign({},(0,Nt.Xg)({width:d,height:h,bounds:u,padding:null===n||void 0===n?void 0:n.padding,maxZoom:i})),{width:d,height:h,bearing:0,pitch:0})}({type:"GeometryCollection",geometries:o},n,r)}var fo,po=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class go{constructor(e){this.selectors=new ii(e),this.flowmapData=void 0,this.flowmapState=void 0}setAccessors(e){this.selectors.setAccessors(e)}setFlowmapData(e){this.flowmapData=e}getSelectors(){return this.selectors}getFlowmapData(){return this.flowmapData}setFlowmapState(e){return po(this,void 0,void 0,(function*(){this.flowmapState=e}))}getFlowmapState(){return this.flowmapState}getFlowByIndex(e){return po(this,void 0,void 0,(function*(){if(!this.flowmapState||!this.flowmapData)return;const t=this.selectors.getFlowsForFlowmapLayer(this.flowmapState,this.flowmapData);return null===t||void 0===t?void 0:t[e]}))}getLocationByIndex(e){return po(this,void 0,void 0,(function*(){if(!this.flowmapState||!this.flowmapData)return;const t=this.selectors.getLocationsForFlowmapLayer(this.flowmapState,this.flowmapData);return null===t||void 0===t?void 0:t[e]}))}getLayersData(){return po(this,void 0,void 0,(function*(){if(this.flowmapState&&this.flowmapData)return this.selectors.getLayersData(this.flowmapState,this.flowmapData)}))}getLocationById(e){return po(this,void 0,void 0,(function*(){if(!this.flowmapState||!this.flowmapData)return;const t=this.selectors.getClusterIndex(this.flowmapState,this.flowmapData);if(t){const n=t.getClusterById(e);if(n)return n}const n=this.selectors.getLocationsById(this.flowmapState,this.flowmapData);return null===n||void 0===n?void 0:n.get(e)}))}getTotalsForLocation(e){var t;return po(this,void 0,void 0,(function*(){if(this.flowmapState&&this.flowmapData)return null===(t=this.selectors.getLocationTotals(this.flowmapState,this.flowmapData))||void 0===t?void 0:t.get(e)}))}getViewportForLocations(e,t){var n;return po(this,void 0,void 0,(function*(){if(null===(n=this.flowmapData)||void 0===n?void 0:n.locations)return ho(this.flowmapData.locations,(e=>[this.selectors.accessors.getLocationLon(e),this.selectors.accessors.getLocationLat(e)]),e,t)}))}updateLayersData(e){return po(this,void 0,void 0,(function*(){e(yield this.getLayersData())}))}getClusterZoom(){return this.flowmapState&&this.flowmapData?this.selectors.getClusterZoom(this.flowmapState,this.flowmapData):void 0}getClusterIndex(){return this.flowmapState&&this.flowmapData?this.selectors.getClusterIndex(this.flowmapState,this.flowmapData):void 0}getLocationsById(){return this.flowmapState&&this.flowmapData?this.selectors.getLocationsById(this.flowmapState,this.flowmapData):void 0}getLocationTotals(){return this.flowmapState&&this.flowmapData?this.selectors.getLocationTotals(this.flowmapState,this.flowmapData):void 0}getFlowsForFlowmapLayer(){return this.flowmapState&&this.flowmapData?this.selectors.getFlowsForFlowmapLayer(this.flowmapState,this.flowmapData):void 0}}!function(e){e.LOCATION="location",e.FLOW="flow"}(fo||(fo={}));var mo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ao=["filter","locationTotalsEnabled","locationLabelsEnabled","adaptiveScalesEnabled","animationEnabled","clusteringEnabled","clusteringLevel","fadeEnabled","fadeOpacityEnabled","clusteringAuto","darkMode","fadeAmount","colorScheme","highlightColor","maxTopFlowsDisplayNum"];var vo;!function(e){e.LOCATION="location",e.FLOW="flow"}(vo||(vo={}));class yo extends y.Z{constructor(e){super(Object.assign(Object.assign({},e),{onHover:(t,n)=>{const r=Date.now();this.setState({highlightedObject:this._getHighlightedObject(t),lastHoverTime:r});const{onHover:i}=e;i&&this._getFlowmapLayerPickingInfo(t).then((e=>{var t,o;(null!==(o=null===(t=this.state)||void 0===t?void 0:t.lastHoverTime)&&void 0!==o?o:0)<=r&&(this.setState({pickingInfo:e}),i(e,n))}))},onClick:(t,n)=>{const{onClick:r}=e,i=Date.now();this.setState({lastClickTime:i}),r&&this._getFlowmapLayerPickingInfo(t).then((e=>{var t,o;(null!==(o=null===(t=this.state)||void 0===t?void 0:t.lastClickTime)&&void 0!==o?o:0)<=i&&(this.setState({pickingInfo:e}),e&&r(e,n))}))}}))}initializeState(){this.state={accessors:new Dt(this.props),dataProvider:this._getOrMakeDataProvider(),layersData:void 0,highlightedObject:void 0,pickingInfo:void 0,lastHoverTime:void 0,lastClickTime:void 0}}getPickingInfo(e){let{info:t}=e;var n,r;if(!t.object){const e=null===(r=null===(n=this.state)||void 0===n?void 0:n.pickingInfo)||void 0===r?void 0:r.object;if(e)return Object.assign(Object.assign({},t),{object:e,picked:!0})}return t}_getOrMakeDataProvider(){const{data:e,dataProvider:t}=this.props;if(function(e){return e&&"function"===typeof e.setFlowmapState&&"function"===typeof e.getViewportForLocations&&"function"===typeof e.getFlowByIndex&&"function"===typeof e.getLocationById&&"function"===typeof e.getLocationByIndex&&"function"===typeof e.getLayersData}(t))return t;if(function(e){return e&&e.locations&&e.flows}(e)){const t=new go(this.props);return t.setFlowmapData(e),t}throw new Error("FlowmapLayer: data must be a FlowmapDataProvider or FlowmapData")}_updateDataProvider(){this.setState({dataProvider:this._getOrMakeDataProvider()})}shouldUpdateState(e){const{changeFlags:t}=e;return!!t.viewportChanged||super.shouldUpdateState(e)}updateState(e){let{oldProps:t,props:n,changeFlags:r}=e;if(r.propsChanged,r.dataChanged&&this._updateDataProvider(),(r.viewportChanged||r.dataChanged)&&this.setState({highlightedObject:void 0}),r.viewportChanged||r.dataChanged||r.propsChanged&&Ao.some((e=>t[e]!==n[e]))){const{dataProvider:e}=this.state||{};e&&(e.setFlowmapState(this._getFlowmapState()),e.updateLayersData((e=>{this.setState({layersData:e,highlightedObject:void 0})}),r))}}_getSettingsState(){const{locationTotalsEnabled:e,locationLabelsEnabled:t,adaptiveScalesEnabled:n,animationEnabled:r,clusteringEnabled:i,clusteringLevel:o,fadeEnabled:a,fadeOpacityEnabled:s,clusteringAuto:l,darkMode:c,fadeAmount:u,colorScheme:d,highlightColor:h,maxTopFlowsDisplayNum:f}=this.props;return{locationTotalsEnabled:e,locationLabelsEnabled:t,adaptiveScalesEnabled:n,animationEnabled:r,clusteringEnabled:i,clusteringLevel:o,fadeEnabled:a,fadeOpacityEnabled:s,clusteringAuto:l,darkMode:c,fadeAmount:u,colorScheme:d,highlightColor:h,maxTopFlowsDisplayNum:f}}_getFlowmapState(){return{viewport:bo(this.context.viewport),filter:this.props.filter,settings:this._getSettingsState()}}_getFlowmapLayerPickingInfo(e){var t;return mo(this,void 0,void 0,(function*(){const{index:n,sourceLayer:r}=e,{dataProvider:i,accessors:o}=this.state||{};if(!i||!o)return;const a=Object.assign(Object.assign({},e),{picked:e.picked,layer:e.layer,index:e.index,x:e.x,y:e.y,coordinate:e.coordinate,event:e.event});if(r instanceof p||r instanceof u){const e=-1===n?void 0:yield i.getFlowByIndex(n);if(e){const t=yield i.getLocationById(o.getFlowOriginId(e)),n=yield i.getLocationById(o.getFlowDestId(e));if(t&&n)return Object.assign(Object.assign({},a),{object:{type:fo.FLOW,flow:e,origin:t,dest:n,count:o.getFlowMagnitude(e)}})}}else if(r instanceof A){const r=-1===n?void 0:yield i.getLocationByIndex(n);if(r){const n=o.getLocationId(r),s=o.getLocationName(r),l=yield i.getTotalsForLocation(n),{circleAttributes:c}=(null===(t=this.state)||void 0===t?void 0:t.layersData)||{};if(l&&c){const t=li(c,e.index);return Object.assign(Object.assign({},a),{object:{type:fo.LOCATION,location:r,id:n,name:s,totals:l,circleRadius:t}})}}}}))}_getHighlightedObject(e){var t,n;const{index:r,sourceLayer:i}=e;if(!(r<0))if(i instanceof p||i instanceof u){const{lineAttributes:e}=(null===(t=this.state)||void 0===t?void 0:t.layersData)||{};if(e){let t=function(e,t){const{getColor:n,getEndpointOffsets:r,getSourcePosition:i,getTargetPosition:o,getThickness:a,getStaggering:s}=e.attributes;return{length:1,attributes:Object.assign({getColor:{value:n.value.subarray(4*t,4*(t+1)),size:4},getEndpointOffsets:{value:r.value.subarray(2*t,2*(t+1)),size:2},getSourcePosition:{value:i.value.subarray(2*t,2*(t+1)),size:2},getTargetPosition:{value:o.value.subarray(2*t,2*(t+1)),size:2},getThickness:{value:a.value.subarray(t,t+1),size:1}},s?{getStaggering:{value:s.value.subarray(t,t+1),size:1}}:void 0)}}(e,r);return this.props.fadeOpacityEnabled&&(t=Object.assign(Object.assign({},t),{attributes:Object.assign(Object.assign({},t.attributes),{getColor:Object.assign(Object.assign({},t.attributes.getColor),{value:new Uint8Array([...t.attributes.getColor.value.slice(0,3),255])})})})),{type:vo.FLOW,lineAttributes:t}}}else if(i instanceof A){const{circleAttributes:e}=(null===(n=this.state)||void 0===n?void 0:n.layersData)||{};if(e)return{type:vo.LOCATION,coords:ci(e,r),radius:li(e,r)}}}renderLayers(){var e;const t=[];if(null===(e=this.state)||void 0===e?void 0:e.layersData){const{layersData:e,highlightedObject:r}=this.state,{circleAttributes:i,lineAttributes:o,locationLabels:a}=e||{};if(i&&o){const e=Fe(Ye(!1,(n=this._getSettingsState()).colorScheme,n.darkMode,n.fadeEnabled,n.fadeOpacityEnabled,n.fadeAmount,n.animationEnabled).outlineColor||(this.props.darkMode?"#000":"#fff")),a={data:o,parameters:Object.assign(Object.assign({},this.props.parameters),{depthTest:!1})};if(this.props.animationEnabled?t.push(new u(Object.assign({},this.getSubLayerProps(Object.assign(Object.assign({},a),{id:"animated-flow-lines",drawOutline:!1,thicknessUnit:20}))))):t.push(new p(Object.assign({},this.getSubLayerProps(Object.assign(Object.assign({},a),{id:"flow-lines",drawOutline:!0,outlineColor:e}))))),t.push(new A(this.getSubLayerProps({id:"circles",data:i,emptyColor:this.props.darkMode?[0,0,0,255]:[255,255,255,255],outlineEmptyMix:.4}))),r)switch(r.type){case vo.LOCATION:t.push(new b.Z(Object.assign({},this.getSubLayerProps({id:"location-highlight",data:[r],pickable:!1,antialiasing:!0,stroked:!0,filled:!1,lineWidthUnits:"pixels",getLineWidth:2,radiusUnits:"pixels",getRadius:e=>e.radius,getLineColor:Fe(this.props.highlightColor),getPosition:e=>e.coords}))));break;case vo.FLOW:t.push(new p(Object.assign({},this.getSubLayerProps({id:"flow-highlight",data:r.lineAttributes,drawOutline:!0,pickable:!1,outlineColor:Fe(this.props.highlightColor),outlineThickness:1,parameters:{depthTest:!1}}))))}}a&&t.push(new _.Z(this.getSubLayerProps({id:"location-labels",data:a,maxWidth:1e3,pickable:!1,fontFamily:"Helvetica",getPixelOffset:(e,t)=>{let{index:n}=t;return[0,li(i,n)+5]},getPosition:(e,t)=>{let{index:n}=t;return ci(i,n)},getText:e=>e,getSize:10,getColor:[255,255,255,255],getAngle:0,getTextAnchor:"middle",getAlignmentBaseline:"top"})))}var n;return t}}function bo(e){const{width:t,height:n,longitude:r,latitude:i,zoom:o,pitch:a,bearing:s}=e;return{width:t,height:n,longitude:r,latitude:i,zoom:o,pitch:a,bearing:s}}yo.defaultProps={darkMode:!0,fadeAmount:50,locationTotalsEnabled:!0,locationLabelsEnabled:!1,animationEnabled:!1,clusteringEnabled:!0,fadeEnabled:!0,fadeOpacityEnabled:!1,clusteringAuto:!0,clusteringLevel:void 0,adaptiveScalesEnabled:!0,colorScheme:"Teal",highlightColor:"orange",maxTopFlowsDisplayNum:5e3}},24420:(e,t,n)=>{"use strict";function r(e,t){var n=t&&t.cache?t.cache:u,r=t&&t.serializer?t.serializer:l;return(t&&t.strategy?t.strategy:s)(e,{cache:n,serializer:r})}function i(e,t,n,r){var i,o=null==(i=r)||"number"===typeof i||"boolean"===typeof i?r:n(r),a=t.get(o);return"undefined"===typeof a&&(a=e.call(this,r),t.set(o,a)),a}function o(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return"undefined"===typeof o&&(o=e.apply(this,r),t.set(i,o)),o}function a(e,t,n,r,i){return n.bind(t,e,r,i)}function s(e,t){return a(e,this,1===e.length?i:o,t.cache.create(),t.serializer)}n.d(t,{A:()=>d,H:()=>r});var l=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(e){return this.cache[e]},c.prototype.set=function(e,t){this.cache[e]=t};var u={create:function(){return new c}},d={variadic:function(e,t){return a(e,this,o,t.cache.create(),t.serializer)},monadic:function(e,t){return a(e,this,i,t.cache.create(),t.serializer)}}},37152:(e,t,n)=>{"use strict";n.d(t,{wD:()=>i,VG:()=>l,rp:()=>u,Ii:()=>A,O4:()=>s,uf:()=>c,Wh:()=>m,Jo:()=>f,yx:()=>p,Wi:()=>h,HI:()=>g,pe:()=>d,Qc:()=>oe});var r,i,o,a=n(43815);function s(e){return e.type===i.literal}function l(e){return e.type===i.argument}function c(e){return e.type===i.number}function u(e){return e.type===i.date}function d(e){return e.type===i.time}function h(e){return e.type===i.select}function f(e){return e.type===i.plural}function p(e){return e.type===i.pound}function g(e){return e.type===i.tag}function m(e){return!(!e||"object"!==typeof e||e.type!==o.number)}function A(e){return!(!e||"object"!==typeof e||e.type!==o.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(i||(i={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(o||(o={}));var v=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,y=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function b(e){var t={};return e.replace(y,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var _=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var w=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,x=/^(@+)?(\+|#+)?[rs]?$/g,E=/(\*)(0+)|(#+)(0+)|(0+)/g,S=/^(0+)$/;function C(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(x,(function(e,n,r){return"string"!==typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"===typeof r?r.length:0)),""})),t}function P(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function T(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!S.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function M(e){var t=P(e);return t||{}}function k(e){for(var t={},n=0,r=e;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(E,(function(e,n,r,i,o,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(S.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(w.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(w,(function(e,n,r,i,o,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&a?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var o=i.options[0];"w"===o?t=(0,a.pi)((0,a.pi)({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=(0,a.pi)((0,a.pi)({},t),C(o)))}else if(x.test(i.stem))t=(0,a.pi)((0,a.pi)({},t),C(i.stem));else{var s=P(i.stem);s&&(t=(0,a.pi)((0,a.pi)({},t),s));var l=T(i.stem);l&&(t=(0,a.pi)((0,a.pi)({},t),l))}}return t}var R,O={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function I(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(O[n||""]||O[r||""]||O["".concat(r,"-001")]||O["001"])[0]}var L=new RegExp("^".concat(v.source,"*")),D=new RegExp("".concat(v.source,"*$"));function N(e,t){return{start:e,end:t}}var F=!!String.prototype.startsWith&&"_a".startsWith("a",1),j=!!String.fromCodePoint,B=!!Object.fromEntries,z=!!String.prototype.codePointAt,Z=!!String.prototype.trimStart,U=!!String.prototype.trimEnd,H=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},V=!0;try{V="a"===(null===(R=$("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===R?void 0:R[0])}catch(ae){V=!1}var G,W=F?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},q=j?String.fromCodePoint:function(){for(var e=[],t=0;to;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Y=B?Object.fromEntries:function(e){for(var t={},n=0,r=e;n=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},K=Z?function(e){return e.trimStart()}:function(e){return e.replace(L,"")},Q=U?function(e){return e.trimEnd()}:function(e){return e.replace(D,"")};function $(e,t){return new RegExp(e,t)}if(V){var J=$("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");G=function(e,t){var n;return J.lastIndex=t,null!==(n=J.exec(e)[1])&&void 0!==n?n:""}}else G=function(e,t){for(var n=[];;){var r=X(e,t);if(void 0===r||ne(r)||re(r))break;n.push(r),t+=r>=65536?2:1}return q.apply(void 0,n)};var ee=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var o=[];!this.isEOF();){var a=this.char();if(123===a){if((s=this.parseArgument(e,n)).err)return s;o.push(s.val)}else{if(125===a&&e>0)break;if(35!==a||"plural"!==t&&"selectordinal"!==t){if(60===a&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(r.UNMATCHED_CLOSING_TAG,N(this.clonePosition(),this.clonePosition()))}if(60===a&&!this.ignoreTag&&te(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;o.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;o.push(s.val)}}else{var l=this.clonePosition();this.bump(),o.push({type:i.pound,location:N(l,this.clonePosition())})}}}return{val:o,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:i.literal,value:"<".concat(o,"/>"),location:N(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(e+1,t,!0);if(a.err)return a;var s=a.val,l=this.clonePosition();if(this.bumpIf("")?{val:{type:i.tag,value:o,children:s,location:N(n,this.clonePosition())},err:null}:this.error(r.INVALID_TAG,N(l,this.clonePosition())))}return this.error(r.UNCLOSED_TAG,N(n,this.clonePosition()))}return this.error(r.INVALID_TAG,N(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var a=this.tryParseUnquoted(e,t);if(a)r+=a;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var l=N(n,this.clonePosition());return{val:{type:i.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(te(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return q.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),q(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(r.EMPTY_ARGUMENT,N(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(r.MALFORMED_ARGUMENT,N(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:i.argument,value:o,location:N(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(n,this.clonePosition())):this.parseArgumentOptions(e,t,o,n);default:return this.error(r.MALFORMED_ARGUMENT,N(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=G(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:N(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,s){var l,c=this.clonePosition(),u=this.parseIdentifierIfPossible().value,d=this.clonePosition();switch(u){case"":return this.error(r.EXPECT_ARGUMENT_TYPE,N(c,d));case"number":case"date":case"time":this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((w=this.parseSimpleArgStyleIfPossible()).err)return w;if(0===(A=Q(w.val)).length)return this.error(r.EXPECT_ARGUMENT_STYLE,N(this.clonePosition(),this.clonePosition()));h={style:A,styleLocation:N(f,this.clonePosition())}}if((x=this.tryParseArgumentClose(s)).err)return x;var p=N(s,this.clonePosition());if(h&&W(null===h||void 0===h?void 0:h.style,"::",0)){var g=K(h.style.slice(2));if("number"===u)return(w=this.parseNumberSkeletonFromString(g,h.styleLocation)).err?w:{val:{type:i.number,value:n,location:p,style:w.val},err:null};if(0===g.length)return this.error(r.EXPECT_DATE_TIME_SKELETON,p);var m=g;this.locale&&(m=function(e,t){for(var n="",r=0;r>1),l=I(t);for("H"!=l&&"k"!=l||(s=0);s-- >0;)n+="a";for(;a-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(g,this.locale));var A={type:o.dateTime,pattern:m,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?b(m):{}};return{val:{type:"date"===u?i.date:i.time,value:n,location:p,style:A},err:null}}return{val:{type:"number"===u?i.number:"date"===u?i.date:i.time,value:n,location:p,style:null!==(l=null===h||void 0===h?void 0:h.style)&&void 0!==l?l:null},err:null};case"plural":case"selectordinal":case"select":var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(r.EXPECT_SELECT_ARGUMENT_OPTIONS,N(v,(0,a.pi)({},v)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),_=0;if("select"!==u&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,N(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return w;this.bumpSpace(),y=this.parseIdentifierIfPossible(),_=w.val}var x,E=this.tryParsePluralOrSelectOptions(e,u,t,y);if(E.err)return E;if((x=this.tryParseArgumentClose(s)).err)return x;var S=N(s,this.clonePosition());return"select"===u?{val:{type:i.select,value:n,options:Y(E.val),location:S},err:null}:{val:{type:i.plural,value:n,options:Y(E.val),offset:_,pluralType:"plural"===u?"cardinal":"ordinal",location:S},err:null};default:return this.error(r.INVALID_ARGUMENT_TYPE,N(c,d))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,N(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,N(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(_).filter((function(e){return e.length>0}));n=48&&a<=57))break;i=!0,o=10*o+(a-48),this.bump()}var s=N(r,this.clonePosition());return i?H(o*=n)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=X(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(W(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ne(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!==n&&void 0!==n?n:null},e}();function te(e){return e>=97&&e<=122||e>=65&&e<=90}function ne(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function re(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ie(e){e.forEach((function(e){if(delete e.location,h(e)||f(e))for(var t in e.options)delete e.options[t].location,ie(e.options[t].value);else c(e)&&m(e.style)||(u(e)||d(e))&&A(e.style)?delete e.style.location:g(e)&&ie(e.children)}))}function oe(e,t){void 0===t&&(t={}),t=(0,a.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ee(e,t).parse();if(n.err){var i=SyntaxError(r[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null===t||void 0===t?void 0:t.captureLocation)||ie(n.val),n.val}},19588:(e,t,n)=>{"use strict";n.d(t,{d:()=>k});var r=n(43815),i=n(40089),o=n(84293),a=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function s(e,t,n){var r=e.locale,o=e.formats,s=e.onError;void 0===n&&(n={});var l=n.format,c=l&&(0,i.TB)(o,"number",l,s)||{};return t(r,(0,i.L6)(n,a,c))}function l(e,t,n,r){void 0===r&&(r={});try{return s(e,t,r).format(n)}catch(i){e.onError(new o.Qe("Error formatting number.",e.locale,i))}return String(n)}function c(e,t,n,r){void 0===r&&(r={});try{return s(e,t,r).formatToParts(n)}catch(i){e.onError(new o.Qe("Error formatting number.",e.locale,i))}return[]}var u=n(49503),d=["numeric","style"];function h(e,t,n,r,a){void 0===a&&(a={}),r||(r="second"),Intl.RelativeTimeFormat||e.onError(new u.u_('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',u.jK.MISSING_INTL_API));try{return function(e,t,n){var r=e.locale,o=e.formats,a=e.onError;void 0===n&&(n={});var s=n.format,l=!!s&&(0,i.TB)(o,"relative",s,a)||{};return t(r,(0,i.L6)(n,d,l))}(e,t,a).format(n,r)}catch(s){e.onError(new o.Qe("Error formatting relative time.",e.locale,s))}return String(n)}var f=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function p(e,t,n,o){var a=e.locale,s=e.formats,l=e.onError,c=e.timeZone;void 0===o&&(o={});var u=o.format,d=(0,r.pi)((0,r.pi)({},c&&{timeZone:c}),u&&(0,i.TB)(s,t,u,l)),h=(0,i.L6)(o,f,d);return"time"!==t||h.hour||h.minute||h.second||h.timeStyle||h.dateStyle||(h=(0,r.pi)((0,r.pi)({},h),{hour:"numeric",minute:"numeric"})),n(a,h)}function g(e,t){for(var n=[],r=2;r{"use strict";n.d(t,{$6:()=>d,OV:()=>s,Qe:()=>c,X9:()=>u,gb:()=>l,wI:()=>a});var r,i=n(43815);!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(r||(r={}));var o=function(e){function t(n,r,i){var o=this,a=i?i instanceof Error?i:new Error(String(i)):void 0;return(o=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,"\n").concat(a?"\n".concat(a.message,"\n").concat(a.stack):""))||this).code=n,"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(o,t),o}return(0,i.ZT)(t,e),t}(Error),a=function(e){function t(t,n){return e.call(this,r.UNSUPPORTED_FORMATTER,t,n)||this}return(0,i.ZT)(t,e),t}(o),s=function(e){function t(t,n){return e.call(this,r.INVALID_CONFIG,t,n)||this}return(0,i.ZT)(t,e),t}(o),l=function(e){function t(t,n){return e.call(this,r.MISSING_DATA,t,n)||this}return(0,i.ZT)(t,e),t}(o),c=function(e){function t(t,n,i){var o=e.call(this,r.FORMAT_ERROR,"".concat(t,"\nLocale: ").concat(n,"\n"),i)||this;return o.locale=n,o}return(0,i.ZT)(t,e),t}(o),u=function(e){function t(t,n,r,i){var o=e.call(this,"".concat(t,"\nMessageID: ").concat(null===r||void 0===r?void 0:r.id,"\nDefault Message: ").concat(null===r||void 0===r?void 0:r.defaultMessage,"\nDescription: ").concat(null===r||void 0===r?void 0:r.description,"\n"),n,i)||this;return o.descriptor=r,o.locale=n,o}return(0,i.ZT)(t,e),t}(c),d=function(e){function t(t,n){var i=e.call(this,r.MISSING_TRANSLATION,'Missing message: "'.concat(t.id,'" for locale "').concat(n,'", using ').concat(t.defaultMessage?"default message (".concat("string"===typeof t.defaultMessage?t.defaultMessage:t.defaultMessage.map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:JSON.stringify(e)})).join(),")"):"id"," as fallback."))||this;return i.descriptor=t,i}return(0,i.ZT)(t,e),t}(o)},79184:(e,t,n)=>{"use strict";n.d(t,{w:()=>d});var r=n(43815),i=n(32411),o=n(64185),a=n(84293),s=n(37152);function l(e,t){return Object.keys(e).reduce((function(n,i){return n[i]=(0,r.pi)({timeZone:t},e[i]),n}),{})}function c(e,t){return Object.keys((0,r.pi)((0,r.pi)({},e),t)).reduce((function(n,i){return n[i]=(0,r.pi)((0,r.pi)({},e[i]||{}),t[i]||{}),n}),{})}function u(e,t){if(!t)return e;var n=o.C.formats;return(0,r.pi)((0,r.pi)((0,r.pi)({},n),e),{date:c(l(n.date,t),l(e.date||{},t)),time:c(l(n.time,t),l(e.time||{},t))})}var d=function(e,t,n,o,l){var c=e.locale,d=e.formats,h=e.messages,f=e.defaultLocale,p=e.defaultFormats,g=e.fallbackOnEmptyString,m=e.onError,A=e.timeZone,v=e.defaultRichTextElements;void 0===n&&(n={id:""});var y=n.id,b=n.defaultMessage;(0,i.kG)(!!y,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var _=String(y),w=h&&Object.prototype.hasOwnProperty.call(h,_)&&h[_];if(Array.isArray(w)&&1===w.length&&w[0].type===s.wD.literal)return w[0].value;if(!o&&w&&"string"===typeof w&&!v)return w.replace(/'\{(.*?)\}'/gi,"{$1}");if(o=(0,r.pi)((0,r.pi)({},v),o||{}),d=u(d,A),p=u(p,A),!w){if(!1===g&&""===w)return w;if((!b||c&&c.toLowerCase()!==f.toLowerCase())&&m(new a.$6(n,c)),b)try{return t.getMessageFormat(b,f,p,l).format(o)}catch(x){return m(new a.X9('Error formatting default message for: "'.concat(_,'", rendering default message verbatim'),c,n,x)),"string"===typeof b?b:_}return _}try{return t.getMessageFormat(w,c,d,(0,r.pi)({formatters:t},l||{})).format(o)}catch(x){m(new a.X9('Error formatting message: "'.concat(_,'", using ').concat(b?"default message":"id"," as fallback."),c,n,x))}if(b)try{return t.getMessageFormat(b,f,p,l).format(o)}catch(x){m(new a.X9('Error formatting the default message for: "'.concat(_,'", rendering message verbatim'),c,n,x))}return"string"===typeof w?w:"string"===typeof b?b:_}},40089:(e,t,n)=>{"use strict";n.d(t,{L6:()=>s,Sn:()=>c,TB:()=>h,Z0:()=>l,ax:()=>d});var r=n(43815),i=n(64185),o=n(24420),a=n(84293);function s(e,t,n){return void 0===n&&(n={}),t.reduce((function(t,r){return r in e?t[r]=e[r]:r in n&&(t[r]=n[r]),t}),{})}var l={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){0},onWarn:function(e){0}};function c(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function u(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function d(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,a=Intl.DisplayNames,s=(0,o.H)((function(){for(var e,t=[],n=0;n{"use strict";n.d(t,{aN:()=>a});var r=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};const i="__googleMapsScriptId";var o;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(o||(o={}));class a{constructor(e){let{apiKey:t,authReferrerPolicy:n,channel:o,client:s,id:l=i,language:c,libraries:u=[],mapIds:d,nonce:h,region:f,retries:p=3,url:g="https://maps.googleapis.com/maps/api/js",version:m}=e;if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=n,this.channel=o,this.client=s,this.id=l||i,this.language=c,this.libraries=u,this.mapIds=d,this.nonce=h,this.region=f,this.retries=p,this.url=g,this.version=m,a.instance){if(!r(this.options,a.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(a.instance.options)));return a.instance}a.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?o.FAILURE:this.done?o.SUCCESS:this.loading?o.LOADING:o.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=".concat(this.CALLBACK),this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const e=this.createUrl(),t=document.createElement("script");t.id=this.id,t.type="text/javascript",t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.log("Failed to load Google Maps script, retrying in ".concat(e," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}},16332:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:o,height:l},u)},d),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},77229:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:o,height:l},u)},d),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},34375:(e,t,n)=>{"use strict";n.d(t,{D0:()=>l,Ew:()=>c,Kn:()=>o,Lj:()=>u,Os:()=>h,Ss:()=>a,TW:()=>s,zH:()=>d});const r=e=>"boolean"===typeof e,i=e=>"function"===typeof e,o=e=>null!==e&&"object"===typeof e,a=e=>o(e)&&e.constructor==={}.constructor,s=e=>e&&"function"===typeof e[Symbol.iterator],l=e=>e&&"function"===typeof e[Symbol.asyncIterator],c=e=>"undefined"!==typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json,u=e=>"undefined"!==typeof Blob&&e instanceof Blob,d=e=>e&&"object"===typeof e&&e.isBuffer,h=e=>(e=>"undefined"!==typeof ReadableStream&&e instanceof ReadableStream||o(e)&&i(e.tee)&&i(e.cancel)&&i(e.getReader))(e)||(e=>o(e)&&i(e.read)&&i(e.pipe)&&r(e.readable))(e)},63734:(e,t,n)=>{"use strict";n.d(t,{z:()=>$});var r=n(34375),i=n(13759),o=n(68863);function a(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const s="3.3.3";"undefined"!==typeof self&&self,"undefined"!==typeof window&&window,"undefined"!==typeof n.g&&n.g,"undefined"!==typeof document&&document;const l="object"!==typeof process||"[object process]"!==String(process)||process.browser,c="undefined"!==typeof window&&"undefined"!==typeof window.orientation,u="undefined"!==typeof process&&process.version&&/v([0-9]*)/.exec(process.version);u&&parseFloat(u[1]);var d=n(68185);class h{terminate(){}}const f=new Map;function p(e){a(e.source&&!e.url||!e.source&&e.url);let t=f.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return g((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),f.set(e.url,t)),e.source&&(t=g(e.source),f.set(e.source,t))),a(t),t}function g(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function m(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;const r=n||new Set;if(e){if(A(e))r.add(e);else if(A(e.buffer))r.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"===typeof e)for(const i in e)m(e[i],t,r)}else;return void 0===n?Array.from(r):[]}function A(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&e instanceof MessagePort||("undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}const v=()=>{};class y{static isSupported(){return"undefined"!==typeof Worker&&l||"undefined"!==typeof h&&!l}constructor(e){(0,d.Z)(this,"name",void 0),(0,d.Z)(this,"source",void 0),(0,d.Z)(this,"url",void 0),(0,d.Z)(this,"terminated",!1),(0,d.Z)(this,"worker",void 0),(0,d.Z)(this,"onMessage",void 0),(0,d.Z)(this,"onError",void 0),(0,d.Z)(this,"_loadableURL","");const{name:t,source:n,url:r}=e;a(n||r),this.name=t,this.source=n,this.url=r,this.onMessage=v,this.onError=e=>console.log(e),this.worker=l?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=v,this.onError=v,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||m(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}_createBrowserWorker(){this._loadableURL=p({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new h(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new h(this.source,{eval:!0})}return e.on("message",(e=>{this.onMessage(e)})),e.on("error",(e=>{this.onError(e)})),e.on("exit",(e=>{})),e}}class b{constructor(e,t){(0,d.Z)(this,"name",void 0),(0,d.Z)(this,"workerThread",void 0),(0,d.Z)(this,"isRunning",!0),(0,d.Z)(this,"result",void 0),(0,d.Z)(this,"_resolve",(()=>{})),(0,d.Z)(this,"_reject",(()=>{})),this.name=e,this.workerThread=t,this.result=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){a(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){a(this.isRunning),this.isRunning=!1,this._reject(e)}}class _{static isSupported(){return y.isSupported()}constructor(e){(0,d.Z)(this,"name","unnamed"),(0,d.Z)(this,"source",void 0),(0,d.Z)(this,"url",void 0),(0,d.Z)(this,"maxConcurrency",1),(0,d.Z)(this,"maxMobileConcurrency",1),(0,d.Z)(this,"onDebug",(()=>{})),(0,d.Z)(this,"reuseWorkers",!0),(0,d.Z)(this,"props",{}),(0,d.Z)(this,"jobQueue",[]),(0,d.Z)(this,"idleQueue",[]),(0,d.Z)(this,"count",0),(0,d.Z)(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach((e=>e.destroy())),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e,t,n)=>e.done(n),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e.error(t);const r=new Promise((r=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:r}),this)));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new b(t.name,e);e.onMessage=e=>t.onMessage(n,e.type,e.payload),e.onError=e=>t.onError(n,e),t.onStart(n);try{await n.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class x{static isSupported(){return y.isSupported()}static getWorkerFarm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x._workerFarm=x._workerFarm||new x({}),x._workerFarm.setProps(e),x._workerFarm}constructor(e){(0,d.Z)(this,"props",void 0),(0,d.Z)(this,"workerPools",new Map),this.props={...w},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:r}=e;let i=this.workerPools.get(t);return i||(i=new _({name:t,source:n,url:r}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}(0,d.Z)(x,"_workerFarm",void 0);const E="latest";async function S(e,t,n,r,i){const o=e.id,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t[e.id]||{},r="".concat(e.id,"-worker.js");let i=n.workerUrl;if(i||"compression"!==e.id||(i=t.workerUrl),"test"===t._workerType&&(i="modules/".concat(e.module,"/dist/").concat(r)),!i){let t=e.version;"latest"===t&&(t=E);const n=t?"@".concat(t):"";i="https://unpkg.com/@loaders.gl/".concat(e.module).concat(n,"/dist/").concat(r)}return a(i),i}(e,n),l=x.getWorkerFarm(n).getWorkerPool({name:o,url:s});n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r||{}));const c=await l.startJob("process-on-worker",C.bind(null,i));c.postMessage("process",{input:t,options:n,context:r});const u=await c.result;return await u.result}async function C(e,t,n,r){switch(n){case"done":t.done(r);break;case"error":t.error(new Error(r.error));break;case"process":const{id:o,input:a,options:s}=r;try{const n=await e(a,s);t.postMessage("done",{id:o,result:n})}catch(i){const e=i instanceof Error?i.message:"unknown error";t.postMessage("error",{id:o,error:e})}break;default:console.warn("parse-with-worker unknown message ".concat(n))}}async function P(e){const t=[];for await(const n of e)t.push(n);return function(){for(var e=arguments.length,t=new Array(e),n=0;ne instanceof ArrayBuffer?new Uint8Array(e):e)),i=r.reduce(((e,t)=>e+t.byteLength),0),o=new Uint8Array(i);let a=0;for(const s of r)o.set(s,a),a+=s.byteLength;return o.buffer}(...t)}const T=262144;const M=262144;const k=1048576;var R=n(69113),O=n(62945);function I(e){if((t=e)&&"object"===typeof t&&t.isBuffer)return O.toArrayBuffer(e);var t;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"===typeof e){const t=e;return(new TextEncoder).encode(t).buffer}if(e&&"object"===typeof e&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function L(e,t){return R.jU?async function*(e,t){const n=e.getReader();let r;try{for(;;){const e=r||n.read();null!==t&&void 0!==t&&t._streamReadAhead&&(r=n.read());const{done:i,value:o}=await e;if(i)return;yield I(o)}}catch(i){n.releaseLock()}}(e,t):async function*(e,t){for await(const n of e)yield I(n)}(e)}function D(e,t){if("string"===typeof e)return function*(e,t){const n=(null===t||void 0===t?void 0:t.chunkSize)||T;let r=0;const i=new TextEncoder;for(;r1&&void 0!==arguments[1]?arguments[1]:{};const{chunkSize:n=M}=t;let r=0;for(;r1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!V(e))return null;if(t&&!Array.isArray(t))return(0,i.T)(t);let o=[];t&&(o=o.concat(t)),null!==n&&void 0!==n&&n.ignoreRegisteredLoaders||o.push(...(0,Z.kO)()),function(e){for(const t of e)(0,i.T)(t)}(o);const a=function(e,t,n,r){const{url:i,type:o}=(0,B.l)(e),a=i||(null===r||void 0===r?void 0:r.url);let s=null,l="";null!==n&&void 0!==n&&n.mimeType&&(s=W(t,null===n||void 0===n?void 0:n.mimeType),l="match forced by supplied MIME type ".concat(null===n||void 0===n?void 0:n.mimeType));var c;s=s||function(e,t){const n=t&&U.exec(t),r=n&&n[1];return r?function(e,t){t=t.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===t)return n;return null}(e,r):null}(t,a),l=l||(s?"matched url ".concat(a):""),s=s||W(t,o),l=l||(s?"matched MIME type ".concat(o):""),s=s||function(e,t){if(!t)return null;for(const n of e)if("string"===typeof t){if(q(t,n))return n}else if(ArrayBuffer.isView(t)){if(Y(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(Y(t,0,n))return n}return null}(t,e),l=l||(s?"matched initial data ".concat(X(e)):""),s=s||W(t,null===n||void 0===n?void 0:n.fallbackMimeType),l=l||(s?"matched fallback MIME type ".concat(o):""),l&&z.log(1,"selectLoader selected ".concat(null===(c=s)||void 0===c?void 0:c.name,": ").concat(l,"."));return s}(e,o,n,r);if(!a&&(null===n||void 0===n||!n.nothrow))throw new Error(G(e));return a}function V(e){return!(e instanceof Response&&204===e.status)}function G(e){const{url:t,type:n}=(0,B.l)(e);let r="No valid loader found (";r+=t?"".concat(function(e){const t=e&&e.lastIndexOf("/");return t>=0?e.substr(t+1):""}(t),", "):"no url provided, ",r+="MIME type: ".concat(n?'"'.concat(n,'"'):"not provided",", ");const i=e?X(e):"";return r+=i?' first bytes: "'.concat(i,'"'):"first bytes: not available",r+=")",r}function W(e,t){for(const n of e){if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x.".concat(n.id))return n}return null}function q(e,t){if(t.testText)return t.testText(e);return(Array.isArray(t.tests)?t.tests:[t.tests]).some((t=>e.startsWith(t)))}function Y(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((r=>function(e,t,n,r){if(r instanceof ArrayBuffer)return function(e,t,n){if(n=n||e.byteLength,e.byteLength1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return K(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return K(e,0,t)}return""}function K(e,t,n){if(e.byteLength1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(!V(e))return null;let o=H(e,t,{...n,nothrow:!0},i);if(o)return o;if((0,r.Lj)(e)&&(o=H(e=await e.slice(0,10).arrayBuffer(),t,n,i)),!o&&(null===n||void 0===n||!n.nothrow))throw new Error(G(e));return o}(e,d,n);return h?(c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(n)return n;const r={fetch:(0,o.bV)(t,e),...e};return Array.isArray(r.loaders)||(r.loaders=null),r}({url:u,parse:Q,loaders:d},n=(0,o.GR)(n,h,d,u),c),await async function(e,t,n,i){if(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;a(e,"no worker provided");const n=e.version}(e),(0,r.Ew)(t)){const e=t,{ok:n,redirected:r,status:o,statusText:a,type:s,url:l}=e,c=Object.fromEntries(e.headers.entries());i.response={headers:c,ok:n,redirected:r,status:o,statusText:a,type:s,url:l}}if(t=await j(t,e,n),e.parseTextSync&&"string"===typeof t)return n.dataType="text",e.parseTextSync(t,n,i,e);if(function(e,t){return!!x.isSupported()&&!!(l||null!==t&&void 0!==t&&t._nodeWorkers)&&e.worker&&(null===t||void 0===t?void 0:t.worker)}(e,n))return await S(e,t,n,i,Q);if(e.parseText&&"string"===typeof t)return await e.parseText(t,n,i,e);if(e.parse)return await e.parse(t,n,i,e);throw a(!e.parseSync),new Error("".concat(e.id," loader - no parser found and worker is disabled"))}(h,e,n,c)):null}async function $(e,t,n,a){Array.isArray(t)||(0,i.C)(t)||(void 0,n=t,t=void 0);const s=(0,o.bV)(n);let l=e;return"string"===typeof e&&(l=await s(e)),(0,r.Lj)(e)&&(l=await s(e)),await Q(l,t,n)}},44219:(e,t,n)=>{"use strict";n.d(t,{fh:()=>a,kO:()=>s});var r=n(13759),i=n(68863);const o=()=>{const e=(0,i.rx)();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function a(e){const t=o();e=Array.isArray(e)?e:[e];for(const n of e){const e=(0,r.T)(n);t.find((t=>e===t))||t.unshift(e)}}function s(){return o()}},13759:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,T:()=>o});var r=n(69088);function i(e){var t;if(!e)return!1;Array.isArray(e)&&(e=e[0]);return Array.isArray(null===(t=e)||void 0===t?void 0:t.extensions)}function o(e){var t,n;let o;return(0,r.h)(e,"null loader"),(0,r.h)(i(e),"invalid loader"),Array.isArray(e)&&(o=e[1],e=e[0],e={...e,options:{...e.options,...o}}),(null!==(t=e)&&void 0!==t&&t.parseTextSync||null!==(n=e)&&void 0!==n&&n.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}},68863:(e,t,n)=>{"use strict";n.d(t,{bV:()=>A,rx:()=>p,GR:()=>m});var r=n(34375);let i="";const o={};var a=n(33441);async function s(e,t){if("string"===typeof e){e=function(e){for(const t in o)if(e.startsWith(t)){const n=o[t];e=e.replace(t,n)}return e.startsWith("http://")||e.startsWith("https://")||(e="".concat(i).concat(e)),e}(e);let n=t;return null!==t&&void 0!==t&&t.fetch&&"function"!==typeof(null===t||void 0===t?void 0:t.fetch)&&(n=t.fetch),await fetch(e,n)}return await(0,a.L1)(e)}var l=n(68185);const c=new(n(20251).Z)({id:"loaders.gl"});class u{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}var d=n(69113);const h={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){(0,l.Z)(this,"console",void 0),this.console=console}log(){for(var e=arguments.length,t=new Array(e),n=0;n{const e=p();return e.globalOptions=e.globalOptions||{...h},e.globalOptions};function m(e,t,n,r){return n=n||[],function(e,t){v(e,null,h,f,t);for(const n of t){const r=e&&e[n.id]||{},i=n.options&&n.options[n.id]||{},o=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};v(r,n.id,i,o,t)}}(e,n=Array.isArray(n)?n:[n]),b(t,e,r)}function A(e,t){const n=g(),i=e||n;return"function"===typeof i.fetch?i.fetch:(0,r.Kn)(i.fetch)?e=>s(e,i):null!==t&&void 0!==t&&t.fetch?null===t||void 0===t?void 0:t.fetch:s}function v(e,t,n,i,o){const a=t||"Top level",s=t?"".concat(t,"."):"";for(const l in e){const u=!t&&(0,r.Kn)(e[l]);if(!(l in n)&&!("baseUri"===l&&!t)&&!("workerUrl"===l&&t))if(l in i)c.warn("".concat(a," loader option '").concat(s).concat(l,"' no longer supported, use '").concat(i[l],"'"))();else if(!u){const e=y(l,o);c.warn("".concat(a," loader option '").concat(s).concat(l,"' not recognized. ").concat(e))()}}}function y(e,t){const n=e.toLowerCase();let r="";for(const i of t)for(const t in i.options){if(e===t)return"Did you mean '".concat(i.id,".").concat(t,"'?");const o=t.toLowerCase();(n.startsWith(o)||o.startsWith(n))&&(r=r||"Did you mean '".concat(i.id,".").concat(t,"'?"))}return r}function b(e,t,n){const r={...e.options||{}};return function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}(r,n),null===r.log&&(r.log=new u),_(r,g()),_(r,t),r}function _(e,t){for(const n in t)if(n in t){const i=t[n];(0,r.Ss)(i)&&(0,r.Ss)(e[n])?e[n]={...e[n],...t[n]}:e[n]=t[n]}}},51379:(e,t,n)=>{"use strict";n.d(t,{C:()=>u,l:()=>c});var r=n(34375);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function a(e){const t=o.exec(e);return t?t[1]:e}function s(e){const t=i.exec(e);return t?t[1]:""}const l=/\?.*/;function c(e){if((0,r.Ew)(e)){const t=d(e.url||"");return{url:t,type:a(e.headers.get("content-type")||"")||s(t)}}return(0,r.Lj)(e)?{url:d(e.name||""),type:e.type||""}:"string"===typeof e?{url:d(e),type:s(e)}:{url:"",type:""}}function u(e){return(0,r.Ew)(e)?e.headers["content-length"]||-1:(0,r.Lj)(e)?e.size:"string"===typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}function d(e){return e.replace(l,"")}},33441:(e,t,n)=>{"use strict";n.d(t,{L1:()=>o,mm:()=>a});var r=n(34375),i=n(51379);async function o(e){if((0,r.Ew)(e))return e;const t={},n=(0,i.C)(e);n>=0&&(t["content-length"]=String(n));const{url:o,type:a}=(0,i.l)(e);a&&(t["content-type"]=a);const s=await async function(e){const t=5;if("string"===typeof e)return"data:,".concat(e.slice(0,t));if(e instanceof Blob){const t=e.slice(0,5);return await new Promise((e=>{const n=new FileReader;n.onload=t=>{var n;return e(null===t||void 0===t||null===(n=t.target)||void 0===n?void 0:n.result)},n.readAsDataURL(t)}))}if(e instanceof ArrayBuffer){const n=function(e){let t="";const n=new Uint8Array(e);for(let r=0;r60?"".concat(t.slice(0,60),"..."):t}catch(n){}return t}(e);throw new Error(t)}}},68072:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binaryToGeoJson:()=>u.cN,binaryToGeojson:()=>u.F_,binaryToGeometry:()=>u.fb,flatGeojsonToBinary:()=>r.E,geojsonToBinary:()=>c,geojsonToFlatGeojson:()=>o,transformBinaryCoords:()=>d,transformGeoJsonCoords:()=>f});var r=n(23140);var i=n(8766);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{coordLength:2,fixRingWinding:!0};return e.map((e=>function(e,t){const{geometry:n}=e;if("GeometryCollection"===n.type)throw new Error("GeometryCollection type not supported");const r=[],i=[];let o,c;switch(n.type){case"Point":c="Point",a(n.coordinates,r,i,t);break;case"MultiPoint":c="Point",n.coordinates.map((e=>a(e,r,i,t)));break;case"LineString":c="LineString",s(n.coordinates,r,i,t);break;case"MultiLineString":c="LineString",n.coordinates.map((e=>s(e,r,i,t)));break;case"Polygon":c="Polygon",o=[],l(n.coordinates,r,i,o,t);break;case"MultiPolygon":c="Polygon",o=[],n.coordinates.map((e=>l(e,r,i,o,t)));break;default:throw new Error("Unknown type: ".concat(c))}return{...e,geometry:{type:c,indices:i,data:r,areas:o}}}(e,t)))}function a(e,t,n,r){n.push(t.length),t.push(...e);for(let i=e.length;ie.slice(0,2)));let n=(0,i.getPolygonSignedArea)(e.flat());const r=n<0;o.fixRingWinding&&(0===a&&!r||a>0&&r)&&(u.reverse(),n=-n),l.push(n),s(u,t,c,o),a++}a>0&&(r.push(l),n.push(c))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fixRingWinding:!0};const n=function(e){let t=0,n=0,r=0,i=0,o=0,a=0,s=0,l=0,c=0;const u=new Set;for(const d of e){const e=d.geometry;switch(e.type){case"Point":n++,t++,u.add(e.coordinates.length);break;case"MultiPoint":n++,t+=e.coordinates.length;for(const t of e.coordinates)u.add(t.length);break;case"LineString":o++,r+=e.coordinates.length,i++;for(const t of e.coordinates)u.add(t.length);break;case"MultiLineString":o++;for(const t of e.coordinates){r+=t.length,i++;for(const e of t)u.add(e.length)}break;case"Polygon":c++,s++,l+=e.coordinates.length;const d=e.coordinates.flat();a+=d.length;for(const e of d)u.add(e.length);break;case"MultiPolygon":c++;for(const t of e.coordinates){s++,l+=t.length;const e=t.flat();a+=e.length;for(const t of e)u.add(t.length)}break;default:throw new Error("Unsupported geometry type: ".concat(e.type))}}return{coordLength:u.size>0?Math.max(...u):2,pointPositionsCount:t,pointFeaturesCount:n,linePositionsCount:r,linePathsCount:i,lineFeaturesCount:o,polygonPositionsCount:a,polygonObjectsCount:s,polygonRingsCount:l,polygonFeaturesCount:c}}(e),i=n.coordLength,{fixRingWinding:a}=t,s=o(e,{coordLength:i,fixRingWinding:a});return(0,r.E)(s,n,{numericPropKeys:t.numericPropKeys,PositionDataType:t.PositionDataType||Float32Array})}var u=n(60501);function d(e,t){return e.points&&h(e.points,t),e.lines&&h(e.lines,t),e.polygons&&h(e.polygons,t),e}function h(e,t){const{positions:n}=e;for(let r=0;rp(e,t)))}},60501:(e,t,n)=>{"use strict";function r(e,t){const n=null===t||void 0===t?void 0:t.globalFeatureId;return void 0!==n?function(e,t){const n=s(e);for(const r of n){let e=0,n=r.featureIds.value[0];for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:"feature";switch(n){case"feature":return o(e,t);case"geometry":return a(e);default:throw new Error(n)}}function o(e,t){return function(e){const t=[];for(const n of e){if(0===n.featureIds.value.length)continue;let e=0,r=n.featureIds.value[0];for(let i=0;i1)return{type:"MultiPoint",coordinates:i};return{type:"Point",coordinates:i[0]}}(e,t,n);case"LineString":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:r}=e,i=e.pathIndices.value.filter((e=>e>=t&&e<=n));if(!(i.length>2)){return{type:"LineString",coordinates:u(r,i[0],i[1])}}const o=[];for(let a=0;a1&&void 0!==arguments[1]?arguments[1]:0;const n=Object.assign({},e.properties[e.featureIds.value[t]]);for(const r in e.numericProps)n[r]=e.numericProps[r].value[t];return n}(e,t,n),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.fields&&e.fields[e.featureIds.value[t]]}(e,t,n);return{type:"Feature",geometry:r,properties:i,...o}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:r}=e,i=e.polygonIndices.value.filter((e=>e>=t&&e<=n)),o=e.primitivePolygonIndices.value.filter((e=>e>=t&&e<=n));if(!(i.length>2)){const e=[];for(let t=0;tr,cN:()=>i,fb:()=>a})},23140:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(8766);function i(e,t,n){const r=o(e),i=Object.keys(r).filter((e=>r[e]!==Array));return function(e,t,n){const{pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:o,linePathsCount:c,lineFeaturesCount:d,polygonPositionsCount:f,polygonObjectsCount:p,polygonRingsCount:g,polygonFeaturesCount:m,propArrayTypes:A,coordLength:v}=t,{numericPropKeys:y=[],PositionDataType:b=Float32Array}=n,_=e[0]&&"id"in e[0],w=e.length>65535?Uint32Array:Uint16Array,x={type:"Point",positions:new b(r*v),globalFeatureIds:new w(r),featureIds:i>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[],fields:[]},E={type:"LineString",pathIndices:o>65535?new Uint32Array(c+1):new Uint16Array(c+1),positions:new b(o*v),globalFeatureIds:new w(o),featureIds:d>65535?new Uint32Array(o):new Uint16Array(o),numericProps:{},properties:[],fields:[]},S={type:"Polygon",polygonIndices:f>65535?new Uint32Array(p+1):new Uint16Array(p+1),primitivePolygonIndices:f>65535?new Uint32Array(g+1):new Uint16Array(g+1),positions:new b(f*v),triangles:[],globalFeatureIds:new w(f),featureIds:m>65535?new Uint32Array(f):new Uint16Array(f),numericProps:{},properties:[],fields:[]};for(const a of[x,E,S])for(const e of y){const t=A[e];a.numericProps[e]=new t(a.positions.length/v)}E.pathIndices[c]=o,S.polygonIndices[p]=f,S.primitivePolygonIndices[g]=f;const C={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0};for(const u of e){const e=u.geometry,t=u.properties||{};switch(e.type){case"Point":a(e,x,C,v,t),x.properties.push(h(t,y)),_&&x.fields.push({id:u.id}),C.pointFeature++;break;case"LineString":s(e,E,C,v,t),E.properties.push(h(t,y)),_&&E.fields.push({id:u.id}),C.lineFeature++;break;case"Polygon":l(e,S,C,v,t),S.properties.push(h(t,y)),_&&S.fields.push({id:u.id}),C.polygonFeature++;break;default:throw new Error("Invalid geometry type")}C.feature++}return function(e,t,n,r){return{points:{...e,positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:u(e.numericProps,1)},lines:{...t,positions:{value:t.positions,size:r},pathIndices:{value:t.pathIndices,size:1},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},numericProps:u(t.numericProps,1)},polygons:{...n,positions:{value:n.positions,size:r},polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},triangles:{value:new Uint32Array(n.triangles),size:1},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},numericProps:u(n.numericProps,1)}}}(x,E,S,v)}(e,{propArrayTypes:r,...t},{numericPropKeys:n&&n.numericPropKeys||i,PositionDataType:n?n.PositionDataType:Float32Array})}function o(e){const t={};for(const n of e)if(n.properties)for(const e in n.properties){const r=n.properties[e];t[e]=f(r,t[e])}return t}function a(e,t,n,r,i){t.positions.set(e.data,n.pointPosition*r);const o=e.data.length/r;d(t,i,n.pointPosition,o),t.globalFeatureIds.fill(n.feature,n.pointPosition,n.pointPosition+o),t.featureIds.fill(n.pointFeature,n.pointPosition,n.pointPosition+o),n.pointPosition+=o}function s(e,t,n,r,i){t.positions.set(e.data,n.linePosition*r);const o=e.data.length/r;d(t,i,n.linePosition,o),t.globalFeatureIds.fill(n.feature,n.linePosition,n.linePosition+o),t.featureIds.fill(n.lineFeature,n.linePosition,n.linePosition+o);for(let a=0,s=e.indices.length;a(e-d)/s)),f=(0,r.earcut)(u,h,s,t);for(let r=0,p=f.length;r{"use strict";function r(e,t){if(!e)throw new Error(t||"loader assertion failed.")}n.d(t,{h:()=>r})},69113:(e,t,n)=>{"use strict";n.d(t,{jU:()=>r});"undefined"!==typeof self&&self,"undefined"!==typeof window&&window,"undefined"!==typeof n.g&&n.g,"undefined"!==typeof document&&document;const r=Boolean("object"!==typeof process||"[object process]"!==String(process)||process.browser),i="undefined"!==typeof process&&process.version&&/v([0-9]*)/.exec(process.version);i&&parseFloat(i[1])},45802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readTag=t.readFeature=t.project=t.classifyRings=void 0;const r=n(8766);function i(e,t){const n=e.readVarint()+e.pos;for(;e.pos{"use strict";function n(e){let t=0;for(let n,r,i=0,o=e.length-1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEST_EXPORTS=void 0;const r=n(45802);let i,o,a,s,l,c,u;t.TEST_EXPORTS={classifyRings:r.classifyRings};t.default=class{constructor(e,t,n,i,o,a){this.properties={},this.extent=n,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=i,this._values=o,this._geometryInfo=a,e.readFields(r.readFeature,this,t)}loadGeometry(){const e=this._pbf;e.pos=this._geometry,i=e.readVarint()+e.pos,o=1,s=0,l=0,c=0,u=0;const t=[],n=[];for(;e.pos>3),s--,1===o||2===o)l+=e.readSVarint(),c+=e.readSVarint(),1===o&&t.push(u),n.push(l,c),u+=2;else{if(7!==o)throw new Error("unknown command ".concat(o));if(u>0){const e=t[t.length-1];n.push(n[e],n[e+1]),u+=2}}return{data:n,indices:t}}_toBinaryCoordinates(e){const t=this.loadGeometry();let n;e(t.data,this);switch(this.type){case 1:this._geometryInfo.pointFeaturesCount++,this._geometryInfo.pointPositionsCount+=t.indices.length,n={type:"Point",...t};break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=t.indices.length,this._geometryInfo.linePositionsCount+=t.data.length/2,n={type:"LineString",...t};break;case 3:n=(0,r.classifyRings)(t),this._geometryInfo.polygonFeaturesCount++,this._geometryInfo.polygonObjectsCount+=n.indices.length;for(const e of n.indices)this._geometryInfo.polygonRingsCount+=e.length;this._geometryInfo.polygonPositionsCount+=n.data.length/2;break;default:throw new Error("Invalid geometry type: ".concat(this.type))}const i={type:"Feature",geometry:n,properties:this.properties};return null!==this.id&&(i.id=this.id),i}toBinaryCoordinates(e){if("function"===typeof e)return this._toBinaryCoordinates(e);const{x:t,y:n,z:i}=e,o=this.extent*Math.pow(2,i),a=this.extent*t,s=this.extent*n;return this._toBinaryCoordinates((e=>(0,r.project)(e,a,s,o)))}}},29243:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(30500));function o(e,t,n){t&&n&&(15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){let t=null;const n=e.readVarint()+e.pos;for(;e.pos>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}t.default=class{constructor(e,t){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(o,this,t),this.length=this._features.length}feature(e,t){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];const n=this._pbf.readVarint()+this._pbf.pos;return new i.default(this._pbf,n,this.extent,this._keys,this._values,t)}}},27615:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(29243));function o(e,t,n){if(3===e&&n){const e=new i.default(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}t.default=class{constructor(e,t){this.layers=e.readFields(o,{},t)}}},85847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(69209);class i{static get types(){return["Unknown","Point","LineString","Polygon"]}constructor(e,t,n,i,o){this.properties={},this.extent=n,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=i,this._values=o,e.readFields(r.readFeature,this,t)}loadGeometry(){const e=this._pbf;e.pos=this._geometry;const t=e.readVarint()+e.pos;let n=1,r=0,i=0,o=0;const a=[];let s;for(;e.pos>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),1===n&&(s&&a.push(s),s=[]),s&&s.push([i,o]);else{if(7!==n)throw new Error("unknown command ".concat(n));s&&s.push(s[0].slice())}}return s&&a.push(s),a}bbox(){const e=this._pbf;e.pos=this._geometry;const t=e.readVarint()+e.pos;let n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,c=-1/0;for(;e.pos>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),is&&(s=i),oc&&(c=o);else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,l,s,c]}_toGeoJSON(e){let t,n,o=this.loadGeometry(),a=i.types[this.type];switch(this.type){case 1:const i=[];for(t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}t.default=class{constructor(e,t){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(o,this,t),this.length=this._features.length}feature(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];const t=this._pbf.readVarint()+this._pbf.pos;return new i.default(this._pbf,t,this.extent,this._keys,this._values)}}},36452:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(34925));function o(e,t,n){if(3===e&&n){const e=new i.default(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}t.default=class{constructor(e,t){this.layers=e.readFields(o,{},t)}}},64274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(68072),o=r(n(30576)),a=r(n(36452)),s=r(n(27615));function l(e,t){const[n,r]=function(e,t){const n=[],r={coordLength:2,pointPositionsCount:0,pointFeaturesCount:0,linePositionsCount:0,linePathsCount:0,lineFeaturesCount:0,polygonPositionsCount:0,polygonObjectsCount:0,polygonRingsCount:0,polygonFeaturesCount:0};if(e.byteLength<=0)return[n,r];const i=new s.default(new o.default(e)),a=t&&Array.isArray(t.layers)?t.layers:Object.keys(i.layers);return a.forEach((e=>{const o=i.layers[e];if(o)for(let i=0;i{const i=r.layers[e];if(i)for(let r=0;r{"use strict";n.d(t,{Z:()=>r});const r={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},16621:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(39042),i=n(59661);const o={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};class a{static get DRAW_MODE(){return o}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=(0,r.hQ)("geometry"),drawMode:n=o.TRIANGLES,attributes:i={},indices:a=null,vertexCount:s=null}=e;this.id=t,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(i,a),this.vertexCount=s||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(e){return"Geometry ".concat(this.id," attribute ").concat(e)}_setAttributes(e,t){t&&(this.indices=ArrayBuffer.isView(t)?{value:t,size:1}:t);for(const n in e){let t=e[n];t=ArrayBuffer.isView(t)?{value:t}:t,(0,i.h)(ArrayBuffer.isView(t.value),"".concat(this._print(n),": must be typed array or object with value as typed array")),"POSITION"!==n&&"positions"!==n||t.size||(t.size=3),"indices"===n?((0,i.h)(!this.indices),this.indices=t):this.attributes[n]=t}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(e,t){if(t)return t.value.length;let n=1/0;for(const r in e){const t=e[r],{value:i,size:o,constant:a}=t;!a&&i&&o>=1&&(n=Math.min(n,i.length/o))}return(0,i.h)(Number.isFinite(n)),n}}},44548:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L});var r=n(76195),i=n(68833),o=n(39042),a=n(59661),s=n(36708),l=n(32073),c=n(71254),u=n(64180),d=n(1112);let h=null;function f(e,t){var n;return new e((n=e.BYTES_PER_ELEMENT*t,(!h||h.byteLength1&&void 0!==arguments[1]?arguments[1]:{}).constantAttributeZero||((0,r.D0)(e)||"Chrome"===(0,p.Z)())}static getDefaultArray(e){return e.luma=e.luma||{},e.luma.defaultVertexArray||(e.luma.defaultVertexArray=new g(e,{handle:null,isDefaultArray:!0})),e.luma.defaultVertexArray}static getMaxAttributes(e){return g.MAX_ATTRIBUTES=g.MAX_ATTRIBUTES||e.getParameter(34921),g.MAX_ATTRIBUTES}static setConstant(e,t,n){switch(n.constructor){case Float32Array:g._setConstantFloatArray(e,t,n);break;case Int32Array:g._setConstantIntArray(e,t,n);break;case Uint32Array:g._setConstantUintArray(e,t,n);break;default:(0,a.h)(!1)}}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.id||t.program&&t.program.id;super(e,Object.assign({},t,{id:n})),this.buffer=null,this.bufferValue=null,this.isDefaultArray=t.isDefaultArray||!1,this.gl2=e,this.initialize(t),Object.seal(this)}delete(){return super.delete(),this.buffer&&this.buffer.delete(),this}get MAX_ATTRIBUTES(){return g.getMaxAttributes(this.gl)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(e)}setProps(e){return this}setElementBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,a.h)(!e||34963===e.target,"elements must be GL.ELEMENT_ARRAY_BUFFER"),this.bind((()=>{this.gl.bindBuffer(34963,e?e.handle:null)})),this}setBuffer(e,t,n){if(34963===t.target)return this.setElementBuffer(t,n);const{size:i,type:o,stride:s,offset:l,normalized:c,integer:u,divisor:d}=n,{gl:h,gl2:f}=this;return e=Number(e),this.bind((()=>{h.bindBuffer(34962,t.handle),u?((0,a.h)((0,r.D0)(h)),f.vertexAttribIPointer(e,i,o,s,l)):h.vertexAttribPointer(e,i,o,c,s,l),h.enableVertexAttribArray(e),f.vertexAttribDivisor(e,d||0)})),this}enable(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!t&&0===e&&!g.isSupported(this.gl,{constantAttributeZero:!0})||(e=Number(e),this.bind((()=>t?this.gl.enableVertexAttribArray(e):this.gl.disableVertexAttribArray(e)))),this}getConstantBuffer(e,t){const n=this._normalizeConstantArrayValue(t),r=n.byteLength*e,i=n.length*e;let o=!this.buffer;if(this.buffer=this.buffer||new u.Z(this.gl,r),o=o||this.buffer.reallocate(r),o=o||!this._compareConstantArrayValues(n,this.bufferValue),o){const e=f(t.constructor,i);!function(e){let{target:t,source:n,start:r=0,count:i=1}=e;const o=n.length,a=i*o;let s=0;for(let l=r;s34373===e?this.gl.getVertexAttribOffset(n,e):this.gl.getVertexAttrib(n,e)))}}var m=n(43331);const A=/^(.+)__LOCATION_([0-9]+)$/,v=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class y{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.id||t.program&&t.program.id;this.id=n,this.gl=e,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={},this.vertexArrayObject=new g(e),(0,m.F)(this,"VertexArray","v6.0",v),this.initialize(t),Object.seal(this)}delete(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(e)}reset(){this.elements=null,this.elementsAccessor=null;const{MAX_ATTRIBUTES:e}=this.vertexArrayObject;return this.values=new Array(e).fill(null),this.accessors=new Array(e).fill(null),this.unused={},this.drawParams=null,this}setProps(e){return"program"in e&&(this.configuration=e.program&&e.program.configuration),"configuration"in e&&(this.configuration=e.configuration),"attributes"in e&&this.setAttributes(e.attributes),"elements"in e&&this.setElementBuffer(e.elements),"bindOnUse"in e&&(e=e.bindOnUse),this}clearDrawParams(){this.drawParams=null}getDrawParams(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}setAttributes(e){return Object.assign(this.attributes,e),this.vertexArrayObject.bind((()=>{for(const t in e){const n=e[t];this._setAttribute(t,n)}this.gl.bindBuffer(34962,null)})),this}setElementBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=e,this.elementsAccessor=t,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(e,t),this}setBuffer(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===t.target)return this.setElementBuffer(t,n);const{location:r,accessor:i}=this._resolveLocationAndAccessor(e,t,t.accessor,n);return r>=0&&(this.values[r]=t,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.setBuffer(r,t,i)),this}setConstant(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{location:r,accessor:i}=this._resolveLocationAndAccessor(e,t,Object.assign({size:t.length},n));return r>=0&&(t=this.vertexArrayObject._normalizeConstantArrayValue(t),this.values[r]=t,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.enable(r,!1)),this}unbindBuffers(){return this.vertexArrayObject.bind((()=>{this.elements&&this.vertexArrayObject.setElementBuffer(null),this.buffer=this.buffer||new u.Z(this.gl,{accessor:{size:4}});for(let e=0;e{this.elements&&this.setElementBuffer(this.elements);for(let e=0;e{this._setConstantAttributes(e,t),r=n()})),r}_resolveLocationAndAccessor(e,t,n,i){const o={location:-1,accessor:null},{location:s,name:l}=this._getAttributeIndex(e);if(!Number.isFinite(s)||s<0)return this.unused[e]=t,r.cM.once(3,(()=>"unused value ".concat(e," in ").concat(this.id)))(),o;const u=this._getAttributeInfo(l||s);if(!u)return o;const d=this.accessors[s]||{},h=c.Z.resolve(u.accessor,d,n,i),{size:f,type:p}=h;return(0,a.h)(Number.isFinite(f)&&Number.isFinite(p)),{location:s,accessor:h}}_getAttributeInfo(e){return this.configuration&&this.configuration.getAttributeInfo(e)}_getAttributeIndex(e){const t=Number(e);if(Number.isFinite(t))return{location:t};const n=A.exec(e),r=n?n[1]:e,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}_setAttribute(e,t){if(t instanceof u.Z)this.setBuffer(e,t);else if(Array.isArray(t)&&t.length&&t[0]instanceof u.Z){const n=t[0],r=t[1];this.setBuffer(e,n,r)}else if(ArrayBuffer.isView(t)||Array.isArray(t)){const n=t;this.setConstant(e,n)}else{if(!(t.buffer instanceof u.Z))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");{const n=t;this.setBuffer(e,n.buffer,n)}}}_setConstantAttributes(e,t){const n=Math.max(0|e,0|t);let r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(let i=1;i0;if(e.isInstanced=e.isInstanced||o,n instanceof u.Z){const t=n;if(o){const n=t.getVertexCount(r);e.instanceCount=Math.min(e.instanceCount,n)}else{const n=t.getVertexCount(r);e.vertexCount=Math.min(e.vertexCount,n)}}}setElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.cM.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(e,t)}}var b=n(73011),_=n(55562),w=n(2187);function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isInteger:n=!1}=t;if(Array.isArray(e)||ArrayBuffer.isView(e))return function(e,t){const{maxElts:n=16,size:r=1}=t;let i="[";for(let a=0;a0&&(i+=",".concat(a%r===0?" ":"")),i+=x(e[a],t);const o=e.length>n?"...":"]";return"".concat(i).concat(o)}(e,t);if(!Number.isFinite(e))return String(e);if(Math.abs(e)<1e-16)return n?"0":"0.";if(n)return e.toFixed(0);if(Math.abs(e)>100&&Math.abs(e)<1e4)return e.toFixed(0);const r=e.toPrecision(2);return r.indexOf(".0")===r.length-2?r.slice(0,-1):r}function E(e,t,n,r){const{gl:i}=e;if(!t)return{[r]:"null","Format ":"N/A"};let o,a,s,l="NOT PROVIDED",c=1,d=0,h=0;if(n&&(l=n.type,c=n.size,l=String(l).replace("Array",""),o=-1!==l.indexOf("nt")),t instanceof u.Z){const e=t,{data:u,changed:f}=e.getDebugData();let p;if(a=f?"*":"",s=u,h=e.byteLength,d=h/u.BYTES_PER_ELEMENT/c,n){const e=n.divisor>0;p="".concat(e?"I ":"P "," ").concat(d," (x").concat(c,"=").concat(h," bytes ").concat((0,_.km)(i,l),")")}else o=!0,p="".concat(h," bytes");return{[r]:"".concat(a).concat(x(s,{size:c,isInteger:o})),"Format ":p}}return s=t,c=t.length,l=String(t.constructor.name).replace("Array",""),o=-1!==l.indexOf("nt"),{[r]:"".concat(x(s,{size:c,isInteger:o})," (constant)"),"Format ":"".concat(c,"x").concat(l," (constant)")}}function S(e,t){const{type:n,size:r}=t,i=(0,w.jG)(n,r);return i?"".concat(e," (").concat(i.name,")"):e}function C(e){let{header:t="Uniforms",program:n,uniforms:r,undefinedOnly:i=!1}=e;(0,a.h)(n);const o=".*Matrix",s=n._uniformSetters,l={},c=Object.keys(s).sort();let u=0;for(const a of c)a.match(".*_.*")||a.match(o)||P({table:l,header:t,uniforms:r,uniformName:a,undefinedOnly:i})&&u++;for(const a of c)a.match(o)&&P({table:l,header:t,uniforms:r,uniformName:a,undefinedOnly:i})&&u++;for(const a of c)l[a]||P({table:l,header:t,uniforms:r,uniformName:a,undefinedOnly:i})&&u++;let d=0;const h={};if(!i)for(const a in r){const e=r[a];l[a]||(d++,h[a]={Type:"NOT USED: ".concat(e),[t]:x(e)})}return{table:l,count:u,unusedTable:h,unusedCount:d}}function P(e){let{table:t,header:n,uniforms:r,uniformName:i,undefinedOnly:o}=e;const a=r[i],s=function(e){return void 0!==e&&null!==e}(a);return(!o||!s)&&(t[i]={[n]:s?x(a):"N/A","Uniform Type":s?a:"NOT PROVIDED"},!0)}function T(e){const{type:t,size:n}=e.accessor,r=(0,w.jG)(t,n);return r?"".concat(r.name," ").concat(e.name):e.name}const M={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function k(e,t){const{attributeMap:n=M}=t||{};return n&&n[e]||e}function R(e,t){let n;switch(e){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":t.size=t.size||3;break;case"uvs":t.size=t.size||2}(0,a.h)(Number.isFinite(t.size),"attribute ".concat(e," needs size"))}const O=()=>{},I={};class L{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{id:n=(0,o.hQ)("model")}=t;(0,a.h)((0,r.UF)(e)),this.id=n,this.gl=e,this.id=t.id||(0,o.hQ)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(t)}initialize(e){this.props={},this.programManager=e.programManager||i.Z.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:t=null,vs:n,fs:r,modules:o,defines:s,inject:l,varyings:c,bufferMode:u,transpileToGLSL100:d}=e;this.programProps={program:t,vs:n,fs:r,modules:o,defines:s,inject:l,varyings:c,bufferMode:u,transpileToGLSL100:d},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(e.moduleSettings))),this.drawMode=void 0!==e.drawMode?e.drawMode:4,this.vertexCount=e.vertexCount||0,this.geometryBuffers={},this.isInstanced=e.isInstanced||e.instanced||e.instanceCount>0,this._setModelProps(e),this.geometry={},(0,a.h)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}setProps(e){this._setModelProps(e)}delete(){for(const e in this._attributes)this._attributes[e]!==this.attributes[e]&&this._attributes[e].delete();this._managedProgram&&(this.programManager.release(this.program),this._managedProgram=!1),this.vertexArray.delete(),this._deleteGeometryBuffers()}getDrawMode(){return this.drawMode}getVertexCount(){return this.vertexCount}getInstanceCount(){return this.instanceCount}getAttributes(){return this.attributes}getProgram(){return this.program}setProgram(e){const{program:t,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:l,transpileToGLSL100:c}=e;this.programProps={program:t,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:l,transpileToGLSL100:c},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(e){return this.drawMode=e,this}setVertexCount(e){return(0,a.h)(Number.isFinite(e)),this.vertexCount=e,this}setInstanceCount(e){return(0,a.h)(Number.isFinite(e)),this.instanceCount=e,this}setGeometry(e){return this.drawMode=e.drawMode,this.vertexCount=e.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(e,t,n){const r={};let i=t.indices;for(const o in t.attributes){const a=t.attributes[o],s=k(o,n);if("indices"===o)i=a;else if(a.constant)r[s]=a.value;else{const t=a.value,n={...a};delete n.value,r[s]=[new u.Z(e,t),n],R(o,n)}}if(i){const t=i.value||i;(0,a.h)(t instanceof Uint16Array||t instanceof Uint32Array,'attribute array for "indices" must be of integer type');const n={size:1,isIndexed:void 0===i.isIndexed||i.isIndexed};r.indices=[new u.Z(e,{data:t,target:34963}),n]}return r}(this.gl,e),this.vertexArray.setAttributes(this.geometryBuffers),this}setAttributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.nK)(e))return this;const t={};for(const n in e){const r=e[n];t[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(t),this}setUniforms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,e),this}getModuleUniforms(e){this._checkProgram();const t=this.programManager.getUniforms(this.program);return t?t(e):{}}updateModuleSettings(e){const t=this.getModuleUniforms(e||{});return this.setUniforms(t)}clear(e){return(0,s.Z)(this.program.gl,e),this}draw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();const{moduleSettings:t=null,framebuffer:n,uniforms:i={},attributes:o={},transformFeedback:a=this.transformFeedback,parameters:s={},vertexArray:l=this.vertexArray}=e;let c;this.setAttributes(o),this.updateModuleSettings(t),this.setUniforms(i),r.cM.priority>=2&&(c=this._logDrawCallStart(2));const u=this.vertexArray.getDrawParams(),{isIndexed:d=u.isIndexed,indexType:h=u.indexType,indexOffset:f=u.indexOffset,vertexArrayInstanced:p=u.isInstanced}=this.props;p&&!this.isInstanced&&r.cM.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:g,instanceCount:m}=this,{onBeforeRender:A=O,onAfterRender:v=O}=this.props;A(),this.program.setUniforms(this.uniforms);const y=this.program.draw(Object.assign(I,e,{logPriority:c,uniforms:null,framebuffer:n,parameters:s,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:l,transformFeedback:a,isIndexed:d,indexType:h,isInstanced:g,instanceCount:m,offset:d?f:0}));return v(),r.cM.priority>=2&&this._logDrawCallEnd(c,l,n),y}transform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{discard:t=!0,feedbackBuffers:n,unbindModels:r=[]}=e;let{parameters:i}=e;n&&this._setFeedbackBuffers(n),t&&(i=Object.assign({},i,{35977:t})),r.forEach((e=>e.vertexArray.unbindBuffers()));try{this.draw(Object.assign({},e,{parameters:i}))}finally{r.forEach((e=>e.vertexArray.bindBuffers()))}return this}render(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.cM.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(e).draw()}_setModelProps(e){Object.assign(this.props,e),"uniforms"in e&&this.setUniforms(e.uniforms),"pickable"in e&&(this.pickable=e.pickable),"instanceCount"in e&&(this.instanceCount=e.instanceCount),"geometry"in e&&this.setGeometry(e.geometry),"attributes"in e&&this.setAttributes(e.attributes),"_feedbackBuffers"in e&&this._setFeedbackBuffers(e._feedbackBuffers)}_checkProgram(){if(!(this._programDirty||this.programManager.stateHash!==this._programManagerState))return;let{program:e}=this.programProps;if(e)this._managedProgram=!1;else{const{vs:t,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:l}=this.programProps;e=this.programManager.get({vs:t,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:l}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}(0,a.h)(e instanceof l.Z,"Model needs a program"),this._programDirty=!1,e!==this.program&&(this.program=e,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new y(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}_deleteGeometryBuffers(){for(const e in this.geometryBuffers){const t=this.geometryBuffers[e][0]||this.geometryBuffers[e];t instanceof u.Z&&t.delete()}}_setAnimationProps(e){this.animated&&(0,a.h)(e,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.nK)(e))return this;const{gl:t}=this.program;return this.transformFeedback=this.transformFeedback||new b.Z(t,{program:this.program}),this.transformFeedback.setBuffers(e),this}_logDrawCallStart(e){const t=e>3?0:1e4;if(!(Date.now()-this.lastLogTime>> DRAWING MODEL ".concat(this.id),{collapsed:r.cM.level<=2})(),e}_logDrawCallEnd(e,t,n,i){if(void 0===e)return;const o=function(e){let{vertexArray:t,header:n="Attributes"}=e;if(!t.configuration)return{};const r={};t.elements&&(r.ELEMENT_ARRAY_BUFFER=E(t,t.elements,null,n));const i=t.values;for(const o in i){const e=t._getAttributeInfo(o);if(e){let a="".concat(o,": ").concat(e.name);const s=t.accessors[e.location];s&&(a="".concat(o,": ").concat(S(e.name,s))),r[a]=E(t,i[o],s,n)}}return r}({vertexArray:t,header:"".concat(this.id," attributes"),attributes:this._attributes}),{table:a,unusedTable:s,unusedCount:l}=C({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:c,count:u}=C({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});u>0&&r.cM.log("MISSING UNIFORMS",Object.keys(c))(),l>0&&r.cM.log("UNUSED UNIFORMS",Object.keys(s))();const d=function(e){const t={},n="Accessors for ".concat(e.id);for(const r of e.attributeInfos)if(r){const e=T(r);t["in ".concat(e)]={[n]:JSON.stringify(r.accessor)}}for(const r of e.varyingInfos)if(r){const e=T(r);t["out ".concat(e)]={[n]:JSON.stringify(r.accessor)}}return t}(this.vertexArray.configuration);r.cM.table(e,o)(),r.cM.table(e,a)(),r.cM.table(e+1,d)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),r.cM.groupEnd(2)()}}},68833:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var r=n(91203),i=n(7064);const o={number:{validate:(e,t)=>Number.isFinite(e)&&(!("max"in t)||e<=t.max)&&(!("min"in t)||e>=t.min)},array:{validate:(e,t)=>Array.isArray(e)||ArrayBuffer.isView(e)}};function a(e){let t=s(e);return"object"===t?e?"type"in e?Object.assign({},e,o[e.type]):"value"in e?(t=s(e.value),Object.assign({type:t},e,o[t])):{type:"object",value:e}:{type:"object",value:null}:Object.assign({type:t,value:e},o[t])}function s(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":typeof e}class l{constructor(e){let{name:t,vs:n,fs:r,dependencies:o=[],uniforms:s,getUniforms:l,deprecations:c=[],defines:u={},inject:d={},vertexShader:h,fragmentShader:f}=e;(0,i.Z)("string"===typeof t),this.name=t,this.vs=n||h,this.fs=r||f,this.getModuleUniforms=l,this.dependencies=o,this.deprecations=this._parseDeprecationDefinitions(c),this.defines=u,this.injections=function(e){const t={vs:{},fs:{}};for(const n in e){let r=e[n];"string"===typeof r&&(r={order:0,injection:r}),t[n.slice(0,2)][n]=r}return t}(d),s&&(this.uniforms=function(e){const t={};for(const n in e){const r=a(e[n]);t[n]=r}return t}(s))}getModuleSource(e){let t;switch(e){case"vs":t=this.vs||"";break;case"fs":t=this.fs||"";break;default:(0,i.Z)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(t,"// END MODULE_").concat(this.name,"\n\n")}getUniforms(e,t){return this.getModuleUniforms?this.getModuleUniforms(e,t):this.uniforms?this._defaultGetUniforms(e):{}}getDefines(){return this.defines}checkDeprecations(e,t){this.deprecations.forEach((n=>{n.regex.test(e)&&(n.deprecated?t.deprecated(n.old,n.new)():t.removed(n.old,n.new)())}))}_parseDeprecationDefinitions(e){return e.forEach((e=>{if("function"===e.type)e.regex=new RegExp("\\b".concat(e.old,"\\("));else e.regex=new RegExp("".concat(e.type," ").concat(e.old,";"))})),e}_defaultGetUniforms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},n=this.uniforms;for(const r in n){const o=n[r];r in e&&!o.private?(o.validate&&(0,i.Z)(o.validate(e[r],o),"".concat(this.name,": invalid ").concat(r)),t[r]=e[r]):t[r]=o.value}return t}}function c(e){return u(h(e))}function u(e){const t={},n={};return d({modules:e,level:0,moduleMap:t,moduleDepth:n}),Object.keys(n).sort(((e,t)=>n[t]-n[e])).map((e=>t[e]))}function d(e){let{modules:t,level:n,moduleMap:r,moduleDepth:i}=e;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(const o of t)r[o.name]=o,(void 0===i[o.name]||i[o.name](e instanceof l||((0,i.Z)("string"!==typeof e,"Shader module use by name is deprecated. Import shader module '".concat(e,"' and use it directly.")),(0,i.Z)(e.name,"shader module has no name"),(e=new l(e)).dependencies=h(e.dependencies)),e)))}const f=7936,p=7937,g=7938,m=35724,A={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},v={};Object.keys(A).forEach((e=>{v[e]=e}));const y={};function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=A[t];if((0,i.Z)(r,t),!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="undefined"!==typeof window&&window.navigator||{},n=e.userAgent||t.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}(n))return!0;if(t in y)return y[t];const o=r[0],a=n.behavior||"enable",s="#extension GL_".concat(o," : ").concat(a,"\nvoid main(void) {}"),l=e.createShader(35633);e.shaderSource(l,s),e.compileShader(l);const c=e.getShaderParameter(l,35713);return e.deleteShader(l),y[t]=c,c}function _(e,t){const n=A[t];(0,i.Z)(n,t);const r=function(e){return"undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}(e)&&n[1]||n[0],o="string"===typeof r?Boolean(e.getExtension(r)):r;return(0,i.Z)(!1===o||!0===o),o}function w(e,t){return(t=Array.isArray(t)?t:[t]).every((t=>_(e,t)))}function x(e){const t=function(e){const t=e.getExtension("WEBGL_debug_renderer_info"),n=e.getParameter(t&&t.UNMASKED_VENDOR_WEBGL||f),r=e.getParameter(t&&t.UNMASKED_RENDERER_WEBGL||p);return{gpuVendor:function(e,t){return e.match(/NVIDIA/i)||t.match(/NVIDIA/i)?"NVIDIA":e.match(/INTEL/i)||t.match(/INTEL/i)?"INTEL":e.match(/AMD/i)||t.match(/AMD/i)||e.match(/ATI/i)||t.match(/ATI/i)?"AMD":"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:e.getParameter(g),shadingLanguageVersion:e.getParameter(m)}}(e);switch(t.gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}var E=n(11558);function S(e){return new RegExp("\\b".concat(e,"[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)"),"g")}const C=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n"],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],P=[...C,[S("attribute"),"in $1"],[S("varying"),"out $1"]],T=[...C,[S("varying"),"in $1"]],M=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],k=[...M,[S("in"),"attribute $1"],[S("out"),"varying $1"]],R=[...M,[S("in"),"varying $1"]],O="gl_FragColor",I=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,L=/void\s+main\s*\([^)]*\)\s*\{\n?/;function D(e,t,n){switch(t){case 300:return n?N(e,P):function(e){e=N(e,T);const t=e.match(I);if(t){const n=t[1];e=e.replace(new RegExp("\\b".concat(O,"\\b"),"g"),n)}else{const t="fragmentColor";e=e.replace(L,(e=>"out vec4 ".concat(t,";\n").concat(e))).replace(new RegExp("\\b".concat(O,"\\b"),"g"),t)}return e}(e);case 100:return n?N(e,k):function(e){e=N(e,R);const t=e.match(I);if(t){const n=t[1];e=e.replace(I,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),O)}return e}(e);default:throw new Error("unknown GLSL version ".concat(t))}}function N(e,t){for(const[n,r]of t)e=e.replace(n,r);return e}const F="\n\n".concat(E.O_,"\n\n"),j={[r.H]:"vertex",[r.Y]:"fragment"},B="precision highp float;\n\n";function z(e,t){let{id:n,source:o,type:a,modules:s,defines:l={},hookFunctions:c=[],inject:u={},transpileToGLSL100:d=!1,prologue:h=!0,log:f}=t;(0,i.Z)("string"===typeof o,"shader source must be a string");const p=a===r.H,g=o.split("\n");let m=100,A="",y=o;0===g[0].indexOf("#version ")?(m=300,A=g[0],y=g.slice(1).join("\n")):A="#version ".concat(m);const _={};s.forEach((e=>{Object.assign(_,e.getDefines())})),Object.assign(_,l);let S=h?"".concat(A,"\n").concat(function(e){let{id:t,source:n,type:r}=e;const i=t&&"string"===typeof t&&-1===n.indexOf("SHADER_NAME");return i?"\n#define SHADER_NAME ".concat(t,"_").concat(j[r],"\n\n"):""}({id:n,source:o,type:a}),"\n").concat(function(e){let{type:t}=e;return"\n#define SHADER_TYPE_".concat(j[t].toUpperCase(),"\n")}({type:a}),"\n").concat(x(e),"\n").concat(function(e,t,n){let r="#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return w(e,v.GLSL_FRAG_DEPTH)&&(r+="\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),w(e,v.GLSL_DERIVATIVES)&&b(e,v.GLSL_DERIVATIVES)&&(r+="\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n"),w(e,v.GLSL_FRAG_DATA)&&b(e,v.GLSL_FRAG_DATA,{behavior:"require"})&&(r+="\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n"),w(e,v.GLSL_TEXTURE_LOD)&&(r+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n"),r}(e),"\n").concat(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=0,n="";for(const r in e){0===t&&(n+="\n// APPLICATION DEFINES\n"),t++;const i=e[r];(i||Number.isFinite(i))&&(n+="#define ".concat(r.toUpperCase()," ").concat(e[r],"\n"))}0===t&&(n+="\n");return n}(_),"\n").concat(p?"":B,"\n"):"".concat(A,"\n");const C=function(e){const t={vs:{},fs:{}};return e.forEach((e=>{let n;"string"!==typeof e?(n=e,e=n.hook):n={},e=e.trim();const[r,i]=e.split(":"),o=e.replace(/\(.+/,"");t[r][o]=Object.assign(n,{signature:i})})),t}(c),P={},T={},M={};for(const r in u){const e="string"===typeof u[r]?{injection:u[r],order:0}:u[r],t=r.match(/^(v|f)s:(#)?([\w-]+)$/);if(t){const n=t[2],i=t[3];n?"decl"===i?T[r]=[e]:M[r]=[e]:P[r]=[e]}else M[r]=[e]}for(const r of s){f&&r.checkDeprecations(y,f);S+=r.getModuleSource(a,m);const e=r.injections[a];for(const t in e){const n=t.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?T:M;r[t]=r[t]||[],r[t].push(e[t])}else P[t]=P[t]||[],P[t].push(e[t])}}return S+=F,S=(0,E.ZP)(S,a,T),S+=function(e,t){let n="";for(const r in e){const i=e[r];if(n+="void ".concat(i.signature," {\n"),i.header&&(n+=" ".concat(i.header)),t[r]){const e=t[r];e.sort(((e,t)=>e.order-t.order));for(const t of e)n+=" ".concat(t.injection,"\n")}i.footer&&(n+=" ".concat(i.footer)),n+="}\n"}return n}(C[a],P),S+=y,S=(0,E.ZP)(S,a,M),S=D(S,d?100:m,p),S}function Z(e){return function(t){const n={};for(const r of e){const e=r.getUniforms(t,n);Object.assign(n,e)}return n}}var U=n(32073);class H{static getDefaultProgramManager(e){return e.luma=e.luma||{},e.luma.defaultProgramManager=e.luma.defaultProgramManager||new H(e),e.luma.defaultProgramManager}constructor(e){this.gl=e,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}addDefaultModule(e){this._defaultModules.find((t=>t.name===e.name))||this._defaultModules.push(e),this.stateHash++}removeDefaultModule(e){const t="string"===typeof e?e:e.name;this._defaultModules=this._defaultModules.filter((e=>e.name!==t)),this.stateHash++}addShaderHook(e,t){t&&(e=Object.assign(t,{hook:e})),this._hookFunctions.push(e),this.stateHash++}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vs:t="",fs:n="",defines:i={},inject:o={},varyings:a=[],bufferMode:s=35981,transpileToGLSL100:l=!1}=e,u=this._getModuleList(e.modules),d=this._getHash(t),h=this._getHash(n),f=u.map((e=>this._getHash(e.name))).sort(),p=a.map((e=>this._getHash(e))),g=Object.keys(i).sort(),m=Object.keys(o).sort(),A=[],v=[];for(const r of g)A.push(this._getHash(r)),A.push(this._getHash(i[r]));for(const r of m)v.push(this._getHash(r)),v.push(this._getHash(o[r]));const y="".concat(d,"/").concat(h,"D").concat(A.join("/"),"M").concat(f.join("/"),"I").concat(v.join("/"),"V").concat(p.join("/"),"H").concat(this.stateHash,"B").concat(s).concat(l?"T":"");if(!this._programCache[y]){const e=function(e,t){const{vs:n,fs:i}=t,o=c(t.modules||[]);return{gl:e,vs:z(e,Object.assign({},t,{source:n,type:r.H,modules:o})),fs:z(e,Object.assign({},t,{source:i,type:r.Y,modules:o})),getUniforms:Z(o)}}(this.gl,{vs:t,fs:n,modules:u,inject:o,defines:i,hookFunctions:this._hookFunctions,transpileToGLSL100:l});this._programCache[y]=new U.Z(this.gl,{hash:y,vs:e.vs,fs:e.fs,varyings:a,bufferMode:s}),this._getUniforms[y]=e.getUniforms||(e=>{}),this._useCounts[y]=0}return this._useCounts[y]++,this._programCache[y]}getUniforms(e){return this._getUniforms[e.hash]||null}release(e){const t=e.hash;this._useCounts[t]--,0===this._useCounts[t]&&(this._programCache[t].delete(),delete this._programCache[t],delete this._getUniforms[t],delete this._useCounts[t])}_getHash(e){return void 0===this._hashes[e]&&(this._hashes[e]=this._hashCounter++),this._hashes[e]}_getModuleList(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=new Array(this._defaultModules.length+e.length),n={};let r=0;for(let i=0,o=this._defaultModules.length;i{"use strict";n.d(t,{Z:()=>T});var r=n(7064);const i="out vec4 transform_output;\nvoid main() {\n transform_output = vec4(0);\n}",o="#version 300 es\n".concat(i);function a(e,t){t=Array.isArray(t)?t:[t];const n=e.replace(/^\s+/,"").split(/\s+/),[r,i,o]=n;if(!t.includes(r)||!i||!o)return null;return{qualifier:r,type:i,name:o.split(";")[0]}}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{version:t=100,input:n,inputType:a,output:s}=e;if(!n)return 300===t?o:t>300?"#version ".concat(t,"\n").concat(i):"void main() {gl_FragColor = vec4(0);}";const l=function(e,t){switch(t){case"float":return"vec4(".concat(e,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(e,", 0.0, 1.0)");case"vec3":return"vec4(".concat(e,", 1.0)");case"vec4":return e;default:return(0,r.Z)(!1),null}}(n,a);return t>=300?"#version ".concat(t," ").concat(300===t?"es":"","\nin ").concat(a," ").concat(n,";\nout vec4 ").concat(s,";\nvoid main() {\n ").concat(s," = ").concat(l,";\n}"):"varying ".concat(a," ").concat(n,";\nvoid main() {\n gl_FragColor = ").concat(l,";\n}")}var l=n(76195),c=n(64180),u=n(73011),d=n(59661);class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(t),Object.seal(this)}setupResources(e){for(const t of this.bindings)this._setupTransformFeedback(t,e)}updateModelProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyings:t}=this;return t.length>0&&(e=Object.assign({},e,{varyings:t})),e}getDrawOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.bindings[this.currentIndex],{sourceBuffers:n,transformFeedback:r}=t;return{attributes:Object.assign({},n,e.attributes),transformFeedback:r}}swap(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(e)}getBuffer(e){const{feedbackBuffers:t}=this.bindings[this.currentIndex],n=e?t[e]:null;return n?n instanceof c.Z?n:n.buffer:null}getData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyingName:t}=e,n=this.getBuffer(t);return n?n.getData():null}delete(){for(const e in this.resources)this.resources[e].delete()}_initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(e),this.varyings=e.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&(0,d.h)((0,l.D0)(this.gl))}_getFeedbackBuffers(e){const{sourceBuffers:t={}}=e,n={};if(this.bindings[this.currentIndex]&&Object.assign(n,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(const r in this.feedbackMap){const e=this.feedbackMap[r];r in t&&(n[e]=r)}Object.assign(n,e.feedbackBuffers);for(const r in n){const e=n[r];if("string"===typeof e){const i=t[e],{byteLength:o,usage:a,accessor:s}=i;n[r]=this._createNewBuffer(r,{byteLength:o,usage:a,accessor:s})}}return n}_setupBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:t=null}=e;Object.assign(this.feedbackMap,e.feedbackMap);const n=this._getFeedbackBuffers(e);this._updateBindings({sourceBuffers:t,feedbackBuffers:n})}_setupTransformFeedback(e,t){let{model:n}=t;const{program:r}=n;e.transformFeedback=new u.Z(this.gl,{program:r,buffers:e.feedbackBuffers})}_updateBindings(e){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],e),this.feedbackMap){const{sourceBuffers:e,feedbackBuffers:t}=this._swapBuffers(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceBuffers:e,feedbackBuffers:t})}}_updateBinding(e,t){return e?(Object.assign(e.sourceBuffers,t.sourceBuffers),Object.assign(e.feedbackBuffers,t.feedbackBuffers),e.transformFeedback&&e.transformFeedback.setBuffers(e.feedbackBuffers),e):{sourceBuffers:Object.assign({},t.sourceBuffers),feedbackBuffers:Object.assign({},t.feedbackBuffers)}}_swapBuffers(e){if(!this.feedbackMap)return null;const t=Object.assign({},e.sourceBuffers),n=Object.assign({},e.feedbackBuffers);for(const r in this.feedbackMap){const i=this.feedbackMap[r];t[r]=e.feedbackBuffers[i],n[i]=e.sourceBuffers[r],(0,d.h)(n[i]instanceof c.Z)}return{sourceBuffers:t,feedbackBuffers:n}}_createNewBuffer(e,t){const n=new c.Z(this.gl,t);return this.resources[e]&&this.resources[e].delete(),this.resources[e]=n,n}_getNextIndex(){return(this.currentIndex+1)%2}}var f=n(77378),p=n(81786),g=n(64282),m=n(15671);function A(e){let t=100;const n=e.match(/[^\s]+/g);if(n.length>=2&&"#version"===n[0]){const e=parseInt(n[1],10);Number.isFinite(e)&&(t=e)}return t}var v=n(11558);const y={name:"transform",vs:"attribute float transform_elementID;\nvec2 transform_getPixelSizeHalf(vec2 size) {\n return vec2(1.) / (2. * size);\n}\n\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n float xIndex = transform_elementID - (yIndex * texSize[0]);\n return vec2(xIndex, yIndex);\n}\nvec2 transform_getTexCoord(vec2 size) {\n vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n vec2 coord = indices / size + pixelSizeHalf;\n return coord;\n}\nvec2 transform_getPos(vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n return pos;\n}\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec4 textureColor = texture2D(texSampler, texCoord);\n return textureColor;\n}\n",fs:null},b="transform_uSampler_",_="transform_uSize_",w="transform_position";function x(e){let{vs:t,sourceTextureMap:n,targetTextureVarying:i,targetTexture:o}=e;let s=Object.keys(n).length,l=null;const c={};let u=t,h={};if(s>0||i){const e=u.split("\n"),t=e.slice();if(e.forEach(((e,o,u)=>{if(s>0){const i=function(e,t){const n={},i=function(e){return a(e,["attribute","in"])}(e);if(!i)return null;const{type:o,name:s}=i;if(s&&t[s]){const t="// ".concat(e," => Replaced by Transform with a sampler"),{samplerName:i,sizeName:a,uniformDeclerations:l}=function(e){const t="".concat(b).concat(e),n="".concat(_).concat(e),r=" uniform sampler2D ".concat(t,";\n uniform vec2 ").concat(n,";");return{samplerName:t,sizeName:n,uniformDeclerations:r}}(s),c=function(e){switch(e){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return(0,r.Z)(!1),null}}(o),u=" ".concat(o," ").concat(s," = transform_getInput(").concat(i,", ").concat(a,").").concat(c,";\n");n[i]=s;return{updatedLine:t,inject:{"vs:#decl":l,"vs:#main-start":u},samplerTextureMap:n}}return null}(e,n);if(i){const{updatedLine:e,inject:n}=i;t[o]=e,h=(0,v.Lm)([h,n]),Object.assign(c,i.samplerTextureMap),s--}}i&&!l&&(l=function(e,t){const n=a(e,["varying","out"]);if(!n)return null;return n.name===t?n.type:null}(e,i))})),i){(0,d.h)(o);const e="".concat(_).concat(i),t={"vs:#decl":"uniform vec2 ".concat(e,";\n"),"vs:#main-start":" vec2 ".concat(w," = transform_getPos(").concat(e,");\n gl_Position = vec4(").concat(w,", 0, 1.);\n")};h=(0,v.Lm)([h,t])}u=t.join("\n")}return{vs:u,targetTextureType:l,inject:h,samplerTextureMap:c}}const E={10241:9728,10240:9728,10242:33071,10243:33071};class S{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.id=this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(t),Object.seal(this)}updateModelProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._processVertexShader(e);return Object.assign({},e,t)}getDrawOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:t,sourceTextures:n,framebuffer:r,targetTexture:i}=this.bindings[this.currentIndex],o=Object.assign({},t,e.attributes),a=Object.assign({},e.uniforms),s=Object.assign({},e.parameters);let l=e.discard;if(this.hasSourceTextures||this.hasTargetTexture){o.transform_elementID=this.elementIDBuffer;for(const t in this.samplerTextureMap){const e=this.samplerTextureMap[t];a[t]=n[e]}this._setSourceTextureParameters();const e=function(e){let{sourceTextureMap:t,targetTextureVarying:n,targetTexture:r}=e;const i={};let o,a;n&&(({width:o,height:a}=r),i["".concat(_).concat(n)]=[o,a]);for(const s in t)({width:o,height:a}=t[s]),i["".concat(_).concat(s)]=[o,a];return i}({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(a,e)}return this.hasTargetTexture&&(l=!1,s.viewport=[0,0,r.width,r.height]),{attributes:o,framebuffer:r,uniforms:a,discard:l,parameters:s}}swap(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(e)}getTargetTexture(){const{targetTexture:e}=this.bindings[this.currentIndex];return e}getData(){let{packed:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{framebuffer:t}=this.bindings[this.currentIndex],n=(0,f.z6)(t);if(!e)return n;const i=n.constructor,o=function(e){switch(e){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return(0,r.Z)(!1),null}}(this.targetTextureType),a=new i(n.length*o/4);let s=0;for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:{};const{_targetTextureVarying:t,_swapTexture:n}=e;this._swapTexture=n,this.targetTextureVarying=t,this.hasTargetTexture=t,this._setupTextures(e)}_createTargetTexture(e){const{sourceTextures:t,textureOrReference:n}=e;if(n instanceof p.Z)return n;const r=t[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}_setupTextures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:t,_sourceTextures:n={},_targetTexture:r}=e,i=this._createTargetTexture({sourceTextures:n,textureOrReference:r});this.hasSourceTextures=this.hasSourceTextures||n&&Object.keys(n).length>0,this._updateBindings({sourceBuffers:t,sourceTextures:n,targetTexture:i}),"elementCount"in e&&this._updateElementIDBuffer(e.elementCount)}_updateElementIDBuffer(e){if("number"!==typeof e||this.elementCount>=e)return;const t=new Float32Array(e);t.forEach(((e,t,n)=>{n[t]=t})),this.elementIDBuffer?this.elementIDBuffer.setData({data:t}):this.elementIDBuffer=new c.Z(this.gl,{data:t,accessor:{size:1}}),this.elementCount=e}_updateBindings(e){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],e),this._swapTexture){const{sourceTextures:e,targetTexture:t}=this._swapTextures(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceTextures:e,targetTexture:t})}}_updateBinding(e,t){const{sourceBuffers:n,sourceTextures:r,targetTexture:i}=t;if(e||(e={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(e.sourceTextures,r),Object.assign(e.sourceBuffers,n),i){e.targetTexture=i;const{width:t,height:n}=i,{framebuffer:r}=e;r?(r.update({attachments:{36064:i},resizeAttachments:!1}),r.resize({width:t,height:n})):e.framebuffer=new g.Z(this.gl,{id:"transform-framebuffer",width:t,height:n,attachments:{36064:i}})}return e}_setSourceTextureParameters(){const e=this.currentIndex,{sourceTextures:t}=this.bindings[e];for(const n in t)t[n].setParameters(E)}_swapTextures(e){if(!this._swapTexture)return null;const t=Object.assign({},e.sourceTextures);t[this._swapTexture]=e.targetTexture;return{sourceTextures:t,targetTexture:e.sourceTextures[this._swapTexture]}}_createNewTexture(e){const t=(0,m.h)(e,{parameters:{10241:9728,10240:9728,10242:33071,10243:33071},pixelStore:{37440:!1}});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=t,t}_getNextIndex(){return(this.currentIndex+1)%2}_processVertexShader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceTextures:t,targetTexture:n}=this.bindings[this.currentIndex],{vs:r,uniforms:i,targetTextureType:o,inject:a,samplerTextureMap:l}=x({vs:e.vs,sourceTextureMap:t,targetTextureVarying:this.targetTextureVarying,targetTexture:n}),c=(0,v.Lm)([e.inject||{},a]);this.targetTextureType=o,this.samplerTextureMap=l;return{vs:r,fs:e._fs||s({version:A(r),input:this.targetTextureVarying,inputType:o,output:"transform_output"}),modules:this.hasSourceTextures||this.targetTextureVarying?[y].concat(e.modules||[]):e.modules,uniforms:i,inject:c}}}var C=n(39042),P=n(44548);class T{static isSupported(e){return(0,l.D0)(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(t),Object.seal(this)}delete(){const{model:e,bufferTransform:t,textureTransform:n}=this;e&&e.delete(),t&&t.delete(),n&&n.delete()}run(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clearRenderTarget:t=!0}=e,n=this._updateDrawOptions(e);t&&n.framebuffer&&n.framebuffer.clear({color:!0}),this.model.transform(n)}swap(){let e=!1;const t=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of t)e=e||n.swap();(0,d.h)(e,"Nothing to swap")}getBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(e)}getData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of t){const t=n.getData(e);if(t)return t}return null}getFramebuffer(){return this.textureTransform&&this.textureTransform.getFramebuffer()}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"elementCount"in e&&this.model.setVertexCount(e.elementCount);const t=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of t)n.update(e)}_initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{gl:t}=this;this._buildResourceTransforms(t,e),e=this._updateModelProps(e),this.model=new P.Z(t,Object.assign({},e,{fs:e.fs||s({version:A(e.vs)}),id:e.id||"transform-model",drawMode:e.drawMode||0,vertexCount:e.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}_updateModelProps(e){let t=Object.assign({},e);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)t=r.updateModelProps(t);return t}_buildResourceTransforms(e,t){(function(e){if(!(0,C.nK)(e.feedbackBuffers)||!(0,C.nK)(e.feedbackMap)||e.varyings&&e.varyings.length>0)return!0;return!1})(t)&&(this.bufferTransform=new h(e,t)),function(e){if(!(0,C.nK)(e._sourceTextures)||e._targetTexture||e._targetTextureVarying)return!0;return!1}(t)&&(this.textureTransform=new S(e,t)),(0,d.h)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}_updateDrawOptions(e){let t=Object.assign({},e);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)t=Object.assign(t,r.getDrawOptions(t));return t}}},76195:(e,t,n)=>{"use strict";n.d(t,{KQ:()=>d,JD:()=>u,s9:()=>ee,JY:()=>Y,w:()=>q,ZS:()=>V,vd:()=>c,yW:()=>te,UF:()=>s,D0:()=>l,cM:()=>r,kL:()=>G,aQ:()=>ne,dR:()=>H,s8:()=>W});const r=new(n(20251).Z)({id:"luma.gl"});function i(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}const o="Invalid WebGLRenderingContext",a="Requires WebGL2";function s(e){return"undefined"!==typeof WebGLRenderingContext&&e instanceof WebGLRenderingContext||("undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&Number.isFinite(e._version)))}function l(e){return"undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}function c(e){return l(e)?e:null}function u(e){return i(s(e),o),e}function d(e){return i(l(e),a),e}const h={};function f(e,t){var n;h[e]=!0,void 0!==t&&(n=t,globalThis.console&&globalThis.console.error&&globalThis.console.error(n))}const p=function e(t){const n=t.gl;this.ext=t,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(t.maxVertexAttribs);for(let r=0;r{var e;e="OESVertexArrayObject emulation library context restored",globalThis.console&&globalThis.console.log&&globalThis.console.log(e),t.reset_()}),!0),this.reset_()};g.prototype.VERTEX_ARRAY_BINDING_OES=34229,g.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let t=0;tl(e)?void 0:0,b={3074:e=>l(e)?void 0:36064,35723:e=>l(e)?void 0:4352,35977:y,32937:y,36795:(e,t)=>{const n=l(e)?e.getExtension("EXT_disjoint_timer_query_webgl2"):e.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?t(n.GPU_DISJOINT_EXT):0},37445:(e,t)=>{const n=e.getExtension(v);return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)},37446:(e,t)=>{const n=e.getExtension(v);return t(n&&n.UNMASKED_RENDERER_WEBGL||7937)},34047:(e,t)=>{const n=e.luma.extensions.EXT_texture_filter_anisotropic;return n?t(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:y,35071:y,37447:y,36063:(e,t)=>{if(!l(e)){const n=e.getExtension(A);return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:y,35374:y,35377:y,34852:e=>{if(!l(e)){const t=e.getExtension(A);return t?t.MAX_DRAW_BUFFERS_WEBGL:0}},36203:e=>e.getExtension(m)?2147483647:65535,33001:e=>e.getExtension(m)?16777216:65535,33e3:e=>16777216,37157:y,35373:y,35657:y,36183:y,37137:y,34045:y,35978:y,35979:y,35968:y,35376:y,35375:y,35659:y,37154:y,35371:y,35658:y,35076:y,35077:y,35380:y};const _="ANGLE_instanced_arrays";const w={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},[_]:{meta:{suffix:"ANGLE"},vertexAttribDivisor(e,t){i(0===t,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},WEBGL_draw_buffers:{meta:{suffix:"WEBGL"},drawBuffers:()=>{i(!1)}},EXT_disjoint_timer_query:{meta:{suffix:"EXT"},createQuery:()=>{i(!1)},deleteQuery:()=>{i(!1)},beginQuery:()=>{i(!1)},endQuery:()=>{},getQuery(e,t){return this.getQueryObject(e,t)},getQueryParameter(e,t){return this.getQueryObject(e,t)},getQueryObject:()=>{}}},x={readBuffer:(e,t,n)=>{l(e)&&t(n)},getVertexAttrib:(e,t,n,r)=>{const{webgl2:i,ext:o}=function(e,t){return{webgl2:l(e),ext:e.getExtension(t)}}(e,_);let a;switch(r){case 35069:a=!!i&&void 0;break;case 35070:a=i||o?void 0:0}return void 0!==a?a:t(n,r)},getProgramParameter:(e,t,n,r)=>{if(!l(e))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return t(n,r)},getInternalformatParameter:(e,t,n,r,i)=>l(e)||32937!==i?e.getInternalformatParameter(n,r,i):new Int32Array([0]),getTexParameter(e,t,n,r){if(34046===r){const{extensions:t}=e.luma,n=t.EXT_texture_filter_anisotropic;r=n&&n.TEXTURE_MAX_ANISOTROPY_EXT||34046}return t(n,r)},getParameter:function(e,t,n){const r=b[n],i="function"===typeof r?r(e,t,n):r;return void 0!==i?i:t(n)},hint:(e,t,n,r)=>t(n,r)};function E(e,t){let{extension:n,target:r,target2:o}=t;const a=w[n];i(a);const{meta:s={}}=a,{suffix:l=""}=s,c=e.getExtension(n);for(const i of Object.keys(a)){const t="".concat(i).concat(l);let n=null;"meta"===i||"function"===typeof e[i]||(c&&"function"===typeof c[t]?n=function(){return c[t](...arguments)}:"function"===typeof a[i]&&(n=a[i].bind(r))),n&&(r[i]=n,o[i]=n)}}globalThis.polyfillContext=function(e){e.luma=e.luma||{};const{luma:t}=e;return t.polyfilled||(!function(e){if("function"===typeof e.createVertexArray)return;const t=e.getSupportedExtensions;e.getSupportedExtensions=function(){const e=t.call(this)||[];return e.indexOf("OES_vertex_array_object")<0&&e.push("OES_vertex_array_object"),e};const n=e.getExtension;e.getExtension=function(t){return n.call(this,t)||("OES_vertex_array_object"!==t?null:(e.__OESVertexArrayObject||(this.__OESVertexArrayObject=new g(this)),this.__OESVertexArrayObject))}}(e),function(e){e.luma.extensions={};const t=e.getSupportedExtensions()||[];for(const n of t)e.luma[n]=e.getExtension(n)}(e),function(e,t){for(const n of Object.getOwnPropertyNames(t))"overrides"!==n&&E(e,{extension:n,target:e.luma,target2:e})}(e,w),function(e,t){let{target:n,target2:r}=t;Object.keys(x).forEach((t=>{if("function"===typeof x[t]){const i=e[t]?e[t].bind(e):()=>{},o=x[t].bind(null,e,i);n[t]=o,r[t]=o}}))}(e,{target:t,target2:e}),t.polyfilled=!0),e};const S={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},C=(e,t,n)=>t?e.enable(n):e.disable(n),P=(e,t,n)=>e.hint(n,t),T=(e,t,n)=>e.pixelStorei(n,t);function M(e){return Array.isArray(e)||ArrayBuffer.isView(e)}const k={3042:C,32773:(e,t)=>e.blendColor(...t),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(e,t)=>e.clearColor(...t),3107:(e,t)=>e.colorMask(...t),2884:C,2885:(e,t)=>e.cullFace(t),2929:C,2931:(e,t)=>e.clearDepth(t),2932:(e,t)=>e.depthFunc(t),2928:(e,t)=>e.depthRange(...t),2930:(e,t)=>e.depthMask(t),3024:C,35723:P,36006:(e,t)=>{const n=l(e)?36009:36160;return e.bindFramebuffer(n,t)},2886:(e,t)=>e.frontFace(t),33170:P,2849:(e,t)=>e.lineWidth(t),32823:C,32824:"polygonOffset",10752:"polygonOffset",35977:C,32938:"sampleCoverage",32939:"sampleCoverage",3089:C,3088:(e,t)=>e.scissor(...t),2960:C,2961:(e,t)=>e.clearStencil(t),2968:(e,t)=>e.stencilMaskSeparate(1028,t),36005:(e,t)=>e.stencilMaskSeparate(1029,t),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(e,t)=>e.viewport(...t),3333:T,3317:T,37440:T,37441:T,37443:T,3330:T,3332:T,3331:T,36010:(e,t)=>e.bindFramebuffer(36008,t),3314:T,32878:T,3316:T,3315:T,32877:T,framebuffer:(e,t)=>{const n=t&&"handle"in t?t.handle:t;return e.bindFramebuffer(36160,n)},blend:(e,t)=>t?e.enable(3042):e.disable(3042),blendColor:(e,t)=>e.blendColor(...t),blendEquation:(e,t)=>{t=M(t)?t:[t,t],e.blendEquationSeparate(...t)},blendFunc:(e,t)=>{t=M(t)&&2===t.length?[...t,...t]:t,e.blendFuncSeparate(...t)},clearColor:(e,t)=>e.clearColor(...t),clearDepth:(e,t)=>e.clearDepth(t),clearStencil:(e,t)=>e.clearStencil(t),colorMask:(e,t)=>e.colorMask(...t),cull:(e,t)=>t?e.enable(2884):e.disable(2884),cullFace:(e,t)=>e.cullFace(t),depthTest:(e,t)=>t?e.enable(2929):e.disable(2929),depthFunc:(e,t)=>e.depthFunc(t),depthMask:(e,t)=>e.depthMask(t),depthRange:(e,t)=>e.depthRange(...t),dither:(e,t)=>t?e.enable(3024):e.disable(3024),derivativeHint:(e,t)=>{e.hint(35723,t)},frontFace:(e,t)=>e.frontFace(t),mipmapHint:(e,t)=>e.hint(33170,t),lineWidth:(e,t)=>e.lineWidth(t),polygonOffsetFill:(e,t)=>t?e.enable(32823):e.disable(32823),polygonOffset:(e,t)=>e.polygonOffset(...t),sampleCoverage:(e,t)=>e.sampleCoverage(...t),scissorTest:(e,t)=>t?e.enable(3089):e.disable(3089),scissor:(e,t)=>e.scissor(...t),stencilTest:(e,t)=>t?e.enable(2960):e.disable(2960),stencilMask:(e,t)=>{t=M(t)?t:[t,t];const[n,r]=t;e.stencilMaskSeparate(1028,n),e.stencilMaskSeparate(1029,r)},stencilFunc:(e,t)=>{t=M(t)&&3===t.length?[...t,...t]:t;const[n,r,i,o,a,s]=t;e.stencilFuncSeparate(1028,n,r,i),e.stencilFuncSeparate(1029,o,a,s)},stencilOp:(e,t)=>{t=M(t)&&3===t.length?[...t,...t]:t;const[n,r,i,o,a,s]=t;e.stencilOpSeparate(1028,n,r,i),e.stencilOpSeparate(1029,o,a,s)},viewport:(e,t)=>e.viewport(...t)};function R(e,t,n){return void 0!==t[e]?t[e]:n[e]}const O={blendEquation:(e,t,n)=>e.blendEquationSeparate(R(32777,t,n),R(34877,t,n)),blendFunc:(e,t,n)=>e.blendFuncSeparate(R(32969,t,n),R(32968,t,n),R(32971,t,n),R(32970,t,n)),polygonOffset:(e,t,n)=>e.polygonOffset(R(32824,t,n),R(10752,t,n)),sampleCoverage:(e,t,n)=>e.sampleCoverage(R(32938,t,n),R(32939,t,n)),stencilFuncFront:(e,t,n)=>e.stencilFuncSeparate(1028,R(2962,t,n),R(2967,t,n),R(2963,t,n)),stencilFuncBack:(e,t,n)=>e.stencilFuncSeparate(1029,R(34816,t,n),R(36003,t,n),R(36004,t,n)),stencilOpFront:(e,t,n)=>e.stencilOpSeparate(1028,R(2964,t,n),R(2965,t,n),R(2966,t,n)),stencilOpBack:(e,t,n)=>e.stencilOpSeparate(1029,R(34817,t,n),R(34818,t,n),R(34819,t,n))},I={enable:(e,t)=>e({[t]:!0}),disable:(e,t)=>e({[t]:!1}),pixelStorei:(e,t,n)=>e({[t]:n}),hint:(e,t,n)=>e({[t]:n}),bindFramebuffer:(e,t,n)=>{switch(t){case 36160:return e({36006:n,36010:n});case 36009:return e({36006:n});case 36008:return e({36010:n});default:return null}},blendColor:(e,t,n,r,i)=>e({32773:new Float32Array([t,n,r,i])}),blendEquation:(e,t)=>e({32777:t,34877:t}),blendEquationSeparate:(e,t,n)=>e({32777:t,34877:n}),blendFunc:(e,t,n)=>e({32969:t,32968:n,32971:t,32970:n}),blendFuncSeparate:(e,t,n,r,i)=>e({32969:t,32968:n,32971:r,32970:i}),clearColor:(e,t,n,r,i)=>e({3106:new Float32Array([t,n,r,i])}),clearDepth:(e,t)=>e({2931:t}),clearStencil:(e,t)=>e({2961:t}),colorMask:(e,t,n,r,i)=>e({3107:[t,n,r,i]}),cullFace:(e,t)=>e({2885:t}),depthFunc:(e,t)=>e({2932:t}),depthRange:(e,t,n)=>e({2928:new Float32Array([t,n])}),depthMask:(e,t)=>e({2930:t}),frontFace:(e,t)=>e({2886:t}),lineWidth:(e,t)=>e({2849:t}),polygonOffset:(e,t,n)=>e({32824:t,10752:n}),sampleCoverage:(e,t,n)=>e({32938:t,32939:n}),scissor:(e,t,n,r,i)=>e({3088:new Int32Array([t,n,r,i])}),stencilMask:(e,t)=>e({2968:t,36005:t}),stencilMaskSeparate:(e,t,n)=>e({[1028===t?2968:36005]:n}),stencilFunc:(e,t,n,r)=>e({2962:t,2967:n,2963:r,34816:t,36003:n,36004:r}),stencilFuncSeparate:(e,t,n,r,i)=>e({[1028===t?2962:34816]:n,[1028===t?2967:36003]:r,[1028===t?2963:36004]:i}),stencilOp:(e,t,n,r)=>e({2964:t,2965:n,2966:r,34817:t,34818:n,34819:r}),stencilOpSeparate:(e,t,n,r,i)=>e({[1028===t?2964:34817]:n,[1028===t?2965:34818]:r,[1028===t?2966:34819]:i}),viewport:(e,t,n,r,i)=>e({2978:[t,n,r,i]})},L=(e,t)=>e.isEnabled(t),D={3042:L,2884:L,2929:L,3024:L,32823:L,32926:L,32928:L,3089:L,2960:L,35977:L};function N(e){for(const t in e)return!1;return!0}function F(e,t){if(e===t)return!0;const n=Array.isArray(e)||ArrayBuffer.isView(e),r=Array.isArray(t)||ArrayBuffer.isView(t);if(n&&r&&e.length===t.length){for(let n=0;n{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.program=null,this.stateStack=[],this.enable=!0,this.cache=t?V(e):Object.assign({},S),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const e=this.stateStack[this.stateStack.length-1];H(this.gl,e),this.stateStack.pop()}_updateCache(e){let t,n=!1;const r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const o in e){i(void 0!==o);const a=e[o],s=this.cache[o];F(a,s)||(n=!0,t=s,r&&!(o in r)&&(r[o]=s),this.cache[o]=a)}return{valueChanged:n,oldValue:t}}}function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enable:n=!0,copyState:r}=t;if(i(void 0!==r),!e.state){const{polyfillContext:t}=globalThis;t&&t(e),e.state=new z(e,{copyState:r}),function(e){const t=e.useProgram.bind(e);e.useProgram=function(n){e.state.program!==n&&(t(n),e.state.program=n)}}(e);for(const n in I){B(e,n,I[n])}j(e,"getParameter"),j(e,"isEnabled")}return e.state.enable=n,e}function U(e){i(e.state),e.state.pop()}function H(e,t){if(i(s(e),"setParameters requires a WebGL context"),N(t))return;const n={};for(const i in t){const r=Number(i),o=k[i];o&&("string"===typeof o?n[o]=!0:o(e,t[i],r))}const r=e.state&&e.state.cache;if(r)for(const i in n){(0,O[i])(e,t,r)}}function V(e,t){if("number"===typeof(t=t||S)){const n=t,r=D[n];return r?r(e,n):e.getParameter(n)}const n=Array.isArray(t)?t:Object.keys(t),r={};for(const i of n){const t=D[i];r[i]=t?t(e,Number(i)):e.getParameter(Number(i))}return r}function G(e){H(e,S)}function W(e,t,n){if(N(t))return n(e);const{nocatch:r=!0}=t;let i;if(function(e){e.state||Z(e,{copyState:!1}),e.state.push()}(e),H(e,t),r)i=n(e),U(e);else try{i=n(e)}finally{U(e)}return i}function q(e){const{luma:t}=e;if(e.canvas&&t){const{clientWidth:n}=t.canvasSizeInfo;return n?e.drawingBufferWidth/n:1}return 1}function Y(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(e,t,n,r,i){const o=X(e[0],t,n);let a=K(e[1],t,r,i),s=X(e[0]+1,t,n);const l=s===n-1?s:s-1;let c;s=K(e[1]+1,t,r,i),i?(s=0===s?s:s+1,c=a,a=s):c=s===r-1?s:s-1;return{x:o,y:a,width:Math.max(l-o+1,1),height:Math.max(c-a+1,1)}}(t,q(e),e.drawingBufferWidth,e.drawingBufferHeight,n)}function X(e,t,n){return Math.min(Math.round(e*t),n-1)}function K(e,t,n,r){return r?Math.max(0,n-1-Math.round(e*t)):Math.min(Math.round(e*t),n-1)}const Q=(0,n(89258).Z)(),$=Q&&"undefined"!==typeof document,J={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function ee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(Q,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),e=Object.assign({},J,e);const{width:t,height:n}=e;function o(t){if(e.throwOnError)throw new Error(t);return console.error(t),null}let a;e.onError=o;const{canvas:s}=e,c=function(e){let t,{canvas:n,width:r=800,height:i=600,onError:o}=e;if("string"===typeof n){$&&"complete"===document.readyState||o("createGLContext called on canvas '".concat(n,"' before page was loaded")),t=document.getElementById(n)}else n?t=n:(t=document.createElement("canvas"),t.id="lumagl-canvas",t.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",t.style.height=Number.isFinite(i)?"".concat(i,"px"):"100%",document.body.insertBefore(t,document.body.firstChild));return t}({canvas:s,width:t,height:n,onError:o});return a=function(e,t){const{onError:n}=t;let r=null;const i=e=>r=e.statusMessage||r;e.addEventListener("webglcontextcreationerror",i,!1);const{webgl1:o=!0,webgl2:a=!0}=t;let s=null;a&&(s=s||e.getContext("webgl2",t),s=s||e.getContext("experimental-webgl2",t));o&&(s=s||e.getContext("webgl",t),s=s||e.getContext("experimental-webgl",t));if(e.removeEventListener("webglcontextcreationerror",i,!1),!s)return n("Failed to create ".concat(a&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"));t.onContextLost&&e.addEventListener("webglcontextlost",t.onContextLost,!1);t.onContextRestored&&e.addEventListener("webglcontextrestored",t.onContextRestored,!1);return s}(c,e),a?(a=te(a,e),function(e){const t=l(e)?"WebGL2":"WebGL1",n=function(e){const t=e.getParameter(7936),n=e.getParameter(7937),r=e.getExtension("WEBGL_debug_renderer_info"),i=r&&e.getParameter(r.UNMASKED_VENDOR_WEBGL||7936),o=r&&e.getParameter(r.UNMASKED_RENDERER_WEBGL||7937);return{vendor:i||t,renderer:o||n,vendorMasked:t,rendererMasked:n,version:e.getParameter(7938),shadingLanguageVersion:e.getParameter(35724)}}(e),i=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",o=e.debug?" debug":"";r.info(1,"".concat(t).concat(o," context ").concat(i))()}(a),a):null}function te(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||e._instrumented)return e;e._version=e._version||function(e){if("undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext)return 2;return 1}(e),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{},t=Object.assign({},J,t);const{manageState:n,debug:i}=t;return n&&Z(e,{copyState:!1,log:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(e.canvas){return void function(e,t,n){let i="width"in n?n.width:e.canvas.clientWidth,o="height"in n?n.height:e.canvas.clientHeight;i&&o||(r.log(1,"Canvas clientWidth/clientHeight is 0")(),t=1,i=e.canvas.width||1,o=e.canvas.height||1);e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{};const a=e.luma.canvasSizeInfo;if(a.clientWidth!==i||a.clientHeight!==o||a.devicePixelRatio!==t){let n=t;const a=Math.floor(i*n),s=Math.floor(o*n);e.canvas.width=a,e.canvas.height=s,e.drawingBufferWidth===a&&e.drawingBufferHeight===s||(r.warn("Device pixel ratio clamped")(),n=Math.min(e.drawingBufferWidth/i,e.drawingBufferHeight/o),e.canvas.width=Math.floor(i*n),e.canvas.height=Math.floor(o*n)),Object.assign(e.luma.canvasSizeInfo,{clientWidth:i,clientHeight:o,devicePixelRatio:t})}}(e,function(e){const t="undefined"===typeof window?1:window.devicePixelRatio||1;return Number.isFinite(e)?e<=0?1:e:e?t:1}(t.useDevicePixels),t)}const n=e.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in t&&"height"in t&&n.resize(t.width,t.height)}},91203:(e,t,n)=>{"use strict";n.d(t,{H:()=>r,Y:()=>i});const r="vs",i="fs"},11558:(e,t,n)=>{"use strict";n.d(t,{O_:()=>a,Lm:()=>d,ZP:()=>u});var r=n(91203),i=n(7064);const o={[r.H]:"#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n",[r.Y]:"#ifdef MODULE_MATERIAL\n gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n logdepth_setFragDepth();\n#endif\n"},a="__LUMA_INJECT_DECLARATIONS__",s=/void\s+main\s*\([^)]*\)\s*\{\n?/,l=/}\n?[^{}]*$/,c=[];function u(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const u=t===r.H;for(const r in n){const t=n[r];t.sort(((e,t)=>e.order-t.order)),c.length=t.length;for(let e=0,n=t.length;ee+i)));break;case"vs:#main-end":u&&(e=e.replace(l,(e=>i+e)));break;case"fs:#decl":u||(e=e.replace(a,i));break;case"fs:#main-start":u||(e=e.replace(s,(e=>e+i)));break;case"fs:#main-end":u||(e=e.replace(l,(e=>i+e)));break;default:e=e.replace(r,(e=>e+i))}}return e=e.replace(a,""),i&&(e=e.replace(/\}\s*$/,(e=>e+o[t]))),e}function d(e){const t={};return(0,i.Z)(Array.isArray(e)&&e.length>1),e.forEach((e=>{for(const n in e)t[n]=t[n]?"".concat(t[n],"\n").concat(e[n]):e[n]})),t}},48424:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,s:()=>d});const r="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n vec3 color;\n vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n return pointLight.attenuation.x\n + pointLight.attenuation.y * distance\n + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n",i={lightSources:{}};function o(){let{color:e=[0,0,0],intensity:t=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.map((e=>e*t/255))}const a={name:"lights",vs:r,fs:r,getUniforms:function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if("lightSources"in t){const{ambientLight:e,pointLights:n,directionalLights:r}=t.lightSources||{};return e||n&&n.length>0||r&&r.length>0?Object.assign({},function(e){let{ambientLight:t,pointLights:n=[],directionalLights:r=[]}=e;const i={};return i["lighting_uAmbientLight.color"]=t?o(t):[0,0,0],n.forEach(((e,t)=>{i["lighting_uPointLight[".concat(t,"].color")]=o(e),i["lighting_uPointLight[".concat(t,"].position")]=e.position,i["lighting_uPointLight[".concat(t,"].attenuation")]=e.attenuation||[1,0,0]})),i.lighting_uPointLightCount=n.length,r.forEach(((e,t)=>{i["lighting_uDirectionalLight[".concat(t,"].color")]=o(e),i["lighting_uDirectionalLight[".concat(t,"].direction")]=e.direction})),i.lighting_uDirectionalLightCount=r.length,i}({ambientLight:e,pointLights:n,directionalLights:r}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in t){const n={pointLights:[],directionalLights:[]};for(const e of t.lights||[])switch(e.type){case"ambient":n.ambientLight=e;break;case"directional":n.directionalLights.push(e);break;case"point":n.pointLights.push(e)}return e({lightSources:n})}return{}},defines:{MAX_LIGHTS:3}},s="\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3 lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n vec3 halfway_direction = normalize(light_direction + view_direction);\n float lambertian = dot(light_direction, normal_worldspace);\n float specular = 0.0;\n if (lambertian > 0.0) {\n float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n specular = pow(specular_angle, lighting_uShininess);\n }\n lambertian = max(lambertian, 0.0);\n return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = surfaceColor;\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = vec3(0, 0, 0);\n vec3 surfaceColor = vec3(0, 0, 0);\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n",l={};function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;if(!("material"in e))return{};const{material:t}=e;return t?function(e){const{ambient:t=.35,diffuse:n=.6,shininess:r=32,specularColor:i=[30,30,30]}=e;return{lighting_uAmbient:t,lighting_uDiffuse:n,lighting_uShininess:r,lighting_uSpecularColor:i.map((e=>e/255))}}(t):{lighting_uEnabled:!1}}const u={name:"gouraud-lighting",dependencies:[a],vs:s,defines:{LIGHTING_VERTEX:1},getUniforms:c},d={name:"phong-lighting",dependencies:[a],fs:s,defines:{LIGHTING_FRAGMENT:1},getUniforms:c}},7064:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}n.d(t,{Z:()=>r})},71254:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(78501),i=n(59661),o=n(13413);const a={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},s={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class l{static getBytesPerElement(e){return(0,r.vN)(e.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(e){(0,i.h)(e.size);return(0,r.vN)(e.type||5126).BYTES_PER_ELEMENT*e.size}static resolve(){for(var e=arguments.length,t=new Array(e),n=0;nthis._assign(e))),Object.freeze(this)}toString(){return JSON.stringify(this)}get BYTES_PER_ELEMENT(){return l.getBytesPerElement(this)}get BYTES_PER_VERTEX(){return l.getBytesPerVertex(this)}_assign(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=(0,o.k)("Accessor",e,s),void 0!==e.type&&(this.type=e.type,5124!==e.type&&5125!==e.type||(this.integer=!0)),void 0!==e.size&&(this.size=e.size),void 0!==e.offset&&(this.offset=e.offset),void 0!==e.stride&&(this.stride=e.stride),void 0!==e.normalized&&(this.normalized=e.normalized),void 0!==e.integer&&(this.integer=e.integer),void 0!==e.divisor&&(this.divisor=e.divisor),void 0!==e.buffer&&(this.buffer=e.buffer),void 0!==e.index&&("boolean"===typeof e.index?this.index=e.index?1:0:this.index=e.index),void 0!==e.instanced&&(this.divisor=e.instanced?1:0),void 0!==e.isInstanced&&(this.divisor=e.isInstanced?1:0),this}}},64180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(1112),i=n(71254),o=n(78501),a=n(76195),s=n(59661),l=n(13413);const c={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},u={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:c},d={removedProps:c};class h extends r.Z{get[Symbol.toStringTag](){return"Buffer"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),this.target=t.target||(this.gl.webgl2?36662:34962),this.initialize(t),Object.seal(this)}getElementCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.Z.getBytesPerElement(e))}getVertexCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.Z.getBytesPerVertex(e))}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(e)&&(e={data:e}),Number.isFinite(e)&&(e={byteLength:e}),e=(0,l.k)("Buffer",e,u),this.usage=e.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},e,e.accessor)),e.data?this._setData(e.data,e.offset,e.byteLength):this._setByteLength(e.byteLength||0),this}setProps(e){return"accessor"in(e=(0,l.k)("Buffer",e,d))&&this.setAccessor(e.accessor),this}setAccessor(e){return delete(e=Object.assign({},e)).buffer,this.accessor=new i.Z(e),this}reallocate(e){return e>this.byteLength?(this._setByteLength(e),!0):(this.bytesUsed=e,!1)}setData(e){return this.initialize(e)}subData(e){ArrayBuffer.isView(e)&&(e={data:e});const{data:t,offset:n=0,srcOffset:r=0}=e,i=e.byteLength||e.length;(0,s.h)(t);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?((0,a.KQ)(this.gl),this.gl.bufferSubData(this.target,n,t,r,i)):this.gl.bufferSubData(o,n,t),this.gl.bindBuffer(o,null),this.debugData=null,this._inferType(t),this}copyData(e){let{sourceBuffer:t,readOffset:n=0,writeOffset:r=0,size:i}=e;const{gl:o}=this;return(0,a.KQ)(o),o.bindBuffer(36662,t.handle),o.bindBuffer(36663,this.handle),o.copyBufferSubData(36662,36663,n,r,i),o.bindBuffer(36662,null),o.bindBuffer(36663,null),this.debugData=null,this}getData(){let{dstData:e=null,srcByteOffset:t=0,dstOffset:n=0,length:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.KQ)(this.gl);const i=(0,o.vN)(this.accessor.type||5126,{clamped:!1}),l=this._getAvailableElementCount(t),c=n;let u,d;e?(d=e.length,u=d-c):(u=Math.min(l,r||l),d=c+u);const h=Math.min(l,u);return r=r||h,(0,s.h)(r<=h),e=e||new i(d),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,t,e,n,r),this.gl.bindBuffer(36662,null),e}bind(){let{target:e=this.target,index:t=this.accessor&&this.accessor.index,offset:n=0,size:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===e||35982===e?void 0!==r?this.gl.bindBufferRange(e,t,this.handle,n,r):((0,s.h)(0===n),this.gl.bindBufferBase(e,t,this.handle)):this.gl.bindBuffer(e,this.handle),this}unbind(){let{target:e=this.target,index:t=this.accessor&&this.accessor.index}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===e||35982===e?this.gl.bindBufferBase(e,t,null):this.gl.bindBuffer(e,null),this}getDebugData(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}invalidateDebugData(){this.debugData=null}_setData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength+t;(0,s.h)(ArrayBuffer.isView(e)),this._trackDeallocatedMemory();const r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,t,e),this.gl.bindBuffer(r,null),this.debugData=e.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);const a=(0,o.O)(e);return(0,s.h)(a),this.setAccessor(new i.Z(this.accessor,{type:a})),this}_setByteLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;(0,s.h)(e>=0),this._trackDeallocatedMemory();let n=e;0===e&&(n=new Float32Array(0));const r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,t),this.gl.bindBuffer(r,null),this.usage=t,this.debugData=null,this.bytesUsed=e,this._trackAllocatedMemory(e),this}_getTarget(){return this.gl.webgl2?36663:this.target}_getAvailableElementCount(e){const t=e/(0,o.vN)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-t}_inferType(e){this.accessor.type||this.setAccessor(new i.Z(this.accessor,{type:(0,o.O)(e)}))}_createHandle(){return this.gl.createBuffer()}_deleteHandle(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}_getParameter(e){this.gl.bindBuffer(this.target,this.handle);const t=this.gl.getBufferParameter(this.target,e);return this.gl.bindBuffer(this.target,null),t}get type(){return a.cM.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return a.cM.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(e){return a.cM.deprecated("setByteLength","reallocate")(),this.reallocate(e)}updateAccessor(e){return a.cM.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.Z(this.accessor,e),this}}},36708:(e,t,n)=>{"use strict";n.d(t,{$:()=>p,Z:()=>f});var r=n(76195),i=n(59661);const o=256,a=1024,s=16384,l=6144,c=6145,u=6146,d=34041,h="clear: bad arguments";function f(e){let{framebuffer:t=null,color:n=null,depth:l=null,stencil:c=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const u={};t&&(u.framebuffer=t);let d=0;n&&(d|=s,!0!==n&&(u.clearColor=n)),l&&(d|=o,!0!==l&&(u.clearDepth=l)),c&&(d|=a,!0!==l&&(u.clearStencil=l)),(0,i.h)(0!==d,h),(0,r.s8)(e,u,(()=>{e.clear(d)}))}function p(e){let{framebuffer:t=null,buffer:n=l,drawBuffer:o=0,value:a=[0,0,0,0]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.KQ)(e),(0,r.s8)(e,{framebuffer:t},(()=>{switch(n){case l:switch(a.constructor){case Int32Array:e.clearBufferiv(n,o,a);break;case Uint32Array:e.clearBufferuiv(n,o,a);break;case Float32Array:default:e.clearBufferfv(n,o,a)}break;case c:e.clearBufferfv(c,0,[a]);break;case u:e.clearBufferiv(u,0,[a]);break;case d:const[t,r]=a;e.clearBufferfi(d,0,t,r);break;default:(0,i.h)(!1,h)}}))}},77378:(e,t,n)=>{"use strict";n.d(t,{Km:()=>u,Lv:()=>d,z6:()=>c});var r=n(64282),i=n(46773),o=n(76195),a=n(78501),s=n(59661);var l=n(15671);function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{sourceX:n=0,sourceY:r=0,sourceFormat:i=6408}=t;let{sourceAttachment:o=36064,target:l=null,sourceWidth:c,sourceHeight:u,sourceType:d}=t;const{framebuffer:f,deleteFramebuffer:p}=h(e);(0,s.h)(f);const{gl:g,handle:m,attachments:A}=f;c=c||f.width,u=u||f.height,36064===o&&null===m&&(o=1028),(0,s.h)(A[o]),d=d||A[o].type,l=function(e,t,n,r,i){if(e)return e;t=t||5121;const o=(0,a.vN)(t,{clamped:!1}),l=function(e){switch(e){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return(0,s.h)(!1),0}}(n);return new o(r*i*l)}(l,d,i,c,u),d=d||(0,a.O)(l);const v=g.bindFramebuffer(36160,m);return g.readPixels(n,r,c,u,i,d,l),g.bindFramebuffer(36160,v||null),p&&f.delete(),l}function u(e){let{sourceAttachment:t=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c(e,{sourceAttachment:t}),{width:i,height:o}=e;for(;o>n;)({data:r,width:i,height:o}=(0,a.KS)({data:r,width:i,height:o}));(0,a.c$)({data:r,width:i,height:o});const s=document.createElement("canvas");s.width=i,s.height=o;const l=s.getContext("2d"),u=l.createImageData(i,o);return u.data.set(r),l.putImageData(u,0,0),s.toDataURL()}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sourceX:r=0,sourceY:a=0,targetMipmaplevel:l=0,targetInternalFormat:c=6408}=n;let{targetX:u,targetY:d,targetZ:f,width:p,height:g}=n;const{framebuffer:m,deleteFramebuffer:A}=h(e);(0,s.h)(m);const{gl:v,handle:y}=m,b="undefined"!==typeof u||"undefined"!==typeof d||"undefined"!==typeof f;u=u||0,d=d||0,f=f||0;const _=v.bindFramebuffer(36160,y);(0,s.h)(t);let w=null;if(t instanceof i.Z&&(w=t,p=Number.isFinite(p)?p:w.width,g=Number.isFinite(g)?g:w.height,w.bind(0),t=w.target),b)switch(t){case 3553:case 34067:v.copyTexSubImage2D(t,l,u,d,r,a,p,g);break;case 35866:case 32879:(0,o.KQ)(v).copyTexSubImage3D(t,l,u,d,f,r,a,p,g)}else v.copyTexImage2D(t,l,c,r,a,p,g,0);return w&&w.unbind(),v.bindFramebuffer(36160,_||null),A&&m.delete(),w}function h(e){return e instanceof r.Z?{framebuffer:e,deleteFramebuffer:!1}:{framebuffer:(0,l.Y)(e),deleteFramebuffer:!0}}},64282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(76195),i=n(1112),o=n(81786),a=n(26277),s=n(36708),l=n(77378),c=n(6509),u=n(55562),d=n(59661);const h="Multiple render targets not supported";class f extends i.Z{get[Symbol.toStringTag](){return"Framebuffer"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{colorBufferFloat:n,colorBufferHalfFloat:r}=t;let i=!0;return n&&(i=Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("WEBGL_color_buffer_float")||e.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("EXT_color_buffer_half_float"))),i}static getDefaultFramebuffer(e){return e.luma=e.luma||{},e.luma.defaultFramebuffer=e.luma.defaultFramebuffer||new f(e,{id:"default-framebuffer",handle:null,attachments:{}}),e.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const e=(0,r.KQ)(this.gl);return e.getParameter(e.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const e=(0,r.KQ)(this.gl);return e.getParameter(e.MAX_DRAW_BUFFERS)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.width=null,this.height=null,this.attachments={},this.readBuffer=36064,this.drawBuffers=[36064],this.ownResources=[],this.initialize(t),Object.seal(this)}get color(){return this.attachments[36064]||null}get texture(){return this.attachments[36064]||null}get depth(){return this.attachments[36096]||this.attachments[33306]||null}get stencil(){return this.attachments[36128]||this.attachments[33306]||null}initialize(e){let{width:t=1,height:n=1,attachments:r=null,color:i=!0,depth:o=!0,stencil:a=!1,check:s=!0,readBuffer:l,drawBuffers:c}=e;if((0,d.h)(t>=0&&n>=0,"Width and height need to be integers"),this.width=t,this.height=n,r)for(const u in r){const e=r[u];(Array.isArray(e)?e[0]:e).resize({width:t,height:n})}else r=this._createDefaultAttachments(i,o,a,t,n);this.update({clearAttachments:!0,attachments:r,readBuffer:l,drawBuffers:c}),r&&s&&this.checkStatus()}delete(){for(const e of this.ownResources)e.delete();return super.delete(),this}update(e){let{attachments:t={},readBuffer:n,drawBuffers:r,clearAttachments:i=!1,resizeAttachments:o=!0}=e;this.attach(t,{clearAttachments:i,resizeAttachments:o});const{gl:a}=this,s=a.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),a.bindFramebuffer(36160,s||null),this}resize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{width:t,height:n}=e;if(null===this.handle)return(0,d.h)(void 0===t&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;void 0===t&&(t=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),t!==this.width&&n!==this.height&&r.cM.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(t,"x").concat(n))();for(const r in this.attachments)this.attachments[r].resize({width:t,height:n});return this.width=t,this.height=n,this}attach(e){let{clearAttachments:t=!1,resizeAttachments:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};t&&Object.keys(this.attachments).forEach((e=>{r[e]=null})),Object.assign(r,e);const i=this.gl.bindFramebuffer(36160,this.handle);for(const o in r){(0,d.h)(void 0!==o,"Misspelled framebuffer binding point?");const e=Number(o),t=r[e];let i=t;if(i)if(i instanceof a.Z)this._attachRenderbuffer({attachment:e,renderbuffer:i});else if(Array.isArray(t)){const[n,r=0,o=0]=t;i=n,this._attachTexture({attachment:e,texture:n,layer:r,level:o})}else this._attachTexture({attachment:e,texture:i,layer:0,level:0});else this._unattach(e);n&&i&&i.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,i||null),Object.assign(this.attachments,e),Object.keys(this.attachments).filter((e=>!this.attachments[e])).forEach((e=>{delete this.attachments[e]}))}checkStatus(){const{gl:e}=this,t=this.getStatus();if(36053!==t)throw new Error(function(e){return(f.STATUS||{})[e]||"Framebuffer error ".concat(e)}(t));return this}getStatus(){const{gl:e}=this,t=e.bindFramebuffer(36160,this.handle),n=e.checkFramebufferStatus(36160);return e.bindFramebuffer(36160,t||null),n}clear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:t,depth:n,stencil:r,drawBuffers:i=[]}=e,o=this.gl.bindFramebuffer(36160,this.handle);return(t||n||r)&&(0,s.Z)(this.gl,{color:t,depth:n,stencil:r}),i.forEach(((e,t)=>{(0,s.$)(this.gl,{drawBuffer:t,value:e})})),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.cM.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.cM.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.cM.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.cM.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.cM.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.cM.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate(e){let{attachments:t=[],x:n=0,y:i=0,width:o,height:a}=e;const s=(0,r.KQ)(this.gl),l=s.bindFramebuffer(36008,this.handle);return 0===n&&0===i&&void 0===o&&void 0===a?s.invalidateFramebuffer(36008,t):s.invalidateFramebuffer(36008,t,n,i,o,a),s.bindFramebuffer(36008,l),this}getAttachmentParameter(e,t,n){let r=this._getAttachmentParameterFallback(t);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,e,t),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=(0,u.km)(this.gl,r)),r}getAttachmentParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[];const r={};for(const i of n){r[t?(0,u.km)(this.gl,i):i]=this.getAttachmentParameter(e,i,t)}return r}getParameters(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Object.keys(this.attachments),n={};for(const r of t){const t=Number(r);n[e?(0,u.km)(this.gl,t):t]=this.getAttachmentParameters(t,e)}return n}show(){return"undefined"!==typeof window&&window.open((0,l.Km)(this),"luma-debug-texture"),this}log(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e>r.cM.level||"undefined"===typeof window)return this;t=t||"Framebuffer ".concat(this.id);const n=(0,l.Km)(this,{targetMaxHeight:100});return r.cM.image({logLevel:e,message:t,image:n},t)(),this}bind(){let{target:e=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(e,this.handle),this}unbind(){let{target:e=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(e,null),this}_createDefaultAttachments(e,t,n,r,i){let s=null;return e&&(s=s||{},s[36064]=new o.Z(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.ownResources.push(s[36064])),t&&n?(s=s||{},s[33306]=new a.Z(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(s[33306])):t?(s=s||{},s[36096]=new a.Z(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(s[36096])):n&&(0,d.h)(!1),s}_unattach(e){const t=this.attachments[e];t&&(t instanceof a.Z?this.gl.framebufferRenderbuffer(36160,e,36161,null):this.gl.framebufferTexture2D(36160,e,3553,null,0),delete this.attachments[e])}_attachRenderbuffer(e){let{attachment:t=36064,renderbuffer:n}=e;const{gl:r}=this;r.framebufferRenderbuffer(36160,t,36161,n.handle),this.attachments[t]=n}_attachTexture(e){let{attachment:t=36064,texture:n,layer:i,level:o}=e;const{gl:a}=this;switch(a.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:(0,r.KQ)(a).framebufferTextureLayer(36160,t,n.target,o,i);break;case 34067:const e=function(e){return e<34069?e+34069:e}(i);a.framebufferTexture2D(36160,t,e,n.handle,o);break;case 3553:a.framebufferTexture2D(36160,t,3553,n.handle,o);break;default:(0,d.h)(!1,"Illegal texture type")}a.bindTexture(n.target,null),this.attachments[t]=n}_setReadBuffer(e){const t=(0,r.vd)(this.gl);t?t.readBuffer(e):(0,d.h)(36064===e||1029===e,h),this.readBuffer=e}_setDrawBuffers(e){const{gl:t}=this,n=(0,r.KQ)(t);if(n)n.drawBuffers(e);else{const n=t.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(e):(0,d.h)(1===e.length&&(36064===e[0]||1029===e[0]),h)}this.drawBuffers=e}_getAttachmentParameterFallback(e){const t=(0,c.N$)(this.gl);switch(e){case 36052:return t.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return t.WEBGL2?null:8;case 33297:return t.WEBGL2?null:5125;case 33296:return t.WEBGL2||t.EXT_sRGB?null:9729;default:return null}}_createHandle(){return this.gl.createFramebuffer()}_deleteHandle(){this.gl.deleteFramebuffer(this.handle)}_bindHandle(e){return this.gl.bindFramebuffer(36160,e)}}f.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},32073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>U});var r=n(1112),i=n(46773),o=n(64282),a=n(76195),s=n(26277),l=n(59661);const c={5126:x.bind(null,"uniform1fv",g,1,E),35664:x.bind(null,"uniform2fv",g,2,E),35665:x.bind(null,"uniform3fv",g,3,E),35666:x.bind(null,"uniform4fv",g,4,E),5124:x.bind(null,"uniform1iv",m,1,E),35667:x.bind(null,"uniform2iv",m,2,E),35668:x.bind(null,"uniform3iv",m,3,E),35669:x.bind(null,"uniform4iv",m,4,E),35670:x.bind(null,"uniform1iv",m,1,E),35671:x.bind(null,"uniform2iv",m,2,E),35672:x.bind(null,"uniform3iv",m,3,E),35673:x.bind(null,"uniform4iv",m,4,E),35674:x.bind(null,"uniformMatrix2fv",g,4,S),35675:x.bind(null,"uniformMatrix3fv",g,9,S),35676:x.bind(null,"uniformMatrix4fv",g,16,S),35678:w,35680:w,5125:x.bind(null,"uniform1uiv",A,1,E),36294:x.bind(null,"uniform2uiv",A,2,E),36295:x.bind(null,"uniform3uiv",A,3,E),36296:x.bind(null,"uniform4uiv",A,4,E),35685:x.bind(null,"uniformMatrix2x3fv",g,6,S),35686:x.bind(null,"uniformMatrix2x4fv",g,8,S),35687:x.bind(null,"uniformMatrix3x2fv",g,6,S),35688:x.bind(null,"uniformMatrix3x4fv",g,12,S),35689:x.bind(null,"uniformMatrix4x2fv",g,8,S),35690:x.bind(null,"uniformMatrix4x3fv",g,12,S),35678:w,35680:w,35679:w,35682:w,36289:w,36292:w,36293:w,36298:w,36299:w,36300:w,36303:w,36306:w,36307:w,36308:w,36311:w},u={},d={},h={},f=[0];function p(e,t,n,r){1===t&&"boolean"===typeof e&&(e=e?1:0),Number.isFinite(e)&&(f[0]=e,e=f);const i=e.length;if(i%t&&a.cM.warn("Uniform size should be multiples of ".concat(t),e)(),e instanceof n)return e;let o=r[i];o||(o=new n(i),r[i]=o);for(let a=0;a{const i=e!==r;return i&&(t.uniform1i(n,r),e=r),i}}function x(e,t,n,r){let i=null,o=null;return(a,s,c)=>{const u=t(c,n),d=u.length;let h=!1;if(null===i)i=new Float32Array(d),o=d,h=!0;else{(0,l.h)(o===d,"Uniform length cannot change.");for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:"unnamed";const n=e.match(/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/);return n?n[1]:t}const P=35632,T=35633;function M(e,t,n,r){const i=e.split(/\r?\n/),o={},a={},s=r||C(t)||"(unnamed)",l="".concat(function(e){switch(e){case P:return"fragment";case T:return"vertex";default:return"unknown type"}}(n)," shader ").concat(s);for(let u=0;u1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ";const r=e.split(/\r?\n/),i=String(r.length+t-1).length;return r.map(((e,r)=>{const o=String(r+t),a=o.length;return R(o,i-a)+n+e}))}(t);return{shaderName:l,errors:k(o,c),warnings:k(a,c)}}function k(e,t){let n="";for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:this.source;e.startsWith("#version ")||(e="#version 100\n".concat(e)),this.source=e,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle);if(!this.getParameter(35713)){const e=this.gl.getShaderInfoLog(this.handle),{shaderName:t,errors:n,warnings:r}=M(e,this.source,this.shaderType,this.id);throw a.cM.error("GLSL compilation errors in ".concat(t,"\n").concat(n))(),a.cM.warn("GLSL compilation warnings in ".concat(t,"\n").concat(r))(),new Error("GLSL compilation errors in ".concat(t))}}_deleteHandle(){this.gl.deleteShader(this.handle)}_getOptsFromHandle(){return{type:this.getParameter(35663),source:this.getSource()}}}class L extends I{get[Symbol.toStringTag](){return"VertexShader"}constructor(e,t){"string"===typeof t&&(t={source:t}),super(e,Object.assign({},t,{shaderType:35633}))}_createHandle(){return this.gl.createShader(35633)}}class D extends I{get[Symbol.toStringTag](){return"FragmentShader"}constructor(e,t){"string"===typeof t&&(t={source:t}),super(e,Object.assign({},t,{shaderType:35632}))}_createHandle(){return this.gl.createShader(35632)}}var N=n(71254),F=n(2187);class j{constructor(e){this.id=e.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(e),this._readVaryingsFromProgram(e)}getAttributeInfo(e){const t=Number(e);return Number.isFinite(t)?this.attributeInfosByLocation[t]:this.attributeInfosByName[e]||null}getAttributeLocation(e){const t=this.getAttributeInfo(e);return t?t.location:-1}getAttributeAccessor(e){const t=this.getAttributeInfo(e);return t?t.accessor:null}getVaryingInfo(e){const t=Number(e);return Number.isFinite(t)?this.varyingInfos[t]:this.varyingInfosByName[e]||null}getVaryingIndex(e){const t=this.getVaryingInfo();return t?t.location:-1}getVaryingAccessor(e){const t=this.getVaryingInfo();return t?t.accessor:null}_readAttributesFromProgram(e){const{gl:t}=e,n=t.getProgramParameter(e.handle,35721);for(let r=0;r=0&&this._addAttribute(a,n,i,o)}this.attributeInfos.sort(((e,t)=>e.location-t.location))}_readVaryingsFromProgram(e){const{gl:t}=e;if(!(0,a.D0)(t))return;const n=t.getProgramParameter(e.handle,35971);for(let r=0;re.location-t.location))}_addAttribute(e,t,n,r){const{type:i,components:o}=(0,F.hJ)(n),a={type:i,size:r*o};this._inferProperties(e,t,a);const s={location:e,name:t,accessor:new N.Z(a)};this.attributeInfos.push(s),this.attributeInfosByLocation[e]=s,this.attributeInfosByName[s.name]=s}_inferProperties(e,t,n){/instance/i.test(t)&&(n.divisor=1)}_addVarying(e,t,n,r){const{type:i,components:o}=(0,F.hJ)(n),a={location:e,name:t,accessor:new N.Z({type:i,size:r*o})};this.varyingInfos.push(a),this.varyingInfosByName[a.name]=a}}var B=n(55562);const z=35981,Z=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"];class U extends r.Z{get[Symbol.toStringTag](){return"Program"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.stubRemovedMethods("Program","v6.0",Z),this._isCached=!1,this.initialize(t),Object.seal(this),this._setId(t.id)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{hash:t,vs:n,fs:r,varyings:i,bufferMode:o=z}=e;return this.hash=t||"",this.vs="string"===typeof n?new L(this.gl,{id:"".concat(e.id,"-vs"),source:n}):n,this.fs="string"===typeof r?new D(this.gl,{id:"".concat(e.id,"-fs"),source:r}):r,(0,l.h)(this.vs instanceof L),(0,l.h)(this.fs instanceof D),this.uniforms={},this._textureUniforms={},i&&i.length>0&&((0,a.KQ)(this.gl),this.varyings=i,this.gl2.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new j(this),this.setProps(e)}delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:super.delete(e)}setProps(e){return"uniforms"in e&&this.setUniforms(e.uniforms),this}draw(e){let{logPriority:t,drawMode:n=4,vertexCount:r,offset:i=0,start:o,end:s,isIndexed:c=!1,indexType:u=5123,instanceCount:d=0,isInstanced:h=d>0,vertexArray:f=null,transformFeedback:p,framebuffer:g,parameters:m={},uniforms:A,samplers:v}=e;if((A||v)&&(a.cM.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(A||{})),a.cM.priority>=t){const e=g?g.id:"default",i="mode=".concat((0,B.km)(this.gl,n)," verts=").concat(r," ")+"instances=".concat(d," indexType=").concat((0,B.km)(this.gl,u)," ")+"isInstanced=".concat(h," isIndexed=").concat(c," ")+"Framebuffer=".concat(e);a.cM.log(t,i)()}return(0,l.h)(f),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===r||h&&0===d)&&(f.bindForDraw(r,d,(()=>{if(void 0!==g&&(m=Object.assign({},m,{framebuffer:g})),p){const e=(0,F.$Z)(n);p.begin(e)}this._bindTextures(),(0,a.s8)(this.gl,m,(()=>{c&&h?this.gl2.drawElementsInstanced(n,r,u,i,d):c&&(0,a.D0)(this.gl)&&!isNaN(o)&&!isNaN(s)?this.gl2.drawRangeElements(n,o,s,r,u,i):c?this.gl.drawElements(n,r,u,i):h?this.gl2.drawArraysInstanced(n,i,r,d):this.gl.drawArrays(n,i,r)})),p&&p.end()})),!0)}setUniforms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.cM.priority>=2&&function(e,t,n){for(const r in e){const i=e[r];if((!n||Boolean(n[r]))&&!b(i))throw t=t?"".concat(t," "):"",console.error("".concat(t," Bad uniform ").concat(r),i),new Error("".concat(t," Bad uniform ").concat(r))}}(e,this.id,this._uniformSetters),this.gl.useProgram(this.handle);for(const t in e){const n=e[t],r=this._uniformSetters[t];if(r){let e=n,a=!1;if(e instanceof o.Z&&(e=e.texture),e instanceof i.Z)if(a=this.uniforms[t]!==n,a){void 0===r.textureIndex&&(r.textureIndex=this._textureIndexCounter++);const n=e,{textureIndex:i}=r;n.bind(i),e=i,this._textureUniforms[t]=n}else e=r.textureIndex;else this._textureUniforms[t]&&delete this._textureUniforms[t];(r(e)||a)&&_(this.uniforms,t,n)}}return this}_areTexturesRenderable(){let e=!0;for(const t in this._textureUniforms){const n=this._textureUniforms[t];n.update(),e=e&&n.loaded}return e}_bindTextures(){for(const e in this._textureUniforms){const t=this._uniformSetters[e].textureIndex;this._textureUniforms[e].bind(t)}}_createHandle(){return this.gl.createProgram()}_deleteHandle(){this.gl.deleteProgram(this.handle)}_getOptionsFromHandle(e){const t=this.gl.getAttachedShaders(e),n={};for(const r of t){switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:n.vs=new L({handle:r});break;case 35632:n.fs=new D({handle:r})}}return n}_getParameter(e){return this.gl.getProgramParameter(this.handle,e)}_setId(e){if(!e){const e=this._getName();this.id=(0,O.hQ)(e)}}_getName(){let e=this.vs.getName()||this.fs.getName();return e=e.replace(/shader/i,""),e=e?"".concat(e,"-program"):"program",e}_compileAndLink(){const{gl:e}=this;if(e.attachShader(this.handle,this.vs.handle),e.attachShader(this.handle,this.fs.handle),a.cM.time(4,"linkProgram for ".concat(this._getName()))(),e.linkProgram(this.handle),a.cM.timeEnd(4,"linkProgram for ".concat(this._getName()))(),e.debug||a.cM.level>0){if(!e.getProgramParameter(this.handle,35714))throw new Error("Error linking: ".concat(e.getProgramInfoLog(this.handle)));e.validateProgram(this.handle);if(!e.getProgramParameter(this.handle,35715))throw new Error("Error validating: ".concat(e.getProgramInfoLog(this.handle)))}}_readUniformLocationsFromLinkedProgram(){const{gl:e}=this;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(let t=0;t1)for(let t=0;t{"use strict";n.d(t,{Z:()=>l});var r=n(1112);const i="EXT_color_buffer_float",o={33189:{bpp:2},33190:{gl2:!0,bpp:3},36012:{gl2:!0,bpp:4},36168:{bpp:1},34041:{bpp:4},35056:{gl2:!0,bpp:4},36013:{gl2:!0,bpp:5},32854:{bpp:2},36194:{bpp:2},32855:{bpp:2},33321:{gl2:!0,bpp:1},33330:{gl2:!0,bpp:1},33329:{gl2:!0,bpp:1},33332:{gl2:!0,bpp:2},33331:{gl2:!0,bpp:2},33334:{gl2:!0,bpp:4},33333:{gl2:!0,bpp:4},33323:{gl2:!0,bpp:2},33336:{gl2:!0,bpp:2},33335:{gl2:!0,bpp:2},33338:{gl2:!0,bpp:4},33337:{gl2:!0,bpp:4},33340:{gl2:!0,bpp:8},33339:{gl2:!0,bpp:8},32849:{gl2:!0,bpp:3},32856:{gl2:!0,bpp:4},32857:{gl2:!0,bpp:4},36220:{gl2:!0,bpp:4},36238:{gl2:!0,bpp:4},36975:{gl2:!0,bpp:4},36214:{gl2:!0,bpp:8},36232:{gl2:!0,bpp:8},36226:{gl2:!0,bpp:16},36208:{gl2:!0,bpp:16},33325:{gl2:i,bpp:2},33327:{gl2:i,bpp:4},34842:{gl2:i,bpp:8},33326:{gl2:i,bpp:4},33328:{gl2:i,bpp:8},34836:{gl2:i,bpp:16},35898:{gl2:i,bpp:4}};var a=n(76195),s=n(59661);class l extends r.Z{get[Symbol.toStringTag](){return"Renderbuffer"}static isSupported(e){let{format:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null};return!t||function(e,t,n){const r=n[t];if(!r)return!1;const i=(0,a.D0)(e)&&r.gl2||r.gl1;return"string"===typeof i?e.getExtension(i):i}(e,t,o)}static getSamplesForFormat(e,t){let{format:n}=t;return e.getInternalformatParameter(36161,n,32937)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.initialize(t),Object.seal(this)}initialize(e){let{format:t,width:n=1,height:r=1,samples:i=0}=e;return(0,s.h)(t,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==i&&(0,a.D0)(this.gl)?this.gl.renderbufferStorageMultisample(36161,i,t,n,r):this.gl.renderbufferStorage(36161,t,n,r),this.format=t,this.width=n,this.height=r,this.samples=i,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*o[this.format].bpp),this}resize(e){let{width:t,height:n}=e;return t!==this.width||n!==this.height?this.initialize({width:t,height:n,format:this.format,samples:this.samples}):this}_createHandle(){return this.gl.createRenderbuffer()}_deleteHandle(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}_bindHandle(e){this.gl.bindRenderbuffer(36161,e)}_syncHandle(e){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}_getParameter(e){this.gl.bindRenderbuffer(36161,this.handle);return this.gl.getRenderbufferParameter(36161,e)}}},1112:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(76195),i=n(53886),o=n(55562),a=n(59661),s=n(39042),l=n(43331);const c="Resource subclass must define virtual methods";class u{get[Symbol.toStringTag](){return"Resource"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.JD)(e);const{id:n,userData:i={}}=t;this.gl=e,this.gl2=e,this.id=n||(0,s.hQ)(this[Symbol.toStringTag]),this.userData=i,this._bound=!1,this._handle=t.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}toString(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}get handle(){return this._handle}delete(){let{deleteChildren:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,t&&e&&t.filter(Boolean).forEach((e=>e.delete())),this}bind(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!==typeof t?(this._bindHandle(t),this):(this._bound?e=t():(this._bindHandle(this.handle),this._bound=!0,e=t(),this._bound=!1,this._bindHandle(null)),e)}unbind(){this.bind(null)}getParameter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=(0,o.sF)(this.gl,e),(0,a.h)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=(0,r.D0)(this.gl);if(!((!("webgl2"in n)||e)&&(!("extension"in n)||this.gl.getExtension(n.extension)))){const t=n.webgl1,r="webgl2"in n?n.webgl2:n.webgl1;return e?r:t}}return this._getParameter(e,t)}getParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{parameters:t,keys:n}=e,i=this.constructor.PARAMETERS||{},a=(0,r.D0)(this.gl),s={},l=t||Object.keys(i);for(const r of l){const t=i[r];if(t&&(!("webgl2"in t)||a)&&(!("extension"in t)||this.gl.getExtension(t.extension))){const i=n?(0,o.km)(this.gl,r):r;s[i]=this.getParameter(r,e),n&&"GLenum"===t.type&&(s[i]=(0,o.km)(this.gl,s[i]))}}return s}setParameter(e,t){e=(0,o.sF)(this.gl,e),(0,a.h)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=(0,r.D0)(this.gl);if(!((!("webgl2"in n)||e)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(t=(0,o.sF)(t))}return this._setParameter(e,t),this}setParameters(e){for(const t in e)this.setParameter(t,e[t]);return this}stubRemovedMethods(e,t,n){return(0,l.F)(this,e,t,n)}initialize(e){}_createHandle(){throw new Error(c)}_deleteHandle(){throw new Error(c)}_bindHandle(e){throw new Error(c)}_getOptsFromHandle(){throw new Error(c)}_getParameter(e,t){throw new Error(c)}_setParameter(e,t){throw new Error(c)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_addStats(){const e=this[Symbol.toStringTag],t=i.lR.get("Resource Counts");t.get("Resources Created").incrementCount(),t.get("".concat(e,"s Created")).incrementCount(),t.get("".concat(e,"s Active")).incrementCount()}_removeStats(){const e=this[Symbol.toStringTag];i.lR.get("Resource Counts").get("".concat(e,"s Active")).decrementCount()}_trackAllocatedMemory(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag];this._trackAllocatedMemoryForContext(e,t),this._trackAllocatedMemoryForContext(e,t,this.gl.canvas&&this.gl.canvas.id),this.byteLength=e}_trackAllocatedMemoryForContext(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=i.lR.get("Memory Usage".concat(n));r.get("GPU Memory").addCount(e),r.get("".concat(t," Memory")).addCount(e)}_trackDeallocatedMemory(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag];this._trackDeallocatedMemoryForContext(e),this._trackDeallocatedMemoryForContext(e,this.gl.canvas&&this.gl.canvas.id),this.byteLength=0}_trackDeallocatedMemoryForContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=i.lR.get("Memory Usage".concat(t));n.get("GPU Memory").subtractCount(this.byteLength),n.get("".concat(e," Memory")).subtractCount(this.byteLength)}}},81786:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(76195),i=n(46773),o=n(59661);let a="";class s extends i.Z{get[Symbol.toStringTag](){return"Texture2D"}static isSupported(e,t){return i.Z.isSupported(e,t)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;(0,r.JD)(e),(t instanceof Promise||"string"===typeof t)&&(t={data:t}),"string"===typeof t.data&&(t=Object.assign({},t,{data:(n=t.data,(0,o.h)("string"===typeof n),n=a+n,new Promise(((e,t)=>{try{const r=new Image;r.onload=()=>e(r),r.onerror=()=>t(new Error("Could not load image ".concat(n,"."))),r.crossOrigin=i&&i.crossOrigin||"anonymous",r.src=n}catch(r){t(r)}})))})),super(e,Object.assign({},t,{target:3553})),this.initialize(t),Object.seal(this)}}},50844:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,KR:()=>l,ae:()=>i,br:()=>s,pH:()=>a});var r=n(76195);const i={6407:{dataFormat:6407,types:[5121,33635]},6408:{dataFormat:6408,types:[5121,32819,32820]},6406:{dataFormat:6406,types:[5121]},6409:{dataFormat:6409,types:[5121]},6410:{dataFormat:6410,types:[5121]},33326:{dataFormat:6403,types:[5126],gl2:!0},33328:{dataFormat:33319,types:[5126],gl2:!0},34837:{dataFormat:6407,types:[5126],gl2:!0},34836:{dataFormat:6408,types:[5126],gl2:!0}},o={6403:1,36244:1,33319:2,33320:2,6407:3,36248:3,6408:4,36249:4,6402:1,34041:1,6406:1,6409:1,6410:2},a={5126:4,5125:4,5124:4,5123:2,5122:2,5131:2,5120:1,5121:1};function s(e,t){const n=i[t];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;const o=(0,r.D0)(e)&&n.gl2||n.gl1;return"string"===typeof o?e.getExtension(o):o}function l(e,t){const n=i[t];switch(n&&n.types[0]){case 5126:return e.getExtension("OES_texture_float_linear");case 5131:return e.getExtension("OES_texture_half_float_linear");default:return!0}}},46773:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(76195),i=n(1112),o=n(64180),a=n(50844),s=n(59661),l=n(39042);const c=[9729,9728],u=globalThis.WebGLBuffer||function(){};class d extends i.Z{get[Symbol.toStringTag](){return"Texture"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{format:n,linearFiltering:r}=t;let i=!0;return n&&(i=i&&(0,a.br)(e,n),i=i&&(!r||(0,a.KR)(e,n))),i}constructor(e,t){const{id:n=(0,l.hQ)("texture"),handle:r,target:i}=t;super(e,{id:n,handle:r}),this.target=i,this.textureUnit=void 0,this.loaded=!1,this.width=void 0,this.height=void 0,this.depth=void 0,this.format=void 0,this.type=void 0,this.dataFormat=void 0,this.border=void 0,this.textureUnit=void 0,this.mipmaps=void 0}toString(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data;if(t instanceof Promise)return t.then((t=>this.initialize(Object.assign({},e,{pixels:t,data:t})))),this;const n="undefined"!==typeof HTMLVideoElement&&t instanceof HTMLVideoElement;if(n&&t.readyStatethis.initialize(e))),this;const{pixels:i=null,format:o=6408,border:a=0,recreate:s=!1,parameters:l={},pixelStore:c={},textureUnit:u}=e;t||(t=i);let{width:d,height:h,dataFormat:f,type:p,compressed:g=!1,mipmaps:m=!0}=e;const{depth:A=0}=e;return({width:d,height:h,compressed:g,dataFormat:f,type:p}=this._deduceParameters({format:o,type:p,dataFormat:f,compressed:g,data:t,width:d,height:h})),this.width=d,this.height=h,this.depth=A,this.format=o,this.type=p,this.dataFormat=f,this.border=a,this.textureUnit=u,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),m&&this._isNPOT()&&(r.cM.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),m=!1,this._updateForNPOT(l)),this.mipmaps=m,this.setImageData({data:t,width:d,height:h,depth:A,format:o,type:p,dataFormat:f,border:a,mipmaps:m,parameters:c,compressed:g}),m&&this.generateMipmap(),this.setParameters(l),s&&(this.data=t),n&&(this._video={video:t,parameters:l,lastTime:t.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?t.currentTime:-1}),this}update(){if(this._video){const{video:e,parameters:t,lastTime:n}=this._video;if(n===e.currentTime||e.readyState0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(r.cM.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),(0,r.s8)(this.gl,e,(()=>{this.gl.generateMipmap(this.target)})),this.gl.bindTexture(this.target,null),this)}setImageData(e){this._trackDeallocatedMemory("Texture");const{target:t=this.target,pixels:n=null,level:i=0,format:o=this.format,border:l=this.border,offset:c=0,parameters:u={}}=e;let{data:d=null,type:h=this.type,width:f=this.width,height:p=this.height,dataFormat:g=this.dataFormat,compressed:m=!1}=e;d||(d=n),({type:h,dataFormat:g,compressed:m,width:f,height:p}=this._deduceParameters({format:o,type:h,dataFormat:g,compressed:m,data:d,width:f,height:p}));const{gl:A}=this;A.bindTexture(this.target,this.handle);let v,y=null;({data:d,dataType:y}=this._getDataType({data:d,compressed:m}));let b=0;if((0,r.s8)(this.gl,u,(()=>{switch(y){case"null":A.texImage2D(t,i,o,f,p,l,g,h,d);break;case"typed-array":A.texImage2D(t,i,o,f,p,l,g,h,d,c);break;case"buffer":v=(0,r.KQ)(A),v.bindBuffer(35052,d.handle||d),v.texImage2D(t,i,o,f,p,l,g,h,c),v.bindBuffer(35052,null);break;case"browser-object":(0,r.D0)(A)?A.texImage2D(t,i,o,f,p,l,g,h,d):A.texImage2D(t,i,o,g,h,d);break;case"compressed":for(const[e,n]of d.entries())A.compressedTexImage2D(t,e,n.format,n.width,n.height,l,n.data),b+=n.levelSize;break;default:(0,s.h)(!1,"Unknown image data type")}})),"compressed"===y)this._trackAllocatedMemory(b,"Texture");else if(d&&d.byteLength)this._trackAllocatedMemory(d.byteLength,"Texture");else{const e=a.C[this.dataFormat]||4,t=a.pH[this.type]||1;this._trackAllocatedMemory(this.width*this.height*e*t,"Texture")}return this.loaded=!0,this}setSubImageData(e){let{target:t=this.target,pixels:n=null,data:i=null,x:a=0,y:l=0,width:c=this.width,height:d=this.height,level:h=0,format:f=this.format,type:p=this.type,dataFormat:g=this.dataFormat,compressed:m=!1,offset:A=0,border:v=this.border,parameters:y={}}=e;if(({type:p,dataFormat:g,compressed:m,width:c,height:d}=this._deduceParameters({format:f,type:p,dataFormat:g,compressed:m,data:i,width:c,height:d})),(0,s.h)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const e=i;i=e.data,c=e.shape[0],d=e.shape[1]}i instanceof o.Z&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),(0,r.s8)(this.gl,y,(()=>{if(m)this.gl.compressedTexSubImage2D(t,h,a,l,c,d,f,i);else if(null===i)this.gl.texSubImage2D(t,h,a,l,c,d,g,p,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(t,h,a,l,c,d,g,p,i,A);else if(i instanceof u){const e=(0,r.KQ)(this.gl);e.bindBuffer(35052,i),e.texSubImage2D(t,h,a,l,c,d,g,p,A),e.bindBuffer(35052,null)}else if((0,r.D0)(this.gl)){(0,r.KQ)(this.gl).texSubImage2D(t,h,a,l,c,d,g,p,i)}else this.gl.texSubImage2D(t,h,a,l,g,p,i)})),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.cM.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:t}=this;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,this.handle),e}unbind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:t}=this;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,null),e}_getDataType(e){let{data:t,compressed:n=!1}=e;return n?{data:t,dataType:"compressed"}:null===t?{data:t,dataType:"null"}:ArrayBuffer.isView(t)?{data:t,dataType:"typed-array"}:t instanceof o.Z?{data:t.handle,dataType:"buffer"}:t instanceof u?{data:t,dataType:"buffer"}:{data:t,dataType:"browser-object"}}_deduceParameters(e){const{format:t,data:n}=e;let{width:r,height:i,dataFormat:o,type:s,compressed:l}=e;const c=a.ae[t];return o=o||c&&c.dataFormat,s=s||c&&c.types[0],l=l||c&&c.compressed,({width:r,height:i}=this._deduceImageSize(n,r,i)),{dataFormat:o,type:s,compressed:l,width:r,height:i,format:t,data:n}}_deduceImageSize(e,t,n){let r;return r="undefined"!==typeof ImageData&&e instanceof ImageData?{width:e.width,height:e.height}:"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?{width:e.width,height:e.height}:"undefined"!==typeof HTMLVideoElement&&e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e?{width:t,height:n}:{width:t>=0?t:1,height:n>=0?n:1},(0,s.h)(r,"Could not deduced texture size"),(0,s.h)(void 0===t||r.width===t,"Deduced texture width does not match supplied width"),(0,s.h)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}_createHandle(){return this.gl.createTexture()}_deleteHandle(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}_getParameter(e){switch(e){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);const t=this.gl.getTexParameter(this.target,e);return this.gl.bindTexture(this.target,null),t}}_setParameter(e,t){switch(this.gl.bindTexture(this.target,this.handle),t=this._getNPOTParam(e,t),e){case 33082:case 33083:this.gl.texParameterf(this.handle,e,t);break;case 4096:case 4097:(0,s.h)(!1);break;default:this.gl.texParameteri(this.target,e,t)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!(0,r.D0)(this.gl)&&(!(!this.width||!this.height)&&(!(0,l.wt)(this.width)||!(0,l.wt)(this.height)))}_updateForNPOT(e){void 0===e[this.gl.TEXTURE_MIN_FILTER]&&(e[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===e[this.gl.TEXTURE_WRAP_S]&&(e[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===e[this.gl.TEXTURE_WRAP_T]&&(e[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}_getNPOTParam(e,t){if(this._isNPOT())switch(e){case 10241:-1===c.indexOf(t)&&(t=9729);break;case 10242:case 10243:33071!==t&&(t=33071)}return t}}},73011:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(76195),i=n(1112),o=n(64180),a=n(39042);class s extends i.Z{get[Symbol.toStringTag](){return"TransformFeedback"}static isSupported(e){return(0,r.D0)(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.KQ)(e),super(e,t),this.initialize(t),this.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(this)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,(0,a.nK)(this.buffers)||this.bind((()=>this._unbindBuffers())),this.setProps(e),this}setProps(e){"program"in e&&(this.configuration=e.program&&e.program.configuration),"configuration"in e&&(this.configuration=e.configuration),"bindOnUse"in e&&(e=e.bindOnUse),"buffers"in e&&this.setBuffers(e.buffers)}setBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.bind((()=>{for(const t in e)this.setBuffer(t,e[t])})),this}setBuffer(e,t){const n=this._getVaryingIndex(e),{buffer:i,byteSize:o,byteOffset:a}=this._getBufferParams(t);return n<0?(this.unused[e]=i,r.cM.warn("".concat(this.id," unused varying buffer ").concat(e))(),this):(this.buffers[n]=t,this.bindOnUse||this._bindBuffer(n,i,a,o),this)}begin(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(e),this}end(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}_getBufferParams(e){let t,n,r;return e instanceof o.Z===!1?(r=e.buffer,n=e.byteSize,t=e.byteOffset):r=e,void 0===t&&void 0===n||(t=t||0,n=n||r.byteLength-t),{buffer:r,byteOffset:t,byteSize:n}}_getVaryingInfo(e){return this.configuration&&this.configuration.getVaryingInfo(e)}_getVaryingIndex(e){if(this.configuration)return this.configuration.getVaryingInfo(e).location;const t=Number(e);return Number.isFinite(t)?t:-1}_bindBuffers(){if(this.bindOnUse)for(const e in this.buffers){const{buffer:t,byteSize:n,byteOffset:r}=this._getBufferParams(this.buffers[e]);this._bindBuffer(e,t,r,n)}}_unbindBuffers(){if(this.bindOnUse)for(const e in this.buffers)this._bindBuffer(e,null)}_bindBuffer(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;const i=t&&t.handle;return i&&void 0!==r?this.gl.bindBufferRange(35982,e,i,n,r):this.gl.bindBufferBase(35982,e,i),this}_createHandle(){return this.gl.createTransformFeedback()}_deleteHandle(){this.gl.deleteTransformFeedback(this.handle)}_bindHandle(e){this.gl.bindTransformFeedback(36386,this.handle)}}},6509:(e,t,n)=>{"use strict";n.d(t,{N$:()=>c,U6:()=>s,ag:()=>l});var r=n(87966),i=n(76195),o=n(59661);const a=2;function s(e,t){return l(e,t)}function l(e,t){return(t=Array.isArray(t)?t:[t]).every((t=>u(e,t)))}function c(e){e.luma=e.luma||{},e.luma.caps=e.luma.caps||{};for(const t in r.Z)void 0===e.luma.caps[t]&&(e.luma.caps[t]=u(e,t));return e.luma.caps}function u(e,t){return e.luma=e.luma||{},e.luma.caps=e.luma.caps||{},void 0===e.luma.caps[t]&&(e.luma.caps[t]=function(e,t){const n=r.Z[t];let a;(0,o.h)(n,t);const s=(0,i.D0)(e)&&n[1]||n[0];if("function"===typeof s)a=s(e);else if(Array.isArray(s)){a=!0;for(const t of s)a=a&&Boolean(e.getExtension(t))}else"string"===typeof s?a=Boolean(e.getExtension(s)):"boolean"===typeof s?a=s:(0,o.h)(!1);return a}(e,t)),e.luma.caps[t]||i.cM.log(a,"Feature: ".concat(t," not supported"))(),e.luma.caps[t]}},87966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,h:()=>o});var r=n(64282),i=n(81786);const o={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"};const a={[o.WEBGL2]:[!1,!0],[o.VERTEX_ARRAY_OBJECT]:["OES_vertex_array_object",!0],[o.TIMER_QUERY]:["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"],[o.INSTANCED_RENDERING]:["ANGLE_instanced_arrays",!0],[o.MULTIPLE_RENDER_TARGETS]:["WEBGL_draw_buffers",!0],[o.ELEMENT_INDEX_UINT32]:["OES_element_index_uint",!0],[o.BLEND_EQUATION_MINMAX]:["EXT_blend_minmax",!0],[o.FLOAT_BLEND]:["EXT_float_blend"],[o.COLOR_ENCODING_SRGB]:["EXT_sRGB",!0],[o.TEXTURE_DEPTH]:["WEBGL_depth_texture",!0],[o.TEXTURE_FLOAT]:["OES_texture_float",!0],[o.TEXTURE_HALF_FLOAT]:["OES_texture_half_float",!0],[o.TEXTURE_FILTER_LINEAR_FLOAT]:["OES_texture_float_linear"],[o.TEXTURE_FILTER_LINEAR_HALF_FLOAT]:["OES_texture_half_float_linear"],[o.TEXTURE_FILTER_ANISOTROPIC]:["EXT_texture_filter_anisotropic"],[o.COLOR_ATTACHMENT_RGBA32F]:[function(e){const t=new i.Z(e,{format:6408,type:5126,dataFormat:6408}),n=new r.Z(e,{id:"test-framebuffer",check:!1,attachments:{36064:t}}),o=n.getStatus();return t.delete(),n.delete(),36053===o},"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_FLOAT]:[!1,"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_HALF_FLOAT]:["EXT_color_buffer_half_float"],[o.GLSL_FRAG_DATA]:["WEBGL_draw_buffers",!0],[o.GLSL_FRAG_DEPTH]:["EXT_frag_depth",!0],[o.GLSL_DERIVATIVES]:["OES_standard_derivatives",!0],[o.GLSL_TEXTURE_LOD]:["EXT_shader_texture_lod",!0]}},53886:(e,t,n)=>{"use strict";n.d(t,{lR:()=>s});var r=n(76195),i=n(89069),o=n(89258);const a="8.5.19";const s=new class{constructor(){this.stats=new Map}get(e){return this.stats.has(e)||this.stats.set(e,new i.Z({id:e})),this.stats.get(e)}};if(globalThis.luma&&globalThis.luma.VERSION!==a)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(a));globalThis.luma||((0,o.Z)()&&r.cM.log(1,"luma.gl ".concat(a," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),globalThis.luma=globalThis.luma||{VERSION:a,version:a,log:r.cM,stats:s,globals:{modules:{},nodeIO:{}}});globalThis.luma},59661:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}n.d(t,{h:()=>r})},13413:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});var r=n(76195);function i(e,t,n){const{removedProps:i={},deprecatedProps:o={},replacedProps:a={}}=n;for(const l in i)if(l in t){const t=i[l]?"".concat(e,".").concat(i[l]):"N/A";r.cM.removed("".concat(e,".").concat(l),t)()}for(const l in o)if(l in t){const t=o[l];r.cM.deprecated("".concat(e,".").concat(l),"".concat(e,".").concat(t))()}let s=null;for(const l in a)if(l in t){const n=a[l];r.cM.deprecated("".concat(e,".").concat(l),"".concat(e,".").concat(n))(),s=s||Object.assign({},t),s[n]=t[l],delete s[l]}return s||t}},43331:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var r=n(76195);function i(e,t,n,i){const o="See luma.gl ".concat(n," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),a=Object.getPrototypeOf(e);i.forEach((e=>{a.methodName||(a[e]=()=>{throw r.cM.removed("Calling removed method ".concat(t,".").concat(e,": "),o)(),new Error(e)})}))}},39042:(e,t,n)=>{"use strict";n.d(t,{hQ:()=>o,nK:()=>s,wt:()=>a});var r=n(59661);const i={};function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[e]=i[e]||1;const t=i[e]++;return"".concat(e,"-").concat(t)}function a(e){return(0,r.h)("number"===typeof e,"Input must be a number"),e&&0===(e&e-1)}function s(e){let t=!0;for(const n in e){t=!1;break}return t}},2187:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>y,hJ:()=>b,jG:()=>_});var r=n(59661);const i=5120,o=5121,a=5122,s=5123,l=0,c=1,u=2,d=3,h=4,f=5,p=6,g=5126,m=5124,A=5125,v={[g]:[g,1,"float"],35664:[g,2,"vec2"],35665:[g,3,"vec3"],35666:[g,4,"vec4"],[m]:[m,1,"int"],35667:[m,2,"ivec2"],35668:[m,3,"ivec3"],35669:[m,4,"ivec4"],[A]:[A,1,"uint"],36294:[A,2,"uvec2"],36295:[A,3,"uvec3"],36296:[A,4,"uvec4"],35670:[g,1,"bool"],35671:[g,2,"bvec2"],35672:[g,3,"bvec3"],35673:[g,4,"bvec4"],35674:[g,8,"mat2"],35685:[g,8,"mat2x3"],35686:[g,8,"mat2x4"],35675:[g,12,"mat3"],35687:[g,12,"mat3x2"],35688:[g,12,"mat3x4"],35676:[g,16,"mat4"],35689:[g,16,"mat4x2"],35690:[g,16,"mat4x3"]};function y(e){switch(e){case l:return l;case c:case d:case u:return c;case h:case f:case p:return h;default:return(0,r.h)(!1),0}}function b(e){const t=v[e];if(!t)return null;const[n,r]=t;return{type:n,components:r}}function _(e,t){switch(e){case i:case o:case a:case s:e=g}for(const n in v){const[r,i,o]=v[n];if(r===e&&i===t)return{glType:n,name:o}}return null}},55562:(e,t,n)=>{"use strict";n.d(t,{km:()=>o,sF:()=>i});var r=n(59661);function i(e,t){if("string"!==typeof t)return t;const n=Number(t);if(!isNaN(n))return n;const i=e[t=t.replace(/^.*\./,"")];return(0,r.h)(void 0!==i,"Accessing undefined constant GL.".concat(t)),i}function o(e,t){t=Number(t);for(const n in e)if(e[n]===t)return"GL.".concat(n);return String(t)}},15671:(e,t,n)=>{"use strict";n.d(t,{h:()=>f,Y:()=>p});var r=n(81786),i=n(76195),o=n(46773);const a=[34069,34070,34071,34072,34073,34074];class s extends o.Z{get[Symbol.toStringTag](){return"TextureCube"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.JD)(e),super(e,Object.assign({},t,{target:34067})),this.initialize(t),Object.seal(this)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mipmaps:t=!0,parameters:n={}}=e;return this.opts=e,this.setCubeMapImageData(e).then((()=>{this.loaded=!0,t&&this.generateMipmap(e),this.setParameters(n)})),this}subImage(e){let{face:t,data:n,x:r=0,y:i=0,mipmapLevel:o=0}=e;return this._subImage({target:t,data:n,x:r,y:i,mipmapLevel:o})}async setCubeMapImageData(e){let{width:t,height:n,pixels:r,data:o,border:s=0,format:l=6408,type:c=5121}=e;const{gl:u}=this,d=r||o,h=await Promise.all(a.map((e=>{const t=d[e];return Promise.all(Array.isArray(t)?t:[t])})));this.bind(),a.forEach(((e,r)=>{h[r].length>1&&!1!==this.opts.mipmaps&&i.cM.warn("".concat(this.id," has mipmap and multiple LODs."))(),h[r].forEach(((r,i)=>{t&&n?u.texImage2D(e,i,l,t,n,s,l,c,r):u.texImage2D(e,i,l,l,c,r)}))})),this.unbind()}setImageDataForFace(e){const{face:t,width:n,height:r,pixels:i,data:o,border:a=0,format:s=6408,type:l=5121}=e,{gl:c}=this,u=i||o;return this.bind(),u instanceof Promise?u.then((n=>this.setImageDataForFace(Object.assign({},e,{face:t,data:n,pixels:n})))):this.width||this.height?c.texImage2D(t,0,s,n,r,a,s,l,u):c.texImage2D(t,0,s,s,l,u),this}}s.FACES=a;var l=n(50844),c=n(64180);class u extends o.Z{get[Symbol.toStringTag](){return"Texture3D"}static isSupported(e){return(0,i.D0)(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.KQ)(e),t=Object.assign({depth:1},t,{target:32879,unpackFlipY:!1}),super(e,t),this.initialize(t),Object.seal(this)}setImageData(e){let{level:t=0,dataFormat:n=6408,width:r,height:o,depth:a=1,border:s=0,format:u,type:d=5121,offset:h=0,data:f,parameters:p={}}=e;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),(0,i.s8)(this.gl,p,(()=>{ArrayBuffer.isView(f)&&this.gl.texImage3D(this.target,t,n,r,o,a,s,u,d,f),f instanceof c.Z&&(this.gl.bindBuffer(35052,f.handle),this.gl.texImage3D(this.target,t,n,r,o,a,s,u,d,h))})),f&&f.byteLength)this._trackAllocatedMemory(f.byteLength,"Texture");else{const e=l.C[this.dataFormat]||4,t=l.pH[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*e*t,"Texture")}return this.loaded=!0,this}}var d=n(64282),h=n(59661);function f(e,t){(0,h.h)(e instanceof r.Z||e instanceof s||e instanceof u);const n=e.constructor,{gl:i,width:o,height:a,format:l,type:c,dataFormat:d,border:f,mipmaps:p}=e;return new n(i,Object.assign({width:o,height:a,format:l,type:c,dataFormat:d,border:f,mipmaps:p},t))}function p(e,t){const{gl:n,width:r,height:i,id:o}=e;return new d.Z(n,Object.assign({},t,{id:"framebuffer-for-".concat(o),width:r,height:i,attachments:{36064:e}}))}},78501:(e,t,n)=>{"use strict";n.d(t,{KS:()=>s,O:()=>i,c$:()=>a,vN:()=>o});const r="Failed to deduce GL constant from typed array";function i(e){switch(ArrayBuffer.isView(e)?e.constructor:e){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error(r)}}function o(e){let{clamped:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return t?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function a(e){let{data:t,width:n,height:r,bytesPerPixel:i=4,temp:o}=e;const a=n*i;o=o||new Uint8Array(a);for(let s=0;s{function t(e){if(e=Object.assign({},e),!(this instanceof t))throw new Error("MapboxLanguage needs to be called with the new keyword");this.setLanguage=this.setLanguage.bind(this),this._initialStyleUpdate=this._initialStyleUpdate.bind(this),this._defaultLanguage=e.defaultLanguage,this._isLanguageField=e.languageField||/^name_/,this._getLanguageField=e.getLanguageField||function(e){return"mul"===e?"name":"name_".concat(e)},this._languageSource=e.languageSource||null,this._languageTransform=e.languageTransform,this._excludedLayerIds=e.excludedLayerIds||[],this.supportedLanguages=e.supportedLanguages||["ar","de","en","es","fr","it","ja","ko","mul","pt","ru","vi","zh-Hans","zh-Hant"]}const n=/^\{name/;function r(e,t){const r=Array.isArray(t)&&"get"===t[0];return r&&n.test(t[1])&&console.warn("This plugin no longer supports the use of token syntax (e.g. {name}). Please use a get expression. See https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/ for more details."),r&&e.test(t[1])}function i(e,t,n){if(Array.isArray(t))for(let o=1;o{const n=e.sources[t].url;return n&&n.indexOf("mapbox.mapbox-streets-v8")>-1||/mapbox-streets-v[1-9][1-9]/.test(n)}));if(!t.length)throw new Error('If using MapboxLanguage with a Mapbox style, the style must be based on vector tile version 8, e.g. "streets-v11"');return t[0]}(e);if(!n)return e;const r=this._getLanguageField(t),i=this._isLanguageField,a=this._excludedLayerIds,s=e.layers.map((e=>e.source===n?function(e,t,n,r){return t.layout&&t.layout["text-field"]&&-1===r.indexOf(t.id)?Object.assign({},t,{layout:Object.assign({},t.layout,{"text-field":o(e,t.layout["text-field"],n)})}):t}(i,e,r,a):e)),l=Object.assign({},e,{layers:s});return this._languageTransform?this._languageTransform(l,t):l},t.prototype._initialStyleUpdate=function(){const e=this._map.getStyle(),t=this._defaultLanguage||function(e){const t=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage,n=t&&t.split("-");let r=t;n.length>1&&(r=n[0]);if(e.indexOf(r)>-1)return r;return null}(this.supportedLanguages);this._map.setStyle(this.setLanguage(e,t))},t.prototype.onAdd=function(e){return this._map=e,this._map.on("style.load",this._initialStyleUpdate),this._container=document.createElement("div"),this._container},t.prototype.onRemove=function(){this._map.off("style.load",this._initialStyleUpdate),this._map=void 0},"undefined"!==typeof e.exports?e.exports=t:window.MapboxLanguage=t},76624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(30373);class i extends(function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Array)){clone(){return(new this.constructor).copy(this)}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n0?", ":"")+(0,r.Bw)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(76624),i=n(6859),o=n(30373);class a extends r.Z{toString(){let e="[";if(o.vc.printRowMajor){e+="row-major:";for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0);const n=e*this.RANK;for(let r=0;r{"use strict";n.d(t,{Z:()=>a});var r=n(76624),i=n(6859),o=n(83006);class a extends r.Z{get x(){return this[0]}set x(e){this[0]=(0,i.u5)(e)}get y(){return this[1]}set y(e){this[1]=(0,i.u5)(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t=0&&e=0&&e{"use strict";n.d(t,{Z:()=>m});var r,i=n(74310),o=n(6859),a=n(96420),s=n(44649),l=n(69291),c=n(58034),u=n(81723);!function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL0ROW3=3]="COL0ROW3",e[e.COL1ROW0=4]="COL1ROW0",e[e.COL1ROW1=5]="COL1ROW1",e[e.COL1ROW2=6]="COL1ROW2",e[e.COL1ROW3=7]="COL1ROW3",e[e.COL2ROW0=8]="COL2ROW0",e[e.COL2ROW1=9]="COL2ROW1",e[e.COL2ROW2=10]="COL2ROW2",e[e.COL2ROW3=11]="COL2ROW3",e[e.COL3ROW0=12]="COL3ROW0",e[e.COL3ROW1=13]="COL3ROW1",e[e.COL3ROW2=14]="COL3ROW2",e[e.COL3ROW3=15]="COL3ROW3"}(r||(r={}));const d=45*Math.PI/180,h=1,f=.1,p=500,g=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class m extends i.Z{static get IDENTITY(){return function(){v||(v=new m,Object.freeze(v));return v}()}static get ZERO(){return function(){A||(A=new m([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(A));return A}()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return r}constructor(e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?this.copy(e):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}set(e,t,n,r,i,o,a,s,l,c,u,d,h,f,p,g){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=l,this[9]=c,this[10]=u,this[11]=d,this[12]=h,this[13]=f,this[14]=p,this[15]=g,this.check()}setRowMajor(e,t,n,r,i,o,a,s,l,c,u,d,h,f,p,g){return this[0]=e,this[1]=i,this[2]=l,this[3]=h,this[4]=t,this[5]=o,this[6]=c,this[7]=f,this[8]=n,this[9]=a,this[10]=u,this[11]=p,this[12]=r,this[13]=s,this[14]=d,this[15]=g,this.check()}toRowMajor(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}identity(){return this.copy(g)}fromObject(e){return this.check()}fromQuaternion(e){return s.en(this,e),this.check()}frustum(e){const{left:t,right:n,bottom:r,top:i,near:o=f,far:a=p}=e;return a===1/0?function(e,t,n,r,i,o){const a=2*o/(n-t),s=2*o/(i-r),l=(n+t)/(n-t),c=(i+r)/(i-r),u=-1,d=-1,h=-2*o;e[0]=a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=l,e[9]=c,e[10]=u,e[11]=d,e[12]=0,e[13]=0,e[14]=h,e[15]=0}(this,t,n,r,i,o):s.oy(this,t,n,r,i,o,a),this.check()}lookAt(e){const{eye:t,center:n=[0,0,0],up:r=[0,1,0]}=e;return s.zB(this,t,n,r),this.check()}ortho(e){const{left:t,right:n,bottom:r,top:i,near:o=f,far:a=p}=e;return s.M5(this,t,n,r,i,o,a),this.check()}orthographic(e){const{fovy:t=d,aspect:n=h,focalDistance:r=1,near:i=f,far:o=p}=e;y(t);const a=t/2,s=r*Math.tan(a),l=s*n;return this.ortho({left:-l,right:l,bottom:-s,top:s,near:i,far:o})}perspective(e){const{fovy:t=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=e;return y(t),s.G3(this,t,n,r,i),this.check()}determinant(){return s.GH(this)}getScale(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}getTranslation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}getRotation(e,t){e=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=t||[-0,-0,-0];const n=this.getScale(t),r=1/n[0],i=1/n[1],o=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*o,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*o,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}getRotationMatrix3(e,t){e=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=t||[-0,-0,-0];const n=this.getScale(t),r=1/n[0],i=1/n[1],o=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*o,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*o,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*o,e}transpose(){return s.p4(this,this),this.check()}invert(){return s.U_(this,this),this.check()}multiplyLeft(e){return s.Jp(this,e,this),this.check()}multiplyRight(e){return s.Jp(this,this,e),this.check()}rotateX(e){return s.lM(this,this,e),this.check()}rotateY(e){return s.uD(this,this,e),this.check()}rotateZ(e){return s.jI(this,this,e),this.check()}rotateXYZ(e){return this.rotateX(e[0]).rotateY(e[1]).rotateZ(e[2])}rotateAxis(e,t){return s.U1(this,this,e,t),this.check()}scale(e){return s.bA(this,this,Array.isArray(e)?e:[e,e,e]),this.check()}translate(e){return s.Iu(this,this,e),this.check()}transform(e,t){return 4===e.length?(t=u.fF(t||[-0,-0,-0,-0],e,this),(0,o.IL)(t,4),t):this.transformAsPoint(e,t)}transformAsPoint(e,t){const{length:n}=e;let r;switch(n){case 2:r=l.fF(t||[-0,-0],e,this);break;case 3:r=c.fF(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(r,e.length),r}transformAsVector(e,t){let n;switch(e.length){case 2:n=(0,a.pb)(t||[-0,-0],e,this);break;case 3:n=(0,a.pL)(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(n,e.length),n}transformPoint(e,t){return this.transformAsPoint(e,t)}transformVector(e,t){return this.transformAsPoint(e,t)}transformDirection(e,t){return this.transformAsVector(e,t)}makeRotationX(e){return this.identity().rotateX(e)}makeTranslation(e,t,n){return this.identity().translate([e,t,n])}}let A,v;function y(e){if(e>2*Math.PI)throw Error("expected radians")}},31549:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(22070),i=n(30373),o=n(6859),a=n(58034),s=n(96420);const l=[0,0,0];let c;class u extends r.Z{static get ZERO(){return c||(c=new u(0,0,0),Object.freeze(c)),c}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(-0,-0,-0),1===arguments.length&&(0,i.kJ)(e)?this.copy(e):(i.vc.debug&&((0,o.u5)(e),(0,o.u5)(t),(0,o.u5)(n)),this[0]=e,this[1]=t,this[2]=n)}set(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return i.vc.debug&&((0,o.u5)(e.x),(0,o.u5)(e.y),(0,o.u5)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=(0,o.u5)(e)}angle(e){return a.EU(this,e)}cross(e){return a.kC(this,this,e),this.check()}rotateX(e){let{radians:t,origin:n=l}=e;return a.lM(this,this,n,t),this.check()}rotateY(e){let{radians:t,origin:n=l}=e;return a.uD(this,this,n,t),this.check()}rotateZ(e){let{radians:t,origin:n=l}=e;return a.jI(this,this,n,t),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return a.fF(this,this,e),this.check()}transformAsVector(e){return(0,s.pL)(this,this,e),this.check()}transformByMatrix3(e){return a.kK(this,this,e),this.check()}transformByMatrix2(e){return(0,s.eQ)(this,this,e),this.check()}transformByQuaternion(e){return a.VC(this,this,e),this.check()}}},83006:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,{Z:()=>r})},30373:(e,t,n)=>{"use strict";n.d(t,{Bw:()=>i,fS:()=>l,kJ:()=>o,t7:()=>s,uZ:()=>a,vc:()=>r});Math.PI,Math.PI;const r={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function i(e){let{precision:t=r.precision}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=function(e){return Math.round(e/r.EPSILON)*r.EPSILON}(e),"".concat(parseFloat(e.toPrecision(t)))}function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function a(e,t,n){return c(e,(e=>Math.max(t,Math.min(n,e))))}function s(e,t,n){return o(e)?e.map(((e,r)=>s(e,t[r],n))):n*t+(1-n)*e}function l(e,t,n){const i=r.EPSILON;n&&(r.EPSILON=n);try{if(e===t)return!0;if(o(e)&&o(t)){if(e.length!==t.length)return!1;for(let n=0;n{"use strict";function r(e,t,n){const r=t[0],i=t[1],o=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/o,e[1]=(n[1]*r+n[5]*i)/o,e}function i(e,t,n){const r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o||1;return e[0]=(n[0]*r+n[4]*i+n[8]*o)/a,e[1]=(n[1]*r+n[5]*i+n[9]*o)/a,e[2]=(n[2]*r+n[6]*i+n[10]*o)/a,e}function o(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}function a(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e[3]=t[3],e}function s(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*o,e[1]=n[1]*r+n[4]*i+n[7]*o,e[2]=n[2]*r+n[5]*i+n[8]*o,e[3]=t[3],e}n.d(t,{G7:()=>a,_x:()=>s,eQ:()=>o,pL:()=>i,pb:()=>r})},6859:(e,t,n)=>{"use strict";n.d(t,{IL:()=>o,u5:()=>i});var r=n(30373);function i(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(r.vc.debug&&!function(e,t){if(e.length!==t)return!1;for(let n=0;n{"use strict";n.r(t),n.d(t,{Polygon:()=>h,WINDING:()=>o,_Polygon:()=>h,clipPolygon:()=>U,clipPolyline:()=>Z,cutPolygonByGrid:()=>X,cutPolygonByMercatorBounds:()=>ne,cutPolylineByGrid:()=>G,cutPolylineByMercatorBounds:()=>te,earcut:()=>f,forEachSegmentInPolygon:()=>c,getPolygonSignedArea:()=>l,getPolygonWindingDirection:()=>s,modifyPolygonWindingDirection:()=>a});var r=n(68185),i=n(30373);const o={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s(e,n)!==t&&(function(e,t){const{start:n=0,end:r=e.length,size:i=2}=t,o=(r-n)/i,a=Math.floor(o/2);for(let s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(l(e,t))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{start:n=0,end:r=e.length}=t,i=t.size||2;let o=0;for(let a=n,s=r-i;a2&&void 0!==arguments[2]?arguments[2]:{};const{start:r=0,end:o=e.length,size:a=2,isClosed:s}=n,l=(o-r)/a;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(d(e,t))}(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return n!==t&&(e.reverse(),!0)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{start:n=0,end:r=e.length}=t;let i=0;for(let o=n,a=r-1;o1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"points",void 0),(0,r.Z)(this,"isFlatArray",void 0),(0,r.Z)(this,"options",void 0),this.points=e,this.isFlatArray=!(0,i.kJ)(e[0]),this.options={start:t.start||0,end:t.end||e.length,size:t.size||2,isClosed:t.isClosed},Object.freeze(this)}getSignedArea(){return this.isFlatArray?l(this.points,this.options):d(this.points,this.options)}getArea(){return Math.abs(this.getSignedArea())}getWindingDirection(){return Math.sign(this.getSignedArea())}forEachSegment(e){this.isFlatArray?c(this.points,((t,n,r,i,o,a)=>{e([t,n],[r,i],o,a)}),this.options):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{start:r=0,end:o=e.length,isClosed:a}=n;for(let i=r;i2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3?arguments[3]:void 0;const i=t&&t.length,o=i?t[0]*n:e.length;let a=p(e,0,o,n,!0,r&&r[0]);const s=[];if(!a||a.next===a.prev)return s;let l,c,u,d,h,f,A;if(i&&(a=function(e,t,n,r,i){const o=[];let a,s,l,c,u;for(a=0,s=t.length;a80*n){d=c=e[0],h=u=e[1];for(let t=n;tc&&(c=f),A>u&&(u=A);l=Math.max(c-d,u-h),l=0!==l?1/l:0}return m(a,s,n,d,h,l),s}function p(e,t,n,r,i,o){let a,s;if(void 0===o&&(o=l(e,{start:t,end:n,size:r})),i===o<0)for(a=t;a=t;a-=r)s=D(a,e[a],e[a+1],s);return s&&M(s,s.next)&&(N(s),s=s.next),s}function g(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==T(r.prev,r,r.next))r=r.next;else{if(N(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function m(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=E(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,l,c=1;do{for(i=e,e=null,l=null,r=0;i;){for(r++,a=i,o=0,n=0;n0||s>0&&a;)0!==o&&(0===s||!a||i.z<=a.z)?(t=i,i=i.nextZ,o--):(t=a,a=a.nextZ,s--),l?l.nextZ=t:e=t,t.prevZ=l,l=t;i=a}l.nextZ=null,c*=2}while(r>1)}(i)}(e,r,i,o);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?v(e,r,i,o):A(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),N(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?m(e=y(g(e),t,n),t,n,r,i,o,2):2===a&&b(e,t,n,r,i,o):m(g(e),t,n,r,i,o,1);break}}function A(e){const t=e.prev,n=e,r=e.next;if(T(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(C(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&T(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function v(e,t,n,r){const i=e.prev,o=e,a=e.next;if(T(i,o,a)>=0)return!1;const s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=E(s,l,t,n,r),h=E(c,u,t,n,r);let f=e.prevZ,p=e.nextZ;for(;f&&f.z>=d&&p&&p.z<=h;){if(f!==e.prev&&f!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&T(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=d;){if(f!==e.prev&&f!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=h;){if(p!==e.prev&&p!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&T(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function y(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!M(i,o)&&k(i,r,r.next,o)&&I(i,o)&&I(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),N(r),N(r.next),r=e=o),r=r.next}while(r!==e);return g(r)}function b(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&P(a,e)){let s=L(a,e);return a=g(a,a.next),s=g(s,s.next),m(a,t,n,r,i,o),void m(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function _(e,t){return e.x-t.x}function w(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x=n.x&&n.x>=l&&r!==n.x&&C(io.x||n.x===o.x&&x(o,n)))&&(o=n,d=u)),n=n.next}while(n!==s);return o}(e,t),t){const n=L(t,e);g(t,t.next),g(n,n.next)}}function x(e,t){return T(e.prev,e,t.prev)<0&&T(t.next,e,e.next)<0}function E(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function S(e){let t=e,n=e;do{(t.x=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function P(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&k(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(I(e,t)&&I(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(T(e.prev,e,t.prev)||T(e,t.prev,t))||M(e,t)&&T(e.prev,e,e.next)>0&&T(t.prev,t,t.next)>0)}function T(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function M(e,t){return e.x===t.x&&e.y===t.y}function k(e,t,n,r){const i=O(T(e,t,n)),o=O(T(e,t,r)),a=O(T(n,r,e)),s=O(T(n,r,t));return i!==o&&a!==s||(!(0!==i||!R(e,n,t))||(!(0!==o||!R(e,r,t))||(!(0!==a||!R(n,e,r))||!(0!==s||!R(n,t,r)))))}function R(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function O(e){return e>0?1:e<0?-1:0}function I(e,t){return T(e.prev,e,e.next)<0?T(e,t,e.next)>=0&&T(e,e.prev,t)>=0:T(e,t,e.prev)<0||T(e,e.next,t)<0}function L(e,t){const n=new F(e.i,e.x,e.y),r=new F(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function D(e,t,n,r){const i=new F(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function N(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 F(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function j(e,t){const n=t.length,r=e.length;if(r>0){let i=!0;for(let o=0;o4&&void 0!==arguments[4]?arguments[4]:[];const o=r+t*n;for(let a=0;a4&&void 0!==arguments[4]?arguments[4]:[];if(8&n)i=(r[3]-e[1])/(t[1]-e[1]),o=3;else if(4&n)i=(r[1]-e[1])/(t[1]-e[1]),o=1;else if(2&n)i=(r[2]-e[0])/(t[0]-e[0]),o=2;else{if(!(1&n))return null;i=(r[0]-e[0])/(t[0]-e[0]),o=0}for(let s=0;st[2]&&(n|=2),e[1]t[3]&&(n|=8),n}function G(e,t){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:a=0,endIndex:s=e.length}=t||{},l=(s-a)/n;let c=[];const u=[c],d=z(e,0,n,a);let h,f;const p=Q(d,i,o,[]),g=[];j(c,d);for(let m=1;mn&&(c=[],u.push(c),j(c,d)),f=V(h,p)}j(c,h),B(d,h)}return r?u:u[0]}const W=0,q=1;function Y(e,t){for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;if(!e.length)return[];const{size:r=2,gridResolution:i=10,gridOffset:o=[0,0],edgeTypes:a=!1}=n||{},s=[],l=[{pos:e,types:a?new Array(e.length/r).fill(q):null,holes:t||[]}],c=[[],[]];let u=[];for(;l.length;){const{pos:e,types:t,holes:n}=l.shift();J(e,r,n[0]||e.length,c),u=Q(c[0],i,o,u);const d=V(c[1],u);if(d){let i=K(e,t,r,0,n[0]||e.length,u,d);const o={pos:i[0].pos,types:i[0].types,holes:[]},s={pos:i[1].pos,types:i[1].types,holes:[]};l.push(o,s);for(let l=0;l=0?(j(c,f)&&d.push(g),b+=p):d.length&&(d[d.length-1]=W),B(m,f),A=p,v=g;return[y?{pos:l,types:t&&u}:null,b?{pos:c,types:t&&d}:null]}function Q(e,t,n,r){const i=Math.floor((e[0]-n[0])/t)*t+n[0],o=Math.floor((e[1]-n[1])/t)*t+n[1];return r[0]=i,r[1]=o,r[2]=i+t,r[3]=o+t,r}function $(e,t,n){8&n?(e[1]+=t,e[3]+=t):4&n?(e[1]-=t,e[3]-=t):2&n?(e[0]+=t,e[2]+=t):1&n&&(e[0]-=t,e[2]-=t)}function J(e,t,n,r){let i=1/0,o=-1/0,a=1/0,s=-1/0;for(let l=0;lo?t:o,a=ns?n:s}return r[0][0]=i,r[0][1]=a,r[1][0]=o,r[1][1]=s,r}const ee=85.051129;function te(e,t){const{size:n=2,startIndex:r=0,endIndex:i=e.length,normalize:o=!0}=t||{},a=e.slice(r,i);oe(a,n,0,i-r);const s=G(a,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const l of s)ae(l,n);return s}function ne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;const{size:r=2,normalize:i=!0,edgeTypes:o=!1}=n||{};t=t||[];const a=[],s=[];let l=0,c=0;for(let d=0;d<=t.length;d++){const i=t[d]||e.length,o=c,u=re(e,r,l,i);for(let t=u;ti&&(i=t,o=a-1)}return o}function ie(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ee;const o=e[n],a=e[r-t];if(Math.abs(o-a)>180){const r=z(e,0,t,n);r[0]+=360*Math.round((a-o)/360),j(e,r),r[1]=Math.sign(r[1])*i,j(e,r),r[0]=o,j(e,r)}}function oe(e,t,n,r){let i,o=e[0];for(let a=n;a180||t<-180)&&(i-=360*Math.round(t/360)),e[a]=o=i}}function ae(e,t){let n;const r=e.length/t;for(let o=0;o{"use strict";n.d(t,{DW:()=>F,eG:()=>C,Lu:()=>M,Xg:()=>I,sj:()=>k,zX:()=>D,ro:()=>S,Bf:()=>x,wl:()=>T,lf:()=>P,w5:()=>_,QA:()=>B,CT:()=>O,NC:()=>E,es:()=>w,aW:()=>R});var r=n(68185),i=n(81723);function o(e,t){const n=(0,i.fF)([],t,e);return(0,i.bA)(n,n,1/n[3]),n}function a(e,t){const n=e%t;return n<0?t+n:n}function s(e,t,n){return en?n:e}const l=Math.log2||function(e){return Math.log(e)*Math.LOG2E};var c=n(44649),u=n(69291),d=n(58034);function h(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}const f=Math.PI,p=f/4,g=f/180,m=180/f,A=512,v=4003e4,y=85.051129,b=1.5;function _(e){const[t,n]=e;h(Number.isFinite(t)),h(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*g;return[A*(t*g+f)/(2*f),A*(f+Math.log(Math.tan(p+.5*r)))/(2*f)]}function w(e){const[t,n]=e,r=t/A*(2*f)-f,i=2*(Math.atan(Math.exp(n/A*(2*f)-f))-p);return[r*m,i*m]}function x(e){const{latitude:t}=e;h(Number.isFinite(t));const n=Math.cos(t*g);return l(v*n)-9}function E(e){const t=Math.cos(e*g);return A/v/t}function S(e){const{latitude:t,longitude:n,highPrecision:r=!1}=e;h(Number.isFinite(t)&&Number.isFinite(n));const i=A,o=Math.cos(t*g),a=i/360,s=a/o,l=i/v/o,c={unitsPerMeter:[l,l,l],metersPerUnit:[1/l,1/l,1/l],unitsPerDegree:[a,s,l],degreesPerUnit:[1/a,1/s,1/l]};if(r){const e=g*Math.tan(t*g)/o,n=a*e/2,r=i/v*e,u=r/s*l;c.unitsPerDegree2=[0,n,r],c.unitsPerMeter2=[u,0,u]}return c}function C(e,t){const[n,r,i]=e,[o,a,s]=t,{unitsPerMeter:l,unitsPerMeter2:c}=S({longitude:n,latitude:r,highPrecision:!0}),u=_(e);u[0]+=o*(l[0]+c[0]*a),u[1]+=a*(l[1]+c[1]*a);const d=w(u),h=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[d[0],d[1],h]:d}function P(e){const{height:t,pitch:n,bearing:r,altitude:i,scale:o,center:a}=e,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.Iu(s,s,[0,0,-i]),c.lM(s,s,-n*g),c.jI(s,s,r*g);const l=o/t;return c.bA(s,s,[l,l,l]),a&&c.Iu(s,s,d.tk([],a)),s}function T(e){const{width:t,height:n,altitude:r,pitch:i=0,offset:o,center:a,scale:l,nearZMultiplier:c=1,farZMultiplier:u=1}=e;let{fovy:d=M(b)}=e;void 0!==r&&(d=M(r));const h=d*g,f=i*g,p=k(d);let m=p;a&&(m+=a[2]*l/Math.cos(f)/n);const A=h*(.5+(o?o[1]:0)/n),v=Math.sin(A)*m/Math.sin(s(Math.PI/2-f-A,.01,Math.PI-.01)),y=Math.sin(f)*v+m,_=10*m;return{fov:h,aspect:t/n,focalDistance:p,near:c,far:Math.min(y*u,_)}}function M(e){return 2*Math.atan(.5/e)*m}function k(e){return.5/Math.tan(.5*e*g)}function R(e,t){const[n,r,i=0]=e;return h(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),o(t,[n,r,i,1])}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const[r,i,a]=e;if(h(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(a)){return o(t,[r,i,a,1])}const s=o(t,[r,i,0,1]),l=o(t,[r,i,1,1]),c=s[2],d=l[2],f=c===d?0:((n||0)-c)/(d-c);return u.t7([],s,l,f)}function I(e){const{width:t,height:n,bounds:r,minExtent:i=0,maxZoom:o=24,offset:a=[0,0]}=e,[[c,u],[d,f]]=r,p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("number"===typeof e)return{top:e,bottom:e,left:e,right:e};return h(Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.left)&&Number.isFinite(e.right)),e}(e.padding),g=_([c,s(f,-y,y)]),m=_([d,s(u,-y,y)]),A=[Math.max(Math.abs(m[0]-g[0]),i),Math.max(Math.abs(m[1]-g[1]),i)],v=[t-p.left-p.right-2*Math.abs(a[0]),n-p.top-p.bottom-2*Math.abs(a[1])];h(v[0]>0&&v[1]>0);const b=v[0]/A[0],x=v[1]/A[1],E=(p.right-p.left)/2/b,S=(p.top-p.bottom)/2/x,C=w([(m[0]+g[0])/2+E,(m[1]+g[1])/2+S]),P=Math.min(o,l(Math.abs(Math.min(b,x))));return h(Number.isFinite(P)),{longitude:C[0],latitude:C[1],zoom:P}}const L=Math.PI/180;function D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{width:n,height:r,unproject:i}=e,o={targetZ:t},a=i([0,r],o),s=i([n,r],o);let l,c;return(e.fovy?.5*e.fovy*L:Math.atan(.5/e.altitude))>(90-e.pitch)*L-.01?(l=N(e,0,t),c=N(e,n,t)):(l=i([0,0],o),c=i([n,0],o)),[a,s,c,l]}function N(e,t,n){const{pixelUnprojectionMatrix:r}=e,i=o(r,[t,0,1,1]),a=o(r,[t,e.height,1,1]),s=(n*e.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),l=w(u.t7([],i,a,s));return l.push(n),l}class F{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1};(0,r.Z)(this,"latitude",void 0),(0,r.Z)(this,"longitude",void 0),(0,r.Z)(this,"zoom",void 0),(0,r.Z)(this,"pitch",void 0),(0,r.Z)(this,"bearing",void 0),(0,r.Z)(this,"altitude",void 0),(0,r.Z)(this,"fovy",void 0),(0,r.Z)(this,"meterOffset",void 0),(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"scale",void 0),(0,r.Z)(this,"distanceScales",void 0),(0,r.Z)(this,"viewMatrix",void 0),(0,r.Z)(this,"projectionMatrix",void 0),(0,r.Z)(this,"viewProjectionMatrix",void 0),(0,r.Z)(this,"pixelProjectionMatrix",void 0),(0,r.Z)(this,"pixelUnprojectionMatrix",void 0),(0,r.Z)(this,"equals",(e=>e instanceof F&&(e.width===this.width&&e.height===this.height&&c.fS(e.projectionMatrix,this.projectionMatrix)&&c.fS(e.viewMatrix,this.viewMatrix)))),(0,r.Z)(this,"project",(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{topLeft:r=!0}=n,i=R(e.projectPosition(t),e.pixelProjectionMatrix),[o,a]=i,s=r?a:e.height-a;return 2===t.length?[o,s]:[o,s,i[2]]})),(0,r.Z)(this,"unproject",(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{topLeft:r=!0,targetZ:i}=n,[o,a,s]=t,l=r?a:e.height-a,c=i&&i*e.distanceScales.unitsPerMeter[2],u=O([o,l,s],e.pixelUnprojectionMatrix,c),[d,h,f]=e.unprojectPosition(u);return Number.isFinite(s)?[d,h,f]:Number.isFinite(i)?[d,h,i]:[d,h]})),(0,r.Z)(this,"projectPosition",(e=>{const[t,n]=_(e);return[t,n,(e[2]||0)*this.distanceScales.unitsPerMeter[2]]})),(0,r.Z)(this,"unprojectPosition",(e=>{const[t,n]=w(e);return[t,n,(e[2]||0)*this.distanceScales.metersPerUnit[2]]}));let{width:n,height:i,altitude:o=null,fovy:a=null}=t;const{latitude:s=0,longitude:l=0,zoom:u=0,pitch:h=0,bearing:f=0,position:p=null,nearZMultiplier:g=.02,farZMultiplier:m=1.01}=t;n=n||1,i=i||1,null===a&&null===o?(o=b,a=M(o)):null===a?a=M(o):null===o&&(o=k(a));const A=function(e){return Math.pow(2,e)}(u);o=Math.max(.75,o);const v=S({longitude:l,latitude:s}),y=_([l,s]);y.push(0),p&&d.IH(y,y,d.dC([],p,v.unitsPerMeter)),this.projectionMatrix=function(e){const{fov:t,aspect:n,near:r,far:i}=T(e);return c.G3([],t,n,r,i)}({width:n,height:i,scale:A,center:y,pitch:h,fovy:a,nearZMultiplier:g,farZMultiplier:m}),this.viewMatrix=P({height:i,scale:A,center:y,pitch:h,bearing:f,altitude:o}),this.width=n,this.height=i,this.scale=A,this.latitude=s,this.longitude=l,this.zoom=u,this.pitch=h,this.bearing=f,this.altitude=o,this.fovy=a,this.center=y,this.meterOffset=p||[0,0,0],this.distanceScales=v,this._initMatrices(),Object.freeze(this)}_initMatrices(){const{width:e,height:t,projectionMatrix:n,viewMatrix:r}=this,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.Jp(i,i,n),c.Jp(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.bA(o,o,[e/2,-t/2,1]),c.Iu(o,o,[1,-1,0]),c.Jp(o,o,i);const a=c.U_([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=a}projectFlat(e){return _(e)}unprojectFlat(e){return w(e)}getMapCenterByLngLatPosition(e){let{lngLat:t,pos:n}=e;const r=O(n,this.pixelUnprojectionMatrix),i=_(t),o=u.IH([],i,u.tk([],r));return w(u.IH([],this.center,o))}fitBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=I(Object.assign({width:n,height:r,bounds:e},t));return new F({width:n,height:r,longitude:i,latitude:o,zoom:a})}getBounds(e){const t=this.getBoundingRegion(e),n=Math.min(...t.map((e=>e[0]))),r=Math.max(...t.map((e=>e[0])));return[[n,Math.min(...t.map((e=>e[1])))],[r,Math.max(...t.map((e=>e[1])))]]}getBoundingRegion(){return D(this,(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).z||0)}getLocationAtPoint(e){let{lngLat:t,pos:n}=e;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}}const j=512;function B(e){const{width:t,height:n,pitch:r=0}=e;let{longitude:i,latitude:o,zoom:s,bearing:c=0}=e;(i<-180||i>180)&&(i=a(i+180,360)-180),(c<-180||c>180)&&(c=a(c+180,360)-180);const u=l(n/j);if(s<=u)s=u,o=0;else{const e=n/2/Math.pow(2,s),t=w([0,e])[1];if(ot&&(o=t)}}return{width:t,height:n,longitude:i,latitude:o,zoom:s,pitch:r,bearing:c}}},21748:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(89258),i=n(16246);const o=globalThis;function a(e){if(!e&&!(0,r.Z)())return"Node";if((0,i.Z)(e))return"Electron";const t="undefined"!==typeof navigator?navigator:{},n=e||t.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";const a=-1!==n.indexOf("MSIE "),s=-1!==n.indexOf("Trident/");return a||s?"IE":o.chrome?"Chrome":o.safari?"Safari":o.mozInnerScreenX?"Firefox":"Unknown"}},89258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(16246);function i(){return!("object"===typeof process&&"[object process]"===String(process)&&!process.browser)||(0,r.Z)()}},16246:(e,t,n)=>{"use strict";function r(e){if("undefined"!==typeof window&&"object"===typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!==typeof process&&"object"===typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"===typeof navigator&&"string"===typeof navigator.userAgent&&navigator.userAgent,n=e||t;return!!(n&&n.indexOf("Electron")>=0)}n.d(t,{Z:()=>r})},20251:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(68185),i=n(89258);const o="undefined"!==typeof __VERSION__?__VERSION__:"untranspiled source";(0,i.Z)();class a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";(0,r.Z)(this,"storage",void 0),(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"config",{}),this.storage=function(e){try{const t=window[e],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch(t){return null}}(n),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function s(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(n=Math.min(n,r/e.width));const o=e.width*n,a=e.height*n,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),s]}let l;function c(e){return"string"===typeof e?l[e.toUpperCase()]||l.WHITE:e}function u(e,t){if(!e)throw new Error(t||"Assertion failed")}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(l||(l={}));const d={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document,process:"object"===typeof process&&process},h=d.window||d.self||d.global,f=d.process||{};function p(){let e;var t,n;if(i.Z&&"performance"in h)e=null===h||void 0===h||null===(t=h.performance)||void 0===t||null===(n=t.now)||void 0===n?void 0:n.call(t);else if("hrtime"in f){var r;const t=null===f||void 0===f||null===(r=f.hrtime)||void 0===r?void 0:r.call(f);e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const g={debug:i.Z&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},m={enabled:!0,level:0};function A(){}const v={},y={once:!0};class b{constructor(){let{id:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"VERSION",o),(0,r.Z)(this,"_startTs",p()),(0,r.Z)(this,"_deltaTs",p()),(0,r.Z)(this,"_storage",void 0),(0,r.Z)(this,"userData",{}),(0,r.Z)(this,"LOG_THROTTLE_TIMEOUT",0),this.id=e,this._storage=new a("__probe-".concat(this.id,"__"),m),this.userData={},this.timeStamp("".concat(this.id," started")),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const n=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(n);for(const i of r)"function"===typeof e[i]&&(t.find((e=>i===e))||(e[i]=e[i].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((p()-this._startTs).toPrecision(10))}getDelta(){return Number((p()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){u(e,t)}warn(e){return this._getLogFunction(0,e,g.warn,arguments,y)}error(e){return this._getLogFunction(0,e,g.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,g.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,g.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i{const t=s(e,n,r);console.log(...t)},e.src=t,A}const i=t.nodeName||"";if("img"===i.toLowerCase())return console.log(...s(t,n,r)),A;if("canvas"===i.toLowerCase()){const e=new Image;return e.onload=()=>console.log(...s(e,n,r)),e.src=t.toDataURL(),A}return A}({image:o,message:a,scale:l}):function(e){let{image:t,message:r="",scale:i=1}=e,o=null;try{o=n(80758)}catch(a){}if(o)return()=>o(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((e=>console.log(e)));return A}({image:o,message:a,scale:l}):A}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||A)}group(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const r=w({logLevel:e,message:t,opts:n}),{collapsed:i}=n;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||A)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=_(e)}_getLogFunction(e,t,n,r,o){if(this._shouldLog(e)){o=w({logLevel:e,message:t,args:r,opts:o}),u(n=n||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=p();const a=o.tag||o.message;if(o.once){if(v[a])return A;v[a]=p()}return t=function(e,t,n){if("string"===typeof t){const s=n.time?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const n=Math.max(t-e.length,0);return"".concat(" ".repeat(n)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(n.total)):"";t=n.time?"".concat(e,": ").concat(s," ").concat(t):"".concat(e,": ").concat(t),r=t,o=n.color,a=n.background,i.Z||"string"!==typeof r||(o&&(o=c(o),r="\x1b[".concat(o,"m").concat(r,"\x1b[39m")),a&&(o=c(a),r="\x1b[".concat(a+10,"m").concat(r,"\x1b[49m"))),t=r}var r,o,a;return t}(this.id,o.message,o),n.bind(console,t,...o.args)}return A}}function _(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return u(Number.isFinite(t)&&t>=0),t}function w(e){const{logLevel:t,message:n}=e;e.logLevel=_(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==n;);switch(typeof t){case"string":case"function":void 0!==n&&r.unshift(n),e.message=t;break;case"object":Object.assign(e,t)}"function"===typeof e.message&&(e.message=e.message());const i=typeof e.message;return u("string"===i||"object"===i),Object.assign(e,{args:r},e.opts)}function x(e){for(const t in e)for(const n in e[t])return n||"untitled";return"empty"}(0,r.Z)(b,"VERSION",o)},89069:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(68185);function i(){let e;if("undefined"!==typeof window&&window.performance)e=window.performance.now();else if("undefined"!==typeof process&&process.hrtime){const t=process.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}class o{constructor(e,t){(0,r.Z)(this,"name",void 0),(0,r.Z)(this,"type",void 0),(0,r.Z)(this,"sampleSize",1),(0,r.Z)(this,"time",void 0),(0,r.Z)(this,"count",void 0),(0,r.Z)(this,"samples",void 0),(0,r.Z)(this,"lastTiming",void 0),(0,r.Z)(this,"lastSampleTime",void 0),(0,r.Z)(this,"lastSampleCount",void 0),(0,r.Z)(this,"_count",0),(0,r.Z)(this,"_time",0),(0,r.Z)(this,"_samples",0),(0,r.Z)(this,"_startTime",0),(0,r.Z)(this,"_timerPending",!1),this.name=e,this.type=t,this.reset()}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=i(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(i()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class a{constructor(e){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"stats",{}),this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:e,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(const e in this.stats)this.stats[e].reset();return this}forEach(e){for(const t in this.stats)e(this.stats[t])}getTable(){const e={};return this.forEach((t=>{e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}})),e}_initializeStats(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>this._getOrCreate(e)))}_getOrCreate(e){if(!e||!e.name)return null;const{name:t,type:n}=e;return this.stats[t]||(this.stats[t]=e instanceof o?e:new o(t,n)),this.stats[t]}}},34282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(13747),i=n(57435),o=n(33882),a=n(20749),s=(n(98162),n(43903));const l=i.createContext(null);var c=n(22368),u=n(12750),d=[];var h=n(86263),f=n(53047);var p="rc-util-locker-".concat(Date.now()),g=0;function m(e){var t=!!e,n=i.useState((function(){return g+=1,"".concat(p,"_").concat(g)})),o=(0,r.Z)(n,1)[0];(0,u.Z)((function(){if(t){var e=(0,f.o)(document.body).width,n=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,h.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),o)}else(0,h.jL)(o);return function(){(0,h.jL)(o)}}),[t,o])}var A=!1;var v=function(e){return!1!==e&&((0,a.Z)()&&e?"string"===typeof e?document.querySelector(e):"function"===typeof e?e():e:null)};const y=i.forwardRef((function(e,t){var n=e.open,h=e.autoLock,f=e.getContainer,p=(e.debug,e.autoDestroy),g=void 0===p||p,y=e.children,b=i.useState(n),_=(0,r.Z)(b,2),w=_[0],x=_[1],E=w||n;i.useEffect((function(){(g||n)&&x(n)}),[n,g]);var S=i.useState((function(){return v(f)})),C=(0,r.Z)(S,2),P=C[0],T=C[1];i.useEffect((function(){var e=v(f);T(null!==e&&void 0!==e?e:null)}));var M=function(e,t){var n=i.useState((function(){return(0,a.Z)()?document.createElement("div"):null})),o=(0,r.Z)(n,1)[0],s=i.useRef(!1),h=i.useContext(l),f=i.useState(d),p=(0,r.Z)(f,2),g=p[0],m=p[1],A=h||(s.current?void 0:function(e){m((function(t){return[e].concat((0,c.Z)(t))}))});function v(){o.parentElement||document.body.appendChild(o),s.current=!0}function y(){var e;null===(e=o.parentElement)||void 0===e||e.removeChild(o),s.current=!1}return(0,u.Z)((function(){return e?h?h(v):v():y(),y}),[e]),(0,u.Z)((function(){g.length&&(g.forEach((function(e){return e()})),m(d))}),[g]),[o,A]}(E&&!P),k=(0,r.Z)(M,2),R=k[0],O=k[1],I=null!==P&&void 0!==P?P:R;m(h&&n&&(0,a.Z)()&&(I===R||I===document.body));var L=null;y&&(0,s.Yr)(y)&&t&&(L=y.ref);var D=(0,s.x1)(L,t);if(!E||!(0,a.Z)()||void 0===P)return null;var N,F=!1===I||("boolean"===typeof N&&(A=N),A),j=y;return t&&(j=i.cloneElement(y,{ref:D})),i.createElement(l.Provider,{value:O},F?j:(0,o.createPortal)(j,I))}))},91084:(e,t,n)=>{"use strict";n.d(t,{Z:()=>U});var r=n(35194),i=n(13747),o=n(99309),a=n(34282),s=n(12356),l=n.n(s),c=n(61236),u=n(48541),d=n(13834),h=n(73165),f=n(71589),p=n(12750),g=n(90479),m=n(57435),A=n(91010),v=n(9817),y=n(43903);function b(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,s=o.content,c=i.x,u=void 0===c?0:c,d=i.y,h=void 0===d?0:d,f=m.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],A=n.points[1],v=g[0],y=g[1],b=A[0],_=A[1];v!==b&&["t","b"].includes(v)?"t"===v?p.top=0:p.bottom=0:p.top=h,y!==_&&["l","r"].includes(y)?"l"===y?p.left=0:p.right=0:p.left=u}return m.createElement("div",{ref:f,className:l()("".concat(t,"-arrow"),a),style:p},s)}function _(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?m.createElement(v.ZP,(0,A.Z)({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return m.createElement("div",{style:{zIndex:r},className:l()("".concat(t,"-mask"),n)})})):null}const w=m.memo((function(e){return e.children}),(function(e,t){return t.cache}));const x=m.forwardRef((function(e,t){var n=e.popup,o=e.className,a=e.prefixCls,s=e.style,u=e.target,d=e.onVisibleChanged,h=e.open,f=e.keepDom,g=e.fresh,x=e.onClick,E=e.mask,S=e.arrow,C=e.arrowPos,P=e.align,T=e.motion,M=e.maskMotion,k=e.forceRender,R=e.getPopupContainer,O=e.autoDestroy,I=e.portal,L=e.zIndex,D=e.onMouseEnter,N=e.onMouseLeave,F=e.onPointerEnter,j=e.ready,B=e.offsetX,z=e.offsetY,Z=e.offsetR,U=e.offsetB,H=e.onAlign,V=e.onPrepare,G=e.stretch,W=e.targetWidth,q=e.targetHeight,Y="function"===typeof n?n():n,X=h||f,K=(null===R||void 0===R?void 0:R.length)>0,Q=m.useState(!R||!K),$=(0,i.Z)(Q,2),J=$[0],ee=$[1];if((0,p.Z)((function(){!J&&K&&u&&ee(!0)}),[J,K,u]),!J)return null;var te="auto",ne={left:"-1000vw",top:"-1000vh",right:te,bottom:te};if(j||!h){var re,ie=P.points,oe=P.dynamicInset||(null===(re=P._experimental)||void 0===re?void 0:re.dynamicInset),ae=oe&&"r"===ie[0][1],se=oe&&"b"===ie[0][0];ae?(ne.right=Z,ne.left=te):(ne.left=B,ne.right=te),se?(ne.bottom=U,ne.top=te):(ne.top=z,ne.bottom=te)}var le={};return G&&(G.includes("height")&&q?le.height=q:G.includes("minHeight")&&q&&(le.minHeight=q),G.includes("width")&&W?le.width=W:G.includes("minWidth")&&W&&(le.minWidth=W)),h||(le.pointerEvents="none"),m.createElement(I,{open:k||X,getContainer:R&&function(){return R(u)},autoDestroy:O},m.createElement(_,{prefixCls:a,open:h,zIndex:L,mask:E,motion:M}),m.createElement(c.Z,{onResize:H,disabled:!h},(function(e){return m.createElement(v.ZP,(0,A.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:k,leavedClassName:"".concat(a,"-hidden")},T,{onAppearPrepare:V,onEnterPrepare:V,visible:h,onVisibleChanged:function(e){var t;null===T||void 0===T||null===(t=T.onVisibleChanged)||void 0===t||t.call(T,e),d(e)}}),(function(n,i){var c=n.className,u=n.style,d=l()(a,c,o);return m.createElement("div",{ref:(0,y.sQ)(e,t,i),className:d,style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({"--arrow-x":"".concat(C.x||0,"px"),"--arrow-y":"".concat(C.y||0,"px")},ne),le),u),{},{boxSizing:"border-box",zIndex:L},s),onMouseEnter:D,onMouseLeave:N,onPointerEnter:F,onClick:x},S&&m.createElement(b,{prefixCls:a,arrow:S,arrowPos:C,align:P}),m.createElement(w,{cache:!h&&!g},Y))}))})))}));const E=m.forwardRef((function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=(0,y.Yr)(n),o=m.useCallback((function(e){(0,y.mH)(t,r?r(e):e)}),[r]),a=(0,y.x1)(o,n.ref);return i?m.cloneElement(n,{ref:a}):n}));const S=m.createContext(null);function C(e){return e?Array.isArray(e)?e:[e]:[]}var P=n(26842);function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function M(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function k(e){return e.ownerDocument.defaultView}function R(e){for(var t=[],n=null===e||void 0===e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=k(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function I(e){return O(parseFloat(e),0)}function L(e,t){var n=(0,r.Z)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=k(e).getComputedStyle(e),r=t.overflow,i=t.overflowClipMargin,o=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,h=e.offsetWidth,f=e.clientWidth,p=I(o),g=I(a),m=I(s),A=I(l),v=O(Math.round(c.width/h*1e3)/1e3),y=O(Math.round(c.height/u*1e3)/1e3),b=(h-f-m-A)*v,_=(u-d-p-g)*y,w=p*y,x=g*y,E=m*v,S=A*v,C=0,P=0;if("clip"===r){var T=I(i);C=T*v,P=T*y}var M=c.x+E-C,R=c.y+w-P,L=M+c.width+2*C-E-S-b,D=R+c.height+2*P-w-x-_;n.left=Math.max(n.left,M),n.top=Math.max(n.top,R),n.right=Math.min(n.right,L),n.bottom=Math.min(n.bottom,D)}})),n}function D(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function N(e,t){var n=t||[],r=(0,i.Z)(n,2),o=r[0],a=r[1];return[D(e.width,o),D(e.height,a)]}function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function j(e,t){var n,r=t[0],i=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===i?e.x:"r"===i?e.x+e.width:e.x+e.width/2,y:n}}function B(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var z=n(22368);n(98162);var Z=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z;return m.forwardRef((function(t,n){var a=t.prefixCls,s=void 0===a?"rc-trigger-popup":a,A=t.children,v=t.action,y=void 0===v?"hover":v,b=t.showAction,_=t.hideAction,w=t.popupVisible,I=t.defaultPopupVisible,D=t.onPopupVisibleChange,U=t.afterPopupVisibleChange,H=t.mouseEnterDelay,V=t.mouseLeaveDelay,G=void 0===V?.1:V,W=t.focusDelay,q=t.blurDelay,Y=t.mask,X=t.maskClosable,K=void 0===X||X,Q=t.getPopupContainer,$=t.forceRender,J=t.autoDestroy,ee=t.destroyPopupOnHide,te=t.popup,ne=t.popupClassName,re=t.popupStyle,ie=t.popupPlacement,oe=t.builtinPlacements,ae=void 0===oe?{}:oe,se=t.popupAlign,le=t.zIndex,ce=t.stretch,ue=t.getPopupClassNameFromAlign,de=t.fresh,he=t.alignPoint,fe=t.onPopupClick,pe=t.onPopupAlign,ge=t.arrow,me=t.popupMotion,Ae=t.maskMotion,ve=t.popupTransitionName,ye=t.popupAnimation,be=t.maskTransitionName,_e=t.maskAnimation,we=t.className,xe=t.getTriggerDOMNode,Ee=(0,o.Z)(t,Z),Se=J||ee||!1,Ce=m.useState(!1),Pe=(0,i.Z)(Ce,2),Te=Pe[0],Me=Pe[1];(0,p.Z)((function(){Me((0,g.Z)())}),[]);var ke=m.useRef({}),Re=m.useContext(S),Oe=m.useMemo((function(){return{registerSubPopup:function(e,t){ke.current[e]=t,null===Re||void 0===Re||Re.registerSubPopup(e,t)}}}),[Re]),Ie=(0,f.Z)(),Le=m.useState(null),De=(0,i.Z)(Le,2),Ne=De[0],Fe=De[1],je=(0,h.Z)((function(e){(0,u.S)(e)&&Ne!==e&&Fe(e),null===Re||void 0===Re||Re.registerSubPopup(Ie,e)})),Be=m.useState(null),ze=(0,i.Z)(Be,2),Ze=ze[0],Ue=ze[1],He=m.useRef(null),Ve=(0,h.Z)((function(e){(0,u.S)(e)&&Ze!==e&&(Ue(e),He.current=e)})),Ge=m.Children.only(A),We=(null===Ge||void 0===Ge?void 0:Ge.props)||{},qe={},Ye=(0,h.Z)((function(e){var t,n,r=Ze;return(null===r||void 0===r?void 0:r.contains(e))||(null===(t=(0,d.A)(r))||void 0===t?void 0:t.host)===e||e===r||(null===Ne||void 0===Ne?void 0:Ne.contains(e))||(null===(n=(0,d.A)(Ne))||void 0===n?void 0:n.host)===e||e===Ne||Object.values(ke.current).some((function(t){return(null===t||void 0===t?void 0:t.contains(e))||e===t}))})),Xe=M(s,me,ye,ve),Ke=M(s,Ae,_e,be),Qe=m.useState(I||!1),$e=(0,i.Z)(Qe,2),Je=$e[0],et=$e[1],tt=null!==w&&void 0!==w?w:Je,nt=(0,h.Z)((function(e){void 0===w&&et(e)}));(0,p.Z)((function(){et(w||!1)}),[w]);var rt=m.useRef(tt);rt.current=tt;var it=m.useRef([]);it.current=[];var ot=(0,h.Z)((function(e){var t;nt(e),(null!==(t=it.current[it.current.length-1])&&void 0!==t?t:tt)!==e&&(it.current.push(e),null===D||void 0===D||D(e))})),at=m.useRef(),st=function(){clearTimeout(at.current)},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;st(),0===t?ot(e):at.current=setTimeout((function(){ot(e)}),1e3*t)};m.useEffect((function(){return st}),[]);var ct=m.useState(!1),ut=(0,i.Z)(ct,2),dt=ut[0],ht=ut[1];(0,p.Z)((function(e){e&&!tt||ht(!0)}),[tt]);var ft=m.useState(null),pt=(0,i.Z)(ft,2),gt=pt[0],mt=pt[1],At=m.useState([0,0]),vt=(0,i.Z)(At,2),yt=vt[0],bt=vt[1],_t=function(e){bt([e.clientX,e.clientY])},wt=function(e,t,n,o,a,s,l){var c=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),d=(0,i.Z)(c,2),f=d[0],g=d[1],A=m.useRef(0),v=m.useMemo((function(){return t?R(t):[]}),[t]),y=m.useRef({});e||(y.current={});var b=(0,h.Z)((function(){if(t&&n&&e){var c,d,h,f=t,p=f.ownerDocument,m=k(f).getComputedStyle(f),A=m.width,b=m.height,_=m.position,w=f.style.left,x=f.style.top,E=f.style.right,S=f.style.bottom,C=f.style.overflow,T=(0,r.Z)((0,r.Z)({},a[o]),s),M=p.createElement("div");if(null===(c=f.parentElement)||void 0===c||c.appendChild(M),M.style.left="".concat(f.offsetLeft,"px"),M.style.top="".concat(f.offsetTop,"px"),M.style.position=_,M.style.height="".concat(f.offsetHeight,"px"),M.style.width="".concat(f.offsetWidth,"px"),f.style.left="0",f.style.top="0",f.style.right="auto",f.style.bottom="auto",f.style.overflow="hidden",Array.isArray(n))h={x:n[0],y:n[1],width:0,height:0};else{var R=n.getBoundingClientRect();h={x:R.x,y:R.y,width:R.width,height:R.height}}var I=f.getBoundingClientRect(),D=p.documentElement,z=D.clientWidth,Z=D.clientHeight,U=D.scrollWidth,H=D.scrollHeight,V=D.scrollTop,G=D.scrollLeft,W=I.height,q=I.width,Y=h.height,X=h.width,K={left:0,top:0,right:z,bottom:Z},Q={left:-G,top:-V,right:U-G,bottom:H-V},$=T.htmlRegion,J="visible",ee="visibleFirst";"scroll"!==$&&$!==ee&&($=J);var te=$===ee,ne=L(Q,v),re=L(K,v),ie=$===J?re:ne,oe=te?re:ie;f.style.left="auto",f.style.top="auto",f.style.right="0",f.style.bottom="0";var ae=f.getBoundingClientRect();f.style.left=w,f.style.top=x,f.style.right=E,f.style.bottom=S,f.style.overflow=C,null===(d=f.parentElement)||void 0===d||d.removeChild(M);var se=O(Math.round(q/parseFloat(A)*1e3)/1e3),le=O(Math.round(W/parseFloat(b)*1e3)/1e3);if(0===se||0===le||(0,u.S)(n)&&!(0,P.Z)(n))return;var ce=T.offset,ue=T.targetOffset,de=N(I,ce),he=(0,i.Z)(de,2),fe=he[0],pe=he[1],ge=N(h,ue),me=(0,i.Z)(ge,2),Ae=me[0],ve=me[1];h.x-=Ae,h.y-=ve;var ye=T.points||[],be=(0,i.Z)(ye,2),_e=be[0],we=F(be[1]),xe=F(_e),Ee=j(h,we),Se=j(I,xe),Ce=(0,r.Z)({},T),Pe=Ee.x-Se.x+fe,Te=Ee.y-Se.y+pe;function _t(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ie,r=I.x+e,i=I.y+t,o=r+q,a=i+W,s=Math.max(r,n.left),l=Math.max(i,n.top),c=Math.min(o,n.right),u=Math.min(a,n.bottom);return Math.max(0,(c-s)*(u-l))}var Me,ke,Re,Oe,Ie=_t(Pe,Te),Le=_t(Pe,Te,re),De=j(h,["t","l"]),Ne=j(I,["t","l"]),Fe=j(h,["b","r"]),je=j(I,["b","r"]),Be=T.overflow||{},ze=Be.adjustX,Ze=Be.adjustY,Ue=Be.shiftX,He=Be.shiftY,Ve=function(e){return"boolean"===typeof e?e:e>=0};function wt(){Me=I.y+Te,ke=Me+W,Re=I.x+Pe,Oe=Re+q}wt();var Ge=Ve(Ze),We=xe[0]===we[0];if(Ge&&"t"===xe[0]&&(ke>oe.bottom||y.current.bt)){var qe=Te;We?qe-=W-Y:qe=De.y-je.y-pe;var Ye=_t(Pe,qe),Xe=_t(Pe,qe,re);Ye>Ie||Ye===Ie&&(!te||Xe>=Le)?(y.current.bt=!0,Te=qe,pe=-pe,Ce.points=[B(xe,0),B(we,0)]):y.current.bt=!1}if(Ge&&"b"===xe[0]&&(MeIe||Qe===Ie&&(!te||$e>=Le)?(y.current.tb=!0,Te=Ke,pe=-pe,Ce.points=[B(xe,0),B(we,0)]):y.current.tb=!1}var Je=Ve(ze),et=xe[1]===we[1];if(Je&&"l"===xe[1]&&(Oe>oe.right||y.current.rl)){var tt=Pe;et?tt-=q-X:tt=De.x-je.x-fe;var nt=_t(tt,Te),rt=_t(tt,Te,re);nt>Ie||nt===Ie&&(!te||rt>=Le)?(y.current.rl=!0,Pe=tt,fe=-fe,Ce.points=[B(xe,1),B(we,1)]):y.current.rl=!1}if(Je&&"r"===xe[1]&&(ReIe||ot===Ie&&(!te||at>=Le)?(y.current.lr=!0,Pe=it,fe=-fe,Ce.points=[B(xe,1),B(we,1)]):y.current.lr=!1}wt();var st=!0===Ue?0:Ue;"number"===typeof st&&(Rere.right&&(Pe-=Oe-re.right-fe,h.x>re.right-st&&(Pe+=h.x-re.right+st)));var lt=!0===He?0:He;"number"===typeof lt&&(Mere.bottom&&(Te-=ke-re.bottom-pe,h.y>re.bottom-lt&&(Te+=h.y-re.bottom+lt)));var ct=I.x+Pe,ut=ct+q,dt=I.y+Te,ht=dt+W,ft=h.x,pt=ft+X,gt=h.y,mt=gt+Y,At=(Math.max(ct,ft)+Math.min(ut,pt))/2-ct,vt=(Math.max(dt,gt)+Math.min(ht,mt))/2-dt;null===l||void 0===l||l(t,Ce);var yt=ae.right-I.x-(Pe+I.width),bt=ae.bottom-I.y-(Te+I.height);g({ready:!0,offsetX:Pe/se,offsetY:Te/le,offsetR:yt/se,offsetB:bt/le,arrowX:At/se,arrowY:vt/le,scaleX:se,scaleY:le,align:Ce})}})),_=function(){g((function(e){return(0,r.Z)((0,r.Z)({},e),{},{ready:!1})}))};return(0,p.Z)(_,[o]),(0,p.Z)((function(){e||_()}),[e]),[f.ready,f.offsetX,f.offsetY,f.offsetR,f.offsetB,f.arrowX,f.arrowY,f.scaleX,f.scaleY,f.align,function(){A.current+=1;var e=A.current;Promise.resolve().then((function(){A.current===e&&b()}))}]}(tt,Ne,he?yt:Ze,ie,ae,se,pe),xt=(0,i.Z)(wt,11),Et=xt[0],St=xt[1],Ct=xt[2],Pt=xt[3],Tt=xt[4],Mt=xt[5],kt=xt[6],Rt=xt[7],Ot=xt[8],It=xt[9],Lt=xt[10],Dt=function(e,t,n,r){return m.useMemo((function(){var i=C(null!==n&&void 0!==n?n:t),o=C(null!==r&&void 0!==r?r:t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[e,t,n,r])}(Te,y,b,_),Nt=(0,i.Z)(Dt,2),Ft=Nt[0],jt=Nt[1],Bt=Ft.has("click"),zt=jt.has("click")||jt.has("contextMenu"),Zt=(0,h.Z)((function(){dt||Lt()}));!function(e,t,n,r,i){(0,p.Z)((function(){if(e&&t&&n){var o=n,a=R(t),s=R(o),l=k(o),c=new Set([l].concat((0,z.Z)(a),(0,z.Z)(s)));function u(){r(),i()}return c.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),l.addEventListener("resize",u,{passive:!0}),r(),function(){c.forEach((function(e){e.removeEventListener("scroll",u),l.removeEventListener("resize",u)}))}}}),[e,t,n])}(tt,Ze,Ne,Zt,(function(){rt.current&&he&&zt&<(!1)})),(0,p.Z)((function(){Zt()}),[yt,ie]),(0,p.Z)((function(){!tt||null!==ae&&void 0!==ae&&ae[ie]||Zt()}),[JSON.stringify(se)]);var Ut=m.useMemo((function(){var e=function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a1?a-1:0),l=1;l1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tP,J0:()=>s,LX:()=>T,RQ:()=>D,WK:()=>z,X3:()=>B,Zn:()=>k,aU:()=>i,cP:()=>h,cm:()=>I,fp:()=>g,pC:()=>L,q_:()=>a}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(i||(i={}));const o="popstate";function a(e){return void 0===e&&(e={}),f((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=h(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),u("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:d(t))}),(function(e,t){l("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function s(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function l(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,i){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?h(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function f(e,t,n,a){void 0===a&&(a={});let{window:l=document.defaultView,v5Compat:h=!1}=a,f=l.history,p=i.Pop,g=null,m=A();function A(){return(f.state||{idx:null}).idx}function v(){p=i.Pop;let e=A(),t=null==e?null:e-m;m=e,g&&g({action:p,location:b.location,delta:t})}function y(e){let t="null"!==l.location.origin?l.location.origin:l.location.href,n="string"===typeof e?e:d(e);return n=n.replace(/ $/,"%20"),s(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,f.replaceState(r({},f.state,{idx:m}),""));let b={get action(){return p},get location(){return e(l,f)},listen(e){if(g)throw new Error("A history only accepts one active listener");return l.addEventListener(o,v),g=e,()=>{l.removeEventListener(o,v),g=null}},createHref:e=>t(l,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=i.Push;let r=u(b.location,e,t);n&&n(r,e),m=A()+1;let o=c(r,m),a=b.createHref(r);try{f.pushState(o,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;l.location.assign(a)}h&&g&&g({action:p,location:b.location,delta:1})},replace:function(e,t){p=i.Replace;let r=u(b.location,e,t);n&&n(r,e),m=A();let o=c(r,m),a=b.createHref(r);f.replaceState(o,"",a),h&&g&&g({action:p,location:b.location,delta:0})},go:e=>f.go(e)};return b}var p;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(p||(p={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function g(e,t,n){void 0===n&&(n="/");let r=k(("string"===typeof t?h(t):t).pathname||"/",n);if(null==r)return null;let i=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let a=0;null==o&&a{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let l=D([r,a.relativePath]),c=n.concat(a);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),m(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:S(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of A(e.path))i(e,t,r);else i(e,t)})),t}function A(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=A(r.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const v=/^:[\w-]+$/,y=3,b=2,_=1,w=10,x=-2,E=e=>"*"===e;function S(e,t){let n=e.split("/"),r=n.length;return n.some(E)&&(r+=x),t&&(r+=b),n.filter((e=>!E(e))).reduce(((e,t)=>e+(v.test(t)?y:""===t?_:w)),r)}function C(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;anull==e?"":"string"===typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e){return i(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,n]=o;let r=t[e];return s("?"===n||null!=r,'Missing ":'+e+'" param'),i(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function T(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);l("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function M(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function k(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function R(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function O(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t){let n=O(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function L(e,t,n,i){let o;void 0===i&&(i=!1),"string"===typeof e?o=h(e):(o=r({},e),s(!o.pathname||!o.pathname.includes("?"),R("?","pathname","search",o)),s(!o.pathname||!o.pathname.includes("#"),R("#","pathname","hash",o)),s(!o.search||!o.search.includes("#"),R("#","search","hash",o)));let a,l=""===e||""===o.pathname,c=l?"/":o.pathname;if(null==c)a=n;else{let e=t.length-1;if(!i&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?h(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:F(r),hash:j(i)}}(o,a),d=c&&"/"!==c&&c.endsWith("/"),f=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!f||(u.pathname+="/"),u}const D=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",j=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class B extends Error{}function z(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Z=["post","put","patch","delete"],U=(new Set(Z),["get",...Z]);new Set(U),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},36694:(e,t,n)=>{"use strict";n.d(t,{e:()=>D});var r=n(1050);function i(){var e=(0,r.R)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var i=e=>{let t=e.toString(16);for(;t.length<4;)t="0".concat(t);return t};return i(n[0])+i(n[1])+i(n[2])+i(n[3])+i(n[4])+i(n[5])+i(n[6])+i(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var o=n(42898),a="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,s=(0,r.R)(),l=["debug","info","warn","error","log","assert"];function c(e){var t=(0,r.R)();if(!("console"in t))return e();var n=t.console,i={};l.forEach((e=>{var r=n[e]&&n[e].__sentry_original__;e in t.console&&r&&(i[e]=n[e],n[e]=r)}));try{return e()}finally{Object.keys(i).forEach((e=>{n[e]=i[e]}))}}function u(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return a?l.forEach((n=>{t[n]=function(){for(var t=arguments.length,r=new Array(t),i=0;i{s.console[n]("".concat("Sentry Logger ","[").concat(n,"]:"),...r)}))}})):l.forEach((e=>{t[e]=()=>{}})),t}let d;d=a?(0,r.Y)("logger",u):u();var h,f=n(6920),p="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,g=Object.prototype.toString;function m(e,t){return g.call(e)==="[object ".concat(t,"]")}function A(e){return m(e,"Object")}function v(e){return Boolean(e&&e.then&&"function"===typeof e.then)}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(h||(h={}));class y{__init(){this._state=h.PENDING}__init2(){this._handlers=[]}constructor(e){y.prototype.__init.call(this),y.prototype.__init2.call(this),y.prototype.__init3.call(this),y.prototype.__init4.call(this),y.prototype.__init5.call(this),y.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new y(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new y(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(h.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(h.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===h.PENDING&&(v(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state!==h.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===h.RESOLVED&&e[1](this._value),this._state===h.REJECTED&&e[2](this._value),e[0]=!0)}))}}}}function b(e){return _(e,function(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e_(e,t))):e}function w(e){var t=(0,o.ph)(),n={sid:i(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return b({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&x(n,e),n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,o.ph)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:i()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class E{constructor(){E.prototype.__init.call(this),E.prototype.__init2.call(this),E.prototype.__init3.call(this),E.prototype.__init4.call(this),E.prototype.__init5.call(this),E.prototype.__init6.call(this),E.prototype.__init7.call(this),E.prototype.__init8.call(this),E.prototype.__init9.call(this),E.prototype.__init10.call(this)}__init(){this._notifyingListeners=!1}__init2(){this._scopeListeners=[]}__init3(){this._eventProcessors=[]}__init4(){this._breadcrumbs=[]}__init5(){this._user={}}__init6(){this._tags={}}__init7(){this._extra={}}__init8(){this._contexts={}}__init9(){this._attachments=[]}__init10(){this._sdkProcessingMetadata={}}static clone(e){var t=new E;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&x(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"===typeof e){var t=e(this);return t instanceof E?t:this}return e instanceof E?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):A(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r={timestamp:(0,o.yW)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors([...S(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new y(((i,o)=>{var a=e[r];if(null===t||"function"!==typeof a)i(t);else{var s=a({...t},n);p&&a.id&&null===s&&d.log('Event processor "'.concat(a.id,'" dropped event')),v(s)?s.then((t=>this._notifyEventProcessors(e,t,n,r+1).then(i))).then(null,o):this._notifyEventProcessors(e,s,n,r+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function S(){return(0,r.Y)("globalEventProcessors",(()=>[]))}var C=4,P=100;class T{__init(){this._stack=[{}]}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new E,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C;this._version=n,T.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)})),n}captureMessage(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:i(),o=new Error(e);return this._withClient(((i,a)=>{i.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},a)})),r}captureEvent(e,t){var n=t&&t.event_id?t.event_id:i();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=P}=r.getOptions&&r.getOptions()||{};if(!(a<=0)){var s={timestamp:(0,o.yW)(),...e},l=i?c((()=>i(s,t))):s;null!==l&&n.addBreadcrumb(l,a)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){var n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){var n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){var t=k(this);try{e(this)}finally{k(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return p&&d.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),x(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:i,environment:o}=n&&n.getOptions()||{};var a=(0,r.R)();const{userAgent:s}=a.navigator||{};var l=w({release:i,environment:o,...t&&{user:t.getUser()},...s&&{userAgent:s},...e});if(t){var c=t.getSession&&t.getSession();c&&"ok"===c.status&&x(c,{status:"exited"}),this.endSession(),t.setSession(l)}return l}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e){var t=M().__SENTRY__;if(t&&t.extensions&&"function"===typeof t.extensions[e]){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;inew T),e)}function L(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function D(e){R().configureScope(e)}},1050:(e,t,n)=>{"use strict";n.d(t,{R:()=>o,Y:()=>a});var r=n(6920),i={};function o(){return(0,r.KV)()?n.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:i}function a(e,t,n){var r=n||o(),i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}},6920:(e,t,n)=>{"use strict";function r(){return!("undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0)}function i(e,t){return e.require(t)}n.d(t,{l$:()=>i,KV:()=>r}),e=n.hmd(e)},42898:(e,t,n)=>{"use strict";n.d(t,{ph:()=>c,yW:()=>l});var r=n(1050),i=n(6920);e=n.hmd(e);var o={nowSeconds:()=>Date.now()/1e3};var a=(0,i.KV)()?function(){try{return(0,i.l$)(e,"perf_hooks").performance}catch(t){return}}():function(){const{performance:e}=(0,r.R)();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),s=void 0===a?o:{nowSeconds:()=>(a.timeOrigin+a.now())/1e3},l=o.nowSeconds.bind(o),c=s.nowSeconds.bind(s);let u;(()=>{const{performance:e}=(0,r.R)();if(e&&e.now){var t=36e5,n=e.now(),i=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,a=o{e.exports=n(73919)},73715:(e,t,n)=>{"use strict";var r=n(60018),i=n(65732),o=n(50630),a=n(66639),s=n(55929),l=n(18825),c=n(82881),u=n(24941),d=n(14613),h=n(68629);e.exports=function(e){return new Promise((function(t,n){var f,p=e.data,g=e.headers,m=e.responseType;function A(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(p)&&delete g["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(y+":"+b)}var _=s(e.baseURL,e.url);function w(){if(v){var r="getAllResponseHeaders"in v?l(v.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};i((function(e){t(e),A()}),(function(e){n(e),A()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(w)},v.onabort=function(){v&&(n(u("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(u("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var x=(e.withCredentials||c(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;x&&(g[e.xsrfHeaderName]=x)}"setRequestHeader"in v&&r.forEach(g,(function(e,t){"undefined"===typeof p&&"content-type"===t.toLowerCase()?delete g[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),m&&"json"!==m&&(v.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){v&&(n(!e||e&&e.type?new h("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),p||(p=null),v.send(p)}))}},73919:(e,t,n)=>{"use strict";var r=n(60018),i=n(55278),o=n(78131),a=n(31380);var s=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(14613));s.Axios=o,s.Cancel=n(68629),s.CancelToken=n(91211),s.isCancel=n(16318),s.VERSION=n(49540).version,s.all=function(e){return Promise.all(e)},s.spread=n(8608),s.isAxiosError=n(23712),e.exports=s,e.exports.default=s},68629:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},91211:(e,t,n)=>{"use strict";var r=n(68629);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},78131:(e,t,n)=>{"use strict";var r=n(60018),i=n(66639),o=n(30106),a=n(19900),s=n(31380),l=n(90014),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var u=[a,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var d=e;n.length;){var h=n.shift(),f=n.shift();try{d=h(d)}catch(p){f(p);break}}try{i=a(d)}catch(p){return Promise.reject(p)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},30106:(e,t,n)=>{"use strict";var r=n(60018);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},55929:(e,t,n)=>{"use strict";var r=n(85342),i=n(30356);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},24941:(e,t,n)=>{"use strict";var r=n(25483);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},19900:(e,t,n)=>{"use strict";var r=n(60018),i=n(98519),o=n(16318),a=n(14613),s=n(68629);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},25483:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},31380:(e,t,n)=>{"use strict";var r=n(60018);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},65732:(e,t,n)=>{"use strict";var r=n(24941);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},98519:(e,t,n)=>{"use strict";var r=n(60018),i=n(14613);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},14613:(e,t,n)=>{"use strict";var r=n(60018),i=n(40019),o=n(25483),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(73715)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(a)})),e.exports=l},49540:e=>{e.exports={version:"0.24.0"}},55278:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(60018);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},30356:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},50630:(e,t,n)=>{"use strict";var r=n(60018);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},85342:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},23712:e=>{"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},82881:(e,t,n)=>{"use strict";var r=n(60018);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},40019:(e,t,n)=>{"use strict";var r=n(60018);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},18825:(e,t,n)=>{"use strict";var r=n(60018),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8608:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},90014:(e,t,n)=>{"use strict";var r=n(49540).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},60018:(e,t,n)=>{"use strict";var r=n(55278),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n{"use strict";var r=n(78559),i=n(34151),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},34151:(e,t,n)=>{"use strict";var r=n(91989),i=n(78559),o=n(34770),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||r.call(l,s),u=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(f){u=null}e.exports=function(e){if("function"!==typeof e)throw new a("a function is required");var t=c(r,l,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,s,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},33718:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;ti})},11181:(e,t,n)=>{"use strict";function r(e,t,n){return{r:255*n(e.r/255,t.r/255),g:255*n(e.g/255,t.g/255),b:255*n(e.b/255,t.b/255)}}function i(e,t){return e*t}function o(e,t,n){return Math.min(Math.max(e||0,t),n)}function a(e){return{r:o(e.r,0,255),g:o(e.g,0,255),b:o(e.b,0,255),a:o(e.a,0,1)}}function s(e){return{r:255*e.r,g:255*e.g,b:255*e.b,a:e.a}}function l(e){return{r:e.r/255,g:e.g/255,b:e.b/255,a:e.a}}function c(e,t){void 0===t&&(t=0);var n=Math.pow(10,t);return{r:Math.round(e.r*n)/n,g:Math.round(e.g*n)/n,b:Math.round(e.b*n)/n,a:e.a}}function u(e,t,n,r,i,o){return(1-t/n)*r+t/n*Math.round((1-e)*i+e*o)}function d(e,t,n,r,i){void 0===i&&(i={unitInput:!1,unitOutput:!1,roundOutput:!0}),i.unitInput&&(e=s(e),t=s(t)),e=a(e);var o=(t=a(t)).a+e.a-t.a*e.a,d=n(e,t,r),h=a({r:u(e.a,t.a,o,e.r,t.r,d.r),g:u(e.a,t.a,o,e.g,t.g,d.g),b:u(e.a,t.a,o,e.b,t.b,d.b),a:o});return h=i.unitOutput?l(h):i.roundOutput?c(h):function(e){return c(e,9)}(h),h}function h(e,t){return d(e,t,r,i)}n.d(t,{Jp:()=>h})},92626:function(e,t){var n,r,i;r=[],n=function(){"use strict";var e=["|","^"],t=[",",";","\t","|","^"],n=["\r\n","\r","\n"];function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}var i=Array.isArray||function(e){return"[object Array]"===toString.call(e)};function o(e){return"string"===typeof e}function a(e){return!isNaN(Number(e))}function s(e){return 0==e||1==e}function l(e){return null==e}function c(e){return null!=e}function u(e,t){return c(e)?e:t}function d(e,t){for(var n=0,r=e.length;ni&&(i=o.length,r=n)})),r||n[0]}var A=function(){function e(e,r){if(r||(r={}),i(e))this.mode="encode";else{if(!o(e))throw new Error("Incompatible format!");this.mode="parse"}this.data=e,this.options={header:u(r.header,!1),cast:u(r.cast,!0)};var a=r.lineDelimiter||r.line,l=r.cellDelimiter||r.delimiter;this.isParser()?(this.options.lineDelimiter=a||m(this.data,n),this.options.cellDelimiter=l||m(this.data,t),this.data=s(this.data,this.options.lineDelimiter)):this.isEncoder()&&(this.options.lineDelimiter=a||"\r\n",this.options.cellDelimiter=l||",")}function a(e,t,n,r,i){e(new t(n,r,i))}function s(e,t){return e.slice(-t.length)!=t&&(e+=t),e}function c(e){return i(e)?"array":r(e)?"object":o(e)?"string":l(e)?"null":"primitive"}return e.prototype.set=function(e,t){return this.options[e]=t},e.prototype.isParser=function(){return"parse"==this.mode},e.prototype.isEncoder=function(){return"encode"==this.mode},e.prototype.parse=function(e){if("parse"==this.mode){if(0===this.data.trim().length)return[];var t,n,r,o=this.data,s=this.options,l=s.header,c={cell:"",line:[]},u=this.deserialize;e||(r=[],e=function(e){r.push(e)}),1==s.lineDelimiter.length&&(w=_);var d,h,f,p=o.length,m=s.cellDelimiter.charCodeAt(0),A=s.lineDelimiter.charCodeAt(s.lineDelimiter.length-1);for(v(),d=0,h=0;d1||""!==c.line[0])&&x(),b()));return r||this}function v(){t={escaped:!1,quote:!1,cell:!0}}function y(){c.cell=""}function b(){c.line=[]}function _(e){c.line.push(t.escaped?e.slice(1,-1).replace(/""/g,'"'):e),y(),v()}function w(e){_(e.slice(0,1-s.lineDelimiter.length))}function x(){l?i(l)?(n=g(u,s.cast,c.line,l),(x=function(){a(e,n,c.line,u,s.cast)})()):l=c.line:(n||(n=g(u,s.cast,c.line)),(x=function(){a(e,n,c.line,u,s.cast)})())}},e.prototype.deserialize={string:function(e){return String(e)},number:function(e){return Number(e)},boolean:function(e){return Boolean(e)}},e.prototype.serialize={object:function(e){var t=this,n=Object.keys(e),r=Array(n.length);return d(n,(function(n,i){r[i]=t[c(e[n])](e[n])})),r},array:function(e){var t=this,n=Array(e.length);return d(e,(function(e,r){n[r]=t[c(e)](e)})),n},string:function(e){return'"'+String(e).replace(/"/g,'""')+'"'},null:function(e){return""},primitive:function(e){return e}},e.prototype.encode=function(e){if("encode"==this.mode){if(0==this.data.length)return"";var t,n,r=this.data,a=this.options,s=a.header,l=r[0],u=this.serialize,h=0;e||(n=Array(r.length),e=function(e,t){n[t+h]=e}),s&&(i(s)||(s=t=Object.keys(l)),e(g(u.array(s)),0),h=1);var f,p=c(l);return"array"==p?(i(a.cast)?(f=Array(a.cast.length),d(a.cast,(function(e,t){o(e)?f[t]=e.toLowerCase():(f[t]=e,u[e]=e)}))):(f=Array(l.length),d(l,(function(e,t){f[t]=c(e)}))),d(r,(function(t,n){var r=Array(f.length);d(t,(function(e,t){r[t]=u[f[t]](e)})),e(g(r),n)}))):"object"==p&&(t=Object.keys(l),i(a.cast)?(f=Array(a.cast.length),d(a.cast,(function(e,t){o(e)?f[t]=e.toLowerCase():(f[t]=e,u[e]=e)}))):(f=Array(t.length),d(t,(function(e,t){f[t]=c(l[e])}))),d(r,(function(n,r){var i=Array(t.length);d(t,(function(e,t){i[t]=u[f[t]](n[e])})),e(g(i),r)}))),n?n.join(a.lineDelimiter):this}function g(e){return e.join(a.cellDelimiter)}},e.prototype.forEach=function(e){return this[this.mode](e)},e}();return A.parse=function(e,t){return new A(e,t).parse()},A.encode=function(e,t){return new A(e,t).encode()},A.forEach=function(e,t,n){return 2==arguments.length&&(n=t),new A(e,t).forEach(n)},A},void 0===(i="function"===typeof n?n.apply(t,r):n)||(e.exports=i)},44831:(e,t,n)=>{"use strict";var r=n(13924),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}},57649:function(e,t){!function(e){"use strict";var t,n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i Promise))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},S=E;function C(e){S=e||E}function P(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,S(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var T,M,k=new Set;function R(){for(var e=[],n=0;n=r){if(f-coe)return!0;for(var t=0,n=0;noe)return!0;return!1}function se(e){var t=new Set,n=new Set,r=new Set;e.forEach((function(e){j(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),j(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?(r.add(e),t.delete(e)):n.add(e))}))}));var i=[],o=[];return t.forEach((function(e){t.has(e.parentElement)&&i.push(e)})),n.forEach((function(e){n.has(e.parentElement)&&o.push(e)})),i.forEach((function(e){return t.delete(e)})),o.forEach((function(e){return n.delete(e)})),{additions:t,moves:r,deletions:n}}var le,ce=new Map,ue=new WeakMap;function de(e,t){var n,r,i;if(ce.has(e))n=ce.get(e),r=ue.get(n);else{var o=!1,a=!1;(n=new MutationObserver((function(t){if(ae(t))!o||X()?r.forEach((function(t){return(0,t.onHugeMutations)(e)})):a||($(i=function(){return r.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),a=!0),o=!0;else{var n=se(t);r.forEach((function(e){return(0,e.onMinorMutations)(n)}))}}))).observe(e,{childList:!0,subtree:!0}),ce.set(e,n),r=new Set,ue.set(n,r)}return r.add(t),{disconnect:function(){r.delete(t),i&&J(i),0===r.size&&(n.disconnect(),ue.delete(n),ce.delete(e))}}}var he=new Map;function fe(e){return le||(le=document.createElement("a")),le.href=e,le.href}function pe(e,t){void 0===t&&(t=null);var n="".concat(e).concat(t?";".concat(t):"");if(he.has(n))return he.get(n);if(t){var r=new URL(e,fe(t));return he.set(n,r),r}var i=new URL(fe(e));return he.set(e,i),i}function ge(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return"".concat(location.protocol).concat(t);var n=pe(e);return pe(t,n.href).href}function me(e){if(e.startsWith("data:"))return!0;var t=pe(e);return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port&&t.pathname===location.pathname}function Ae(e,t,n){j(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{Ae(e.styleSheet.cssRules,t,n)}catch(a){Z("Found a non-loaded link."),n&&n()}else if(e.media){var r=Array.from(e.media),i=r.some((function(e){return e.startsWith("screen")||e.startsWith("all")||e.startsWith("(")})),o=r.some((function(e){return e.startsWith("print")||e.startsWith("speech")}));!i&&o||Ae(e.cssRules,t,n)}else e.conditionText?CSS.supports(e.conditionText)&&Ae(e.cssRules,t,n):U("CSSRule type not supported",e)}))}var ve=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],ye=p?ve.map((function(e){return[e,new RegExp("".concat(e,":\\s*(.*?)\\s*;"))]})):null;function be(e,t){j(e,(function(n){var r=e.getPropertyValue(n).trim();r&&t(n,r)}));var n=e.cssText;n.includes("var(")&&(p?ye.forEach((function(e){var r=a(e,2),i=r[0],o=r[1],s=n.match(o);if(s&&s[1]){var l=s[1].trim();t(i,l)}})):ve.forEach((function(n){var r=e.getPropertyValue(n);r&&r.includes("var(")&&t(n,r)})))}var _e=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,we=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function xe(e){return e.trim().replace(/[\n\r\\]+/g,"").replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function Ee(e){var t=pe(e);return"".concat(t.origin).concat(t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1"))}function Se(e,t){return e.replace(_e,(function(e){var n=xe(e);try{return"url('".concat(ge(t,n),"')")}catch(r){return e}}))}var Ce=/\/\*[\s\S]*?\*\//g;function Pe(e){return e.replace(Ce,"")}var Te=/@font-face\s*{[^}]*}/g;function Me(e){return e.replace(Te,"")}function ke(e){for(var t,n=[],r=[],i=0,o=e.length;i=0){var i=n.match(/0+$/);if(i)return i.index===r+1?n.substring(0,r):n.substring(0,i.index)}return n}function Ve(e){var t=e.r,n=e.g,r=e.b,i=e.a;return null!=i&&i<1?"rgba(".concat(He(t),", ").concat(He(n),", ").concat(He(r),", ").concat(He(i,2),")"):"rgb(".concat(He(t),", ").concat(He(n),", ").concat(He(r),")")}function Ge(e){var t=e.r,n=e.g,r=e.b,i=e.a;return"#".concat((null!=i&&i<1?[t,n,r,Math.round(255*i)]:[t,n,r]).map((function(e){return"".concat(e<16?"0":"").concat(e.toString(16))})).join(""))}function We(e){var t=e.h,n=e.s,r=e.l,i=e.a;return null!=i&&i<1?"hsla(".concat(He(t),", ").concat(He(100*n),"%, ").concat(He(100*r),"%, ").concat(He(i,2),")"):"hsl(".concat(He(t),", ").concat(He(100*n),"%, ").concat(He(100*r),"%)")}var qe=/^rgba?\([^\(\)]+\)$/,Ye=/^hsla?\([^\(\)]+\)$/,Xe=/^#[0-9a-f]+$/i;function Ke(e){var t=e.trim().toLowerCase();return t.match(qe)?tt(t):t.match(Ye)?it(t):t.match(Xe)?ot(t):ct.has(t)?at(t):ut.has(t)?st(t):"transparent"===e?{r:0,g:0,b:0,a:0}:null}function Qe(e){var t=[],n=0,r=!1,i=e.indexOf("(");e=e.substring(i+1,e.length-1);for(var o=0;o="0"&&a<="9"||"."===a||"+"===a||"-"===a?r=!0:!r||" "!==a&&","!==a?r||(n=o+1):(t.push(e.substring(n,o)),r=!1,n=o+1)}return r&&t.push(e.substring(n,e.length)),t}function $e(e,t,n){var r=Qe(e),i=Object.entries(n);return r.map((function(e){return e.trim()})).map((function(e,n){var r,o=i.find((function(t){var n=a(t,1)[0];return e.endsWith(n)}));return r=o?parseFloat(e.substring(0,e.length-o[0].length))/o[1]*t[n]:parseFloat(e),t[n]>1?Math.round(r):r}))}var Je=[255,255,255,1],et={"%":100};function tt(e){var t=a($e(e,Je,et),4),n=t[0],r=t[1],i=t[2],o=t[3];return{r:n,g:r,b:i,a:void 0===o?1:o}}var nt=[360,1,1,1],rt={"%":100,deg:360,rad:2*Math.PI,turn:1};function it(e){var t=a($e(e,nt,rt),4),n=t[0],r=t[1],i=t[2],o=t[3];return Ze({h:n,s:r,l:i,a:void 0===o?1:o})}function ot(e){var t=e.substring(1);switch(t.length){case 3:case 4:var n=a([0,1,2].map((function(e){return parseInt("".concat(t[e]).concat(t[e]),16)})),3);return{r:n[0],g:n[1],b:n[2],a:3===t.length?1:parseInt("".concat(t[3]).concat(t[3]),16)/255};case 6:case 8:var r=a([0,2,4].map((function(e){return parseInt(t.substring(e,e+2),16)})),3);return{r:r[0],g:r[1],b:r[2],a:6===t.length?1:parseInt(t.substring(6,8),16)/255}}return null}function at(e){var t=ct.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}function st(e){var t=ut.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}function lt(e){for(var t=0,n=function(t,n,r){e=e.substring(0,t)+r+e.substring(n)};-1!==(t=e.indexOf("calc("));){var r=De(e,t);if(!r)break;var i=e.slice(r.start+1,r.end-1),o=i.includes("%");i=i.split("%").join("");var a=Math.round(ke(i));n(r.start-4,r.end,a+(o?"%":""))}return e}var ct=new Map(Object.entries({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,darkgrey:11119017,darkgreen:25600,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,grey:8421504,green:32768,greenyellow:11403055,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,lightgrey:13882323,lightgreen:9498256,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})),ut=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var t=a(e,2),n=t[0],r=t[1];return[n.toLowerCase(),r]})));function dt(e,t,n){return(.2126*e+.7152*t+.0722*n)/255}function ht(e,t,n,r,i){return(e-t)*(i-r)/(n-t)+r}function ft(e,t,n){return Math.min(n,Math.max(t,e))}function pt(e,t){for(var n=[],r=0,i=e.length;r.8&&r>200&&r<280)&&(s?(l=t.h,c=t.s):(l=n.h,c=n.s)),{h:l,s:c,l:ht(o,0,1,t.l,n.l),a:a}}var kt=.4;function Rt(e,t){var n=e.h,r=e.s,i=e.l,o=e.a,a=r<.12||i>.8&&n>200&&n<280;if(i<.5){var s=ht(i,0,.5,0,kt);return a?{h:t.h,s:t.s,l:s,a:o}:{h:n,s:r,l:s,a:o}}var l=ht(i,.5,1,kt,t.l);if(a)return{h:t.h,s:t.s,l:l,a:o};var c=n;return n>60&&n<180&&(c=n>120?ht(n,120,180,135,180):ht(n,60,120,60,105)),c>40&&c<80&&(l*=.75),{h:c,s:r,l:l,a:o}}function Ot(e,t){if(0===t.mode)return Tt(e,t);var r=vt(t);return St(e,n(n({},t),{mode:0}),Rt,r)}var It,Lt=.55;function Dt(e){return ht(e,205,245,205,220)}function Nt(e,t){var n=e.h,r=e.s,i=e.l,o=e.a,a=i<.2||r<.24,s=!a&&n>205&&n<245;if(i>.5){var l=ht(i,.5,1,Lt,t.l);if(a)return{h:t.h,s:t.s,l:l,a:o};var c=n;return s&&(c=Dt(n)),{h:c,s:r,l:l,a:o}}if(a)return{h:t.h,s:t.s,l:ht(i,0,.5,t.l,Lt),a:o};var u,d=n;return s?(d=Dt(n),u=ht(i,0,.5,t.l,Math.min(1,Lt+.05))):u=ht(i,0,.5,t.l,Lt),{h:d,s:r,l:u,a:o}}function Ft(e,t){if(0===t.mode)return Tt(e,t);var r=yt(t);return St(e,n(n({},t),{mode:0}),Nt,r)}function jt(e,t,n){var r=e.h,i=e.s,o=e.l,a=e.a,s=r,l=i;return(o<.2||i<.24)&&(o<.5?(s=t.h,l=t.s):(s=n.h,l=n.s)),{h:s,s:l,l:ht(o,0,1,.5,.2),a:a}}function Bt(e,t){if(0===t.mode)return Tt(e,t);var r=yt(t),i=vt(t);return St(e,n(n({},t),{mode:0}),jt,r,i)}function zt(e,t){return Ot(e,t)}function Zt(e,t){return Ot(e,t)}function Ut(e){var t=[];return t.push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),e.useFont&&e.fontFamily&&t.push(" font-family: ".concat(e.fontFamily," !important;")),e.textStroke>0&&(t.push(" -webkit-text-stroke: ".concat(e.textStroke,"px !important;")),t.push(" text-stroke: ".concat(e.textStroke,"px !important;"))),t.push("}"),t.join("\n")}function Ht(e){var t=[];return e.mode===It.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness(".concat(e.brightness,"%)")),100!==e.contrast&&t.push("contrast(".concat(e.contrast,"%)")),0!==e.grayscale&&t.push("grayscale(".concat(e.grayscale,"%)")),0!==e.sepia&&t.push("sepia(".concat(e.sepia,"%)")),0===t.length?null:t.join(" ")}function Vt(e){return e.slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" ")}function Gt(e){return Vt(gt(e))}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(It||(It={}));var Wt=0,qt=new Map,Yt=new Map;function Xt(e){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,new Promise((function(n,r){var i=++Wt;qt.set(i,n),Yt.set(i,r),chrome.runtime.sendMessage({type:t.CS_FETCH,data:e,id:i})}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var n=e.type,r=e.data,i=e.error,o=e.id;if(n===t.BG_FETCH_RESPONSE){var a=qt.get(o),s=Yt.get(o);qt.delete(o),Yt.delete(o),i?s&&s(i):a&&a(r)}}));var Kt=new(function(){function e(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}return e.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},e.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},e.prototype.startQueue=function(){var e=this;this.timerId||(this.timerId=requestAnimationFrame((function(){e.timerId=null;for(var t,n=Date.now();t=e.queue.shift();)if(t(),Date.now()-n>=e.frameDuration){e.startQueue();break}})))},e}());function Qt(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(o){return[2,new Promise((function(o,a){return r(t,void 0,void 0,(function(){var t,r,s,l;return i(this,(function(i){switch(i.label){case 0:return e.startsWith("data:")?(t=e,[3,4]):[3,1];case 1:return i.trys.push([1,3,,4]),[4,$t(e)];case 2:return t=i.sent(),[3,4];case 3:return r=i.sent(),a(r),[2];case 4:return i.trys.push([4,6,,7]),[4,Jt(t)];case 5:return s=i.sent(),Kt.addToQueue((function(){o(n({src:e,dataURL:t,width:s.naturalWidth,height:s.naturalHeight},sn(s)))})),[3,7];case 6:return l=i.sent(),a(l),[3,7];case 7:return[2]}}))}))}))]}))}))}function $t(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return new URL(e).origin!==location.origin?[3,2]:[4,w(e)];case 1:case 3:return[2,t.sent()];case 2:return[4,Xt({url:e,responseType:"data-url"})]}}))}))}function Jt(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=function(){return n("Unable to load image ".concat(e))},r.src=e}))]}))}))}var en,tn,nn=1024;function rn(){var e=nn,t=nn;(en=document.createElement("canvas")).width=e,en.height=t,(tn=en.getContext("2d")).imageSmoothingEnabled=!1}function on(){en=null,tn=null}var an=5242880;function sn(e){en||rn();var t=e.naturalWidth,n=e.naturalHeight;if(0===n||0===t)return U("logWarn(Image is empty ".concat(e.currentSrc,")")),null;if(t*n*4>an)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var r=t*n,i=Math.min(1,Math.sqrt(nn/r)),o=Math.ceil(t*i),a=Math.ceil(n*i);tn.clearRect(0,0,o,a),tn.drawImage(e,0,0,t,n,0,0,o,a);var s,l,c,u,d,h,f,p=tn.getImageData(0,0,o,a).data,g=.05,m=.4,A=.7,v=0,y=0,b=0;for(c=0;cA&&b++);var _=o*a,w=_-v;return{isDark:y/w>=.7,isLight:b/w>=.7,isTransparent:v/_>=.1,isLarge:r>=48e4,isTooLarge:!1}}function ln(e,t){var n=e.dataURL,r=e.width,i=e.height,o=Gt(t),a=[''),"",'',''),"","",''),""].join("");return"data:image/svg+xml;base64,".concat(btoa(a))}function cn(){Kt&&Kt.stopQueue(),on()}var un=8,dn="conic-",hn=dn.length,fn="radial-",pn="linear-";function gn(e){for(var t=[],n=0,r=dn.length,i=function(){var i;if([pn,fn,dn].find((function(t){if(n-t.length>=0&&e.substring(n-t.length,n)===t)return"repeating"===e.slice(n-t.length-10,n-t.length-1)?(i="repeating-".concat(t,"gradient"),!0):"-webkit"===e.slice(n-t.length-8,n-t.length-1)?(i="-webkit-".concat(t,"gradient"),!0):(i="".concat(t,"gradient"),!0)})),!i)return"break";var o=De(e,n+un),a=o.start,s=o.end,l=e.substring(a+1,s-1);r=s+1+hn,t.push({typeGradient:i,match:l,offset:i.length+2,index:n-i.length+un,hasComma:!0})};-1!==(n=e.indexOf("gradient",r))&&"break"!==i(););return t.length&&(t[t.length-1].hasComma=!1),t}function mn(e,t){return Boolean(e&&e.getPropertyPriority(t))}function An(e,t,n,r,i,o){if(e.startsWith("--")){if(a=On(r,e,t,n,i,o))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else if(t.includes("var(")){if(a=In(r,e,t))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else{if("color-scheme"===e)return null;if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){if(a=Sn(e,t,n))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(a=Mn(t,n,i,o))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else if(e.includes("shadow")){var a;if(a=Rn(t))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}}return null}function vn(){for(var e=[],t=0;t.5,d=function(e){return n(n({},c),{l:ft(c.l+e,0,1)})},h=function(e){return n(n({},c),{l:ft(c.l-e,0,1)})};t=We(h(.4)),r=We(u?h(.4):d(.4)),i=We(c),o=We(d(.1)),a=We(d(.2))}return l.push("::-webkit-scrollbar {"),l.push(" background-color: ".concat(t,";")),l.push(" color: ".concat(r,";")),l.push("}"),l.push("::-webkit-scrollbar-thumb {"),l.push(" background-color: ".concat(i,";")),l.push("}"),l.push("::-webkit-scrollbar-thumb:hover {"),l.push(" background-color: ".concat(o,";")),l.push("}"),l.push("::-webkit-scrollbar-thumb:active {"),l.push(" background-color: ".concat(a,";")),l.push("}"),l.push("::-webkit-scrollbar-corner {"),l.push(" background-color: ".concat(s,";")),l.push("}"),f&&(l.push("* {"),l.push(" scrollbar-color: ".concat(i," ").concat(t,";")),l.push("}")),l.join("\n")}function xn(e,t){var n=t.strict,r=[],i=["microsoft.com","docs.microsoft.com"].includes(location.hostname);return r.push("html, body, ".concat(n?"body :not(iframe)".concat(i?':not(div[style^="position:absolute;top:0;left:-"]':""):"body > :not(iframe)"," {")),r.push(" background-color: ".concat(Ot({r:255,g:255,b:255},e)," !important;")),r.push(" border-color: ".concat(Bt({r:64,g:64,b:64},e)," !important;")),r.push(" color: ".concat(Ft({r:0,g:0,b:0},e)," !important;")),r.push("}"),r.join("\n")}var En=new Set(["inherit","transparent","initial","currentcolor","none","unset"]);function Sn(e,t,n){if(En.has(t.toLowerCase()))return t;var r=je(t);return r?e.includes("background")?n.style.webkitMaskImage&&"none"!==n.style.webkitMaskImage||n.style.webkitMask&&!n.style.webkitMask.startsWith("none")||n.style.mask&&"none"!==n.style.mask||n.style.getPropertyValue("mask-image")&&"none"!==n.style.getPropertyValue("mask-image")?function(e){return Ft(r,e)}:function(e){return Ot(r,e)}:e.includes("border")||e.includes("outline")?function(e){return Bt(r,e)}:function(e){return Ft(r,e)}:null}var Cn=new Map,Pn=new Map;function Tn(e,t){if(!e||0===t.length)return!1;if(t.some((function(e){return"*"===e})))return!0;for(var n=e.split(/,\s*/g),r=function(e){var r=t[e];if(n.some((function(e){return e===r})))return{value:!0}},i=0;it.index?1:-1})),h=function(e){var t=e.typeGradient,n=e.match,r=e.hasComma,i=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,o=Ie(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?([^\(\), ]|( (?!calc)))*),?/g,n,1).map((function(e){var t=je(e=e.trim());if(t)return function(e){return Zt(t,e)};var n=e.lastIndexOf(" ");if(t=je(e.substring(0,n)))return function(r){return"".concat(Zt(t,r)," ").concat(e.substring(n+1))};var r=e.match(i);return r&&(t=je(r[3]))?function(e){return"".concat(r[1],"(").concat(r[2]?"".concat(r[2],", "):"").concat(Zt(t,e),")")}:function(){return e}}));return function(e){return"".concat(t,"(").concat(o.map((function(t){return t(e)})).join(", "),")").concat(r?", ":"")}},f=function(e){var n;if(Tn(t.selectorText,o))return null;var l=xe(e),c=0===l.length,u=t.parentStyleSheet,d=u&&u.href?Ee(u.href):(null===(n=u.ownerNode)||void 0===n?void 0:n.baseURI)||location.origin;l=ge(d,l);var h='url("'.concat(l,'")');return function(e){return r(s,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return c?[2,"url('')"]:Cn.has(l)?(t=Cn.get(l),[3,7]):[3,1];case 1:return r.trys.push([1,6,,7]),Pn.has(l)?(n=Pn.get(l),[4,new Promise((function(e){return n.push(e)}))]):[3,3];case 2:return(t=r.sent())?[3,5]:[2,null];case 3:return Pn.set(l,[]),[4,Qt(l)];case 4:t=r.sent(),Cn.set(l,t),Pn.get(l).forEach((function(e){return e(t)})),Pn.delete(l),r.label=5;case 5:return a()?[2,null]:[3,7];case 6:return U(r.sent()),Pn.has(l)&&(Pn.get(l).forEach((function(e){return e(null)})),Pn.delete(l)),[2,h];case 7:return[2,p(t,e)||h]}}))}))}},p=function(e,t){var r,i=e.isDark,o=e.isLight,a=e.isTransparent,s=e.isLarge,l=e.isTooLarge,c=e.width;if(l)r='url("'.concat(e.src,'")');else if(i&&a&&1===t.mode&&!s&&c>2){Z("Inverting dark image ".concat(e.src));var u=ln(e,n(n({},t),{sepia:ft(t.sepia+10,0,100)}));r='url("'.concat(u,'")')}else if(o&&!a&&1===t.mode)if(s)r="none";else{Z("Dimming light image ".concat(e.src));var d=ln(e,t);r='url("'.concat(d,'")')}else if(0===t.mode&&o&&!s){Z("Applying filter to image ".concat(e.src));var h=ln(e,n(n({},t),{brightness:ft(t.brightness-10,5,200),sepia:ft(t.sepia+10,0,100)}));r='url("'.concat(h,'")')}else r=null;return r},g=[],m=0,A=!1;return d.forEach((function(t,n){var r=t.type,i=t.match,o=t.index,a=t.typeGradient,s=t.hasComma,l=t.offset,c=o,u=m,p=c+i.length+l;m=p,u!==c&&(A?g.push((function(){var t=e.substring(u,c);return","===t[0]&&(t=t.substring(1)),t})):g.push((function(){return e.substring(u,c)}))),A=s||!1,"url"===r?g.push(f(i)):"gradient"===r&&g.push(h({match:i,index:o,typeGradient:a,hasComma:s,offset:l})),n===d.length-1&&g.push((function(){return e.substring(p)}))})),function(e){var t=g.filter(Boolean).map((function(t){return t(e)}));if(t.some((function(e){return e instanceof Promise})))return Promise.all(t).then((function(e){return e.filter(Boolean).join("")}));var n=t.join("");return n.endsWith(", initial")?n.slice(0,-9):n}}catch(v){return null}}function kn(e){try{var t=0,n=Ie(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,e,2),r=0,i=n.map((function(i,o){var a=t,s=e.indexOf(i,t),l=s+i.length;t=l;var c=je(i);return c?function(t){return"".concat(e.substring(a,s)).concat(zt(c,t)).concat(o===n.length-1?e.substring(l):"")}:(r++,function(){return e.substring(a,l)})}));return function(e){var t=i.map((function(t){return t(e)})).join("");return{matchesLength:n.length,unparseableMatchesLength:r,result:t}}}catch(o){return null}}function Rn(e){var t=kn(e);return t?function(e){return t(e).result}:null}function On(e,t,n,r,i,o){return e.getModifierForVariable({varName:t,sourceValue:n,rule:r,ignoredImgSelectors:i,isCancelled:o})}function In(e,t,n){return e.getModifierForVarDependant(t,n)}function Ln(){_t(),Cn.clear(),cn(),Pn.clear()}var Dn=1,Nn=2,Fn=4,jn=8,Bn=new(function(){function e(){this.varTypes=new Map,this.rulesQueue=[],this.definedVars=new Set,this.varRefs=new Map,this.unknownColorVars=new Set,this.unknownBgVars=new Set,this.undefinedVars=new Set,this.initialVarTypes=new Map,this.changedTypeVars=new Set,this.typeChangeSubscriptions=new Map,this.unstableVarValues=new Map}return e.prototype.clear=function(){this.varTypes.clear(),this.rulesQueue.splice(0),this.definedVars.clear(),this.varRefs.clear(),this.unknownColorVars.clear(),this.unknownBgVars.clear(),this.undefinedVars.clear(),this.initialVarTypes.clear(),this.changedTypeVars.clear(),this.typeChangeSubscriptions.clear(),this.unstableVarValues.clear()},e.prototype.isVarType=function(e,t){return this.varTypes.has(e)&&(this.varTypes.get(e)&t)>0},e.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},e.prototype.matchVariablesAndDependants=function(){var e=this;this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(this.rulesQueue),this.rulesQueue.splice(0),this.collectRootVarDependants(),this.varRefs.forEach((function(t,n){t.forEach((function(t){e.varTypes.has(n)&&e.resolveVariableType(t,e.varTypes.get(n))}))})),this.unknownColorVars.forEach((function(t){e.unknownBgVars.has(t)?(e.unknownColorVars.delete(t),e.unknownBgVars.delete(t),e.resolveVariableType(t,Dn)):e.isVarType(t,Dn|Nn|Fn)?e.unknownColorVars.delete(t):e.undefinedVars.add(t)})),this.unknownBgVars.forEach((function(t){null!=e.findVarRef(t,(function(t){return e.unknownColorVars.has(t)||e.isVarType(t,Nn|Fn)}))?e.itarateVarRefs(t,(function(t){e.resolveVariableType(t,Dn)})):e.isVarType(t,Dn|jn)?e.unknownBgVars.delete(t):e.undefinedVars.add(t)})),this.changedTypeVars.forEach((function(t){e.typeChangeSubscriptions.has(t)&&e.typeChangeSubscriptions.get(t).forEach((function(e){e()}))})),this.changedTypeVars.clear()},e.prototype.getModifierForVariable=function(e){var t=this;return function(n){var r=e.varName,i=e.sourceValue,o=e.rule,a=e.ignoredImgSelectors,s=e.isCancelled,l=function(){var e=[],l=function(o,a,s){if(t.isVarType(r,o)){var l,c=a(r);if(Qn(i))if($n(i)){var u=ar(i,t.unstableVarValues);u||(u=o===Dn?"#ffffff":"#000000"),l=s(u,n)}else l=Vn(i,(function(e){return a(e)}),(function(e){return s(e,n)}));else l=s(i,n);e.push({property:c,value:l})}};if(l(Dn,Wn,rr),l(Nn,qn,ir),l(Fn,Yn,or),t.isVarType(r,jn)){var c=Xn(r),u=i;Qn(i)&&(u=Vn(i,(function(e){return Wn(e)}),(function(e){return rr(e,n)})));var d=Mn(u,o,a,s);u="function"===typeof d?d(n):d,e.push({property:c,value:u})}return e},c=new Set,u=function(e){var n=function(){var t=l();e(t)};c.add(n),t.subscribeForVarTypeChange(r,n)},d=function(){c.forEach((function(e){t.unsubscribeFromVariableTypeChanges(r,e)}))};return{declarations:l(),onTypeChange:{addListener:u,removeListeners:d}}}},e.prototype.getModifierForVarDependant=function(e,t){var n=this;if(t.match(/^\s*(rgb|hsl)a?\(/)){var r=e.startsWith("background"),i=Jn(e);return function(e){var o=ar(t,n.unstableVarValues);return o||(o=r?"#ffffff":"#000000"),(r?rr:i?ir:or)(o,e)}}return"background-color"===e?function(e){return Vn(t,(function(e){return Wn(e)}),(function(t){return rr(t,e)}))}:Jn(e)?function(e){return Vn(t,(function(e){return qn(e)}),(function(t){return ir(t,e)}))}:"background"===e||"background-image"===e||"box-shadow"===e?function(r){var i=new Set,o=function(){var o=Vn(t,(function(e){return n.isVarType(e,Dn)?Wn(e):n.isVarType(e,jn)?Xn(e):(i.add(e),e)}),(function(e){return rr(e,r)}));if("box-shadow"===e){var a=kn(o)(r);if(a.unparseableMatchesLength!==a.matchesLength)return a.result}return o},a=o();return i.size>0?new Promise((function(e){var t=i.values().next().value,r=function(){n.unsubscribeFromVariableTypeChanges(t,r);var i=o();e(i)};n.subscribeForVarTypeChange(t,r)})):a}:e.startsWith("border")||e.startsWith("outline")?function(e){return Vn(t,(function(e){return Yn(e)}),(function(t){return or(t,e)}))}:null},e.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);var n=this.typeChangeSubscriptions.get(e);n.has(t)||n.add(t)},e.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},e.prototype.collectVariablesAndVarDep=function(e){var t=this;e.forEach((function(e){Ae(e,(function(e){e.style&&be(e.style,(function(e,n){Kn(e)&&t.inspectVariable(e,n),Qn(n)&&t.inspectVarDependant(e,n)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;be(document.documentElement.style,(function(t,n){Kn(t)&&e.inspectVariable(t,n)}))},e.prototype.inspectVariable=function(e,t){this.unstableVarValues.set(e,t),Qn(t)&&$n(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e)||(this.definedVars.add(e),je(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,jn))},e.prototype.resolveVariableType=function(e,t){var n=this.initialVarTypes.get(e)||0,r=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,r),(r!==n||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},e.prototype.collectRootVarDependants=function(){var e=this;be(document.documentElement.style,(function(t,n){Qn(n)&&e.inspectVarDependant(t,n)}))},e.prototype.inspectVarDependant=function(e,t){var n=this;Kn(e)?this.iterateVarDeps(t,(function(t){n.varRefs.has(e)||n.varRefs.set(e,new Set),n.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(function(e){return n.resolveVariableType(e,Dn)})):Jn(e)?this.iterateVarDeps(t,(function(e){return n.resolveVariableType(e,Nn)})):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(function(e){return n.resolveVariableType(e,Fn)})):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(function(e){if(!n.isVarType(e,Dn|jn)){var t=null!=n.findVarRef(e,(function(e){return n.unknownColorVars.has(e)||n.isVarType(e,Nn|Fn)}));n.itarateVarRefs(e,(function(e){t?n.resolveVariableType(e,Dn):n.unknownBgVars.add(e)}))}}))},e.prototype.iterateVarDeps=function(e,t){var n=new Set;Gn(e,(function(e){return n.add(e)})),n.forEach((function(e){return t(e)}))},e.prototype.findVarRef=function(e,t,n){var r,i;if(void 0===n&&(n=new Set),n.has(e))return null;if(n.add(e),t(e))return e;var a=this.varRefs.get(e);if(!a||0===a.size)return null;try{for(var s=o(a),l=s.next();!l.done;l=s.next()){var c=l.value,u=this.findVarRef(c,t,n);if(u)return u}}catch(d){r={error:d}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return null},e.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,(function(e){return t(e),!1}))},e.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},e.prototype.putRootVars=function(e,t){var n,r,i=this,s=e.sheet;s.cssRules.length>0&&s.deleteRule(0);var l=new Map;be(document.documentElement.style,(function(e,n){Kn(e)&&(i.isVarType(e,Dn)&&l.set(Wn(e),rr(n,t)),i.isVarType(e,Nn)&&l.set(qn(e),ir(n,t)),i.isVarType(e,Fn)&&l.set(Yn(e),or(n,t)),i.subscribeForVarTypeChange(e,i.onRootVariableDefined))}));var c=[];c.push(":root {");try{for(var u=o(l),d=u.next();!d.done;d=u.next()){var h=a(d.value,2),f=h[0],p=h[1];c.push(" ".concat(f,": ").concat(p,";"))}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}c.push("}");var g=c.join("\n");s.insertRule(g)},e}());function zn(e,t){void 0===t&&(t=0);var n=e.indexOf("var(",t);if(n>=0){var r=De(e,n+3);return r?{start:n,end:r.end}:null}}function Zn(e){for(var t,n=[],r=0;t=zn(e,r);){var i=t.start,o=t.end;n.push({start:i,end:o,value:e.substring(i,o)}),r=t.end+1}return n}function Un(e,t){var n=Zn(e),r=n.length;if(0===r)return e;var i=e.length,o=n.map((function(e){return t(e.value)})),a=[];a.push(e.substring(0,n[0].start));for(var s=0;s=0?(t=e.substring(4,r).trim(),n=e.substring(r+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),n=""),{name:t,fallback:n}}function Vn(e,t,n){return Un(e,(function(e){var r,i=Hn(e),o=i.name,a=i.fallback,s=t(o);return a?(r=Qn(a)?Vn(a,t,n):n?n(a):a,"var(".concat(s,", ").concat(r,")")):"var(".concat(s,")")}))}function Gn(e,t){Vn(e,(function(e){return t(e),e}))}function Wn(e){return"--darkreader-bg".concat(e)}function qn(e){return"--darkreader-text".concat(e)}function Yn(e){return"--darkreader-border".concat(e)}function Xn(e){return"--darkreader-bgimg".concat(e)}function Kn(e){return e.startsWith("--")}function Qn(e){return e.includes("var(")}function $n(e){return e.match(/^\s*(rgb|hsl)a?\(/)}function Jn(e){return"color"===e||"caret-color"===e||"-webkit-text-fill-color"===e}var er=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function tr(e){if(er.test(e)){var t=e.split(","),n="rgb(";return t.forEach((function(e){n+="".concat(e.trim(),", ")})),n=n.substring(0,n.length-2),{isRaw:!0,color:n+=")"}}return{isRaw:!1,color:e}}function nr(e,t,n){var r=tr(e),i=r.isRaw,o=r.color,a=je(o);if(a){var s=n(a,t);if(i){var l=je(s);return l?"".concat(l.r,", ").concat(l.g,", ").concat(l.b):s}return s}return o}function rr(e,t){return nr(e,t,Ot)}function ir(e,t){return nr(e,t,Ft)}function or(e,t){return nr(e,t,Bt)}function ar(e,t,n){void 0===n&&(n=new Set);var r=!1,i=Un(e,(function(e){var i=Hn(e),o=i.name,a=i.fallback;if(n.has(o))return r=!0,null;n.add(o);var s=t.get(o)||a,l=null;return s&&(l=Qn(s)?ar(s,t,n):s),l||(r=!0,null)}));return r?null:i}var sr={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor"},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage"},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border"},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom"},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left"},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right"},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top"},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow"},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color"},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill"},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke"},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline"},"stop-color":{customProp:"--darkreader-inline-stopcolor",cssProp:"stop-color",dataAttr:"data-darkreader-inline-stopcolor"}},lr=Object.values(sr),cr={};lr.forEach((function(e){var t=e.cssProp,n=e.customProp;return cr[n]=t}));var ur=["style","fill","stop-color","stroke","bgcolor","color"],dr=ur.map((function(e){return"[".concat(e,"]")})).join(", ");function hr(){return lr.map((function(e){var t=e.dataAttr,n=e.customProp,r=e.cssProp;return["[".concat(t,"] {")," ".concat(r,": var(").concat(n,") !important;"),"}"].join("\n")})).join("\n")}function fr(e){var t=[];return e instanceof Element&&e.matches(dr)&&t.push(e),(e instanceof Element||A&&e instanceof ShadowRoot||e instanceof Document)&&B(t,e.querySelectorAll(dr)),t}var pr=new Map,gr=new Map;function mr(e,t){Ar(document,e,t),Y(document.documentElement,(function(n){Ar(n.shadowRoot,e,t)}))}function Ar(e,t,n){pr.has(e)&&(pr.get(e).disconnect(),gr.get(e).disconnect());var r=new WeakSet;function i(e){fr(e).forEach((function(e){r.has(e)||(r.add(e),t(e))})),Y(e,(function(i){r.has(e)||(r.add(e),n(i.shadowRoot),Ar(i.shadowRoot,t,n))}))}var o=de(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return i(e)}))},onHugeMutations:function(){i(e)}});pr.set(e,o);var l=0,c=null,u=G({seconds:10}),d=G({seconds:2}),h=50,f=[],p=null,g=H((function(e){e.forEach((function(e){ur.includes(e.attributeName)&&t(e.target)}))})),m=new MutationObserver((function(e){if(p)f.push.apply(f,s([],a(e),!1));else{l++;var t=Date.now();if(null==c)c=t;else if(l>=h){if(t-c0&&wr(e,n))i.forEach((function(t){e.removeAttribute(sr[t].dataAttr)}));else{if(e.hasAttribute("bgcolor")&&(((l=e.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||l.match(/^[0-9a-f]{6}$/i))&&(l="#".concat(l)),c("background-color","background-color",l)),e.hasAttribute("color")&&"mask-icon"!==e.rel&&(((l=e.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||l.match(/^[0-9a-f]{6}$/i))&&(l="#".concat(l)),c("color","color",l)),e instanceof SVGElement){if(e.hasAttribute("fill")){var o=32,a=e.getAttribute("fill");if("none"!==a)if(e instanceof SVGTextElement)c("fill","color",a);else{var s=function(){var t=e.getBoundingClientRect(),n=t.width,r=t.height;c("fill",n>o||r>o?"background-color":"color",a)};ee()?s():ne(s)}}e.hasAttribute("stop-color")&&c("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){var l=e.getAttribute("stroke");c("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",l)}e.style&&be(e.style,(function(t,n){if("background-image"!==t||!n.includes("url"))if(sr.hasOwnProperty(t)||t.startsWith("--")&&!cr[t])c(t,t,n);else{var r=cr[t];if(r&&!e.style.getPropertyValue(r)&&!e.hasAttribute(r)){if("background-color"===r&&e.hasAttribute("bgcolor"))return;e.style.setProperty(t,"")}}})),e.style&&e instanceof SVGTextElement&&e.style.fill&&c("fill","color",e.style.getPropertyValue("fill")),j(i,(function(t){e.removeAttribute(sr[t].dataAttr)})),yr.set(e,_r(e,t))}}function c(n,o,a){var s=n.startsWith("--"),l=s?{}:sr[n],c=l.customProp,u=l.dataAttr,d=An(o,a,{style:e.style},Bn,r,null);if(d){var h=d.value;"function"===typeof h&&(h=h(t)),s&&"object"===typeof h?h.declarations.forEach((function(t){var n=t.property,r=t.value;!(r instanceof Promise)&&e.style.setProperty(n,r)})):(e.style.setProperty(c,h),e.hasAttribute(u)||e.setAttribute(u,""),i.delete(n))}}}var Er="theme-color",Sr='meta[name="'.concat(Er,'"]'),Cr=null,Pr=null;function Tr(e,t){var n=je(Cr=Cr||e.content);n&&(e.content=Ot(n,t))}function Mr(e){var t=document.querySelector(Sr);t?Tr(t,e):(Pr&&Pr.disconnect(),(Pr=new MutationObserver((function(t){e:for(var n=0;n0){var s=e.parentRule;a={selector:e.selectorText,declarations:o,parentRule:s},b.push(a)}n.set(r,a)}else b.push(n.get(r))}),(function(){o=!0})),A.forEach((function(e){t.delete(e),n.delete(e)})),i=v,f||m||y){e++;var _=new Map,w=new Map,x=0,E=0,S={rule:null,rules:[],isGroup:!0},C=new WeakMap;r.forEach((function(e){return e()})),r.clear(),b.filter((function(e){return e})).forEach((function(t){var n=t.selector,i=t.declarations,o=M(t.parentRule),l={selector:n,declarations:[],isGroup:!1},c=l.declarations;function u(t,n,r,i){var o=++x,a={property:t,value:null,important:r,asyncKey:o,sourceValue:i};c.push(a);var s=e;n.then((function(t){t&&!g()&&s===e&&(a.value=t,Ir.add((function(){g()||s!==e||R(o)})))}))}function h(t,n,i,o){var l=n,d=l.declarations,h=l.onTypeChange,f=++E,p=e,m=c.length,A=[];if(0===d.length){var v={property:t,value:o,important:i,sourceValue:o,varKey:f};c.push(v),A=[v]}d.forEach((function(e){if(e.value instanceof Promise)u(e.property,e.value,i,o);else{var t={property:e.property,value:e.value,important:i,sourceValue:o,varKey:f};c.push(t),A.push(t)}})),h.addListener((function(t){if(!g()&&p===e){var n=t.map((function(e){return{property:e.property,value:e.value,important:i,sourceValue:o,varKey:f}})),r=c.indexOf(A[0],m);c.splice.apply(c,s([r,A.length],a(n),!1)),A=n,O(f)}})),r.add((function(){return h.removeListeners()}))}o.rules.push(l),i.forEach((function(e){var t=e.property,n=e.value,r=e.important,i=e.sourceValue;if("function"===typeof n){var o=n(d);o instanceof Promise?u(t,o,r,i):t.startsWith("--")?h(t,o,r,i):c.push({property:t,value:o,important:r,sourceValue:i})}else c.push({property:t,value:n,important:r,sourceValue:i})}))}));var P=p();k()}function T(e,t,n){var r=n.selector,i=n.declarations,o=function(e){var t=e.property,n=e.value,r=e.important,i=e.sourceValue;return"".concat(t,": ").concat(null==n?i:n).concat(r?" !important":"",";")},a="";i.forEach((function(e){a+="".concat(o(e)," ")}));var s="".concat(r," { ").concat(a," }");e.insertRule(s,t)}function M(e){if(null==e)return S;if(C.has(e))return C.get(e);var t={rule:e,rules:[],isGroup:!0};return C.set(e,t),M(e.parentRule).rules.push(t),t}function k(){function e(e,t){var n=e.rule;if(n instanceof CSSMediaRule){var r=n.media,i=t.cssRules.length;return t.insertRule("@media ".concat(r.mediaText," {}"),i),t.cssRules[i]}return t}function t(n,r,i){n.rules.forEach((function(n){n.isGroup?t(n,e(n,r),i):i(n,r)}))}t(S,P,(function(e,t){var n=t.cssRules.length;e.declarations.forEach((function(r){var i=r.asyncKey,o=r.varKey;null!=i&&_.set(i,{rule:e,target:t,index:n}),null!=o&&w.set(o,{rule:e,target:t,index:n})})),T(t,n,e)}))}function R(e){var t=_.get(e),n=t.rule,r=t.target,i=t.index;r.deleteRule(i),T(r,i,n),_.delete(e)}function O(e){var t=w.get(e),n=t.rule,r=t.target,i=t.index;r.deleteRule(i),T(r,i,n)}}return{modifySheet:u,shouldRebuildStyle:c}}var Dr='style, link[rel*="stylesheet" i]:not([disabled])';function Nr(e){if(!e.href)return!1;try{return"fonts.googleapis.com"===new URL(e.href).hostname}catch(t){return Z("Couldn't construct ".concat(e.href," as URL")),!1}}function Fr(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&e.href&&!e.disabled&&(!f||!e.href.startsWith("moz-extension://"))&&!Nr(e))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function jr(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=!0),Fr(e)?t.push(e):(e instanceof Element||A&&e instanceof ShadowRoot||e===document)&&(j(e.querySelectorAll(Dr),(function(e){return jr(e,t,!1)})),n&&Y(e,(function(e){return jr(e.shadowRoot,t,!1)}))),t}var Br=new WeakSet,zr=new WeakSet,Zr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Zr=!0}));var Ur=0,Hr=new Map;function Vr(){Hr.clear()}function Gr(e,t){for(var n=t.update,o=t.loadingStart,s=t.loadingEnd,l=[],c=e;(c=c.nextElementSibling)&&c.matches(".darkreader");)l.push(c);var u=l.find((function(e){return e.matches(".darkreader--cors")&&!zr.has(e)}))||null,d=l.find((function(e){return e.matches(".darkreader--sync")&&!Br.has(e)}))||null,h=null,f=null,g=!1,m=!0,A=Lr(),v=new MutationObserver((function(){n()})),y={attributes:!0,childList:!0,subtree:!0,characterData:!0};function b(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(we)}function _(e,t){var n=!1;if(e){var r=void 0;e:for(var i=0,o=e.length;i=0;t--)e.deleteRule(t)}function o(){return d||E(),f&&f.stop(),x(),null==d.sheet&&(d.textContent=""),i(d.sheet),f?f.run():f=q(d,"prev-sibling",(function(){k=!0,a()})),d.sheet}function a(){var i=k;k=!1,A.modifySheet({prepareSheet:o,sourceCSSRules:r,theme:e,ignoreImageAnalysis:t,force:i,isAsyncCancelled:function(){return g}}),m=0===d.sheet.cssRules.length,A.shouldRebuildStyle()&&ne((function(){return n()}))}r&&(g=!1,a())}function O(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(t){return[null,t]}}function I(e){return e&&e.message&&e.message.includes("loading")}function L(){var e=a(O(),2),t=e[0];return e[1]?null:t}function D(){V(),Zr&&e.sheet||z()}var N=null,F=null;function j(){var e=L();return e?e.length:null}function B(){return j()!==N}function z(){N=j(),Z();var t=function(){B()&&(N=j(),n()),Zr&&e.sheet?Z():F=requestAnimationFrame(t)};t()}function Z(){cancelAnimationFrame(F)}var U=!1;function H(){function e(){U=!1,g||n()}Zr=!0,Z(),U||(U=!0,"function"===typeof queueMicrotask?queueMicrotask(e):requestAnimationFrame(e))}function V(){e.addEventListener("__darkreader__updateSheet",H)}function G(){e.removeEventListener("__darkreader__updateSheet",H)}function Y(){G(),Z()}function X(){v.disconnect(),g=!0,h&&h.stop(),f&&f.stop(),Y()}function K(){if(X(),W(u),W(d),s(),Hr.has(P)){var e=Hr.get(P);Hr.delete(P),e&&e()}}function Q(){v.observe(e,y),e instanceof HTMLStyleElement&&D()}var $=10,J=0;function ee(){d&&(++J>$||(x(),h&&h.skip(),f&&f.skip(),m||(k=!0,n())))}return{details:M,render:R,pause:X,destroy:K,watch:Q,restore:ee}}function Wr(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,new Promise((function(n,r){var i=function(){e.removeEventListener("load",o),e.removeEventListener("error",a),Hr.delete(t)},o=function(){i(),n()},a=function(){i(),r("Linkelement ".concat(t," couldn't be loaded. ").concat(e.href))};Hr.set(t,(function(){i(),r()})),e.addEventListener("load",o),e.addEventListener("error",a),e.href||a()}))]}))}))}function qr(e){return xe(e.substring(7).trim().replace(/;$/,"").replace(/screen$/,""))}function Yr(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:case 4:return[2,t.sent()];case 3:return[4,Xt({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})]}}))}))}function Xr(e,t,n){return void 0===n&&(n=new Map),r(this,void 0,void 0,(function(){var r,a,s,l,c,u,d,h,f,p;return i(this,(function(i){switch(i.label){case 0:e=Se(e=Me(e=Pe(e)),t),r=Ie(we,e),i.label=1;case 1:i.trys.push([1,10,11,12]),a=o(r),s=a.next(),i.label=2;case 2:return s.done?[3,9]:(l=s.value,c=qr(l),u=ge(t,c),d=void 0,n.has(u)?(d=n.get(u),[3,7]):[3,3]);case 3:return i.trys.push([3,6,,7]),[4,Yr(u)];case 4:return d=i.sent(),n.set(u,d),[4,Xr(d,Ee(u),n)];case 5:return d=i.sent(),[3,7];case 6:return i.sent(),d="",[3,7];case 7:e=e.split(l).join(d),i.label=8;case 8:return s=a.next(),[3,2];case 9:return[3,12];case 10:return h=i.sent(),f={error:h},[3,12];case 11:try{s&&!s.done&&(p=a.return)&&p.call(a)}finally{if(f)throw f.error}return[7];case 12:return[2,e=e.trim()]}}))}))}function Kr(e,t){if(!t)return null;var n=document.createElement("style");return n.classList.add("darkreader"),n.classList.add("darkreader--cors"),n.media="screen",n.textContent=t,e.parentNode.insertBefore(n,e.nextSibling),n.sheet.disabled=!0,zr.add(n),n}var Qr,$r,Jr=[],ei=new Map;function ti(e){y&&j(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var n=e.getAttribute("is");if(!n)return;t=n}ei.has(t)||(ei.set(t,new Set),oi(t).then((function(){if($r){var e=ei.get(t);ei.delete(t),$r(Array.from(e))}}))),ei.get(t).add(e)}))}var ni=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){ni=!0}));var ri=new Map;function ii(e){ni=!0,ri.has(e.detail.tag)&&ri.get(e.detail.tag)()}function oi(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,new Promise((function(t){if(window.customElements&&"function"===typeof customElements.whenDefined)customElements.whenDefined(e).then((function(){return t()}));else if(ni)ri.set(e,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var n=function(){var r=ei.get(e);r&&r.size>0&&(r.values().next().value.matches(":defined")?t():requestAnimationFrame(n))};requestAnimationFrame(n)}}))]}))}))}function ai(e){$r=e}function si(){$r=null,ei.clear(),document.removeEventListener("__darkreader__isDefined",ii)}function li(e,t,n){ui();var r=new Set(e),i=new WeakMap,o=new WeakMap;function a(e){i.set(e,e.previousElementSibling),o.set(e,e.nextElementSibling)}function s(e){i.delete(e),o.delete(e)}function l(e){return e.previousElementSibling!==i.get(e)||e.nextElementSibling!==o.get(e)}function c(e){var n=e.createdStyles,i=e.removedStyles,o=e.movedStyles;n.forEach((function(e){return a(e)})),o.forEach((function(e){return a(e)})),i.forEach((function(e){return s(e)})),n.forEach((function(e){return r.add(e)})),i.forEach((function(e){return r.delete(e)})),n.size+i.size+o.size>0&&t({created:Array.from(n),removed:Array.from(i),moved:Array.from(o),updated:[]})}function u(e){var t=e.additions,n=e.moves,r=e.deletions,i=new Set,o=new Set,a=new Set;t.forEach((function(e){return jr(e).forEach((function(e){return i.add(e)}))})),r.forEach((function(e){return jr(e).forEach((function(e){return o.add(e)}))})),n.forEach((function(e){return jr(e).forEach((function(e){return a.add(e)}))})),c({createdStyles:i,removedStyles:o,movedStyles:a}),t.forEach((function(e){Y(e,p),ti(e)}))}function d(e){var t=new Set(jr(e)),n=new Set,i=new Set,o=new Set;t.forEach((function(e){r.has(e)||n.add(e)})),r.forEach((function(e){t.has(e)||i.add(e)})),t.forEach((function(e){n.has(e)||i.has(e)||!l(e)||o.add(e)})),c({createdStyles:n,removedStyles:i,movedStyles:o}),Y(e,p),ti(e)}function h(e){var n=new Set,r=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(Fr(t)?n.add(t):t instanceof HTMLLinkElement&&t.disabled&&r.add(t))})),n.size+r.size>0&&t({updated:Array.from(n),created:[],removed:Array.from(r),moved:[]})}function f(e){var t=de(e,{onMinorMutations:u,onHugeMutations:d}),n=new MutationObserver(h);n.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media","href"],subtree:!0}),Jr.push(t,n),Qr.add(e)}function p(e){var t=e.shadowRoot;null==t||Qr.has(t)||(f(t),n(t))}e.forEach(a),f(document),Y(document.documentElement,p),ai((function(e){var n=[];e.forEach((function(e){return B(n,jr(e.shadowRoot))})),t({created:n,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(p(e),Y(t,p),ti(t))}))})),document.addEventListener("__darkreader__isDefined",ii),ti(document)}function ci(){Jr.forEach((function(e){return e.disconnect()})),Jr.splice(0,Jr.length),Qr=new WeakSet}function ui(){ci(),si()}function di(e){return(e<16?"0":"")+e.toString(16)}function hi(){if("randomUUID"in crypto){var e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return di(e)})).join("")}var fi=new WeakMap,pi=new WeakSet;function gi(e){var t=!1;function n(t,n){var r=s([],a(e.adoptedStyleSheets),!1),i=r.indexOf(t),o=r.indexOf(n);i!==o-1&&(o>=0&&r.splice(o,1),r.splice(i+1,0,n),e.adoptedStyleSheets=r)}function r(){t=!0;var n=s([],a(e.adoptedStyleSheets),!1);e.adoptedStyleSheets.forEach((function(e){if(pi.has(e)){var t=n.indexOf(e);t>=0&&n.splice(t,1),fi.delete(e),pi.delete(e)}})),e.adoptedStyleSheets=n}function i(r,i){e.adoptedStyleSheets.forEach((function(e){if(!pi.has(e)){var o=e.rules,a=new CSSStyleSheet;Lr().modifySheet({prepareSheet:s,sourceCSSRules:o,theme:r,ignoreImageAnalysis:i,force:!1,isAsyncCancelled:function(){return t}})}function s(){for(var t=a.cssRules.length-1;t>=0;t--)a.deleteRule(t);return n(e,a),fi.set(e,a),pi.add(a),a}}))}return{render:i,destroy:r}}function mi(e){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));var t=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),n=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),i=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),o=e?Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"):null,l=["baidu.com","baike.baidu.com","ditu.baidu.com","map.baidu.com","maps.baidu.com","haokan.baidu.com","pan.baidu.com","passport.baidu.com","tieba.baidu.com","www.baidu.com"].includes(location.hostname),c=l?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,u=function(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",t),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",n),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",r),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",i),document.removeEventListener("__darkreader__cleanUp",u),document.removeEventListener("__darkreader__addUndefinedResolver",d),e&&Object.defineProperty(Document.prototype,"styleSheets",o),l&&Object.defineProperty(Element.prototype,"getElementsByTagName",c)},d=function(e){customElements.whenDefined(e.detail.tag).then((function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e.detail.tag}}))}))};document.addEventListener("__darkreader__cleanUp",u),document.addEventListener("__darkreader__addUndefinedResolver",d);var h=new Event("__darkreader__updateSheet");function f(e,n,r){return t.value.call(this,e,n,r),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(h),-1}function p(e,t){var r=n.value.call(this,e,t);return this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(h),r}function g(e){r.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(h)}function m(e){i.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(h)}function A(){var e=this,t=function(){var t=s([],a(o.get.call(e)),!1).filter((function(e){return!e.ownerNode.classList.contains("darkreader")}));return t.item=function(e){return t[e]},Object.setPrototypeOf(t,StyleSheetList.prototype)},n=t();return n=new Proxy(n,{get:function(e,n){return t()[n]}})}function v(e){var t=this;if("style"!==e)return c.value.call(this,e);var n=function(){var n=c.value.call(t,e);return Object.setPrototypeOf(s([],a(n),!1).filter((function(e){return!e.classList.contains("darkreader")})),NodeList.prototype)},r=n();return r=new Proxy(r,{get:function(e,t){return n()[Number(t)||t]}})}Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},t,{value:f})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},n,{value:p})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},r,{value:g})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},i,{value:m})),e&&Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},o,{get:A})),l&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},c,{value:v}))}var Ai=hi(),vi=new Map,yi=[],bi=null,_i=null,wi=null,xi=null,Ei=null;function Si(e,t){void 0===t&&(t=document.head||document);var n=t.querySelector(".".concat(e));return n||((n=document.createElement("style")).classList.add("darkreader"),n.classList.add(e),n.media="screen",n.textContent=""),n}function Ci(e,t){void 0===t&&(t=document.head||document);var n=t.querySelector(".".concat(e));return n||((n=document.createElement("script")).classList.add("darkreader"),n.classList.add(e)),n}var Pi=new Map;function Ti(e,t){Pi.has(t)&&Pi.get(t).stop(),Pi.set(t,q(e,"parent"))}function Mi(){j(Pi.values(),(function(e){return e.stop()})),Pi.clear()}function ki(){var e=Si("darkreader--fallback",document);e.textContent=xn(bi,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),Ti(e,"fallback");var t=Si("darkreader--user-agent");t.textContent=yn(bi,wi,bi.styleSystemControls),document.head.insertBefore(t,e.nextSibling),Ti(t,"user-agent");var r=Si("darkreader--text");bi.useFont||bi.textStroke>0?r.textContent=Ut(bi):r.textContent="",document.head.insertBefore(r,e.nextSibling),Ti(r,"text");var i=Si("darkreader--invert");_i&&Array.isArray(_i.invert)&&_i.invert.length>0?i.textContent=["".concat(_i.invert.join(", ")," {")," filter: ".concat(Ht(n(n({},bi),{contrast:0===bi.mode?bi.contrast:ft(bi.contrast-10,0,100)}))," !important;"),"}"].join("\n"):i.textContent="",document.head.insertBefore(i,r.nextSibling),Ti(i,"invert");var o=Si("darkreader--inline");o.textContent=hr(),document.head.insertBefore(o,i.nextSibling),Ti(o,"inline");var a=Si("darkreader--override");a.textContent=_i&&_i.css?Ii(_i.css):"",document.head.appendChild(a),Ti(a,"override");var s=Si("darkreader--variables"),l=bn(bi),c=bi.darkSchemeBackgroundColor,u=bi.darkSchemeTextColor,d=bi.lightSchemeBackgroundColor,h=bi.lightSchemeTextColor,f=bi.mode,p=0===f?d:c,g=0===f?h:u;p=Ot(je(p),bi),g=Ft(je(g),bi),s.textContent=[":root {"," --darkreader-neutral-background: ".concat(p,";")," --darkreader-neutral-text: ".concat(g,";")," --darkreader-selection-background: ".concat(l.backgroundColorSelection,";")," --darkreader-selection-text: ".concat(l.foregroundColorSelection,";"),"}"].join("\n"),document.head.insertBefore(s,o.nextSibling),Ti(s,"variables");var m=Si("darkreader--root-vars");document.head.insertBefore(m,s.nextSibling);var A=!(_i&&_i.disableStyleSheetsProxy),v=Ci("darkreader--proxy");v.append("(".concat(mi,")(").concat(A,")")),document.head.insertBefore(v,m.nextSibling),v.remove()}var Ri=new Set;function Oi(e){var t=Si("darkreader--inline",e);t.textContent=hr(),e.insertBefore(t,e.firstChild);var r=Si("darkreader--override",e);r.textContent=_i&&_i.css?Ii(_i.css):"",e.insertBefore(r,t.nextSibling);var i=Si("darkreader--invert",e);_i&&Array.isArray(_i.invert)&&_i.invert.length>0?i.textContent=["".concat(_i.invert.join(", ")," {")," filter: ".concat(Ht(n(n({},bi),{contrast:0===bi.mode?bi.contrast:ft(bi.contrast-10,0,100)}))," !important;"),"}"].join("\n"):i.textContent="",e.insertBefore(i,r.nextSibling),Ri.add(e)}function Ii(e){return e.replace(/\${(.+?)}/g,(function(e,t){var n=je(t);return n?Pt(n,bi):t}))}function Li(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}function Di(){Zi();var e=jr(document).filter((function(e){return!vi.has(e)})).map((function(e){return ji(e)}));e.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Bn.addRulesForMatching(e.rules)})),Bn.matchVariablesAndDependants(),Bn.setOnRootVariableChange((function(){Bn.putRootVars(document.head.querySelector(".darkreader--root-vars"),bi)})),Bn.putRootVars(document.head.querySelector(".darkreader--root-vars"),bi),vi.forEach((function(e){return e.render(bi,xi)})),0===Fi.size&&Li(),e.forEach((function(e){return e.watch()}));var t=z(document.querySelectorAll(dr));Y(document.documentElement,(function(e){Oi(e.shadowRoot);var n=e.shadowRoot.querySelectorAll(dr);n.length>0&&B(t,n)})),t.forEach((function(e){return xr(e,bi,Ei,xi)})),Xi(document)}var Ni=0,Fi=new Set;function ji(e){var t=++Ni;function n(){if(!X()||!Gi){Fi.add(t),Z("Current amount of styles loading: ".concat(Fi.size));var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=xn(bi,{strict:!1}))}}function r(){Fi.delete(t),Z("Removed loadingStyle ".concat(t,", now awaiting: ").concat(Fi.size)),0===Fi.size&&X()&&Li()}function i(){var e=o.details({secondRound:!0});e&&(Bn.addRulesForMatching(e.rules),Bn.matchVariablesAndDependants(),o.render(bi,xi))}var o=Gr(e,{update:i,loadingStart:n,loadingEnd:r});return vi.set(e,o),o}function Bi(e){var t=vi.get(e);t&&(t.destroy(),vi.delete(e))}var zi=H((function(e){vi.forEach((function(e){return e.render(bi,xi)})),yi.forEach((function(e){return e.render(bi,xi)})),e&&e()})),Zi=function(){zi.cancel()};function Ui(){0!==Fi.size||Li()}var Hi,Vi=null,Gi=!document.hidden;function Wi(e){var t=Boolean(Vi);Vi=function(){document.hidden||(qi(),e(),Gi=!0)},t||document.addEventListener("visibilitychange",Vi)}function qi(){document.removeEventListener("visibilitychange",Vi),Vi=null}function Yi(){function e(){Di(),Ki()}ki(),document.hidden&&!bi.immediateModify?Wi(e):e(),Mr(bi)}function Xi(e){try{if(Array.isArray(e.adoptedStyleSheets)&&e.adoptedStyleSheets.length>0){var t=gi(e);yi.push(t),t.render(bi,xi)}}catch(n){}}function Ki(){li(Array.from(vi.keys()),(function(e){var t=e.created,n=e.updated,r=e.removed,i=e.moved,o=r,a=t.concat(n).concat(i).filter((function(e){return!vi.has(e)})),s=i.filter((function(e){return vi.has(e)}));o.forEach((function(e){return Bi(e)}));var l=a.map((function(e){return ji(e)}));l.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Bn.addRulesForMatching(e.rules)})),Bn.matchVariablesAndDependants(),l.forEach((function(e){return e.render(bi,xi)})),l.forEach((function(e){return e.watch()})),s.forEach((function(e){return vi.get(e).restore()}))}),(function(e){Oi(e),Xi(e)})),mr((function(e){xr(e,bi,Ei,xi),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")&&(Bn.matchVariablesAndDependants(),Bn.putRootVars(document.head.querySelector(".darkreader--root-vars"),bi))}),(function(e){Oi(e);var t=e.querySelectorAll(dr);t.length>0&&j(t,(function(e){return xr(e,bi,Ei,xi)}))})),$(Ui)}function Qi(){vi.forEach((function(e){return e.pause()})),Mi(),ui(),vr(),J(Ui),re()}function $i(){(Hi=new MutationObserver((function(){document.querySelector('meta[name="darkreader-lock"]')&&(Hi.disconnect(),ro())}))).observe(document.head,{childList:!0,subtree:!0})}function Ji(){var e=document.createElement("meta");e.name="darkreader",e.content=Ai,document.head.appendChild(e)}function eo(){if(document.querySelector('meta[name="darkreader-lock"]'))return!0;var e=document.querySelector('meta[name="darkreader"]');return e?e.content!==Ai:(Ji(),$i(),!1)}function to(e,t,n){if(bi=e,(_i=t)?(xi=Array.isArray(_i.ignoreImageAnalysis)?_i.ignoreImageAnalysis:[],Ei=Array.isArray(_i.ignoreInlineStyle)?_i.ignoreInlineStyle:[]):(xi=[],Ei=[]),bi.immediateModify&&K((function(){return!0})),wi=n,document.head){if(eo())return;document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",bi.mode?"dark":"dimmed"),Yi()}else{if(!f){var r=Si("darkreader--fallback");document.documentElement.appendChild(r),r.textContent=xn(bi,{strict:!0})}var i=new MutationObserver((function(){if(document.head){if(i.disconnect(),eo())return void ro();Yi()}}));i.observe(document,{childList:!0,subtree:!0})}}function no(){document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),W(document.head.querySelector(".darkreader--proxy"))}function ro(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),io(),W(document.querySelector(".darkreader--fallback")),document.head&&(kr(),W(document.head.querySelector(".darkreader--user-agent")),W(document.head.querySelector(".darkreader--text")),W(document.head.querySelector(".darkreader--invert")),W(document.head.querySelector(".darkreader--inline")),W(document.head.querySelector(".darkreader--override")),W(document.head.querySelector(".darkreader--variables")),W(document.head.querySelector(".darkreader--root-vars")),W(document.head.querySelector('meta[name="darkreader"]')),no()),Ri.forEach((function(e){W(e.querySelector(".darkreader--inline")),W(e.querySelector(".darkreader--override"))})),Ri.clear(),j(vi.keys(),(function(e){return Bi(e)})),Fi.clear(),Vr(),j(document.querySelectorAll(".darkreader"),W),yi.forEach((function(e){e.destroy()})),yi.splice(0),Hi&&Hi.disconnect()}function io(){Bn.clear(),he.clear(),qi(),Zi(),Qi(),Ln(),ze()}var oo=/url\(\"(blob\:.*?)\"\)/g;function ao(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=[],Ie(oo,e,1).forEach((function(e){var n=w(e);t.push(n)})),[4,Promise.all(t)];case 1:return n=r.sent(),[2,e.replace(oo,(function(){return'url("'.concat(n.shift(),'")')}))]}}))}))}var so='/*\n _______\n / \\\n .==. .==.\n (( ))==(( ))\n / "==" "=="\\\n /____|| || ||___\\\n ________ ____ ________ ___ ___\n | ___ \\ / \\ | ___ \\ | | / /\n | | \\ \\ / /\\ \\ | | \\ \\| |_/ /\n | | ) / /__\\ \\ | |__/ /| ___ \\\n | |__/ / ______ \\| ____ \\| | \\ \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n| ___ \\ | ____/ / \\ | ___ \\ | ____| ___ \\\n| | \\ \\| |___ / /\\ \\ | | \\ \\| |___| | \\ \\\n| |__/ /| ____/ /__\\ \\ | | ) | ____| |__/ /\n| ____ \\| |__/ ______ \\| |__/ /| |___| ____ \\\n|__| \\__\\____/__/ \\__\\_______/ |______|__| \\__\\\n https://darkreader.org\n*/\n\n/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/main/LICENSE */\n';function lo(){return r(this,void 0,void 0,(function(){function e(e,n){var r=document.querySelector(e);r&&r.textContent&&(t.push("/* ".concat(n," */")),t.push(r.textContent),t.push(""))}var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t=[so],e(".darkreader--fallback","Fallback Style"),e(".darkreader--user-agent","User-Agent Style"),e(".darkreader--text","Text Style"),e(".darkreader--invert","Invert Style"),e(".darkreader--variables","Variables Style"),n=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){j(e.sheet.cssRules,(function(e){e&&e.cssText&&n.push(e.cssText)}))})),n.length?(r=Le(n.join("\n")),t.push("/* Modified CSS */"),a=(o=t).push,[4,ao(r)]):[3,2];case 1:a.apply(o,[i.sent()]),t.push(""),i.label=2;case 2:return e(".darkreader--override","Override Style"),[2,t.join("\n")]}}))}))}var co=!1,uo=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function ho(e,t){void 0===e&&(e={}),void 0===t&&(t=null);var r=n(n({},N),e);if(r.engine!==T.dynamicTheme)throw new Error("Theme engine is not supported.");to(r,t,uo),co=!0}function fo(){return co}function po(){ro(),co=!1}var go=matchMedia("(prefers-color-scheme: dark)"),mo={themeOptions:null,fixes:null};function Ao(){go.matches?ho(mo.themeOptions,mo.fixes):po()}function vo(e,t){void 0===e&&(e={}),void 0===t&&(t=null),e?(mo={themeOptions:e,fixes:t},Ao(),v?go.addEventListener("change",Ao):go.addListener(Ao)):(v?go.removeEventListener("change",Ao):go.removeListener(Ao),po())}function yo(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,lo()];case 1:return[2,e.sent()]}}))}))}var bo=C;e.auto=vo,e.disable=po,e.enable=ho,e.exportGeneratedCSS=yo,e.isEnabled=fo,e.setFetchMethod=bo,Object.defineProperty(e,"__esModule",{value:!0})}(t)},90869:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"zh-cn",weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e,t){return"W"===t?e+"\u5468":e+"\u65e5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524d",s:"\u51e0\u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},meridiem:function(e,t){var n=100*e+t;return n<600?"\u51cc\u6668":n<900?"\u65e9\u4e0a":n<1100?"\u4e0a\u5348":n<1300?"\u4e2d\u5348":n<1800?"\u4e0b\u5348":"\u665a\u4e0a"}};return n.default.locale(r,null,!0),r}(n(65235))},26746:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(n){}return!e&&"undefined"!==typeof process&&"env"in process&&(e={NODE_ENV:"production",PUBLIC_URL:"",BUILD_VERSION:"a2504a92a",THIRD_PARTY:"feishu-dashboard",REACT_APP_SERVER_ENV:"production",REACT_APP_BASE_API_URL:"https://bluedragonli.com/api",REACT_APP_WS_URL:"wss://bluedragonli.com/websocketd",REACT_APP_COLLABORATOR_WS_URL:"wss://bluedragonli.com/websocketd",REACT_APP_CORS_DISABLE_TOKEN:"5cnww43jwd8v5x86q2e24ahsxau97b3a",REACT_APP_AG_GRID_LICENSE_KEY:"For_Trialing_ag-Grid_Only-Not_For_Real_Development_Or_Production_Projects-Valid_Until-30_January_2021_[v2]_MTYxMTk2NDgwMDAwMA==865d36f3a1b8d04d3b1a1405229f6e2b",REACT_APP_GD_TOKEN:"e8ed63325c8e2ad2fceae1c785fad6bd",REACT_APP_DX_APPID:"66fe3ddc3a615b55143d2e02f0044b62",REACT_APP_MAPBOX_TOKEN:"pk.eyJ1IjoiZG9uZ2xlaSIsImEiOiJja3A2amE1cTMwbGQzMnBxZXF4MDEwMnRpIn0.v4ZdsImv9hprcA32ocydgw",REACT_APP_WECHAT_REDIRECT_URI:"https://bluedragonli.com/auth/wechat",REACT_APP_UPGRADE_FORM_URL:"https://bluedragonli.com/s/f/bhk7bmuhjpc0",REACT_APP_DATA_MARKET_FORM_URL:"https://bluedragonli.com/s/f/bhk7twgl7itc",REACT_APP_RECAPTCHA_TOKEN:"6Ldnoo0gAAAAAFbKnr4TtTZn9QUwz5IMsWytqYY4",REACT_APP_USE_RECAPTCHA:"true",REACT_APP_BILL_FORM_URL:"https://bluedragonli.com/s/f/bpup87rqe3nk",REACT_APP_GOOGLE_OAUTH_CLIENT_ID:"461798037408-6c78f94fg3at6soo6q7itm606hged3qf.apps.googleusercontent.com",REACT_APP_STRIPE_PUB_KEY:"pk_live_51L8b87HyKdWcfiHZBeLLIIUQKKf9Ec6UohLlnv0ZIjFfugGPZtfrGnfeQJ5yHXFeZNPya7ii4MTB5hQqXvf0CHhn004g4JMOOO",REACT_APP_OSS_URL:"https://hk-maptable-public.oss-cn-hongkong.aliyuncs.com",REACT_APP_SENTRY_DSN:"https://acfc50569f8b40ecbe6069885697f93a@o1161772.ingest.sentry.io/6248226",REACT_APP_STRIPE_RETURN_URL:"https://maptable.com/api/cb/stripe_payment/",REACT_APP_MAINTAIN_FILE_URI:"https://maptable-prod-public.oss-cn-hangzhou.aliyuncs.com/prodfiles/broadcast/maintain.json",REACT_APP_CRISP_WEBSITE_ID:"e3f43195-3a5a-4bcb-bf1d-7e3d13d0376d"}.DEBUG),e}(t=e.exports=n(52734)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}},t.load=r,t.useColors=function(){if("undefined"!==typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(r())},52734:(e,t,n)=>{var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),s=0;s{"use strict";var r=n(37604)(),i=n(78559),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(c){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),l=n(95770);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new s("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===r&&d?d.enumerable:!r,value:n,writable:null===i&&d?d.writable:!i});else{if(!u&&(r||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},39698:function(e){!function(t){"use strict";var n=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n=e(t).toLowerCase();return function(){var e="application/font-woff",t="image/jpeg";return{woff:e,woff2:e,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:t,jpeg:t,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}()[n]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o'+e+""})).then((function(e){return''+e+""})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(r,t.width||n.width(e),t.height||n.height(e))}))}function c(e,t){return l(e,t).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(e){var r=document.createElement("canvas");if(r.width=t.width||n.width(e),r.height=t.height||n.height(e),t.bgcolor){var i=r.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(e);return i.getContext("2d").drawImage(r,0,0),i}))}function u(e,t,r){return r||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(r){return function(e,t,r){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,n.asArray(i),r).then((function(){return t}));function o(e,t,n){var r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return u(t,n)})).then((function(t){t&&e.appendChild(t)}))})),r}}(e,r,t)})).then((function(t){return function(e,t){return t instanceof Element?Promise.resolve().then(r).then(i).then(o).then(a).then((function(){return t})):t;function r(){function r(e,t){function r(e,t){n.asArray(e).forEach((function(n){t.setProperty(n,e.getPropertyValue(n),e.getPropertyPriority(n))}))}e.cssText?t.cssText=e.cssText:r(e,t)}r(window.getComputedStyle(e),t.style)}function i(){function r(r){var i=window.getComputedStyle(e,r),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=n.uid();t.className=t.className+" "+a;var s=document.createElement("style");s.appendChild(l(a,r,i)),t.appendChild(s)}function l(e,t,r){var i="."+e+":"+t,o=r.cssText?a(r):s(r);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return n.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){r(e)}))}function o(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function a(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach((function(e){var n=t.getAttribute(e);n&&t.style.setProperty(e,n)})))}}(e,t)})):Promise.resolve()}function d(e){return i.resolveAll().then((function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e}))}function h(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()},51752:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,o){return r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(e,i));return r&&t(o,r.prototype),o},r.apply(null,arguments)}function i(e){return o(e)||a(e)||s(e)||c()}function o(e){if(Array.isArray(e))return l(e)}function a(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i/gm),X=m(/^data-[\-\w.\u00B7-\uFFFF]/),K=m(/^aria-[\-\w]+$/),Q=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=m(/^(?:\w+script|data):/i),J=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=m(/^html$/i),te=function(){return"undefined"===typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!==typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(a){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.3.10",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,h=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,f=t.HTMLFormElement,p=t.DOMParser,m=t.trustedTypes,A=c.prototype,v=D(A,"cloneNode"),y=D(A,"nextSibling"),b=D(A,"childNodes"),R=D(A,"parentNode");if("function"===typeof s){var O=o.createElement("template");O.content&&O.content.ownerDocument&&(o=O.content.ownerDocument)}var ie=ne(m,r),oe=ie?ie.createHTML(""):"",ae=o,se=ae.implementation,le=ae.createNodeIterator,ce=ae.createDocumentFragment,ue=ae.getElementsByTagName,de=r.importNode,he={};try{he=L(o).documentMode?o.documentMode:{}}catch(St){}var fe={};n.isSupported="function"===typeof R&&se&&"undefined"!==typeof se.createHTMLDocument&&9!==he;var pe,ge,me=q,Ae=Y,ve=X,ye=K,be=$,_e=J,we=Q,xe=null,Ee=I({},[].concat(i(N),i(F),i(j),i(z),i(U))),Se=null,Ce=I({},[].concat(i(H),i(V),i(G),i(W))),Pe=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Me=null,ke=!0,Re=!0,Oe=!1,Ie=!1,Le=!1,De=!1,Ne=!1,Fe=!1,je=!1,Be=!1,ze=!0,Ze=!0,Ue=!1,He={},Ve=null,Ge=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,qe=I({},["audio","video","img","source","image","track"]),Ye=null,Xe=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",$e="http://www.w3.org/1999/xhtml",Je=$e,et=!1,tt=["application/xhtml+xml","text/html"],nt="text/html",rt=null,it=o.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},at=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=L(t),pe=pe=-1===tt.indexOf(t.PARSER_MEDIA_TYPE)?nt:t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===pe?function(e){return e}:E,xe="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,ge):Ee,Se="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,ge):Ce,Ye="ADD_URI_SAFE_ATTR"in t?I(L(Xe),t.ADD_URI_SAFE_ATTR,ge):Xe,We="ADD_DATA_URI_TAGS"in t?I(L(qe),t.ADD_DATA_URI_TAGS,ge):qe,Ve="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,ge):Ge,Te="FORBID_TAGS"in t?I({},t.FORBID_TAGS,ge):{},Me="FORBID_ATTR"in t?I({},t.FORBID_ATTR,ge):{},He="USE_PROFILES"in t&&t.USE_PROFILES,ke=!1!==t.ALLOW_ARIA_ATTR,Re=!1!==t.ALLOW_DATA_ATTR,Oe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=t.SAFE_FOR_TEMPLATES||!1,Le=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,je=t.RETURN_DOM_FRAGMENT||!1,Be=t.RETURN_TRUSTED_TYPE||!1,Ne=t.FORCE_BODY||!1,ze=!1!==t.SANITIZE_DOM,Ze=!1!==t.KEEP_CONTENT,Ue=t.IN_PLACE||!1,we=t.ALLOWED_URI_REGEXP||we,Je=t.NAMESPACE||$e,t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Pe.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ot(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Pe.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Pe.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Re=!1),je&&(Fe=!0),He&&(xe=I({},i(U)),Se=[],!0===He.html&&(I(xe,N),I(Se,H)),!0===He.svg&&(I(xe,F),I(Se,V),I(Se,W)),!0===He.svgFilters&&(I(xe,j),I(Se,V),I(Se,W)),!0===He.mathMl&&(I(xe,z),I(Se,G),I(Se,W))),t.ADD_TAGS&&(xe===Ee&&(xe=L(xe)),I(xe,t.ADD_TAGS,ge)),t.ADD_ATTR&&(Se===Ce&&(Se=L(Se)),I(Se,t.ADD_ATTR,ge)),t.ADD_URI_SAFE_ATTR&&I(Ye,t.ADD_URI_SAFE_ATTR,ge),t.FORBID_CONTENTS&&(Ve===Ge&&(Ve=L(Ve)),I(Ve,t.FORBID_CONTENTS,ge)),Ze&&(xe["#text"]=!0),Le&&I(xe,["html","head","body"]),xe.table&&(I(xe,["tbody"]),delete Te.tbody),g&&g(t),rt=t)},st=I({},["mi","mo","mn","ms","mtext"]),lt=I({},["foreignobject","desc","title","annotation-xml"]),ct=I({},["title","style","font","a","script"]),ut=I({},F);I(ut,j),I(ut,B);var dt=I({},z);I(dt,Z);var ht=function(e){var t=R(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});var n=E(e.tagName),r=E(t.tagName);return e.namespaceURI===Qe?t.namespaceURI===$e?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===$e?"math"===n:t.namespaceURI===Qe?"math"===n&<[r]:Boolean(dt[n]):e.namespaceURI===$e&&!(t.namespaceURI===Qe&&!lt[r])&&!(t.namespaceURI===Ke&&!st[r])&&!dt[n]&&(ct[n]||!ut[n])},ft=function(e){x(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(St){try{e.outerHTML=oe}catch(St){e.remove()}}},pt=function(e,t){try{x(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(St){x(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Fe||je)try{ft(t)}catch(St){}else try{t.setAttribute(e,"")}catch(St){}},gt=function(e){var t,n;if(Ne)e=""+e;else{var r=S(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===pe&&(e=''+e+"");var i=ie?ie.createHTML(e):e;if(Je===$e)try{t=(new p).parseFromString(i,pe)}catch(St){}if(!t||!t.documentElement){t=se.createDocument(Je,"template",null);try{t.documentElement.innerHTML=et?"":i}catch(St){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Je===$e?ue.call(t,Le?"html":"body")[0]:Le?t.documentElement:a},mt=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},At=function(e){return e instanceof f&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof h)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore)},vt=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},yt=function(e,t,r){fe[e]&&_(fe[e],(function(e){e.call(n,t,r,rt)}))},bt=function(e){var t;if(yt("beforeSanitizeElements",e,null),At(e))return ft(e),!0;if(M(/[\u0080-\uFFFF]/,e.nodeName))return ft(e),!0;var r=ge(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:xe}),e.hasChildNodes()&&!vt(e.firstElementChild)&&(!vt(e.content)||!vt(e.content.firstElementChild))&&M(/<[/\w]/g,e.innerHTML)&&M(/<[/\w]/g,e.textContent))return ft(e),!0;if("select"===r&&M(/