@basemaps/landing 6.33.0 → 6.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/build/__tests__/map.config.test.js +20 -0
- package/build/__tests__/map.config.test.js.map +1 -1
- package/build/attribution.d.ts +3 -0
- package/build/attribution.d.ts.map +1 -1
- package/build/attribution.js +1 -1
- package/build/attribution.js.map +1 -1
- package/build/components/debug.d.ts +15 -19
- package/build/components/debug.d.ts.map +1 -1
- package/build/components/debug.js +65 -181
- package/build/components/debug.js.map +1 -1
- package/build/components/layout.header.js +1 -1
- package/build/components/layout.header.js.map +1 -1
- package/build/config.layer.d.ts +12 -0
- package/build/config.layer.d.ts.map +1 -0
- package/build/config.layer.js +40 -0
- package/build/config.layer.js.map +1 -0
- package/build/config.map.d.ts +2 -1
- package/build/config.map.d.ts.map +1 -1
- package/build/config.map.js +11 -7
- package/build/config.map.js.map +1 -1
- package/build/debug.map.d.ts +21 -0
- package/build/debug.map.d.ts.map +1 -0
- package/build/debug.map.js +179 -0
- package/build/debug.map.js.map +1 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/tile.matrix.d.ts +1 -1
- package/build/tile.matrix.d.ts.map +1 -1
- package/build/tile.matrix.js +3 -15
- package/build/tile.matrix.js.map +1 -1
- package/build/url.d.ts +7 -2
- package/build/url.d.ts.map +1 -1
- package/build/url.js +42 -11
- package/build/url.js.map +1 -1
- package/dist/examples/index.openlayers.attribution.wmts.3857.html +1 -1
- package/dist/{index-6.33.0-467e63869a31f2e1.css → index-6.35.0-467e63869a31f2e1.css} +0 -0
- package/dist/{index-6.33.0-32d4f61662fbd212.js → index-6.35.0-5eab7867ea4ef021.js} +7444 -6861
- package/dist/index-6.35.0-96a7f42b0fdac497.js +567 -0
- package/dist/index.html +2 -2
- package/dist/index.js +35 -35
- package/dist/lib/{attribution-6.33.0-a5dcb359f35150b9.js → attribution-6.35.0-b4a0b401b1a4cc45.js} +1 -1
- package/dist/lib/{attribution-6.33.0-431936fcac8e2647.js → attribution-6.35.0-fc88f809368e4547.js} +5 -1
- package/dist/lib/attribution.js +1 -1
- package/package.json +5 -5
- package/dist/index-6.33.0-58a76ef19edcbfcf.js +0 -567
package/dist/lib/{attribution-6.33.0-a5dcb359f35150b9.js → attribution-6.35.0-b4a0b401b1a4cc45.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Jt=Object.create;var St=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Pt=(u,l)=>()=>(l||u((l={exports:{}}).exports,l),l.exports);var re=(u,l,a,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let v of jt(l))!ee.call(u,v)&&v!==a&&St(u,v,{get:()=>l[v],enumerable:!(c=Kt(l,v))||c.enumerable});return u};var bt=(u,l,a)=>(a=u!=null?Jt(te(u)):{},re(l||!u||!u.__esModule?St(a,"default",{value:u,enumerable:!0}):a,u));var It=Pt((fe,kt)=>{"use strict";kt.exports=rt;rt.polyline=rt;rt.polygon=ne;function rt(u,l,a){var c=u.length,v=X(u[0],l),y=[],w,S,k,O,_;for(a||(a=[]),w=1;w<c;w++){for(S=u[w-1],k=u[w],O=_=X(k,l);;)if(v|O){if(v&O)break;v?(S=ft(S,k,v,l),v=X(S,l)):(k=ft(S,k,O,l),O=X(k,l))}else{y.push(S),O!==_?(y.push(k),w<c-1&&(a.push(y),y=[])):w===c-1&&y.push(k);break}v=_}return y.length&&a.push(y),a}function ne(u,l){var a,c,v,y,w,S,k;for(c=1;c<=8;c*=2){for(a=[],v=u[u.length-1],y=!(X(v,l)&c),w=0;w<u.length;w++)S=u[w],k=!(X(S,l)&c),k!==y&&a.push(ft(v,S,c,l)),k&&a.push(S),v=S,y=k;if(u=a,!u.length)break}return a}function ft(u,l,a,c){return a&8?[u[0]+(l[0]-u[0])*(c[3]-u[1])/(l[1]-u[1]),c[3]]:a&4?[u[0]+(l[0]-u[0])*(c[1]-u[1])/(l[1]-u[1]),c[1]]:a&2?[c[2],u[1]+(l[1]-u[1])*(c[2]-u[0])/(l[0]-u[0])]:a&1?[c[0],u[1]+(l[1]-u[1])*(c[0]-u[0])/(l[0]-u[0])]:null}function X(u,l){var a=0;return u[0]<l[0]?a|=1:u[0]>l[2]&&(a|=2),u[1]<l[1]?a|=4:u[1]>l[3]&&(a|=8),a}});var _t=Pt((at,ht)=>{(function(u,l){typeof at=="object"&&typeof ht<"u"?ht.exports=l():typeof define=="function"&&define.amd?define(l):(u=typeof globalThis<"u"?globalThis:u||self,u.polygonClipping=l())})(at,function(){"use strict";function u(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function l(o,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function a(o,e,t){return e&&l(o.prototype,e),t&&l(o,t),o}var c=function(){function o(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return o}();function v(o,e){return o>e?1:o<e?-1:0}function y(o,e,t){for(var r=new c(null,null),n=r,i=r;;){var s=t(o,e.key);if(s<0){if(e.left===null)break;if(t(o,e.left.key)<0){var f=e.left;if(e.left=f.right,f.right=e,e=f,e.left===null)break}i.left=e,i=e,e=e.left}else if(s>0){if(e.right===null)break;if(t(o,e.right.key)>0){var f=e.right;if(e.right=f.left,f.left=e,e=f,e.right===null)break}n.right=e,n=e,e=e.right}else break}return n.right=e.left,i.left=e.right,e.left=r.right,e.right=r.left,e}function w(o,e,t,r){var n=new c(o,e);if(t===null)return n.left=n.right=null,n;t=y(o,t,r);var i=r(o,t.key);return i<0?(n.left=t.left,n.right=t,t.left=null):i>=0&&(n.right=t.right,n.left=t,t.right=null),n}function S(o,e,t){var r=null,n=null;if(e){e=y(o,e,t);var i=t(e.key,o);i===0?(r=e.left,n=e.right):i<0?(n=e.right,e.right=null,r=e):(r=e.left,e.left=null,n=e)}return{left:r,right:n}}function k(o,e,t){return e===null?o:(o===null||(e=y(o.key,e,t),e.left=o),e)}function O(o,e,t,r,n){if(o){r(""+e+(t?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+n(o)+`
|
|
1
|
+
"use strict";var Jt=Object.create;var St=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Pt=(u,l)=>()=>(l||u((l={exports:{}}).exports,l),l.exports);var re=(u,l,a,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let v of jt(l))!ee.call(u,v)&&v!==a&&St(u,v,{get:()=>l[v],enumerable:!(c=Kt(l,v))||c.enumerable});return u};var bt=(u,l,a)=>(a=u!=null?Jt(te(u)):{},re(l||!u||!u.__esModule?St(a,"default",{value:u,enumerable:!0}):a,u));var It=Pt((fe,kt)=>{"use strict";kt.exports=rt;rt.polyline=rt;rt.polygon=ne;function rt(u,l,a){var c=u.length,v=X(u[0],l),y=[],w,S,k,O,_;for(a||(a=[]),w=1;w<c;w++){for(S=u[w-1],k=u[w],O=_=X(k,l);;)if(v|O){if(v&O)break;v?(S=ft(S,k,v,l),v=X(S,l)):(k=ft(S,k,O,l),O=X(k,l))}else{y.push(S),O!==_?(y.push(k),w<c-1&&(a.push(y),y=[])):w===c-1&&y.push(k);break}v=_}return y.length&&a.push(y),a}function ne(u,l){var a,c,v,y,w,S,k;for(c=1;c<=8;c*=2){for(a=[],v=u[u.length-1],y=!(X(v,l)&c),w=0;w<u.length;w++)S=u[w],k=!(X(S,l)&c),k!==y&&a.push(ft(v,S,c,l)),k&&a.push(S),v=S,y=k;if(u=a,!u.length)break}return a}function ft(u,l,a,c){return a&8?[u[0]+(l[0]-u[0])*(c[3]-u[1])/(l[1]-u[1]),c[3]]:a&4?[u[0]+(l[0]-u[0])*(c[1]-u[1])/(l[1]-u[1]),c[1]]:a&2?[c[2],u[1]+(l[1]-u[1])*(c[2]-u[0])/(l[0]-u[0])]:a&1?[c[0],u[1]+(l[1]-u[1])*(c[0]-u[0])/(l[0]-u[0])]:null}function X(u,l){var a=0;return u[0]<l[0]?a|=1:u[0]>l[2]&&(a|=2),u[1]<l[1]?a|=4:u[1]>l[3]&&(a|=8),a}});var _t=Pt((at,ht)=>{(function(u,l){typeof at=="object"&&typeof ht<"u"?ht.exports=l():typeof define=="function"&&define.amd?define(l):(u=typeof globalThis<"u"?globalThis:u||self,u.polygonClipping=l())})(at,function(){"use strict";function u(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function l(o,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function a(o,e,t){return e&&l(o.prototype,e),t&&l(o,t),o}var c=function(){function o(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return o}();function v(o,e){return o>e?1:o<e?-1:0}function y(o,e,t){for(var r=new c(null,null),n=r,i=r;;){var s=t(o,e.key);if(s<0){if(e.left===null)break;if(t(o,e.left.key)<0){var f=e.left;if(e.left=f.right,f.right=e,e=f,e.left===null)break}i.left=e,i=e,e=e.left}else if(s>0){if(e.right===null)break;if(t(o,e.right.key)>0){var f=e.right;if(e.right=f.left,f.left=e,e=f,e.right===null)break}n.right=e,n=e,e=e.right}else break}return n.right=e.left,i.left=e.right,e.left=r.right,e.right=r.left,e}function w(o,e,t,r){var n=new c(o,e);if(t===null)return n.left=n.right=null,n;t=y(o,t,r);var i=r(o,t.key);return i<0?(n.left=t.left,n.right=t,t.left=null):i>=0&&(n.right=t.right,n.left=t,t.right=null),n}function S(o,e,t){var r=null,n=null;if(e){e=y(o,e,t);var i=t(e.key,o);i===0?(r=e.left,n=e.right):i<0?(n=e.right,e.right=null,r=e):(r=e.left,e.left=null,n=e)}return{left:r,right:n}}function k(o,e,t){return e===null?o:(o===null||(e=y(o.key,e,t),e.left=o),e)}function O(o,e,t,r,n){if(o){r(""+e+(t?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+n(o)+`
|
|
2
2
|
`);var i=e+(t?" ":"\u2502 ");o.left&&O(o.left,i,!1,r,n),o.right&&O(o.right,i,!0,r,n)}}var _=function(){function o(e){e===void 0&&(e=v),this._root=null,this._size=0,this._comparator=e}return o.prototype.insert=function(e,t){return this._size++,this._root=w(e,t,this._root,this._comparator)},o.prototype.add=function(e,t){var r=new c(e,t);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var n=this._comparator,i=y(e,this._root,n),s=n(e,i.key);return s===0?this._root=i:(s<0?(r.left=i.left,r.right=i,i.left=null):s>0&&(r.right=i.right,r.left=i,i.right=null),this._size++,this._root=r),this._root},o.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},o.prototype._remove=function(e,t,r){var n;if(t===null)return null;t=y(e,t,r);var i=r(e,t.key);return i===0?(t.left===null?n=t.right:(n=y(e,t.left,r),n.right=t.right),this._size--,n):t},o.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=y(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},o.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(n===0)return t;n<0?t=t.left:t=t.right}return null},o.prototype.find=function(e){return this._root&&(this._root=y(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},o.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(n===0)return!0;n<0?t=t.left:t=t.right}return!1},o.prototype.forEach=function(e,t){for(var r=this._root,n=[],i=!1;!i;)r!==null?(n.push(r),r=r.left):n.length!==0?(r=n.pop(),e.call(t,r),r=r.right):i=!0;return this},o.prototype.range=function(e,t,r,n){for(var i=[],s=this._comparator,f=this._root,h;i.length!==0||f;)if(f)i.push(f),f=f.left;else{if(f=i.pop(),h=s(f.key,t),h>0)break;if(s(f.key,e)>=0&&r.call(n,f))return this;f=f.right}return this},o.prototype.keys=function(){var e=[];return this.forEach(function(t){var r=t.key;return e.push(r)}),e},o.prototype.values=function(){var e=[];return this.forEach(function(t){var r=t.data;return e.push(r)}),e},o.prototype.min=function(){return this._root?this.minNode(this._root).key:null},o.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},o.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},o.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},o.prototype.at=function(e){for(var t=this._root,r=!1,n=0,i=[];!r;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),n===e)return t;n++,t=t.right}else r=!0;return null},o.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(i===0)break;i<0?(r=t,t=t.left):t=t.right}return r},o.prototype.prev=function(e){var t=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(i===0)break;i<0?t=t.left:(r=t,t=t.right)}return r},o.prototype.clear=function(){return this._root=null,this._size=0,this},o.prototype.toList=function(){return Lt(this._root)},o.prototype.load=function(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=!1);var n=e.length,i=this._comparator;if(r&&it(e,t,0,n-1,i),this._root===null)this._root=j(e,t,0,n),this._size=n;else{var s=Mt(this.toList(),W(e,t),i);n=this._size+n,this._root=nt({head:s},0,n)}return this},o.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(o.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),o.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var t=[];return O(this._root,"",!0,function(r){return t.push(r)},e),t.join("")},o.prototype.update=function(e,t,r){var n=this._comparator,i=S(e,this._root,n),s=i.left,f=i.right;n(e,t)<0?f=w(t,r,f,n):s=w(t,r,s,n),this._root=k(s,f,n)},o.prototype.split=function(e){return S(e,this._root,this._comparator)},o}();function j(o,e,t,r){var n=r-t;if(n>0){var i=t+Math.floor(n/2),s=o[i],f=e[i],h=new c(s,f);return h.left=j(o,e,t,i),h.right=j(o,e,i+1,r),h}return null}function W(o,e){for(var t=new c(null,null),r=t,n=0;n<o.length;n++)r=r.next=new c(o[n],e[n]);return r.next=null,t.next}function Lt(o){for(var e=o,t=[],r=!1,n=new c(null,null),i=n;!r;)e?(t.push(e),e=e.left):t.length>0?(e=i=i.next=t.pop(),e=e.right):r=!0;return i.next=null,n.next}function nt(o,e,t){var r=t-e;if(r>0){var n=e+Math.floor(r/2),i=nt(o,e,n),s=o.head;return s.left=i,o.head=o.head.next,s.right=nt(o,n+1,t),s}return null}function Mt(o,e,t){for(var r=new c(null,null),n=r,i=o,s=e;i!==null&&s!==null;)t(i.key,s.key)<0?(n.next=i,i=i.next):(n.next=s,s=s.next),n=n.next;return i!==null?n.next=i:s!==null&&(n.next=s),r.next}function it(o,e,t,r,n){if(!(t>=r)){for(var i=o[t+r>>1],s=t-1,f=r+1;;){do s++;while(n(o[s],i)<0);do f--;while(n(o[f],i)>0);if(s>=f)break;var h=o[s];o[s]=o[f],o[f]=h,h=e[s],e[s]=e[f],e[f]=h}it(o,e,t,f,n),it(o,e,f+1,r,n)}}var Q=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},ot=function(e,t){if(t.ur.x<e.ll.x||e.ur.x<t.ll.x||t.ur.y<e.ll.y||e.ur.y<t.ll.y)return null;var r=e.ll.x<t.ll.x?t.ll.x:e.ll.x,n=e.ur.x<t.ur.x?e.ur.x:t.ur.x,i=e.ll.y<t.ll.y?t.ll.y:e.ll.y,s=e.ur.y<t.ur.y?e.ur.y:t.ur.y;return{ll:{x:r,y:i},ur:{x:n,y:s}}},T=Number.EPSILON;T===void 0&&(T=Math.pow(2,-52));var Ct=T*T,st=function(e,t){if(-T<e&&e<T&&-T<t&&t<T)return 0;var r=e-t;return r*r<Ct*e*t?0:e<t?-1:1},Nt=function(){function o(){u(this,o),this.reset()}return a(o,[{key:"reset",value:function(){this.xRounder=new vt,this.yRounder=new vt}},{key:"round",value:function(t,r){return{x:this.xRounder.round(t),y:this.yRounder.round(r)}}}]),o}(),vt=function(){function o(){u(this,o),this.tree=new _,this.round(0)}return a(o,[{key:"round",value:function(t){var r=this.tree.add(t),n=this.tree.prev(r);if(n!==null&&st(r.key,n.key)===0)return this.tree.remove(t),n.key;var i=this.tree.next(r);return i!==null&&st(r.key,i.key)===0?(this.tree.remove(t),i.key):t}}]),o}(),Z=new Nt,$=function(e,t){return e.x*t.y-e.y*t.x},pt=function(e,t){return e.x*t.x+e.y*t.y},gt=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y},s=$(n,i);return st(s,0)},tt=function(e){return Math.sqrt(pt(e,e))},Tt=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return $(i,n)/tt(i)/tt(n)},zt=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return pt(i,n)/tt(i)/tt(n)},yt=function(e,t,r){return t.y===0?null:{x:e.x+t.x/t.y*(r-e.y),y:r}},xt=function(e,t,r){return t.x===0?null:{x:r,y:e.y+t.y/t.x*(r-e.x)}},Yt=function(e,t,r,n){if(t.x===0)return xt(r,n,e.x);if(n.x===0)return xt(e,t,r.x);if(t.y===0)return yt(r,n,e.y);if(n.y===0)return yt(e,t,r.y);var i=$(t,n);if(i==0)return null;var s={x:r.x-e.x,y:r.y-e.y},f=$(s,t)/i,h=$(s,n)/i,p=e.x+h*t.x,g=r.x+f*n.x,x=e.y+h*t.y,m=r.y+f*n.y,d=(p+g)/2,P=(x+m)/2;return{x:d,y:P}},C=function(){a(o,null,[{key:"compare",value:function(t,r){var n=o.comparePoints(t.point,r.point);return n!==0?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:et.compare(t.segment,r.segment))}},{key:"comparePoints",value:function(t,r){return t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0}}]);function o(e,t){u(this,o),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}return a(o,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var r=t.point.events,n=0,i=r.length;n<i;n++){var s=r[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,r=0;r<t;r++){var n=this.point.events[r];if(n.segment.consumedBy===void 0)for(var i=r+1;i<t;i++){var s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],r=0,n=this.point.events.length;r<n;r++){var i=this.point.events[r];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}},{key:"getLeftmostComparator",value:function(t){var r=this,n=new Map,i=function(f){var h=f.otherSE;n.set(f,{sine:Tt(r.point,t.point,h.point),cosine:zt(r.point,t.point,h.point)})};return function(s,f){n.has(s)||i(s),n.has(f)||i(f);var h=n.get(s),p=h.sine,g=h.cosine,x=n.get(f),m=x.sine,d=x.cosine;return p>=0&&m>=0?g<d?1:g>d?-1:0:p<0&&m<0?g<d?-1:g>d?1:0:m<p?-1:m>p?1:0}}}]),o}(),Ft=0,et=function(){a(o,null,[{key:"compare",value:function(t,r){var n=t.leftSE.point.x,i=r.leftSE.point.x,s=t.rightSE.point.x,f=r.rightSE.point.x;if(f<n)return 1;if(s<i)return-1;var h=t.leftSE.point.y,p=r.leftSE.point.y,g=t.rightSE.point.y,x=r.rightSE.point.y;if(n<i){if(p<h&&p<g)return 1;if(p>h&&p>g)return-1;var m=t.comparePoint(r.leftSE.point);if(m<0)return 1;if(m>0)return-1;var d=r.comparePoint(t.rightSE.point);return d!==0?d:-1}if(n>i){if(h<p&&h<x)return-1;if(h>p&&h>x)return 1;var P=r.comparePoint(t.leftSE.point);if(P!==0)return P;var E=t.comparePoint(r.rightSE.point);return E<0?1:E>0?-1:1}if(h<p)return-1;if(h>p)return 1;if(s<f){var b=r.comparePoint(t.rightSE.point);if(b!==0)return b}if(s>f){var R=t.comparePoint(r.rightSE.point);if(R<0)return 1;if(R>0)return-1}if(s!==f){var A=g-h,B=s-n,I=x-p,N=f-i;if(A>B&&I<N)return 1;if(A<B&&I>N)return-1}return s>f?1:s<f||g<x?-1:g>x?1:t.id<r.id?-1:t.id>r.id?1:0}}]);function o(e,t,r,n){u(this,o),this.id=++Ft,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=r,this.windings=n}return a(o,[{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,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<r?t:r},ur:{x:this.rightSE.point.x,y:t>r?t:r}}}},{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 r=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(r.x===n.x)return t.x===r.x?0:t.x<r.x?1:-1;var s=(t.y-r.y)/i.y,f=r.x+s*i.x;if(t.x===f)return 0;var h=(t.x-r.x)/i.x,p=r.y+h*i.y;return t.y===p?0:t.y<p?-1:1}},{key:"getIntersection",value:function(t){var r=this.bbox(),n=t.bbox(),i=ot(r,n);if(i===null)return null;var s=this.leftSE.point,f=this.rightSE.point,h=t.leftSE.point,p=t.rightSE.point,g=Q(r,h)&&this.comparePoint(h)===0,x=Q(n,s)&&t.comparePoint(s)===0,m=Q(r,p)&&this.comparePoint(p)===0,d=Q(n,f)&&t.comparePoint(f)===0;if(x&&g)return d&&!m?f:!d&&m?p:null;if(x)return m&&s.x===p.x&&s.y===p.y?null:s;if(g)return d&&f.x===h.x&&f.y===h.y?null:h;if(d&&m)return null;if(d)return f;if(m)return p;var P=Yt(s,this.vector(),h,t.vector());return P===null||!Q(i,P)?null:Z.round(P.x,P.y)}},{key:"split",value:function(t){var r=[],n=t.events!==void 0,i=new C(t,!0),s=new C(t,!1),f=this.rightSE;this.replaceRightSE(s),r.push(s),r.push(i);var h=new o(i,f,this.rings.slice(),this.windings.slice());return C.comparePoints(h.leftSE.point,h.rightSE.point)>0&&h.swapEvents(),C.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),r}},{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 r=0,n=this.windings.length;r<n;r++)this.windings[r]*=-1}},{key:"consume",value:function(t){for(var r=this,n=t;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var i=o.compare(r,n);if(i!==0){if(i>0){var s=r;r=n,n=s}if(r.prev===n){var f=r;r=n,n=f}for(var h=0,p=n.rings.length;h<p;h++){var g=n.rings[h],x=n.windings[h],m=r.rings.indexOf(g);m===-1?(r.rings.push(g),r.windings.push(x)):r.windings[m]+=x}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var r=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys,s=0,f=this.rings.length;s<f;s++){var h=this.rings[s],p=this.windings[s],g=r.indexOf(h);g===-1?(r.push(h),n.push(p)):n[g]+=p}for(var x=[],m=[],d=0,P=r.length;d<P;d++)if(n[d]!==0){var E=r[d],b=E.poly;if(m.indexOf(b)===-1)if(E.isExterior)x.push(b);else{m.indexOf(b)===-1&&m.push(b);var R=x.indexOf(E.poly);R!==-1&&x.splice(R,1)}}for(var A=0,B=x.length;A<B;A++){var I=x[A].multiPoly;i.indexOf(I)===-1&&i.push(I)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var t=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(L.type){case"union":{var n=t.length===0,i=r.length===0;this._isInResult=n!==i;break}case"intersection":{var s,f;t.length<r.length?(s=t.length,f=r.length):(s=r.length,f=t.length),this._isInResult=f===L.numMultiPolys&&s<f;break}case"xor":{var h=Math.abs(t.length-r.length);this._isInResult=h%2===1;break}case"difference":{var p=function(x){return x.length===1&&x[0].isSubject};this._isInResult=p(t)!==p(r);break}default:throw new Error("Unrecognized operation type found ".concat(L.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,r,n){var i,s,f,h=C.comparePoints(t,r);if(h<0)i=t,s=r,f=1;else if(h>0)i=r,s=t,f=-1;else throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));var p=new C(i,!0),g=new C(s,!1);return new o(p,g,[n],[f])}}]),o}(),dt=function(){function o(e,t,r){if(u(this,o),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var n=Z.round(e[0][0],e[0][1]);this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};for(var i=n,s=1,f=e.length;s<f;s++){if(typeof e[s][0]!="number"||typeof e[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var h=Z.round(e[s][0],e[s][1]);h.x===i.x&&h.y===i.y||(this.segments.push(et.fromRing(i,h,this)),h.x<this.bbox.ll.x&&(this.bbox.ll.x=h.x),h.y<this.bbox.ll.y&&(this.bbox.ll.y=h.y),h.x>this.bbox.ur.x&&(this.bbox.ur.x=h.x),h.y>this.bbox.ur.y&&(this.bbox.ur.y=h.y),i=h)}(n.x!==i.x||n.y!==i.y)&&this.segments.push(et.fromRing(i,n,this))}return a(o,[{key:"getSweepEvents",value:function(){for(var t=[],r=0,n=this.segments.length;r<n;r++){var i=this.segments[r];t.push(i.leftSE),t.push(i.rightSE)}return t}}]),o}(),Gt=function(){function o(e,t){if(u(this,o),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new dt(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var r=1,n=e.length;r<n;r++){var i=new dt(e[r],this,!1);i.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=i.bbox.ur.y),this.interiorRings.push(i)}this.multiPoly=t}return a(o,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),r=0,n=this.interiorRings.length;r<n;r++)for(var i=this.interiorRings[r].getSweepEvents(),s=0,f=i.length;s<f;s++)t.push(i[s]);return t}}]),o}(),mt=function(){function o(e,t){if(u(this,o),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var r=0,n=e.length;r<n;r++){var i=new Gt(e[r],this);i.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=i.bbox.ur.y),this.polys.push(i)}this.isSubject=t}return a(o,[{key:"getSweepEvents",value:function(){for(var t=[],r=0,n=this.polys.length;r<n;r++)for(var i=this.polys[r].getSweepEvents(),s=0,f=i.length;s<f;s++)t.push(i[s]);return t}}]),o}(),qt=function(){a(o,null,[{key:"factory",value:function(t){for(var r=[],n=0,i=t.length;n<i;n++){var s=t[n];if(!(!s.isInResult()||s.ringOut)){for(var f=null,h=s.leftSE,p=s.rightSE,g=[h],x=h.point,m=[];f=h,h=p,g.push(h),h.point!==x;)for(;;){var d=h.getAvailableLinkedEvents();if(d.length===0){var P=g[0].point,E=g[g.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(P.x,",")+" ".concat(P.y,"]. Last matching segment found ends at")+" [".concat(E.x,", ").concat(E.y,"]."))}if(d.length===1){p=d[0].otherSE;break}for(var b=null,R=0,A=m.length;R<A;R++)if(m[R].point===h.point){b=R;break}if(b!==null){var B=m.splice(b)[0],I=g.splice(B.index);I.unshift(I[0].otherSE),r.push(new o(I.reverse()));continue}m.push({index:g.length,point:h.point});var N=h.getLeftmostComparator(f);p=d.sort(N)[0].otherSE;break}r.push(new o(g))}}return r}}]);function o(e){u(this,o),this.events=e;for(var t=0,r=e.length;t<r;t++)e[t].segment.ringOut=this;this.poly=null}return a(o,[{key:"getGeom",value:function(){for(var t=this.events[0].point,r=[t],n=1,i=this.events.length-1;n<i;n++){var s=this.events[n].point,f=this.events[n+1].point;gt(s,t,f)!==0&&(r.push(s),t=s)}if(r.length===1)return null;var h=r[0],p=r[1];gt(h,t,p)===0&&r.shift(),r.push(r[0]);for(var g=this.isExteriorRing()?1:-1,x=this.isExteriorRing()?0:r.length-1,m=this.isExteriorRing()?r.length:-1,d=[],P=x;P!=m;P+=g)d.push([r[P].x,r[P].y]);return d}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],r=1,n=this.events.length;r<n;r++){var i=this.events[r];C.compare(t,i)>0&&(t=i)}for(var s=t.segment.prevInResult(),f=s?s.prevInResult():null;;){if(!s)return null;if(!f)return s.ringOut;if(f.ringOut!==s.ringOut)return f.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=f.prevInResult(),f=s?s.prevInResult():null}}}]),o}(),Et=function(){function o(e){u(this,o),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return a(o,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(var r=0,n=this.interiorRings.length;r<n;r++){var i=this.interiorRings[r].getGeom();i!==null&&t.push(i)}return t}}]),o}(),Ut=function(){function o(e){u(this,o),this.rings=e,this.polys=this._composePolys(e)}return a(o,[{key:"getGeom",value:function(){for(var t=[],r=0,n=this.polys.length;r<n;r++){var i=this.polys[r].getGeom();i!==null&&t.push(i)}return t}},{key:"_composePolys",value:function(t){for(var r=[],n=0,i=t.length;n<i;n++){var s=t[n];if(!s.poly)if(s.isExteriorRing())r.push(new Et(s));else{var f=s.enclosingRing();f.poly||r.push(new Et(f)),f.poly.addInterior(s)}}return r}}]),o}(),Wt=function(){function o(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et.compare;u(this,o),this.queue=e,this.tree=new _(t),this.segments=[]}return a(o,[{key:"process",value:function(t){var r=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(r),n;var i=t.isLeft?this.tree.insert(r):this.tree.find(r);if(!i)throw new Error("Unable to find segment #".concat(r.id," ")+"[".concat(r.leftSE.point.x,", ").concat(r.leftSE.point.y,"] -> ")+"[".concat(r.rightSE.point.x,", ").concat(r.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=i,f=i,h=void 0,p=void 0;h===void 0;)s=this.tree.prev(s),s===null?h=null:s.key.consumedBy===void 0&&(h=s.key);for(;p===void 0;)f=this.tree.next(f),f===null?p=null:f.key.consumedBy===void 0&&(p=f.key);if(t.isLeft){var g=null;if(h){var x=h.getIntersection(r);if(x!==null&&(r.isAnEndpoint(x)||(g=x),!h.isAnEndpoint(x)))for(var m=this._splitSafely(h,x),d=0,P=m.length;d<P;d++)n.push(m[d])}var E=null;if(p){var b=p.getIntersection(r);if(b!==null&&(r.isAnEndpoint(b)||(E=b),!p.isAnEndpoint(b)))for(var R=this._splitSafely(p,b),A=0,B=R.length;A<B;A++)n.push(R[A])}if(g!==null||E!==null){var I=null;if(g===null)I=E;else if(E===null)I=g;else{var N=C.comparePoints(g,E);I=N<=0?g:E}this.queue.remove(r.rightSE),n.push(r.rightSE);for(var D=r.split(I),z=0,Y=D.length;z<Y;z++)n.push(D[z])}n.length>0?(this.tree.remove(r),n.push(t)):(this.segments.push(r),r.prev=h)}else{if(h&&p){var M=h.getIntersection(p);if(M!==null){if(!h.isAnEndpoint(M))for(var V=this._splitSafely(h,M),F=0,ut=V.length;F<ut;F++)n.push(V[F]);if(!p.isAnEndpoint(M))for(var H=this._splitSafely(p,M),J=0,lt=H.length;J<lt;J++)n.push(H[J])}}this.tree.remove(r)}return n}},{key:"_splitSafely",value:function(t,r){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var i=t.split(r);return i.push(n),t.consumedBy===void 0&&this.tree.insert(t),i}}]),o}(),wt=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Xt=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Qt=function(){function o(){u(this,o)}return a(o,[{key:"run",value:function(t,r,n){L.type=t,Z.reset();for(var i=[new mt(r,!0)],s=0,f=n.length;s<f;s++)i.push(new mt(n[s],!1));if(L.numMultiPolys=i.length,L.type==="difference")for(var h=i[0],p=1;p<i.length;)ot(i[p].bbox,h.bbox)!==null?p++:i.splice(p,1);if(L.type==="intersection"){for(var g=0,x=i.length;g<x;g++)for(var m=i[g],d=g+1,P=i.length;d<P;d++)if(ot(m.bbox,i[d].bbox)===null)return[]}for(var E=new _(C.compare),b=0,R=i.length;b<R;b++)for(var A=i[b].getSweepEvents(),B=0,I=A.length;B<I;B++)if(E.insert(A[B]),E.size>wt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var N=new Wt(E),D=E.size,z=E.pop();z;){var Y=z.key;if(E.size===D){var M=Y.segment;throw new Error("Unable to pop() ".concat(Y.isLeft?"left":"right"," SweepEvent ")+"[".concat(Y.point.x,", ").concat(Y.point.y,"] from segment #").concat(M.id," ")+"[".concat(M.leftSE.point.x,", ").concat(M.leftSE.point.y,"] -> ")+"[".concat(M.rightSE.point.x,", ").concat(M.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(E.size>wt)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(N.segments.length>Xt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var V=N.process(Y),F=0,ut=V.length;F<ut;F++){var H=V[F];H.consumedBy===void 0&&E.insert(H)}D=E.size,z=E.pop()}Z.reset();var J=qt.factory(N.segments),lt=new Ut(J);return lt.getGeom()}}]),o}(),L=new Qt,Zt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("union",e,r)},$t=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("intersection",e,r)},Dt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("xor",e,r)},Vt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("difference",e,r)},Ht={union:Zt,intersection:$t,xor:Dt,difference:Vt};return Ht})});var ie=bt(It(),1),Rt=bt(_t(),1);var{intersection:At,union:ve}=Rt.default;var K=u=>(u<-360?u=-(-u%360):u>360&&(u=u%360),u<-180?360+u:u>180?u-360:u),G=(u,l)=>{let a=l-u;return a>180?a-360:a<-180?a+360:a},oe=(u,l)=>K(u+(l<u?l+360-u:l-u)),q={boxLonCenter(u){return K(u[0]+.5*(u[2]<u[0]?360+u[2]-u[0]:u[2]-u[0]))},delta:G,crossesAM(u,l){return Math.sign(G(u,l))!==Math.sign(l-u)},normLon:K,normExtent(u){return[K(u[0]),u[1],K(u[2]),u[3]]},union(u,l){if(l==null)return u.slice();let a=q.boxLonCenter(u),c=q.boxLonCenter(l);if(G(a,c)<0)return this.union(l,u);let v=u.slice(),y=oe(a,c);return G(y,l[0])<G(y,u[0])&&(v[0]=l[0]),G(y,l[2])>G(y,u[2])&&(v[2]=l[2]),l[1]<u[1]&&(v[1]=l[1]),l[3]>u[3]&&(v[3]=l[3]),v},intersects(u,l){if(u[1]>l[3]||l[1]>u[3])return!1;let a=u[0],c=l[0],v=a<u[2]?u[2]:u[2]+360,y=c<l[2]?l[2]:l[2]+360;return a<=y&&c<=v||a+360<=y&&c<=v+360||a<=y+360&&c+360<=v},ringToBbox(u){if(u.length<3)throw new Error("Invalid ring");let l=!1,a=u[0],c=a[0],v=a[1],y=c,w=v,S=c;for(let k=1;k<u.length;++k){let O=u[k],_=O[0];q.crossesAM(S,_)&&(l=!l),l&&(_<0?_+=360:(S+=360,k===1&&(c=y=S))),_<c?c=_:_>y&&(y=_);let W=O[1];W<v?v=W:W>w&&(w=W),S=O[0]}return[this.normLon(c),v,this.normLon(y),w]},multiPolygonToBbox(u){let l=null;for(let a of u){if(a.length===0)continue;let c=a[0];if(c.length<3)continue;let v=this.ringToBbox(c);l=l==null?v:this.union(l,v)}if(l==null)throw new Error("Invalid multipolygon");return l},bboxToMultiPolygon(u){let l=[u[0],u[1]],a=[u[2],u[1]],c=[u[0],u[3]],v=[u[2],u[3]];return u[0]<u[2]?[[[l,c,v,a,l]]]:[[[l,c,[180,v[1]],[180,a[1]],l]],[[v,a,[-180,l[1]],[-180,c[1]],v]]]}};function Ot(u){let l=document.createElement("span");return l.textContent=u,l.innerHTML}var ct=class{constructor(l){this.boundaries=[];this.collection=l;let a=l.summaries["linz:zoom"];this.minZoom=a.min,this.maxZoom=a.max,this.bbox=l.extent.spatial.bbox[0]}intersects(l,a){return a>this.maxZoom||a<this.minZoom||!q.intersects(l,this.bbox)?!1:this.intersection(q.bboxToMultiPolygon(l))}intersection(l){for(let a of this.boundaries)if(At(a,l).length>0)return!0;return!1}addBoundary(l){se(l),this.boundaries.push(l)}};function se(u){for(let l of u)for(let a of l)if(a.length!==2)throw new Error("Invalid ring wrong length")}function ue(u){let l=new Map,a=[];for(let c of u.collections){let v=new ct(c);a.push(v),l.set(c.id,v)}for(let c of u.features){let v=l.get(c.collection??"");if(v==null)throw new Error("Could not match feature to collection: "+c.collection);if(c.geometry.type==="Polygon")v.addBoundary(c.geometry.coordinates);else if(c.geometry.type==="MultiPolygon")for(let y of c.geometry.coordinates)v.addBoundary(y)}return a}function Bt(u){let{interval:l}=u.extent.temporal;if(l==null||l.length===0)return[-1,-1];let a=l[0],c=new Date(a[0]).getFullYear(),v=(a.length<2?c:new Date(a[1]).getFullYear())-1;return[c,v<c?c:v]}var U=class{constructor(l){this.attributions=l}static async load(l){let a=await fetch(l);if(a.ok){let c=await a.json();return U.fromStac(c)}throw new Error(`fetch attribution failed [${a.status}] ${a.statusText}`)}static fromStac(l){return new U(ue(l).reverse())}filter(l,a){a=Math.round(a);let c=[],{attributions:v}=this;if(v==null)return c;for(let y of v)this.isIgnored!=null&&this.isIgnored(y)||y.intersects(l,a)&&c.push(y.collection);return c}renderList(l){if(l.length===0)return"";let a=Ot(l[0].title);if(l.length>1)if(l.length===2)a+=` & ${Ot(l[1].title)}`;else{let[c,v]=Bt(l[1]);for(let y=1;y<l.length;++y){let[w,S]=Bt(l[y]);w!==-1&&(c===-1||w<c)&&(c=w),S!==-1&&(v===-1||S>v)&&(v=S)}c===-1&&(c=v),v!==-1&&(a+=` & others ${c}-${v}`)}return a}};window.BasemapsAttribution=U;
|
|
3
3
|
/**
|
|
4
4
|
* splaytree v3.1.0
|
package/dist/lib/{attribution-6.33.0-431936fcac8e2647.js → attribution-6.35.0-fc88f809368e4547.js}
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -15,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
16
|
}
|
|
16
17
|
return to;
|
|
17
18
|
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
19
23
|
|
|
20
24
|
// ../../node_modules/lineclip/index.js
|
|
21
25
|
var require_lineclip = __commonJS({
|
package/dist/lib/attribution.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Jt=Object.create;var St=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Pt=(u,l)=>()=>(l||u((l={exports:{}}).exports,l),l.exports);var re=(u,l,a,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let v of jt(l))!ee.call(u,v)&&v!==a&&St(u,v,{get:()=>l[v],enumerable:!(c=Kt(l,v))||c.enumerable});return u};var bt=(u,l,a)=>(a=u!=null?Jt(te(u)):{},re(l||!u||!u.__esModule?St(a,"default",{value:u,enumerable:!0}):a,u));var It=Pt((fe,kt)=>{"use strict";kt.exports=rt;rt.polyline=rt;rt.polygon=ne;function rt(u,l,a){var c=u.length,v=X(u[0],l),y=[],w,S,k,O,_;for(a||(a=[]),w=1;w<c;w++){for(S=u[w-1],k=u[w],O=_=X(k,l);;)if(v|O){if(v&O)break;v?(S=ft(S,k,v,l),v=X(S,l)):(k=ft(S,k,O,l),O=X(k,l))}else{y.push(S),O!==_?(y.push(k),w<c-1&&(a.push(y),y=[])):w===c-1&&y.push(k);break}v=_}return y.length&&a.push(y),a}function ne(u,l){var a,c,v,y,w,S,k;for(c=1;c<=8;c*=2){for(a=[],v=u[u.length-1],y=!(X(v,l)&c),w=0;w<u.length;w++)S=u[w],k=!(X(S,l)&c),k!==y&&a.push(ft(v,S,c,l)),k&&a.push(S),v=S,y=k;if(u=a,!u.length)break}return a}function ft(u,l,a,c){return a&8?[u[0]+(l[0]-u[0])*(c[3]-u[1])/(l[1]-u[1]),c[3]]:a&4?[u[0]+(l[0]-u[0])*(c[1]-u[1])/(l[1]-u[1]),c[1]]:a&2?[c[2],u[1]+(l[1]-u[1])*(c[2]-u[0])/(l[0]-u[0])]:a&1?[c[0],u[1]+(l[1]-u[1])*(c[0]-u[0])/(l[0]-u[0])]:null}function X(u,l){var a=0;return u[0]<l[0]?a|=1:u[0]>l[2]&&(a|=2),u[1]<l[1]?a|=4:u[1]>l[3]&&(a|=8),a}});var _t=Pt((at,ht)=>{(function(u,l){typeof at=="object"&&typeof ht<"u"?ht.exports=l():typeof define=="function"&&define.amd?define(l):(u=typeof globalThis<"u"?globalThis:u||self,u.polygonClipping=l())})(at,function(){"use strict";function u(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function l(o,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function a(o,e,t){return e&&l(o.prototype,e),t&&l(o,t),o}var c=function(){function o(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return o}();function v(o,e){return o>e?1:o<e?-1:0}function y(o,e,t){for(var r=new c(null,null),n=r,i=r;;){var s=t(o,e.key);if(s<0){if(e.left===null)break;if(t(o,e.left.key)<0){var f=e.left;if(e.left=f.right,f.right=e,e=f,e.left===null)break}i.left=e,i=e,e=e.left}else if(s>0){if(e.right===null)break;if(t(o,e.right.key)>0){var f=e.right;if(e.right=f.left,f.left=e,e=f,e.right===null)break}n.right=e,n=e,e=e.right}else break}return n.right=e.left,i.left=e.right,e.left=r.right,e.right=r.left,e}function w(o,e,t,r){var n=new c(o,e);if(t===null)return n.left=n.right=null,n;t=y(o,t,r);var i=r(o,t.key);return i<0?(n.left=t.left,n.right=t,t.left=null):i>=0&&(n.right=t.right,n.left=t,t.right=null),n}function S(o,e,t){var r=null,n=null;if(e){e=y(o,e,t);var i=t(e.key,o);i===0?(r=e.left,n=e.right):i<0?(n=e.right,e.right=null,r=e):(r=e.left,e.left=null,n=e)}return{left:r,right:n}}function k(o,e,t){return e===null?o:(o===null||(e=y(o.key,e,t),e.left=o),e)}function O(o,e,t,r,n){if(o){r(""+e+(t?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+n(o)+`
|
|
1
|
+
"use strict";var Jt=Object.create;var St=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Pt=(u,l)=>()=>(l||u((l={exports:{}}).exports,l),l.exports);var re=(u,l,a,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let v of jt(l))!ee.call(u,v)&&v!==a&&St(u,v,{get:()=>l[v],enumerable:!(c=Kt(l,v))||c.enumerable});return u};var bt=(u,l,a)=>(a=u!=null?Jt(te(u)):{},re(l||!u||!u.__esModule?St(a,"default",{value:u,enumerable:!0}):a,u));var It=Pt((fe,kt)=>{"use strict";kt.exports=rt;rt.polyline=rt;rt.polygon=ne;function rt(u,l,a){var c=u.length,v=X(u[0],l),y=[],w,S,k,O,_;for(a||(a=[]),w=1;w<c;w++){for(S=u[w-1],k=u[w],O=_=X(k,l);;)if(v|O){if(v&O)break;v?(S=ft(S,k,v,l),v=X(S,l)):(k=ft(S,k,O,l),O=X(k,l))}else{y.push(S),O!==_?(y.push(k),w<c-1&&(a.push(y),y=[])):w===c-1&&y.push(k);break}v=_}return y.length&&a.push(y),a}function ne(u,l){var a,c,v,y,w,S,k;for(c=1;c<=8;c*=2){for(a=[],v=u[u.length-1],y=!(X(v,l)&c),w=0;w<u.length;w++)S=u[w],k=!(X(S,l)&c),k!==y&&a.push(ft(v,S,c,l)),k&&a.push(S),v=S,y=k;if(u=a,!u.length)break}return a}function ft(u,l,a,c){return a&8?[u[0]+(l[0]-u[0])*(c[3]-u[1])/(l[1]-u[1]),c[3]]:a&4?[u[0]+(l[0]-u[0])*(c[1]-u[1])/(l[1]-u[1]),c[1]]:a&2?[c[2],u[1]+(l[1]-u[1])*(c[2]-u[0])/(l[0]-u[0])]:a&1?[c[0],u[1]+(l[1]-u[1])*(c[0]-u[0])/(l[0]-u[0])]:null}function X(u,l){var a=0;return u[0]<l[0]?a|=1:u[0]>l[2]&&(a|=2),u[1]<l[1]?a|=4:u[1]>l[3]&&(a|=8),a}});var _t=Pt((at,ht)=>{(function(u,l){typeof at=="object"&&typeof ht<"u"?ht.exports=l():typeof define=="function"&&define.amd?define(l):(u=typeof globalThis<"u"?globalThis:u||self,u.polygonClipping=l())})(at,function(){"use strict";function u(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function l(o,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function a(o,e,t){return e&&l(o.prototype,e),t&&l(o,t),o}var c=function(){function o(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return o}();function v(o,e){return o>e?1:o<e?-1:0}function y(o,e,t){for(var r=new c(null,null),n=r,i=r;;){var s=t(o,e.key);if(s<0){if(e.left===null)break;if(t(o,e.left.key)<0){var f=e.left;if(e.left=f.right,f.right=e,e=f,e.left===null)break}i.left=e,i=e,e=e.left}else if(s>0){if(e.right===null)break;if(t(o,e.right.key)>0){var f=e.right;if(e.right=f.left,f.left=e,e=f,e.right===null)break}n.right=e,n=e,e=e.right}else break}return n.right=e.left,i.left=e.right,e.left=r.right,e.right=r.left,e}function w(o,e,t,r){var n=new c(o,e);if(t===null)return n.left=n.right=null,n;t=y(o,t,r);var i=r(o,t.key);return i<0?(n.left=t.left,n.right=t,t.left=null):i>=0&&(n.right=t.right,n.left=t,t.right=null),n}function S(o,e,t){var r=null,n=null;if(e){e=y(o,e,t);var i=t(e.key,o);i===0?(r=e.left,n=e.right):i<0?(n=e.right,e.right=null,r=e):(r=e.left,e.left=null,n=e)}return{left:r,right:n}}function k(o,e,t){return e===null?o:(o===null||(e=y(o.key,e,t),e.left=o),e)}function O(o,e,t,r,n){if(o){r(""+e+(t?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+n(o)+`
|
|
2
2
|
`);var i=e+(t?" ":"\u2502 ");o.left&&O(o.left,i,!1,r,n),o.right&&O(o.right,i,!0,r,n)}}var _=function(){function o(e){e===void 0&&(e=v),this._root=null,this._size=0,this._comparator=e}return o.prototype.insert=function(e,t){return this._size++,this._root=w(e,t,this._root,this._comparator)},o.prototype.add=function(e,t){var r=new c(e,t);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var n=this._comparator,i=y(e,this._root,n),s=n(e,i.key);return s===0?this._root=i:(s<0?(r.left=i.left,r.right=i,i.left=null):s>0&&(r.right=i.right,r.left=i,i.right=null),this._size++,this._root=r),this._root},o.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},o.prototype._remove=function(e,t,r){var n;if(t===null)return null;t=y(e,t,r);var i=r(e,t.key);return i===0?(t.left===null?n=t.right:(n=y(e,t.left,r),n.right=t.right),this._size--,n):t},o.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=y(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},o.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(n===0)return t;n<0?t=t.left:t=t.right}return null},o.prototype.find=function(e){return this._root&&(this._root=y(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},o.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(n===0)return!0;n<0?t=t.left:t=t.right}return!1},o.prototype.forEach=function(e,t){for(var r=this._root,n=[],i=!1;!i;)r!==null?(n.push(r),r=r.left):n.length!==0?(r=n.pop(),e.call(t,r),r=r.right):i=!0;return this},o.prototype.range=function(e,t,r,n){for(var i=[],s=this._comparator,f=this._root,h;i.length!==0||f;)if(f)i.push(f),f=f.left;else{if(f=i.pop(),h=s(f.key,t),h>0)break;if(s(f.key,e)>=0&&r.call(n,f))return this;f=f.right}return this},o.prototype.keys=function(){var e=[];return this.forEach(function(t){var r=t.key;return e.push(r)}),e},o.prototype.values=function(){var e=[];return this.forEach(function(t){var r=t.data;return e.push(r)}),e},o.prototype.min=function(){return this._root?this.minNode(this._root).key:null},o.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},o.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},o.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},o.prototype.at=function(e){for(var t=this._root,r=!1,n=0,i=[];!r;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),n===e)return t;n++,t=t.right}else r=!0;return null},o.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(i===0)break;i<0?(r=t,t=t.left):t=t.right}return r},o.prototype.prev=function(e){var t=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(i===0)break;i<0?t=t.left:(r=t,t=t.right)}return r},o.prototype.clear=function(){return this._root=null,this._size=0,this},o.prototype.toList=function(){return Lt(this._root)},o.prototype.load=function(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=!1);var n=e.length,i=this._comparator;if(r&&it(e,t,0,n-1,i),this._root===null)this._root=j(e,t,0,n),this._size=n;else{var s=Mt(this.toList(),W(e,t),i);n=this._size+n,this._root=nt({head:s},0,n)}return this},o.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(o.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),o.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var t=[];return O(this._root,"",!0,function(r){return t.push(r)},e),t.join("")},o.prototype.update=function(e,t,r){var n=this._comparator,i=S(e,this._root,n),s=i.left,f=i.right;n(e,t)<0?f=w(t,r,f,n):s=w(t,r,s,n),this._root=k(s,f,n)},o.prototype.split=function(e){return S(e,this._root,this._comparator)},o}();function j(o,e,t,r){var n=r-t;if(n>0){var i=t+Math.floor(n/2),s=o[i],f=e[i],h=new c(s,f);return h.left=j(o,e,t,i),h.right=j(o,e,i+1,r),h}return null}function W(o,e){for(var t=new c(null,null),r=t,n=0;n<o.length;n++)r=r.next=new c(o[n],e[n]);return r.next=null,t.next}function Lt(o){for(var e=o,t=[],r=!1,n=new c(null,null),i=n;!r;)e?(t.push(e),e=e.left):t.length>0?(e=i=i.next=t.pop(),e=e.right):r=!0;return i.next=null,n.next}function nt(o,e,t){var r=t-e;if(r>0){var n=e+Math.floor(r/2),i=nt(o,e,n),s=o.head;return s.left=i,o.head=o.head.next,s.right=nt(o,n+1,t),s}return null}function Mt(o,e,t){for(var r=new c(null,null),n=r,i=o,s=e;i!==null&&s!==null;)t(i.key,s.key)<0?(n.next=i,i=i.next):(n.next=s,s=s.next),n=n.next;return i!==null?n.next=i:s!==null&&(n.next=s),r.next}function it(o,e,t,r,n){if(!(t>=r)){for(var i=o[t+r>>1],s=t-1,f=r+1;;){do s++;while(n(o[s],i)<0);do f--;while(n(o[f],i)>0);if(s>=f)break;var h=o[s];o[s]=o[f],o[f]=h,h=e[s],e[s]=e[f],e[f]=h}it(o,e,t,f,n),it(o,e,f+1,r,n)}}var Q=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},ot=function(e,t){if(t.ur.x<e.ll.x||e.ur.x<t.ll.x||t.ur.y<e.ll.y||e.ur.y<t.ll.y)return null;var r=e.ll.x<t.ll.x?t.ll.x:e.ll.x,n=e.ur.x<t.ur.x?e.ur.x:t.ur.x,i=e.ll.y<t.ll.y?t.ll.y:e.ll.y,s=e.ur.y<t.ur.y?e.ur.y:t.ur.y;return{ll:{x:r,y:i},ur:{x:n,y:s}}},T=Number.EPSILON;T===void 0&&(T=Math.pow(2,-52));var Ct=T*T,st=function(e,t){if(-T<e&&e<T&&-T<t&&t<T)return 0;var r=e-t;return r*r<Ct*e*t?0:e<t?-1:1},Nt=function(){function o(){u(this,o),this.reset()}return a(o,[{key:"reset",value:function(){this.xRounder=new vt,this.yRounder=new vt}},{key:"round",value:function(t,r){return{x:this.xRounder.round(t),y:this.yRounder.round(r)}}}]),o}(),vt=function(){function o(){u(this,o),this.tree=new _,this.round(0)}return a(o,[{key:"round",value:function(t){var r=this.tree.add(t),n=this.tree.prev(r);if(n!==null&&st(r.key,n.key)===0)return this.tree.remove(t),n.key;var i=this.tree.next(r);return i!==null&&st(r.key,i.key)===0?(this.tree.remove(t),i.key):t}}]),o}(),Z=new Nt,$=function(e,t){return e.x*t.y-e.y*t.x},pt=function(e,t){return e.x*t.x+e.y*t.y},gt=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y},s=$(n,i);return st(s,0)},tt=function(e){return Math.sqrt(pt(e,e))},Tt=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return $(i,n)/tt(i)/tt(n)},zt=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return pt(i,n)/tt(i)/tt(n)},yt=function(e,t,r){return t.y===0?null:{x:e.x+t.x/t.y*(r-e.y),y:r}},xt=function(e,t,r){return t.x===0?null:{x:r,y:e.y+t.y/t.x*(r-e.x)}},Yt=function(e,t,r,n){if(t.x===0)return xt(r,n,e.x);if(n.x===0)return xt(e,t,r.x);if(t.y===0)return yt(r,n,e.y);if(n.y===0)return yt(e,t,r.y);var i=$(t,n);if(i==0)return null;var s={x:r.x-e.x,y:r.y-e.y},f=$(s,t)/i,h=$(s,n)/i,p=e.x+h*t.x,g=r.x+f*n.x,x=e.y+h*t.y,m=r.y+f*n.y,d=(p+g)/2,P=(x+m)/2;return{x:d,y:P}},C=function(){a(o,null,[{key:"compare",value:function(t,r){var n=o.comparePoints(t.point,r.point);return n!==0?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:et.compare(t.segment,r.segment))}},{key:"comparePoints",value:function(t,r){return t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0}}]);function o(e,t){u(this,o),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}return a(o,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var r=t.point.events,n=0,i=r.length;n<i;n++){var s=r[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,r=0;r<t;r++){var n=this.point.events[r];if(n.segment.consumedBy===void 0)for(var i=r+1;i<t;i++){var s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],r=0,n=this.point.events.length;r<n;r++){var i=this.point.events[r];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}},{key:"getLeftmostComparator",value:function(t){var r=this,n=new Map,i=function(f){var h=f.otherSE;n.set(f,{sine:Tt(r.point,t.point,h.point),cosine:zt(r.point,t.point,h.point)})};return function(s,f){n.has(s)||i(s),n.has(f)||i(f);var h=n.get(s),p=h.sine,g=h.cosine,x=n.get(f),m=x.sine,d=x.cosine;return p>=0&&m>=0?g<d?1:g>d?-1:0:p<0&&m<0?g<d?-1:g>d?1:0:m<p?-1:m>p?1:0}}}]),o}(),Ft=0,et=function(){a(o,null,[{key:"compare",value:function(t,r){var n=t.leftSE.point.x,i=r.leftSE.point.x,s=t.rightSE.point.x,f=r.rightSE.point.x;if(f<n)return 1;if(s<i)return-1;var h=t.leftSE.point.y,p=r.leftSE.point.y,g=t.rightSE.point.y,x=r.rightSE.point.y;if(n<i){if(p<h&&p<g)return 1;if(p>h&&p>g)return-1;var m=t.comparePoint(r.leftSE.point);if(m<0)return 1;if(m>0)return-1;var d=r.comparePoint(t.rightSE.point);return d!==0?d:-1}if(n>i){if(h<p&&h<x)return-1;if(h>p&&h>x)return 1;var P=r.comparePoint(t.leftSE.point);if(P!==0)return P;var E=t.comparePoint(r.rightSE.point);return E<0?1:E>0?-1:1}if(h<p)return-1;if(h>p)return 1;if(s<f){var b=r.comparePoint(t.rightSE.point);if(b!==0)return b}if(s>f){var R=t.comparePoint(r.rightSE.point);if(R<0)return 1;if(R>0)return-1}if(s!==f){var A=g-h,B=s-n,I=x-p,N=f-i;if(A>B&&I<N)return 1;if(A<B&&I>N)return-1}return s>f?1:s<f||g<x?-1:g>x?1:t.id<r.id?-1:t.id>r.id?1:0}}]);function o(e,t,r,n){u(this,o),this.id=++Ft,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=r,this.windings=n}return a(o,[{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,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<r?t:r},ur:{x:this.rightSE.point.x,y:t>r?t:r}}}},{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 r=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(r.x===n.x)return t.x===r.x?0:t.x<r.x?1:-1;var s=(t.y-r.y)/i.y,f=r.x+s*i.x;if(t.x===f)return 0;var h=(t.x-r.x)/i.x,p=r.y+h*i.y;return t.y===p?0:t.y<p?-1:1}},{key:"getIntersection",value:function(t){var r=this.bbox(),n=t.bbox(),i=ot(r,n);if(i===null)return null;var s=this.leftSE.point,f=this.rightSE.point,h=t.leftSE.point,p=t.rightSE.point,g=Q(r,h)&&this.comparePoint(h)===0,x=Q(n,s)&&t.comparePoint(s)===0,m=Q(r,p)&&this.comparePoint(p)===0,d=Q(n,f)&&t.comparePoint(f)===0;if(x&&g)return d&&!m?f:!d&&m?p:null;if(x)return m&&s.x===p.x&&s.y===p.y?null:s;if(g)return d&&f.x===h.x&&f.y===h.y?null:h;if(d&&m)return null;if(d)return f;if(m)return p;var P=Yt(s,this.vector(),h,t.vector());return P===null||!Q(i,P)?null:Z.round(P.x,P.y)}},{key:"split",value:function(t){var r=[],n=t.events!==void 0,i=new C(t,!0),s=new C(t,!1),f=this.rightSE;this.replaceRightSE(s),r.push(s),r.push(i);var h=new o(i,f,this.rings.slice(),this.windings.slice());return C.comparePoints(h.leftSE.point,h.rightSE.point)>0&&h.swapEvents(),C.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),r}},{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 r=0,n=this.windings.length;r<n;r++)this.windings[r]*=-1}},{key:"consume",value:function(t){for(var r=this,n=t;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var i=o.compare(r,n);if(i!==0){if(i>0){var s=r;r=n,n=s}if(r.prev===n){var f=r;r=n,n=f}for(var h=0,p=n.rings.length;h<p;h++){var g=n.rings[h],x=n.windings[h],m=r.rings.indexOf(g);m===-1?(r.rings.push(g),r.windings.push(x)):r.windings[m]+=x}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var r=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys,s=0,f=this.rings.length;s<f;s++){var h=this.rings[s],p=this.windings[s],g=r.indexOf(h);g===-1?(r.push(h),n.push(p)):n[g]+=p}for(var x=[],m=[],d=0,P=r.length;d<P;d++)if(n[d]!==0){var E=r[d],b=E.poly;if(m.indexOf(b)===-1)if(E.isExterior)x.push(b);else{m.indexOf(b)===-1&&m.push(b);var R=x.indexOf(E.poly);R!==-1&&x.splice(R,1)}}for(var A=0,B=x.length;A<B;A++){var I=x[A].multiPoly;i.indexOf(I)===-1&&i.push(I)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var t=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(L.type){case"union":{var n=t.length===0,i=r.length===0;this._isInResult=n!==i;break}case"intersection":{var s,f;t.length<r.length?(s=t.length,f=r.length):(s=r.length,f=t.length),this._isInResult=f===L.numMultiPolys&&s<f;break}case"xor":{var h=Math.abs(t.length-r.length);this._isInResult=h%2===1;break}case"difference":{var p=function(x){return x.length===1&&x[0].isSubject};this._isInResult=p(t)!==p(r);break}default:throw new Error("Unrecognized operation type found ".concat(L.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,r,n){var i,s,f,h=C.comparePoints(t,r);if(h<0)i=t,s=r,f=1;else if(h>0)i=r,s=t,f=-1;else throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));var p=new C(i,!0),g=new C(s,!1);return new o(p,g,[n],[f])}}]),o}(),dt=function(){function o(e,t,r){if(u(this,o),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var n=Z.round(e[0][0],e[0][1]);this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};for(var i=n,s=1,f=e.length;s<f;s++){if(typeof e[s][0]!="number"||typeof e[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var h=Z.round(e[s][0],e[s][1]);h.x===i.x&&h.y===i.y||(this.segments.push(et.fromRing(i,h,this)),h.x<this.bbox.ll.x&&(this.bbox.ll.x=h.x),h.y<this.bbox.ll.y&&(this.bbox.ll.y=h.y),h.x>this.bbox.ur.x&&(this.bbox.ur.x=h.x),h.y>this.bbox.ur.y&&(this.bbox.ur.y=h.y),i=h)}(n.x!==i.x||n.y!==i.y)&&this.segments.push(et.fromRing(i,n,this))}return a(o,[{key:"getSweepEvents",value:function(){for(var t=[],r=0,n=this.segments.length;r<n;r++){var i=this.segments[r];t.push(i.leftSE),t.push(i.rightSE)}return t}}]),o}(),Gt=function(){function o(e,t){if(u(this,o),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new dt(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var r=1,n=e.length;r<n;r++){var i=new dt(e[r],this,!1);i.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=i.bbox.ur.y),this.interiorRings.push(i)}this.multiPoly=t}return a(o,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),r=0,n=this.interiorRings.length;r<n;r++)for(var i=this.interiorRings[r].getSweepEvents(),s=0,f=i.length;s<f;s++)t.push(i[s]);return t}}]),o}(),mt=function(){function o(e,t){if(u(this,o),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var r=0,n=e.length;r<n;r++){var i=new Gt(e[r],this);i.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=i.bbox.ll.x),i.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=i.bbox.ll.y),i.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=i.bbox.ur.x),i.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=i.bbox.ur.y),this.polys.push(i)}this.isSubject=t}return a(o,[{key:"getSweepEvents",value:function(){for(var t=[],r=0,n=this.polys.length;r<n;r++)for(var i=this.polys[r].getSweepEvents(),s=0,f=i.length;s<f;s++)t.push(i[s]);return t}}]),o}(),qt=function(){a(o,null,[{key:"factory",value:function(t){for(var r=[],n=0,i=t.length;n<i;n++){var s=t[n];if(!(!s.isInResult()||s.ringOut)){for(var f=null,h=s.leftSE,p=s.rightSE,g=[h],x=h.point,m=[];f=h,h=p,g.push(h),h.point!==x;)for(;;){var d=h.getAvailableLinkedEvents();if(d.length===0){var P=g[0].point,E=g[g.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(P.x,",")+" ".concat(P.y,"]. Last matching segment found ends at")+" [".concat(E.x,", ").concat(E.y,"]."))}if(d.length===1){p=d[0].otherSE;break}for(var b=null,R=0,A=m.length;R<A;R++)if(m[R].point===h.point){b=R;break}if(b!==null){var B=m.splice(b)[0],I=g.splice(B.index);I.unshift(I[0].otherSE),r.push(new o(I.reverse()));continue}m.push({index:g.length,point:h.point});var N=h.getLeftmostComparator(f);p=d.sort(N)[0].otherSE;break}r.push(new o(g))}}return r}}]);function o(e){u(this,o),this.events=e;for(var t=0,r=e.length;t<r;t++)e[t].segment.ringOut=this;this.poly=null}return a(o,[{key:"getGeom",value:function(){for(var t=this.events[0].point,r=[t],n=1,i=this.events.length-1;n<i;n++){var s=this.events[n].point,f=this.events[n+1].point;gt(s,t,f)!==0&&(r.push(s),t=s)}if(r.length===1)return null;var h=r[0],p=r[1];gt(h,t,p)===0&&r.shift(),r.push(r[0]);for(var g=this.isExteriorRing()?1:-1,x=this.isExteriorRing()?0:r.length-1,m=this.isExteriorRing()?r.length:-1,d=[],P=x;P!=m;P+=g)d.push([r[P].x,r[P].y]);return d}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],r=1,n=this.events.length;r<n;r++){var i=this.events[r];C.compare(t,i)>0&&(t=i)}for(var s=t.segment.prevInResult(),f=s?s.prevInResult():null;;){if(!s)return null;if(!f)return s.ringOut;if(f.ringOut!==s.ringOut)return f.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=f.prevInResult(),f=s?s.prevInResult():null}}}]),o}(),Et=function(){function o(e){u(this,o),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return a(o,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(var r=0,n=this.interiorRings.length;r<n;r++){var i=this.interiorRings[r].getGeom();i!==null&&t.push(i)}return t}}]),o}(),Ut=function(){function o(e){u(this,o),this.rings=e,this.polys=this._composePolys(e)}return a(o,[{key:"getGeom",value:function(){for(var t=[],r=0,n=this.polys.length;r<n;r++){var i=this.polys[r].getGeom();i!==null&&t.push(i)}return t}},{key:"_composePolys",value:function(t){for(var r=[],n=0,i=t.length;n<i;n++){var s=t[n];if(!s.poly)if(s.isExteriorRing())r.push(new Et(s));else{var f=s.enclosingRing();f.poly||r.push(new Et(f)),f.poly.addInterior(s)}}return r}}]),o}(),Wt=function(){function o(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et.compare;u(this,o),this.queue=e,this.tree=new _(t),this.segments=[]}return a(o,[{key:"process",value:function(t){var r=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(r),n;var i=t.isLeft?this.tree.insert(r):this.tree.find(r);if(!i)throw new Error("Unable to find segment #".concat(r.id," ")+"[".concat(r.leftSE.point.x,", ").concat(r.leftSE.point.y,"] -> ")+"[".concat(r.rightSE.point.x,", ").concat(r.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=i,f=i,h=void 0,p=void 0;h===void 0;)s=this.tree.prev(s),s===null?h=null:s.key.consumedBy===void 0&&(h=s.key);for(;p===void 0;)f=this.tree.next(f),f===null?p=null:f.key.consumedBy===void 0&&(p=f.key);if(t.isLeft){var g=null;if(h){var x=h.getIntersection(r);if(x!==null&&(r.isAnEndpoint(x)||(g=x),!h.isAnEndpoint(x)))for(var m=this._splitSafely(h,x),d=0,P=m.length;d<P;d++)n.push(m[d])}var E=null;if(p){var b=p.getIntersection(r);if(b!==null&&(r.isAnEndpoint(b)||(E=b),!p.isAnEndpoint(b)))for(var R=this._splitSafely(p,b),A=0,B=R.length;A<B;A++)n.push(R[A])}if(g!==null||E!==null){var I=null;if(g===null)I=E;else if(E===null)I=g;else{var N=C.comparePoints(g,E);I=N<=0?g:E}this.queue.remove(r.rightSE),n.push(r.rightSE);for(var D=r.split(I),z=0,Y=D.length;z<Y;z++)n.push(D[z])}n.length>0?(this.tree.remove(r),n.push(t)):(this.segments.push(r),r.prev=h)}else{if(h&&p){var M=h.getIntersection(p);if(M!==null){if(!h.isAnEndpoint(M))for(var V=this._splitSafely(h,M),F=0,ut=V.length;F<ut;F++)n.push(V[F]);if(!p.isAnEndpoint(M))for(var H=this._splitSafely(p,M),J=0,lt=H.length;J<lt;J++)n.push(H[J])}}this.tree.remove(r)}return n}},{key:"_splitSafely",value:function(t,r){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var i=t.split(r);return i.push(n),t.consumedBy===void 0&&this.tree.insert(t),i}}]),o}(),wt=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Xt=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Qt=function(){function o(){u(this,o)}return a(o,[{key:"run",value:function(t,r,n){L.type=t,Z.reset();for(var i=[new mt(r,!0)],s=0,f=n.length;s<f;s++)i.push(new mt(n[s],!1));if(L.numMultiPolys=i.length,L.type==="difference")for(var h=i[0],p=1;p<i.length;)ot(i[p].bbox,h.bbox)!==null?p++:i.splice(p,1);if(L.type==="intersection"){for(var g=0,x=i.length;g<x;g++)for(var m=i[g],d=g+1,P=i.length;d<P;d++)if(ot(m.bbox,i[d].bbox)===null)return[]}for(var E=new _(C.compare),b=0,R=i.length;b<R;b++)for(var A=i[b].getSweepEvents(),B=0,I=A.length;B<I;B++)if(E.insert(A[B]),E.size>wt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var N=new Wt(E),D=E.size,z=E.pop();z;){var Y=z.key;if(E.size===D){var M=Y.segment;throw new Error("Unable to pop() ".concat(Y.isLeft?"left":"right"," SweepEvent ")+"[".concat(Y.point.x,", ").concat(Y.point.y,"] from segment #").concat(M.id," ")+"[".concat(M.leftSE.point.x,", ").concat(M.leftSE.point.y,"] -> ")+"[".concat(M.rightSE.point.x,", ").concat(M.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(E.size>wt)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(N.segments.length>Xt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var V=N.process(Y),F=0,ut=V.length;F<ut;F++){var H=V[F];H.consumedBy===void 0&&E.insert(H)}D=E.size,z=E.pop()}Z.reset();var J=qt.factory(N.segments),lt=new Ut(J);return lt.getGeom()}}]),o}(),L=new Qt,Zt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("union",e,r)},$t=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("intersection",e,r)},Dt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("xor",e,r)},Vt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return L.run("difference",e,r)},Ht={union:Zt,intersection:$t,xor:Dt,difference:Vt};return Ht})});var ie=bt(It(),1),Rt=bt(_t(),1);var{intersection:At,union:ve}=Rt.default;var K=u=>(u<-360?u=-(-u%360):u>360&&(u=u%360),u<-180?360+u:u>180?u-360:u),G=(u,l)=>{let a=l-u;return a>180?a-360:a<-180?a+360:a},oe=(u,l)=>K(u+(l<u?l+360-u:l-u)),q={boxLonCenter(u){return K(u[0]+.5*(u[2]<u[0]?360+u[2]-u[0]:u[2]-u[0]))},delta:G,crossesAM(u,l){return Math.sign(G(u,l))!==Math.sign(l-u)},normLon:K,normExtent(u){return[K(u[0]),u[1],K(u[2]),u[3]]},union(u,l){if(l==null)return u.slice();let a=q.boxLonCenter(u),c=q.boxLonCenter(l);if(G(a,c)<0)return this.union(l,u);let v=u.slice(),y=oe(a,c);return G(y,l[0])<G(y,u[0])&&(v[0]=l[0]),G(y,l[2])>G(y,u[2])&&(v[2]=l[2]),l[1]<u[1]&&(v[1]=l[1]),l[3]>u[3]&&(v[3]=l[3]),v},intersects(u,l){if(u[1]>l[3]||l[1]>u[3])return!1;let a=u[0],c=l[0],v=a<u[2]?u[2]:u[2]+360,y=c<l[2]?l[2]:l[2]+360;return a<=y&&c<=v||a+360<=y&&c<=v+360||a<=y+360&&c+360<=v},ringToBbox(u){if(u.length<3)throw new Error("Invalid ring");let l=!1,a=u[0],c=a[0],v=a[1],y=c,w=v,S=c;for(let k=1;k<u.length;++k){let O=u[k],_=O[0];q.crossesAM(S,_)&&(l=!l),l&&(_<0?_+=360:(S+=360,k===1&&(c=y=S))),_<c?c=_:_>y&&(y=_);let W=O[1];W<v?v=W:W>w&&(w=W),S=O[0]}return[this.normLon(c),v,this.normLon(y),w]},multiPolygonToBbox(u){let l=null;for(let a of u){if(a.length===0)continue;let c=a[0];if(c.length<3)continue;let v=this.ringToBbox(c);l=l==null?v:this.union(l,v)}if(l==null)throw new Error("Invalid multipolygon");return l},bboxToMultiPolygon(u){let l=[u[0],u[1]],a=[u[2],u[1]],c=[u[0],u[3]],v=[u[2],u[3]];return u[0]<u[2]?[[[l,c,v,a,l]]]:[[[l,c,[180,v[1]],[180,a[1]],l]],[[v,a,[-180,l[1]],[-180,c[1]],v]]]}};function Ot(u){let l=document.createElement("span");return l.textContent=u,l.innerHTML}var ct=class{constructor(l){this.boundaries=[];this.collection=l;let a=l.summaries["linz:zoom"];this.minZoom=a.min,this.maxZoom=a.max,this.bbox=l.extent.spatial.bbox[0]}intersects(l,a){return a>this.maxZoom||a<this.minZoom||!q.intersects(l,this.bbox)?!1:this.intersection(q.bboxToMultiPolygon(l))}intersection(l){for(let a of this.boundaries)if(At(a,l).length>0)return!0;return!1}addBoundary(l){se(l),this.boundaries.push(l)}};function se(u){for(let l of u)for(let a of l)if(a.length!==2)throw new Error("Invalid ring wrong length")}function ue(u){let l=new Map,a=[];for(let c of u.collections){let v=new ct(c);a.push(v),l.set(c.id,v)}for(let c of u.features){let v=l.get(c.collection??"");if(v==null)throw new Error("Could not match feature to collection: "+c.collection);if(c.geometry.type==="Polygon")v.addBoundary(c.geometry.coordinates);else if(c.geometry.type==="MultiPolygon")for(let y of c.geometry.coordinates)v.addBoundary(y)}return a}function Bt(u){let{interval:l}=u.extent.temporal;if(l==null||l.length===0)return[-1,-1];let a=l[0],c=new Date(a[0]).getFullYear(),v=(a.length<2?c:new Date(a[1]).getFullYear())-1;return[c,v<c?c:v]}var U=class{constructor(l){this.attributions=l}static async load(l){let a=await fetch(l);if(a.ok){let c=await a.json();return U.fromStac(c)}throw new Error(`fetch attribution failed [${a.status}] ${a.statusText}`)}static fromStac(l){return new U(ue(l).reverse())}filter(l,a){a=Math.round(a);let c=[],{attributions:v}=this;if(v==null)return c;for(let y of v)this.isIgnored!=null&&this.isIgnored(y)||y.intersects(l,a)&&c.push(y.collection);return c}renderList(l){if(l.length===0)return"";let a=Ot(l[0].title);if(l.length>1)if(l.length===2)a+=` & ${Ot(l[1].title)}`;else{let[c,v]=Bt(l[1]);for(let y=1;y<l.length;++y){let[w,S]=Bt(l[y]);w!==-1&&(c===-1||w<c)&&(c=w),S!==-1&&(v===-1||S>v)&&(v=S)}c===-1&&(c=v),v!==-1&&(a+=` & others ${c}-${v}`)}return a}};window.BasemapsAttribution=U;
|
|
3
3
|
/**
|
|
4
4
|
* splaytree v3.1.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/landing",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.35.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@basemaps/attribution": "^6.32.1",
|
|
32
|
+
"@basemaps/config": "^6.35.0",
|
|
32
33
|
"@basemaps/geo": "^6.32.1",
|
|
33
|
-
"@basemaps/infra": "^6.
|
|
34
|
-
"@basemaps/shared": "^6.
|
|
34
|
+
"@basemaps/infra": "^6.35.0",
|
|
35
|
+
"@basemaps/shared": "^6.35.0",
|
|
35
36
|
"@linzjs/lui": "^10.11.3",
|
|
36
37
|
"@servie/events": "^3.0.0",
|
|
37
|
-
"@types/geojson": "^7946.0.7",
|
|
38
38
|
"@types/proj4": "^2.5.2",
|
|
39
39
|
"maplibre-gl": "^2.1.9",
|
|
40
40
|
"mime-types": "^2.1.35",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
],
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "dcebd7149ab318ea979b5d1ba34a9f82fc41b935"
|
|
105
105
|
}
|