dicom-microscopy-viewer-changed
Version:
Interactive web-based viewer for DICOM Microscopy Images
2 lines • 626 kB
JavaScript
/*! For license information please see common.js.LICENSE.txt */
(()=>{var t,e={946:t=>{function e(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}t.exports=e,e.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},e.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},e.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},e.prototype.solveCurveX=function(t,e){var i,r,o,n,a;for(void 0===e&&(e=1e-6),o=t,a=0;a<8;a++){if(n=this.sampleCurveX(o)-t,Math.abs(n)<e)return o;var s=this.sampleCurveDerivativeX(o);if(Math.abs(s)<1e-6)break;o-=n/s}if((o=t)<(i=0))return i;if(o>(r=1))return r;for(;i<r;){if(n=this.sampleCurveX(o),Math.abs(n-t)<e)return o;t>n?i=o:r=o,o=.5*(r-i)+i}return o},e.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},2872:(t,e)=>{var i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function o(t){return t<0?0:t>1?1:t}function n(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?o(parseFloat(t)/100):o(parseFloat(t))}function s(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.G=function(t){var e,o=t.replace(/ /g,"").toLowerCase();if(o in i)return i[o].slice();if("#"===o[0])return 4===o.length?(e=parseInt(o.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===o.length&&(e=parseInt(o.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=o.indexOf("("),u=o.indexOf(")");if(-1!==l&&u+1===o.length){var h=o.substr(0,l),c=o.substr(l+1,u-(l+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=a(c.pop());case"rgb":return 3!==c.length?null:[n(c[0]),n(c[1]),n(c[2]),p];case"hsla":if(4!==c.length)return null;p=a(c.pop());case"hsl":if(3!==c.length)return null;var d=(parseFloat(c[0])%360+360)%360/360,f=a(c[1]),g=a(c[2]),y=g<=.5?g*(f+1):g+f-g*f,m=2*g-y;return[r(255*s(m,y,d+1/3)),r(255*s(m,y,d)),r(255*s(m,y,d-1/3)),p];default:return null}}return null}}catch(t){}},2977:(t,e)=>{e.read=function(t,e,i,r,o){var n,a,s=8*o-r-1,l=(1<<s)-1,u=l>>1,h=-7,c=i?o-1:0,p=i?-1:1,d=t[e+c];for(c+=p,n=d&(1<<-h)-1,d>>=-h,h+=s;h>0;n=256*n+t[e+c],c+=p,h-=8);for(a=n&(1<<-h)-1,n>>=-h,h+=r;h>0;a=256*a+t[e+c],c+=p,h-=8);if(0===n)n=1-u;else{if(n===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),n-=u}return(d?-1:1)*a*Math.pow(2,n-r)},e.write=function(t,e,i,r,o,n){var a,s,l,u=8*n-o-1,h=(1<<u)-1,c=h>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:n-1,f=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+c>=1?p/l:p*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(e*l-1)*Math.pow(2,o),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[i+d]=255&s,d+=f,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[i+d]=255&a,d+=f,a/=256,u-=8);t[i+d-f]|=128*g}},3523:t=>{var e={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},i=" ",r=/(italic|oblique)$/i,o={};t.exports=function(t,n,a){var s=o[t];if(!s){Array.isArray(t)||(t=[t]);for(var l=400,u="normal",h=[],c=0,p=t.length;c<p;++c){var d=t[c].split(" "),f=d[d.length-1].toLowerCase();for(var g in"normal"==f||"italic"==f||"oblique"==f?(u=f,d.pop(),f=d[d.length-1].toLowerCase()):r.test(f)&&(f=f.replace(r,""),u=d[d.length-1].replace(f,"")),e){var y=d.length>1?d[d.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||y+"-"+f==g){l=e[g],d.pop(),y&&g.startsWith(y)&&d.pop();break}}"number"==typeof f&&(l=f);var m=d.join(i).replace("Klokantech Noto Sans","Noto Sans");-1!==m.indexOf(i)&&(m='"'+m+'"'),h.push(m)}s=o[t]=[u,l,h]}return s[0]+i+s[1]+i+n+"px"+(a?"/"+a:"")+i+s[2]}},1619:t=>{t.exports=function t(i,r){if(!i){var o=new e(r);throw Error.captureStackTrace&&Error.captureStackTrace(o,t),o}};var e=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}(Error);e.prototype.name="AssertionError"},6303:(t,e,i)=>{"use strict";t.exports=o;var r=i(2977);function o(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}o.Varint=0,o.Fixed64=1,o.Bytes=2,o.Fixed32=5;var n=4294967296,a=1/n,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===o.Bytes?t.readVarint()+t.pos:t.pos+1}function u(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function h(t,e,i){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(r);for(var o=i.pos-1;o>=t;o--)i.buf[o+r]=i.buf[o]}function c(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function p(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function d(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function f(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function g(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function y(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function m(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function v(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function _(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function b(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}o.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),o=r>>3,n=this.pos;this.type=7&r,t(o,e,this),this.pos===n&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+x(this.buf,this.pos+4)*n;return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+w(this.buf,this.pos+4)*n;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,r=this.buf;return e=127&(i=r[this.pos++]),i<128?e:(e|=(127&(i=r[this.pos++]))<<7,i<128?e:(e|=(127&(i=r[this.pos++]))<<14,i<128?e:(e|=(127&(i=r[this.pos++]))<<21,i<128?e:function(t,e,i){var r,o,n=i.buf;if(r=(112&(o=n[i.pos++]))>>4,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<3,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<10,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<17,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<24,o<128)return u(t,r,e);if(r|=(1&(o=n[i.pos++]))<<31,o<128)return u(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,i){return s.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){for(var r="",o=e;o<i;){var n,a,s,l=t[o],u=null,h=l>239?4:l>223?3:l>191?2:1;if(o+h>i)break;1===h?l<128&&(u=l):2===h?128==(192&(n=t[o+1]))&&(u=(31&l)<<6|63&n)<=127&&(u=null):3===h?(n=t[o+1],a=t[o+2],128==(192&n)&&128==(192&a)&&((u=(15&l)<<12|(63&n)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===h&&(n=t[o+1],a=t[o+2],s=t[o+3],128==(192&n)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&n)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,h=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),o+=h}return r}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==o.Bytes)return t.push(this.readVarint(e));var i=l(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==o.Bytes)return t.push(this.readSVarint());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==o.Bytes)return t.push(this.readBoolean());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==o.Bytes)return t.push(this.readFloat());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==o.Bytes)return t.push(this.readDouble());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==o.Bytes)return t.push(this.readFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==o.Bytes)return t.push(this.readSFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==o.Bytes)return t.push(this.readFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==o.Bytes)return t.push(this.readSFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===o.Varint)for(;this.buf[this.pos++]>127;);else if(e===o.Bytes)this.pos=this.readVarint()+this.pos;else if(e===o.Fixed32)this.pos+=4;else{if(e!==o.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,r;if(t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var r,o,n=0;n<e.length;n++){if((r=e.charCodeAt(n))>55295&&r<57344){if(!o){r>56319||n+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):o=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,o=r;continue}r=o-55296<<10|r-56320|65536,o=null}else o&&(t[i++]=239,t[i++]=191,t[i++]=189,o=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&h(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);var r=this.pos-i;r>=128&&h(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,i){this.writeTag(t,o.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,o.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,o.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,o.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,o.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,o.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,o.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,o.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,o.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,o.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,o.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},1019:function(t){t.exports=function(){"use strict";function t(t,r,o,n,a){!function t(i,r,o,n,a){for(;n>o;){if(n-o>600){var s=n-o+1,l=r-o+1,u=Math.log(s),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(s-h)/s)*(l-s/2<0?-1:1);t(i,r,Math.max(o,Math.floor(r-l*h/s+c)),Math.min(n,Math.floor(r+(s-l)*h/s+c)),a)}var p=i[r],d=o,f=n;for(e(i,o,r),a(i[n],p)>0&&e(i,o,n);d<f;){for(e(i,d,f),d++,f--;a(i[d],p)<0;)d++;for(;a(i[f],p)>0;)f--}0===a(i[o],p)?e(i,o,f):e(i,++f,n),f<=r&&(o=f+1),r<=f&&(n=f-1)}}(t,r,o||0,n||t.length-1,a||i)}function e(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function i(t,e){return t<e?-1:t>e?1:0}var r=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 o(t,e,i){if(!i)return e.indexOf(t);for(var r=0;r<e.length;r++)if(i(t,e[r]))return r;return-1}function n(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,r,o){o||(o=f(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var n=e;n<i;n++){var a=t.children[n];s(o,t.leaf?r(a):a)}return o}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,i,r,o,n){for(var a=[i,r];a.length;)if(!((r=a.pop())-(i=a.pop())<=o)){var s=i+Math.ceil((r-i)/o/2)*o;t(e,s,i,r,n),a.push(i,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,i=[];if(!d(t,e))return i;for(var r=this.toBBox,o=[];e;){for(var n=0;n<e.children.length;n++){var a=e.children[n],s=e.leaf?r(a):a;d(t,s)&&(e.leaf?i.push(a):p(t,s)?this._all(a,i):o.push(a))}e=o.pop()}return i},r.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var i=[];e;){for(var r=0;r<e.children.length;r++){var o=e.children[r],n=e.leaf?this.toBBox(o):o;if(d(t,n)){if(e.leaf||p(t,n))return!0;i.push(o)}}e=i.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=f([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var i,r,n,a=this.data,s=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],i=u.pop(),n=!0),a.leaf){var h=o(t,a.children,e);if(-1!==h)return a.children.splice(h,1),l.push(a),this._condense(l),this}n||a.leaf||!p(a,s)?r?(i++,a=r.children[i],n=!1):a=null:(l.push(a),u.push(i),i=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,e){return t.minX-e.minX},r.prototype.compareMinY=function(t,e){return t.minY-e.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},r.prototype._build=function(t,e,i,r){var o,a=i-e+1,s=this._maxEntries;if(a<=s)return n(o=f(t.slice(e,i+1)),this.toBBox),o;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(o=f([])).leaf=!1,o.height=r;var l=Math.ceil(a/s),u=l*Math.ceil(Math.sqrt(s));g(t,e,i,u,this.compareMinX);for(var h=e;h<=i;h+=u){var c=Math.min(h+u-1,i);g(t,h,c,l,this.compareMinY);for(var p=h;p<=c;p+=l){var d=Math.min(p+l-1,c);o.children.push(this._build(t,p,d,r-1))}}return n(o,this.toBBox),o},r.prototype._chooseSubtree=function(t,e,i,r){for(;r.push(e),!e.leaf&&r.length-1!==i;){for(var o=1/0,n=1/0,a=void 0,s=0;s<e.children.length;s++){var l=e.children[s],u=h(l),c=(p=t,d=l,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-u);c<n?(n=c,o=u<o?u:o,a=l):c===n&&u<o&&(o=u,a=l)}e=a||e.children[0]}var p,d;return e},r.prototype._insert=function(t,e,i){var r=i?t:this.toBBox(t),o=[],n=this._chooseSubtree(r,this.data,e,o);for(n.children.push(t),s(n,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},r.prototype._split=function(t,e){var i=t[e],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);var a=this._chooseSplitIndex(i,o,r),s=f(i.children.splice(a,i.children.length-a));s.height=i.height,s.leaf=i.leaf,n(i,this.toBBox),n(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)},r.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,i){for(var r,o,n,s,l,u,c,p=1/0,d=1/0,f=e;f<=i-e;f++){var g=a(t,0,f,this.toBBox),y=a(t,f,i,this.toBBox),m=(o=g,n=y,void 0,void 0,void 0,void 0,s=Math.max(o.minX,n.minX),l=Math.max(o.minY,n.minY),u=Math.min(o.maxX,n.maxX),c=Math.min(o.maxY,n.maxY),Math.max(0,u-s)*Math.max(0,c-l)),v=h(g)+h(y);m<p?(p=m,r=f,d=v<d?v:d):m===p&&v<d&&(d=v,r=f)}return r||i-e},r.prototype._chooseSplitAxis=function(t,e,i){var r=t.leaf?this.compareMinX:l,o=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,r)<this._allDistMargin(t,e,i,o)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,i,r){t.children.sort(r);for(var o=this.toBBox,n=a(t,0,e,o),l=a(t,i-e,i,o),u=c(n)+c(l),h=e;h<i-e;h++){var p=t.children[h];s(n,t.leaf?o(p):p),u+=c(n)}for(var d=i-e-1;d>=e;d--){var f=t.children[d];s(l,t.leaf?o(f):f),u+=c(l)}return u},r.prototype._adjustParentBBoxes=function(t,e,i){for(var r=i;r>=0;r--)s(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():n(t[e],this.toBBox)},r}()},9789:()=>{},8238:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};const o=function(t){function e(e){var i=r[e];t.call(this,i),this.code=e,this.name="AssertionError",this.message=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error)},2021:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var r=i(8238),o=i(3698),n=i(6387),a=i(464),s="length",l=function(t){function e(e,i,r){t.call(this,e),this.element=i,this.index=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a.ZP);const u=function(t){function e(e,i){if(t.call(this),this.on,this.once,this.un,i=i||{},this.unique_=!!i.unique,this.array_=e||[],this.unique_)for(var r=0,o=this.array_.length;r<o;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,r=e.length;i<r;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(s)},e.prototype.insertAt=function(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new l(n.Z.ADD,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,r=e.length;i<r;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){if(!(t<0||t>=this.getLength())){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new l(n.Z.REMOVE,e,t)),e}},e.prototype.setAt=function(t,e){if(t>=this.getLength())this.insertAt(t,e);else{if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new l(n.Z.REMOVE,i,t)),this.dispatchEvent(new l(n.Z.ADD,e,t))}},e.prototype.updateLength_=function(){this.set(s,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,o=this.array_.length;i<o;++i)if(this.array_[i]===t&&i!==e)throw new r.Z(58)},e}(o.Z)},6387:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={ADD:"add",REMOVE:"remove"}},9665:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=function(){this.disposed=!1};r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){};const o=r},4789:(t,e,i)=>{"use strict";i.d(e,{K:()=>a});var r=i(3805),o=i(6845),n=i(4413);function a(t,e,i){var a=t,s=!0,l=!1,u=!1,h=[(0,n.Vx)(a,r.Z.LOAD,(function(){u=!0,l||e()}))];return a.src&&o.Tp?(l=!0,a.decode().then((function(){s&&e()})).catch((function(t){s&&(u?e():i())}))):h.push((0,n.Vx)(a,r.Z.ERROR,i)),function(){s=!1,h.forEach(n.bN)}}},5483:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},5525:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(2177),o=i(8034),n=i(1451),a=i(4789);const s=function(t){function e(e,i,r,o,n,a){t.call(this,e,i,a),this.crossOrigin_=o,this.src_=r,this.key=r,this.image_=new Image,null!==o&&(this.image_.crossOrigin=o),this.unlisten_=null,this.tileLoadFunction_=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=o.Z.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=o.Z.ERROR,this.unlistenImage_(),this.image_=((t=(0,n.E4)(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=o.Z.LOADED:this.state=o.Z.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==o.Z.ERROR&&(this.state=o.Z.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==o.Z.IDLE&&(this.state=o.Z.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,a.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(r.Z)},9778:(t,e,i)=>{"use strict";i.d(e,{Z:()=>Ht});var r=i(3698),o=i(2021),n=i(6387),a=i(9665),s=i(10),l=i(2922),u=i(4671),h=i(6406),c=i(8746),p=i(5663),d=i(7483),f=function(t){function e(e){t.call(this),this.map_=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){(0,l.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;(0,u.qC)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,u.nb)(r,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o,n,a,s){var l,u=e.viewState;function c(t,e,i,r){return o.call(n,e,t?i:null,r)}var f=u.projection,g=(0,d.Cf)(t.slice(),f),y=[[0,0]];if(f.canWrapX()&&r){var m=f.getExtent(),v=(0,h.dz)(m);y.push([-v,0],[v,0])}for(var _=e.layerStatesArray,x=_.length,b=[],w=[],C=0;C<y.length;C++)for(var S=x-1;S>=0;--S){var T=_[S],E=T.layer;if(E.hasRenderer()&&(0,p.j)(T,u)&&a.call(s,E)){var R=E.getRenderer(),k=E.getSource();if(R&&k){var I=k.getWrapX()?g:t,O=c.bind(null,T.managed);w[0]=I[0]+y[C][0],w[1]=I[1]+y[C][1],l=R.forEachFeatureAtCoordinate(w,e,i,O,b)}if(l)return l}}if(0!==b.length){var M=1/b.length;return b.forEach((function(t,e){return t.distanceSq+=e*M})),b.sort((function(t,e){return t.distanceSq-e.distanceSq})),b.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.hasFeatureAtCoordinate=function(t,e,i,r,o,n){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,r,s.uX,this,o,n)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,l.O3)()},e.prototype.scheduleExpireIconCache=function(t){c.c.canExpireCache()&&t.postRenderFunctions.push(g)},e}(a.Z);function g(t,e){c.c.expire()}const y=f;var m=i(46),v=i(4295),_=i(8330),x=i(6215),b=i(944),w=i(4413),C=i(1451),S=function(t){function e(e){t.call(this,e),this.fontChangeListenerKey_=(0,w.oL)(b.sG,m.Z.PROPERTYCHANGE,e.redrawText.bind(e)),this.element_=document.createElement("div");var i=this.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",this.element_.className=x.XV+" ol-layers";var r=e.getViewport();r.insertBefore(this.element_,r.firstChild||null),this.children_=[],this.renderedVisible_=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var r=new v.Z(t,void 0,e);i.dispatchEvent(r)}},e.prototype.disposeInternal=function(){(0,w.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(_.Z.PRECOMPOSE,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;for(var r=[],o=null,n=0,a=e.length;n<a;++n){var s=e[n];t.layerIndex=n;var l=s.layer,u=l.getSourceState();if(!(0,p.j)(s,i)||"ready"!=u&&"undefined"!=u)l.unrender();else{var h=l.render(t,o);h&&(h!==o&&(this.children_.push(h),o=h),"getDeclutter"in l&&r.push(l))}}for(var c=r.length-1;c>=0;--c)r[c].renderDeclutter(t);(0,C.hF)(this.element_,this.children_),this.dispatchRenderEvent(_.Z.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e}(y);const T=S;var E=i(3805),R=i(4311),k=i(464),I=function(t){function e(e,i,r){t.call(this,e),this.map=i,this.frameState=void 0!==r?r:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k.ZP);const O=I;var M=function(t){function e(e,i,r,o,n,a){t.call(this,e,i,n),this.originalEvent=r,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==o&&o,this.activePointers=a}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={pixel:{configurable:!0},coordinate:{configurable:!0}};return i.pixel.get=function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},i.pixel.set=function(t){this.pixel_=t},i.coordinate.get=function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},i.coordinate.set=function(t){this.coordinate_=t},e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},Object.defineProperties(e.prototype,i),e}(O);const P=M,j={SINGLECLICK:"singleclick",CLICK:E.Z.CLICK,DBLCLICK:E.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},A="pointerdown";var L=i(8197),F=i(6845),Z=function(t){function e(e,i){t.call(this,e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===i?1:i,this.down_=null;var r=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=r,this.pointerdownListenerKey_=(0,w.oL)(r,A,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=(0,w.oL)(r,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(E.Z.TOUCHMOVE,this.boundHandleTouchMove_,!!F.bM&&{passive:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.emulateClick_=function(t){var e=this,i=new P(j.CLICK,this.map_,t);this.dispatchEvent(i),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,i=new P(j.DBLCLICK,this.map_,t),this.dispatchEvent(i)):this.clickTimeoutId_=setTimeout((function(){e.clickTimeoutId_=void 0;var i=new P(j.SINGLECLICK,e.map_,t);e.dispatchEvent(i)}),250)},e.prototype.updateActivePointers_=function(t){var e=t,i=e.pointerId;if(e.type==j.POINTERUP||e.type==j.POINTERCANCEL){for(var r in delete this.trackedTouches_[i],this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else e.type!=j.POINTERDOWN&&e.type!=j.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new P(j.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(w.bN),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);var e=new P(j.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,w.oL)(i,j.POINTERMOVE,this.handlePointerMove_,this),(0,w.oL)(i,j.POINTERUP,this.handlePointerUp_,this),(0,w.oL)(this.element_,j.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push((0,w.oL)(this.element_.getRootNode(),j.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var e=new P(j.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}},e.prototype.relayMoveEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new P(j.POINTERMOVE,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&((0,w.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(E.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,w.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(w.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(L.Z);const D=Z,z="postrender",N="loadstart",G="loadend",q="layergroup",W="size",U="target",X="view";var Y=i(7845),V=i(5495),B=i(4293),K=i(8691);const H=function(t){function e(e){t.call(this);var i=e.element;!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),this.element=i||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){(0,C.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,C.ZF)(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)(0,w.bN)(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==s.Zn&&this.listenerKeys.push((0,w.oL)(t,z,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(r.Z);var J=i(9675);const $=function(t){function e(e){e=e||{},t.call(this,{element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===e.collapsed||e.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==e.collapsible,this.collapsible_=void 0===e.collapsible||e.collapsible,this.collapsible_||(this.collapsed_=!1);var i=void 0!==e.className?e.className:"ol-attribution",r=void 0!==e.tipLabel?e.tipLabel:"Attributions",o=void 0!==e.expandClassName?e.expandClassName:i+"-expand",n=void 0!==e.collapseLabel?e.collapseLabel:"›",a=void 0!==e.collapseClassName?e.collapseClassName:i+"-collapse";"string"==typeof n?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=n,this.collapseLabel_.className=a):this.collapseLabel_=n;var s=void 0!==e.label?e.label:"i";"string"==typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s,this.label_.className=o):this.label_=s;var l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=r,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(E.Z.CLICK,this.handleClick_.bind(this),!1);var u=i+" "+x.XV+" "+x.hg+(this.collapsed_&&this.collapsible_?" "+x.hN:"")+(this.collapsible_?"":" ol-uncollapsible"),h=this.element;h.className=u,h.appendChild(this.toggleButton_),h.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.collectSourceAttributions_=function(t){var e=Array.from(new Set(this.getMap().getAllLayers().flatMap((function(e){return e.getAttributions(t)})))),i=!this.getMap().getAllLayers().some((function(t){return t.getSource()&&!1===t.getSource().getAttributionsCollapsible()}));return this.overrideCollapsible_||this.setCollapsible(i),e},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,J.fS)(e,this.renderedAttributions_)){(0,C.ep)(this.ulElement_);for(var r=0,o=e.length;r<o;++r){var n=document.createElement("li");n.innerHTML=e[r],this.ulElement_.appendChild(n)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(x.hN),this.collapsed_?(0,C.$H)(this.collapseLabel_,this.label_):(0,C.$H)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(H);var Q=i(8326),tt=function(t){function e(e){e=e||{},t.call(this,{element:document.createElement("div"),render:e.render,target:e.target});var i=void 0!==e.className?e.className:"ol-rotate",r=void 0!==e.label?e.label:"⇧",o=void 0!==e.compassClassName?e.compassClassName:"ol-compass";this.label_=null,"string"==typeof r?(this.label_=document.createElement("span"),this.label_.className=o,this.label_.textContent=r):(this.label_=r,this.label_.classList.add(o));var n=e.tipLabel?e.tipLabel:"Reset rotation",a=document.createElement("button");a.className=i+"-reset",a.setAttribute("type","button"),a.title=n,a.appendChild(this.label_),a.addEventListener(E.Z.CLICK,this.handleClick_.bind(this),!1);var s=i+" "+x.XV+" "+x.hg,l=this.element;l.className=s,l.appendChild(a),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=void 0!==e.duration?e.duration:250,this.autoHide_=void 0===e.autoHide||e.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(x.oj)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:Q.Vv}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var r="rotate("+i+"rad)";if(this.autoHide_){var o=this.element.classList.contains(x.oj);o||0!==i?o&&0!==i&&this.element.classList.remove(x.oj):this.element.classList.add(x.oj)}this.label_.style.transform=r}this.rotation_=i}},e}(H);const et=tt;const it=function(t){function e(e){e=e||{},t.call(this,{element:document.createElement("div"),target:e.target});var i=void 0!==e.className?e.className:"ol-zoom",r=void 0!==e.delta?e.delta:1,o=void 0!==e.zoomInClassName?e.zoomInClassName:i+"-in",n=void 0!==e.zoomOutClassName?e.zoomOutClassName:i+"-out",a=void 0!==e.zoomInLabel?e.zoomInLabel:"+",s=void 0!==e.zoomOutLabel?e.zoomOutLabel:"–",l=void 0!==e.zoomInTipLabel?e.zoomInTipLabel:"Zoom in",u=void 0!==e.zoomOutTipLabel?e.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=o,h.setAttribute("type","button"),h.title=l,h.appendChild("string"==typeof a?document.createTextNode(a):a),h.addEventListener(E.Z.CLICK,this.handleClick_.bind(this,r),!1);var c=document.createElement("button");c.className=n,c.setAttribute("type","button"),c.title=u,c.appendChild("string"==typeof s?document.createTextNode(s):s),c.addEventListener(E.Z.CLICK,this.handleClick_.bind(this,-r),!1);var p=i+" "+x.XV+" "+x.hg,d=this.element;d.className=p,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==e.duration?e.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var r=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:r,duration:this.duration_,easing:Q.Vv})):e.setZoom(r)}}},e}(H),rt="active";function ot(t,e,i,r){var o=t.getZoom();if(void 0!==o){var n=t.getConstrainedZoom(o+e),a=t.getResolutionForZoom(n);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==r?r:250,easing:Q.Vv})}}const nt=function(t){function e(e){t.call(this),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getActive=function(){return this.get(rt)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){re