@maplat/ui 0.10.4 → 0.10.6

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.
Files changed (38) hide show
  1. package/LICENSE +223 -223
  2. package/README.md +91 -91
  3. package/dist/assets/locales/en/translation.json +64 -64
  4. package/dist/assets/locales/ja/translation.json +64 -64
  5. package/dist/assets/locales/ko/translation.json +65 -65
  6. package/dist/assets/locales/zh/translation.json +65 -65
  7. package/dist/assets/locales/zh-TW/translation.json +65 -65
  8. package/dist/assets/maplat.css +2 -2
  9. package/dist/assets/maplat.css.map +1 -1
  10. package/dist/assets/maplat.js +1 -1
  11. package/dist/assets/maplat.js.LICENSE.txt +1 -1
  12. package/dist/assets/maplat.js.map +1 -1
  13. package/dist/index.html +125 -37
  14. package/dist/service-worker.js +1 -1
  15. package/dist/service-worker.js.LICENSE.txt +1 -1
  16. package/dist/service-worker.js.map +1 -1
  17. package/legacy/bootstrap-native.js +1934 -1934
  18. package/legacy/detect-element-resize.js +153 -153
  19. package/legacy/iziToast.js +1301 -1301
  20. package/legacy/page.js +1153 -1153
  21. package/legacy/qrcode.js +616 -616
  22. package/less/bootstrap.less +7010 -7010
  23. package/less/font-awesome.less +30 -30
  24. package/less/font-face.less +10 -10
  25. package/less/font-face_packed.less +11 -11
  26. package/less/iziToast.less +1732 -1732
  27. package/less/maplat-specific.less +652 -652
  28. package/less/ui.less +11 -11
  29. package/less/ui_packed.less +10 -10
  30. package/locales/en/translation.json +64 -64
  31. package/locales/ja/translation.json +64 -64
  32. package/locales/ko/translation.json +65 -65
  33. package/locales/zh/translation.json +65 -65
  34. package/locales/zh-TW/translation.json +65 -65
  35. package/package.json +106 -105
  36. package/src/index.js +31 -7
  37. package/src/maplat_control.js +25 -7
  38. package/src/service-worker.js +1 -1
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see maplat.js.LICENSE.txt */
2
- (()=>{var t={5432:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});n(9346);function r(t,e,n){if(null!==t)for(var i,o,s,a,l,c,u,h,p=0,f=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;y<m;y++){l=(h=!!(u=g?t.features[y].geometry:v?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var _=0;_<l;_++){var b=0,w=0;if(null!==(a=h?u.geometries[_]:u)){c=a.coordinates;var x=a.type;switch(p=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":e(c,f,y,b,w),f++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++)e(c[i],f,y,b,w),f++,"MultiPoint"===x&&b++;"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(o=0;o<c[i].length-p;o++)e(c[i][o],f,y,b,w),f++;"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for("MultiPolygon"===x&&(w=0),o=0;o<c[i].length;o++){for(s=0;s<c[i][o].length-p;s++)e(c[i][o][s],f,y,b,w),f++;w++}b++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)r(a.geometries[i],e,n);break;default:throw new Error("Unknown Geometry Type")}}}}}const i=function(t){var e=[1/0,1/0,-1/0,-1/0];return r(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}},9346:(t,e,n)=>{"use strict";n.d(e,{Tu:()=>s,uf:()=>a,xm:()=>i,yu:()=>o});function r(t,e,n){if(!c(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&u(r),i&&h(i);var o={type:"Feature"};return i&&(o.id=i),r&&(o.bbox=r),o.properties=e||{},o.geometry=t,o}function i(t,e,n){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!l(t[0])||!l(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function o(t,e,n){if(!t)throw new Error("coordinates is required");for(var i=0;i<t.length;i++){var o=t[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++){if(0===i&&0===s&&!l(o[0][0])||!l(o[0][1]))throw new Error("coordinates must contain numbers");if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}}return r({type:"Polygon",coordinates:t},e,n)}function s(t,e,n){if(!t)throw new Error("coordinates is required");if(t.length<2)throw new Error("coordinates must be an array of two or more positions");if(!l(t[0][1])||!l(t[0][1]))throw new Error("coordinates must contain numbers");return r({type:"LineString",coordinates:t},e,n)}function a(t,e){if(!c(e=e||{}))throw new Error("options is invalid");var n=e.bbox,r=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");n&&u(n),r&&h(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=t,i}function l(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function c(t){return!!t&&t.constructor===Object}function u(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!l(t))throw new Error("bbox must only contain numbers")}))}function h(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},2273:(t,e,n)=>{"use strict";var r=n(1662),i=n(3842),o=n(6960);const s=n(8639).orient2d;function a(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var i=function(t){for(var e=t[0],n=t[0],r=t[0],i=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<e[0]&&(e=a),a[0]>r[0]&&(r=a),a[1]<n[1]&&(n=a),a[1]>i[1]&&(i=a)}var l=[e,n,r,i],c=l.slice();for(s=0;s<t.length;s++)o(t[s],l)||c.push(t[s]);return function(t){t.sort(_);for(var e=[],n=0;n<t.length;n++){for(;e.length>=2&&f(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&f(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),e.pop(),e.concat(r)}(c)}(t),s=new r(16);s.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},s.compareMinX=function(t,e){return t[0]-e[0]},s.compareMinY=function(t,e){return t[1]-e[1]},s.load(t);for(var a,c=[],u=0;u<i.length;u++){var h=i[u];s.remove(h),a=g(h,a),c.push(a)}var p=new r(16);for(u=0;u<c.length;u++)p.insert(d(c[u]));for(var m=e*e,y=n*n;c.length;){var b=c.shift(),w=b.p,x=b.next.p,S=v(w,x);if(!(S<y)){var E=S/m;(h=l(s,b.prev.p,w,x,b.next.next.p,E,p))&&Math.min(v(h,w),v(h,x))<=E&&(c.push(b),c.push(g(h,b)),s.remove(h),p.remove(b),p.insert(d(b)),p.insert(d(b.next)))}}b=a;var C=[];do{C.push(b.p),b=b.next}while(b!==a);return C.push(b.p),C}function l(t,e,n,r,o,s,a){for(var l=new i([],c),h=t.data;h;){for(var f=0;f<h.children.length;f++){var d=h.children[f],g=h.leaf?m(d,n,r):u(n,r,d);g>s||l.push({node:d,dist:g})}for(;l.length&&!l.peek().node.children;){var v=l.pop(),y=v.node,_=m(y,e,n),b=m(y,r,o);if(v.dist<_&&v.dist<b&&p(n,y,a)&&p(r,y,a))return y}(h=l.pop())&&(h=h.node)}return null}function c(t,e){return t.dist-e.dist}function u(t,e,n){if(h(t,n)||h(e,n))return 0;var r=y(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===r)return 0;var i=y(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===i)return 0;var o=y(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var s=y(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===s?0:Math.min(r,i,o,s)}function h(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function p(t,e,n){for(var r,i,o,s,a=Math.min(t[0],e[0]),l=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),u=Math.max(t[1],e[1]),h=n.search({minX:a,minY:l,maxX:c,maxY:u}),p=0;p<h.length;p++)if(r=h[p].p,i=h[p].next.p,o=t,r!==(s=e)&&i!==o&&f(r,i,o)>0!=f(r,i,s)>0&&f(o,s,r)>0!=f(o,s,i)>0)return!1;return!0}function f(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function d(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function g(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function v(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function m(t,e,n){var r=e[0],i=e[1],o=n[0]-r,s=n[1]-i;if(0!==o||0!==s){var a=((t[0]-r)*o+(t[1]-i)*s)/(o*o+s*s);a>1?(r=n[0],i=n[1]):a>0&&(r+=o*a,i+=s*a)}return(o=t[0]-r)*o+(s=t[1]-i)*s}function y(t,e,n,r,i,o,s,a){var l,c,u,h,p=n-t,f=r-e,d=s-i,g=a-o,v=t-i,m=e-o,y=p*p+f*f,_=p*d+f*g,b=d*d+g*g,w=p*v+f*m,x=d*v+g*m,S=y*b-_*_,E=S,C=S;0===S?(c=0,E=1,h=x,C=b):(h=y*x-_*w,(c=_*x-b*w)<0?(c=0,h=x,C=b):c>E&&(c=E,h=x+_,C=b)),h<0?(h=0,-w<0?c=0:-w>y?c=E:(c=-w,E=y)):h>C&&(h=C,-w+_<0?c=0:-w+_>y?c=E:(c=-w+_,E=y));var T=(1-(u=0===h?0:h/C))*i+u*s-((1-(l=0===c?0:c/E))*t+l*n),O=(1-u)*o+u*a-((1-l)*e+l*r);return T*T+O*O}function _(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}i.default&&(i=i.default),t.exports=a,t.exports.default=a},1662:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(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 i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(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 c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=i(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.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 n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<o?(o=h,i=c<i?c:i,s=l):h===o&&c<i&&(i=c,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,c,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),v=s(t,d,n,this.toBBox),m=(i=g,o=v,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),y=u(g)+u(v);m<p?(p=m,r=d,f=y<f?y:f):m===p&&y<f&&(f=y,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),c=h(o)+h(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?i(p):p),c+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},9662:(t,e,n)=>{var r=n(614),i=n(6330),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(4411),i=n(6330),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},1223:(t,e,n)=>{var r=n(5112),i=n(30),o=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,e,n)=>{"use strict";var r=n(8710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},5787:(t,e,n)=>{var r=n(7976),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,n)=>{var r=n(111),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},8533:(t,e,n)=>{"use strict";var r=n(2092).forEach,i=n(9341)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,n)=>{"use strict";var r=n(9974),i=n(6916),o=n(7908),s=n(3411),a=n(7659),l=n(4411),c=n(6244),u=n(6135),h=n(4121),p=n(1246),f=Array;t.exports=function(t){var e=o(t),n=l(this),d=arguments.length,g=d>1?arguments[1]:void 0,v=void 0!==g;v&&(g=r(g,d>2?arguments[2]:void 0));var m,y,_,b,w,x,S=p(e),E=0;if(!S||this===f&&a(S))for(m=c(e),y=n?new this(m):f(m);m>E;E++)x=v?g(e[E],E):e[E],u(y,E,x);else for(w=(b=h(e,S)).next,y=n?new this:[];!(_=i(w,b)).done;E++)x=v?s(b,g,[_.value,E],!0):_.value,u(y,E,x);return y.length=E,y}},1318:(t,e,n)=>{var r=n(5656),i=n(1400),o=n(6244),s=function(t){return function(e,n,s){var a,l=r(e),c=o(l),u=i(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,e,n)=>{var r=n(9974),i=n(1702),o=n(8361),s=n(7908),a=n(6244),l=n(5417),c=i([].push),u=function(t){var e=1==t,n=2==t,i=3==t,u=4==t,h=6==t,p=7==t,f=5==t||h;return function(d,g,v,m){for(var y,_,b=s(d),w=o(b),x=r(g,v),S=a(w),E=0,C=m||l,T=e?C(d,S):n||p?C(d,0):void 0;S>E;E++)if((f||E in w)&&(_=x(y=w[E],E,b),t))if(e)T[E]=_;else if(_)switch(t){case 3:return!0;case 5:return y;case 6:return E;case 2:c(T,y)}else switch(t){case 4:return!1;case 7:c(T,y)}return h?-1:i||u?u:T}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,n)=>{var r=n(7293),i=n(5112),o=n(7392),s=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,n)=>{"use strict";var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},3658:(t,e,n)=>{"use strict";var r=n(9781),i=n(3157),o=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},1589:(t,e,n)=>{var r=n(1400),i=n(6244),o=n(6135),s=Array,a=Math.max;t.exports=function(t,e,n){for(var l=i(t),c=r(e,l),u=r(void 0===n?l:n,l),h=s(a(u-c,0)),p=0;c<u;c++,p++)o(h,p,t[c]);return h.length=p,h}},206:(t,e,n)=>{var r=n(1702);t.exports=r([].slice)},4362:(t,e,n)=>{var r=n(1589),i=Math.floor,o=function(t,e){var n=t.length,l=i(n/2);return n<8?s(t,e):a(t,o(r(t,0,l),e),o(r(t,l),e),e)},s=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},a=function(t,e,n,r){for(var i=e.length,o=n.length,s=0,a=0;s<i||a<o;)t[s+a]=s<i&&a<o?r(e[s],n[a])<=0?e[s++]:n[a++]:s<i?e[s++]:n[a++];return t};t.exports=o},7475:(t,e,n)=>{var r=n(3157),i=n(4411),o=n(111),s=n(5112)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===a||r(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},3411:(t,e,n)=>{var r=n(9670),i=n(9212);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},7072:(t,e,n)=>{var r=n(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},4326:(t,e,n)=>{var r=n(1702),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:(t,e,n)=>{var r=n(1694),i=n(614),o=n(4326),s=n(5112)("toStringTag"),a=Object,l="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:l?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},9920:(t,e,n)=>{var r=n(2597),i=n(3887),o=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=i(e),l=s.f,c=o.f,u=0;u<a.length;u++){var h=a[u];r(t,h)||n&&r(n,h)||l(t,h,c(e,h))}}},8544:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,e){return{value:t,done:e}}},8880:(t,e,n)=>{var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),i=n(3070),o=n(9114);t.exports=function(t,e,n){var s=r(e);s in t?i.f(t,s,o(0,n)):t[s]=n}},7045:(t,e,n)=>{var r=n(6339),i=n(3070);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},8052:(t,e,n)=>{var r=n(614),i=n(3070),o=n(6339),s=n(3072);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&o(n,c,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9190:(t,e,n)=>{var r=n(8052);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},3072:(t,e,n)=>{var r=n(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},5117:(t,e,n)=>{"use strict";var r=n(6330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+r(e)+" of "+r(t))}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},317:(t,e,n)=>{var r=n(7854),i=n(111),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,n)=>{var r=n(317)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8886:(t,e,n)=>{var r=n(8113).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},7871:(t,e,n)=>{var r=n(3823),i=n(5268);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,e,n)=>{var r=n(8113);t.exports=/MSIE|Trident/.test(r)},1528:(t,e,n)=>{var r=n(8113),i=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),i=n(7854);t.exports="process"==r(i.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,i,o=n(7854),s=n(8113),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},8008:(t,e,n)=>{var r=n(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),s=n(8052),a=n(3072),l=n(9920),c=n(4705);t.exports=function(t,e){var n,u,h,p,f,d=t.target,g=t.global,v=t.stat;if(n=g?r:v?r[d]||a(d,{}):(r[d]||{}).prototype)for(u in e){if(p=e[u],h=t.dontCallGetSet?(f=i(n,u))&&f.value:n[u],!c(g?u:d+(v?".":"#")+u,t.forced)&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(t.sham||h&&h.sham)&&o(p,"sham",!0),s(n,u,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,n)=>{"use strict";n(4916);var r=n(1470),i=n(8052),o=n(2261),s=n(7293),a=n(5112),l=n(8880),c=a("species"),u=RegExp.prototype;t.exports=function(t,e,n,h){var p=a(t),f=!s((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=f&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!f||!d||n){var g=r(/./[p]),v=e(p,""[t],(function(t,e,n,i,s){var a=r(t),l=e.exec;return l===o||l===u.exec?f&&!s?{done:!0,value:g(e,n,i)}:{done:!0,value:a(n,e,i)}:{done:!1}}));i(String.prototype,t,v[0]),i(u,p,v[1])}h&&l(u[p],"sham",!0)}},2104:(t,e,n)=>{var r=n(4374),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(o):function(){return s.apply(o,arguments)})},9974:(t,e,n)=>{var r=n(1470),i=n(9662),o=n(4374),s=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},7065:(t,e,n)=>{"use strict";var r=n(1702),i=n(9662),o=n(111),s=n(2597),a=n(206),l=n(4374),c=Function,u=r([].concat),h=r([].join),p={},f=function(t,e,n){if(!s(p,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";p[e]=c("C,a","return new C("+h(r,",")+")")}return p[e](t,n)};t.exports=l?c.bind:function(t){var e=i(this),n=e.prototype,r=a(arguments,1),s=function(){var n=u(r,a(arguments));return this instanceof s?f(e,n.length,n):e.apply(t,n)};return o(n)&&(s.prototype=n),s}},6916:(t,e,n)=>{var r=n(4374),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6530:(t,e,n)=>{var r=n(9781),i=n(2597),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},1470:(t,e,n)=>{var r=n(4326),i=n(1702);t.exports=function(t){if("Function"===r(t))return i(t)}},1702:(t,e,n)=>{var r=n(4374),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);t.exports=r?s:function(t){return function(){return o.apply(t,arguments)}}},5005:(t,e,n)=>{var r=n(7854),i=n(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),i=n(8173),o=n(8554),s=n(7497),a=n(5112)("iterator");t.exports=function(t){if(!o(t))return i(t,a)||i(t,"@@iterator")||s[r(t)]}},4121:(t,e,n)=>{var r=n(6916),i=n(9662),o=n(9670),s=n(6330),a=n(1246),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(i(n))return o(r(n,t));throw l(s(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662),i=n(8554);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},647:(t,e,n)=>{var r=n(1702),i=n(7908),o=Math.floor,s=r("".charAt),a=r("".replace),l=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,h,p){var f=n+t.length,d=r.length,g=u;return void 0!==h&&(h=i(h),g=c),a(p,g,(function(i,a){var c;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,n);case"'":return l(e,f);case"<":c=h[l(a,1,-1)];break;default:var u=+a;if(0===u)return i;if(u>d){var p=o(u/10);return 0===p?i:p<=d?void 0===r[p-1]?s(a,1):r[p-1]+s(a,1):i}c=r[u-1]}return void 0===c?"":c}))}},7854:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:(t,e,n)=>{var r=n(1702),i=n(7908),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(1702),i=n(7293),o=n(4326),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},9587:(t,e,n)=>{var r=n(614),i=n(111),o=n(7674);t.exports=function(t,e,n){var s,a;return o&&r(s=e.constructor)&&s!==n&&i(a=s.prototype)&&a!==n.prototype&&o(t,a),t}},2788:(t,e,n)=>{var r=n(1702),i=n(614),o=n(5465),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},9909:(t,e,n)=>{var r,i,o,s=n(4811),a=n(7854),l=n(111),c=n(8880),u=n(2597),h=n(5465),p=n(6200),f=n(3501),d="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||h.state){var m=h.state||(h.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw g(d);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},o=function(t){return m.has(t)}}else{var y=p("state");f[y]=!0,r=function(t,e){if(u(t,y))throw g(d);return e.facade=t,c(t,y,e),e},i=function(t){return u(t,y)?t[y]:{}},o=function(t){return u(t,y)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:(t,e,n)=>{var r=n(4154),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(1702),i=n(7293),o=n(614),s=n(648),a=n(5005),l=n(2788),c=function(){},u=[],h=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,f=r(p.exec),d=!p.exec(c),g=function(t){if(!o(t))return!1;try{return h(c,u,t),!0}catch(t){return!1}},v=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!f(p,l(t))}catch(t){return!0}};v.sham=!0,t.exports=!h||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?v:g},5032:(t,e,n)=>{var r=n(2597);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},4705:(t,e,n)=>{var r=n(7293),i=n(614),o=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n==u||n!=c&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},8554:t=>{t.exports=function(t){return null==t}},111:(t,e,n)=>{var r=n(614),i=n(4154),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},7850:(t,e,n)=>{var r=n(111),i=n(4326),o=n(5112)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,n)=>{var r=n(5005),i=n(614),o=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},408:(t,e,n)=>{var r=n(9974),i=n(6916),o=n(9670),s=n(6330),a=n(7659),l=n(6244),c=n(7976),u=n(4121),h=n(1246),p=n(9212),f=TypeError,d=function(t,e){this.stopped=t,this.result=e},g=d.prototype;t.exports=function(t,e,n){var v,m,y,_,b,w,x,S=n&&n.that,E=!(!n||!n.AS_ENTRIES),C=!(!n||!n.IS_RECORD),T=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),k=r(e,S),M=function(t){return v&&p(v,"normal",t),new d(!0,t)},P=function(t){return E?(o(t),O?k(t[0],t[1],M):k(t[0],t[1])):O?k(t,M):k(t)};if(C)v=t.iterator;else if(T)v=t;else{if(!(m=h(t)))throw f(s(t)+" is not iterable");if(a(m)){for(y=0,_=l(t);_>y;y++)if((b=P(t[y]))&&c(g,b))return b;return new d(!1)}v=u(t,m)}for(w=C?t.next:v.next;!(x=i(w,v)).done;){try{b=P(x.value)}catch(t){p(v,"throw",t)}if("object"==typeof b&&b&&c(g,b))return b}return new d(!1)}},9212:(t,e,n)=>{var r=n(6916),i=n(9670),o=n(8173);t.exports=function(t,e,n){var s,a;i(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw n;return n}s=r(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return i(s),n}},3061:(t,e,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),s=n(8003),a=n(7497),l=function(){return this};t.exports=function(t,e,n,c){var u=e+" Iterator";return t.prototype=i(r,{next:o(+!c,n)}),s(t,u,!1,!0),a[u]=l,t}},1656:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(1913),s=n(6530),a=n(614),l=n(3061),c=n(9518),u=n(7674),h=n(8003),p=n(8880),f=n(8052),d=n(5112),g=n(7497),v=n(3383),m=s.PROPER,y=s.CONFIGURABLE,_=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=d("iterator"),x="keys",S="values",E="entries",C=function(){return this};t.exports=function(t,e,n,s,d,v,T){l(n,e,s);var O,k,M,P=function(t){if(t===d&&D)return D;if(!b&&t in I)return I[t];switch(t){case x:case S:case E:return function(){return new n(this,t)}}return function(){return new n(this)}},L=e+" Iterator",A=!1,I=t.prototype,R=I[w]||I["@@iterator"]||d&&I[d],D=!b&&R||P(d),j="Array"==e&&I.entries||R;if(j&&(O=c(j.call(new t)))!==Object.prototype&&O.next&&(o||c(O)===_||(u?u(O,_):a(O[w])||f(O,w,C)),h(O,L,!0,!0),o&&(g[L]=C)),m&&d==S&&R&&R.name!==S&&(!o&&y?p(I,"name",S):(A=!0,D=function(){return i(R,this)})),d)if(k={values:P(S),keys:v?D:P(x),entries:P(E)},T)for(M in k)(b||A||!(M in I))&&f(I,M,k[M]);else r({target:e,proto:!0,forced:b||A},k);return o&&!T||I[w]===D||f(I,w,D,{name:d}),g[e]=D,k}},3383:(t,e,n)=>{"use strict";var r,i,o,s=n(7293),a=n(614),l=n(111),c=n(30),u=n(9518),h=n(8052),p=n(5112),f=n(1913),d=p("iterator"),g=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):g=!0),!l(r)||s((function(){var t={};return r[d].call(t)!==t}))?r={}:f&&(r=c(r)),a(r[d])||h(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},7497:t=>{t.exports={}},6244:(t,e,n)=>{var r=n(7466);t.exports=function(t){return r(t.length)}},6339:(t,e,n)=>{var r=n(7293),i=n(614),o=n(2597),s=n(9781),a=n(6530).CONFIGURABLE,l=n(2788),c=n(9909),u=c.enforce,h=c.get,p=Object.defineProperty,f=s&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),d=String(String).split("String"),g=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),f&&n&&o(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=u(t);return o(r,"source")||(r.source=d.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return i(this)&&h(this).source||l(this)}),"toString")},4758:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},5948:(t,e,n)=>{var r,i,o,s,a,l,c,u,h=n(7854),p=n(9974),f=n(1236).f,d=n(261).set,g=n(6833),v=n(1528),m=n(1036),y=n(5268),_=h.MutationObserver||h.WebKitMutationObserver,b=h.document,w=h.process,x=h.Promise,S=f(h,"queueMicrotask"),E=S&&S.value;E||(r=function(){var t,e;for(y&&(t=w.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?s():o=void 0,t}}o=void 0,t&&t.enter()},g||y||m||!_||!b?!v&&x&&x.resolve?((c=x.resolve(void 0)).constructor=x,u=p(c.then,c),s=function(){u(r)}):y?s=function(){w.nextTick(r)}:(d=p(d,h),s=function(){d(r)}):(a=!0,l=b.createTextNode(""),new _(r).observe(l,{characterData:!0}),s=function(){l.data=a=!a})),t.exports=E||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,s()),o=e}},8523:(t,e,n)=>{"use strict";var r=n(9662),i=TypeError,o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},1574:(t,e,n)=>{"use strict";var r=n(9781),i=n(1702),o=n(6916),s=n(7293),a=n(1956),l=n(5181),c=n(5296),u=n(7908),h=n(8361),p=Object.assign,f=Object.defineProperty,d=i([].concat);t.exports=!p||s((function(){if(r&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=p({},t)[n]||a(p({},e)).join("")!=i}))?function(t,e){for(var n=u(t),i=arguments.length,s=1,p=l.f,f=c.f;i>s;)for(var g,v=h(arguments[s++]),m=p?d(a(v),p(v)):a(v),y=m.length,_=0;y>_;)g=m[_++],r&&!o(f,v,g)||(n[g]=v[g]);return n}:p},30:(t,e,n)=>{var r,i=n(9670),o=n(6048),s=n(748),a=n(3501),l=n(490),c=n(317),u=n(6200),h=u("IE_PROTO"),p=function(){},f=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&r?d(r):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete g.prototype[s[n]];return g()};a[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=i(t),n=new p,p.prototype=null,n[h]=t):n=g(),void 0===e?n:o.f(n,e)}},6048:(t,e,n)=>{var r=n(9781),i=n(3353),o=n(3070),s=n(9670),a=n(5656),l=n(1956);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=l(e),c=i.length,u=0;c>u;)o.f(t,n=i[u++],r[n]);return t}},3070:(t,e,n)=>{var r=n(9781),i=n(4664),o=n(3353),s=n(9670),a=n(4948),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",p="configurable",f="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var r=u(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:p in n?n.configurable:r.configurable,enumerable:h in n?n.enumerable:r.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),i=n(6916),o=n(5296),s=n(9114),a=n(5656),l=n(4948),c=n(2597),u=n(4664),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},1156:(t,e,n)=>{var r=n(4326),i=n(5656),o=n(8006).f,s=n(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==r(t)?function(t){try{return o(t)}catch(t){return s(a)}}(t):o(i(t))}},8006:(t,e,n)=>{var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var r=n(2597),i=n(614),o=n(7908),s=n(6200),a=n(8544),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(r(e,l))return e[l];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},7976:(t,e,n)=>{var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:(t,e,n)=>{var r=n(1702),i=n(2597),o=n(5656),s=n(1318).indexOf,a=n(3501),l=r([].push);t.exports=function(t,e){var n,r=o(t),c=0,u=[];for(n in r)!i(a,n)&&i(r,n)&&l(u,n);for(;e.length>c;)i(r,n=e[c++])&&(~s(u,n)||l(u,n));return u}},1956:(t,e,n)=>{var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(1702),i=n(9670),o=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},288:(t,e,n)=>{"use strict";var r=n(1694),i=n(648);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,n)=>{var r=n(6916),i=n(614),o=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),i=n(1702),o=n(8006),s=n(5181),a=n(9670),l=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?l(e,n(t)):e}},857:(t,e,n)=>{var r=n(7854);t.exports=r},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,e,n)=>{var r=n(7854),i=n(2492),o=n(614),s=n(4705),a=n(2788),l=n(5112),c=n(7871),u=n(3823),h=n(1913),p=n(7392),f=i&&i.prototype,d=l("species"),g=!1,v=o(r.PromiseRejectionEvent),m=s("Promise",(function(){var t=a(i),e=t!==String(i);if(!e&&66===p)return!0;if(h&&(!f.catch||!f.finally))return!0;if(!p||p<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[d]=r,!(g=n.then((function(){}))instanceof r))return!0}return!e&&(c||u)&&!v}));t.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:g}},2492:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},9478:(t,e,n)=>{var r=n(9670),i=n(111),o=n(8523);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},612:(t,e,n)=>{var r=n(2492),i=n(7072),o=n(3702).CONSTRUCTOR;t.exports=o||!i((function(t){r.all(t).then(void 0,(function(){}))}))},2626:(t,e,n)=>{var r=n(3070).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},7651:(t,e,n)=>{var r=n(6916),i=n(9670),o=n(614),s=n(4326),a=n(2261),l=TypeError;t.exports=function(t,e){var n=t.exec;if(o(n)){var c=r(n,t,e);return null!==c&&i(c),c}if("RegExp"===s(t))return r(a,t,e);throw l("RegExp#exec called on incompatible receiver")}},2261:(t,e,n)=>{"use strict";var r,i,o=n(6916),s=n(1702),a=n(1340),l=n(7066),c=n(2999),u=n(2309),h=n(30),p=n(9909).get,f=n(9441),d=n(7168),g=u("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,m=v,y=s("".charAt),_=s("".indexOf),b=s("".replace),w=s("".slice),x=(i=/b*/g,o(v,r=/a/,"a"),o(v,i,"a"),0!==r.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(x||E||S||f||d)&&(m=function(t){var e,n,r,i,s,c,u,f=this,d=p(f),C=a(t),T=d.raw;if(T)return T.lastIndex=f.lastIndex,e=o(m,T,C),f.lastIndex=T.lastIndex,e;var O=d.groups,k=S&&f.sticky,M=o(l,f),P=f.source,L=0,A=C;if(k&&(M=b(M,"y",""),-1===_(M,"g")&&(M+="g"),A=w(C,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==y(C,f.lastIndex-1))&&(P="(?: "+P+")",A=" "+A,L++),n=new RegExp("^(?:"+P+")",M)),E&&(n=new RegExp("^"+P+"$(?!\\s)",M)),x&&(r=f.lastIndex),i=o(v,k?n:f,A),k?i?(i.input=w(i.input,L),i[0]=w(i[0],L),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:x&&i&&(f.lastIndex=f.global?i.index+i[0].length:r),E&&i&&i.length>1&&o(g,i[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&O)for(i.groups=c=h(null),s=0;s<O.length;s++)c[(u=O[s])[0]]=i[u[1]];return i}),t.exports=m},7066:(t,e,n)=>{"use strict";var r=n(9670);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4706:(t,e,n)=>{var r=n(6916),i=n(2597),o=n(7976),s=n(7066),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||i(t,"flags")||!o(a,t)?e:r(s,t)}},2999:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp,o=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),s=o||r((function(){return!i("a","y").sticky})),a=o||r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},9441:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:(t,e,n)=>{var r=n(8554),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},1150:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},6340:(t,e,n)=>{"use strict";var r=n(5005),i=n(3070),o=n(5112),s=n(9781),a=o("species");t.exports=function(t){var e=r(t),n=i.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,i=n(2597),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,o)&&r(t,o,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,n)=>{var r=n(7854),i=n(3072),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},2309:(t,e,n)=>{var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,n)=>{var r=n(9670),i=n(9483),o=n(8554),s=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||o(n=r(a)[s])?e:i(n)}},8710:(t,e,n)=>{var r=n(1702),i=n(9303),o=n(1340),s=n(4488),a=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(t){return function(e,n){var r,u,h=o(s(e)),p=i(n),f=h.length;return p<0||p>=f?t?"":void 0:(r=l(h,p))<55296||r>56319||p+1===f||(u=l(h,p+1))<56320||u>57343?t?a(h,p):r:t?c(h,p,p+2):u-56320+(r-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},3197:(t,e,n)=>{"use strict";var r=n(1702),i=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",l=RangeError,c=r(s.exec),u=Math.floor,h=String.fromCharCode,p=r("".charCodeAt),f=r([].join),d=r([].push),g=r("".replace),v=r("".split),m=r("".toLowerCase),y=function(t){return t+22+75*(t<26)},_=function(t,e,n){var r=0;for(t=n?u(t/700):t>>1,t+=u(t/e);t>455;)t=u(t/35),r+=36;return u(r+36*t/(t+38))},b=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=p(t,n++);if(i>=55296&&i<=56319&&n<r){var o=p(t,n++);56320==(64512&o)?d(e,((1023&i)<<10)+(1023&o)+65536):(d(e,i),n--)}else d(e,i)}return e}(t);var n,r,o=t.length,s=128,c=0,g=72;for(n=0;n<t.length;n++)(r=t[n])<128&&d(e,h(r));var v=e.length,m=v;for(v&&d(e,"-");m<o;){var b=i;for(n=0;n<t.length;n++)(r=t[n])>=s&&r<b&&(b=r);var w=m+1;if(b-s>u((i-c)/w))throw l(a);for(c+=(b-s)*w,s=b,n=0;n<t.length;n++){if((r=t[n])<s&&++c>i)throw l(a);if(r==s){for(var x=c,S=36;;){var E=S<=g?1:S>=g+26?26:S-g;if(x<E)break;var C=x-E,T=36-E;d(e,h(y(E+C%T))),x=u(C/T),S+=36}d(e,h(y(x))),g=_(c,w,m==v),c=0,m++}}c++,s++}return f(e,"")};t.exports=function(t){var e,n,r=[],i=v(g(m(t),s,"."),".");for(e=0;e<i.length;e++)n=i[e],d(r,c(o,n)?"xn--"+b(n):n);return f(r,".")}},8415:(t,e,n)=>{"use strict";var r=n(9303),i=n(1340),o=n(4488),s=RangeError;t.exports=function(t){var e=i(o(this)),n="",a=r(t);if(a<0||a==1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},6091:(t,e,n)=>{var r=n(6530).PROPER,i=n(7293),o=n(1361);t.exports=function(t){return i((function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||r&&o[t].name!==t}))}},3111:(t,e,n)=>{var r=n(1702),i=n(4488),o=n(1340),s=n(1361),a=r("".replace),l="["+s+"]",c=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),h=function(t){return function(e){var n=o(i(e));return 1&t&&(n=a(n,c,"")),2&t&&(n=a(n,u,"")),n}};t.exports={start:h(1),end:h(2),trim:h(3)}},6293:(t,e,n)=>{var r=n(7392),i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},6532:(t,e,n)=>{var r=n(6916),i=n(5005),o=n(5112),s=n(8052);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,a=o("toPrimitive");e&&!e[a]&&s(e,a,(function(t){return r(n,this)}),{arity:1})}},2015:(t,e,n)=>{var r=n(6293);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},261:(t,e,n)=>{var r,i,o,s,a=n(7854),l=n(2104),c=n(9974),u=n(614),h=n(2597),p=n(7293),f=n(490),d=n(206),g=n(317),v=n(8053),m=n(6833),y=n(5268),_=a.setImmediate,b=a.clearImmediate,w=a.process,x=a.Dispatch,S=a.Function,E=a.MessageChannel,C=a.String,T=0,O={},k="onreadystatechange";try{r=a.location}catch(t){}var M=function(t){if(h(O,t)){var e=O[t];delete O[t],e()}},P=function(t){return function(){M(t)}},L=function(t){M(t.data)},A=function(t){a.postMessage(C(t),r.protocol+"//"+r.host)};_&&b||(_=function(t){v(arguments.length,1);var e=u(t)?t:S(t),n=d(arguments,1);return O[++T]=function(){l(e,void 0,n)},i(T),T},b=function(t){delete O[t]},y?i=function(t){w.nextTick(P(t))}:x&&x.now?i=function(t){x.now(P(t))}:E&&!m?(s=(o=new E).port2,o.port1.onmessage=L,i=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!p(A)?(i=A,a.addEventListener("message",L,!1)):i=k in g("script")?function(t){f.appendChild(g("script")).onreadystatechange=function(){f.removeChild(this),M(t)}}:function(t){setTimeout(P(t),0)}),t.exports={set:_,clear:b}},863:(t,e,n)=>{var r=n(1702);t.exports=r(1..valueOf)},1400:(t,e,n)=>{var r=n(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5656:(t,e,n)=>{var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9303:(t,e,n)=>{var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:(t,e,n)=>{var r=n(9303),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(4488),i=Object;t.exports=function(t){return i(r(t))}},7593:(t,e,n)=>{var r=n(6916),i=n(111),o=n(2190),s=n(8173),a=n(2140),l=n(5112),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!i(n)||o(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,n)=>{var r=n(7593),i=n(2190);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},1340:(t,e,n)=>{var r=n(648),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,n)=>{var r=n(1702),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},5143:(t,e,n)=>{var r=n(7293),i=n(5112),o=n(1913),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},3307:(t,e,n)=>{var r=n(6293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,n)=>{var r=n(9781),i=n(7293);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var e=TypeError;t.exports=function(t,n){if(t<n)throw e("Not enough arguments");return t}},4811:(t,e,n)=>{var r=n(7854),i=n(614),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},6800:(t,e,n)=>{var r=n(857),i=n(2597),o=n(6061),s=n(3070).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||s(e,t,{value:o.f(t)})}},6061:(t,e,n)=>{var r=n(5112);e.f=r},5112:(t,e,n)=>{var r=n(7854),i=n(2309),o=n(2597),s=n(9711),a=n(6293),l=n(3307),c=i("wks"),u=r.Symbol,h=u&&u.for,p=l?u:u&&u.withoutSetter||s;t.exports=function(t){if(!o(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&o(u,t)?c[t]=u[t]:c[t]=l&&h?h(e):p(e)}return c[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},2222:(t,e,n)=>{"use strict";var r=n(2109),i=n(7293),o=n(3157),s=n(111),a=n(7908),l=n(6244),c=n(7207),u=n(6135),h=n(5417),p=n(1194),f=n(5112),d=n(7392),g=f("isConcatSpreadable"),v=d>=51||!i((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),m=p("concat"),y=function(t){if(!s(t))return!1;var e=t[g];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!v||!m},{concat:function(t){var e,n,r,i,o,s=a(this),p=h(s,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(y(o=-1===e?s:arguments[e]))for(i=l(o),c(f+i),n=0;n<i;n++,f++)n in o&&u(p,f,o[n]);else c(f+1),u(p,f++,o);return p.length=f,p}})},7327:(t,e,n)=>{"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1038:(t,e,n)=>{var r=n(2109),i=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(t){Array.from(t)}))},{from:i})},6992:(t,e,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),s=n(9909),a=n(3070).f,l=n(1656),c=n(6178),u=n(1913),h=n(9781),p="Array Iterator",f=s.set,d=s.getterFor(p);t.exports=l(Array,"Array",(function(t,e){f(this,{type:p,target:r(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values");var g=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&h&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(t){}},9600:(t,e,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(8361),s=n(5656),a=n(9341),l=i([].join),c=o!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:c||!u},{join:function(t){return l(s(this),void 0===t?",":t)}})},1249:(t,e,n)=>{"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:(t,e,n)=>{"use strict";var r=n(2109),i=n(3157),o=n(4411),s=n(111),a=n(1400),l=n(6244),c=n(5656),u=n(6135),h=n(5112),p=n(1194),f=n(206),d=p("slice"),g=h("species"),v=Array,m=Math.max;r({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var n,r,h,p=c(this),d=l(p),y=a(t,d),_=a(void 0===e?d:e,d);if(i(p)&&(n=p.constructor,(o(n)&&(n===v||i(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return f(p,y,_);for(r=new(void 0===n?v:n)(m(_-y,0)),h=0;y<_;y++,h++)y in p&&u(r,h,p[y]);return r.length=h,r}})},2707:(t,e,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(9662),s=n(7908),a=n(6244),l=n(5117),c=n(1340),u=n(7293),h=n(4362),p=n(9341),f=n(8886),d=n(256),g=n(7392),v=n(8008),m=[],y=i(m.sort),_=i(m.push),b=u((function(){m.sort(void 0)})),w=u((function(){m.sort(null)})),x=p("sort"),S=!u((function(){if(g)return g<70;if(!(f&&f>3)){if(d)return!0;if(v)return v<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)m.push({k:e+r,v:n})}for(m.sort((function(t,e){return e.v-t.v})),r=0;r<m.length;r++)e=m[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:b||!w||!x||!S},{sort:function(t){void 0!==t&&o(t);var e=s(this);if(S)return void 0===t?y(e):y(e,t);var n,r,i=[],u=a(e);for(r=0;r<u;r++)r in e&&_(i,e[r]);for(h(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=a(i),r=0;r<n;)e[r]=i[r++];for(;r<u;)l(e,r++);return e}})},561:(t,e,n)=>{"use strict";var r=n(2109),i=n(7908),o=n(1400),s=n(9303),a=n(6244),l=n(3658),c=n(7207),u=n(5417),h=n(6135),p=n(5117),f=n(1194)("splice"),d=Math.max,g=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,f,v,m,y,_=i(this),b=a(_),w=o(t,b),x=arguments.length;for(0===x?n=r=0:1===x?(n=0,r=b-w):(n=x-2,r=g(d(s(e),0),b-w)),c(b+n-r),f=u(_,r),v=0;v<r;v++)(m=w+v)in _&&h(f,v,_[m]);if(f.length=r,n<r){for(v=w;v<b-r;v++)y=v+n,(m=v+r)in _?_[y]=_[m]:p(_,y);for(v=b;v>b-r+n;v--)p(_,v-1)}else if(n>r)for(v=b-r;v>w;v--)y=v+n-1,(m=v+r-1)in _?_[y]=_[m]:p(_,y);for(v=0;v<n;v++)_[v+w]=arguments[v+2];return l(_,b-r+n),f}})},8309:(t,e,n)=>{var r=n(9781),i=n(6530).EXISTS,o=n(1702),s=n(3070).f,a=Function.prototype,l=o(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=o(c.exec);r&&!i&&s(a,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},8862:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(2104),s=n(6916),a=n(1702),l=n(7293),c=n(3157),u=n(614),h=n(111),p=n(2190),f=n(206),d=n(6293),g=i("JSON","stringify"),v=a(/./.exec),m=a("".charAt),y=a("".charCodeAt),_=a("".replace),b=a(1..toString),w=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,E=!d||l((function(){var t=i("Symbol")();return"[null]"!=g([t])||"{}"!=g({a:t})||"{}"!=g(Object(t))})),C=l((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),T=function(t,e){var n=f(arguments),r=e;if((h(e)||void 0!==t)&&!p(t))return c(e)||(e=function(t,e){if(u(r)&&(e=s(r,this,t,e)),!p(e))return e}),n[1]=e,o(g,null,n)},O=function(t,e,n){var r=m(n,e-1),i=m(n,e+1);return v(x,t)&&!v(S,i)||v(S,t)&&!v(x,r)?"\\u"+b(y(t,0),16):t};g&&r({target:"JSON",stat:!0,arity:3,forced:E||C},{stringify:function(t,e,n){var r=f(arguments),i=o(E?T:g,null,r);return C&&"string"==typeof i?_(i,w,O):i}})},3706:(t,e,n)=>{var r=n(7854);n(8003)(r.JSON,"JSON",!0)},2703:(t,e,n)=>{n(8003)(Math,"Math",!0)},6977:(t,e,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(9303),s=n(863),a=n(8415),l=n(7293),c=RangeError,u=String,h=Math.floor,p=i(a),f=i("".slice),d=i(1..toFixed),g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)},v=function(t,e,n){for(var r=-1,i=n;++r<6;)i+=e*t[r],t[r]=i%1e7,i=h(i/1e7)},m=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=h(r/e),r=r%e*1e7},y=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=u(t[e]);n=""===n?r:n+p("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:l((function(){return"0.000"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!l((function(){d({})}))},{toFixed:function(t){var e,n,r,i,a=s(this),l=o(t),h=[0,0,0,0,0,0],d="",_="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return u(a);if(a<0&&(d="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*g(2,69,1))-69)<0?a*g(2,-e,1):a/g(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(h,0,n),r=l;r>=7;)v(h,1e7,0),r-=7;for(v(h,g(10,r,1),0),r=e-1;r>=23;)m(h,1<<23),r-=23;m(h,1<<r),v(h,1,1),m(h,2),_=y(h)}else v(h,0,n),v(h,1<<-e,0),_=y(h)+p("0",l);return _=l>0?d+((i=_.length)<=l?"0."+p("0",l-i)+_:f(_,0,i-l)+"."+f(_,i-l)):d+_}})},5003:(t,e,n)=>{var r=n(2109),i=n(7293),o=n(5656),s=n(1236).f,a=n(9781),l=i((function(){s(1)}));r({target:"Object",stat:!0,forced:!a||l,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},9660:(t,e,n)=>{var r=n(2109),i=n(6293),o=n(7293),s=n(5181),a=n(7908);r({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(t){var e=s.f;return e?e(a(t)):[]}})},489:(t,e,n)=>{var r=n(2109),i=n(7293),o=n(7908),s=n(9518),a=n(8544);r({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},7941:(t,e,n)=>{var r=n(2109),i=n(7908),o=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,n)=>{var r=n(1694),i=n(8052),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},821:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),s=n(8523),a=n(2534),l=n(408);r({target:"Promise",stat:!0,forced:n(612)},{all:function(t){var e=this,n=s.f(e),r=n.resolve,c=n.reject,u=a((function(){var n=o(e.resolve),s=[],a=0,u=1;l(t,(function(t){var o=a++,l=!1;u++,i(n,e,t).then((function(t){l||(l=!0,s[o]=t,--u||r(s))}),c)})),--u||r(s)}));return u.error&&c(u.value),n.promise}})},4164:(t,e,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(3702).CONSTRUCTOR,s=n(2492),a=n(5005),l=n(614),c=n(8052),u=s&&s.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&l(s)){var h=a("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},3401:(t,e,n)=>{"use strict";var r,i,o,s=n(2109),a=n(1913),l=n(5268),c=n(7854),u=n(6916),h=n(8052),p=n(7674),f=n(8003),d=n(6340),g=n(9662),v=n(614),m=n(111),y=n(5787),_=n(6707),b=n(261).set,w=n(5948),x=n(842),S=n(2534),E=n(8572),C=n(9909),T=n(2492),O=n(3702),k=n(8523),M="Promise",P=O.CONSTRUCTOR,L=O.REJECTION_EVENT,A=O.SUBCLASSING,I=C.getterFor(M),R=C.set,D=T&&T.prototype,j=T,F=D,N=c.TypeError,B=c.document,z=c.process,G=k.f,X=G,H=!!(B&&B.createEvent&&c.dispatchEvent),U="unhandledrejection",Z=function(t){var e;return!(!m(t)||!v(e=t.then))&&e},q=function(t,e){var n,r,i,o=e.value,s=1==e.state,a=s?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&$(e),e.rejection=1),!0===a?n=o:(h&&h.enter(),n=a(o),h&&(h.exit(),i=!0)),n===t.promise?c(N("Promise-chain cycle")):(r=Z(n))?u(r,n,l,c):l(n)):c(o)}catch(t){h&&!i&&h.exit(),c(t)}},W=function(t,e){t.notified||(t.notified=!0,w((function(){for(var n,r=t.reactions;n=r.get();)q(n,t);t.notified=!1,e&&!t.rejection&&V(t)})))},Y=function(t,e,n){var r,i;H?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!L&&(i=c["on"+t])?i(r):t===U&&x("Unhandled promise rejection",n)},V=function(t){u(b,c,(function(){var e,n=t.facade,r=t.value;if(K(t)&&(e=S((function(){l?z.emit("unhandledRejection",r,n):Y(U,n,r)})),t.rejection=l||K(t)?2:1,e.error))throw e.value}))},K=function(t){return 1!==t.rejection&&!t.parent},$=function(t){u(b,c,(function(){var e=t.facade;l?z.emit("rejectionHandled",e):Y("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,W(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw N("Promise can't be resolved itself");var r=Z(e);r?w((function(){var n={done:!1};try{u(r,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,W(t,!1))}catch(e){Q({done:!1},e,t)}}};if(P&&(F=(j=function(t){y(this,F),g(t),u(r,this);var e=I(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(r=function(t){R(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=h(F,"then",(function(t,e){var n=I(this),r=G(_(this,j));return n.parent=!0,r.ok=!v(t)||t,r.fail=v(e)&&e,r.domain=l?z.domain:void 0,0==n.state?n.reactions.add(r):w((function(){q(r,n)})),r.promise})),i=function(){var t=new r,e=I(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},k.f=G=function(t){return t===j||undefined===t?new i(t):X(t)},!a&&v(T)&&D!==Object.prototype)){o=D.then,A||h(D,"then",(function(t,e){var n=this;return new j((function(t,e){u(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}p&&p(D,F)}s({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:j}),f(j,M,!1,!0),d(M)},8674:(t,e,n)=>{n(3401),n(821),n(4164),n(6027),n(683),n(6294)},6027:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),s=n(8523),a=n(2534),l=n(408);r({target:"Promise",stat:!0,forced:n(612)},{race:function(t){var e=this,n=s.f(e),r=n.reject,c=a((function(){var s=o(e.resolve);l(t,(function(t){i(s,e,t).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},683:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(8523);r({target:"Promise",stat:!0,forced:n(3702).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},6294:(t,e,n)=>{"use strict";var r=n(2109),i=n(5005),o=n(1913),s=n(2492),a=n(3702).CONSTRUCTOR,l=n(9478),c=i("Promise"),u=o&&!a;r({target:"Promise",stat:!0,forced:o||a},{resolve:function(t){return l(u&&this===c?s:this,t)}})},2419:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(2104),s=n(7065),a=n(9483),l=n(9670),c=n(111),u=n(30),h=n(7293),p=i("Reflect","construct"),f=Object.prototype,d=[].push,g=h((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!h((function(){p((function(){}))})),m=g||v;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){a(t),l(e);var n=arguments.length<3?t:a(arguments[2]);if(v&&!g)return p(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return o(d,r,e),new(o(s,t,r))}var i=n.prototype,h=u(c(i)?i:f),m=o(t,h,e);return c(m)?m:h}})},4819:(t,e,n)=>{var r=n(2109),i=n(6916),o=n(111),s=n(9670),a=n(5032),l=n(1236),c=n(9518);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,u,h=arguments.length<3?e:arguments[2];return s(e)===h?e[n]:(r=l.f(e,n))?a(r)?r.value:void 0===r.get?void 0:i(r.get,h):o(u=c(e))?t(u,n,h):void 0}})},4603:(t,e,n)=>{var r=n(9781),i=n(7854),o=n(1702),s=n(4705),a=n(9587),l=n(8880),c=n(8006).f,u=n(7976),h=n(7850),p=n(1340),f=n(4706),d=n(2999),g=n(2626),v=n(8052),m=n(7293),y=n(2597),_=n(9909).enforce,b=n(6340),w=n(5112),x=n(9441),S=n(7168),E=w("match"),C=i.RegExp,T=C.prototype,O=i.SyntaxError,k=o(T.exec),M=o("".charAt),P=o("".replace),L=o("".indexOf),A=o("".slice),I=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,D=/a/g,j=new C(R)!==R,F=d.MISSED_STICKY,N=d.UNSUPPORTED_Y,B=r&&(!j||F||x||S||m((function(){return D[E]=!1,C(R)!=R||C(D)==D||"/a/i"!=C(R,"i")})));if(s("RegExp",B)){for(var z=function(t,e){var n,r,i,o,s,c,d=u(T,this),g=h(t),v=void 0===e,m=[],b=t;if(!d&&g&&v&&t.constructor===z)return t;if((g||u(T,t))&&(t=t.source,v&&(e=f(b))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),b=t,x&&"dotAll"in R&&(r=!!e&&L(e,"s")>-1)&&(e=P(e,/s/g,"")),n=e,F&&"sticky"in R&&(i=!!e&&L(e,"y")>-1)&&N&&(e=P(e,/y/g,"")),S&&(o=function(t){for(var e,n=t.length,r=0,i="",o=[],s={},a=!1,l=!1,c=0,u="";r<=n;r++){if("\\"===(e=M(t,r)))e+=M(t,++r);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:k(I,A(t,r+1))&&(r+=2,l=!0),i+=e,c++;continue;case">"===e&&l:if(""===u||y(s,u))throw new O("Invalid capture group name");s[u]=!0,o[o.length]=[u,c],l=!1,u="";continue}l?u+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),s=a(C(t,e),d?this:T,z),(r||i||m.length)&&(c=_(s),r&&(c.dotAll=!0,c.raw=z(function(t){for(var e,n=t.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(e=M(t,r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+M(t,++r);return i}(t),n)),i&&(c.sticky=!0),m.length&&(c.groups=m)),t!==b)try{l(s,"source",""===b?"(?:)":b)}catch(t){}return s},G=c(C),X=0;G.length>X;)g(z,C,G[X++]);T.constructor=z,z.prototype=T,v(i,"RegExp",z,{constructor:!0})}b("RegExp")},4916:(t,e,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(t,e,n)=>{"use strict";var r=n(6530).PROPER,i=n(8052),o=n(9670),s=n(1340),a=n(7293),l=n(4706),c="toString",u=RegExp.prototype.toString,h=a((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),p=r&&u.name!=c;(h||p)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+s(t.source)+"/"+s(l(t))}),{unsafe:!0})},8783:(t,e,n)=>{"use strict";var r=n(8710).charAt,i=n(1340),o=n(9909),s=n(1656),a=n(6178),l="String Iterator",c=o.set,u=o.getterFor(l);s(String,"String",(function(t){c(this,{type:l,string:i(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?a(void 0,!0):(t=r(n,i),e.index+=t.length,a(t,!1))}))},4723:(t,e,n)=>{"use strict";var r=n(6916),i=n(7007),o=n(9670),s=n(8554),a=n(7466),l=n(1340),c=n(4488),u=n(8173),h=n(1530),p=n(7651);i("match",(function(t,e,n){return[function(e){var n=c(this),i=s(e)?void 0:u(e,t);return i?r(i,e,n):new RegExp(e)[t](l(n))},function(t){var r=o(this),i=l(t),s=n(e,r,i);if(s.done)return s.value;if(!r.global)return p(r,i);var c=r.unicode;r.lastIndex=0;for(var u,f=[],d=0;null!==(u=p(r,i));){var g=l(u[0]);f[d]=g,""===g&&(r.lastIndex=h(i,a(r.lastIndex),c)),d++}return 0===d?null:f}]}))},2481:(t,e,n)=>{n(2109)({target:"String",proto:!0},{repeat:n(8415)})},5306:(t,e,n)=>{"use strict";var r=n(2104),i=n(6916),o=n(1702),s=n(7007),a=n(7293),l=n(9670),c=n(614),u=n(8554),h=n(9303),p=n(7466),f=n(1340),d=n(4488),g=n(1530),v=n(8173),m=n(647),y=n(7651),_=n(5112)("replace"),b=Math.max,w=Math.min,x=o([].concat),S=o([].push),E=o("".indexOf),C=o("".slice),T="$0"==="a".replace(/./,"$0"),O=!!/./[_]&&""===/./[_]("a","$0");s("replace",(function(t,e,n){var o=O?"$":"$0";return[function(t,n){var r=d(this),o=u(t)?void 0:v(t,_);return o?i(o,t,r,n):i(e,f(r),t,n)},function(t,i){var s=l(this),a=f(t);if("string"==typeof i&&-1===E(i,o)&&-1===E(i,"$<")){var u=n(e,s,a,i);if(u.done)return u.value}var d=c(i);d||(i=f(i));var v=s.global;if(v){var _=s.unicode;s.lastIndex=0}for(var T=[];;){var O=y(s,a);if(null===O)break;if(S(T,O),!v)break;""===f(O[0])&&(s.lastIndex=g(a,p(s.lastIndex),_))}for(var k,M="",P=0,L=0;L<T.length;L++){for(var A=f((O=T[L])[0]),I=b(w(h(O.index),a.length),0),R=[],D=1;D<O.length;D++)S(R,void 0===(k=O[D])?k:String(k));var j=O.groups;if(d){var F=x([A],R,I,a);void 0!==j&&S(F,j);var N=f(r(i,void 0,F))}else N=m(A,a,I,R,j,i);I>=P&&(M+=C(a,P,I)+N,P=I+A.length)}return M+C(a,P)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!T||O)},4765:(t,e,n)=>{"use strict";var r=n(6916),i=n(7007),o=n(9670),s=n(8554),a=n(4488),l=n(1150),c=n(1340),u=n(8173),h=n(7651);i("search",(function(t,e,n){return[function(e){var n=a(this),i=s(e)?void 0:u(e,t);return i?r(i,e,n):new RegExp(e)[t](c(n))},function(t){var r=o(this),i=c(t),s=n(e,r,i);if(s.done)return s.value;var a=r.lastIndex;l(a,0)||(r.lastIndex=0);var u=h(r,i);return l(r.lastIndex,a)||(r.lastIndex=a),null===u?-1:u.index}]}))},3210:(t,e,n)=>{"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},2443:(t,e,n)=>{n(6800)("asyncIterator")},4032:(t,e,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(6916),s=n(1702),a=n(1913),l=n(9781),c=n(6293),u=n(7293),h=n(2597),p=n(7976),f=n(9670),d=n(5656),g=n(4948),v=n(1340),m=n(9114),y=n(30),_=n(1956),b=n(8006),w=n(1156),x=n(5181),S=n(1236),E=n(3070),C=n(6048),T=n(5296),O=n(8052),k=n(2309),M=n(6200),P=n(3501),L=n(9711),A=n(5112),I=n(6061),R=n(6800),D=n(6532),j=n(8003),F=n(9909),N=n(2092).forEach,B=M("hidden"),z="Symbol",G=F.set,X=F.getterFor(z),H=Object.prototype,U=i.Symbol,Z=U&&U.prototype,q=i.TypeError,W=i.QObject,Y=S.f,V=E.f,K=w.f,$=T.f,J=s([].push),Q=k("symbols"),tt=k("op-symbols"),et=k("wks"),nt=!W||!W.prototype||!W.prototype.findChild,rt=l&&u((function(){return 7!=y(V({},"a",{get:function(){return V(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Y(H,e);r&&delete H[e],V(t,e,n),r&&t!==H&&V(H,e,r)}:V,it=function(t,e){var n=Q[t]=y(Z);return G(n,{type:z,tag:t,description:e}),l||(n.description=e),n},ot=function(t,e,n){t===H&&ot(tt,e,n),f(t);var r=g(e);return f(n),h(Q,r)?(n.enumerable?(h(t,B)&&t[B][r]&&(t[B][r]=!1),n=y(n,{enumerable:m(0,!1)})):(h(t,B)||V(t,B,m(1,{})),t[B][r]=!0),rt(t,r,n)):V(t,r,n)},st=function(t,e){f(t);var n=d(e),r=_(n).concat(ut(n));return N(r,(function(e){l&&!o(at,n,e)||ot(t,e,n[e])})),t},at=function(t){var e=g(t),n=o($,this,e);return!(this===H&&h(Q,e)&&!h(tt,e))&&(!(n||!h(this,e)||!h(Q,e)||h(this,B)&&this[B][e])||n)},lt=function(t,e){var n=d(t),r=g(e);if(n!==H||!h(Q,r)||h(tt,r)){var i=Y(n,r);return!i||!h(Q,r)||h(n,B)&&n[B][r]||(i.enumerable=!0),i}},ct=function(t){var e=K(d(t)),n=[];return N(e,(function(t){h(Q,t)||h(P,t)||J(n,t)})),n},ut=function(t){var e=t===H,n=K(e?tt:d(t)),r=[];return N(n,(function(t){!h(Q,t)||e&&!h(H,t)||J(r,Q[t])})),r};c||(O(Z=(U=function(){if(p(Z,this))throw q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=L(t),n=function(t){this===H&&o(n,tt,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),rt(this,e,m(1,t))};return l&&nt&&rt(H,e,{configurable:!0,set:n}),it(e,t)}).prototype,"toString",(function(){return X(this).tag})),O(U,"withoutSetter",(function(t){return it(L(t),t)})),T.f=at,E.f=ot,C.f=st,S.f=lt,b.f=w.f=ct,x.f=ut,I.f=function(t){return it(A(t),t)},l&&(V(Z,"description",{configurable:!0,get:function(){return X(this).description}}),a||O(H,"propertyIsEnumerable",at,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:U}),N(_(et),(function(t){R(t)})),r({target:z,stat:!0,forced:!c},{useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?y(t):st(y(t),e)},defineProperty:ot,defineProperties:st,getOwnPropertyDescriptor:lt}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ct}),D(),j(U,z),P[B]=!0},1817:(t,e,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),s=n(1702),a=n(2597),l=n(614),c=n(7976),u=n(1340),h=n(3070).f,p=n(9920),f=o.Symbol,d=f&&f.prototype;if(i&&l(f)&&(!("description"in d)||void 0!==f().description)){var g={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(d,this)?new f(t):void 0===t?f():f(t);return""===t&&(g[e]=!0),e};p(v,f),v.prototype=d,d.constructor=v;var m="Symbol(test)"==String(f("test")),y=s(d.valueOf),_=s(d.toString),b=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),x=s("".slice);h(d,"description",{configurable:!0,get:function(){var t=y(this);if(a(g,t))return"";var e=_(t),n=m?x(e,7,-1):w(e,b,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:v})}},763:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(2597),s=n(1340),a=n(2309),l=n(2015),c=a("string-to-symbol-registry"),u=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=s(t);if(o(c,e))return c[e];var n=i("Symbol")(e);return c[e]=n,u[n]=e,n}})},2165:(t,e,n)=>{n(6800)("iterator")},2526:(t,e,n)=>{n(4032),n(763),n(6620),n(8862),n(9660)},6620:(t,e,n)=>{var r=n(2109),i=n(2597),o=n(2190),s=n(6330),a=n(2309),l=n(2015),c=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!o(t))throw TypeError(s(t)+" is not a symbol");if(i(c,t))return c[t]}})},3680:(t,e,n)=>{var r=n(5005),i=n(6800),o=n(8003);i("toStringTag"),o(r("Symbol"),"Symbol")},4747:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),s=n(8533),a=n(8880),l=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in i)i[c]&&l(r[c]&&r[c].prototype);l(o)},3948:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),s=n(6992),a=n(8880),l=n(5112),c=l("iterator"),u=l("toStringTag"),h=s.values,p=function(t,e){if(t){if(t[c]!==h)try{a(t,c,h)}catch(e){t[c]=h}if(t[u]||a(t,u,e),i[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var f in i)p(r[f]&&r[f].prototype,f);p(o,"DOMTokenList")},5556:(t,e,n)=>{"use strict";n(6992);var r=n(2109),i=n(7854),o=n(6916),s=n(1702),a=n(9781),l=n(5143),c=n(8052),u=n(9190),h=n(8003),p=n(3061),f=n(9909),d=n(5787),g=n(614),v=n(2597),m=n(9974),y=n(648),_=n(9670),b=n(111),w=n(1340),x=n(30),S=n(9114),E=n(4121),C=n(1246),T=n(8053),O=n(5112),k=n(4362),M=O("iterator"),P="URLSearchParams",L="URLSearchParamsIterator",A=f.set,I=f.getterFor(P),R=f.getterFor(L),D=Object.getOwnPropertyDescriptor,j=function(t){if(!a)return i[t];var e=D(i,t);return e&&e.value},F=j("fetch"),N=j("Request"),B=j("Headers"),z=N&&N.prototype,G=B&&B.prototype,X=i.RegExp,H=i.TypeError,U=i.decodeURIComponent,Z=i.encodeURIComponent,q=s("".charAt),W=s([].join),Y=s([].push),V=s("".replace),K=s([].shift),$=s([].splice),J=s("".split),Q=s("".slice),tt=/\+/g,et=Array(4),nt=function(t){return et[t-1]||(et[t-1]=X("((?:%[\\da-f]{2}){"+t+"})","gi"))},rt=function(t){try{return U(t)}catch(e){return t}},it=function(t){var e=V(t,tt," "),n=4;try{return U(e)}catch(t){for(;n;)e=V(e,nt(n--),rt);return e}},ot=/[!'()~]|%20/g,st={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},at=function(t){return st[t]},lt=function(t){return V(Z(t),ot,at)},ct=p((function(t,e){A(this,{type:L,iterator:E(I(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),ut=function(t){this.entries=[],this.url=null,void 0!==t&&(b(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===q(t,0)?Q(t,1):t:w(t)))};ut.prototype={type:P,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,s,a,l,c=C(t);if(c)for(n=(e=E(t,c)).next;!(r=o(n,e)).done;){if(s=(i=E(_(r.value))).next,(a=o(s,i)).done||(l=o(s,i)).done||!o(s,i).done)throw H("Expected sequence with length 2");Y(this.entries,{key:w(a.value),value:w(l.value)})}else for(var u in t)v(t,u)&&Y(this.entries,{key:u,value:w(t[u])})},parseQuery:function(t){if(t)for(var e,n,r=J(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=J(e,"="),Y(this.entries,{key:it(K(n)),value:it(W(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],Y(n,lt(t.key)+"="+lt(t.value));return W(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ht=function(){d(this,pt);var t=arguments.length>0?arguments[0]:void 0;A(this,new ut(t))},pt=ht.prototype;if(u(pt,{append:function(t,e){T(arguments.length,2);var n=I(this);Y(n.entries,{key:w(t),value:w(e)}),n.updateURL()},delete:function(t){T(arguments.length,1);for(var e=I(this),n=e.entries,r=w(t),i=0;i<n.length;)n[i].key===r?$(n,i,1):i++;e.updateURL()},get:function(t){T(arguments.length,1);for(var e=I(this).entries,n=w(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){T(arguments.length,1);for(var e=I(this).entries,n=w(t),r=[],i=0;i<e.length;i++)e[i].key===n&&Y(r,e[i].value);return r},has:function(t){T(arguments.length,1);for(var e=I(this).entries,n=w(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){T(arguments.length,1);for(var n,r=I(this),i=r.entries,o=!1,s=w(t),a=w(e),l=0;l<i.length;l++)(n=i[l]).key===s&&(o?$(i,l--,1):(o=!0,n.value=a));o||Y(i,{key:s,value:a}),r.updateURL()},sort:function(){var t=I(this);k(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=I(this).entries,r=m(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new ct(this,"keys")},values:function(){return new ct(this,"values")},entries:function(){return new ct(this,"entries")}},{enumerable:!0}),c(pt,M,pt.entries,{name:"entries"}),c(pt,"toString",(function(){return I(this).serialize()}),{enumerable:!0}),h(ht,P),r({global:!0,constructor:!0,forced:!l},{URLSearchParams:ht}),!l&&g(B)){var ft=s(G.has),dt=s(G.set),gt=function(t){if(b(t)){var e,n=t.body;if(y(n)===P)return e=t.headers?new B(t.headers):new B,ft(e,"content-type")||dt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),x(t,{body:S(0,w(n)),headers:S(0,e)})}return t};if(g(F)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?gt(arguments[1]):{})}}),g(N)){var vt=function(t){return d(this,z),new N(t,arguments.length>1?gt(arguments[1]):{})};z.constructor=vt,vt.prototype=z,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vt})}}t.exports={URLSearchParams:ht,getState:I}},1637:(t,e,n)=>{n(5556)},8789:(t,e,n)=>{"use strict";n(8783);var r,i=n(2109),o=n(9781),s=n(5143),a=n(7854),l=n(9974),c=n(1702),u=n(8052),h=n(7045),p=n(5787),f=n(2597),d=n(1574),g=n(8457),v=n(1589),m=n(8710).codeAt,y=n(3197),_=n(1340),b=n(8003),w=n(8053),x=n(5556),S=n(9909),E=S.set,C=S.getterFor("URL"),T=x.URLSearchParams,O=x.getState,k=a.URL,M=a.TypeError,P=a.parseInt,L=Math.floor,A=Math.pow,I=c("".charAt),R=c(/./.exec),D=c([].join),j=c(1..toString),F=c([].pop),N=c([].push),B=c("".replace),z=c([].shift),G=c("".split),X=c("".slice),H=c("".toLowerCase),U=c([].unshift),Z="Invalid scheme",q="Invalid host",W="Invalid port",Y=/[a-z]/i,V=/[\d+-.a-z]/i,K=/\d/,$=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,it=/[\t\n\r]/g,ot=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)U(e,t%256),t=L(t/256);return D(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=j(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},st={},at=d({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),lt=d({},at,{"#":1,"?":1,"{":1,"}":1}),ct=d({},lt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(t,e){var n=m(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},ht={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pt=function(t,e){var n;return 2==t.length&&R(Y,I(t,0))&&(":"==(n=I(t,1))||!e&&"|"==n)},ft=function(t){var e;return t.length>1&&pt(X(t,0,2))&&(2==t.length||"/"===(e=I(t,2))||"\\"===e||"?"===e||"#"===e)},dt=function(t){return"."===t||"%2e"===H(t)},gt={},vt={},mt={},yt={},_t={},bt={},wt={},xt={},St={},Et={},Ct={},Tt={},Ot={},kt={},Mt={},Pt={},Lt={},At={},It={},Rt={},Dt={},jt=function(t,e,n){var r,i,o,s=_(t);if(e){if(i=this.parse(s))throw M(i);this.searchParams=null}else{if(void 0!==n&&(r=new jt(n,!0)),i=this.parse(s,null,r))throw M(i);(o=O(new T)).bindURL(this),this.searchParams=o}};jt.prototype={type:"URL",parse:function(t,e,n){var i,o,s,a,l,c=this,u=e||gt,h=0,p="",d=!1,m=!1,y=!1;for(t=_(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=B(t,rt,"")),t=B(t,it,""),i=g(t);h<=i.length;){switch(o=i[h],u){case gt:if(!o||!R(Y,o)){if(e)return Z;u=mt;continue}p+=H(o),u=vt;break;case vt:if(o&&(R(V,o)||"+"==o||"-"==o||"."==o))p+=H(o);else{if(":"!=o){if(e)return Z;p="",u=mt,h=0;continue}if(e&&(c.isSpecial()!=f(ht,p)||"file"==p&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=p,e)return void(c.isSpecial()&&ht[c.scheme]==c.port&&(c.port=null));p="","file"==c.scheme?u=kt:c.isSpecial()&&n&&n.scheme==c.scheme?u=yt:c.isSpecial()?u=xt:"/"==i[h+1]?(u=_t,h++):(c.cannotBeABaseURL=!0,N(c.path,""),u=It)}break;case mt:if(!n||n.cannotBeABaseURL&&"#"!=o)return Z;if(n.cannotBeABaseURL&&"#"==o){c.scheme=n.scheme,c.path=v(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Dt;break}u="file"==n.scheme?kt:bt;continue;case yt:if("/"!=o||"/"!=i[h+1]){u=bt;continue}u=St,h++;break;case _t:if("/"==o){u=Et;break}u=At;continue;case bt:if(c.scheme=n.scheme,o==r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query;else if("/"==o||"\\"==o&&c.isSpecial())u=wt;else if("?"==o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query="",u=Rt;else{if("#"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.path.length--,u=At;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query,c.fragment="",u=Dt}break;case wt:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=At;continue}u=Et}else u=St;break;case xt:if(u=St,"/"!=o||"/"!=I(p,h+1))continue;h++;break;case St:if("/"!=o&&"\\"!=o){u=Et;continue}break;case Et:if("@"==o){d&&(p="%40"+p),d=!0,s=g(p);for(var b=0;b<s.length;b++){var w=s[b];if(":"!=w||y){var x=ut(w,ct);y?c.password+=x:c.username+=x}else y=!0}p=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(d&&""==p)return"Invalid authority";h-=g(p).length+1,p="",u=Ct}else p+=o;break;case Ct:case Tt:if(e&&"file"==c.scheme){u=Pt;continue}if(":"!=o||m){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==p)return q;if(e&&""==p&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(p))return a;if(p="",u=Lt,e)return;continue}"["==o?m=!0:"]"==o&&(m=!1),p+=o}else{if(""==p)return q;if(a=c.parseHost(p))return a;if(p="",u=Ot,e==Tt)return}break;case Ot:if(!R(K,o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||e){if(""!=p){var S=P(p,10);if(S>65535)return W;c.port=c.isSpecial()&&S===ht[c.scheme]?null:S,p=""}if(e)return;u=Lt;continue}return W}p+=o;break;case kt:if(c.scheme="file","/"==o||"\\"==o)u=Mt;else{if(!n||"file"!=n.scheme){u=At;continue}if(o==r)c.host=n.host,c.path=v(n.path),c.query=n.query;else if("?"==o)c.host=n.host,c.path=v(n.path),c.query="",u=Rt;else{if("#"!=o){ft(D(v(i,h),""))||(c.host=n.host,c.path=v(n.path),c.shortenPath()),u=At;continue}c.host=n.host,c.path=v(n.path),c.query=n.query,c.fragment="",u=Dt}}break;case Mt:if("/"==o||"\\"==o){u=Pt;break}n&&"file"==n.scheme&&!ft(D(v(i,h),""))&&(pt(n.path[0],!0)?N(c.path,n.path[0]):c.host=n.host),u=At;continue;case Pt:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!e&&pt(p))u=At;else if(""==p){if(c.host="",e)return;u=Lt}else{if(a=c.parseHost(p))return a;if("localhost"==c.host&&(c.host=""),e)return;p="",u=Lt}continue}p+=o;break;case Lt:if(c.isSpecial()){if(u=At,"/"!=o&&"\\"!=o)continue}else if(e||"?"!=o)if(e||"#"!=o){if(o!=r&&(u=At,"/"!=o))continue}else c.fragment="",u=Dt;else c.query="",u=Rt;break;case At:if(o==r||"/"==o||"\\"==o&&c.isSpecial()||!e&&("?"==o||"#"==o)){if(".."===(l=H(l=p))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||N(c.path,"")):dt(p)?"/"==o||"\\"==o&&c.isSpecial()||N(c.path,""):("file"==c.scheme&&!c.path.length&&pt(p)&&(c.host&&(c.host=""),p=I(p,0)+":"),N(c.path,p)),p="","file"==c.scheme&&(o==r||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)z(c.path);"?"==o?(c.query="",u=Rt):"#"==o&&(c.fragment="",u=Dt)}else p+=ut(o,lt);break;case It:"?"==o?(c.query="",u=Rt):"#"==o?(c.fragment="",u=Dt):o!=r&&(c.path[0]+=ut(o,st));break;case Rt:e||"#"!=o?o!=r&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":ut(o,st)):(c.fragment="",u=Dt);break;case Dt:o!=r&&(c.fragment+=ut(o,at))}h++}},parseHost:function(t){var e,n,r;if("["==I(t,0)){if("]"!=I(t,t.length-1))return q;if(e=function(t){var e,n,r,i,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,p=function(){return I(t,h)};if(":"==p()){if(":"!=I(t,1))return;h+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(e=n=0;n<4&&R(tt,p());)e=16*e+P(p(),16),h++,n++;if("."==p()){if(0==n)return;if(h-=n,c>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;h++}if(!R(K,p()))return;for(;R(K,p());){if(o=P(p(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}l[c]=256*l[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==p()){if(h++,!p())return}else if(p())return;l[c++]=e}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(s=c-u,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a;else if(8!=c)return;return l}(X(t,1,-1)),!e)return q;this.host=e}else if(this.isSpecial()){if(t=y(t),R(et,t))return q;if(e=function(t){var e,n,r,i,o,s,a,l=G(t,".");if(l.length&&""==l[l.length-1]&&l.length--,(e=l.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=l[r]))return t;if(o=10,i.length>1&&"0"==I(i,0)&&(o=R($,i)?16:8,i=X(i,8==o?1:2)),""===i)s=0;else{if(!R(10==o?Q:8==o?J:tt,i))return t;s=P(i,o)}N(n,s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=A(256,5-e))return null}else if(s>255)return null;for(a=F(n),r=0;r<n.length;r++)a+=n[r]*A(256,3-r);return a}(t),null===e)return q;this.host=e}else{if(R(nt,t))return q;for(e="",n=g(t),r=0;r<n.length;r++)e+=ut(n[r],st);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(ht,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&pt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==i?(c+="//",t.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=ot(i),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+D(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(t){var e=this.parse(t);if(e)throw M(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Ft(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ot(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(_(t)+":",gt)},getUsername:function(){return this.username},setUsername:function(t){var e=g(_(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=ut(e[n],ct)}},getPassword:function(){return this.password},setPassword:function(t){var e=g(_(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=ut(e[n],ct)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ot(t):ot(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Ct)},getHostname:function(){var t=this.host;return null===t?"":ot(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Tt)},getPort:function(){var t=this.port;return null===t?"":_(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=_(t))?this.port=null:this.parse(t,Ot))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+D(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Lt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=_(t))?this.query=null:("?"==I(t,0)&&(t=X(t,1)),this.query="",this.parse(t,Rt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=_(t))?("#"==I(t,0)&&(t=X(t,1)),this.fragment="",this.parse(t,Dt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ft=function(t){var e=p(this,Nt),n=w(arguments.length,1)>1?arguments[1]:void 0,r=E(e,new jt(t,!1,n));o||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Nt=Ft.prototype,Bt=function(t,e){return{get:function(){return C(this)[t]()},set:e&&function(t){return C(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(Nt,"href",Bt("serialize","setHref")),h(Nt,"origin",Bt("getOrigin")),h(Nt,"protocol",Bt("getProtocol","setProtocol")),h(Nt,"username",Bt("getUsername","setUsername")),h(Nt,"password",Bt("getPassword","setPassword")),h(Nt,"host",Bt("getHost","setHost")),h(Nt,"hostname",Bt("getHostname","setHostname")),h(Nt,"port",Bt("getPort","setPort")),h(Nt,"pathname",Bt("getPathname","setPathname")),h(Nt,"search",Bt("getSearch","setSearch")),h(Nt,"searchParams",Bt("getSearchParams")),h(Nt,"hash",Bt("getHash","setHash"))),u(Nt,"toJSON",(function(){return C(this).serialize()}),{enumerable:!0}),u(Nt,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),k){var zt=k.createObjectURL,Gt=k.revokeObjectURL;zt&&u(Ft,"createObjectURL",l(zt,k)),Gt&&u(Ft,"revokeObjectURL",l(Gt,k))}b(Ft,"URL"),i({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ft})},285:(t,e,n)=>{n(8789)},1787:(t,e,n)=>{var r=n(4056),i=n(9500),o=n(9181),s=n(5432).Z,a=o.featureEach,l=(o.coordEach,i.polygon,i.featureCollection);function c(t){var e=new r(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),r.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})),r.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),r.prototype.remove.call(this,t,e)},e.clear=function(){return r.prototype.clear.call(this)},e.search=function(t){var e=r.prototype.search.call(this,this.toBBox(t));return l(e)},e.collides=function(t){return r.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=r.prototype.all.call(this);return l(t)},e.toJSON=function(){return r.prototype.toJSON.call(this)},e.fromJSON=function(t){return r.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=c,t.exports.default=c},9500:(t,e)=>{"use strict";function n(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function r(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function i(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:t},e,r)}function o(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:t},e,r)}function s(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function a(t,e,r){return void 0===r&&(r={}),n({type:"MultiLineString",coordinates:t},e,r)}function l(t,e,r){return void 0===r&&(r={}),n({type:"MultiPoint",coordinates:t},e,r)}function c(t,e,r){return void 0===r&&(r={}),n({type:"MultiPolygon",coordinates:t},e,r)}function u(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function h(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function p(t){return 180*(t%(2*Math.PI))/Math.PI}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=n,e.geometry=function(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return r(e).geometry;case"LineString":return o(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return l(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return c(e).geometry;default:throw new Error(t+" is invalid")}},e.point=r,e.points=function(t,e,n){return void 0===n&&(n={}),s(t.map((function(t){return r(t,e)})),n)},e.polygon=i,e.polygons=function(t,e,n){return void 0===n&&(n={}),s(t.map((function(t){return i(t,e)})),n)},e.lineString=o,e.lineStrings=function(t,e,n){return void 0===n&&(n={}),s(t.map((function(t){return o(t,e)})),n)},e.featureCollection=s,e.multiLineString=a,e.multiPoint=l,e.multiPolygon=c,e.geometryCollection=function(t,e,r){return void 0===r&&(r={}),n({type:"GeometryCollection",geometries:t},e,r)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=u,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return p(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=p,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return u(h(t,e),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=f,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!f(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},9181:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9500);function i(t,e,n){if(null!==t)for(var r,o,s,a,l,c,u,h,p=0,f=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;y<m;y++){l=(h=!!(u=g?t.features[y].geometry:v?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var _=0;_<l;_++){var b=0,w=0;if(null!==(a=h?u.geometries[_]:u)){c=a.coordinates;var x=a.type;switch(p=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(c,f,y,b,w))return!1;f++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===e(c[r],f,y,b,w))return!1;f++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-p;o++){if(!1===e(c[r][o],f,y,b,w))return!1;f++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(w=0,o=0;o<c[r].length;o++){for(s=0;s<c[r][o].length-p;s++){if(!1===e(c[r][o][s],f,y,b,w))return!1;f++}w++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===i(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function a(t,e){var n,r,i,o,s,a,l,c,u,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,c=f?t.features[n].properties:d?t.properties:{},u=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,c,u,h))return!1;p++}}function l(t,e){a(t,(function(t,n,i,o,s){var a,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(r.feature(t,i,{bbox:o,id:s}),n,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var c=0;c<t.coordinates.length;c++){var u={type:a,coordinates:t.coordinates[c]};if(!1===e(r.feature(u,i),n,c))return!1}}))}function c(t,e){l(t,(function(t,n,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,c=0,u=0,h=0;return!1!==i(t,(function(i,a,p,f,d){if(void 0===l||n>c||f>u||d>h)return l=i,c=n,u=f,h=d,void(s=0);var g=r.lineString([l,i],t.properties);if(!1===e(g,n,o,d,s))return!1;s++,l=i}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(r.lineString(s[a],t.properties),n,i,a))return!1}}}))}e.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},e.coordEach=i,e.coordReduce=function(t,e,n,r){var o=n;return i(t,(function(t,r,i,s,a){o=0===r&&void 0===n?t:e(o,t,r,i,s,a)}),r),o},e.featureEach=s,e.featureReduce=function(t,e,n){var r=n;return s(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r},e.findPoint=function(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":l=l||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":return r.point(c,l,e);case"MultiPoint":return o<0&&(o=c.length+o),r.point(c[o],l,e);case"LineString":return a<0&&(a=c.length+a),r.point(c[a],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a),r.point(c[s][a],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),r.point(c[o][a],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a),r.point(c[o][s][a],l,e)}throw new Error("geojson is invalid")},e.findSegment=function(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":l=l||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=c.length+a-1),r.lineString([c[a],c[a+1]],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a-1),r.lineString([c[s][a],c[s][a+1]],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a-1),r.lineString([c[o][a],c[o][a+1]],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a-1),r.lineString([c[o][s][a],c[o][s][a+1]],l,e)}throw new Error("geojson is invalid")},e.flattenEach=l,e.flattenReduce=function(t,e,n){var r=n;return l(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r},e.geomEach=a,e.geomReduce=function(t,e,n){var r=n;return a(t,(function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)})),r},e.lineEach=u,e.lineReduce=function(t,e,n){var r=n;return u(t,(function(t,i,o,s){r=0===i&&void 0===n?t:e(r,t,i,o,s)})),r},e.propEach=o,e.propReduce=function(t,e,n){var r=n;return o(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r},e.segmentEach=c,e.segmentReduce=function(t,e,n){var r=n,i=!1;return c(t,(function(t,o,s,a,l){r=!1===i&&void 0===n?t:e(r,t,o,s,a,l),i=!0})),r}},4056:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(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 i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(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 c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=i(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.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 n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<o?(o=h,i=c<i?c:i,s=l):h===o&&c<i&&(i=c,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,c,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),v=s(t,d,n,this.toBBox),m=(i=g,o=v,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),y=u(g)+u(v);m<p?(p=m,r=d,f=y<f?y:f):m===p&&y<f&&(f=y,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),c=h(o)+h(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?i(p):p),c+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},2846:t=>{t.exports=/<%=([\s\S]+?)%>/g},6816:(t,e,n)=>{t=n.nmd(t);var r=n(2846),i=n(8502),o=9007199254740991,s="[object Arguments]",a="[object Error]",l="[object Function]",c="[object Object]",u="[object Symbol]",h=/\b__p \+= '';/g,p=/\b(__p \+=) '' \+/g,f=/(__e\(.*?\)|\b__t\)) \+\n'';/g,d=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/^\[object .+?Constructor\]$/,v=/^(?:0|[1-9]\d*)$/,m=/($^)/,y=/['\n\r\u2028\u2029\\]/g,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[s]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object Boolean]"]=_["[object DataView]"]=_["[object Date]"]=_[a]=_[l]=_["[object Map]"]=_["[object Number]"]=_[c]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object WeakMap]"]=!1;var b={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},w="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,x="object"==typeof self&&self&&self.Object===Object&&self,S=w||x||Function("return this")(),E=e&&!e.nodeType&&e,C=E&&t&&!t.nodeType&&t,T=C&&C.exports===E,O=T&&w.process,k=function(){try{var t=C&&C.require&&C.require("util").types;return t||O&&O.binding&&O.binding("util")}catch(t){}}(),M=k&&k.isTypedArray;function P(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function L(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function A(t){return"\\"+b[t]}function I(t,e){return function(n){return t(e(n))}}var R,D=Function.prototype,j=Object.prototype,F=S["__core-js_shared__"],N=D.toString,B=j.hasOwnProperty,z=(R=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"",G=j.toString,X=N.call(Object),H=RegExp("^"+N.call(B).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=T?S.Buffer:void 0,Z=S.Symbol,q=I(Object.getPrototypeOf,Object),W=j.propertyIsEnumerable,Y=Z?Z.toStringTag:void 0,V=function(){try{var t=function(t){return!(!Ot(t)||function(t){return!!z&&z in t}(t))&&(Ct(t)?H:g).test(function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}(e=function(t,e){return null==t?void 0:t[e]}(Object,"defineProperty"))?e:void 0;return t({},"",{}),t}catch(t){}var e}(),K=U?U.isBuffer:void 0,$=I(Object.keys,Object),J=Math.max,Q=Date.now,tt=Z?Z.prototype:void 0,et=tt?tt.toString:void 0;function nt(t,e){var n=wt(t),r=!n&&bt(t),i=!n&&!r&&St(t),o=!n&&!r&&!i&&Mt(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=a.length;for(var c in t)!e&&!B.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pt(c,l))||a.push(c);return a}function rt(t,e,n){var r=t[e];B.call(t,e)&&_t(r,n)&&(void 0!==n||e in t)||it(t,e,n)}function it(t,e,n){"__proto__"==e&&V?V(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ot(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Y&&Y in Object(t)?function(t){var e=B.call(t,Y),n=t[Y];try{t[Y]=void 0;var r=!0}catch(t){}var i=G.call(t);r&&(e?t[Y]=n:delete t[Y]);return i}(t):function(t){return G.call(t)}(t)}function st(t){return kt(t)&&ot(t)==s}function at(t){if(!Ot(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=dt(t),n=[];for(var r in t)("constructor"!=r||!e&&B.call(t,r))&&n.push(r);return n}function lt(t,e){return yt(function(t,e,n){return e=J(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=J(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),P(t,this,a)}}(t,e,Rt),t+"")}var ct=V?function(t,e){return V(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Rt;function ut(t){if("string"==typeof t)return t;if(wt(t))return L(t,ut)+"";if(function(t){return"symbol"==typeof t||kt(t)&&ot(t)==u}(t))return et?et.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function ht(t,e,n,r){return void 0===t||_t(t,j[n])&&!B.call(r,n)?e:t}function pt(t,e){var n=typeof t;return!!(e=null==e?o:e)&&("number"==n||"symbol"!=n&&v.test(t))&&t>-1&&t%1==0&&t<e}function ft(t,e,n){if(!Ot(n))return!1;var r=typeof e;return!!("number"==r?xt(n)&&pt(e,n.length):"string"==r&&e in n)&&_t(n[e],t)}function dt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||j)}var gt,vt,mt,yt=(gt=ct,vt=0,mt=0,function(){var t=Q(),e=16-(t-mt);if(mt=t,e>0){if(++vt>=800)return arguments[0]}else vt=0;return gt.apply(void 0,arguments)});function _t(t,e){return t===e||t!=t&&e!=e}var bt=st(function(){return arguments}())?st:function(t){return kt(t)&&B.call(t,"callee")&&!W.call(t,"callee")},wt=Array.isArray;function xt(t){return null!=t&&Tt(t.length)&&!Ct(t)}var St=K||function(){return!1};function Et(t){if(!kt(t))return!1;var e=ot(t);return e==a||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!function(t){if(!kt(t)||ot(t)!=c)return!1;var e=q(t);if(null===e)return!0;var n=B.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&N.call(n)==X}(t)}function Ct(t){if(!Ot(t))return!1;var e=ot(t);return e==l||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Tt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function Ot(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function kt(t){return null!=t&&"object"==typeof t}var Mt=M?function(t){return function(e){return t(e)}}(M):function(t){return kt(t)&&Tt(t.length)&&!!_[ot(t)]};var Pt,Lt=(Pt=function(t,e,n,r){!function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?it(n,a,l):rt(n,a,l)}}(e,function(t){return xt(t)?nt(t,!0):at(t)}(e),t,r)},lt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Pt.length>3&&"function"==typeof i?(r--,i):void 0,o&&ft(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Pt(t,s,n,i)}return t})));function At(t){return xt(t)?nt(t):function(t){if(!dt(t))return $(t);var e=[];for(var n in Object(t))B.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var It=lt((function(t,e){try{return P(t,void 0,e)}catch(t){return Et(t)?t:new Error(t)}}));function Rt(t){return t}t.exports=function(t,e,n){var o,s=i.imports._.templateSettings||i;n&&ft(t,e,n)&&(e=void 0),t=null==(o=t)?"":ut(o),e=Lt({},e,s,ht);var a,l,c,u=Lt({},e.imports,s.imports,ht),g=At(u),v=(a=u,L(g,(function(t){return a[t]}))),_=0,b=e.interpolate||m,w="__p += '",x=RegExp((e.escape||m).source+"|"+b.source+"|"+(b===r?d:m).source+"|"+(e.evaluate||m).source+"|$","g"),S=B.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";t.replace(x,(function(e,n,r,i,o,s){return r||(r=i),w+=t.slice(_,s).replace(y,A),n&&(l=!0,w+="' +\n__e("+n+") +\n'"),o&&(c=!0,w+="';\n"+o+";\n__p += '"),r&&(w+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),_=s+e.length,e})),w+="';\n";var E=B.call(e,"variable")&&e.variable;E||(w="with (obj) {\n"+w+"\n}\n"),w=(c?w.replace(h,""):w).replace(p,"$1").replace(f,"$1;"),w="function("+(E||"obj")+") {\n"+(E?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+w+"return __p\n}";var C=It((function(){return Function(g,S+"return "+w).apply(void 0,v)}));if(C.source=w,Et(C))throw C;return C}},8502:(t,e,n)=>{var r=n(2846),i="[object Symbol]",o=/[&<>"']/g,s=RegExp(o.source),a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=a||l||Function("return this")();var u,h=(u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},function(t){return null==u?void 0:u[t]}),p=Object.prototype,f=p.hasOwnProperty,d=p.toString,g=c.Symbol,v=g?g.toStringTag:void 0,m=g?g.prototype:void 0,y=m?m.toString:void 0,_={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:r,variable:"",imports:{_:{escape:function(t){return(t=S(t))&&s.test(t)?t.replace(o,h):t}}}};function b(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var e=f.call(t,v),n=t[v];try{t[v]=void 0;var r=!0}catch(t){}var i=d.call(t);r&&(e?t[v]=n:delete t[v]);return i}(t):function(t){return d.call(t)}(t)}function w(t){if("string"==typeof t)return t;if(x(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,w)+"";if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&b(t)==i}(t))return y?y.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}var x=Array.isArray;function S(t){return null==t?"":w(t)}t.exports=_},5025:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r="ol-ctx-menu",i={namespace:r,container:r+"-container",separator:r+"-separator",submenu:r+"-submenu",hidden:r+"-hidden",icon:r+"-icon",zoomIn:r+"-zoom-in",zoomOut:r+"-zoom-out",unselectable:"ol-unselectable"},o=i,s="beforeopen",a="open",l="close",c="contextmenu",u={width:150,scrollAt:4,eventType:c,defaultItems:!0},h=[{text:"Zoom In",classname:i.zoomIn+" "+i.icon,callback:function(t,e){var n=e.getView();n.animate({zoom:+n.getZoom()+1,duration:700,center:t.coordinate})}},{text:"Zoom Out",classname:i.zoomOut+" "+i.icon,callback:function(t,e){var n=e.getView();n.animate({zoom:+n.getZoom()-1,duration:700,center:t.coordinate})}}];function p(t,e){if(void 0===e&&(e="Assertion failed"),!t){if("undefined"!=typeof Error)throw new Error(e);throw e}}function f(t){return/^\d+$/.test(t)}function d(t,e){return t.classList?t.classList.contains(e):y(e).test(t.className)}function g(t,e,n){void 0===e&&(e=window.document);var r=Array.prototype.slice,i=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(t))switch(t[0]){case"#":i=[v(t.substr(1))];break;case".":i=r.call(e.getElementsByClassName(t.substr(1).replace(/\./g," ")));break;default:i=r.call(e.getElementsByTagName(t))}else i=r.call(e.querySelectorAll(t));return n?i:i[0]}function v(t){return t="#"===t[0]?t.substr(1,t.length):t,document.getElementById(t)}function m(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e}function y(t){return new RegExp("(^|\\s+) "+t+" (\\s+|$)")}function _(t,e,n){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim(),n&&f(n)&&window.setTimeout((function(){return b(t,e)}),n)}function b(t,e,n){t.classList?t.classList.remove(e):t.className=t.className.replace(y(e)," ").trim(),n&&f(n)&&window.setTimeout((function(){return _(t,e)}),n)}var w=function(t){return this.Base=t,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:t.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};w.prototype.init=function(t){this.map=t,this.viewport=t.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},w.prototype.getItemsLength=function(){var t=this,e=0;return Object.keys(this.items).forEach((function(n){t.items[n].submenu||t.items[n].separator||e++})),e},w.prototype.getPixelClicked=function(){return this.pixelClicked},w.prototype.getCoordinateClicked=function(){return this.coordinateClicked},w.prototype.positionContainer=function(t){var e=this,n=this.Base.container,r=this.map.getSize(),i=r[1]-t[1],s=r[0]-t[0],a=n.offsetWidth,l=Math.round(this.lineHeight*this.getItemsLength()),c=g("li."+o.submenu+">div",n,!0);s>=a?(n.style.right="auto",n.style.left=t[0]+5+"px"):(n.style.left="auto",n.style.right="15px"),i>=l?(n.style.bottom="auto",n.style.top=t[1]-10+"px"):(n.style.top="auto",n.style.bottom=0),function t(e,n,r){if(Array.isArray(e))e.forEach((function(e){return t(e,n,r)}));else for(var i=Array.isArray(n)?n:n.split(/\s+/),o=i.length;o--;)d(e,i[o])&&b(e,i[o],r)}(n,o.hidden),c.length&&(this.submenu.lastLeft=s<2*a?"-"+a+"px":this.submenu.left,c.forEach((function(t){var n,r,o,s={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},a=(r=(n=t).getBoundingClientRect(),o=document.documentElement,{left:r.left+window.pageXOffset-o.clientLeft,top:r.top+window.pageYOffset-o.clientTop,width:n.offsetWidth,height:n.offsetHeight}),l=a.height,c=i-l;c<0&&(c=l-(s.h-a.top),t.style.top="-"+c+"px"),t.style.left=e.submenu.lastLeft})))},w.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:a,pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},w.prototype.closeMenu=function(){this.opened=!1,function t(e,n,r){if(Array.isArray(e))e.forEach((function(e){return t(e,n)}));else for(var i=Array.isArray(n)?n:n.split(/\s+/),o=i.length;o--;)d(e,i[o])||_(e,i[o],r)}(this.Base.container,o.hidden),this.Base.dispatchEvent({type:l})},w.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},w.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},w.prototype.handleEvent=function(t){var e=this;this.coordinateClicked=this.map.getEventCoordinate(t),this.pixelClicked=this.map.getEventPixel(t),this.Base.dispatchEvent({type:s,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(t.stopPropagation(),t.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),t.target.addEventListener("pointerdown",{handleEvent:function(n){e.opened&&(e.closeMenu(),n.stopPropagation(),t.target.removeEventListener(n.type,this,!1))}},!1))},w.prototype.handleMapMoveEvent=function(t){this.closeMenu()},w.prototype.setItemListener=function(t,e){var n,r=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("click",(function(t){t.preventDefault();var i={coordinate:r.getCoordinateClicked(),data:r.items[e].data||null};r.closeMenu(),n(i,r.map)}),!1))};var x=function(t){return this.Base=t,this.Base.container=this.container=this.createContainer(!0),this};return x.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),r=[o.container,o.unselectable];return t&&r.push(o.hidden),e.className=r.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},x.prototype.createMenu=function(){var t=[];if("items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(h):this.Base.options.items:this.Base.options.defaultItems&&(t=h),0===t.length)return!1;t.forEach(this.addMenuEntry,this)},x.prototype.addMenuEntry=function(t){var e,n=this;if(t.items&&Array.isArray(t.items)){t.classname=t.classname||"",e=o.submenu,~t.classname.indexOf(e)||(t.classname=t.classname.length?" "+o.submenu:o.submenu);var r=this.generateHtmlAndPublish(this.container,t),i=this.createContainer();i.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,r.appendChild(i),t.items.forEach((function(t){n.generateHtmlAndPublish(i,t,!0)}))}else this.generateHtmlAndPublish(this.container,t)},x.prototype.generateHtmlAndPublish=function(t,e,n){var r,i,s="_"+Math.random().toString(36).substr(2,9),a=!1;return"string"==typeof e&&"-"===e.trim()?(r=m('<li id="'+s+'" class="'+o.separator+'"><hr></li>'),i=[].slice.call(r.childNodes,0)[0],t.firstChild.appendChild(r),a=!0):(e.classname=e.classname||"",r=m("<span>"+e.text+"</span>"),i=document.createElement("li"),e.icon&&(""===e.classname?e.classname=o.icon:-1===e.classname.indexOf(o.icon)&&(e.classname+=" "+o.icon),i.setAttribute("style","background-image:url("+e.icon+")")),i.id=s,i.className=e.classname,i.appendChild(r),t.firstChild.appendChild(i)),this.Base.Internal.items[s]={id:s,submenu:n||0,separator:a,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(i,s),i},x.prototype.removeMenuEntry=function(t){var e=g("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},x.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=m("<span>Foo</span>"),n=m("<span>Foo</span>"),r=document.createElement("li"),i=document.createElement("li");r.appendChild(e),i.appendChild(n),t.appendChild(r),t.appendChild(i),this.container.parentNode.appendChild(t);var o=t.offsetHeight/2;return this.container.parentNode.removeChild(t),o},function(t){function e(e){void 0===e&&(e={}),p("object"==typeof e,"@param `opt_options` should be object type!"),this.options=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var i in e)n[i]=e[i];return n}(u,e),this.disabled=!1,this.Internal=new w(this),this.Html=new x(this),t.call(this,{element:this.container})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},e.prototype.close=function(){this.Internal.closeMenu()},e.prototype.enable=function(){this.disabled=!1},e.prototype.disable=function(){this.disabled=!0},e.prototype.getDefaultItems=function(){return h},e.prototype.countItems=function(){return Object.keys(this.Internal.items).length},e.prototype.extend=function(t){p(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},e.prototype.isOpen=function(){return this.Internal.opened},e.prototype.updatePosition=function(t){p(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},e.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},e.prototype.push=function(t){p(null!=t,"@param `item` must be informed."),this.Html.addMenuEntry(t)},e.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e?this.Internal.init(e,this):this.Internal.removeListeners()},e}(n.default)}(n(8775))},4331:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(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 i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(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 c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=i(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.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 n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<o?(o=h,i=c<i?c:i,s=l):h===o&&c<i&&(i=c,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,c,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),v=s(t,d,n,this.toBBox),m=(i=g,o=v,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),y=u(g)+u(v);m<p?(p=m,r=d,f=y<f?y:f):m===p&&y<f&&(f=y,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),c=h(o)+h(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?i(p):p),c+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},1895:t=>{t.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var a=(r-n)/2,l=0,c=a-1;l<a;c=l++){var u=e[n+2*l+0],h=e[n+2*l+1],p=e[n+2*c+0],f=e[n+2*c+1];h>o!=f>o&&i<(p-u)*(o-h)/(f-h)+u&&(s=!s)}return s}},6960:(t,e,n)=>{var r=n(1895),i=n(8139);t.exports=function(t,e,n,o){return e.length>0&&Array.isArray(e[0])?i(t,e,n,o):r(t,e,n,o)},t.exports.nested=i,t.exports.flat=r},8139:t=>{t.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var a=r-n,l=0,c=a-1;l<a;c=l++){var u=e[l+n][0],h=e[l+n][1],p=e[c+n][0],f=e[c+n][1];h>o!=f>o&&i<(p-u)*(o-h)/(f-h)+u&&(s=!s)}return s}},2676:function(t){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}var r=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function i(t,e){return t>e?1:t<e?-1:0}function o(t,e,n){for(var i=new r(null,null),o=i,s=i;;){var a=n(t,e.key);if(a<0){if(null===e.left)break;if(n(t,e.left.key)<0){var l=e.left;if(e.left=l.right,l.right=e,null===(e=l).left)break}s.left=e,s=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(l=e.right,e.right=l.left,l.left=e,null===(e=l).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=i.right,e.right=i.left,e}function s(t,e,n,i){var s=new r(t,e);if(null===n)return s.left=s.right=null,s;var a=i(t,(n=o(t,n,i)).key);return a<0?(s.left=n.left,s.right=n,n.left=null):a>=0&&(s.right=n.right,s.left=n,n.right=null),s}function a(t,e,n){var r=null,i=null;if(e){var s=n((e=o(t,e,n)).key,t);0===s?(r=e.left,i=e.right):s<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function l(t,e,n){return null===e?t:(null===t||((e=o(t.key,e,n)).left=t),e)}function c(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&c(t.left,o,!1,r,i),t.right&&c(t.right,o,!0,r,i)}}var u=function(){function t(t){void 0===t&&(t=i),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new r(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=o(t,this._root,i),a=i(t,s.key);return 0===a?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=o(t,e,n)).key)?(null===e.left?r=e.right:(r=o(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,s=this._root;0!==i.length||s;)if(s)i.push(s),s=s.left;else{if(o((s=i.pop()).key,e)>0)break;if(o(s.key,t)>=0&&n.call(r,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return f(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&v(t,e,0,r-1,i),null===this._root)this._root=h(t,e,0,r),this._size=r;else{var o=g(this.toList(),p(t,e),i);r=this._size+r,this._root=d({head:o},0,r)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return c(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var r=this._comparator,i=a(t,this._root,r),o=i.left,c=i.right;r(t,e)<0?c=s(e,n,c,r):o=s(e,n,o,r),this._root=l(o,c,r)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function h(t,e,n,i){var o=i-n;if(o>0){var s=n+Math.floor(o/2),a=t[s],l=e[s],c=new r(a,l);return c.left=h(t,e,n,s),c.right=h(t,e,s+1,i),c}return null}function p(t,e){for(var n=new r(null,null),i=n,o=0;o<t.length;o++)i=i.next=new r(t[o],e[o]);return i.next=null,n.next}function f(t){for(var e=t,n=[],i=!1,o=new r(null,null),s=o;!i;)e?(n.push(e),e=e.left):n.length>0?e=(e=s=s.next=n.pop()).right:i=!0;return s.next=null,o.next}function d(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=d(t,e,i),s=t.head;return s.left=o,t.head=t.head.next,s.right=d(t,i+1,n),s}return null}function g(t,e,n){for(var i=new r(null,null),o=i,s=t,a=e;null!==s&&null!==a;)n(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),i.next}function v(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],s=n-1,a=r+1;;){do{s++}while(i(t[s],o)<0);do{a--}while(i(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}v(t,e,n,a,i),v(t,e,a+1,r,i)}}var m=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},y=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},_=Number.EPSILON;void 0===_&&(_=Math.pow(2,-52));var b=_*_,w=function(t,e){if(-_<t&&t<_&&-_<e&&e<_)return 0;var n=t-e;return n*n<b*t*e?0:t<e?-1:1},x=function(){function e(){t(this,e),this.reset()}return n(e,[{key:"reset",value:function(){this.xRounder=new S,this.yRounder=new S}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),e}(),S=function(){function e(){t(this,e),this.tree=new u,this.round(0)}return n(e,[{key:"round",value:function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===w(e.key,n.key))return this.tree.remove(t),n.key;var r=this.tree.next(e);return null!==r&&0===w(e.key,r.key)?(this.tree.remove(t),r.key):t}}]),e}(),E=new x,C=function(t,e){return t.x*e.y-t.y*e.x},T=function(t,e){return t.x*e.x+t.y*e.y},O=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y},o=C(r,i);return w(o,0)},k=function(t){return Math.sqrt(T(t,t))},M=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return C(i,r)/k(i)/k(r)},P=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return T(i,r)/k(i)/k(r)},L=function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},A=function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},I=function(t,e,n,r){if(0===e.x)return A(n,r,t.x);if(0===r.x)return A(t,e,n.x);if(0===e.y)return L(n,r,t.y);if(0===r.y)return L(t,e,n.y);var i=C(e,r);if(0==i)return null;var o={x:n.x-t.x,y:n.y-t.y},s=C(o,e)/i,a=C(o,r)/i;return{x:(t.x+a*e.x+(n.x+s*r.x))/2,y:(t.y+a*e.y+(n.y+s*r.y))/2}},R=function(){function e(n,r){t(this,e),void 0===n.events?n.events=[this]:n.events.push(this),this.point=n,this.isLeft=r}return n(e,null,[{key:"compare",value:function(t,n){var r=e.comparePoints(t.point,n.point);return 0!==r?r:(t.point!==n.point&&t.link(n),t.isLeft!==n.isLeft?t.isLeft?1:-1:j.compare(t.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n<r;n++){var i=e[n];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var r=e+1;r<t;r++){var i=this.point.events[r];void 0===i.consumedBy&&n.otherSE.point.events===i.otherSE.point.events&&n.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var r=this.point.events[e];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&t.push(r)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,r=function(r){var i=r.otherSE;n.set(r,{sine:M(e.point,t.point,i.point),cosine:P(e.point,t.point,i.point)})};return function(t,e){n.has(t)||r(t),n.has(e)||r(e);var i=n.get(t),o=i.sine,s=i.cosine,a=n.get(e),l=a.sine,c=a.cosine;return o>=0&&l>=0?s<c?1:s>c?-1:0:o<0&&l<0?s<c?-1:s>c?1:0:l<o?-1:l>o?1:0}}}]),e}(),D=0,j=function(){function e(n,r,i,o){t(this,e),this.id=++D,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=i,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(n<r){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;var u=t.comparePoint(e.leftSE.point);if(u<0)return 1;if(u>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>r){if(s<a&&s<c)return-1;if(s>a&&s>c)return 1;var p=e.comparePoint(t.leftSE.point);if(0!==p)return p;var f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(i<o){var d=e.comparePoint(t.rightSE.point);if(0!==d)return d}if(i>o){var g=t.comparePoint(e.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==o){var v=l-s,m=i-n,y=c-a,_=o-r;if(v>m&&y<_)return 1;if(v<m&&y>_)return-1}return i>o?1:i<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;var s=(t.x-e.x)/r.x,a=e.y+s*r.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),r=y(e,n);if(null===r)return null;var i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=m(e,s)&&0===this.comparePoint(s),c=m(n,i)&&0===t.comparePoint(i),u=m(e,a)&&0===this.comparePoint(a),h=m(n,o)&&0===t.comparePoint(o);if(c&&l)return h&&!u?o:!h&&u?a:null;if(c)return u&&i.x===a.x&&i.y===a.y?null:i;if(l)return h&&o.x===s.x&&o.y===s.y?null:s;if(h&&u)return null;if(h)return o;if(u)return a;var p=I(i,this.vector(),s,t.vector());return null===p?null:m(r,p)?E.round(p.x,p.y):null}},{key:"split",value:function(t){var n=[],r=void 0!==t.events,i=new R(t,!0),o=new R(t,!1),s=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);var a=new e(i,s,this.rings.slice(),this.windings.slice());return R.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(t){for(var n=this,r=t;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var i=e.compare(n,r);if(0!==i){if(i>0){var o=n;n=r,r=o}if(n.prev===r){var s=n;n=r,r=s}for(var a=0,l=r.rings.length;a<l;a++){var c=r.rings[a],u=r.windings[a],h=n.rings.indexOf(c);-1===h?(n.rings.push(c),n.windings.push(u)):n.windings[h]+=u}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return 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(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var s=this.rings[i],a=this.windings[i],l=e.indexOf(s);-1===l?(e.push(s),n.push(a)):n[l]+=a}for(var c=[],u=[],h=0,p=e.length;h<p;h++)if(0!==n[h]){var f=e[h],d=f.poly;if(-1===u.indexOf(d))if(f.isExterior)c.push(d);else{-1===u.indexOf(d)&&u.push(d);var g=c.indexOf(f.poly);-1!==g&&c.splice(g,1)}}for(var v=0,m=c.length;v<m;v++){var y=c[v].multiPoly;-1===r.indexOf(y)&&r.push(y)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(q.type){case"union":var n=0===t.length,r=0===e.length;this._isInResult=n!==r;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===q.numMultiPolys&&i<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2==1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat(q.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,n,r){var i,o,s,a=R.comparePoints(t,n);if(a<0)i=t,o=n,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=n,o=t,s=-1}return new e(new R(i,!0),new R(o,!1),[r],[s])}}]),e}(),F=function(){function e(n,r,i){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],"number"!=typeof n[0][0]||"number"!=typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=E.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,l=n.length;a<l;a++){if("number"!=typeof n[a][0]||"number"!=typeof n[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var c=E.round(n[a][0],n[a][1]);c.x===s.x&&c.y===s.y||(this.segments.push(j.fromRing(s,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),s=c)}o.x===s.x&&o.y===s.y||this.segments.push(j.fromRing(s,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var r=this.segments[e];t.push(r.leftSE),t.push(r.rightSE)}return t}}]),e}(),N=function(){function e(n,r){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new F(n[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 i=1,o=n.length;i<o;i++){var s=new F(n[i],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=r}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var r=this.interiorRings[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),e}(),B=function(){function e(n,r){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof n[0][0][0]&&(n=[n])}catch(t){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,o=n.length;i<o;i++){var s=new N(n[i],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=r}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var r=this.polys[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),e}(),z=function(){function e(n){t(this,e),this.events=n;for(var r=0,i=n.length;r<i;r++)n[r].segment.ringOut=this;this.poly=null}return n(e,null,[{key:"factory",value:function(t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,l=o.rightSE,c=[a],u=a.point,h=[];s=a,a=l,c.push(a),a.point!==u;)for(;;){var p=a.getAvailableLinkedEvents();if(0===p.length){var f=c[0].point,d=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(f.x,",")+" ".concat(f.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===p.length){l=p[0].otherSE;break}for(var g=null,v=0,m=h.length;v<m;v++)if(h[v].point===a.point){g=v;break}if(null===g){h.push({index:c.length,point:a.point});var y=a.getLeftmostComparator(s);l=p.sort(y)[0].otherSE;break}var _=h.splice(g)[0],b=c.splice(_.index);b.unshift(b[0].otherSE),n.push(new e(b.reverse()))}n.push(new e(c))}}return n}}]),n(e,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,r=this.events.length-1;n<r;n++){var i=this.events[n].point,o=this.events[n+1].point;0!==O(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var s=e[0],a=e[1];0===O(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,c=this.isExteriorRing()?0:e.length-1,u=this.isExteriorRing()?e.length:-1,h=[],p=c;p!=u;p+=l)h.push([e[p].x,e[p].y]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var r=this.events[e];R.compare(t,r)>0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),G=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var r=this.interiorRings[e].getGeom();null!==r&&t.push(r)}return t}}]),e}(),X=function(){function e(n){t(this,e),this.rings=n,this.polys=this._composePolys(n)}return n(e,[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var r=this.polys[e].getGeom();null!==r&&t.push(r)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new G(i));else{var o=i.enclosingRing();o.poly||e.push(new G(o)),o.poly.addInterior(i)}}return e}}]),e}(),H=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j.compare;t(this,e),this.queue=n,this.tree=new u(r),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,s=void 0,a=void 0;void 0===s;)null===(i=this.tree.prev(i))?s=null:void 0===i.key.consumedBy&&(s=i.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var l=null;if(s){var c=s.getIntersection(e);if(null!==c&&(e.isAnEndpoint(c)||(l=c),!s.isAnEndpoint(c)))for(var u=this._splitSafely(s,c),h=0,p=u.length;h<p;h++)n.push(u[h])}var f=null;if(a){var d=a.getIntersection(e);if(null!==d&&(e.isAnEndpoint(d)||(f=d),!a.isAnEndpoint(d)))for(var g=this._splitSafely(a,d),v=0,m=g.length;v<m;v++)n.push(g[v])}if(null!==l||null!==f){var y=null;y=null===l?f:null===f||R.comparePoints(l,f)<=0?l:f,this.queue.remove(e.rightSE),n.push(e.rightSE);for(var _=e.split(y),b=0,w=_.length;b<w;b++)n.push(_[b])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var x=s.getIntersection(a);if(null!==x){if(!s.isAnEndpoint(x))for(var S=this._splitSafely(s,x),E=0,C=S.length;E<C;E++)n.push(S[E]);if(!a.isAnEndpoint(x))for(var T=this._splitSafely(a,x),O=0,k=T.length;O<k;O++)n.push(T[O])}}this.tree.remove(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.insert(t),r}}]),e}(),U="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Z="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,q=new(function(){function e(){t(this,e)}return n(e,[{key:"run",value:function(t,e,n){q.type=t,E.reset();for(var r=[new B(e,!0)],i=0,o=n.length;i<o;i++)r.push(new B(n[i],!1));if(q.numMultiPolys=r.length,"difference"===q.type)for(var s=r[0],a=1;a<r.length;)null!==y(r[a].bbox,s.bbox)?a++:r.splice(a,1);if("intersection"===q.type)for(var l=0,c=r.length;l<c;l++)for(var h=r[l],p=l+1,f=r.length;p<f;p++)if(null===y(h.bbox,r[p].bbox))return[];for(var d=new u(R.compare),g=0,v=r.length;g<v;g++)for(var m=r[g].getSweepEvents(),_=0,b=m.length;_<b;_++)if(d.insert(m[_]),d.size>U)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var w=new H(d),x=d.size,S=d.pop();S;){var C=S.key;if(d.size===x){var T=C.segment;throw new Error("Unable to pop() ".concat(C.isLeft?"left":"right"," SweepEvent ")+"[".concat(C.point.x,", ").concat(C.point.y,"] from segment #").concat(T.id," ")+"[".concat(T.leftSE.point.x,", ").concat(T.leftSE.point.y,"] -> ")+"[".concat(T.rightSE.point.x,", ").concat(T.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>U)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(w.segments.length>Z)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var O=w.process(C),k=0,M=O.length;k<M;k++){var P=O[k];void 0===P.consumedBy&&d.insert(P)}x=d.size,S=d.pop()}E.reset();var L=z.factory(w.segments);return new X(L).getGeom()}}]),e}()),W=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return q.run("union",t,n)},Y=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return q.run("intersection",t,n)},V=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return q.run("xor",t,n)},K=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return q.run("difference",t,n)};return{union:W,intersection:Y,xor:V,difference:K}}()},8639:function(t,e){!function(t){"use strict";const e=134217729,n=33306690738754706e-32;function r(t,e,n,r,i){let o,s,a,l,c=e[0],u=r[0],h=0,p=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=r[++p]);let f=0;if(h<t&&p<n)for(u>c==u>-c?(a=o-((s=c+o)-c),c=e[++h]):(a=o-((s=u+o)-u),u=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)u>c==u>-c?(a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h]):(a=o-((s=o+u)-(l=s-o))+(u-l),u=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)a=o-((s=o+u)-(l=s-o))+(u-l),u=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function i(t){return new Float64Array(t)}const o=33306690738754716e-32,s=22204460492503146e-32,a=11093356479670487e-47,l=i(4),c=i(8),u=i(12),h=i(16),p=i(4);t.orient2d=function(t,i,f,d,g,v){const m=(i-v)*(f-g),y=(t-g)*(d-v),_=m-y;if(0===m||0===y||m>0!=y>0)return _;const b=Math.abs(m+y);return Math.abs(_)>=o*b?_:-function(t,i,o,f,d,g,v){let m,y,_,b,w,x,S,E,C,T,O,k,M,P,L,A,I,R;const D=t-d,j=o-d,F=i-g,N=f-g;w=(L=(E=D-(S=(x=e*D)-(x-D)))*(T=N-(C=(x=e*N)-(x-N)))-((P=D*N)-S*C-E*C-S*T))-(O=L-(I=(E=F-(S=(x=e*F)-(x-F)))*(T=j-(C=(x=e*j)-(x-j)))-((A=F*j)-S*C-E*C-S*T))),l[0]=L-(O+w)+(w-I),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-A),l[1]=M-(O+w)+(w-A),w=(R=k+O)-k,l[2]=k-(R-w)+(O-w),l[3]=R;let B=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,l),z=s*v;if(B>=z||-B>=z)return B;if(m=t-(D+(w=t-D))+(w-d),_=o-(j+(w=o-j))+(w-d),y=i-(F+(w=i-F))+(w-g),b=f-(N+(w=f-N))+(w-g),0===m&&0===y&&0===_&&0===b)return B;if(z=a*v+n*Math.abs(B),(B+=D*b+N*m-(F*_+j*y))>=z||-B>=z)return B;w=(L=(E=m-(S=(x=e*m)-(x-m)))*(T=N-(C=(x=e*N)-(x-N)))-((P=m*N)-S*C-E*C-S*T))-(O=L-(I=(E=y-(S=(x=e*y)-(x-y)))*(T=j-(C=(x=e*j)-(x-j)))-((A=y*j)-S*C-E*C-S*T))),p[0]=L-(O+w)+(w-I),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-A),p[1]=M-(O+w)+(w-A),w=(R=k+O)-k,p[2]=k-(R-w)+(O-w),p[3]=R;const G=r(4,l,4,p,c);w=(L=(E=D-(S=(x=e*D)-(x-D)))*(T=b-(C=(x=e*b)-(x-b)))-((P=D*b)-S*C-E*C-S*T))-(O=L-(I=(E=F-(S=(x=e*F)-(x-F)))*(T=_-(C=(x=e*_)-(x-_)))-((A=F*_)-S*C-E*C-S*T))),p[0]=L-(O+w)+(w-I),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-A),p[1]=M-(O+w)+(w-A),w=(R=k+O)-k,p[2]=k-(R-w)+(O-w),p[3]=R;const X=r(G,c,4,p,u);w=(L=(E=m-(S=(x=e*m)-(x-m)))*(T=b-(C=(x=e*b)-(x-b)))-((P=m*b)-S*C-E*C-S*T))-(O=L-(I=(E=y-(S=(x=e*y)-(x-y)))*(T=_-(C=(x=e*_)-(x-_)))-((A=y*_)-S*C-E*C-S*T))),p[0]=L-(O+w)+(w-I),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-A),p[1]=M-(O+w)+(w-A),w=(R=k+O)-k,p[2]=k-(R-w)+(O-w),p[3]=R;const H=r(X,u,4,p,h);return h[H-1]}(t,i,f,d,g,v,b)},t.orient2dfast=function(t,e,n,r,i,o){return(e-o)*(n-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})}(e)},6901:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});n(4916),n(5306),n(3210),n(7042),n(2222),n(2526),n(1817),n(1539),n(2165),n(6992),n(8783),n(3948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){return function(e,i){if("function"==typeof define&&n.amdO)define([],i);else if("object"===r(t)&&t.exports)t.exports=i();else{var o=i();e.Affix=o.Affix,e.Alert=o.Alert,e.Button=o.Button,e.Carousel=o.Carousel,e.Collapse=o.Collapse,e.Dropdown=o.Dropdown,e.Modal=o.Modal,e.Popover=o.Popover,e.ScrollSpy=o.ScrollSpy,e.Tab=o.Tab,e.Tooltip=o.Tooltip}}(this,(function(){var t=void 0!==o?o:this||window,e=document,n=e.documentElement,i=t.BSN={},s=i.supports=[],a="data-toggle",l="data-dismiss",c="Affix",u="Alert",h="Button",p="Carousel",f="Collapse",d="Dropdown",g="Modal",v="Popover",m="ScrollSpy",y="Tab",_="Tooltip",b="data-backdrop",w="data-keyboard",x="data-target",S="data-title",E="data-original-title",C="data-original-text",T="data-animation",O="data-container",k="data-placement",M="data-delay",P="aria-expanded",L="aria-hidden",A="click",I="hover",R="keydown",D="keyup",j="resize",F="scroll",N="show",B="shown",z="hide",G="hidden",X="slid",H="change",U="querySelectorAll",Z="Transition",q="Webkit",W="tabindex",Y="active",V="in",K="collapsing",$="disabled",J="left",Q="right",tt="top",et="bottom",nt=!("opacity"in n.style),rt="onmouseleave"in e?["mouseenter","mouseleave"]:["mouseover","mouseout"],it=/\b(top|bottom|left|right)+/,ot=0,st="navbar-fixed-top",at="navbar-fixed-bottom",lt=q+Z in n.style||Z.toLowerCase()in n.style,ct=q+Z in n.style?q.toLowerCase()+Z+"End":Z.toLowerCase()+"end",ut=function(t){t.focus?t.focus():t.setActive()},ht=function(t,e){t.classList.add(e)},pt=function(t,e){t.classList.remove(e)},ft=function(t,e){return t.classList.contains(e)},dt=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;n++)e.push(t[n]);return e}(t[nt?U:"getElementsByClassName"](nt?"."+e.replace(/\s(?=[a-z])/g,"."):e))},gt=function(t,n){var i=n||e;return"object"===r(t)?t:i.querySelector(t)},vt=function(t,n){var r=n.charAt(0),i=n.substr(1);if("."===r){for(;t&&t!==e;t=t.parentNode)if(null!==gt(n,t.parentNode)&&ft(t,i))return t}else if("#"===r)for(;t&&t!==e;t=t.parentNode)if(t.id===i)return t;return!1},mt=function(t,e,n){t.addEventListener(e,n,!1)},yt=function(t,e,n){t.removeEventListener(e,n,!1)},_t=function(t,e,n){mt(t,e,(function r(i){n(i),yt(t,e,r)}))},bt=function(t,e){lt?_t(t,ct,(function(t){e(t)})):e()},wt=function(t,e,n){var r=new CustomEvent(t+".bs."+e);r.relatedTarget=n,this.dispatchEvent(r)},xt=function(){return{y:t.pageYOffset||n.scrollTop,x:t.pageXOffset||n.scrollLeft}},St=function(t,r,i,o){var s,a,l,c,u=r.offsetWidth,h=r.offsetHeight,p=n.clientWidth||e.body.clientWidth,f=n.clientHeight||e.body.clientHeight,d=t.getBoundingClientRect(),g=o===e.body?xt():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},v=d.right-d.left,m=d.bottom-d.top,y=gt('[class*="arrow"]',r),_=d.top+m/2-h/2<0,b=d.left+v/2-u/2<0,w=d.left+u/2+v/2>=p,x=d.top+h/2+m/2>=f,S=d.top-h<0,E=d.left-u<0,C=d.top+h+m>=f,T=d.left+u+v>=p;(i=(i=(i=(i=(i=(i===J||i===Q)&&E&&T?tt:i)===tt&&S?et:i)===et&&C?tt:i)===J&&E?Q:i)===Q&&T?J:i)===J||i===Q?(a=i===J?d.left+g.x-u:d.left+g.x+v,_?(s=d.top+g.y,l=m/2):x?(s=d.top+g.y-h+m,l=h-m/2):s=d.top+g.y-h/2+m/2):i!==tt&&i!==et||(s=i===tt?d.top+g.y-h:d.top+g.y+m,b?(a=0,c=d.left+v/2):w?(a=p-1.01*u,c=u-(p-d.left)+v/2):a=d.left+g.x-u/2+v/2),r.style.top=s+"px",r.style.left=a+"px",l&&(y.style.top=l+"px"),c&&(y.style.left=c+"px"),-1===r.className.indexOf(i)&&(r.className=r.className.replace(it,i))};i.version="2.0.23";var Et=function(i,o){o=o||{};var s=(i=gt(i)).getAttribute(x),a=i.getAttribute("data-offset-top"),l=i.getAttribute("data-offset-bottom"),u="affix",h="affixed",p="function",f="affix-bottom";if(this.target=o.target?gt(o.target):gt(s)||null,this.offsetTop=o.offsetTop?o.offsetTop:parseInt(a)||0,this.offsetBottom=o.offsetBottom?o.offsetBottom:parseInt(l)||0,this.target||this.offsetTop||this.offsetBottom){var d,g,v,m,y,_,b=this,w=!1,S=!1,E=function(){v=Math.max(e.body.scrollHeight,e.body.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight),m=parseInt(xt().y,0),d=null!==b.target?b.target.getBoundingClientRect().top+m:b.offsetTop?parseInt(r(b.offsetTop)===p?b.offsetTop():b.offsetTop||0):void 0,g=function(){if(b.offsetBottom)return v-i.offsetHeight-parseInt(r(b.offsetBottom)===p?b.offsetBottom():b.offsetBottom||0)}(),y=parseInt(d)-m<0&&m>parseInt(d),_=parseInt(g)-m<0&&m>parseInt(g)},C=function(){w&&ft(i,u)&&(pt(i,u),w=!1)},T=function(){_?(y&&C(),S||ft(i,f)||(wt.call(i,u,u),wt.call(i,f,u),ht(i,f),S=!0,wt.call(i,h,u),wt.call(i,"affixed-bottom",u))):(S&&ft(i,f)&&(pt(i,f),S=!1),y?w||ft(i,u)||(wt.call(i,u,u),wt.call(i,"affix-top",u),ht(i,u),w=!0,wt.call(i,h,u),wt.call(i,"affixed-top",u)):C())};this.update=function(){E(),T()},c in i||(mt(t,F,b.update),!nt&&mt(t,j,b.update)),i.Affix=b,b.update()}};s.push([c,Et,'[data-spy="affix"]']);var Ct=function(t){t=gt(t);var e=this,n="alert",r=vt(t,".alert"),i=function(n){r=vt(n.target,".alert"),(t=gt('[data-dismiss="alert"]',r))&&r&&(t===n.target||t.contains(n.target))&&e.close()},o=function(){wt.call(r,"closed",n),yt(t,A,i),r.parentNode.removeChild(r)};this.close=function(){r&&t&&ft(r,V)&&(wt.call(r,"close",n),pt(r,V),r&&(ft(r,"fade")?bt(r,o):o()))},u in t||mt(t,A,i),t.Alert=e};s.push([u,Ct,'[data-dismiss="alert"]']);var Tt=function(t,n){t=gt(t),n=n||null;var r=!1,i="button",o="checked",s="reset",a="LABEL",l="INPUT",c=function(e){var n=e.target.tagName===a?e.target:e.target.parentNode.tagName===a?e.target.parentNode:null;if(n){var s=e.target,c=dt(s.parentNode,"btn"),u=n.getElementsByTagName(l)[0];if(u){if("checkbox"===u.type&&(u.checked?(pt(n,Y),u.getAttribute(o),u.removeAttribute(o),u.checked=!1):(ht(n,Y),u.getAttribute(o),u.setAttribute(o,o),u.checked=!0),r||(r=!0,wt.call(u,H,i),wt.call(t,H,i))),"radio"===u.type&&!r&&!u.checked){ht(n,Y),u.setAttribute(o,o),u.checked=!0,wt.call(u,H,i),wt.call(t,H,i),r=!0;for(var h=0,p=c.length;h<p;h++){var f=c[h],d=f.getElementsByTagName(l)[0];f!==n&&ft(f,Y)&&(pt(f,Y),d.removeAttribute(o),d.checked=!1,wt.call(d,H,i))}}setTimeout((function(){r=!1}),50)}}};if(ft(t,"btn"))null!==n&&(n!==s?n&&n!==s&&("loading"===n&&(ht(t,$),t.setAttribute($,$),t.setAttribute(C,t.innerHTML.trim())),t.innerHTML=t.getAttribute("data-"+n+"-text")):t.getAttribute(C)&&((ft(t,$)||t.getAttribute($)===$)&&(pt(t,$),t.removeAttribute($)),t.innerHTML=t.getAttribute(C)));else{h in t||(mt(t,A,c),gt("[tabindex]",t)&&mt(t,D,(function(t){32===(t.which||t.keyCode)&&t.target===e.activeElement&&c(t)})),mt(t,R,(function(t){32===(t.which||t.keyCode)&&t.preventDefault()})));for(var u=dt(t,"btn"),p=u.length,f=0;f<p;f++)!ft(u[f],Y)&&gt("input",u[f]).getAttribute(o)&&ht(u[f],Y);t.Button=this}};s.push([h,Tt,'[data-toggle="buttons"]']);var Ot=function(e,r){r=r||{};var i=(e=gt(e)).getAttribute("data-interval"),o=r.interval,s="false"===i?0:parseInt(i),a=e.getAttribute("data-pause")===I||!1,l="true"===e.getAttribute(w)||!1,c="carousel",u="paused",h="data-slide-to";this.keyboard=!0===r.keyboard||l,this.pause=!(r.pause!==I&&!a)&&I,this.interval="number"==typeof o?o:0===s||!1===s?0:5e3;var f=this,d=e.index=0,g=e.timer=0,v=!1,m=dt(e,"item"),y=m.length,_=this.direction=J,b=dt(e,"carousel-control"),x=b[0],S=b[1],E=gt(".carousel-indicators",e),C=E&&E.getElementsByTagName("LI")||[],T=function(){!1===f.interval||ft(e,u)||(ht(e,u),!v&&clearInterval(g))},O=function(){!1!==f.interval&&ft(e,u)&&(pt(e,u),!v&&clearInterval(g),!v&&f.cycle())},k=function(t){if(t.preventDefault(),!v){var e=t.currentTarget||t.srcElement;e===S?d++:e===x&&d--,f.slideTo(d)}},M=function(t){for(var e=0,n=C.length;e<n;e++)pt(C[e],Y);C[t]&&ht(C[t],Y)};this.cycle=function(){g=setInterval((function(){var r,i;r=e.getBoundingClientRect(),i=t.innerHeight||n.clientHeight,r.top<=i&&r.bottom>=0&&(d++,f.slideTo(d))}),this.interval)},this.slideTo=function(t){if(!v){var n,r=this.getActiveIndex();r<t||0===r&&t===y-1?_=f.direction=J:(r>t||r===y-1&&0===t)&&(_=f.direction=Q),t<0?t=y-1:t===y&&(t=0),d=t,n=_===J?"next":"prev",wt.call(e,"slide",c,m[t]),v=!0,clearInterval(g),M(t),lt&&ft(e,"slide")?(ht(m[t],n),m[t].offsetWidth,ht(m[t],_),ht(m[r],_),_t(m[r],ct,(function(i){var o=i.target!==m[r]?1e3*i.elapsedTime:0;setTimeout((function(){v=!1,ht(m[t],Y),pt(m[r],Y),pt(m[t],n),pt(m[t],_),pt(m[r],_),wt.call(e,X,c,m[t]),f.interval&&!ft(e,u)&&f.cycle()}),o+100)}))):(ht(m[t],Y),m[t].offsetWidth,pt(m[r],Y),setTimeout((function(){v=!1,f.interval&&!ft(e,u)&&f.cycle(),wt.call(e,X,c,m[t])}),100))}},this.getActiveIndex=function(){return m.indexOf(dt(e,"item active")[0])||0},p in e||(f.pause&&f.interval&&(mt(e,rt[0],T),mt(e,rt[1],O),mt(e,"touchstart",T),mt(e,"touchend",O)),S&&mt(S,A,k),x&&mt(x,A,k),E&&mt(E,A,(function(t){if(t.preventDefault(),!v){var e=t.target;if(!e||ft(e,Y)||!e.getAttribute(h))return!1;d=parseInt(e.getAttribute(h),10),f.slideTo(d)}})),f.keyboard&&mt(t,R,(function(t){if(!v){switch(t.which){case 39:d++;break;case 37:d--;break;default:return}f.slideTo(d)}}))),f.getActiveIndex()<0&&(m.length&&ht(m[0],Y),C.length&&M(0)),f.interval&&f.cycle(),e.Carousel=f};s.push([p,Ot,'[data-ride="carousel"]']);var kt=function(t,e){t=gt(t),e=e||{};var n,r,i,o=null,s=null,a=this,l=!1,c=t.getAttribute("data-parent"),u="collapse",h="collapsed",p=function(t,e){wt.call(t,z,u),l=!0,t.style.height=t.scrollHeight+"px",pt(t,u),pt(t,V),ht(t,K),t.offsetWidth,t.style.height="0px",bt(t,(function(){l=!1,t.setAttribute(P,"false"),e.setAttribute(P,"false"),pt(t,K),ht(t,u),t.style.height="",wt.call(t,G,u)}))};this.toggle=function(t){t.preventDefault(),l||(ft(s,V)?a.hide():a.show())},this.hide=function(){p(s,t),ht(t,h)},this.show=function(){if(o){var e=gt(".collapse.in",o),n=e&&(gt('[data-toggle="collapse"][data-target="#'+e.id+'"]',o)||gt('[data-toggle="collapse"][href="#'+e.id+'"]',o)),r=n&&(n.getAttribute(x)||n.href);e&&n&&e!==s&&(p(e,n),r.split("#")[1]!==s.id?ht(n,h):pt(n,h))}!function(t,e){wt.call(t,N,u),l=!0,ht(t,K),pt(t,u),t.style.height=t.scrollHeight+"px",bt(t,(function(){l=!1,t.setAttribute(P,"true"),e.setAttribute(P,"true"),pt(t,K),ht(t,u),ht(t,V),t.style.height="",wt.call(t,B,u)}))}(s,t),pt(t,h)},f in t||mt(t,A,a.toggle),n=t.href&&t.getAttribute("href"),r=t.getAttribute(x),i=n||r&&"#"===r.charAt(0)&&r,s=i&&gt(i),o=gt(e.parent)||c&&vt(t,c),t.Collapse=a};s.push([f,kt,'[data-toggle="collapse"]']);var Mt=function(t,n){t=gt(t),this.persist=!0===n||"true"===t.getAttribute("data-persist")||!1;var r=this,i=t.parentNode,o="dropdown",s="open",a=null,l=gt(".dropdown-menu",i),c=function(){for(var t=l.children,e=[],n=0;n<t.length;n++)t[n].children.length&&"A"===t[n].children[0].tagName&&e.push(t[n]);return e}(),u=function(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()},h=function(){var n=t.open?mt:yt;n(e,A,p),n(e,R,g),n(e,D,v)},p=function(e){var n=e.target,i=n&&(d in n||d in n.parentNode);(n!==l&&!l.contains(n)||!r.persist&&!i)&&(a=n===t||t.contains(n)?t:null,y(),u.call(e,n))},f=function(e){a=t,m(),u.call(e,e.target)},g=function(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()},v=function(n){var i=n.which||n.keyCode,o=e.activeElement,s=c.indexOf(o.parentNode),u=o===t,h=l.contains(o),p=o.parentNode.parentNode===l;(p||u)&&(s=u?0:38===i?s>1?s-1:0:40===i&&s<c.length-1?s+1:s,c[s]&&ut(c[s].children[0])),(c.length&&p||!c.length&&(h||u)||!h)&&t.open&&27===i&&(r.toggle(),a=null)},m=function(){wt.call(i,N,o,a),ht(i,s),l.setAttribute(P,!0),wt.call(i,B,o,a),t.open=!0,yt(t,A,f),setTimeout((function(){ut(l.getElementsByTagName("INPUT")[0]||t),h()}),1)},y=function(){wt.call(i,z,o,a),pt(i,s),l.setAttribute(P,!1),wt.call(i,G,o,a),t.open=!1,h(),ut(t),setTimeout((function(){mt(t,A,f)}),1)};t.open=!1,this.toggle=function(){ft(i,s)&&t.open?y():m()},d in t||(!1 in l&&l.setAttribute(W,"0"),mt(t,A,f)),t.Dropdown=r};s.push([d,Mt,'[data-toggle="dropdown"]']);var Pt=function(i,o){var s=(i=gt(i)).getAttribute(x)||i.getAttribute("href"),a=gt(s),c=ft(i,"modal")?i:a,u="modal",h="static";if(ft(i,"modal")&&(i=null),c){o=o||{},this.keyboard=!1!==o.keyboard&&"false"!==c.getAttribute(w),this.backdrop=o.backdrop!==h&&c.getAttribute(b)!==h||h,this.backdrop=!1!==o.backdrop&&"false"!==c.getAttribute(b)&&this.backdrop,this.content=o.content,this.root=o.root||e.body;var p,f,d,v,m=this,y=null,_=dt(n,st).concat(dt(n,at)),S=function(){var e,n=m.root.currentStyle||t.getComputedStyle(m.root),r=parseInt(n.paddingRight,10);if(p&&(m.root.style.paddingRight=r+d+"px",_.length))for(var i=0;i<_.length;i++)e=(_[i].currentStyle||t.getComputedStyle(_[i])).paddingRight,_[i].style.paddingRight=parseInt(e)+d+"px"},E=function(){var r,i,o;p=m.root.clientWidth<(r=n.getBoundingClientRect(),t.innerWidth||r.right-Math.abs(r.left)),f=c.scrollHeight>n.clientHeight,(o=e.createElement("div")).className="modal-scrollbar-measure",m.root.appendChild(o),i=o.offsetWidth-o.clientWidth,m.root.removeChild(o),d=i},C=function(){c.style.paddingLeft=!p&&f?d+"px":"",c.style.paddingRight=p&&!f?d+"px":""},T=function(){(v=gt(".modal-backdrop"))&&null!==v&&"object"===r(v)&&(ot=0,m.root.removeChild(v),v=null),wt.call(c,G,u)},O=function(){ft(c,V)?mt(e,R,D):yt(e,R,D)},k=function(){ft(c,V)?mt(t,j,m.update):yt(t,j,m.update)},M=function(){ft(c,V)?mt(c,A,F):yt(c,A,F)},P=function(){ut(c),wt.call(c,B,u,y)},I=function(){c.style.display="",i&&ut(i),dt(e,"modal in")[0]||(c.style.paddingLeft="",c.style.paddingRight="",function(){if(m.root.style.paddingRight="",_.length)for(var t=0;t<_.length;t++)_[t].style.paddingRight=""}(),pt(m.root,"modal-open"),v&&ft(v,"fade")?(pt(v,V),bt(v,T)):T(),k(),M(),O())},D=function(t){var e=t.which||t.keyCode;m.keyboard&&27==e&&ft(c,V)&&m.hide()},F=function(t){var e=t.target;ft(c,V)&&(e.parentNode.getAttribute(l)===u||e.getAttribute(l)===u||e===c&&m.backdrop!==h)&&(m.hide(),y=null,t.preventDefault())};this.toggle=function(){ft(c,V)?this.hide():this.show()},this.show=function(){wt.call(c,N,u,y);var t=dt(e,"modal in")[0];t&&t!==c&&t.modalTrigger.Modal.hide(),this.backdrop&&!ot&&function(){ot=1;var t=e.createElement("div");null===(v=gt(".modal-backdrop"))&&(t.setAttribute("class","modal-backdrop fade"),v=t,m.root.appendChild(v))}(),v&&ot&&!ft(v,V)&&(v.offsetWidth,ht(v,V)),c.style.display="block",E(),S(),C(),ht(m.root,"modal-open"),ht(c,V),c.setAttribute(L,!1),k(),M(),O(),ft(c,"fade")?bt(c,P):P()},this.hide=function(){wt.call(c,z,u),v=gt(".modal-backdrop"),pt(c,V),c.setAttribute(L,!0),setTimeout((function(){ft(c,"fade")?bt(c,I):I()}),lt?150:0)},this.setContent=function(t){gt(".modal-content",c).innerHTML=t},this.update=function(){ft(c,V)&&(E(),S(),C())},i&&!(g in i)&&mt(i,A,(function(t){var e=t.target;(e=e.hasAttribute(x)||e.hasAttribute("href")?e:e.parentNode)!==i||ft(c,V)||(c.modalTrigger=i,y=i,m.show(),t.preventDefault())})),m.content&&m.setContent(m.content),i&&(i.Modal=m)}};s.push([g,Pt,'[data-toggle="modal"]']);var Lt=function(n,r){r=r||{};var i=(n=gt(n)).getAttribute("data-trigger"),o=n.getAttribute(T),s=n.getAttribute(k),a=n.getAttribute("data-dismissible"),l=n.getAttribute(M),c=n.getAttribute(O),u="popover",h="class",p="div",f="fade",d="data-content",g='<button type="button" class="close">×</button>',m=gt(r.container),y=gt(c),_=vt(n,".modal"),b=vt(n,"."+st),w=vt(n,"."+at);this.template=r.template?r.template:null,this.trigger=r.trigger?r.trigger:i||I,this.animation=r.animation&&r.animation!==f?r.animation:o||f,this.placement=r.placement?r.placement:s||tt,this.delay=parseInt(r.delay||l)||200,this.dismissible=!(!r.dismissible&&"true"!==a),this.container=m||(y||(b||(w||(_||e.body))));var x=this,E=n.getAttribute(S)||null,C=n.getAttribute(d)||null;if(C||this.template){var P=null,L=0,R=this.placement,D=function(t){null!==P&&t.target===gt(".close",P)&&x.hide()},F=function(r){A!=x.trigger&&"focus"!=x.trigger||!x.dismissible&&r(n,"blur",x.hide),x.dismissible&&r(e,A,D),!nt&&r(t,j,x.hide)},X=function(){F(mt),wt.call(n,B,u)},H=function(){F(yt),x.container.removeChild(P),L=null,P=null,wt.call(n,G,u)};this.toggle=function(){null===P?x.show():x.hide()},this.show=function(){clearTimeout(L),L=setTimeout((function(){null===P&&(R=x.placement,function(){if(E=n.getAttribute(S),C=n.getAttribute(d),P=e.createElement(p),null!==C&&null===x.template){if(P.setAttribute("role","tooltip"),null!==E){var t=e.createElement("h3");t.setAttribute(h,"popover-title"),t.innerHTML=x.dismissible?E+g:E,P.appendChild(t)}var r=e.createElement(p),i=e.createElement(p);r.setAttribute(h,"arrow"),i.setAttribute(h,"popover-content"),P.appendChild(r),P.appendChild(i),i.innerHTML=x.dismissible&&null===E?C+g:C}else{var o=e.createElement(p);o.innerHTML=x.template,P.innerHTML=o.firstChild.innerHTML}x.container.appendChild(P),P.style.display="block",P.setAttribute(h,"popover "+R+" "+x.animation)}(),St(n,P,R,x.container),!ft(P,V)&&ht(P,V),wt.call(n,N,u),x.animation?bt(P,X):X())}),20)},this.hide=function(){clearTimeout(L),L=setTimeout((function(){P&&null!==P&&ft(P,V)&&(wt.call(n,z,u),pt(P,V),x.animation?bt(P,H):H())}),x.delay)},v in n||(x.trigger===I?(mt(n,rt[0],x.show),x.dismissible||mt(n,rt[1],x.hide)):A!=x.trigger&&"focus"!=x.trigger||mt(n,x.trigger,x.toggle)),n.Popover=x}};s.push([v,Lt,'[data-toggle="popover"]']);var At=function(e,n){e=gt(e);var r=gt(e.getAttribute(x)),i=e.getAttribute("data-offset");if((n=n||{}).target||r){for(var o,s=this,a=n.target&&gt(n.target)||r,l=a&&a.getElementsByTagName("A"),c=parseInt(i||n.offset)||10,u=[],h=[],p=e.offsetHeight<e.scrollHeight?e:t,f=p===t,d=0,g=l.length;d<g;d++){var v=l[d].getAttribute("href"),y=v&&"#"===v.charAt(0)&&"#"!==v.slice(-1)&&gt(v);y&&(u.push(l[d]),h.push(y))}var _=function(t){var n=u[t].parentNode,r=h[t],i=vt(n,".dropdown"),s=f&&r.getBoundingClientRect(),a=ft(n,Y)||!1,l=(f?s.top+o:r.offsetTop)-c,p=f?s.bottom+o-c:h[t+1]?h[t+1].offsetTop-c:e.scrollHeight,d=o>=l&&p>o;if(!a&&d)"LI"!==n.tagName||ft(n,Y)||(ht(n,Y),i&&!ft(i,Y)&&ht(i,Y),wt.call(e,"activate","scrollspy",u[t]));else if(d){if(!d&&!a||a&&d)return}else"LI"===n.tagName&&ft(n,Y)&&(pt(n,Y),i&&ft(i,Y)&&!dt(n.parentNode,Y).length&&pt(i,Y))};this.refresh=function(){!function(){o=f?xt().y:e.scrollTop;for(var t=0,n=u.length;t<n;t++)_(t)}()},m in e||(mt(p,F,s.refresh),!nt&&mt(t,j,s.refresh)),s.refresh(),e.ScrollSpy=s}};s.push([m,At,'[data-spy="scroll"]']);var It=function(t,e){var n=(t=gt(t)).getAttribute("data-height"),r="tab";e=e||{},this.height=!!lt&&(e.height||"true"===n);var i,o,s,l,c,u,h,p=this,f=vt(t,".nav"),d=!1,g=f&&gt(".dropdown",f),v=function(){d.style.height="",pt(d,K),f.isAnimating=!1},m=function(){d?u?v():setTimeout((function(){d.style.height=h+"px",d.offsetWidth,bt(d,v)}),1):f.isAnimating=!1,wt.call(i,B,r,o)},_=function(){d&&(s.style.float=J,l.style.float=J,c=s.scrollHeight),ht(l,Y),wt.call(i,N,r,o),pt(s,Y),wt.call(o,G,r,i),d&&(h=l.scrollHeight,u=h===c,ht(d,K),d.style.height=c+"px",d.offsetHeight,s.style.float="",l.style.float=""),ft(l,"fade")?setTimeout((function(){ht(l,V),bt(l,m)}),20):m()};if(f){f.isAnimating=!1;var b=function(){var t,e=dt(f,Y);return 1!==e.length||ft(e[0],"dropdown")?e.length>1&&(t=e[e.length-1]):t=e[0],t.getElementsByTagName("A")[0]},w=function(){return gt(b().getAttribute("href"))};this.show=function(){l=gt((i=i||t).getAttribute("href")),o=b(),s=w(),f.isAnimating=!0,pt(o.parentNode,Y),ht(i.parentNode,Y),g&&(ft(t.parentNode.parentNode,"dropdown-menu")?ft(g,Y)||ht(g,Y):ft(g,Y)&&pt(g,Y)),wt.call(o,z,r,i),ft(s,"fade")?(pt(s,V),bt(s,_)):_()},y in t||mt(t,A,(function(t){var e=t.target.getAttribute("href");t.preventDefault(),i=t.target.getAttribute(a)===r||e&&"#"===e.charAt(0)?t.target:t.target.parentNode,!f.isAnimating&&!ft(i.parentNode,Y)&&p.show()})),p.height&&(d=w().parentNode),t.Tab=p}};s.push([y,It,'[data-toggle="tab"]']);var Rt=function(n,r){r=r||{};var i=(n=gt(n)).getAttribute(T),o=n.getAttribute(k),s=n.getAttribute(M),a=n.getAttribute(O),l="tooltip",c="class",u="title",h="fade",p="div",f=gt(r.container),d=gt(a),g=vt(n,".modal"),v=vt(n,"."+st),m=vt(n,"."+at);this.animation=r.animation&&r.animation!==h?r.animation:i||h,this.placement=r.placement?r.placement:o||tt,this.delay=parseInt(r.delay||s)||200,this.container=f||(d||(v||(m||(g||e.body))));var y=this,b=0,w=this.placement,x=null,C=n.getAttribute(u)||n.getAttribute(S)||n.getAttribute(E);if(C&&""!=C){var P=function(){wt.call(n,B,l),!nt&&mt(t,j,y.hide)},L=function(){!nt&&yt(t,j,y.hide),y.container.removeChild(x),x=null,b=null,wt.call(n,G,l)};this.show=function(){clearTimeout(b),b=setTimeout((function(){if(null===x){if(w=y.placement,0==function(){if(!(C=n.getAttribute(u)||n.getAttribute(S)||n.getAttribute(E))||""==C)return!1;(x=e.createElement(p)).setAttribute("role",l);var t=e.createElement(p),r=e.createElement(p);t.setAttribute(c,"tooltip-arrow"),r.setAttribute(c,"tooltip-inner"),x.appendChild(t),x.appendChild(r),r.innerHTML=C,y.container.appendChild(x),x.setAttribute(c,"tooltip "+w+" "+y.animation)}())return;St(n,x,w,y.container),!ft(x,V)&&ht(x,V),wt.call(n,N,l),y.animation?bt(x,P):P()}}),20)},this.hide=function(){clearTimeout(b),b=setTimeout((function(){x&&ft(x,V)&&(wt.call(n,z,l),pt(x,V),y.animation?bt(x,L):L())}),y.delay)},this.toggle=function(){x?y.hide():y.show()},_ in n||(n.setAttribute(E,C),n.removeAttribute(u),mt(n,rt[0],y.show),mt(n,rt[1],y.hide)),n.Tooltip=y}};s.push([_,Rt,'[data-toggle="tooltip"]']);var Dt=function(t,e){for(var n=0,r=e.length;n<r;n++)new t(e[n])},jt=i.initCallback=function(t){t=t||e;for(var n=0,r=s.length;n<r;n++)Dt(s[n][1],t.querySelectorAll(s[n][2]))};return e.body?jt():mt(e,"DOMContentLoaded",(function(){jt()})),{Affix:Et,Alert:Ct,Button:Tt,Carousel:Ot,Collapse:kt,Dropdown:Mt,Modal:Pt,Popover:Lt,ScrollSpy:At,Tab:It,Tooltip:Rt}})),this};var o=(new i).dispatch();const s=o},953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});n(4916),n(1539),n(5306),n(561),n(9600),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){var e,i;return e=this,i=function(t){var e={},n="iziToast",i=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),o=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),s="undefined"!=typeof InstallTrigger,a="ontouchstart"in document.documentElement,l=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],c=568,u={};e.children={};var h={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",iconUrl:null,image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,closeOnClick:!1,displayMode:0,position:"bottomRight",target:"",targetFirst:!0,timeout:5e3,rtl:!1,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent){var p=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n};p.prototype=window.Event.prototype,window.CustomEvent=p}var f=function(t,e,n){if("[object Object]"===Object.prototype.toString.call(t))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(n,t[r],r,t);else if(t)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t)},d=function(t,e){var n={};return f(t,(function(e,r){n[r]=t[r]})),f(e,(function(t,r){n[r]=e[r]})),n},g=function(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e},v={move:function(t,e,n,r){var i,a=.3,l=180;0!==r&&(t.classList.add("iziToast-dragged"),t.style.transform="translateX("+r+"px)",r>0?(i=(l-r)/l)<a&&e.hide(d(n,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag"):(i=(l+r)/l)<a&&e.hide(d(n,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag"),t.style.opacity=i,i<a&&((o||s)&&(t.style.left=r+"px"),t.parentNode.style.opacity=a,this.stopMoving(t,null)))},startMoving:function(t,e,n,r){r=r||window.event;var i=a?r.touches[0].clientX:r.clientX,o=t.style.transform.replace("px)",""),s=i-(o=o.replace("translateX(",""));n.transitionIn&&t.classList.remove(n.transitionIn),n.transitionInMobile&&t.classList.remove(n.transitionInMobile),t.style.transition="",a?document.ontouchmove=function(r){r.preventDefault();var i=(r=r||window.event).touches[0].clientX-s;v.move(t,e,n,i)}:document.onmousemove=function(r){r.preventDefault();var i=(r=r||window.event).clientX-s;v.move(t,e,n,i)}},stopMoving:function(t,e){a?document.ontouchmove=function(){}:document.onmousemove=function(){},t.style.opacity="",t.style.transform="",t.classList.contains("iziToast-dragged")&&(t.classList.remove("iziToast-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout((function(){t.style.transition=""}),400))}};return e.setSetting=function(t,n,r){e.children[t][n]=r},e.getSetting=function(t,n){return e.children[t][n]},e.destroy=function(){f(document.querySelectorAll(".iziToast-overlay"),(function(t,e){t.remove()})),f(document.querySelectorAll(".iziToast-wrapper"),(function(t,e){t.remove()})),f(document.querySelectorAll(".iziToast"),(function(t,e){t.remove()})),this.children={},document.removeEventListener("iziToast-opened",{},!1),document.removeEventListener("iziToast-opening",{},!1),document.removeEventListener("iziToast-closing",{},!1),document.removeEventListener("iziToast-closed",{},!1),document.removeEventListener("keyup",{},!1),u={}},e.settings=function(t){e.destroy(),u=t,h=d(h,t||{})},f({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},(function(t,n){e[n]=function(e){var n=d(u,e||{});n=d(t,n||{}),this.show(n)}})),e.progress=function(t,e,n){var r=this,i=e.getAttribute("data-iziToast-ref"),o=d(this.children[i],t||{}),s=e.querySelector(".iziToast-progressbar div");return{start:function(){void 0===o.time.REMAINING&&(e.classList.remove("iziToast-reseted"),null!==s&&(s.style.transition="width "+o.timeout+"ms "+o.progressBarEasing,s.style.width="0%"),o.time.START=(new Date).getTime(),o.time.END=o.time.START+o.timeout,o.time.TIMER=setTimeout((function(){clearTimeout(o.time.TIMER),e.classList.contains("iziToast-closing")||(r.hide(o,e,"timeout"),"function"==typeof n&&n.apply(r))}),o.timeout),r.setSetting(i,"time",o.time))},pause:function(){if(void 0!==o.time.START&&!e.classList.contains("iziToast-paused")&&!e.classList.contains("iziToast-reseted")){if(e.classList.add("iziToast-paused"),o.time.REMAINING=o.time.END-(new Date).getTime(),clearTimeout(o.time.TIMER),r.setSetting(i,"time",o.time),null!==s){var t=window.getComputedStyle(s).getPropertyValue("width");s.style.transition="none",s.style.width=t}"function"==typeof n&&setTimeout((function(){n.apply(r)}),10)}},resume:function(){void 0!==o.time.REMAINING?(e.classList.remove("iziToast-paused"),null!==s&&(s.style.transition="width "+o.time.REMAINING+"ms "+o.progressBarEasing,s.style.width="0%"),o.time.END=(new Date).getTime()+o.time.REMAINING,o.time.TIMER=setTimeout((function(){clearTimeout(o.time.TIMER),e.classList.contains("iziToast-closing")||(r.hide(o,e,"timeout"),"function"==typeof n&&n.apply(r))}),o.time.REMAINING),r.setSetting(i,"time",o.time)):this.start()},reset:function(){clearTimeout(o.time.TIMER),delete o.time.REMAINING,r.setSetting(i,"time",o.time),e.classList.add("iziToast-reseted"),e.classList.remove("iziToast-paused"),null!==s&&(s.style.transition="none",s.style.width="100%"),"function"==typeof n&&setTimeout((function(){n.apply(r)}),10)}}},e.hide=function(t,e,n){"object"!=r(e)&&(e=document.querySelector(e));var o=this,s=d(this.children[e.getAttribute("data-iziToast-ref")],t||{});s.closedBy=n||null,delete s.time.REMAINING,e.classList.add("iziToast-closing"),function(){var t=document.querySelector(".iziToast-overlay");if(null!==t){var e=t.getAttribute("data-iziToast-ref"),n=(e=e.split(",")).indexOf(String(s.ref));-1!==n&&e.splice(n,1),t.setAttribute("data-iziToast-ref",e.join()),0===e.length&&(t.classList.remove("fadeIn"),t.classList.add("fadeOut"),setTimeout((function(){t.remove()}),700))}}(),s.transitionIn&&e.classList.remove(s.transitionIn),s.transitionInMobile&&e.classList.remove(s.transitionInMobile),i||window.innerWidth<=c?s.transitionOutMobile&&e.classList.add(s.transitionOutMobile):s.transitionOut&&e.classList.add(s.transitionOut);var a=e.parentNode.offsetHeight;e.parentNode.style.height=a+"px",e.style.pointerEvents="none",(!i||window.innerWidth>c)&&(e.parentNode.style.transitionDelay="0.2s");try{var l=new CustomEvent("iziToast-closing",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(l)}catch(t){console.warn(t)}setTimeout((function(){e.parentNode.style.height="0px",e.parentNode.style.overflow="",setTimeout((function(){delete o.children[s.ref],e.parentNode.remove();try{var t=new CustomEvent("iziToast-closed",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}void 0!==s.onClosed&&s.onClosed.apply(null,[s,e,n])}),1e3)}),200),void 0!==s.onClosing&&s.onClosing.apply(null,[s,e,n])},e.show=function(t){var r,o=this,s=d(u,t||{});if((s=d(h,s)).time={},null===s.id&&(s.id=(r=s.title+s.message+s.color,btoa(encodeURIComponent(r)).replace(/=/g,""))),1===s.displayMode||"once"==s.displayMode)try{if(document.querySelectorAll(".iziToast#"+s.id).length>0)return!1}catch(t){console.warn("[iziToast] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}if(2===s.displayMode||"replace"==s.displayMode)try{f(document.querySelectorAll(".iziToast#"+s.id),(function(t,e){o.hide(s,t,"replaced")}))}catch(t){console.warn("[iziToast] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}s.ref=(new Date).getTime()+Math.floor(1e7*Math.random()+1),e.children[s.ref]=s;var p,m={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),icon:s.iconUrl?document.createElement("img"):document.createElement("i"),wrapper:null};m.toast.setAttribute("data-iziToast-ref",s.ref),m.toast.appendChild(m.toastBody),m.toastCapsule.appendChild(m.toast),function(){if(m.toast.classList.add(n),m.toast.classList.add("iziToast-opening"),m.toastCapsule.classList.add("iziToast-capsule"),m.toastBody.classList.add("iziToast-body"),m.toastTexts.classList.add("iziToast-texts"),i||window.innerWidth<=c?s.transitionInMobile&&m.toast.classList.add(s.transitionInMobile):s.transitionIn&&m.toast.classList.add(s.transitionIn),s.class){var t=s.class.split(" ");f(t,(function(t,e){m.toast.classList.add(t)}))}var e;s.id&&(m.toast.id=s.id),s.rtl&&(m.toast.classList.add("iziToast-rtl"),m.toast.setAttribute("dir","rtl")),s.layout>1&&m.toast.classList.add("iziToast-layout"+s.layout),s.balloon&&m.toast.classList.add("iziToast-balloon"),s.maxWidth&&(isNaN(s.maxWidth)?m.toast.style.maxWidth=s.maxWidth:m.toast.style.maxWidth=s.maxWidth+"px"),""===s.theme&&"light"===s.theme||m.toast.classList.add("iziToast-theme-"+s.theme),s.color&&("#"==(e=s.color).substring(0,1)||"rgb"==e.substring(0,3)||"hsl"==e.substring(0,3)?m.toast.style.background=s.color:m.toast.classList.add("iziToast-color-"+s.color)),s.backgroundColor&&(m.toast.style.background=s.backgroundColor,s.balloon&&(m.toast.style.borderColor=s.backgroundColor))}(),s.image&&(m.cover.classList.add("iziToast-cover"),m.cover.style.width=s.imageWidth+"px",function(t){try{return btoa(atob(t))==t}catch(t){return!1}}(s.image.replace(/ /g,""))?m.cover.style.backgroundImage="url(data:image/png;base64,"+s.image.replace(/ /g,"")+")":m.cover.style.backgroundImage="url("+s.image+")",s.rtl?m.toastBody.style.marginRight=s.imageWidth+10+"px":m.toastBody.style.marginLeft=s.imageWidth+10+"px",m.toast.appendChild(m.cover)),s.close?(m.buttonClose=document.createElement("button"),m.buttonClose.type="button",m.buttonClose.classList.add("iziToast-close"),m.buttonClose.addEventListener("click",(function(t){t.target,o.hide(s,m.toast,"button")})),m.toast.appendChild(m.buttonClose)):s.rtl?m.toast.style.paddingLeft="18px":m.toast.style.paddingRight="18px",s.progressBar&&(m.progressBar=document.createElement("div"),m.progressBarDiv=document.createElement("div"),m.progressBar.classList.add("iziToast-progressbar"),m.progressBarDiv.style.background=s.progressBarColor,m.progressBar.appendChild(m.progressBarDiv),m.toast.appendChild(m.progressBar)),s.timeout&&(s.pauseOnHover&&!s.resetOnHover&&(m.toast.addEventListener("mouseenter",(function(t){o.progress(s,m.toast).pause()})),m.toast.addEventListener("mouseleave",(function(t){o.progress(s,m.toast).resume()}))),s.resetOnHover&&(m.toast.addEventListener("mouseenter",(function(t){o.progress(s,m.toast).reset()})),m.toast.addEventListener("mouseleave",(function(t){o.progress(s,m.toast).start()})))),s.iconUrl?(m.icon.setAttribute("class","iziToast-icon"),m.icon.setAttribute("src",s.iconUrl)):s.icon&&(m.icon.setAttribute("class","iziToast-icon "+s.icon),s.iconText&&m.icon.appendChild(document.createTextNode(s.iconText)),s.iconColor&&(m.icon.style.color=s.iconColor)),(s.icon||s.iconUrl)&&(s.rtl?m.toastBody.style.paddingRight="33px":m.toastBody.style.paddingLeft="33px",m.toastBody.appendChild(m.icon)),s.title.length>0&&(m.strong=document.createElement("strong"),m.strong.classList.add("iziToast-title"),m.strong.appendChild(g(s.title)),m.toastTexts.appendChild(m.strong),s.titleColor&&(m.strong.style.color=s.titleColor),s.titleSize&&(isNaN(s.titleSize)?m.strong.style.fontSize=s.titleSize:m.strong.style.fontSize=s.titleSize+"px"),s.titleLineHeight&&(isNaN(s.titleSize)?m.strong.style.lineHeight=s.titleLineHeight:m.strong.style.lineHeight=s.titleLineHeight+"px")),s.message.length>0&&(m.p=document.createElement("p"),m.p.classList.add("iziToast-message"),m.p.appendChild(g(s.message)),m.toastTexts.appendChild(m.p),s.messageColor&&(m.p.style.color=s.messageColor),s.messageSize&&(isNaN(s.titleSize)?m.p.style.fontSize=s.messageSize:m.p.style.fontSize=s.messageSize+"px"),s.messageLineHeight&&(isNaN(s.titleSize)?m.p.style.lineHeight=s.messageLineHeight:m.p.style.lineHeight=s.messageLineHeight+"px")),s.title.length>0&&s.message.length>0&&(s.rtl?m.strong.style.marginLeft="10px":2===s.layout||s.rtl||(m.strong.style.marginRight="10px")),m.toastBody.appendChild(m.toastTexts),s.inputs.length>0&&(m.inputs.classList.add("iziToast-inputs"),f(s.inputs,(function(t,e){m.inputs.appendChild(g(t[0])),(p=m.inputs.childNodes)[e].classList.add("iziToast-inputs-child"),t[3]&&setTimeout((function(){p[e].focus()}),300),p[e].addEventListener(t[1],(function(e){return(0,t[2])(o,m.toast,this,e)}))})),m.toastBody.appendChild(m.inputs)),s.buttons.length>0&&(m.buttons.classList.add("iziToast-buttons"),f(s.buttons,(function(t,e){m.buttons.appendChild(g(t[0]));var n=m.buttons.childNodes;n[e].classList.add("iziToast-buttons-child"),t[2]&&setTimeout((function(){n[e].focus()}),300),n[e].addEventListener("click",(function(e){return e.preventDefault(),(0,t[1])(o,m.toast,this,e,p)}))}))),m.toastBody.appendChild(m.buttons),s.message.length>0&&(s.inputs.length>0||s.buttons.length>0)&&(m.p.style.marginBottom="0"),(s.inputs.length>0||s.buttons.length>0)&&(s.rtl?m.toastTexts.style.marginLeft="10px":m.toastTexts.style.marginRight="10px",s.inputs.length>0&&s.buttons.length>0&&(s.rtl?m.inputs.style.marginLeft="8px":m.inputs.style.marginRight="8px")),m.toastCapsule.style.visibility="hidden",setTimeout((function(){var t=m.toast.offsetHeight,e=m.toast.currentStyle||window.getComputedStyle(m.toast),n=e.marginTop;n=n.split("px"),n=parseInt(n[0]);var r=e.marginBottom;r=r.split("px"),r=parseInt(r[0]),m.toastCapsule.style.visibility="",m.toastCapsule.style.height=t+r+n+"px",setTimeout((function(){m.toastCapsule.style.height="auto",s.target&&(m.toastCapsule.style.overflow="visible")}),500),s.timeout&&o.progress(s,m.toast).start()}),100),function(){var t=s.position;if(s.target)m.wrapper=document.querySelector(s.target),m.wrapper.classList.add("iziToast-target"),s.targetFirst?m.wrapper.insertBefore(m.toastCapsule,m.wrapper.firstChild):m.wrapper.appendChild(m.toastCapsule);else{if(-1==l.indexOf(s.position))return void console.warn("[iziToast] Incorrect position. It can be › "+l);t=i||window.innerWidth<=c?"bottomLeft"==s.position||"bottomRight"==s.position||"bottomCenter"==s.position?"iziToast-wrapper-bottomCenter":"topLeft"==s.position||"topRight"==s.position||"topCenter"==s.position?"iziToast-wrapper-topCenter":"iziToast-wrapper-center":"iziToast-wrapper-"+t,m.wrapper=document.querySelector(".iziToast-wrapper."+t),m.wrapper||(m.wrapper=document.createElement("div"),m.wrapper.classList.add("iziToast-wrapper"),m.wrapper.classList.add(t),document.body.appendChild(m.wrapper)),"topLeft"==s.position||"topCenter"==s.position||"topRight"==s.position?m.wrapper.insertBefore(m.toastCapsule,m.wrapper.firstChild):m.wrapper.appendChild(m.toastCapsule)}isNaN(s.zindex)?console.warn("[iziToast] Invalid zIndex."):m.wrapper.style.zIndex=s.zindex}(),s.overlay&&(null!==document.querySelector(".iziToast-overlay.fadeIn")?(m.overlay=document.querySelector(".iziToast-overlay"),m.overlay.setAttribute("data-iziToast-ref",m.overlay.getAttribute("data-iziToast-ref")+","+s.ref),isNaN(s.zindex)||null===s.zindex||(m.overlay.style.zIndex=s.zindex-1)):(m.overlay.classList.add("iziToast-overlay"),m.overlay.classList.add("fadeIn"),m.overlay.style.background=s.overlayColor,m.overlay.setAttribute("data-iziToast-ref",s.ref),isNaN(s.zindex)||null===s.zindex||(m.overlay.style.zIndex=s.zindex-1),document.querySelector("body").appendChild(m.overlay)),s.overlayClose?(m.overlay.removeEventListener("click",{}),m.overlay.addEventListener("click",(function(t){o.hide(s,m.toast,"overlay")}))):m.overlay.removeEventListener("click",{})),function(){if(s.animateInside){m.toast.classList.add("iziToast-animateInside");var t=[200,100,300];"bounceInLeft"!=s.transitionIn&&"bounceInRight"!=s.transitionIn||(t=[400,200,400]),s.title.length>0&&setTimeout((function(){m.strong.classList.add("slideIn")}),t[0]),s.message.length>0&&setTimeout((function(){m.p.classList.add("slideIn")}),t[1]),(s.icon||s.iconUrl)&&setTimeout((function(){m.icon.classList.add("revealIn")}),t[2]);var e=150;s.buttons.length>0&&m.buttons&&setTimeout((function(){f(m.buttons.childNodes,(function(t,n){setTimeout((function(){t.classList.add("revealIn")}),e),e+=150}))}),s.inputs.length>0?150:0),s.inputs.length>0&&m.inputs&&(e=150,f(m.inputs.childNodes,(function(t,n){setTimeout((function(){t.classList.add("revealIn")}),e),e+=150})))}}(),s.onOpening.apply(null,[s,m.toast]);try{var y=new CustomEvent("iziToast-opening",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(y)}catch(t){console.warn(t)}setTimeout((function(){m.toast.classList.remove("iziToast-opening"),m.toast.classList.add("iziToast-opened");try{var t=new CustomEvent("iziToast-opened",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}s.onOpened.apply(null,[s,m.toast])}),1e3),s.drag&&(a?(m.toast.addEventListener("touchstart",(function(t){v.startMoving(this,o,s,t)}),!1),m.toast.addEventListener("touchend",(function(t){v.stopMoving(this,t)}),!1)):(m.toast.addEventListener("mousedown",(function(t){t.preventDefault(),v.startMoving(this,o,s,t)}),!1),m.toast.addEventListener("mouseup",(function(t){t.preventDefault(),v.stopMoving(this,t)}),!1))),s.closeOnEscape&&document.addEventListener("keyup",(function(t){27==(t=t||window.event).keyCode&&o.hide(s,m.toast,"esc")})),s.closeOnClick&&m.toast.addEventListener("click",(function(t){o.hide(s,m.toast,"toast")})),o.toast=m.toast},e},"function"==typeof define&&n.amdO?define([],i()):"object"===("undefined"==typeof exports?"undefined":r(exports))?t.exports=i():e.iziToast=i(),this};const o=(new i).dispatch().iziToast},7863:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});n(1539),n(4603),n(4916),n(9714),n(9600),n(7042),n(8309),n(2481),n(5306),n(6992),n(3948),n(4723),n(4765),n(8783),n(285),n(1637),n(2526),n(1817),n(2165);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){return function(e,i){"object"===("undefined"==typeof exports?"undefined":r(exports))?t.exports=i():"function"==typeof define&&n.amdO?define(i):e.page=i()}(this,(function(){var t=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},e=g,n=l,i=function(t){return c(l(t))},o=c,s=d,a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function l(t){for(var e,n=[],r=0,i=0,o="";null!=(e=a.exec(t));){var s=e[0],l=e[1],c=e.index;if(o+=t.slice(i,c),i=c+s.length,l)o+=l[1];else{o&&(n.push(o),o="");var u=e[2],p=e[3],f=e[4],d=e[5],g=e[6],v=e[7],m="+"===g||"*"===g,y="?"===g||"*"===g,_=u||"/",b=f||d||(v?".*":"[^"+_+"]+?");n.push({name:p||r++,prefix:u||"",delimiter:_,optional:y,repeat:m,pattern:h(b)})}}return i<t.length&&(o+=t.substr(i)),o&&n.push(o),n}function c(e){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"===r(e[i])&&(n[i]=new RegExp("^"+e[i].pattern+"$"));return function(r){for(var i="",o=r||{},s=0;s<e.length;s++){var a=e[s];if("string"!=typeof a){var l,c=o[a.name];if(null==c){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to be defined')}if(t(c)){if(!a.repeat)throw new TypeError('Expected "'+a.name+'" to not repeat, but received "'+c+'"');if(0===c.length){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(var u=0;u<c.length;u++){if(l=encodeURIComponent(c[u]),!n[s].test(l))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but received "'+l+'"');i+=(0===u?a.prefix:a.delimiter)+l}}else{if(l=encodeURIComponent(c),!n[s].test(l))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but received "'+l+'"');i+=a.prefix+l}}else i+=a}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/])/g,"\\$1")}function h(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function p(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function d(t,e){for(var n=(e=e||{}).strict,r=!1!==e.end,i="",o=t[t.length-1],s="string"==typeof o&&/\/$/.test(o),a=0;a<t.length;a++){var l=t[a];if("string"==typeof l)i+=u(l);else{var c=u(l.prefix),h=l.pattern;l.repeat&&(h+="(?:"+c+h+")*"),i+=h=l.optional?c?"(?:"+c+"("+h+"))?":"("+h+")?":c+"("+h+")"}}return n||(i=(s?i.slice(0,-2):i)+"(?:\\/(?=$))?"),i+=r?"$":n&&s?"":"(?=\\/|$)",new RegExp("^"+i,f(e))}function g(e,n,r){return t(n=n||[])?r||(r={}):(r=n,n=[]),e instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return p(t,e)}(e,n):t(e)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(g(t[i],e,n).source);return p(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(e,n,r):function(t,e,n){for(var r=l(t),i=d(r,n),o=0;o<r.length;o++)"string"!=typeof r[o]&&e.push(r[o]);return p(i,e)}(e,n,r)}e.parse=n,e.compile=i,e.tokensToFunction=o,e.tokensToRegExp=s;var v=L;L.default=L,L.Context=I,L.Route=R,L.sameOrigin=F;var m,y,_,b="undefined"!=typeof document,w="undefined"!=typeof window,x="undefined"!=typeof history,S="undefined"!=typeof process,E=b&&document.ontouchstart?"touchstart":"click",C=w&&!(!window.history.location&&!window.location),T=!0,O=!0,k="",M=!1,P=!1;function L(t,e){if("function"==typeof t)return L("*",t);if("function"==typeof e)for(var n=new R(t),r=1;r<arguments.length;++r)L.callbacks.push(n.middleware(arguments[r]));else"string"==typeof t?L["string"==typeof e?"redirect":"show"](t,e):L.start(t)}function A(t){return"string"!=typeof t?t:O?decodeURIComponent(t.replace(/\+/g," ")):t}function I(t,e){var n=N();"/"===t[0]&&0!==t.indexOf(n)&&(t=n+(P?"#!":"")+t);var r=t.indexOf("?");if(this.canonicalPath=t,this.path=t.replace(n,"")||"/",P&&(this.path=this.path.replace("#!","")||"/"),this.title=b&&_.document.title,this.state=e||{},this.state.path=t,this.querystring=~r?A(t.slice(r+1)):"",this.pathname=A(~r?t.slice(0,r):t),this.params={},this.hash="",!P){if(!~this.path.indexOf("#"))return;var i=this.path.split("#");this.path=this.pathname=i[0],this.hash=A(i[1])||"",this.querystring=this.querystring.split("#")[0]}}function R(t,n){(n=n||{}).strict=n.strict||M,this.path="*"===t?"(.*)":t,this.method="GET",this.regexp=e(this.path,this.keys=[],n)}L.callbacks=[],L.exits=[],L.current="",L.len=0,L.base=function(t){if(0===arguments.length)return k;k=t},L.strict=function(t){if(0===arguments.length)return M;M=t},L.start=function(t){if(t=t||{},!m&&(m=!0,_=t.window||w&&window,!1===t.dispatch&&(T=!1),!1===t.decodeURLComponents&&(O=!1),!1!==t.popstate&&w&&_.addEventListener("popstate",D,!1),!1!==t.click&&b&&_.document.addEventListener(E,j,!1),(P=!!t.hashbang)&&w&&!x&&_.addEventListener("hashchange",D,!1),T)){var e;if(C){var n=_.location;e=P&&~n.hash.indexOf("#!")?n.hash.substr(2)+n.search:P?n.search+n.hash:n.pathname+n.search+n.hash}L.replace(e,null,!0,T)}},L.stop=function(){m&&(L.current="",L.len=0,m=!1,b&&_.document.removeEventListener(E,j,!1),w&&_.removeEventListener("popstate",D,!1),w&&_.removeEventListener("hashchange",D,!1))},L.show=function(t,e,n,r){var i=new I(t,e),o=y;return y=i,L.current=i.path,!1!==n&&L.dispatch(i,o),!1!==i.handled&&!1!==r&&i.pushState(),i},L.back=function(t,e){L.len>0?(x&&_.history.back(),L.len--):t?setTimeout((function(){L.show(t,e)})):setTimeout((function(){L.show(N(),e)}))},L.redirect=function(t,e){"string"==typeof t&&"string"==typeof e&&L(t,(function(t){setTimeout((function(){L.replace(e)}),0)})),"string"==typeof t&&void 0===e&&setTimeout((function(){L.replace(t)}),0)},L.replace=function(t,e,n,r){var i=new I(t,e),o=y;return y=i,L.current=i.path,i.init=n,i.save(),!1!==r&&L.dispatch(i,o),i},L.dispatch=function(t,e){var n=0,r=0;function i(){var e=L.callbacks[n++];if(t.path===L.current)return e?void e(t,i):function(t){if(t.handled)return;var e;e=P?C&&N()+_.location.hash.replace("#!",""):C&&_.location.pathname+_.location.search;if(e===t.canonicalPath)return;L.stop(),t.handled=!1,C&&(_.location.href=t.canonicalPath)}(t);t.handled=!1}e?function t(){var n=L.exits[r++];if(!n)return i();n(e,t)}():i()},L.exit=function(t,e){if("function"==typeof t)return L.exit("*",t);for(var n=new R(t),r=1;r<arguments.length;++r)L.exits.push(n.middleware(arguments[r]))},L.Context=I,I.prototype.pushState=function(){L.len++,x&&_.history.pushState(this.state,this.title,P&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},I.prototype.save=function(){x&&"file:"!==_.location.protocol&&_.history.replaceState(this.state,this.title,P&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},L.Route=R,R.prototype.middleware=function(t){var e=this;return function(n,r){if(e.match(n.path,n.params))return t(n,r);r()}},R.prototype.match=function(t,e){var n=this.keys,r=t.indexOf("?"),i=~r?t.slice(0,r):t,o=this.regexp.exec(decodeURIComponent(i));if(!o)return!1;for(var s=1,a=o.length;s<a;++s){var l=n[s-1],c=A(o[s]);void 0===c&&hasOwnProperty.call(e,l.name)||(e[l.name]=c)}return!0};var D=function(){var t=!1;if(w)return b&&"complete"===document.readyState?t=!0:window.addEventListener("load",(function(){setTimeout((function(){t=!0}),0)})),function(e){if(t)if(e.state){var n=e.state.path;L.replace(n,e.state)}else if(C){var r=_.location;L.show(r.pathname+r.hash,void 0,void 0,!1)}}}();function j(t){if(1===function(t){return null==(t=t||w&&window.event).which?t.button:t.which}(t)&&!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented)){var e=t.target,n=t.path||(t.composedPath?t.composedPath():null);if(n)for(var i=0;i<n.length;i++)if(n[i].nodeName&&"A"===n[i].nodeName.toUpperCase()&&n[i].href){e=n[i];break}for(;e&&"A"!==e.nodeName.toUpperCase();)e=e.parentNode;if(e&&"A"===e.nodeName.toUpperCase()){var o="object"===r(e.href)&&"SVGAnimatedString"===e.href.constructor.name;if(!e.hasAttribute("download")&&"external"!==e.getAttribute("rel")){var s=e.getAttribute("href");if((P||!function(t){if(!C)return!1;var e=_.location;return t.pathname===e.pathname&&t.search===e.search}(e)||!e.hash&&"#"!==s)&&!(s&&s.indexOf("mailto:")>-1)&&!(o?e.target.baseVal:e.target)&&(o||F(e.href))){var a=o?e.href.baseVal:e.pathname+e.search+(e.hash||"");a="/"!==a[0]?"/"+a:a,S&&a.match(/^\/[a-zA-Z]:\//)&&(a=a.replace(/^\/[a-zA-Z]:\//,"/"));var l=a,c=N();0===a.indexOf(c)&&(a=a.substr(k.length)),P&&(a=a.replace("#!","")),c&&l===a||(t.preventDefault(),L.show(l))}}}}}function F(t){if(!t||!C)return!1;var e=function(t){if("function"==typeof URL&&C)return new URL(t,location.toString());if(b){var e=document.createElement("a");return e.href=t,e}}(t),n=_.location;return n.protocol===e.protocol&&n.hostname===e.hostname&&n.port===e.port}function N(){if(k)return k;var t=w&&_&&_.location;return w&&P&&t&&"file:"===t.protocol?t.pathname:k}return L.sameOrigin=F,v})),this};const o=(new i).dispatch().page},686:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});n(4916),n(1539),n(9714),n(6977),n(5306),n(9600),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){var e,n,i;return e=this,n="sprintf",i=function(){var t=function(){if(!arguments||arguments.length<1)throw new Error("sprintf: ERROR: not enough arguments");for(var t,e=0,n="",i=arguments[e++];t=/^([^%]*)%(?:(\d+)\$|\((.*?)\))?([#0 +'-]+)?(\*|\d+)?(\.\*|\.\d+)?([%diouxXfFeEcs])((?:.|[\r\n])*)$/.exec(i);){var o,s=t[1],a=t[2],l=t[3],c=t[4],u=t[5],h=t[6],p=t[7],f=t[8];if("%"===p)o="%";else{var d,g=" ",v=!0;c?(c.indexOf("0")>=0&&(g="0"),c.indexOf("-")>=0&&(g=" ",v=!1)):c="";var m=-1;if(u)if("*"===u){if((d=e++)>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");m=arguments[d]}else m=parseInt(u,10);var y=-1;if(h)if(".*"===h){if((d=e++)>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");y=arguments[d]}else y=parseInt(h.substring(1),10);if(d=e++,a){if((d=parseInt(a,10))>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");o=arguments[d]}else if(l){if("object"!==r(arguments[1]))throw new Error("sprintf: ERROR: invalid non-object arguments for named argument");if(void 0===(o=arguments[1][l]))throw new Error("sprintf: ERROR: invalid undefined value for named argument")}else{if(d>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");o=arguments[d]}var _="";switch(p){case"d":case"i":"number"!=typeof o&&(o=0),o=o.toString(10),c.indexOf("#")>=0&&o>=0&&(o="+"+o),c.indexOf(" ")>=0&&o>=0&&(o=" "+o);break;case"b":"number"!=typeof o&&(o=0),o=o.toString(2);break;case"o":"number"!=typeof o&&(o=0),o=o.toString(8);break;case"u":"number"!=typeof o&&(o=0),o=(o=Math.abs(o)).toString(10);break;case"x":"number"!=typeof o&&(o=0),o=o.toString(16).toLowerCase(),c.indexOf("#")>=0&&(_="0x");break;case"X":"number"!=typeof o&&(o=0),o=o.toString(16).toUpperCase(),c.indexOf("#")>=0&&(_="0X");break;case"f":case"F":if("number"!=typeof o&&(o=0),o=0+o,y>-1&&(o.toFixed?o=o.toFixed(y):(o=Math.round(o*Math.pow(10,y))/Math.pow(10,y),o=(o+="0000000000").substr(0,o.indexOf(".")+y+1))),o=""+o,c.indexOf("'")>=0)for(var b=0,w=o.length-1-3;w>=0;w-=3)o=o.substring(0,w)+(0===b?".":",")+o.substring(w),b=(b+1)%2;break;case"e":case"E":if("number"!=typeof o&&(o=0),o=0+o,y>-1){if(!o.toExponential)throw new Error("sprintf: ERROR: toExponential() method not supported");o=o.toExponential(y)}o=""+o,"E"===p&&(o=o.replace(/e\+/,"E+"));break;case"c":"number"!=typeof o&&(o=0),o=String.fromCharCode(o);break;case"s":"string"!=typeof o&&(o=String(o)),y>-1&&(o=o.substr(0,y));break;default:throw new Error('sprintf: ERROR: invalid conversion character "'+p+'"')}var x=m-o.toString().length-_.toString().length;if(x>0){var S=new Array(x+1);v?o=S.join(g)+o:o+=S.join(g)}o=_+o}n=n+s+o,i=f}return n+i};return t.version={text:"1.2.3",major:1,minor:2,micro:3},t},"function"==typeof define?define(n,(function(){return i()})):"object"===r(t)&&"object"===r(t.exports)?t.exports=i():e[n]=i(),this};const o=(new i).dispatch().sprintf},3842:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});class r{constructor(t=[],e=i){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,r=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];for(;t<r;){let r=1+(t<<1),o=e[r];const s=r+1;if(s<this.length&&n(e[s],o)<0&&(r=s,o=e[s]),n(o,i)>=0)break;e[t]=o,t=r}e[t]=i}}function i(t,e){return t<e?-1:t>e?1:0}},5431:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}()},2126:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},2971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r,i=n(291),o=n(5990),s=n(2706),a=n(9374),l=n(4187),c=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.key=n,i.oldValue=r,i}return c(e,t),e}(i.ZP);const h=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,(0,l.sq)(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return c(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&(0,a.f0)({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:".concat(t),this.hasListener(n)&&this.dispatchEvent(new u(n,t,e)),n=o.Z.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new u(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,n){var r=this.values_||(this.values_={});if(n)r[t]=e;else{var i=r[t];r[t]=e,i!==e&&this.notify(t,i)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&(0,a.f0)(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],(0,a.xb)(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(s.Z)},5990:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={PROPERTYCHANGE:"propertychange"}},2706:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(208),o=n(5487),s=n(5818),a=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return a(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.Z.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=(0,s.oL)(this,t[i],e);return r}return(0,s.oL)(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var r=t.length;n=new Array(r);for(var i=0;i<r;++i)n[i]=(0,s.Vx)(this,t[i],e)}else n=(0,s.Vx)(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)!function(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)(0,s.bN)(t[e]);else(0,s.bN)(t)}(n);else if(Array.isArray(t))for(var r=0,i=t.length;r<i;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)},e}(i.Z);l.prototype.on,l.prototype.once,l.prototype.un;const c=l},5537:(t,e,n)=>{"use strict";function r(t,e,n){for(var r,o,s=n||i,a=0,l=t.length,c=!1;a<l;)(o=+s(t[r=a+(l-a>>1)],e))<0?a=r+1:(l=r,c=!o);return c?a:~a}function i(t,e){return t>e?1:t<e?-1:0}function o(t,e,n){var r=t.length;if(t[0]<=e)return 0;if(e<=t[r-1])return r-1;var i=void 0;if(n>0){for(i=1;i<r;++i)if(t[i]<e)return i-1}else if(n<0){for(i=1;i<r;++i)if(t[i]<=e)return i}else for(i=1;i<r;++i){if(t[i]==e)return i;if(t[i]<e)return"function"==typeof n?n(e,t[i-1],t[i])>0?i-1:i:t[i-1]-e<e-t[i]?i-1:i}return r-1}function s(t,e,n){for(;e<n;){var r=t[e];t[e]=t[n],t[n]=r,++e,--n}}function a(t,e){for(var n=Array.isArray(e)?e:[e],r=n.length,i=0;i<r;i++)t[t.length]=n[i]}function l(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function c(t,e,n){var r=e||i;return t.every((function(e,i){if(0===i)return!0;var o=r(t[i-1],e);return!(o>0||n&&0===o)}))}n.d(e,{FZ:()=>s,fS:()=>l,h7:()=>o,kK:()=>i,l7:()=>a,pT:()=>c,ry:()=>r})},8775:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>u});var r,i=n(2971),o=n(2126),s=n(6885),a=n(5818),l=n(8326),c=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const u=function(t){function e(e){var n=t.call(this)||this,r=e.element;return!r||e.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),n.element=r||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return c(e,t),e.prototype.disposeInternal=function(){(0,l.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,l.ZF)(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)(0,a.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,a.oL)(t,o.Z.POSTRENDER,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}(i.Z)},8326:(t,e,n)=>{"use strict";n.d(e,{$H:()=>s,E4:()=>i,ZF:()=>a,ep:()=>l,hF:()=>c,jy:()=>o});var r=n(177);function i(t,e,n,i){var o;return o=n&&n.length?n.shift():r.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",i)}function o(t){var e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function s(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function a(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function l(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function c(t,e){for(var n=t.childNodes,r=0;;++r){var i=n[r],o=e[r];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--r):t.appendChild(o))}}},5818:(t,e,n)=>{"use strict";n.d(e,{Vx:()=>o,bN:()=>s,oL:()=>i});var r=n(9374);function i(t,e,n,r,i){if(r&&r!==t&&(n=n.bind(r)),i){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function o(t,e,n,r){return i(t,e,n,r,!0)}function s(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,r.ZH)(t))}},291:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>r});const r=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}()},5487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},208:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(5431),o=n(291),s=n(6885),a=n(9374),l=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return l(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);-1===r.indexOf(e)&&r.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t,n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(r){var i=e?new o.ZP(t):t;i.target||(i.target=this.eventTarget_||this);var a,l=this.dispatching_||(this.dispatching_={}),c=this.pendingRemovals_||(this.pendingRemovals_={});n in l||(l[n]=0,c[n]=0),++l[n];for(var u=0,h=r.length;u<h;++u)if(!1===(a="handleEvent"in r[u]?r[u].handleEvent(i):r[u].call(this,i))||i.propagationStopped){a=!1;break}if(0==--l[n]){var p=c[n];for(delete c[n];p--;)this.removeEventListener(n,s.Zn);delete l[n]}return a}},e.prototype.disposeInternal=function(){this.listeners_&&(0,a.ZH)(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var r=n.indexOf(e);-1!==r&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=s.Zn,++this.pendingRemovals_[t]):(n.splice(r,1),0===n.length&&delete this.listeners_[t]))}},e}(i.Z)},6885:(t,e,n)=>{"use strict";n.d(e,{Dv:()=>o,Zn:()=>s,qe:()=>a,uX:()=>i});var r=n(5537);function i(){return!0}function o(){return!1}function s(){}function a(t){var e,n,i,o=!1;return function(){var s=Array.prototype.slice.call(arguments);return o&&this===i&&(0,r.fS)(s,n)||(o=!0,i=this,n=s,e=t.apply(this,arguments)),e}}},177:(t,e,n)=>{"use strict";n.d(e,{G$:()=>o,Id:()=>l,MP:()=>a,Tp:()=>c,V:()=>i,bM:()=>u,tK:()=>s});var r="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",i=-1!==r.indexOf("firefox"),o=(-1!==r.indexOf("safari")&&-1==r.indexOf("chrom")&&(r.indexOf("version/15.4")>=0||r.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==r.indexOf("webkit")&&-1==r.indexOf("edge")),s=-1!==r.indexOf("macintosh"),a="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,u=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},9374:(t,e,n)=>{"use strict";n.d(e,{KX:()=>o,ZH:()=>i,f0:()=>r,xb:()=>s});var r="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s])}return n};function i(t){for(var e in t)delete t[e]}var o="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function s(t){var e;for(e in t)return!1;return!e}},4187:(t,e,n)=>{"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}n.d(e,{O3:()=>r,q4:()=>s,sq:()=>o});var i=0;function o(t){return t.ol_uid||(t.ol_uid=String(++i))}var s="6.15.1"}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";n(1539),n(8674),n(1249),n(2222),n(9600),n(7327),n(4916),n(5306),n(4747),n(7941),n(8309),n(6992),n(8783),n(3948),n(561),n(7042),n(2707),n(4723),n(489),n(2419),n(2526),n(1817),n(2165),n(2443),n(3680),n(3706),n(2703),n(1038);function t(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var i=0;i<r.length;i++)"."!=r[i]&&(".."==r[i]?n.pop():n.push(r[i]));return n.join("/")}function e(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function r(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Object.keys(n).forEach((function(i){void 0===t[i]?t[i]=n[i]:e(n[i])&&e(t[i])&&Object.keys(n[i]).length>0&&r(t[i],n[i])}))}var i={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function o(){var t="undefined"!=typeof document?document:{};return r(t,i),t}var s={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function a(){var t="undefined"!=typeof window?window:{};return r(t,s),t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function h(t,e,n){return h=u()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&c(i,n.prototype),i},h.apply(null,arguments)}function p(t){var e="function"==typeof Map?new Map:void 0;return p=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return h(t,arguments,l(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)},p(t)}var f=function(t){var e,n;function r(e){var n;return function(t){var e=t.__proto__;Object.defineProperty(t,"__proto__",{get:function(){return e},set:function(t){e.__proto__=t}})}(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n=t.call.apply(t,[this].concat(e))||this)),n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r}(p(Array));function d(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,d(t)):e.push(t)})),e}function g(t,e){return Array.prototype.filter.call(t,e)}function v(t,e){var n=a(),r=o(),i=[];if(!e&&t instanceof f)return t;if(!t)return new f(i);if("string"==typeof t){var s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var l="div";0===s.indexOf("<li")&&(l="ul"),0===s.indexOf("<tr")&&(l="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(l="tr"),0===s.indexOf("<tbody")&&(l="table"),0===s.indexOf("<option")&&(l="select");var c=r.createElement(l);c.innerHTML=s;for(var u=0;u<c.childNodes.length;u+=1)i.push(c.childNodes[u])}else i=function(t,e){if("string"!=typeof t)return[t];for(var n=[],r=e.querySelectorAll(t),i=0;i<r.length;i+=1)n.push(r[i]);return n}(t.trim(),e||r)}else if(t.nodeType||t===n||t===r)i.push(t);else if(Array.isArray(t)){if(t instanceof f)return t;i=t}return new f(function(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(i))}v.fn=f.prototype;var m="resize scroll".split(" ");function y(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(void 0===n[0]){for(var i=0;i<this.length;i+=1)m.indexOf(t)<0&&(t in this[i]?this[i][t]():v(this[i]).trigger(t));return this}return this.on.apply(this,[t].concat(n))}}y("click"),y("blur"),y("focus"),y("focusin"),y("focusout"),y("keyup"),y("keydown"),y("keypress"),y("submit"),y("change"),y("mousedown"),y("mousemove"),y("mouseup"),y("mouseenter"),y("mouseleave"),y("mouseout"),y("mouseover"),y("touchstart"),y("touchend"),y("touchmove"),y("resize"),y("scroll");var _={addClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=d(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).add.apply(e,r)})),this},removeClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=d(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).remove.apply(e,r)})),this},hasClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=d(e.map((function(t){return t.split(" ")})));return g(this,(function(t){return r.filter((function(e){return t.classList.contains(e)})).length>0})).length>0},toggleClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=d(e.map((function(t){return t.split(" ")})));this.forEach((function(t){r.forEach((function(e){t.classList.toggle(e)}))}))},attr:function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(var r in t)this[n][r]=t[r],this[n].setAttribute(r,t[r]);return this},removeAttr:function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},transform:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transform=t;return this},transition:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?t+"ms":t;return this},on:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];function a(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.indexOf(t)<0&&n.unshift(t),v(e).is(i))o.apply(e,n);else for(var r=v(e).parents(),s=0;s<r.length;s+=1)v(r[s]).is(i)&&o.apply(r[s],n)}}function l(t){var e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),o.apply(this,e)}"function"==typeof e[1]&&(r=e[0],o=e[1],s=e[2],i=void 0),s||(s=!1);for(var c,u=r.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(i)for(c=0;c<u.length;c+=1){var f=u[c];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[f]||(p.dom7LiveListeners[f]=[]),p.dom7LiveListeners[f].push({listener:o,proxyListener:a}),p.addEventListener(f,a,s)}else for(c=0;c<u.length;c+=1){var d=u[c];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[d]||(p.dom7Listeners[d]=[]),p.dom7Listeners[d].push({listener:o,proxyListener:l}),p.addEventListener(d,l,s)}}return this},off:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];"function"==typeof e[1]&&(r=e[0],o=e[1],s=e[2],i=void 0),s||(s=!1);for(var a=r.split(" "),l=0;l<a.length;l+=1)for(var c=a[l],u=0;u<this.length;u+=1){var h=this[u],p=void 0;if(!i&&h.dom7Listeners?p=h.dom7Listeners[c]:i&&h.dom7LiveListeners&&(p=h.dom7LiveListeners[c]),p&&p.length)for(var f=p.length-1;f>=0;f-=1){var d=p[f];o&&d.listener===o||o&&d.listener&&d.listener.dom7proxy&&d.listener.dom7proxy===o?(h.removeEventListener(c,d.proxyListener,s),p.splice(f,1)):o||(h.removeEventListener(c,d.proxyListener,s),p.splice(f,1))}}return this},trigger:function(){for(var t=a(),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n[0].split(" "),o=n[1],s=0;s<i.length;s+=1)for(var l=i[s],c=0;c<this.length;c+=1){var u=this[c];if(t.CustomEvent){var h=new t.CustomEvent(l,{detail:o,bubbles:!0,cancelable:!0});u.dom7EventData=n.filter((function(t,e){return e>0})),u.dispatchEvent(h),u.dom7EventData=[],delete u.dom7EventData}}return this},transitionEnd:function(t){var e=this;return t&&e.on("transitionend",(function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))})),this},outerWidth:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var t=a();return this[0]?t.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var t=a(),e=o(),n=this[0],r=n.getBoundingClientRect(),i=e.body,s=n.clientTop||i.clientTop||0,l=n.clientLeft||i.clientLeft||0,c=n===t?t.scrollY:n.scrollTop,u=n===t?t.scrollX:n.scrollLeft;return{top:r.top+c-s,left:r.left+u-l}}return null},css:function(t,e){var n,r=a();if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(var i in t)this[n].style[i]=t[i];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)this[n].style[t]=e;return this}return this},each:function(t){return t?(this.forEach((function(e,n){t.apply(e,[e,n])})),this):this},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(var e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},text:function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var e=0;e<this.length;e+=1)this[e].textContent=t;return this},is:function(t){var e,n,r=a(),i=o(),s=this[0];if(!s||void 0===t)return!1;if("string"==typeof t){if(s.matches)return s.matches(t);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(t);if(s.msMatchesSelector)return s.msMatchesSelector(t);for(e=v(t),n=0;n<e.length;n+=1)if(e[n]===s)return!0;return!1}if(t===i)return s===i;if(t===r)return s===r;if(t.nodeType||t instanceof f){for(e=t.nodeType?[t]:t,n=0;n<e.length;n+=1)if(e[n]===s)return!0;return!1}return!1},index:function(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},eq:function(t){if(void 0===t)return this;var e=this.length;if(t>e-1)return v([]);if(t<0){var n=e+t;return v(n<0?[]:[this[n]])}return v([this[t]])},append:function(){for(var t,e=o(),n=0;n<arguments.length;n+=1){t=n<0||arguments.length<=n?void 0:arguments[n];for(var r=0;r<this.length;r+=1)if("string"==typeof t){var i=e.createElement("div");for(i.innerHTML=t;i.firstChild;)this[r].appendChild(i.firstChild)}else if(t instanceof f)for(var s=0;s<t.length;s+=1)this[r].appendChild(t[s]);else this[r].appendChild(t)}return this},prepend:function(t){var e,n,r=o();for(e=0;e<this.length;e+=1)if("string"==typeof t){var i=r.createElement("div");for(i.innerHTML=t,n=i.childNodes.length-1;n>=0;n-=1)this[e].insertBefore(i.childNodes[n],this[e].childNodes[0])}else if(t instanceof f)for(n=0;n<t.length;n+=1)this[e].insertBefore(t[n],this[e].childNodes[0]);else this[e].insertBefore(t,this[e].childNodes[0]);return this},next:function(t){return this.length>0?t?this[0].nextElementSibling&&v(this[0].nextElementSibling).is(t)?v([this[0].nextElementSibling]):v([]):this[0].nextElementSibling?v([this[0].nextElementSibling]):v([]):v([])},nextAll:function(t){var e=[],n=this[0];if(!n)return v([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;t?v(r).is(t)&&e.push(r):e.push(r),n=r}return v(e)},prev:function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&v(e.previousElementSibling).is(t)?v([e.previousElementSibling]):v([]):e.previousElementSibling?v([e.previousElementSibling]):v([])}return v([])},prevAll:function(t){var e=[],n=this[0];if(!n)return v([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;t?v(r).is(t)&&e.push(r):e.push(r),n=r}return v(e)},parent:function(t){for(var e=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?v(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return v(e)},parents:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)t?v(r).is(t)&&e.push(r):e.push(r),r=r.parentNode;return v(e)},closest:function(t){var e=this;return void 0===t?v([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(t),i=0;i<r.length;i+=1)e.push(r[i]);return v(e)},children:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)t&&!v(r[i]).is(t)||e.push(r[i]);return v(e)},filter:function(t){return v(g(this,t))},remove:function(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}};Object.keys(_).forEach((function(t){Object.defineProperty(v.fn,t,{value:_[t],writable:!0})}));const b=v;function w(t,e){return void 0===e&&(e=0),setTimeout(t,e)}function x(){return Date.now()}function S(t,e){void 0===e&&(e="x");var n,r,i,o=a(),s=function(t){var e,n=a();return n.getComputedStyle&&(e=n.getComputedStyle(t,null)),!e&&t.currentStyle&&(e=t.currentStyle),e||(e=t.style),e}(t);return o.WebKitCSSMatrix?((r=s.transform||s.webkitTransform).split(",").length>6&&(r=r.split(", ").map((function(t){return t.replace(",",".")})).join(", ")),i=new o.WebKitCSSMatrix("none"===r?"":r)):n=(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===e&&(r=o.WebKitCSSMatrix?i.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===e&&(r=o.WebKitCSSMatrix?i.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),r||0}function E(t){return"object"==typeof t&&null!==t&&t.constructor&&"Object"===Object.prototype.toString.call(t).slice(8,-1)}function C(){for(var t=Object(arguments.length<=0?void 0:arguments[0]),e=["__proto__","constructor","prototype"],n="undefined"!=typeof window?window.HTMLElement:void 0,r=1;r<arguments.length;r+=1){var i=r<0||arguments.length<=r?void 0:arguments[r];if(null!=i&&!(n&&i instanceof n))for(var o=Object.keys(Object(i)).filter((function(t){return e.indexOf(t)<0})),s=0,a=o.length;s<a;s+=1){var l=o[s],c=Object.getOwnPropertyDescriptor(i,l);void 0!==c&&c.enumerable&&(E(t[l])&&E(i[l])?i[l].__swiper__?t[l]=i[l]:C(t[l],i[l]):!E(t[l])&&E(i[l])?(t[l]={},i[l].__swiper__?t[l]=i[l]:C(t[l],i[l])):t[l]=i[l])}}return t}var T,O,k;function M(){return T||(T=function(){var t=a(),e=o();return{touch:!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!!t.PointerEvent&&"maxTouchPoints"in t.navigator&&t.navigator.maxTouchPoints>=0,observer:"MutationObserver"in t||"WebkitMutationObserver"in t,passiveListener:function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,n)}catch(t){}return e}(),gestures:"ongesturestart"in t}}()),T}function P(t){return void 0===t&&(t={}),O||(O=function(t){var e=(void 0===t?{}:t).userAgent,n=M(),r=a(),i=r.navigator.platform,o=e||r.navigator.userAgent,s={ios:!1,android:!1},l=r.screen.width,c=r.screen.height,u=o.match(/(Android);?[\s\/]+([\d.]+)?/),h=o.match(/(iPad).*OS\s([\d_]+)/),p=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!h&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),d="Win32"===i,g="MacIntel"===i;return!h&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(l+"x"+c)>=0&&((h=o.match(/(Version)\/([\d.]+)/))||(h=[0,1,"13_0_0"]),g=!1),u&&!d&&(s.os="android",s.android=!0),(h||f||p)&&(s.os="ios",s.ios=!0),s}(t)),O}function L(){return k||(k=function(){var t,e=a();return{isEdge:!!e.navigator.userAgent.match(/Edge/g),isSafari:(t=e.navigator.userAgent.toLowerCase(),t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),k}const A={name:"resize",create:function(){var t=this;C(t,{resize:{observer:null,createObserver:function(){t&&!t.destroyed&&t.initialized&&(t.resize.observer=new ResizeObserver((function(e){var n=t.width,r=t.height,i=n,o=r;e.forEach((function(e){var n=e.contentBoxSize,r=e.contentRect,s=e.target;s&&s!==t.el||(i=r?r.width:(n[0]||n).inlineSize,o=r?r.height:(n[0]||n).blockSize)})),i===n&&o===r||t.resize.resizeHandler()})),t.resize.observer.observe(t.el))},removeObserver:function(){t.resize.observer&&t.resize.observer.unobserve&&t.el&&(t.resize.observer.unobserve(t.el),t.resize.observer=null)},resizeHandler:function(){t&&!t.destroyed&&t.initialized&&(t.emit("beforeResize"),t.emit("resize"))},orientationChangeHandler:function(){t&&!t.destroyed&&t.initialized&&t.emit("orientationchange")}}})},on:{init:function(t){var e=a();t.params.resizeObserver&&void 0!==a().ResizeObserver?t.resize.createObserver():(e.addEventListener("resize",t.resize.resizeHandler),e.addEventListener("orientationchange",t.resize.orientationChangeHandler))},destroy:function(t){var e=a();t.resize.removeObserver(),e.removeEventListener("resize",t.resize.resizeHandler),e.removeEventListener("orientationchange",t.resize.orientationChangeHandler)}}};function I(){return I=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},I.apply(this,arguments)}var R={attach:function(t,e){void 0===e&&(e={});var n=a(),r=this,i=new(n.MutationObserver||n.WebkitMutationObserver)((function(t){if(1!==t.length){var e=function(){r.emit("observerUpdate",t[0])};n.requestAnimationFrame?n.requestAnimationFrame(e):n.setTimeout(e,0)}else r.emit("observerUpdate",t[0])}));i.observe(t,{attributes:void 0===e.attributes||e.attributes,childList:void 0===e.childList||e.childList,characterData:void 0===e.characterData||e.characterData}),r.observer.observers.push(i)},init:function(){var t=this;if(t.support.observer&&t.params.observer){if(t.params.observeParents)for(var e=t.$el.parents(),n=0;n<e.length;n+=1)t.observer.attach(e[n]);t.observer.attach(t.$el[0],{childList:t.params.observeSlideChildren}),t.observer.attach(t.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach((function(t){t.disconnect()})),this.observer.observers=[]}};const D={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){!function(t,e){Object.keys(e).forEach((function(n){E(e[n])&&Object.keys(e[n]).forEach((function(r){"function"==typeof e[n][r]&&(e[n][r]=e[n][r].bind(t))})),t[n]=e[n]}))}(this,{observer:I({},R,{observers:[]})})},on:{init:function(t){t.observer.init()},destroy:function(t){t.observer.destroy()}}},j={useParams:function(t){var e=this;e.modules&&Object.keys(e.modules).forEach((function(n){var r=e.modules[n];r.params&&C(t,r.params)}))},useModules:function(t){void 0===t&&(t={});var e=this;e.modules&&Object.keys(e.modules).forEach((function(n){var r=e.modules[n],i=t[n]||{};r.on&&e.on&&Object.keys(r.on).forEach((function(t){e.on(t,r.on[t])})),r.create&&r.create.bind(e)(i)}))}},F={on:function(t,e,n){var r=this;if("function"!=typeof e)return r;var i=n?"unshift":"push";return t.split(" ").forEach((function(t){r.eventsListeners[t]||(r.eventsListeners[t]=[]),r.eventsListeners[t][i](e)})),r},once:function(t,e,n){var r=this;if("function"!=typeof e)return r;function i(){r.off(t,i),i.__emitterProxy&&delete i.__emitterProxy;for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];e.apply(r,o)}return i.__emitterProxy=e,r.on(t,i,n)},onAny:function(t,e){var n=this;if("function"!=typeof t)return n;var r=e?"unshift":"push";return n.eventsAnyListeners.indexOf(t)<0&&n.eventsAnyListeners[r](t),n},offAny:function(t){var e=this;if(!e.eventsAnyListeners)return e;var n=e.eventsAnyListeners.indexOf(t);return n>=0&&e.eventsAnyListeners.splice(n,1),e},off:function(t,e){var n=this;return n.eventsListeners?(t.split(" ").forEach((function(t){void 0===e?n.eventsListeners[t]=[]:n.eventsListeners[t]&&n.eventsListeners[t].forEach((function(r,i){(r===e||r.__emitterProxy&&r.__emitterProxy===e)&&n.eventsListeners[t].splice(i,1)}))})),n):n},emit:function(){var t,e,n,r=this;if(!r.eventsListeners)return r;for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];"string"==typeof o[0]||Array.isArray(o[0])?(t=o[0],e=o.slice(1,o.length),n=r):(t=o[0].events,e=o[0].data,n=o[0].context||r),e.unshift(n);var a=Array.isArray(t)?t:t.split(" ");return a.forEach((function(t){r.eventsAnyListeners&&r.eventsAnyListeners.length&&r.eventsAnyListeners.forEach((function(r){r.apply(n,[t].concat(e))})),r.eventsListeners&&r.eventsListeners[t]&&r.eventsListeners[t].forEach((function(t){t.apply(n,e)}))})),r}};const N={updateSize:function(){var t,e,n=this,r=n.$el;t=void 0!==n.params.width&&null!==n.params.width?n.params.width:r[0].clientWidth,e=void 0!==n.params.height&&null!==n.params.height?n.params.height:r[0].clientHeight,0===t&&n.isHorizontal()||0===e&&n.isVertical()||(t=t-parseInt(r.css("padding-left")||0,10)-parseInt(r.css("padding-right")||0,10),e=e-parseInt(r.css("padding-top")||0,10)-parseInt(r.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(e)&&(e=0),C(n,{width:t,height:e,size:n.isHorizontal()?t:e}))},updateSlides:function(){var t=this;function e(e){return t.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}function n(t,n){return parseFloat(t.getPropertyValue(e(n))||0)}var r=t.params,i=t.$wrapperEl,o=t.size,s=t.rtlTranslate,a=t.wrongRTL,l=t.virtual&&r.virtual.enabled,c=l?t.virtual.slides.length:t.slides.length,u=i.children("."+t.params.slideClass),h=l?t.virtual.slides.length:u.length,p=[],f=[],d=[],g=r.slidesOffsetBefore;"function"==typeof g&&(g=r.slidesOffsetBefore.call(t));var v=r.slidesOffsetAfter;"function"==typeof v&&(v=r.slidesOffsetAfter.call(t));var m=t.snapGrid.length,y=t.slidesGrid.length,_=r.spaceBetween,b=-g,w=0,x=0;if(void 0!==o){var S,E;"string"==typeof _&&_.indexOf("%")>=0&&(_=parseFloat(_.replace("%",""))/100*o),t.virtualSize=-_,s?u.css({marginLeft:"",marginTop:""}):u.css({marginRight:"",marginBottom:""}),r.slidesPerColumn>1&&(S=Math.floor(h/r.slidesPerColumn)===h/t.params.slidesPerColumn?h:Math.ceil(h/r.slidesPerColumn)*r.slidesPerColumn,"auto"!==r.slidesPerView&&"row"===r.slidesPerColumnFill&&(S=Math.max(S,r.slidesPerView*r.slidesPerColumn)));for(var T,O,k,M=r.slidesPerColumn,P=S/M,L=Math.floor(h/r.slidesPerColumn),A=0;A<h;A+=1){E=0;var I=u.eq(A);if(r.slidesPerColumn>1){var R=void 0,D=void 0,j=void 0;if("row"===r.slidesPerColumnFill&&r.slidesPerGroup>1){var F=Math.floor(A/(r.slidesPerGroup*r.slidesPerColumn)),N=A-r.slidesPerColumn*r.slidesPerGroup*F,B=0===F?r.slidesPerGroup:Math.min(Math.ceil((h-F*M*r.slidesPerGroup)/M),r.slidesPerGroup);R=(D=N-(j=Math.floor(N/B))*B+F*r.slidesPerGroup)+j*S/M,I.css({"-webkit-box-ordinal-group":R,"-moz-box-ordinal-group":R,"-ms-flex-order":R,"-webkit-order":R,order:R})}else"column"===r.slidesPerColumnFill?(j=A-(D=Math.floor(A/M))*M,(D>L||D===L&&j===M-1)&&(j+=1)>=M&&(j=0,D+=1)):D=A-(j=Math.floor(A/P))*P;I.css(e("margin-top"),0!==j?r.spaceBetween&&r.spaceBetween+"px":"")}if("none"!==I.css("display")){if("auto"===r.slidesPerView){var z=getComputedStyle(I[0]),G=I[0].style.transform,X=I[0].style.webkitTransform;if(G&&(I[0].style.transform="none"),X&&(I[0].style.webkitTransform="none"),r.roundLengths)E=t.isHorizontal()?I.outerWidth(!0):I.outerHeight(!0);else{var H=n(z,"width"),U=n(z,"padding-left"),Z=n(z,"padding-right"),q=n(z,"margin-left"),W=n(z,"margin-right"),Y=z.getPropertyValue("box-sizing");if(Y&&"border-box"===Y)E=H+q+W;else{var V=I[0],K=V.clientWidth;E=H+U+Z+q+W+(V.offsetWidth-K)}}G&&(I[0].style.transform=G),X&&(I[0].style.webkitTransform=X),r.roundLengths&&(E=Math.floor(E))}else E=(o-(r.slidesPerView-1)*_)/r.slidesPerView,r.roundLengths&&(E=Math.floor(E)),u[A]&&(u[A].style[e("width")]=E+"px");u[A]&&(u[A].swiperSlideSize=E),d.push(E),r.centeredSlides?(b=b+E/2+w/2+_,0===w&&0!==A&&(b=b-o/2-_),0===A&&(b=b-o/2-_),Math.abs(b)<.001&&(b=0),r.roundLengths&&(b=Math.floor(b)),x%r.slidesPerGroup==0&&p.push(b),f.push(b)):(r.roundLengths&&(b=Math.floor(b)),(x-Math.min(t.params.slidesPerGroupSkip,x))%t.params.slidesPerGroup==0&&p.push(b),f.push(b),b=b+E+_),t.virtualSize+=E+_,w=E,x+=1}}if(t.virtualSize=Math.max(t.virtualSize,o)+v,s&&a&&("slide"===r.effect||"coverflow"===r.effect)&&i.css({width:t.virtualSize+r.spaceBetween+"px"}),r.setWrapperSize)i.css(((O={})[e("width")]=t.virtualSize+r.spaceBetween+"px",O));if(r.slidesPerColumn>1)if(t.virtualSize=(E+r.spaceBetween)*S,t.virtualSize=Math.ceil(t.virtualSize/r.slidesPerColumn)-r.spaceBetween,i.css(((k={})[e("width")]=t.virtualSize+r.spaceBetween+"px",k)),r.centeredSlides){T=[];for(var $=0;$<p.length;$+=1){var J=p[$];r.roundLengths&&(J=Math.floor(J)),p[$]<t.virtualSize+p[0]&&T.push(J)}p=T}if(!r.centeredSlides){T=[];for(var Q=0;Q<p.length;Q+=1){var tt=p[Q];r.roundLengths&&(tt=Math.floor(tt)),p[Q]<=t.virtualSize-o&&T.push(tt)}p=T,Math.floor(t.virtualSize-o)-Math.floor(p[p.length-1])>1&&p.push(t.virtualSize-o)}if(0===p.length&&(p=[0]),0!==r.spaceBetween){var et,nt=t.isHorizontal()&&s?"marginLeft":e("marginRight");u.filter((function(t,e){return!r.cssMode||e!==u.length-1})).css(((et={})[nt]=_+"px",et))}if(r.centeredSlides&&r.centeredSlidesBounds){var rt=0;d.forEach((function(t){rt+=t+(r.spaceBetween?r.spaceBetween:0)}));var it=(rt-=r.spaceBetween)-o;p=p.map((function(t){return t<0?-g:t>it?it+v:t}))}if(r.centerInsufficientSlides){var ot=0;if(d.forEach((function(t){ot+=t+(r.spaceBetween?r.spaceBetween:0)})),(ot-=r.spaceBetween)<o){var st=(o-ot)/2;p.forEach((function(t,e){p[e]=t-st})),f.forEach((function(t,e){f[e]=t+st}))}}C(t,{slides:u,snapGrid:p,slidesGrid:f,slidesSizesGrid:d}),h!==c&&t.emit("slidesLengthChange"),p.length!==m&&(t.params.watchOverflow&&t.checkOverflow(),t.emit("snapGridLengthChange")),f.length!==y&&t.emit("slidesGridLengthChange"),(r.watchSlidesProgress||r.watchSlidesVisibility)&&t.updateSlidesOffset()}},updateAutoHeight:function(t){var e,n=this,r=[],i=n.virtual&&n.params.virtual.enabled,o=0;"number"==typeof t?n.setTransition(t):!0===t&&n.setTransition(n.params.speed);var s=function(t){return i?n.slides.filter((function(e){return parseInt(e.getAttribute("data-swiper-slide-index"),10)===t}))[0]:n.slides.eq(t)[0]};if("auto"!==n.params.slidesPerView&&n.params.slidesPerView>1)if(n.params.centeredSlides)n.visibleSlides.each((function(t){r.push(t)}));else for(e=0;e<Math.ceil(n.params.slidesPerView);e+=1){var a=n.activeIndex+e;if(a>n.slides.length&&!i)break;r.push(s(a))}else r.push(s(n.activeIndex));for(e=0;e<r.length;e+=1)if(void 0!==r[e]){var l=r[e].offsetHeight;o=l>o?l:o}o&&n.$wrapperEl.css("height",o+"px")},updateSlidesOffset:function(){for(var t=this.slides,e=0;e<t.length;e+=1)t[e].swiperSlideOffset=this.isHorizontal()?t[e].offsetLeft:t[e].offsetTop},updateSlidesProgress:function(t){void 0===t&&(t=this&&this.translate||0);var e=this,n=e.params,r=e.slides,i=e.rtlTranslate;if(0!==r.length){void 0===r[0].swiperSlideOffset&&e.updateSlidesOffset();var o=-t;i&&(o=t),r.removeClass(n.slideVisibleClass),e.visibleSlidesIndexes=[],e.visibleSlides=[];for(var s=0;s<r.length;s+=1){var a=r[s],l=(o+(n.centeredSlides?e.minTranslate():0)-a.swiperSlideOffset)/(a.swiperSlideSize+n.spaceBetween);if(n.watchSlidesVisibility||n.centeredSlides&&n.autoHeight){var c=-(o-a.swiperSlideOffset),u=c+e.slidesSizesGrid[s];(c>=0&&c<e.size-1||u>1&&u<=e.size||c<=0&&u>=e.size)&&(e.visibleSlides.push(a),e.visibleSlidesIndexes.push(s),r.eq(s).addClass(n.slideVisibleClass))}a.progress=i?-l:l}e.visibleSlides=b(e.visibleSlides)}},updateProgress:function(t){var e=this;if(void 0===t){var n=e.rtlTranslate?-1:1;t=e&&e.translate&&e.translate*n||0}var r=e.params,i=e.maxTranslate()-e.minTranslate(),o=e.progress,s=e.isBeginning,a=e.isEnd,l=s,c=a;0===i?(o=0,s=!0,a=!0):(s=(o=(t-e.minTranslate())/i)<=0,a=o>=1),C(e,{progress:o,isBeginning:s,isEnd:a}),(r.watchSlidesProgress||r.watchSlidesVisibility||r.centeredSlides&&r.autoHeight)&&e.updateSlidesProgress(t),s&&!l&&e.emit("reachBeginning toEdge"),a&&!c&&e.emit("reachEnd toEdge"),(l&&!s||c&&!a)&&e.emit("fromEdge"),e.emit("progress",o)},updateSlidesClasses:function(){var t,e=this,n=e.slides,r=e.params,i=e.$wrapperEl,o=e.activeIndex,s=e.realIndex,a=e.virtual&&r.virtual.enabled;n.removeClass(r.slideActiveClass+" "+r.slideNextClass+" "+r.slidePrevClass+" "+r.slideDuplicateActiveClass+" "+r.slideDuplicateNextClass+" "+r.slideDuplicatePrevClass),(t=a?e.$wrapperEl.find("."+r.slideClass+'[data-swiper-slide-index="'+o+'"]'):n.eq(o)).addClass(r.slideActiveClass),r.loop&&(t.hasClass(r.slideDuplicateClass)?i.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+s+'"]').addClass(r.slideDuplicateActiveClass):i.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+s+'"]').addClass(r.slideDuplicateActiveClass));var l=t.nextAll("."+r.slideClass).eq(0).addClass(r.slideNextClass);r.loop&&0===l.length&&(l=n.eq(0)).addClass(r.slideNextClass);var c=t.prevAll("."+r.slideClass).eq(0).addClass(r.slidePrevClass);r.loop&&0===c.length&&(c=n.eq(-1)).addClass(r.slidePrevClass),r.loop&&(l.hasClass(r.slideDuplicateClass)?i.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass):i.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass),c.hasClass(r.slideDuplicateClass)?i.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass):i.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(t){var e,n=this,r=n.rtlTranslate?n.translate:-n.translate,i=n.slidesGrid,o=n.snapGrid,s=n.params,a=n.activeIndex,l=n.realIndex,c=n.snapIndex,u=t;if(void 0===u){for(var h=0;h<i.length;h+=1)void 0!==i[h+1]?r>=i[h]&&r<i[h+1]-(i[h+1]-i[h])/2?u=h:r>=i[h]&&r<i[h+1]&&(u=h+1):r>=i[h]&&(u=h);s.normalizeSlideIndex&&(u<0||void 0===u)&&(u=0)}if(o.indexOf(r)>=0)e=o.indexOf(r);else{var p=Math.min(s.slidesPerGroupSkip,u);e=p+Math.floor((u-p)/s.slidesPerGroup)}if(e>=o.length&&(e=o.length-1),u!==a){var f=parseInt(n.slides.eq(u).attr("data-swiper-slide-index")||u,10);C(n,{snapIndex:e,realIndex:f,previousIndex:a,activeIndex:u}),n.emit("activeIndexChange"),n.emit("snapIndexChange"),l!==f&&n.emit("realIndexChange"),(n.initialized||n.params.runCallbacksOnInit)&&n.emit("slideChange")}else e!==c&&(n.snapIndex=e,n.emit("snapIndexChange"))},updateClickedSlide:function(t){var e,n=this,r=n.params,i=b(t.target).closest("."+r.slideClass)[0],o=!1;if(i)for(var s=0;s<n.slides.length;s+=1)if(n.slides[s]===i){o=!0,e=s;break}if(!i||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(b(i).attr("data-swiper-slide-index"),10):n.clickedIndex=e,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};const B={getTranslate:function(t){void 0===t&&(t=this.isHorizontal()?"x":"y");var e=this,n=e.params,r=e.rtlTranslate,i=e.translate,o=e.$wrapperEl;if(n.virtualTranslate)return r?-i:i;if(n.cssMode)return i;var s=S(o[0],t);return r&&(s=-s),s||0},setTranslate:function(t,e){var n=this,r=n.rtlTranslate,i=n.params,o=n.$wrapperEl,s=n.wrapperEl,a=n.progress,l=0,c=0;n.isHorizontal()?l=r?-t:t:c=t,i.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),i.cssMode?s[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:i.virtualTranslate||o.transform("translate3d("+l+"px, "+c+"px, 0px)"),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c;var u=n.maxTranslate()-n.minTranslate();(0===u?0:(t-n.minTranslate())/u)!==a&&n.updateProgress(t),n.emit("setTranslate",n.translate,e)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(t,e,n,r,i){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);var o=this,s=o.params,a=o.wrapperEl;if(o.animating&&s.preventInteractionOnTransition)return!1;var l,c=o.minTranslate(),u=o.maxTranslate();if(l=r&&t>c?c:r&&t<u?u:t,o.updateProgress(l),s.cssMode){var h,p=o.isHorizontal();if(0===e)a[p?"scrollLeft":"scrollTop"]=-l;else if(a.scrollTo)a.scrollTo(((h={})[p?"left":"top"]=-l,h.behavior="smooth",h));else a[p?"scrollLeft":"scrollTop"]=-l;return!0}return 0===e?(o.setTransition(0),o.setTranslate(l),n&&(o.emit("beforeTransitionStart",e,i),o.emit("transitionEnd"))):(o.setTransition(e),o.setTranslate(l),n&&(o.emit("beforeTransitionStart",e,i),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(t){o&&!o.destroyed&&t.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd))),!0}};const z={slideTo:function(t,e,n,r,i){if(void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0),"number"!=typeof t&&"string"!=typeof t)throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. ["+typeof t+"] given.");if("string"==typeof t){var o=parseInt(t,10);if(!isFinite(o))throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. ["+t+"] given.");t=o}var s=this,a=t;a<0&&(a=0);var l=s.params,c=s.snapGrid,u=s.slidesGrid,h=s.previousIndex,p=s.activeIndex,f=s.rtlTranslate,d=s.wrapperEl,g=s.enabled;if(s.animating&&l.preventInteractionOnTransition||!g&&!r&&!i)return!1;var v=Math.min(s.params.slidesPerGroupSkip,a),m=v+Math.floor((a-v)/s.params.slidesPerGroup);m>=c.length&&(m=c.length-1),(p||l.initialSlide||0)===(h||0)&&n&&s.emit("beforeSlideChangeStart");var y,_=-c[m];if(s.updateProgress(_),l.normalizeSlideIndex)for(var b=0;b<u.length;b+=1){var w=-Math.floor(100*_),x=Math.floor(100*u[b]),S=Math.floor(100*u[b+1]);void 0!==u[b+1]?w>=x&&w<S-(S-x)/2?a=b:w>=x&&w<S&&(a=b+1):w>=x&&(a=b)}if(s.initialized&&a!==p){if(!s.allowSlideNext&&_<s.translate&&_<s.minTranslate())return!1;if(!s.allowSlidePrev&&_>s.translate&&_>s.maxTranslate()&&(p||0)!==a)return!1}if(y=a>p?"next":a<p?"prev":"reset",f&&-_===s.translate||!f&&_===s.translate)return s.updateActiveIndex(a),l.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==l.effect&&s.setTranslate(_),"reset"!==y&&(s.transitionStart(n,y),s.transitionEnd(n,y)),!1;if(l.cssMode){var E,C=s.isHorizontal(),T=-_;if(f&&(T=d.scrollWidth-d.offsetWidth-T),0===e)d[C?"scrollLeft":"scrollTop"]=T;else if(d.scrollTo)d.scrollTo(((E={})[C?"left":"top"]=T,E.behavior="smooth",E));else d[C?"scrollLeft":"scrollTop"]=T;return!0}return 0===e?(s.setTransition(0),s.setTranslate(_),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",e,r),s.transitionStart(n,y),s.transitionEnd(n,y)):(s.setTransition(e),s.setTranslate(_),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",e,r),s.transitionStart(n,y),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(t){s&&!s.destroyed&&t.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(n,y))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0);var i=this,o=t;return i.params.loop&&(o+=i.loopedSlides),i.slideTo(o,e,n,r)},slideNext:function(t,e,n){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0);var r=this,i=r.params,o=r.animating;if(!r.enabled)return r;var s=r.activeIndex<i.slidesPerGroupSkip?1:i.slidesPerGroup;if(i.loop){if(o&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return r.slideTo(r.activeIndex+s,t,e,n)},slidePrev:function(t,e,n){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0);var r=this,i=r.params,o=r.animating,s=r.snapGrid,a=r.slidesGrid,l=r.rtlTranslate;if(!r.enabled)return r;if(i.loop){if(o&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}function c(t){return t<0?-Math.floor(Math.abs(t)):Math.floor(t)}var u,h=c(l?r.translate:-r.translate),p=s.map((function(t){return c(t)})),f=s[p.indexOf(h)-1];return void 0===f&&i.cssMode&&s.forEach((function(t){!f&&h>=t&&(f=t)})),void 0!==f&&(u=a.indexOf(f))<0&&(u=r.activeIndex-1),r.slideTo(u,t,e,n)},slideReset:function(t,e,n){return void 0===t&&(t=this.params.speed),void 0===e&&(e=!0),this.slideTo(this.activeIndex,t,e,n)},slideToClosest:function(t,e,n,r){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0),void 0===r&&(r=.5);var i=this,o=i.activeIndex,s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){var c=i.snapGrid[a];l-c>(i.snapGrid[a+1]-c)*r&&(o+=i.params.slidesPerGroup)}else{var u=i.snapGrid[a-1];l-u<=(i.snapGrid[a]-u)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,t,e,n)},slideToClickedSlide:function(){var t,e=this,n=e.params,r=e.$wrapperEl,i="auto"===n.slidesPerView?e.slidesPerViewDynamic():n.slidesPerView,o=e.clickedIndex;if(n.loop){if(e.animating)return;t=parseInt(b(e.clickedSlide).attr("data-swiper-slide-index"),10),n.centeredSlides?o<e.loopedSlides-i/2||o>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),o=r.children("."+n.slideClass+'[data-swiper-slide-index="'+t+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),w((function(){e.slideTo(o)}))):e.slideTo(o):o>e.slides.length-i?(e.loopFix(),o=r.children("."+n.slideClass+'[data-swiper-slide-index="'+t+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),w((function(){e.slideTo(o)}))):e.slideTo(o)}else e.slideTo(o)}};const G={loopCreate:function(){var t=this,e=o(),n=t.params,r=t.$wrapperEl;r.children("."+n.slideClass+"."+n.slideDuplicateClass).remove();var i=r.children("."+n.slideClass);if(n.loopFillGroupWithBlank){var s=n.slidesPerGroup-i.length%n.slidesPerGroup;if(s!==n.slidesPerGroup){for(var a=0;a<s;a+=1){var l=b(e.createElement("div")).addClass(n.slideClass+" "+n.slideBlankClass);r.append(l)}i=r.children("."+n.slideClass)}}"auto"!==n.slidesPerView||n.loopedSlides||(n.loopedSlides=i.length),t.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),t.loopedSlides+=n.loopAdditionalSlides,t.loopedSlides>i.length&&(t.loopedSlides=i.length);var c=[],u=[];i.each((function(e,n){var r=b(e);n<t.loopedSlides&&u.push(e),n<i.length&&n>=i.length-t.loopedSlides&&c.push(e),r.attr("data-swiper-slide-index",n)}));for(var h=0;h<u.length;h+=1)r.append(b(u[h].cloneNode(!0)).addClass(n.slideDuplicateClass));for(var p=c.length-1;p>=0;p-=1)r.prepend(b(c[p].cloneNode(!0)).addClass(n.slideDuplicateClass))},loopFix:function(){var t=this;t.emit("beforeLoopFix");var e,n=t.activeIndex,r=t.slides,i=t.loopedSlides,o=t.allowSlidePrev,s=t.allowSlideNext,a=t.snapGrid,l=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var c=-a[n]-t.getTranslate();if(n<i)e=r.length-3*i+n,e+=i,t.slideTo(e,0,!1,!0)&&0!==c&&t.setTranslate((l?-t.translate:t.translate)-c);else if(n>=r.length-i){e=-r.length+n+i,e+=i,t.slideTo(e,0,!1,!0)&&0!==c&&t.setTranslate((l?-t.translate:t.translate)-c)}t.allowSlidePrev=o,t.allowSlideNext=s,t.emit("loopFix")},loopDestroy:function(){var t=this,e=t.$wrapperEl,n=t.params,r=t.slides;e.children("."+n.slideClass+"."+n.slideDuplicateClass+",."+n.slideClass+"."+n.slideBlankClass).remove(),r.removeAttr("data-swiper-slide-index")}};const X={appendSlide:function(t){var e=this,n=e.$wrapperEl,r=e.params;if(r.loop&&e.loopDestroy(),"object"==typeof t&&"length"in t)for(var i=0;i<t.length;i+=1)t[i]&&n.append(t[i]);else n.append(t);r.loop&&e.loopCreate(),r.observer&&e.support.observer||e.update()},prependSlide:function(t){var e=this,n=e.params,r=e.$wrapperEl,i=e.activeIndex;n.loop&&e.loopDestroy();var o=i+1;if("object"==typeof t&&"length"in t){for(var s=0;s<t.length;s+=1)t[s]&&r.prepend(t[s]);o=i+t.length}else r.prepend(t);n.loop&&e.loopCreate(),n.observer&&e.support.observer||e.update(),e.slideTo(o,0,!1)},addSlide:function(t,e){var n=this,r=n.$wrapperEl,i=n.params,o=n.activeIndex;i.loop&&(o-=n.loopedSlides,n.loopDestroy(),n.slides=r.children("."+i.slideClass));var s=n.slides.length;if(t<=0)n.prependSlide(e);else if(t>=s)n.appendSlide(e);else{for(var a=o>t?o+1:o,l=[],c=s-1;c>=t;c-=1){var u=n.slides.eq(c);u.remove(),l.unshift(u)}if("object"==typeof e&&"length"in e){for(var h=0;h<e.length;h+=1)e[h]&&r.append(e[h]);a=o>t?o+e.length:o}else r.append(e);for(var p=0;p<l.length;p+=1)r.append(l[p]);i.loop&&n.loopCreate(),i.observer&&n.support.observer||n.update(),i.loop?n.slideTo(a+n.loopedSlides,0,!1):n.slideTo(a,0,!1)}},removeSlide:function(t){var e=this,n=e.params,r=e.$wrapperEl,i=e.activeIndex;n.loop&&(i-=e.loopedSlides,e.loopDestroy(),e.slides=r.children("."+n.slideClass));var o,s=i;if("object"==typeof t&&"length"in t){for(var a=0;a<t.length;a+=1)o=t[a],e.slides[o]&&e.slides.eq(o).remove(),o<s&&(s-=1);s=Math.max(s,0)}else o=t,e.slides[o]&&e.slides.eq(o).remove(),o<s&&(s-=1),s=Math.max(s,0);n.loop&&e.loopCreate(),n.observer&&e.support.observer||e.update(),n.loop?e.slideTo(s+e.loopedSlides,0,!1):e.slideTo(s,0,!1)},removeAllSlides:function(){for(var t=[],e=0;e<this.slides.length;e+=1)t.push(e);this.removeSlide(t)}};function H(t){var e=this,n=o(),r=a(),i=e.touchEventsData,s=e.params,l=e.touches;if(e.enabled&&(!e.animating||!s.preventInteractionOnTransition)){var c=t;c.originalEvent&&(c=c.originalEvent);var u=b(c.target);if("wrapper"!==s.touchEventsTarget||u.closest(e.wrapperEl).length)if(i.isTouchEvent="touchstart"===c.type,i.isTouchEvent||!("which"in c)||3!==c.which)if(!(!i.isTouchEvent&&"button"in c&&c.button>0))if(!i.isTouched||!i.isMoved)if(!!s.noSwipingClass&&""!==s.noSwipingClass&&c.target&&c.target.shadowRoot&&t.path&&t.path[0]&&(u=b(t.path[0])),s.noSwiping&&u.closest(s.noSwipingSelector?s.noSwipingSelector:"."+s.noSwipingClass)[0])e.allowClick=!0;else if(!s.swipeHandler||u.closest(s.swipeHandler)[0]){l.currentX="touchstart"===c.type?c.targetTouches[0].pageX:c.pageX,l.currentY="touchstart"===c.type?c.targetTouches[0].pageY:c.pageY;var h=l.currentX,p=l.currentY,f=s.edgeSwipeDetection||s.iOSEdgeSwipeDetection,d=s.edgeSwipeThreshold||s.iOSEdgeSwipeThreshold;if(f&&(h<=d||h>=r.innerWidth-d)){if("prevent"!==f)return;t.preventDefault()}if(C(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=h,l.startY=p,i.touchStartTime=x(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,s.threshold>0&&(i.allowThresholdMove=!1),"touchstart"!==c.type){var g=!0;u.is(i.focusableElements)&&(g=!1),n.activeElement&&b(n.activeElement).is(i.focusableElements)&&n.activeElement!==u[0]&&n.activeElement.blur();var v=g&&e.allowTouchMove&&s.touchStartPreventDefault;!s.touchStartForcePreventDefault&&!v||u[0].isContentEditable||c.preventDefault()}e.emit("touchStart",c)}}}function U(t){var e=o(),n=this,r=n.touchEventsData,i=n.params,s=n.touches,a=n.rtlTranslate;if(n.enabled){var l=t;if(l.originalEvent&&(l=l.originalEvent),r.isTouched){if(!r.isTouchEvent||"touchmove"===l.type){var c="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),u="touchmove"===l.type?c.pageX:l.pageX,h="touchmove"===l.type?c.pageY:l.pageY;if(l.preventedByNestedSwiper)return s.startX=u,void(s.startY=h);if(!n.allowTouchMove)return n.allowClick=!1,void(r.isTouched&&(C(s,{startX:u,startY:h,currentX:u,currentY:h}),r.touchStartTime=x()));if(r.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(h<s.startY&&n.translate<=n.maxTranslate()||h>s.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(u<s.startX&&n.translate<=n.maxTranslate()||u>s.startX&&n.translate>=n.minTranslate())return;if(r.isTouchEvent&&e.activeElement&&l.target===e.activeElement&&b(l.target).is(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);if(r.allowTouchCallbacks&&n.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){s.currentX=u,s.currentY=h;var p=s.currentX-s.startX,f=s.currentY-s.startY;if(!(n.params.threshold&&Math.sqrt(Math.pow(p,2)+Math.pow(f,2))<n.params.threshold)){var d;if(void 0===r.isScrolling)n.isHorizontal()&&s.currentY===s.startY||n.isVertical()&&s.currentX===s.startX?r.isScrolling=!1:p*p+f*f>=25&&(d=180*Math.atan2(Math.abs(f),Math.abs(p))/Math.PI,r.isScrolling=n.isHorizontal()?d>i.touchAngle:90-d>i.touchAngle);if(r.isScrolling&&n.emit("touchMoveOpposite",l),void 0===r.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(r.startMoving=!0)),r.isScrolling)r.isTouched=!1;else if(r.startMoving){n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation(),r.isMoved||(i.loop&&n.loopFix(),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),r.allowMomentumBounce=!1,!i.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",l)),n.emit("sliderMove",l),r.isMoved=!0;var g=n.isHorizontal()?p:f;s.diff=g,g*=i.touchRatio,a&&(g=-g),n.swipeDirection=g>0?"prev":"next",r.currentTranslate=g+r.startTranslate;var v=!0,m=i.resistanceRatio;if(i.touchReleaseOnEdges&&(m=0),g>0&&r.currentTranslate>n.minTranslate()?(v=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+Math.pow(-n.minTranslate()+r.startTranslate+g,m))):g<0&&r.currentTranslate<n.maxTranslate()&&(v=!1,i.resistance&&(r.currentTranslate=n.maxTranslate()+1-Math.pow(n.maxTranslate()-r.startTranslate-g,m))),v&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),i.threshold>0){if(!(Math.abs(g)>i.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,r.currentTranslate=r.startTranslate,void(s.diff=n.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&!i.cssMode&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&(0===r.velocities.length&&r.velocities.push({position:s[n.isHorizontal()?"startX":"startY"],time:r.touchStartTime}),r.velocities.push({position:s[n.isHorizontal()?"currentX":"currentY"],time:x()})),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}}}}}else r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l)}}function Z(t){var e=this,n=e.touchEventsData,r=e.params,i=e.touches,o=e.rtlTranslate,s=e.$wrapperEl,a=e.slidesGrid,l=e.snapGrid;if(e.enabled){var c=t;if(c.originalEvent&&(c=c.originalEvent),n.allowTouchCallbacks&&e.emit("touchEnd",c),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&e.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===e.allowSlideNext||!0===e.allowSlidePrev)&&e.setGrabCursor(!1);var u,h=x(),p=h-n.touchStartTime;if(e.allowClick&&(e.updateClickedSlide(c),e.emit("tap click",c),p<300&&h-n.lastClickTime<300&&e.emit("doubleTap doubleClick",c)),n.lastClickTime=x(),w((function(){e.destroyed||(e.allowClick=!0)})),!n.isTouched||!n.isMoved||!e.swipeDirection||0===i.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,u=r.followFinger?o?e.translate:-e.translate:-n.currentTranslate,!r.cssMode)if(r.freeMode){if(u<-e.minTranslate())return void e.slideTo(e.activeIndex);if(u>-e.maxTranslate())return void(e.slides.length<l.length?e.slideTo(l.length-1):e.slideTo(e.slides.length-1));if(r.freeModeMomentum){if(n.velocities.length>1){var f=n.velocities.pop(),d=n.velocities.pop(),g=f.position-d.position,v=f.time-d.time;e.velocity=g/v,e.velocity/=2,Math.abs(e.velocity)<r.freeModeMinimumVelocity&&(e.velocity=0),(v>150||x()-f.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=r.freeModeMomentumVelocityRatio,n.velocities.length=0;var m=1e3*r.freeModeMomentumRatio,y=e.velocity*m,_=e.translate+y;o&&(_=-_);var b,S,E=!1,C=20*Math.abs(e.velocity)*r.freeModeMomentumBounceRatio;if(_<e.maxTranslate())r.freeModeMomentumBounce?(_+e.maxTranslate()<-C&&(_=e.maxTranslate()-C),b=e.maxTranslate(),E=!0,n.allowMomentumBounce=!0):_=e.maxTranslate(),r.loop&&r.centeredSlides&&(S=!0);else if(_>e.minTranslate())r.freeModeMomentumBounce?(_-e.minTranslate()>C&&(_=e.minTranslate()+C),b=e.minTranslate(),E=!0,n.allowMomentumBounce=!0):_=e.minTranslate(),r.loop&&r.centeredSlides&&(S=!0);else if(r.freeModeSticky){for(var T,O=0;O<l.length;O+=1)if(l[O]>-_){T=O;break}_=-(_=Math.abs(l[T]-_)<Math.abs(l[T-1]-_)||"next"===e.swipeDirection?l[T]:l[T-1])}if(S&&e.once("transitionEnd",(function(){e.loopFix()})),0!==e.velocity){if(m=o?Math.abs((-_-e.translate)/e.velocity):Math.abs((_-e.translate)/e.velocity),r.freeModeSticky){var k=Math.abs((o?-_:_)-e.translate),M=e.slidesSizesGrid[e.activeIndex];m=k<M?r.speed:k<2*M?1.5*r.speed:2.5*r.speed}}else if(r.freeModeSticky)return void e.slideToClosest();r.freeModeMomentumBounce&&E?(e.updateProgress(b),e.setTransition(m),e.setTranslate(_),e.transitionStart(!0,e.swipeDirection),e.animating=!0,s.transitionEnd((function(){e&&!e.destroyed&&n.allowMomentumBounce&&(e.emit("momentumBounce"),e.setTransition(r.speed),setTimeout((function(){e.setTranslate(b),s.transitionEnd((function(){e&&!e.destroyed&&e.transitionEnd()}))}),0))}))):e.velocity?(e.updateProgress(_),e.setTransition(m),e.setTranslate(_),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,s.transitionEnd((function(){e&&!e.destroyed&&e.transitionEnd()})))):(e.emit("_freeModeNoMomentumRelease"),e.updateProgress(_)),e.updateActiveIndex(),e.updateSlidesClasses()}else{if(r.freeModeSticky)return void e.slideToClosest();r.freeMode&&e.emit("_freeModeNoMomentumRelease")}(!r.freeModeMomentum||p>=r.longSwipesMs)&&(e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}else{for(var P=0,L=e.slidesSizesGrid[0],A=0;A<a.length;A+=A<r.slidesPerGroupSkip?1:r.slidesPerGroup){var I=A<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==a[A+I]?u>=a[A]&&u<a[A+I]&&(P=A,L=a[A+I]-a[A]):u>=a[A]&&(P=A,L=a[a.length-1]-a[a.length-2])}var R=(u-a[P])/L,D=P<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(p>r.longSwipesMs){if(!r.longSwipes)return void e.slideTo(e.activeIndex);"next"===e.swipeDirection&&(R>=r.longSwipesRatio?e.slideTo(P+D):e.slideTo(P)),"prev"===e.swipeDirection&&(R>1-r.longSwipesRatio?e.slideTo(P+D):e.slideTo(P))}else{if(!r.shortSwipes)return void e.slideTo(e.activeIndex);e.navigation&&(c.target===e.navigation.nextEl||c.target===e.navigation.prevEl)?c.target===e.navigation.nextEl?e.slideTo(P+D):e.slideTo(P):("next"===e.swipeDirection&&e.slideTo(P+D),"prev"===e.swipeDirection&&e.slideTo(P))}}}}function q(){var t=this,e=t.params,n=t.el;if(!n||0!==n.offsetWidth){e.breakpoints&&t.setBreakpoint();var r=t.allowSlideNext,i=t.allowSlidePrev,o=t.snapGrid;t.allowSlideNext=!0,t.allowSlidePrev=!0,t.updateSize(),t.updateSlides(),t.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&t.isEnd&&!t.isBeginning&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0),t.autoplay&&t.autoplay.running&&t.autoplay.paused&&t.autoplay.run(),t.allowSlidePrev=i,t.allowSlideNext=r,t.params.watchOverflow&&o!==t.snapGrid&&t.checkOverflow()}}function W(t){var e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&t.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(t.stopPropagation(),t.stopImmediatePropagation())))}function Y(){var t=this,e=t.wrapperEl,n=t.rtlTranslate;if(t.enabled){t.previousTranslate=t.translate,t.isHorizontal()?t.translate=n?e.scrollWidth-e.offsetWidth-e.scrollLeft:-e.scrollLeft:t.translate=-e.scrollTop,-0===t.translate&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();var r=t.maxTranslate()-t.minTranslate();(0===r?0:(t.translate-t.minTranslate())/r)!==t.progress&&t.updateProgress(n?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}}var V=!1;function K(){}const $={attachEvents:function(){var t=this,e=o(),n=t.params,r=t.touchEvents,i=t.el,s=t.wrapperEl,a=t.device,l=t.support;t.onTouchStart=H.bind(t),t.onTouchMove=U.bind(t),t.onTouchEnd=Z.bind(t),n.cssMode&&(t.onScroll=Y.bind(t)),t.onClick=W.bind(t);var c=!!n.nested;if(!l.touch&&l.pointerEvents)i.addEventListener(r.start,t.onTouchStart,!1),e.addEventListener(r.move,t.onTouchMove,c),e.addEventListener(r.end,t.onTouchEnd,!1);else{if(l.touch){var u=!("touchstart"!==r.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};i.addEventListener(r.start,t.onTouchStart,u),i.addEventListener(r.move,t.onTouchMove,l.passiveListener?{passive:!1,capture:c}:c),i.addEventListener(r.end,t.onTouchEnd,u),r.cancel&&i.addEventListener(r.cancel,t.onTouchEnd,u),V||(e.addEventListener("touchstart",K),V=!0)}(n.simulateTouch&&!a.ios&&!a.android||n.simulateTouch&&!l.touch&&a.ios)&&(i.addEventListener("mousedown",t.onTouchStart,!1),e.addEventListener("mousemove",t.onTouchMove,c),e.addEventListener("mouseup",t.onTouchEnd,!1))}(n.preventClicks||n.preventClicksPropagation)&&i.addEventListener("click",t.onClick,!0),n.cssMode&&s.addEventListener("scroll",t.onScroll),n.updateOnWindowResize?t.on(a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",q,!0):t.on("observerUpdate",q,!0)},detachEvents:function(){var t=this,e=o(),n=t.params,r=t.touchEvents,i=t.el,s=t.wrapperEl,a=t.device,l=t.support,c=!!n.nested;if(!l.touch&&l.pointerEvents)i.removeEventListener(r.start,t.onTouchStart,!1),e.removeEventListener(r.move,t.onTouchMove,c),e.removeEventListener(r.end,t.onTouchEnd,!1);else{if(l.touch){var u=!("onTouchStart"!==r.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};i.removeEventListener(r.start,t.onTouchStart,u),i.removeEventListener(r.move,t.onTouchMove,c),i.removeEventListener(r.end,t.onTouchEnd,u),r.cancel&&i.removeEventListener(r.cancel,t.onTouchEnd,u)}(n.simulateTouch&&!a.ios&&!a.android||n.simulateTouch&&!l.touch&&a.ios)&&(i.removeEventListener("mousedown",t.onTouchStart,!1),e.removeEventListener("mousemove",t.onTouchMove,c),e.removeEventListener("mouseup",t.onTouchEnd,!1))}(n.preventClicks||n.preventClicksPropagation)&&i.removeEventListener("click",t.onClick,!0),n.cssMode&&s.removeEventListener("scroll",t.onScroll),t.off(a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",q)}};const J={setBreakpoint:function(){var t=this,e=t.activeIndex,n=t.initialized,r=t.loopedSlides,i=void 0===r?0:r,o=t.params,s=t.$el,a=o.breakpoints;if(a&&(!a||0!==Object.keys(a).length)){var l=t.getBreakpoint(a,t.params.breakpointsBase,t.el);if(l&&t.currentBreakpoint!==l){var c=l in a?a[l]:void 0;c&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(t){var e=c[t];void 0!==e&&(c[t]="slidesPerView"!==t||"AUTO"!==e&&"auto"!==e?"slidesPerView"===t?parseFloat(e):parseInt(e,10):"auto")}));var u=c||t.originalParams,h=o.slidesPerColumn>1,p=u.slidesPerColumn>1,f=o.enabled;h&&!p?(s.removeClass(o.containerModifierClass+"multirow "+o.containerModifierClass+"multirow-column"),t.emitContainerClasses()):!h&&p&&(s.addClass(o.containerModifierClass+"multirow"),"column"===u.slidesPerColumnFill&&s.addClass(o.containerModifierClass+"multirow-column"),t.emitContainerClasses());var d=u.direction&&u.direction!==o.direction,g=o.loop&&(u.slidesPerView!==o.slidesPerView||d);d&&n&&t.changeDirection(),C(t.params,u);var v=t.params.enabled;C(t,{allowTouchMove:t.params.allowTouchMove,allowSlideNext:t.params.allowSlideNext,allowSlidePrev:t.params.allowSlidePrev}),f&&!v?t.disable():!f&&v&&t.enable(),t.currentBreakpoint=l,t.emit("_beforeBreakpoint",u),g&&n&&(t.loopDestroy(),t.loopCreate(),t.updateSlides(),t.slideTo(e-i+t.loopedSlides,0,!1)),t.emit("breakpoint",u)}}},getBreakpoint:function(t,e,n){if(void 0===e&&(e="window"),t&&("container"!==e||n)){var r=!1,i=a(),o="window"===e?i.innerHeight:n.clientHeight,s=Object.keys(t).map((function(t){if("string"==typeof t&&0===t.indexOf("@")){var e=parseFloat(t.substr(1));return{value:o*e,point:t}}return{value:t,point:t}}));s.sort((function(t,e){return parseInt(t.value,10)-parseInt(e.value,10)}));for(var l=0;l<s.length;l+=1){var c=s[l],u=c.point,h=c.value;"window"===e?i.matchMedia("(min-width: "+h+"px)").matches&&(r=u):h<=n.clientWidth&&(r=u)}return r||"max"}}};const Q={addClasses:function(){var t,e,n,r=this,i=r.classNames,o=r.params,s=r.rtl,a=r.$el,l=r.device,c=r.support,u=(t=["initialized",o.direction,{"pointer-events":c.pointerEvents&&!c.touch},{"free-mode":o.freeMode},{autoheight:o.autoHeight},{rtl:s},{multirow:o.slidesPerColumn>1},{"multirow-column":o.slidesPerColumn>1&&"column"===o.slidesPerColumnFill},{android:l.android},{ios:l.ios},{"css-mode":o.cssMode}],e=o.containerModifierClass,n=[],t.forEach((function(t){"object"==typeof t?Object.keys(t).forEach((function(r){t[r]&&n.push(e+r)})):"string"==typeof t&&n.push(e+t)})),n);i.push.apply(i,u),a.addClass([].concat(i).join(" ")),r.emitContainerClasses()},removeClasses:function(){var t=this,e=t.$el,n=t.classNames;e.removeClass(n.join(" ")),t.emitContainerClasses()}};const tt={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!1,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var nt={modular:j,eventsEmitter:F,update:N,translate:B,transition:{setTransition:function(t,e){var n=this;n.params.cssMode||n.$wrapperEl.transition(t),n.emit("setTransition",t,e)},transitionStart:function(t,e){void 0===t&&(t=!0);var n=this,r=n.activeIndex,i=n.params,o=n.previousIndex;if(!i.cssMode){i.autoHeight&&n.updateAutoHeight();var s=e;if(s||(s=r>o?"next":r<o?"prev":"reset"),n.emit("transitionStart"),t&&r!==o){if("reset"===s)return void n.emit("slideResetTransitionStart");n.emit("slideChangeTransitionStart"),"next"===s?n.emit("slideNextTransitionStart"):n.emit("slidePrevTransitionStart")}}},transitionEnd:function(t,e){void 0===t&&(t=!0);var n=this,r=n.activeIndex,i=n.previousIndex,o=n.params;if(n.animating=!1,!o.cssMode){n.setTransition(0);var s=e;if(s||(s=r>i?"next":r<i?"prev":"reset"),n.emit("transitionEnd"),t&&r!==i){if("reset"===s)return void n.emit("slideResetTransitionEnd");n.emit("slideChangeTransitionEnd"),"next"===s?n.emit("slideNextTransitionEnd"):n.emit("slidePrevTransitionEnd")}}}},slide:z,loop:G,grabCursor:{setGrabCursor:function(t){var e=this;if(!(e.support.touch||!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)){var n=e.el;n.style.cursor="move",n.style.cursor=t?"-webkit-grabbing":"-webkit-grab",n.style.cursor=t?"-moz-grabbin":"-moz-grab",n.style.cursor=t?"grabbing":"grab"}},unsetGrabCursor:function(){var t=this;t.support.touch||t.params.watchOverflow&&t.isLocked||t.params.cssMode||(t.el.style.cursor="")}},manipulation:X,events:$,breakpoints:J,checkOverflow:{checkOverflow:function(){var t=this,e=t.params,n=t.isLocked,r=t.slides.length>0&&e.slidesOffsetBefore+e.spaceBetween*(t.slides.length-1)+t.slides[0].offsetWidth*t.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&r?t.isLocked=r<=t.size:t.isLocked=1===t.snapGrid.length,t.allowSlideNext=!t.isLocked,t.allowSlidePrev=!t.isLocked,n!==t.isLocked&&t.emit(t.isLocked?"lock":"unlock"),n&&n!==t.isLocked&&(t.isEnd=!1,t.navigation&&t.navigation.update())}},classes:Q,images:{loadImage:function(t,e,n,r,i,o){var s,l=a();function c(){o&&o()}b(t).parent("picture")[0]||t.complete&&i?c():e?((s=new l.Image).onload=c,s.onerror=c,r&&(s.sizes=r),n&&(s.srcset=n),e&&(s.src=e)):c()},preloadImages:function(){var t=this;function e(){null!=t&&t&&!t.destroyed&&(void 0!==t.imagesLoaded&&(t.imagesLoaded+=1),t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("imagesReady")))}t.imagesToLoad=t.$el.find("img");for(var n=0;n<t.imagesToLoad.length;n+=1){var r=t.imagesToLoad[n];t.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,e)}}}},rt={},it=function(){function t(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];if(1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?n=i[0]:(e=i[0],n=i[1]),n||(n={}),n=C({},n),e&&!n.el&&(n.el=e),n.el&&b(n.el).length>1){var s=[];return b(n.el).each((function(e){var r=C({},n,{el:e});s.push(new t(r))})),s}var a=this;a.__swiper__=!0,a.support=M(),a.device=P({userAgent:n.userAgent}),a.browser=L(),a.eventsListeners={},a.eventsAnyListeners=[],void 0===a.modules&&(a.modules={}),Object.keys(a.modules).forEach((function(t){var e=a.modules[t];if(e.params){var r=Object.keys(e.params)[0],i=e.params[r];if("object"!=typeof i||null===i)return;if(["navigation","pagination","scrollbar"].indexOf(r)>=0&&!0===n[r]&&(n[r]={auto:!0}),!(r in n)||!("enabled"in i))return;!0===n[r]&&(n[r]={enabled:!0}),"object"!=typeof n[r]||"enabled"in n[r]||(n[r].enabled=!0),n[r]||(n[r]={enabled:!1})}}));var l,c,u=C({},tt);return a.useParams(u),a.params=C({},u,rt,n),a.originalParams=C({},a.params),a.passedParams=C({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach((function(t){a.on(t,a.params.on[t])})),a.params&&a.params.onAny&&a.onAny(a.params.onAny),a.$=b,C(a,{enabled:a.params.enabled,el:e,classNames:[],slides:b(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===a.params.direction},isVertical:function(){return"vertical"===a.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEvents:(l=["touchstart","touchmove","touchend","touchcancel"],c=["mousedown","mousemove","mouseup"],a.support.pointerEvents&&(c=["pointerdown","pointermove","pointerup"]),a.touchEventsTouch={start:l[0],move:l[1],end:l[2],cancel:l[3]},a.touchEventsDesktop={start:c[0],move:c[1],end:c[2]},a.support.touch||!a.params.simulateTouch?a.touchEventsTouch:a.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:x(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.useModules(),a.emit("_swiper"),a.params.init&&a.init(),a}var e,n,r,i=t.prototype;return i.enable=function(){var t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))},i.disable=function(){var t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))},i.setProgress=function(t,e){var n=this;t=Math.min(Math.max(t,0),1);var r=n.minTranslate(),i=(n.maxTranslate()-r)*t+r;n.translateTo(i,void 0===e?0:e),n.updateActiveIndex(),n.updateSlidesClasses()},i.emitContainerClasses=function(){var t=this;if(t.params._emitClasses&&t.el){var e=t.el.className.split(" ").filter((function(e){return 0===e.indexOf("swiper-container")||0===e.indexOf(t.params.containerModifierClass)}));t.emit("_containerClasses",e.join(" "))}},i.getSlideClasses=function(t){var e=this;return t.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)})).join(" ")},i.emitSlidesClasses=function(){var t=this;if(t.params._emitClasses&&t.el){var e=[];t.slides.each((function(n){var r=t.getSlideClasses(n);e.push({slideEl:n,classNames:r}),t.emit("_slideClass",n,r)})),t.emit("_slideClasses",e)}},i.slidesPerViewDynamic=function(){var t=this,e=t.params,n=t.slides,r=t.slidesGrid,i=t.size,o=t.activeIndex,s=1;if(e.centeredSlides){for(var a,l=n[o].swiperSlideSize,c=o+1;c<n.length;c+=1)n[c]&&!a&&(s+=1,(l+=n[c].swiperSlideSize)>i&&(a=!0));for(var u=o-1;u>=0;u-=1)n[u]&&!a&&(s+=1,(l+=n[u].swiperSlideSize)>i&&(a=!0))}else for(var h=o+1;h<n.length;h+=1)r[h]-r[o]<i&&(s+=1);return s},i.update=function(){var t=this;if(t&&!t.destroyed){var e=t.snapGrid,n=t.params;n.breakpoints&&t.setBreakpoint(),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.params.freeMode?(r(),t.params.autoHeight&&t.updateAutoHeight()):(("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0))||r(),n.watchOverflow&&e!==t.snapGrid&&t.checkOverflow(),t.emit("update")}function r(){var e=t.rtlTranslate?-1*t.translate:t.translate,n=Math.min(Math.max(e,t.maxTranslate()),t.minTranslate());t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}},i.changeDirection=function(t,e){void 0===e&&(e=!0);var n=this,r=n.params.direction;return t||(t="horizontal"===r?"vertical":"horizontal"),t===r||"horizontal"!==t&&"vertical"!==t||(n.$el.removeClass(""+n.params.containerModifierClass+r).addClass(""+n.params.containerModifierClass+t),n.emitContainerClasses(),n.params.direction=t,n.slides.each((function(e){"vertical"===t?e.style.width="":e.style.height=""})),n.emit("changeDirection"),e&&n.update()),n},i.mount=function(t){var e=this;if(e.mounted)return!0;var n=b(t||e.params.el);if(!(t=n[0]))return!1;t.swiper=e;var r=function(){return"."+(e.params.wrapperClass||"").trim().split(" ").join(".")},i=function(){if(t&&t.shadowRoot&&t.shadowRoot.querySelector){var e=b(t.shadowRoot.querySelector(r()));return e.children=function(t){return n.children(t)},e}return n.children(r())}();if(0===i.length&&e.params.createElements){var s=o().createElement("div");i=b(s),s.className=e.params.wrapperClass,n.append(s),n.children("."+e.params.slideClass).each((function(t){i.append(t)}))}return C(e,{$el:n,el:t,$wrapperEl:i,wrapperEl:i[0],mounted:!0,rtl:"rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===e.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===i.css("display")}),!0},i.init=function(t){var e=this;return e.initialized||!1===e.mount(t)||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.enabled&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit,!1,!0):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit,!1,!0),e.attachEvents(),e.initialized=!0,e.emit("init"),e.emit("afterInit")),e},i.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0);var n=this,r=n.params,i=n.$el,o=n.$wrapperEl,s=n.slides;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),e&&(n.removeClasses(),i.removeAttr("style"),o.removeAttr("style"),s&&s.length&&s.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((function(t){n.off(t)})),!1!==t&&(n.$el[0].swiper=null,function(t){var e=t;Object.keys(e).forEach((function(t){try{e[t]=null}catch(t){}try{delete e[t]}catch(t){}}))}(n)),n.destroyed=!0),null},t.extendDefaults=function(t){C(rt,t)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+x();t.prototype.modules[n]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},e=t,r=[{key:"extendedDefaults",get:function(){return rt}},{key:"defaults",get:function(){return tt}}],(n=null)&&et(e.prototype,n),r&&et(e,r),t}();Object.keys(nt).forEach((function(t){Object.keys(nt[t]).forEach((function(e){it.prototype[e]=nt[t][e]}))})),it.use([A,D]);const ot=it;ot.prototype.slideToMapID=function(t){if(this.$el[0].querySelector(".swiper-slide-active").getAttribute("data")!=t)for(var e=this.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++){var r=e[n];if(r.getAttribute("data")==t)return this.slideToLoop(parseInt(r.getAttribute("data-swiper-slide-index")))}},ot.prototype.slideToIndex=function(t){var e=this.$el[0].querySelector(".swiper-slide-active");parseInt(e.getAttribute("data-swiper-slide-index"))!=t&&this.slideToLoop(t)},ot.prototype.setSlideMapID=function(t){this.slideToMapID(t),this.setSlideMapIDAsSelected(t)},ot.prototype.setSlideIndex=function(t){this.slideToIndex(t),this.setSlideIndexAsSelected(t)},ot.prototype.setSlideIndexAsSelected=function(t){for(var e=this.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++){var r=e[n];r.getAttribute("data-swiper-slide-index")==t?r.classList.add("selected"):r.classList.remove("selected")}},ot.prototype.setSlideMapIDAsSelected=function(t){for(var e=this.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++){var r=e[n];r.getAttribute("data")==t?r.classList.add("selected"):r.classList.remove("selected")}};var st=n(208),at=n(7863),lt=n(6901);function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pt(t,e,n){return e&&ht(t.prototype,e),n&&ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ft(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dt(t,e){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dt(t,e)}function gt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}function vt(t,e){if(e&&("object"===ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ft(t)}function mt(t){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mt(t)}function yt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bt(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _t(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var St={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},Et=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ut(this,t),this.init(e,n)}return pt(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||St,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,xt(xt({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}},{key:"clone",value:function(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new t(this.logger,e)}}]),t}()),Ct=function(){function t(){ut(this,t),this.observers={}}return pt(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach((function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)})),this}},{key:"off",value:function(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter((function(t){return t!==e})):delete this.observers[t])}},{key:"emit",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.observers[t]){var i=[].concat(this.observers[t]);i.forEach((function(t){t.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(e){e.apply(e,[t].concat(n))}))}}}]),t}();function Tt(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n}function Ot(t){return null==t?"":""+t}function kt(t,e,n){t.forEach((function(t){e[t]&&(n[t]=e[t])}))}function Mt(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function i(){return!t||"string"==typeof t}for(var o="string"!=typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!t[s]&&n&&(t[s]=new n),t=Object.prototype.hasOwnProperty.call(t,s)?t[s]:{}}return i()?{}:{obj:t,k:r(o.shift())}}function Pt(t,e,n){var r=Mt(t,e,Object);r.obj[r.k]=n}function Lt(t,e){var n=Mt(t,e),r=n.obj,i=n.k;if(r)return r[i]}function At(t,e,n){var r=Lt(t,n);return void 0!==r?r:Lt(e,n)}function It(t,e,n){for(var r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):It(t[r],e[r],n):t[r]=e[r]);return t}function Rt(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function jt(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return Dt[t]})):t}var Ft="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Nt=[" ",",","?","!",";"];function Bt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function zt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Gt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mt(t);if(e){var i=mt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vt(this,n)}}function Xt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),i=t,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(e.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?Xt(l,c,n):void 0}i=i[r[o]]}return i}}var Ht=function(t){gt(n,t);var e=Gt(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return ut(this,n),r=e.call(this),Ft&&Ct.call(ft(r)),r.data=t||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return pt(n,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(s=t.split("."));var a=Lt(this.data,s);return a||!o||"string"!=typeof n?a:Xt(this.data&&this.data[t]&&this.data[t][e],n,i)}},{key:"addResource",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[t,e];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(r=e,e=(s=t.split("."))[1]),this.addNamespaces(e),Pt(this.data,s,r),i.silent||this.emit("added",t,e,n,r)}},{key:"addResources",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(t,e,i,n[i],{silent:!0});r.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(r=n,n=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var a=Lt(this.data,s)||{};r?It(a,n,i):a=zt(zt({},a),n),Pt(this.data,s,a),o.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?zt(zt({},{}),this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function(t){var e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((function(t){return e[t]&&Object.keys(e[t]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(Ct),Ut={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,i){var o=this;return t.forEach((function(t){o.processors[t]&&(e=o.processors[t].process(e,n,r,i))})),e}};function Zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function qt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Wt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mt(t);if(e){var i=mt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vt(this,n)}}var Yt={},Vt=function(t){gt(n,t);var e=Wt(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ut(this,n),r=e.call(this),Ft&&Ct.call(ft(r)),kt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,ft(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=Et.create("translator"),r}return pt(n,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;var n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS||[],o=n&&t.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||function(t,e,n){e=e||"",n=n||"";var r=Nt.filter((function(t){return e.indexOf(t)<0&&n.indexOf(t)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(t){return"?"===t?"\\?":t})).join("|"),")")),o=!i.test(t);if(!o){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}(t,n,r));if(o&&!s){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:i};var l=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(r)}return"string"==typeof i&&(i=[i]),{key:t,namespaces:i}}},{key:"translate",value:function(t,e,r){var i=this;if("object"!==ct(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var o=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,s=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,a=this.extractFromKey(t[t.length-1],e),l=a.key,c=a.namespaces,u=c[c.length-1],h=e.lng||this.language,p=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(p){var f=e.nsSeparator||this.options.nsSeparator;return o?(d.res="".concat(u).concat(f).concat(l),d):"".concat(u).concat(f).concat(l)}return o?(d.res=l,d):l}var d=this.resolve(t,e),g=d&&d.res,v=d&&d.usedKey||l,m=d&&d.exactUsedKey||l,y=Object.prototype.toString.apply(g),_=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(w&&g&&x&&_.indexOf(y)<0&&("string"!=typeof b||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,qt(qt({},e),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(d.res=S,d):S}if(s){var E="[object Array]"===y,C=E?[]:{},T=E?m:v;for(var O in g)if(Object.prototype.hasOwnProperty.call(g,O)){var k="".concat(T).concat(s).concat(O);C[O]=this.translate(k,qt(qt({},e),{joinArrays:!1,ns:c})),C[O]===k&&(C[O]=g[O])}g=C}}else if(w&&"string"==typeof b&&"[object Array]"===y)(g=g.join(b))&&(g=this.extendTranslation(g,t,e,r));else{var M=!1,P=!1,L=void 0!==e.count&&"string"!=typeof e.count,A=n.hasDefaultValue(e),I=L?this.pluralResolver.getSuffix(h,e.count,e):"",R=e["defaultValue".concat(I)]||e.defaultValue;!this.isValidLookup(g)&&A&&(M=!0,g=R),this.isValidLookup(g)||(P=!0,g=l);var D=e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,j=D&&P?void 0:g,F=A&&R!==g&&this.options.updateMissing;if(P||M||F){if(this.logger.log(F?"updateKey":"missingKey",h,u,l,F?R:g),s){var N=this.resolve(l,qt(qt({},e),{},{keySeparator:!1}));N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&z&&z[0])for(var G=0;G<z.length;G++)B.push(z[G]);else"all"===this.options.saveMissingTo?B=this.languageUtils.toResolveHierarchy(e.lng||this.language):B.push(e.lng||this.language);var X=function(t,n,r){var o=A&&r!==g?r:j;i.options.missingKeyHandler?i.options.missingKeyHandler(t,u,n,o,F,e):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(t,u,n,o,F,e),i.emit("missingKey",t,u,n,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?B.forEach((function(t){i.pluralResolver.getSuffixes(t,e).forEach((function(n){X([t],l+n,e["defaultValue".concat(n)]||R)}))})):X(B,l,R))}g=this.extendTranslation(g,t,e,d,r),P&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(u,":").concat(l)),(P||M)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,M?g:void 0):this.options.parseMissingKeyHandler(g))}return o?(d.res=g,d):g}},{key:"extendTranslation",value:function(t,e,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,qt(qt({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(qt(qt({},n),{interpolation:qt(qt({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=t.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=qt(qt({},this.options.interpolation.defaultVariables),c)),t=this.interpolator.interpolate(t,c,n.lng||this.language,n),a){var u=t.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):o.translate.apply(o,r.concat([e]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=t&&p&&p.length&&!1!==n.applyPostProcessor&&(t=Ut.handle(p,t,e,this.options&&this.options.postProcessPassResolved?qt({i18nResolved:r},n):n,this)),t}},{key:"resolve",value:function(t){var e,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!s.isValidLookup(e)){var l=s.extractFromKey(t,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var h=void 0!==a.count&&"string"!=typeof a.count,p=h&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(t){s.isValidLookup(e)||(o=t,!Yt["".concat(d[0],"-").concat(t)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(Yt["".concat(d[0],"-").concat(t)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!s.isValidLookup(e)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,t,a);else{var u;h&&(u=s.pluralResolver.getSuffix(n,a.count,a));var d="".concat(s.options.pluralSeparator,"zero");if(h&&(l.push(c+u),p&&l.push(c+d)),f){var g="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(g),h&&(l.push(g+u),p&&l.push(g+d))}}for(;o=l.pop();)s.isValidLookup(e)||(r=o,e=s.getResource(n,t,o,a))}})))}))}})),{res:e,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}}],[{key:"hasDefaultValue",value:function(t){var e="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,e.length)&&void 0!==t[n])return!0;return!1}}]),n}(Ct);function Kt(t){return t.charAt(0).toUpperCase()+t.slice(1)}var $t=function(){function t(e){ut(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Et.create("languageUtils")}return pt(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map((function(t){return t.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Kt(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Kt(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=Kt(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,n=this;return t?(t.forEach((function(t){if(!e){var r=n.formatLanguageCode(t);n.options.supportedLngs&&!n.isSupportedCode(r)||(e=r)}})),!e&&this.options.supportedLngs&&t.forEach((function(t){if(!e){var r=n.getLanguagePartFromCode(t);if(n.isSupportedCode(r))return e=r;e=n.options.supportedLngs.find((function(t){if(0===t.indexOf(r))return t}))}})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(n.isSupportedCode(t)?i.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),r.forEach((function(t){i.indexOf(t)<0&&o(n.formatLanguageCode(t))})),i}}]),t}(),Jt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Qt={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}},te=["v1","v2","v3"],ee={zero:0,one:1,two:2,few:3,many:4,other:5};function ne(){var t={};return Jt.forEach((function(e){e.lngs.forEach((function(n){t[n]={numbers:e.nr,plurals:Qt[e.fc]}}))})),t}var re=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ut(this,t),this.languageUtils=e,this.options=n,this.logger=Et.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=ne()}return pt(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map((function(t){return"".concat(e).concat(t)}))}},{key:"getSuffixes",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(t,e){return ee[t]-ee[e]})).map((function(t){return"".concat(e.options.prepend).concat(t)})):r.numbers.map((function(r){return e.getSuffix(t,r,n)})):[]}},{key:"getSuffix",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(e)):this.getSuffixRetroCompatible(r,e):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,e){var n=this,r=t.noAbs?t.plurals(e):t.plurals(Math.abs(e)),i=t.numbers[r];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!te.includes(this.options.compatibilityJSON)}}]),t}();function ie(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var se=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ut(this,t),this.logger=Et.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return pt(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:jt,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?Rt(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?Rt(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?Rt(e.nestingPrefix):e.nestingPrefixEscaped||Rt("$t("),this.nestingSuffix=e.nestingSuffix?Rt(e.nestingSuffix):e.nestingSuffixEscaped||Rt(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}var u=function(t){if(t.indexOf(a.formatSeparator)<0){var i=At(e,l,t);return a.alwaysFormat?a.format(i,void 0,n,oe(oe(oe({},r),e),{},{interpolationkey:t})):i}var o=t.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(At(e,l,s),c,n,oe(oe(oe({},r),e),{},{interpolationkey:s}))};this.resetRegExp();var h=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,f=[{regex:this.regexpUnescape,safeValue:function(t){return c(t)}},{regex:this.regexp,safeValue:function(t){return a.escapeValue?c(a.escape(t)):c(t)}}];return f.forEach((function(e){for(s=0;i=e.regex.exec(t);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof h){var l=h(t,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(p){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(t)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=Ot(o));var c=e.safeValue(o);if(t=t.replace(i[0],c),p?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=i[0].length):e.regex.lastIndex=0,++s>=a.maxReplaces)break}})),t}},{key:"nest",value:function(t,e){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=oe({},o);function a(t,e){var n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;var r=t.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);t=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),e&&(s=oe(oe({},e),s))}catch(e){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),e),"".concat(t).concat(n).concat(i)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(t){return t.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=e(a.call(this,n[1].trim(),s),s))&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Ot(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),r=""),c&&(r=l.reduce((function(t,e){return i.format(t,e,o.lng,oe(oe({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}]),t}();function ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ae(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ce(t){var e={};return function(n,r,i){var o=r+JSON.stringify(i),s=e[o];return s||(s=t(r,i),e[o]=s),s(n)}}var ue=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ut(this,t),this.logger=Et.create("formatter"),this.options=e,this.formats={number:ce((function(t,e){var n=new Intl.NumberFormat(t,e);return function(t){return n.format(t)}})),currency:ce((function(t,e){var n=new Intl.NumberFormat(t,le(le({},e),{},{style:"currency"}));return function(t){return n.format(t)}})),datetime:ce((function(t,e){var n=new Intl.DateTimeFormat(t,le({},e));return function(t){return n.format(t)}})),relativetime:ce((function(t,e){var n=new Intl.RelativeTimeFormat(t,le({},e));return function(t){return n.format(t,e.range||"day")}})),list:ce((function(t,e){var n=new Intl.ListFormat(t,le({},e));return function(t){return n.format(t)}}))},this.init(e)}return pt(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=e.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(t,e){this.formats[t.toLowerCase().trim()]=e}},{key:"addCached",value:function(t,e){this.formats[t.toLowerCase().trim()]=ce(e)}},{key:"format",value:function(t,e,n,r){var i=this,o=e.split(this.formatSeparator).reduce((function(t,e){var o=function(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===e&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===e&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(t){if(t){var e=bt(t.split(":")),r=e[0],i=e.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}return{formatName:e,formatOptions:n}}(e),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=t;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[s](t,u,le(le(le({},a),r),c))}catch(t){i.logger.warn(t)}return l}return i.logger.warn("there was no format function for ".concat(s)),t}),t);return o}}]),t}();function he(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?he(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mt(t);if(e){var i=mt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vt(this,n)}}var de=function(t){gt(n,t);var e=fe(n);function n(t,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ut(this,n),o=e.call(this),Ft&&Ct.call(ft(o)),o.backend=t,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=Et.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return pt(n,[{key:"queueLoad",value:function(t,e,n,r){var i=this,o={},s={},a={},l={};return t.forEach((function(t){var r=!0;e.forEach((function(e){var a="".concat(t,"|").concat(e);!n.reload&&i.store.hasResourceBundle(t,e)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[e]&&(l[e]=!0)))})),r||(a[t]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(t,e,n){var r=t.split("|"),i=r[0],o=r[1];e&&this.emit("failedLoading",i,o,e),n&&this.store.addResourceBundle(i,o,n),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(n){!function(t,e,n,r){var i=Mt(t,e,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}(n.loaded,[i],o),function(t,e){void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)}(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(t){s[t]||(s[t]={});var e=n.loaded[t];e.length&&e.forEach((function(e){void 0===s[t][e]&&(s[t][e]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return t.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](t,e,(function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,t,e,n,i+1,2*o,s)}),o):s(a,l)}))):s(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var o=this.queueLoad(t,e,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(t){n.loadOne(t)}))}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&e.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&e.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),e.loaded(t,r,s)}))}},{key:"saveMissing",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(e,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,pe(pe({},o),{},{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,n,r))}}]),n}(Ct);function ge(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===ct(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===ct(t[2])||"object"===ct(t[3])){var n=t[3]||t[2];Object.keys(n).forEach((function(t){e[t]=n[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ve(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?me(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _e(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mt(t);if(e){var i=mt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vt(this,n)}}function be(){}function we(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))}))}var xe=function(t){gt(n,t);var e=_e(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(ut(this,n),t=e.call(this),Ft&&Ct.call(ft(t)),t.options=ve(r),t.services={},t.logger=Et,t.modules={external:[]},we(ft(t)),i&&!t.isInitialized&&!r.isClone){if(!t.options.initImmediate)return t.init(r,i),vt(t,ft(t));setTimeout((function(){t.init(r,i)}),0)}return t}return pt(n,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));var r=ge();function i(t){return t?"function"==typeof t?new t:t:null}if(this.options=ye(ye(ye({},r),this.options),ve(e)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ye(ye({},r.interpolation),this.options.interpolation)),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){var o;this.modules.logger?Et.init(i(this.modules.logger),this.options):Et.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=ue);var s=new $t(this.options);this.store=new Ht(this.options.resources,this.options);var a=this.services;a.logger=Et,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new re(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new se(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new de(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new Vt(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.format=this.options.interpolation.format,n||(n=be),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var h=Tt(),p=function(){var e=function(e,r){t.isInitialized&&!t.initializedStoreOnce&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),h.resolve(r),n(e,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),h}},{key:"loadResources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be,r=n,i="string"==typeof t?t:this.language;if("function"==typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(t){o.indexOf(t)<0&&o.push(t)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(t){return s(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return s(t)})),this.services.backendConnector.load(o,this.options.ns,(function(t){t||e.resolvedLanguage||!e.language||e.setResolvedLanguage(e.language),r(t)}))}else r(null)}},{key:"reloadResources",value:function(t,e,n){var r=Tt();return t||(t=this.languages),e||(e=this.options.ns),n||(n=be),this.services.backendConnector.reload(t,e,(function(t){r.resolve(),n(t)})),r}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&Ut.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"setResolvedLanguage",value:function(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(var e=0;e<this.languages.length;e++){var n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(t,e){var n=this;this.isLanguageChangingTo=t;var r=Tt();this.emit("languageChanging",t);var i=function(t){n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.resolvedLanguage=void 0,n.setResolvedLanguage(t)},o=function(o){t||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(t){!function(t,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),e&&e(t,(function(){return n.t.apply(n,arguments)}))}(t,s)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e,n){var r=this,i=function t(e,i){var o;if("object"!==ct(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([e,i].concat(a))}else o=ye({},i);o.lng=o.lng||t.lng,o.lngs=o.lngs||t.lngs,o.ns=o.ns||t.ns,o.keyPrefix=o.keyPrefix||n||t.keyPrefix;var c=r.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(e):e;return r.t(u,o)};return"string"==typeof t?i.lng=t:i.lngs=t,i.ns=e,i.keyPrefix=n,i}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(t,n){var r=e.services.backendConnector.state["".concat(t,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,t)||i&&!s(o,t)))}},{key:"loadNamespaces",value:function(t,e){var n=this,r=Tt();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){n.options.ns.indexOf(t)<0&&n.options.ns.push(t)})),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=Tt();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],i=t.filter((function(t){return r.indexOf(t)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be,i=ye(ye(ye({},this.options),e),{isClone:!0}),o=new n(i);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));var s=["store","services","language"];return s.forEach((function(e){o[e]=t[e]})),o.services=ye({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Vt(o.services,o.options),o.translator.on("*",(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit.apply(o,[t].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Ct);yt(xe,"createInstance",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new xe(t,e)}));var Se=xe.createInstance();Se.createInstance=xe.createInstance;Se.createInstance,Se.init,Se.loadResources,Se.reloadResources,Se.use,Se.changeLanguage,Se.getFixedT,Se.t,Se.exists,Se.setDefaultNamespace,Se.hasLoadedNamespace,Se.loadNamespaces,Se.loadLanguages;const Ee=Se;var Ce=[],Te=Ce.forEach,Oe=Ce.slice;function ke(t){return Te.call(Oe.call(arguments,1),(function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])})),t}function Me(t,e){if(e&&"object"===ct(e)){var n="",r=encodeURIComponent;for(var i in e)n+="&"+r(i)+"="+r(e[i]);if(!n)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+n.slice(1)}return t}function Pe(t,e,n,r,i){r&&"object"===ct(r)&&(i||(r._t=new Date),r=Me("",r).slice(1)),e.queryStringParams&&(t=Me(t,e.queryStringParams));try{var o;(o=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0")).open(r?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var s=e.customHeaders;if(s="function"==typeof s?s():s)for(var a in s)o.setRequestHeader(a,s[a]);o.onreadystatechange=function(){o.readyState>3&&n&&n(o.responseText,o)},o.send(r)}catch(t){console&&console.log(t)}}function Le(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,parsePayload:function(t,e,n){return yt({},e,n||"")},crossDomain:!1,ajax:Pe}}var Ae=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ut(this,t),this.init(e,n),this.type="backend"}return pt(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=t,this.options=ke(e,this.options||{},Le())}},{key:"readMulti",value:function(t,e,n){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath(t,e));var i=this.services.interpolator.interpolate(r,{lng:t.join("+"),ns:e.join("+")});this.loadUrl(i,n)}},{key:"read",value:function(t,e,n){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath([t],[e]));var i=this.services.interpolator.interpolate(r,{lng:t,ns:e});this.loadUrl(i,n)}},{key:"loadUrl",value:function(t,e){var n=this;this.options.ajax(t,this.options,(function(r,i){if(i.status>=500&&i.status<600)return e("failed loading "+t,!0);if(i.status>=400&&i.status<500)return e("failed loading "+t,!1);var o,s;try{o=n.options.parse(r,t)}catch(e){s="failed parsing "+t+" to json"}if(s)return e(s,!1);e(null,o)}))}},{key:"create",value:function(t,e,n,r){var i=this;"string"==typeof t&&(t=[t]);var o=this.options.parsePayload(e,n,r);t.forEach((function(t){var n=i.services.interpolator.interpolate(i.options.addPath,{lng:t,ns:e});i.options.ajax(n,i.options,(function(t,e){}),o)}))}}]),t}();Ae.type="backend";const Ie=Ae;var Re=n(291);class De extends Re.ZP{constructor(t,e){super(t),this.detail=e}}const je=()=>{const t=window.navigator.userAgent.toLowerCase();try{let e;return-1!=t.indexOf("chrome")?(e=(navigator.languages[0]||navigator.browserLanguage||navigator.language||navigator.userLanguage).split(";"),e[0]):(e=(navigator.browserLanguage||navigator.language||navigator.userLanguage).split(";"),e[0])}catch(t){return""}},Fe=["ALL","OFF"],Ne={ALL:-99,DEBUG:-1,INFO:0,WARN:1,ERROR:2,OFF:99};class Be{constructor(t=Ne.INFO){this.level=t,this.make()}make(){const t=Object.keys(Ne).filter((t=>!Fe.includes(t)));for(const e of t){const t=Ne[e];this[e.toLowerCase()]=this.level<=t?console.log:()=>{}}}}var ze={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};var Ge={};Ge[ze.RADIANS]=6370997/(2*Math.PI),Ge[ze.DEGREES]=2*Math.PI*6370997/360,Ge[ze.FEET]=.3048,Ge[ze.METERS]=1,Ge[ze.USFEET]=1200/3937;const Xe=ze;var He=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Ge[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();const Ue=He;function Ze(t,e,n){return Math.min(Math.max(t,e),n)}var qe="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},We="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ye(t,e,n,r,i,o){var s=i-n,a=o-r;if(0!==s||0!==a){var l=((t-n)*s+(e-r)*a)/(s*s+a*a);l>1?(n=i,r=o):l>0&&(n+=s*l,r+=a*l)}return Ve(t,e,n,r)}function Ve(t,e,n,r){var i=n-t,o=r-e;return i*i+o*o}function Ke(t){return 180*t/Math.PI}function $e(t){return t*Math.PI/180}function Je(t,e){var n=t%e;return n*e<0?n+e:n}function Qe(t,e,n){return t+n*(e-t)}function tn(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function en(t,e){return Math.floor(tn(t,e))}function nn(t,e){return Math.ceil(tn(t,e))}var rn,on=(rn=function(t,e){return rn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},rn(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}rn(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),sn=6378137,an=Math.PI*sn,ln=[-an,-an,an,an],cn=[-180,-85,180,85],un=sn*Math.log(Math.tan(Math.PI/2)),hn=function(t){function e(e){return t.call(this,{code:e,units:Xe.METERS,extent:ln,global:!0,worldExtent:cn,getPointResolution:function(t,e){return t/qe(e[1]/sn)}})||this}return on(e,t),e}(Ue),pn=[new hn("EPSG:3857"),new hn("EPSG:102100"),new hn("EPSG:102113"),new hn("EPSG:900913"),new hn("http://www.opengis.net/def/crs/EPSG/0/3857"),new hn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function fn(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i){o[s]=an*t[s]/180;var a=sn*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>un?a=un:a<-un&&(a=-un),o[s+1]=a}return o}function dn(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i)o[s]=180*t[s]/an,o[s+1]=360*Math.atan(Math.exp(t[s+1]/sn))/Math.PI-90;return o}var gn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vn=[-180,-90,180,90],mn=6378137*Math.PI/180,yn=function(t){function e(e,n){return t.call(this,{code:e,units:Xe.DEGREES,extent:vn,axisOrientation:n,global:!0,metersPerUnit:mn,worldExtent:vn})||this}return gn(e,t),e}(Ue),_n=[new yn("CRS:84"),new yn("EPSG:4326","neu"),new yn("urn:ogc:def:crs:OGC:1.3:CRS84"),new yn("urn:ogc:def:crs:OGC:2:84"),new yn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new yn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new yn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],bn={};var wn={};function xn(t,e,n){var r=t.getCode(),i=e.getCode();r in wn||(wn[r]={}),wn[r][i]=n}const Sn=0,En=1,Cn=2,Tn=4,On=8,kn=16;var Mn=n(4187),Pn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Ln=function(t){function e(e){var n=this,r="Assertion failed. See https://openlayers.org/en/"+("latest"===Mn.q4?Mn.q4:"v"+Mn.q4.split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,r)||this).code=e,n.name="AssertionError",n.message=r,n}return Pn(e,t),e}(Error);function An(t,e){if(!t)throw new Ln(e)}function In(t){for(var e=Gn(),n=0,r=t.length;n<r;++n)Zn(e,t[n]);return e}function Rn(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Dn(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function jn(t,e,n){var r,i;return(r=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*r+(i=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*i}function Fn(t,e){return Bn(t,e[0],e[1])}function Nn(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Bn(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function zn(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],s=e[0],a=e[1],l=Sn;return s<n?l|=kn:s>i&&(l|=Tn),a<r?l|=On:a>o&&(l|=Cn),l===Sn&&(l=En),l}function Gn(){return[1/0,1/0,-1/0,-1/0]}function Xn(t,e,n,r,i){return i?(i[0]=t,i[1]=e,i[2]=n,i[3]=r,i):[t,e,n,r]}function Hn(t){return Xn(1/0,1/0,-1/0,-1/0,t)}function Un(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Zn(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function qn(t,e,n,r,i){for(;n<r;n+=i)Wn(t,e[n],e[n+1]);return t}function Wn(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function Yn(t,e){var n;return(n=e(Kn(t)))||(n=e($n(t)))||(n=e(or(t)))?n:(n=e(ir(t)))||!1}function Vn(t){var e=0;return lr(t)||(e=sr(t)*nr(t)),e}function Kn(t){return[t[0],t[1]]}function $n(t){return[t[2],t[1]]}function Jn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Qn(t,e){var n;return"bottom-left"===e?n=Kn(t):"bottom-right"===e?n=$n(t):"top-left"===e?n=ir(t):"top-right"===e?n=or(t):An(!1,13),n}function tr(t,e,n,r,i){var o=er(t,e,n,r),s=o[0],a=o[1],l=o[2],c=o[3],u=o[4],h=o[5],p=o[6],f=o[7];return Xn(Math.min(s,l,u,p),Math.min(a,c,h,f),Math.max(s,l,u,p),Math.max(a,c,h,f),i)}function er(t,e,n,r){var i=e*r[0]/2,o=e*r[1]/2,s=Math.cos(n),a=Math.sin(n),l=i*s,c=i*a,u=o*s,h=o*a,p=t[0],f=t[1];return[p-l+h,f-c-u,p-l-h,f-c+u,p+l-h,f+c+u,p+l+h,f+c-u,p-l+h,f-c-u]}function nr(t){return t[3]-t[1]}function rr(t,e,n){var r=n||[1/0,1/0,-1/0,-1/0];return ar(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):Hn(r),r}function ir(t){return[t[0],t[3]]}function or(t){return[t[2],t[3]]}function sr(t){return t[2]-t[0]}function ar(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function lr(t){return t[2]<t[0]||t[3]<t[1]}function cr(t,e,n,r){var i=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<r;++a)i.push(t[0]+o*a/r,t[1],t[2],t[1]+s*a/r,t[2]-o*a/r,t[3],t[0],t[3]-s*a/r);else i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(i,i,2);for(var l=[],c=[],u=(a=0,i.length);a<u;a+=2)l.push(i[a]),c.push(i[a+1]);return function(t,e,n){return Xn(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,c,n)}function ur(t,e){var n=e.getExtent(),r=Jn(t);if(e.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){var i=sr(n),o=Math.floor((r[0]-n[0])/i)*i;t[0]-=o,t[2]-=o}return t}function hr(t,e){for(var n=!0,r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function pr(t,e){var n=Math.cos(e),r=Math.sin(e),i=t[0]*n-t[1]*r,o=t[1]*n+t[0]*r;return t[0]=i,t[1]=o,t}function fr(t,e){if(e.canWrapX()){var n=sr(e.getExtent()),r=function(t,e,n){var r=e.getExtent(),i=0;if(e.canWrapX()&&(t[0]<r[0]||t[0]>r[2])){var o=n||sr(r);i=Math.floor((t[0]-r[0])/o)}return i}(t,e,n);r&&(t[0]-=r*n)}return t}var dr=6371008.8;function gr(t,e,n){var r=n||dr,i=$e(t[1]),o=$e(e[1]),s=(o-i)/2,a=$e(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function vr(t,e,n,r){var i=r||dr,o=$e(t[1]),s=$e(t[0]),a=e/i,l=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(n));return[Ke(s+Math.atan2(Math.sin(n)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(l))),Ke(l)]}var mr=!0;function yr(t){mr=!(void 0===t||t)}function _r(t,e,n){var r;if(void 0!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];r=e}else r=t.slice();return r}function br(t,e,n){if(void 0!==e&&t!==e){for(var r=0,i=t.length;r<i;++r)e[r]=t[r];t=e}return t}function wr(t){!function(t,e){bn[t]=e}(t.getCode(),t),xn(t,t,_r)}function xr(t){return"string"==typeof t?bn[e=t]||bn[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function Sr(t,e,n,r){var i,o=(t=xr(t)).getPointResolutionFunc();if(o){if(i=o(e,n),r&&r!==t.getUnits())(a=t.getMetersPerUnit())&&(i=i*a/Ge[r])}else{var s=t.getUnits();if(s==Xe.DEGREES&&!r||r==Xe.DEGREES)i=e;else{var a,l=Pr(t,xr("EPSG:4326"));if(l===br&&s!==Xe.DEGREES)i=e*t.getMetersPerUnit();else{var c=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];i=(gr((c=l(c,c,2)).slice(0,2),c.slice(2,4))+gr(c.slice(4,6),c.slice(6,8)))/2}void 0!==(a=r?Ge[r]:t.getMetersPerUnit())&&(i/=a)}}return i}function Er(t){!function(t){t.forEach(wr)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&xn(e,t,_r)}))}))}function Cr(t,e){return t?"string"==typeof t?xr(t):t:xr(e)}function Tr(t){return function(e,n,r){for(var i=e.length,o=void 0!==r?r:2,s=void 0!==n?n:new Array(i),a=0;a<i;a+=o)for(var l=t(e.slice(a,a+o)),c=l.length,u=0,h=o;u<h;++u)s[a+u]=u>=c?e[a+u]:l[u];return s}}function Or(t,e,n,r){var i=xr(t),o=xr(e);xn(i,o,Tr(n)),xn(o,i,Tr(r))}function kr(t,e){var n=Ar(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=Je(r+180,360)-180),n}function Mr(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Pr(t,e)===_r)&&n}function Pr(t,e){var n=function(t,e){var n;return t in wn&&e in wn[t]&&(n=wn[t][e]),n}(t.getCode(),e.getCode());return n||(n=br),n}function Lr(t,e){return Pr(xr(t),xr(e))}function Ar(t,e,n){return Lr(e,n)(t,void 0,t.length)}function Ir(t,e,n,r){return cr(t,Lr(e,n),void 0,r)}var Rr,Dr,jr,Fr=null;function Nr(){return Fr}function Br(t,e){return Fr?Ar(t,e,Fr):t}function zr(t,e){return Fr?Ar(t,Fr,e):(mr&&!hr(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(mr=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Gr(t,e){return Fr?Ir(t,e,Fr):t}function Xr(t,e){return Fr?Ir(t,Fr,e):t}function Hr(t,e){if(!Fr)return t;var n=xr(e).getUnits(),r=Fr.getUnits();return n&&r?t*Ge[n]/Ge[r]:t}Er(pn),Er(_n),Rr=pn,Dr=fn,jr=dn,_n.forEach((function(t){Rr.forEach((function(e){xn(t,e,Dr),xn(e,t,jr)}))}));const Ur=20037508.342789244,Zr=[[0,0],[0,1],[1,0],[0,-1],[-1,0]],qr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAB3RJTUUH3QgIBToaSbAjlwAAABd0RVh0U29mdHdhcmUAR0xEUE5HIHZlciAzLjRxhaThAAAACHRwTkdHTEQzAAAAAEqAKR8AAAAEZ0FNQQAAsY8L/GEFAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAFRJREFUeNrtwQEBAAAAgJD+r+4ICgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgBDwABHHIJwwAAAABJRU5ErkJggg==",Wr=256,Yr=`<canvas width="256" height="256" src="${qr}"></canvas>`;async function Vr(t){return"string"==typeof t?new Promise(((e,n)=>{const r=t.match(/\//)?t:`pois/${t}`,i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="json",i.onload=function(t){if(200==this.status||0==this.status)try{let t=this.response;"string"==typeof t&&(t=JSON.parse(t)),e(t)}catch(t){n(t)}else n("Fail to load poi json")},i.send()})):t}async function Kr(t,e){if(t=await Vr(t),Array.isArray(t))t=(t=await Promise.all(t.map((async t=>await Vr(t))))).length>0&&"FeatureCollection"===t[0].type?t.reduce(((t,n,r)=>{let i=n.id||n.properties&&n.properties.id;if(!i){if(0!==r)throw"POI layers include bad key setting";i="main"}return t[i]=$r(n,i,e),t}),{}):{main:$r(t,"main",e)};else if("FeatureCollection"===t.type){const n=t.id||t.properties&&t.properties.id||"main";t={[n]:$r(t,n,e)}}else Object.keys(t).map((n=>{t[n]=$r(t[n],n,e)}));return t.main||(t.main=$r([],"main",e)),Object.keys(t).map((n=>{Qr(t,n,e)})),t}function $r(t,e,n){if(Array.isArray(t))t={pois:t.map((t=>Jr(t)))};else if("FeatureCollection"===t.type){const e=Object.assign({},t.properties||{});t.name&&(e.name=t.name),e.pois=t.features.map((t=>Jr(t))),t=e}if(void 0===t.id)t.id=e;else if(t.id!==e)throw"POI layers include bad key setting";return t.namespaceID||(t.namespaceID=`${n.namespace?`${n.namespace}#`:""}${e}`),t.name||(t.name="main"===e?n.name:e),t.pois||(t.pois=[]),t}function Jr(t){if("Feature"===t.type){const e=Object.assign({},t.properties||{});e.lnglat=t.geometry.coordinates,e.id||(e.id=t.id),e.name||(e.name=t.name),t=e}return t.lnglat||(t.lnglat=[t.lng||t.longitude,t.lat||t.latitude]),delete t.lng,delete t.lat,delete t.longitude,delete t.latitude,t}function Qr(t,e,n){if(!t[e])return;const r=t[e],i=r.pois;r.__nextId||(r.__nextId=0),i.map((t=>{t.id||(t.id=`${e}_${r.__nextId}`,r.__nextId++),t.namespaceID||(t.namespaceID=`${n.namespace?`${n.namespace}#`:""}${t.id}`)}))}var ti=n(9346);function ei(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function ni(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ri(t[0])||!ri(t[1]))throw new Error("coordinates must contain numbers");return ei({type:"Point",coordinates:t},e,n)}function ri(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ii(t,e,n){if(null!==t)for(var r,i,o,s,a,l,c,u,h=0,p=0,f=t.type,d="FeatureCollection"===f,g="Feature"===f,v=d?t.features.length:1,m=0;m<v;m++){a=(u=!!(c=d?t.features[m].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var y=0;y<a;y++){var _=0,b=0;if(null!==(s=u?c.geometries[y]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,m,_,b))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,m,_,b))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,m,_,b))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,m,_,b))return!1;p++}b++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===ii(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}const oi=function(t,e){void 0===e&&(e={});var n=0,r=0,i=0;return ii(t,(function(t){n+=t[0],r+=t[1],i++}),!0),ni([n/i,r/i],e.properties)};function si(t){return class extends t{constructor(){super(...arguments),this.officialTitle="",this.title="",this.mapID="",this.label=""}getCacheEnable(){return!!this.weiwudi}async getTileCacheStatsAsync(){if(!this.weiwudi)return{};try{return await this.weiwudi.stats()}catch(t){return{}}}async getTileCacheSizeAsync(){return(await this.getTileCacheStatsAsync()).size||0}async fetchAllTileCacheAsync(t){if(this.weiwudi)try{const e=e=>{t(e.type,e.detail)},n=t=>{this.weiwudi.removeEventListener("proceed",e),this.weiwudi.removeEventListener("finish",n),this.weiwudi.removeEventListener("stop",n),this.weiwudi.removeEventListener("canceled",n),e(t)};this.weiwudi.addEventListener("proceed",e),this.weiwudi.addEventListener("finish",n),this.weiwudi.addEventListener("stop",n),this.weiwudi.addEventListener("canceled",n),await this.weiwudi.fetchAll()}catch(t){}}async cancelTileCacheAsync(){if(this.weiwudi)try{await this.weiwudi.cancel()}catch(t){}}async clearTileCacheAsync(){if(this.weiwudi)try{await this.weiwudi.clean()}catch(t){}}getMap(){return this._map}setViewpointRadian(t){let e,n;const r=t.mercZoom,i=t.zoom,o=t.direction,s=t.rotation,a=this._map,l=null==a?void 0:a.getView();void 0!==t.latitude&&void 0!==t.longitude&&(e=Ar([t.longitude,t.latitude],"EPSG:4326","EPSG:3857")),void 0!==t.x&&null!=t.y&&(n=[t.x,t.y]),this.viewpoint2MercsAsync().then((t=>this.mercs2MercViewpoint(t))).then((t=>{const a=this.mercViewpoint2Mercs([e||t[0],r||t[1]||17,null!==o?o:t[2]]);this.mercs2ViewpointAsync(a).then((t=>{null!=e?null==l||l.setCenter(t[0]):null!=n&&(null==l||l.setCenter(n)),null!=r?null==l||l.setZoom(t[1]):null!=i&&(null==l||l.setZoom(i)),null!=o?null==l||l.setRotation(t[2]):null!=s&&(null==l||l.setRotation(s))}))}))}setViewpoint(t){t.rotation&&(t.rotation=t.rotation*Math.PI/180),t.direction&&(t.direction=t.direction*Math.PI/180),this.setViewpointRadian(t)}goHome(){this.setViewpointRadian({longitude:this.homePosition[0],latitude:this.homePosition[1],mercZoom:this.mercZoom,rotation:0})}setGPSMarkerAsync(t,e=!1){const n=this.getMap(),r=null==n?void 0:n.getView();if(!t)return new Promise(((t,e)=>{null==n||n.setGPSPosition(null),t(!0)}));const i=this.mercsFromGPSValue(t.lnglat,t.acc);return this.mercs2SysCoordsAsync_multiLayer([i]).then((t=>{const i=!t[0],o=i?t[1]:t[0],s=i?null:t[1],a={xy:o[0][0]};if(!this.insideCheckSysCoord(o[0][0]))return null==n||n.handleGPS(!1,!0),!1;const l=o[0].slice(1);return a.rad=l.reduce(((t,e,n)=>{const r=t+Math.sqrt(Math.pow(e[0]-a.xy[0],2)+Math.pow(e[1]-a.xy[1],2));return 3===n?r/4:r}),0),e||null==r||r.setCenter(a.xy),null==n||n.setGPSPosition(a,i?"hide":null),s&&(null==n||n.setGPSPosition({xy:s[0][0]},"sub")),!0})).catch((t=>{throw t}))}setGPSMarker(t,e=!1){this.setGPSMarkerAsync(t,e).then((()=>{}))}mercsFromGPSValue(t,e){const n=Ar(t,"EPSG:4326","EPSG:3857"),r=t[1]*Math.PI/180,i=e/Math.cos(r);return Zr.map((t=>[t[0]*i+n[0],t[1]*i+n[1]]))}rotateMatrix(t,e){void 0===e&&(e=this._map.getView().getRotation());const n=[];for(let r=0;r<t.length;r++){const i=t[r],o=i[0]*Math.cos(e)-i[1]*Math.sin(e),s=i[0]*Math.sin(e)+i[1]*Math.cos(e);n.push([o,s])}return n}async resolvePois(t){this.pois=await Kr(t||[],{name:this.officialTitle||this.title,namespace:this.mapID})}getPoi(t){let e;return Object.keys(this.pois).map((n=>{this.pois[n].pois.map(((r,i)=>{r.id===t&&(e=this.pois[n].pois[i])}))})),e}addPoi(t,e){if(e||(e="main"),this.pois[e])return t=Jr(t),this.pois[e].pois.push(t),Qr(this.pois,e,{name:this.officialTitle||this.title,namespace:this.mapID}),t.namespaceID}removePoi(t){Object.keys(this.pois).map((e=>{this.pois[e].pois.map(((n,r)=>{n.id===t&&delete this.pois[e].pois[r]}))}))}clearPoi(t){t||(t="main"),"all"===t?Object.keys(this.pois).map((t=>{this.pois[t].pois=[]})):this.pois[t]&&(this.pois[t].pois=[])}listPoiLayers(t=!1,e=!1){return Object.keys(this.pois).sort(((t,e)=>"main"===t?-1:"main"===e?1:t<e?-1:t>e?1:0)).map((t=>this.pois[t])).filter((n=>e?t?n.pois.length&&n.hide:n.pois.length:!t||n.hide))}getPoiLayer(t){return this.pois[t]}addPoiLayer(t,e){"main"!==t&&(this.pois[t]||(this.pois[t]=$r(e||[],t,{name:this.officialTitle||this.title,namespace:this.mapID})))}removePoiLayer(t){"main"!==t&&this.pois[t]&&delete this.pois[t]}merc2SysCoordAsync_ignoreBackground(t){return this.merc2XyAsync_ignoreBackground(t).then((t=>t?this.xy2SysCoord(t):void 0))}merc2SysCoordAsync(t){return this.merc2XyAsync(t).then((t=>t?this.xy2SysCoord(t):t))}sysCoord2MercAsync(t){const e=this.sysCoord2Xy(t);return this.xy2MercAsync(e)}zoom2Radius(t,e){var n;const r=Math.floor(Math.min(t[0],t[1])/4);return void 0===e&&(e=null===(n=this._map)||void 0===n?void 0:n.getView().getDecimalZoom()),r*Ur/128/Math.pow(2,e)}viewpoint2SysCoords(t,e){return this.mercViewpoint2Mercs(t,e)}mercViewpoint2Mercs(t,e){let n=t?t[0]:void 0;const r=t?t[1]:void 0,i=t?t[2]:void 0;void 0===n&&(n=this._map.getView().getCenter()),void 0===e&&(e=this._map.getSize());const o=this.zoom2Radius(e,r);return[this.rotateMatrix(Zr,i).map((t=>[t[0]*o+n[0],t[1]*o+n[1]])),e]}sysCoords2Viewpoint(t){return this.mercs2MercViewpoint(t)}mercs2MercViewpoint(t){const e=t[0][0];let n=t[1];const r=t[0].slice(1,5).map((t=>[t[0]-e[0],t[1]-e[1]])),i=[[0,1],[1,0],[0,-1],[-1,0]];let o=0,s=0,a=0;for(let t=0;t<4;t++){const e=r[t],n=i[t],l=Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2));o+=l;const c=e[0]*n[1]-e[1]*n[0],u=Math.acos((e[0]*n[0]+e[1]*n[1])/l),h=c>0?-1*u:u;s+=Math.cos(h),a+=Math.sin(h)}const l=o/4,c=Math.atan2(a,s);n||(n=this._map.getSize());const u=Math.floor(Math.min(n[0],n[1])/4),h=Math.log(u*Ur/128/l)/Math.log(2);return[e,h,c]}sysCoords2Xys(t){return[t[0].map((t=>this.sysCoord2Xy(t))),t[1]]}xys2SysCoords(t){return[t[0].map((t=>this.xy2SysCoord(t))),t[1]]}mercs2XysAsync(t){return Promise.all(t[0].map((t=>this.merc2XyAsync(t)))).then((e=>[e,t[1]]))}xys2MercsAsync(t){return Promise.all(t[0].map((t=>this.xy2MercAsync(t)))).then((e=>[e,t[1]]))}}}const ai=["title","officialTitle","author","createdAt","era","contributor","mapper","license","dataLicense","attr","dataAttr","reference","description"],li=["title","official_title","author","created_at","era","contributor","mapper","license","data_license","attr","data_attr","reference","description"];function ci(t,e){var n;if(e=di(e),t.mapID=e.mapID,t.homePosition=e.homePosition,t.mercZoom=e.mercZoom,t.label=e.label,t.maxZoom=e.maxZoom,t.minZoom=e.minZoom,t.poiTemplate=e.poiTemplate,t.poiStyle=e.poiStyle,t.iconTemplate=e.iconTemplate,t.icon=e.icon,t.selectedIcon=e.selectedIcon,t.mercatorXShift=e.mercatorXShift,t.mercatorYShift=e.mercatorYShift,t.weiwudi=e.weiwudi,e.envelopeLngLats){const r=e.envelopeLngLats.map((t=>Ar(t,"EPSG:4326","EPSG:3857")));r.push(r[0]),t.envelope=(0,ti.yu)([r]),t.centroid=null===(n=oi(t.envelope).geometry)||void 0===n?void 0:n.coordinates}for(let n=0;n<ai.length;n++){const r=ai[n],i=li[n];t[r]=e[i]||e[r]}const r=e.thumbnail?new Promise((n=>{t.thumbnail=e.thumbnail,n(void 0)})):new Promise((n=>{t.thumbnail=`./tmbs/${e.mapID}.jpg`,fetch(t.thumbnail).then((r=>{r.ok||(t.thumbnail=`./tmbs/${e.mapID}_menu.jpg`),n(void 0)})).catch((r=>{t.thumbnail=`./tmbs/${e.mapID}_menu.jpg`,n(void 0)}))})).catch((n=>{t.thumbnail=`./tmbs/${e.mapID||e.sourceID}_menu.jpg`})),i=t.resolvePois(e.pois);t.initialWait=Promise.all([i,r])}function ui(t){const e=t;t.setTileLoadFunction(function(){const t=e.getTileLoadFunction();return function(n,r){const i=n.tileCoord[0];let o=n.tileCoord[1],s=n.tileCoord[2],a=Math.round(128*(e.mercatorXShift||0)*Math.pow(2,i)/Ur),l=Math.round(-128*(e.mercatorYShift||0)*Math.pow(2,i)/Ur);for(;a<0||a>=256;)a<0?(a+=256,o++):(a-=256,o--);for(;l<0||l>=256;)l<0?(l+=256,s++):(l-=256,s--);const c=document.createElement("div");c.innerHTML=Yr;const u=c.childNodes[0],h=[[[i,o,s],0,0,256-a,256-l]];0!==a&&h.push([[i,o-1,s],256-a,0,a,256-l]),0!==l&&(h.push([[i,o,s-1],0,256-l,256-a,l]),0!==a&&h.push([[i,o-1,s-1],256-a,256-l,a,l])),Promise.all(h.map((t=>{const n=e.tileUrlFunction(t[0],e.tilePixelRatio_,e.projection_);return function(t,e,n,r,i,o,s){return new Promise(((t,a)=>{const l=function(e,a){0;const c=document.createElement("img");c.crossOrigin="Anonymous",c.onload=c.onerror=function(){if(c.width&&c.height){const e=n.getContext("2d"),a=0===r?256-o:0,l=0===i?256-s:0;o=r+o>c.width?c.width-r:o,s=i+s>c.height?c.height-i:s,e.drawImage(c,r,i,o,s,a,l,o,s),t(void 0)}else a?l(a):t("tileLoadError");0},c.src=e};l(e)}))}(t[0],n,u,t[1],t[2],t[3],t[4])}))).then((e=>{const r=e.reduce(((t,e)=>t&&e),!0);if(r)n.handleImageError_();else{const e=u.toDataURL();n.getImage().crossOrigin=null,t(n,e)}})).catch((t=>{n.handleImageError_()}))}}())}function hi(t){const e=document,n=e.createDocumentFragment(),r=[];t=t.replace(/(<\/?)d([ >])/g,"$1div$2").replace(/(<\/?)s([ >])/g,"$1span$2").replace(/ din="/g,' data-i18n="').replace(/ dinh="/g,' data-i18n-html="').replace(/ c="/g,' class="');const i=n.appendChild(e.createElement("div"));i.innerHTML=t;for(let t=0;t<i.childNodes.length;t++){const n=i.childNodes[t];if(n.nodeName&&"script"===n.nodeName.toLowerCase()){const i=e.createElement("script");n.type&&(i.type=n.type),n.src?i.src=n.src:i.text=n.text,r[t]=i}else r[t]=n}return r}function pi(t){for(;!(t<=180&&t>-180);){t+=360*(t>0?-1:1)}return t}function fi(t){if(!t)return;const e={mapID:t.mapID};for(let n=0;n<ai.length;n++){const r=ai[n];t[r]&&(e[r]=t[r])}return e}function di(t){const e={max_zoom:"maxZoom",min_zoom:"minZoom",envelope_lnglats:"envelopeLngLats",envelopLngLats:"envelopeLngLats",image_extention:"imageExtension",image_extension:"imageExtension",imageExtention:"imageExtension",map_id:"mapID",sourceID:"mapID",source_id:"mapID",merc_max_zoom:"mercMaxZoom",merc_min_zoom:"mercMinZoom",zoom_restriction:"zoomRestriction",enable_cache:"enableCache",default_zoom:"defaultZoom",start_from:"startFrom",home_position:"homePosition",fake_radius:"fakeRadius",fake_center:"fakeCenter",fake_gps:"fakeGps",app_name:"appName",setting_file:"settingFile",merc_zoom:"mercZoom",mapbox_token:"mapboxToken",translate_ui:"translateUI",restore_session:"restoreSession",no_rotate:"noRotate",poi_template:"poiTemplate",poi_style:"poiStyle",icon_template:"iconTemplate",default_center:"defaultCenter",default_rotation:"defaultRotation",selected_icon:"selectedIcon",namespace_id:"namespaceID",mercator_x_shift:"mercatorXShift",mercator_y_shift:"mercatorYShift"};return Object.keys(e).reduce(((t,n)=>(t[n]&&(t[e[n]]=t[n],delete t[n]),t)),t)}var gi,vi=n(5431),mi=n(6885),yi=n(177);new Array(6);function _i(t,e,n,r,i,o,s){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t}function bi(t,e){var n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function wi(t,e,n,r,i,o,s,a){var l=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=i*l,t[2]=-r*l,t[3]=i*c,t[4]=s*r*c-a*r*l+e,t[5]=s*i*l+a*i*c+n,t}function xi(t,e){var n,r=(n=e)[0]*n[3]-n[1]*n[2];An(0!==r,32);var i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],c=e[5];return t[0]=a/r,t[1]=-o/r,t[2]=-s/r,t[3]=i/r,t[4]=(s*c-a*l)/r,t[5]=-(i*c-o*l)/r,t}function Si(t){var e="matrix("+t.join(", ")+")";if(yi.Id)return e;var n=gi||(gi=document.createElement("div"));return n.style.transform=e,n.style.transform}var Ei=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Ci=/^([a-z]*)$|^hsla?\(.*\)$/i;function Ti(t){return"string"==typeof t?t:Li(t)}function Oi(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}var ki=function(){var t={},e=0;return function(n){var r;if(t.hasOwnProperty(n))r=t[n];else{if(e>=1024){var i=0;for(var o in t)0==(3&i++)&&(delete t[o],--e)}r=function(t){var e,n,r,i,o;Ci.exec(t)&&(t=Oi(t));if(Ei.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),n=parseInt(t.substr(1+1*a,a),16),r=parseInt(t.substr(1+2*a,a),16),i=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,n=(n<<4)+n,r=(r<<4)+r,l&&(i=(i<<4)+i)),o=[e,n,r,i/255]}else 0==t.indexOf("rgba(")?Pi(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Pi(o)):An(!1,14);return o}(n),t[n]=r,++e}return r}}();function Mi(t){return Array.isArray(t)?t:ki(t)}function Pi(t){return t[0]=Ze(t[0]+.5|0,0,255),t[1]=Ze(t[1]+.5|0,0,255),t[2]=Ze(t[2]+.5|0,0,255),t[3]=Ze(t[3],0,1),t}function Li(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+e+","+n+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}var Ai=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var r=Ii(t,e,n);return r in this.cache_?this.cache_[r]:null},t.prototype.set=function(t,e,n,r){var i=Ii(t,e,n);this.cache_[i]=r,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Ii(t,e,n){return e+":"+t+":"+(n?Ti(n):"null")}var Ri=new Ai,Di=n(2971);const ji="opacity",Fi="visible",Ni="extent",Bi="zIndex",zi="maxResolution",Gi="minResolution",Xi="maxZoom",Hi="minZoom",Ui="source",Zi="map";var qi=n(9374),Wi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Yi=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var r=(0,qi.f0)({},e);return"object"==typeof e.properties&&(delete r.properties,(0,qi.f0)(r,e.properties)),r[ji]=void 0!==e.opacity?e.opacity:1,An("number"==typeof r[ji],64),r[Fi]=void 0===e.visible||e.visible,r[Bi]=e.zIndex,r[zi]=void 0!==e.maxResolution?e.maxResolution:1/0,r[Gi]=void 0!==e.minResolution?e.minResolution:0,r[Hi]=void 0!==e.minZoom?e.minZoom:-1/0,r[Xi]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==r.className?r.className:"ol-layer",delete r.className,n.setProperties(r),n.state_=null,n}return Wi(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=Ze(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return(0,Mn.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,Mn.O3)()},e.prototype.getExtent=function(){return this.get(Ni)},e.prototype.getMaxResolution=function(){return this.get(zi)},e.prototype.getMinResolution=function(){return this.get(Gi)},e.prototype.getMinZoom=function(){return this.get(Hi)},e.prototype.getMaxZoom=function(){return this.get(Xi)},e.prototype.getOpacity=function(){return this.get(ji)},e.prototype.getSourceState=function(){return(0,Mn.O3)()},e.prototype.getVisible=function(){return this.get(Fi)},e.prototype.getZIndex=function(){return this.get(Bi)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Ni,t)},e.prototype.setMaxResolution=function(t){this.set(zi,t)},e.prototype.setMinResolution=function(t){this.set(Gi,t)},e.prototype.setMaxZoom=function(t){this.set(Xi,t)},e.prototype.setMinZoom=function(t){this.set(Hi,t)},e.prototype.setOpacity=function(t){An("number"==typeof t,64),this.set(ji,t)},e.prototype.setVisible=function(t){this.set(Fi,t)},e.prototype.setZIndex=function(t){this.set(Bi,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(Di.Z);var Vi=n(5487);const Ki="prerender",$i="postrender",Ji="precompose",Qi="postcompose",to="rendercomplete";var eo=n(5818),no=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(t){function e(e){var n=this,r=(0,qi.f0)({},e);delete r.source,(n=t.call(this,r)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(Ui,n.handleSourcePropertyChange_);var i=e.source?e.source:null;return n.setSource(i),n}return no(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(Ui)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,eo.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,eo.oL)(t,Vi.Z.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(Zi,t)},e.prototype.getMapInternal=function(){return this.get(Zi)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,eo.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,eo.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,eo.oL)(t,Ji,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);An(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=(0,eo.oL)(this,Vi.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Ui,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(Yi);function io(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var r=e.zoom;return r>t.minZoom&&r<=t.maxZoom}const oo=ro;var so=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ao=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return so(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,Mn.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;wi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),xi(r,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i,o,s,a){var l,c=e.viewState;function u(t,e,n,r){return i.call(o,e,t?n:null,r)}var h=c.projection,p=fr(t.slice(),h),f=[[0,0]];if(h.canWrapX()&&r){var d=sr(h.getExtent());f.push([-d,0],[d,0])}for(var g=e.layerStatesArray,v=g.length,m=[],y=[],_=0;_<f.length;_++)for(var b=v-1;b>=0;--b){var w=g[b],x=w.layer;if(x.hasRenderer()&&io(w,c)&&s.call(a,x)){var S=x.getRenderer(),E=x.getSource();if(S&&E){var C=E.getWrapX()?p:t,T=u.bind(null,w.managed);y[0]=C[0]+f[_][0],y[1]=C[1]+f[_][1],l=S.forEachFeatureAtCoordinate(y,e,n,T,m)}if(l)return l}}if(0!==m.length){var O=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*O})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,r,i){return(0,Mn.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,r,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,r,mi.uX,this,i,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,Mn.O3)()},e.prototype.scheduleExpireIconCache=function(t){Ri.canExpireCache()&&t.postRenderFunctions.push(lo)},e}(vi.Z);function lo(t,e){Ri.expire()}const co=ao;var uo=n(5990),ho=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const po=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=r,o.context=i,o}return ho(e,t),e}(Re.ZP);var fo="ol-hidden",go="ol-unselectable",vo="ol-control",mo="ol-collapsed",yo=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),_o=["style","variant","weight","size","lineHeight","family"],bo=function(t){var e=t.match(yo);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=_o.length;r<i;++r){var o=e[r+1];void 0!==o&&(n[_o[r]]=o)}return n.families=n.family.split(/,\s?/),n},wo=n(8326),xo="10px sans-serif",So="#000",Eo="round",Co=[],To="round",Oo="#000",ko="center",Mo="middle",Po=[0,0,0,0],Lo=new Di.Z;(new st.Z).setSize=function(){console.warn("labelCache is deprecated.")};var Ao,Io,Ro=null,Do={},jo=function(){var t,e,n="32px ",r=["monospace","serif"],i=r.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,c=0;c<i;++c){var u=r[c];if(e=Bo(t+" "+s+" "+n+u,o),a!=u){var h=Bo(t+" "+s+" "+n+a+","+u,o);l=l&&h!=e}}return!!l}function a(){for(var e=!0,n=Lo.getKeys(),r=0,i=n.length;r<i;++r){var o=n[r];Lo.get(o)<100&&(s.apply(this,o.split("\n"))?((0,qi.ZH)(Do),Ro=null,Ao=void 0,Lo.set(o,100)):(Lo.set(o,Lo.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=bo(e);if(n)for(var r=n.families,i=0,o=r.length;i<o;++i){var l=r[i],c=n.style+"\n"+n.weight+"\n"+l;void 0===Lo.get(c)&&(Lo.set(c,100,!0),s(n.style,n.weight,l)||(Lo.set(c,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),Fo=function(t){var e=Do[t];if(null==e){if(yi.Id){var n=bo(t),r=No(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else Io||((Io=document.createElement("div")).innerHTML="M",Io.style.minHeight="0",Io.style.maxHeight="none",Io.style.height="auto",Io.style.padding="0",Io.style.border="none",Io.style.position="absolute",Io.style.display="block",Io.style.left="-99999px"),Io.style.font=t,document.body.appendChild(Io),e=Io.offsetHeight,document.body.removeChild(Io);Do[t]=e}return e};function No(t,e){return Ro||(Ro=(0,wo.E4)(1,1)),t!=Ao&&(Ro.font=t,Ao=Ro.font),Ro.measureText(e)}function Bo(t,e){return No(t,e).width}function zo(t,e,n){if(e in n)return n[e];var r=e.split("\n").reduce((function(e,n){return Math.max(e,Bo(t,n))}),0);return n[e]=r,r}function Go(t,e,n,r,i,o,s,a,l,c,u){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),r.contextInstructions?(t.translate(l,c),t.scale(u[0],u[1]),function(t,e){for(var n=t.contextInstructions,r=0,i=n.length;r<i;r+=2)Array.isArray(n[r+1])?e[n[r]].apply(e,n[r+1]):e[n[r]]=n[r+1]}(r,t)):u[0]<0||u[1]<0?(t.translate(l,c),t.scale(u[0],u[1]),t.drawImage(r,i,o,s,a,0,0,s,a)):t.drawImage(r,i,o,s,a,l,c,s*u[0],a*u[1]),t.restore()}var Xo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ho=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=(0,eo.oL)(Lo,uo.Z.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var r=n.element_.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",n.element_.className="ol-unselectable ol-layers";var i=e.getViewport();return i.insertBefore(n.element_,i.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return Xo(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var r=new po(t,void 0,e);n.dispatchEvent(r)}},e.prototype.disposeInternal=function(){(0,eo.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(Ji,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var r=[],i=null,o=0,s=e.length;o<s;++o){var a=e[o];t.layerIndex=o;var l=a.layer,c=l.getSourceState();if(!io(a,n)||"ready"!=c&&"undefined"!=c)l.unrender();else{var u=l.render(t,i);u&&(u!==i&&(this.children_.push(u),i=u),"getDeclutter"in l&&r.push(l))}}for(o=r.length-1;o>=0;--o)r[o].renderDeclutter(t);(0,wo.hF)(this.element_,this.children_),this.dispatchRenderEvent(Qi,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.prototype.forEachLayerAtPixel=function(t,e,n,r,i){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],c=l.layer;if(c.hasRenderer()&&io(l,o)&&i(c)){var u=c.getRenderer().getDataAtPixel(t,e,n);if(u){var h=r(c,u);if(h)return h}}}},e}(co);const Uo=Ho,Zo="add",qo="remove";var Wo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yo="length",Vo=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.element=n,i.index=r,i}return Wo(e,t),e}(Re.ZP),Ko=function(t){function e(e,n){var r=t.call(this)||this;r.on,r.once,r.un;var i=n||{};if(r.unique_=!!i.unique,r.array_=e||[],r.unique_)for(var o=0,s=r.array_.length;o<s;++o)r.assertUnique_(r.array_[o],o);return r.updateLength_(),r}return Wo(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,r=e.length;n<r;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(Yo)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Vo(Zo,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_,n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Vo(qo,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Vo(qo,r,t)),this.dispatchEvent(new Vo(Zo,e,t))}else{for(var i=n;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(Yo,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new Ln(58)},e}(Di.Z);const $o=Ko;var Jo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qo=function(t){function e(e,n){var r=t.call(this,e)||this;return r.layer=n,r}return Jo(e,t),e}(Re.ZP),ts="layers",es=function(t){function e(e){var n=this,r=e||{},i=(0,qi.f0)({},r);delete i.layers;var o=r.layers;return(n=t.call(this,i)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(ts,n.handleLayersChanged_),o?Array.isArray(o)?o=new $o(o.slice(),{unique:!0}):An("function"==typeof o.getArray,43):o=new $o(void 0,{unique:!0}),n.setLayers(o),n}return Jo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(eo.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,eo.oL)(t,Zo,this.handleLayersAdd_,this),(0,eo.oL)(t,qo,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(eo.bN);(0,qi.ZH)(this.listenerKeys_);for(var n=t.getArray(),r=0,i=n.length;r<i;r++){var o=n[r];this.registerLayerListeners_(o),this.dispatchEvent(new Qo("addlayer",o))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[(0,eo.oL)(t,uo.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,eo.oL)(t,Vi.Z.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push((0,eo.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,eo.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,Mn.sq)(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new Qo("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new Qo("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Qo("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=(0,Mn.sq)(e);this.listenerKeys_[n].forEach(eo.bN),delete this.listenerKeys_[n],this.dispatchEvent(new Qo("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(ts)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var n=e.getArray(),r=0,i=n.length;r<i;++r)this.dispatchEvent(new Qo("removelayer",n[r]));this.set(ts,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var r=this.getLayerState(),i=r.zIndex;t||void 0!==r.zIndex||(i=0);for(var o=n,s=e.length;o<s;o++){var a=e[o];a.opacity*=r.opacity,a.visible=a.visible&&r.visible,a.maxResolution=Math.min(a.maxResolution,r.maxResolution),a.minResolution=Math.max(a.minResolution,r.minResolution),a.minZoom=Math.max(a.minZoom,r.minZoom),a.maxZoom=Math.min(a.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==a.extent?a.extent=rr(a.extent,r.extent):a.extent=r.extent),void 0===a.zIndex&&(a.zIndex=i)}return e},e.prototype.getSourceState=function(){return"ready"},e}(Yi);const ns=es;var rs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const is=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.map=n,i.frameState=void 0!==r?r:null,i}return rs(e,t),e}(Re.ZP);var os=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ss=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,o)||this;return a.originalEvent=r,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==i&&i,a.activePointers=s,a}return os(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),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()},e}(is),as={SINGLECLICK:"singleclick",CLICK:Vi.Z.CLICK,DBLCLICK:Vi.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ls="pointermove",cs="pointerdown";var us=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hs=function(t){function e(e,n){var r=t.call(this,e)||this;r.map_=e,r.clickTimeoutId_,r.emulateClicks_=!1,r.dragging_=!1,r.dragListenerKeys_=[],r.moveTolerance_=void 0===n?1:n,r.down_=null;var i=r.map_.getViewport();return r.activePointers_=[],r.trackedTouches_={},r.element_=i,r.pointerdownListenerKey_=(0,eo.oL)(i,cs,r.handlePointerDown_,r),r.originalPointerMoveEvent_,r.relayedListenerKey_=(0,eo.oL)(i,ls,r.relayMoveEvent_,r),r.boundHandleTouchMove_=r.handleTouchMove_.bind(r),r.element_.addEventListener(Vi.Z.TOUCHMOVE,r.boundHandleTouchMove_,!!yi.bM&&{passive:!1}),r}return us(e,t),e.prototype.emulateClick_=function(t){var e=new ss(as.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new ss(as.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new ss(as.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t,n=e.pointerId;if(e.type==as.POINTERUP||e.type==as.POINTERCANCEL){for(var r in delete this.trackedTouches_[n],this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else e.type!=as.POINTERDOWN&&e.type!=as.POINTERMOVE||(this.trackedTouches_[n]=e);this.activePointers_=(0,qi.KX)(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new ss(as.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(eo.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 ss(as.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);for(var n in this.dispatchEvent(e),this.down_={},t){var r=t[n];this.down_[n]="function"==typeof r?mi.Zn:r}if(0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,eo.oL)(i,as.POINTERMOVE,this.handlePointerMove_,this),(0,eo.oL)(i,as.POINTERUP,this.handlePointerUp_,this),(0,eo.oL)(this.element_,as.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push((0,eo.oL)(this.element_.getRootNode(),as.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var e=new ss(as.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 ss(as.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,eo.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Vi.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,eo.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(eo.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(st.Z);const ps=hs;var fs=n(2126);const ds="layergroup",gs="size",vs="target",ms="view";var ys=1/0,_s=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,qi.ZH)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var r=this.keyFunction_(n);return delete this.queuedElements_[r],n},t.prototype.enqueue=function(t){An(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=ys&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,r=e.length,i=e[t],o=n[t],s=t;t<r>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=l<r&&n[l]<n[a]?l:a;e[t]=e[c],n[t]=n[c],t=c}e[t]=i,n[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,r=this.priorities_,i=n[e],o=r[e];e>t;){var s=this.getParentIndex_(e);if(!(r[s]>o))break;n[e]=n[s],r[e]=r[s],e=s}n[e]=i,r[e]=o},t.prototype.reprioritize=function(){var t,e,n,r=this.priorityFunction_,i=this.elements_,o=this.priorities_,s=0,a=i.length;for(e=0;e<a;++e)(n=r(t=i[e]))==ys?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=n,i[s++]=t);i.length=s,o.length=s,this.heapify_()},t}();const bs=_s,ws=0,xs=1,Ss=2,Es=3,Cs=4;var Ts=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Os=function(t){function e(e,n){var r=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return r.boundHandleTileChange_=r.handleTileChange.bind(r),r.tileChangeCallback_=n,r.tilesLoading_=0,r.tilesLoadingKeys_={},r}return Ts(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);n&&e[0].addEventListener(Vi.Z.CHANGE,this.boundHandleTileChange_);return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(n===Ss||n===Es||n===Cs){e.removeEventListener(Vi.Z.CHANGE,this.boundHandleTileChange_);var r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var n,r,i=0;this.tilesLoading_<t&&i<e&&this.getCount()>0;)r=(n=this.dequeue()[0]).getKey(),n.getState()!==ws||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,n.load())},e}(bs);const ks=Os;const Ms=0,Ps=1,Ls={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var As=256;function Is(t,e,n){return function(r,i,o,s,a){if(r){if(!i&&!e)return r;var l=e?0:o[0]*i,c=e?0:o[1]*i,u=a?a[0]:0,h=a?a[1]:0,p=t[0]+l/2+u,f=t[2]-l/2+u,d=t[1]+c/2+h,g=t[3]-c/2+h;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var v=Ze(r[0],p,f),m=Ze(r[1],d,g);if(s&&n&&i){var y=30*i;v+=-y*Math.log(1+Math.max(0,p-r[0])/y)+y*Math.log(1+Math.max(0,r[0]-f)/y),m+=-y*Math.log(1+Math.max(0,d-r[1])/y)+y*Math.log(1+Math.max(0,r[1]-g)/y)}return[v,m]}}}function Rs(t){return t}var Ds=n(5537);function js(t,e,n,r){var i=sr(e)/n[0],o=nr(e)/n[1];return r?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function Fs(t,e,n){var r=Math.min(t,e);return r*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(r=Math.max(r,n),r/=Math.log(1+50*Math.max(0,n/t-1))/50+1),Ze(r,n/2,2*e)}function Ns(t,e,n,r,i){return function(o,s,a,l){if(void 0!==o){var c=r?js(t,r,a,i):t;return(void 0===n||n)&&l?Fs(o,c,e):Ze(o,e,c)}}}function Bs(t){return void 0!==t?0:void 0}function zs(t){return void 0!==t?t:void 0}function Gs(t){return Math.pow(t,3)}function Xs(t){return 1-Gs(1-t)}function Hs(t){return 3*t*t-2*t*t*t}function Us(t){return t}const Zs="XY",qs="XYZ",Ws="XYM",Ys="XYZM";function Vs(t,e,n,r,i,o){for(var s=o||[],a=0,l=e;l<n;l+=r){var c=t[l],u=t[l+1];s[a++]=i[0]*c+i[2]*u+i[4],s[a++]=i[1]*c+i[3]*u+i[5]}return o&&s.length!=a&&(s.length=a),s}function Ks(t,e,n,r,i,o,s){for(var a=s||[],l=Math.cos(i),c=Math.sin(i),u=o[0],h=o[1],p=0,f=e;f<n;f+=r){var d=t[f]-u,g=t[f+1]-h;a[p++]=u+d*l-g*c,a[p++]=h+d*c+g*l;for(var v=f+2;v<f+r;++v)a[p++]=t[v]}return s&&a.length!=p&&(a.length=p),a}function $s(t,e,n,r,i,o,s){for(var a=s||[],l=0,c=e;c<n;c+=r){a[l++]=t[c]+i,a[l++]=t[c+1]+o;for(var u=c+2;u<c+r;++u)a[l++]=t[u]}return s&&a.length!=l&&(a.length=l),a}var Js=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qs=[1,0,0,1,0,0],ta=function(t){function e(){var e=t.call(this)||this;return e.extent_=[1/0,1/0,-1/0,-1/0],e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,mi.qe)((function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})),e}return Js(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,Mn.O3)()},e.prototype.closestPointXY=function(t,e,n,r){return(0,Mn.O3)()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return(0,Mn.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Hn(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){(0,Mn.O3)()},e.prototype.scale=function(t,e,n){(0,Mn.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,Mn.O3)()},e.prototype.getType=function(){return(0,Mn.O3)()},e.prototype.applyTransform=function(t){(0,Mn.O3)()},e.prototype.intersectsExtent=function(t){return(0,Mn.O3)()},e.prototype.translate=function(t,e){(0,Mn.O3)()},e.prototype.transform=function(t,e){var n=xr(t),r=n.getUnits()==Xe.TILE_PIXELS?function(t,r,i){var o=n.getExtent(),s=n.getWorldExtent(),a=nr(s)/nr(o);return wi(Qs,s[0],s[3],a,-a,0,0,0),Vs(t,0,t.length,i,Qs,r),Lr(n,e)(t,r,i)}:Lr(n,e);return this.applyTransform(r),this},e}(Di.Z);const ea=ta;var na=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ra=function(t){function e(){var e=t.call(this)||this;return e.layout=Zs,e.stride=2,e.flatCoordinates=null,e}return na(e,t),e.prototype.computeExtent=function(t){return function(t,e,n,r,i){return qn(Hn(i),t,e,n,r)}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,Mn.O3)()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=ia(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){(0,Mn.O3)()},e.prototype.setLayout=function(t,e,n){var r;if(t)r=ia(t);else{for(var i=0;i<n;++i){if(0===e.length)return this.layout=Zs,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=Zs:3==t?e=qs:4==t&&(e=Ys);return e}(r=e.length)}this.layout=t,this.stride=r},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var r=this.getStride();Ks(n,0,n.length,r,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var r=e;void 0===r&&(r=t);var i=n;i||(i=Jn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,n,r,i,o,s,a){for(var l=a||[],c=s[0],u=s[1],h=0,p=e;p<n;p+=r){var f=t[p]-c,d=t[p+1]-u;l[h++]=c+i*f,l[h++]=u+o*d;for(var g=p+2;g<p+r;++g)l[h++]=t[g]}a&&l.length!=h&&(l.length=h)}(o,0,o.length,s,t,r,i,o),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var r=this.getStride();$s(n,0,n.length,r,t,e,n),this.changed()}},e}(ea);function ia(t){var e;return t==Zs?e=2:t==qs||t==Ws?e=3:t==Ys&&(e=4),e}const oa=ra;function sa(t,e,n,r,i,o,s){var a,l=t[e],c=t[e+1],u=t[n]-l,h=t[n+1]-c;if(0===u&&0===h)a=e;else{var p=((i-l)*u+(o-c)*h)/(u*u+h*h);if(p>1)a=n;else{if(p>0){for(var f=0;f<r;++f)s[f]=Qe(t[e+f],t[n+f],p);return void(s.length=r)}a=e}}for(f=0;f<r;++f)s[f]=t[a+f];s.length=r}function aa(t,e,n,r,i){var o=t[e],s=t[e+1];for(e+=r;e<n;e+=r){var a=t[e],l=t[e+1],c=Ve(o,s,a,l);c>i&&(i=c),o=a,s=l}return i}function la(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o){var a=n[o];i=aa(t,e,a,r,i),e=a}return i}function ca(t,e,n,r,i,o,s,a,l,c,u){if(e==n)return c;var h,p;if(0===i){if((p=Ve(s,a,t[e],t[e+1]))<c){for(h=0;h<r;++h)l[h]=t[e+h];return l.length=r,p}return c}for(var f=u||[NaN,NaN],d=e+r;d<n;)if(sa(t,d-r,d,r,s,a,f),(p=Ve(s,a,f[0],f[1]))<c){for(c=p,h=0;h<r;++h)l[h]=f[h];l.length=r,d+=r}else d+=r*Math.max((Math.sqrt(p)-Math.sqrt(c))/i|0,1);if(o&&(sa(t,n-r,e,r,s,a,f),(p=Ve(s,a,f[0],f[1]))<c)){for(c=p,h=0;h<r;++h)l[h]=f[h];l.length=r}return c}function ua(t,e,n,r,i,o,s,a,l,c,u){for(var h=u||[NaN,NaN],p=0,f=n.length;p<f;++p){var d=n[p];c=ca(t,e,d,r,i,o,s,a,l,c,h),e=d}return c}function ha(t,e,n,r){for(var i=0,o=n.length;i<o;++i)t[e++]=n[i];return e}function pa(t,e,n,r){for(var i=0,o=n.length;i<o;++i)for(var s=n[i],a=0;a<r;++a)t[e++]=s[a];return e}function fa(t,e,n,r,i){for(var o=i||[],s=0,a=0,l=n.length;a<l;++a){var c=pa(t,e,n[a],r);o[s++]=c,e=c}return o.length=s,o}function da(t,e,n,r,i,o,s){var a=(n-e)/r;if(a<3){for(;e<n;e+=r)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var c=[e,n-r],u=0;c.length>0;){for(var h=c.pop(),p=c.pop(),f=0,d=t[p],g=t[p+1],v=t[h],m=t[h+1],y=p+r;y<h;y+=r){var _=Ye(t[y],t[y+1],d,g,v,m);_>f&&(u=y,f=_)}f>i&&(l[(u-e)/r]=1,p+r<u&&c.push(p,u),u+r<h&&c.push(u,h))}for(y=0;y<a;++y)l[y]&&(o[s++]=t[e+y*r],o[s++]=t[e+y*r+1]);return s}function ga(t,e){return e*Math.round(t/e)}function va(t,e,n,r,i,o,s){if(e==n)return s;var a,l,c=ga(t[e],i),u=ga(t[e+1],i);e+=r,o[s++]=c,o[s++]=u;do{if(a=ga(t[e],i),l=ga(t[e+1],i),(e+=r)==n)return o[s++]=a,o[s++]=l,s}while(a==c&&l==u);for(;e<n;){var h=ga(t[e],i),p=ga(t[e+1],i);if(e+=r,h!=a||p!=l){var f=a-c,d=l-u,g=h-c,v=p-u;f*v==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&v<d||d==v||d>0&&v>d)?(a=h,l=p):(o[s++]=a,o[s++]=l,c=a,u=l,a=h,l=p)}}return o[s++]=a,o[s++]=l,s}function ma(t,e,n,r,i,o,s,a){for(var l=0,c=n.length;l<c;++l){var u=n[l];s=va(t,e,u,r,i,o,s),a.push(s),e=u}return s}function ya(t,e,n,r,i){for(var o=void 0!==i?i:[],s=0,a=e;a<n;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function _a(t,e,n,r,i){for(var o=void 0!==i?i:[],s=0,a=0,l=n.length;a<l;++a){var c=n[a];o[s++]=ya(t,e,c,r,o[s]),e=c}return o.length=s,o}function ba(t,e,n,r,i){for(var o=void 0!==i?i:[],s=0,a=0,l=n.length;a<l;++a){var c=n[a];o[s++]=_a(t,e,c,r,o[s]),e=c[c.length-1]}return o.length=s,o}function wa(t,e,n,r){for(var i=0,o=t[n-r],s=t[n-r+1];e<n;e+=r){var a=t[e],l=t[e+1];i+=s*a-o*l,o=a,s=l}return i/2}function xa(t,e,n,r){for(var i=0,o=0,s=n.length;o<s;++o){var a=n[o];i+=wa(t,e,a,r),e=a}return i}var Sa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ea=function(t){function e(e,n){var r=t.call(this)||this;return r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return Sa(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(aa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ca(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.getArea=function(){return wa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return ya(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=da(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Zs)},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=pa(this.flatCoordinates,0,t,this.stride),this.changed()},e}(oa);const Ca=Ea;var Ta=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oa=function(t){function e(e,n){var r=t.call(this)||this;return r.setCoordinates(e,n),r}return Ta(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){var i=this.flatCoordinates,o=Ve(t,e,i[0],i[1]);if(o<r){for(var s=this.stride,a=0;a<s;++a)n[a]=i[a];return n.length=s,o}return r},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return e=this.flatCoordinates,n=t,r=e[0],i=e[1],Xn(r,i,r,i,n);var e,n,r,i},e.prototype.getType=function(){return"Point"},e.prototype.intersectsExtent=function(t){return Bn(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ha(this.flatCoordinates,0,t,this.stride),this.changed()},e}(oa);const ka=Oa;function Ma(t,e,n,r,i){return!Yn(i,(function(i){return!Pa(t,e,n,r,i[0],i[1])}))}function Pa(t,e,n,r,i,o){for(var s=0,a=t[n-r],l=t[n-r+1];e<n;e+=r){var c=t[e],u=t[e+1];l<=o?u>o&&(c-a)*(o-l)-(i-a)*(u-l)>0&&s++:u<=o&&(c-a)*(o-l)-(i-a)*(u-l)<0&&s--,a=c,l=u}return 0!==s}function La(t,e,n,r,i,o){if(0===n.length)return!1;if(!Pa(t,e,n[0],r,i,o))return!1;for(var s=1,a=n.length;s<a;++s)if(Pa(t,n[s-1],n[s],r,i,o))return!1;return!0}function Aa(t,e,n,r,i,o,s){for(var a,l,c,u,h,p,f,d=i[o+1],g=[],v=0,m=n.length;v<m;++v){var y=n[v];for(u=t[y-r],p=t[y-r+1],a=e;a<y;a+=r)h=t[a],f=t[a+1],(d<=p&&f<=d||p<=d&&d<=f)&&(c=(d-p)/(f-p)*(h-u)+u,g.push(c)),u=h,p=f}var _=NaN,b=-1/0;for(g.sort(Ds.kK),u=g[0],a=1,l=g.length;a<l;++a){h=g[a];var w=Math.abs(h-u);w>b&&La(t,e,n,r,c=(u+h)/2,d)&&(_=c,b=w),u=h}return isNaN(_)&&(_=i[o]),s?(s.push(_,d,b),s):[_,d,b]}function Ia(t,e,n,r,i){var o;for(e+=r;e<n;e+=r)if(o=i(t.slice(e-r,e),t.slice(e,e+r)))return o;return!1}function Ra(t,e,n,r,i){var o=qn([1/0,1/0,-1/0,-1/0],t,e,n,r);return!!ar(i,o)&&(!!Nn(i,o)||(o[0]>=i[0]&&o[2]<=i[2]||(o[1]>=i[1]&&o[3]<=i[3]||Ia(t,e,n,r,(function(t,e){return function(t,e,n){var r=!1,i=zn(t,e),o=zn(t,n);if(i===En||o===En)r=!0;else{var s=t[0],a=t[1],l=t[2],c=t[3],u=e[0],h=e[1],p=n[0],f=n[1],d=(f-h)/(p-u),g=void 0,v=void 0;o&Cn&&!(i&Cn)&&(r=(g=p-(f-c)/d)>=s&&g<=l),r||!(o&Tn)||i&Tn||(r=(v=f-(p-l)*d)>=a&&v<=c),r||!(o&On)||i&On||(r=(g=p-(f-a)/d)>=s&&g<=l),r||!(o&kn)||i&kn||(r=(v=f-(p-s)*d)>=a&&v<=c)}return r}(i,t,e)})))))}function Da(t,e,n,r,i){return!!Ra(t,e,n,r,i)||(!!Pa(t,e,n,r,i[0],i[1])||(!!Pa(t,e,n,r,i[0],i[3])||(!!Pa(t,e,n,r,i[2],i[1])||!!Pa(t,e,n,r,i[2],i[3]))))}function ja(t,e,n,r,i){if(!Da(t,e,n[0],r,i))return!1;if(1===n.length)return!0;for(var o=1,s=n.length;o<s;++o)if(Ma(t,n[o-1],n[o],r,i)&&!Ra(t,n[o-1],n[o],r,i))return!1;return!0}function Fa(t,e,n,r){for(;e<n-r;){for(var i=0;i<r;++i){var o=t[e+i];t[e+i]=t[n-r+i],t[n-r+i]=o}e+=r,n-=r}}function Na(t,e,n,r){for(var i=0,o=t[n-r],s=t[n-r+1];e<n;e+=r){var a=t[e],l=t[e+1];i+=(a-o)*(l+s),o=a,s=l}return 0===i?void 0:i>0}function Ba(t,e,n,r,i){for(var o=void 0!==i&&i,s=0,a=n.length;s<a;++s){var l=n[s],c=Na(t,e,l,r);if(0===s){if(o&&c||!o&&!c)return!1}else if(o&&!c||!o&&c)return!1;e=l}return!0}function za(t,e,n,r,i){for(var o=void 0!==i&&i,s=0,a=n.length;s<a;++s){var l=n[s],c=Na(t,e,l,r);(0===s?o&&c||!o&&!c:o&&!c||!o&&c)&&Fa(t,e,l,r),e=l}return e}var Ga=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xa=function(t){function e(e,n,r){var i=t.call(this)||this;return i.ends_=[],i.flatInteriorPointRevision_=-1,i.flatInteriorPoint_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,void 0!==n&&r?(i.setFlatCoordinates(n,e),i.ends_=r):i.setCoordinates(e,n),i}return Ga(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,Ds.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(la(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ua(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.containsXY=function(t,e){return La(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return xa(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?za(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,_a(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Jn(this.getExtent());this.flatInteriorPoint_=Aa(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new ka(this.getFlatInteriorPoint(),Ws)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Ca(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[],i=0,o=0,s=n.length;o<s;++o){var a=n[o],l=new Ca(e.slice(i,a),t);r.push(l),i=a}return r},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Ba(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=za(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],r=[];return n.length=ma(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,r),new e(n,Zs,r)},e.prototype.getType=function(){return"Polygon"},e.prototype.intersectsExtent=function(t){return ja(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=fa(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(oa);const Ha=Xa;function Ua(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=[e,n,e,i,r,i,r,n,e,n];return new Xa(o,Zs,[o.length])}var Za=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qa=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=(0,qi.f0)({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=Cr(r.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,r.projection&&yr(),r.center&&(r.center=zr(r.center,n.projection_)),r.extent&&(r.extent=Xr(r.extent,n.projection_)),n.applyOptions_(r),n}return Za(e,t),e.prototype.applyOptions_=function(t){var e=(0,qi.f0)({},t);for(var n in Ls)delete e[n];this.setProperties(e,!0);var r=function(t){var e,n,r,i=28,o=2,s=void 0!==t.minZoom?t.minZoom:0,a=void 0!==t.maxZoom?t.maxZoom:i,l=void 0!==t.zoomFactor?t.zoomFactor:o,c=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,h=void 0!==t.showFullExtent&&t.showFullExtent,p=Cr(t.projection,"EPSG:3857"),f=p.getExtent(),d=t.constrainOnlyCenter,g=t.extent;c||g||!p.isGlobal()||(d=!1,g=f);if(void 0!==t.resolutions){var v=t.resolutions;n=v[s],r=void 0!==v[a]?v[a]:v[v.length-1],e=t.constrainResolution?function(t,e,n,r){return function(i,o,s,a){if(void 0!==i){var l=t[0],c=t[t.length-1],u=n?js(l,n,s,r):l;if(a)return void 0===e||e?Fs(i,u,c):Ze(i,c,u);var h=Math.min(u,i),p=Math.floor((0,Ds.h7)(t,h,o));return t[p]>u&&p<t.length-1?t[p+1]:t[p]}}}(v,u,!d&&g,h):Ns(n,r,u,!d&&g,h)}else{var m=(f?Math.max(sr(f),nr(f)):360*Ge[Xe.DEGREES]/p.getMetersPerUnit())/As/Math.pow(o,0),y=m/Math.pow(o,i-0);void 0!==(n=t.maxResolution)?s=0:n=m/Math.pow(l,s),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(l,a):m/Math.pow(l,a):y),a=s+Math.floor(Math.log(n/r)/Math.log(l)),r=n/Math.pow(l,a-s),e=t.constrainResolution?function(t,e,n,r,i,o){return function(s,a,l,c){if(void 0!==s){var u=i?js(e,i,l,o):e,h=void 0!==n?n:0;if(c)return void 0===r||r?Fs(s,u,h):Ze(s,h,u);var p=Math.ceil(Math.log(e/u)/Math.log(t)-1e-9),f=-a*(.5-1e-9)+.5,d=Math.min(u,s),g=Math.floor(Math.log(e/d)/Math.log(t)+f),v=Math.max(p,g);return Ze(e/Math.pow(t,v),h,u)}}}(l,n,r,u,!d&&g,h):Ns(n,r,u,!d&&g,h)}return{constraint:e,maxResolution:n,minResolution:r,minZoom:s,zoomFactor:l}}(t);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=r.minZoom;var i=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Is(t.extent,t.constrainOnlyCenter,e)}var n=Cr(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var r=n.getExtent().slice();return r[0]=-1/0,r[2]=1/0,Is(r,!1,!1)}return Rs}(t),o=r.constraint,s=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=i||$e(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?zs:"number"==typeof e?(n=e,r=2*Math.PI/n,function(t,e){return e?t:void 0!==t?t=Math.floor(t/r+.5)*r:void 0}):zs}return Bs;var n,r;var i,o}(t);this.constraints_={center:i,resolution:o,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var r=t||[0,0,0,0];e=e||[0,0,0,0];var i=this.getResolution(),o=i/2*(r[3]-e[3]+e[1]-r[1]),s=i/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+o,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,qi.f0)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var r=arguments[n];r.center&&((r=(0,qi.f0)({},r)).center=zr(r.center,this.getProjection())),r.anchor&&((r=(0,qi.f0)({},r)).anchor=zr(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var r=0;r<n&&!this.isDef();++r){var i=arguments[r];i.center&&this.setCenterInternal(i.center),void 0!==i.zoom?this.setZoom(i.zoom):i.resolution&&this.setResolution(i.resolution),void 0!==i.rotation&&this.setRotation(i.rotation)}if(r!==n){for(var o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,c=[];r<n;++r){var u=arguments[r],h={start:o,complete:!1,anchor:u.anchor,duration:void 0!==u.duration?u.duration:1e3,easing:u.easing||Hs,callback:e};if(u.center&&(h.sourceCenter=s,h.targetCenter=u.center.slice(),s=h.targetCenter),void 0!==u.zoom?(h.sourceResolution=a,h.targetResolution=this.getResolutionForZoom(u.zoom),a=h.targetResolution):u.resolution&&(h.sourceResolution=a,h.targetResolution=u.resolution,a=h.targetResolution),void 0!==u.rotation){h.sourceRotation=l;var p=Je(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;h.targetRotation=l+p,l=h.targetRotation}Ya(h)?h.complete=!0:o+=h.duration,c.push(h)}this.animations_.push(c),this.setHint(Ms,1),this.updateAnimations_()}else e&&Wa(e,!0)},e.prototype.getAnimating=function(){return this.hints_[Ms]>0},e.prototype.getInteracting=function(){return this.hints_[Ps]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Ms,-this.hints_[Ms]);for(var e=0,n=this.animations_.length;e<n;++e){var r=this.animations_[e];if(r[0].callback&&Wa(r[0].callback,!1),!t)for(var i=0,o=r.length;i<o;++i){var s=r[i];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var r=this.animations_[n],i=!0,o=0,s=r.length;o<s;++o){var a=r[o];if(!a.complete){var l=t-a.start,c=a.duration>0?l/a.duration:1;c>=1?(a.complete=!0,c=1):i=!1;var u=a.easing(c);if(a.sourceCenter){var h=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=h+u*(f-h),v=p+u*(d-p);this.targetCenter_=[g,v]}if(a.sourceResolution&&a.targetResolution){var m=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var y=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(m,0,y,!0);this.targetCenter_=this.calculateCenterZoom(_,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var b=1===u?Je(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var w=this.constraints_.rotation(b,!0);this.targetCenter_=this.calculateCenterRotate(w,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=b}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(i){this.animations_[n]=null,this.setHint(Ms,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var x=r[0].callback;x&&Wa(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,r,i,o=this.getCenterInternal();return void 0!==o&&(pr(n=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),i=e,(r=n)[0]+=+i[0],r[1]+=+i[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,r=this.getCenterInternal(),i=this.getResolution();void 0!==r&&void 0!==i&&(n=[e[0]-t*(e[0]-r[0])/i,e[1]-t*(e[1]-r[1])/i]);return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Br(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Ls.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return Gr(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();An(n,1);var r=this.getResolution();An(void 0!==r,2);var i=this.getRotation();return An(void 0!==i,3),tr(n,r,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Ls.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Xr(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),r=sr(t)/n[0],i=nr(t)/n[1];return Math.max(r,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(t){return n/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(Ls.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/e;return function(t){return Math.log(n/t)/e/i}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),r=this.getCenterInternal(),i=this.padding_;if(i){var o=this.getViewportSizeMinusPadding_();r=Va(r,this.getViewportSize_(),[o[0]/2+i[3],o[1]/2+i[0]],e,n)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,r=this.minZoom_||0;if(this.resolutions_){var i=(0,Ds.h7)(this.resolutions_,t,1);r=i,e=this.resolutions_[i],n=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Ze(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Ze(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(An(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))An(!lr(t),25),n=Ua(r=Xr(t,this.getProjection()));else if("Circle"===t.getType()){var r;(n=Ua(r=Xr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Jn(r))}else{var i=Nr();n=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),i=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,c=-1/0,u=0,h=i.length;u<h;u+=o){var p=i[u]*n-i[u+1]*r,f=i[u]*r+i[u+1]*n;s=Math.min(s,p),a=Math.min(a,f),l=Math.max(l,p),c=Math.max(c,f)}return[s,a,l,c]},e.prototype.fitInternal=function(t,e){var n=e||{},r=n.size;r||(r=this.getViewportSizeMinusPadding_());var i,o=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;i=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var a=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(a,[r[0]-o[1]-o[3],r[1]-o[0]-o[2]]);l=isNaN(l)?i:Math.max(l,i),l=this.getConstrainedResolution(l,s?0:1);var c=this.getRotation(),u=Math.sin(c),h=Math.cos(c),p=Jn(a);p[0]+=(o[1]-o[3])/2*l,p[1]+=(o[0]-o[2])/2*l;var f=p[0]*h-p[1]*u,d=p[1]*h+p[0]*u,g=this.getConstrainedCenter([f,d],l),v=n.callback?n.callback:mi.Zn;void 0!==n.duration?this.animateInternal({resolution:l,center:g,duration:n.duration,easing:n.easing},v):(this.targetResolution_=l,this.targetCenter_=g,this.applyTargetState_(!1,!0),Wa(v,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(zr(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(Va(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,r){var i,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-n),a=Va(t,r,[s[0]/2+o[3],s[1]/2+o[0]],e,n);i=[t[0]-a[0],t[1]-a[1]]}return i},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Br(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&zr(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,r,n);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=zr(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?zr(t,this.getProjection()):t)},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),i=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,i,n),s=this.constraints_.center(this.targetCenter_,o,i,n,this.calculateCenterShift(this.targetCenter_,o,r,i));this.get(Ls.ROTATION)!==r&&this.set(Ls.ROTATION,r),this.get(Ls.RESOLUTION)!==o&&(this.set(Ls.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(Ls.CENTER)&&hr(this.get(Ls.CENTER),s)||this.set(Ls.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var r=void 0!==t?t:200,i=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,i,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===r&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var c=n||(0===r?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&hr(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:r,easing:Xs,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Ps,1)},e.prototype.endInteraction=function(t,e,n){var r=n&&zr(n,this.getProjection());this.endInteractionInternal(t,e,r)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(Ps,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,r=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,r)},e}(Di.Z);function Wa(t,e){setTimeout((function(){t(e)}),0)}function Ya(t){return!(t.sourceCenter&&t.targetCenter&&!hr(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Va(t,e,n,r,i){var o=Math.cos(-i),s=Math.sin(-i),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-n[0])*r)*o-(l+=(n[1]-e[1]/2)*r)*(s=-s),l*o+a*s]}const Ka=qa;function $a(t){return t[0]>0&&t[1]>0}function Ja(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Qa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function tl(t){t instanceof oo?t.setMapInternal(null):t instanceof ns&&t.getLayers().forEach(tl)}function el(t,e){if(t instanceof oo)t.setMapInternal(e);else if(t instanceof ns)for(var n=t.getLayers().getArray(),r=0,i=n.length;r<i;++r)el(n[r],e)}var nl=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,r,i,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ns({layers:t.layers});o[ds]=s,o[vs]=t.target,o[ms]=t.view instanceof Ka?t.view:new Ka,void 0!==t.controls&&(Array.isArray(t.controls)?n=new $o(t.controls.slice()):(An("function"==typeof t.controls.getArray,47),n=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new $o(t.interactions.slice()):(An("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new $o(t.overlays.slice()):(An("function"==typeof t.overlays.getArray,49),i=t.overlays):i=new $o;return{controls:n,interactions:r,keyboardEventTarget:e,overlays:i,values:o}}(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:yi.MP,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=[1,0,0,1,0,0],n.pixelToCoordinateTransform_=[1,0,0,1,0,0],n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=r.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=r.controls||new $o,n.interactions=r.interactions||new $o,n.overlays_=r.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new ks(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(ds,n.handleLayerGroupChanged_),n.addChangeListener(ms,n.handleViewChanged_),n.addChangeListener(gs,n.handleSizeChanged_),n.addChangeListener(vs,n.handleTargetChanged_),n.setProperties(r.values);var i=n;return!e.view||e.view instanceof Ka||e.view.then((function(t){i.setView(new Ka(t))})),n.controls.addEventListener(Zo,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(qo,function(t){t.element.setMap(null)}.bind(n)),n.interactions.addEventListener(Zo,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(qo,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(Zo,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(qo,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return Qa(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.handleLayerAdd_=function(t){el(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:mi.uX,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,i,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.getAllLayers=function(){var t=[];return function e(n){n.forEach((function(n){n instanceof ns?e(n.getLayers()):t.push(n)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var r=n||{},i=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||mi.uX;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:mi.uX,i=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,i,o,r,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(vs)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Br(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?bi(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(ds)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof $o)e.setLayers(t);else{var n=e.getLayers();n.clear(),n.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var r=t[e];if(r.visible){var i=r.layer.getRenderer();if(i&&!i.ready)return!0;var o=r.layer.getSource();if(o&&o.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=zr(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?bi(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(gs)},e.prototype.getView=function(){return this.get(ms)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,r){return function(t,e,n,r,i){if(!t||!(n in t.wantedTiles))return ys;if(!t.wantedTiles[n][e.getKey()])return ys;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}(this.frameState_,t,e,n,r)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,r=new ss(n,this,t);this.handleMapBrowserEvent(r)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===cs||n===Vi.Z.WHEEL||n===Vi.Z.KEYDOWN){var r=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():r,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(i===r?r.documentElement:i).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,r=n;if(t){var i=t.viewHints;if(i[Ms]||i[Ps]){var o=Date.now()-t.time>8;n=o?0:8,r=o?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,r))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(to)&&this.renderer_.dispatchRenderEvent(to,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new is(fs.Z.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new is(fs.Z.LOADSTART,this,t))));for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,eo.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(Vi.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Vi.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,wo.ZF)(this.viewport_)}var n=this.getTargetElement();if(n){for(var r in n.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new ps(this,this.moveTolerance_),as)this.mapBrowserEventHandler_.addEventListener(as[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(Vi.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Vi.Z.WHEEL,this.boundHandleBrowserEvent_,!!yi.bM&&{passive:!1});var i=this.getOwnerDocument().defaultView,o=this.keyboardEventTarget_?this.keyboardEventTarget_:n;this.targetChangeHandlerKeys_=[(0,eo.oL)(o,Vi.Z.KEYDOWN,this.handleBrowserEvent,this),(0,eo.oL)(o,Vi.Z.KEYPRESS,this.handleBrowserEvent,this),(0,eo.oL)(i,Vi.Z.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,eo.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,eo.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,eo.oL)(t,uo.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,eo.oL)(t,Vi.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(eo.bN),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Qo("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,eo.oL)(t,uo.Z.PROPERTYCHANGE,this.render,this),(0,eo.oL)(t,Vi.Z.CHANGE,this.render,this),(0,eo.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,eo.oL)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.handleLayerRemove_=function(t){tl(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),r=this.getView(),i=this.frameState_,o=null;if(void 0!==n&&$a(n)&&r&&r.isDef()){var s=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=r.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:tr(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:(0,Mn.sq)(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=tr(a.nextCenter,a.nextResolution,l,n)}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),i)(!this.previousExtent_||!lr(this.previousExtent_)&&!Un(o.extent,this.previousExtent_))&&(this.dispatchEvent(new is(fs.Z.MOVESTART,this,i)),this.previousExtent_=Hn(this.previousExtent_));this.previousExtent_&&!o.viewHints[Ms]&&!o.viewHints[Ps]&&!Un(o.extent,this.previousExtent_)&&(this.dispatchEvent(new is(fs.Z.MOVEEND,this,o)),Dn(o.extent,this.previousExtent_))}this.dispatchEvent(new is(fs.Z.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(fs.Z.LOADSTART)||this.hasListener(fs.Z.LOADEND)||this.hasListener(to)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new Qo("removelayer",e)),this.set(ds,t)},e.prototype.setSize=function(t){this.set(gs,t)},e.prototype.setTarget=function(t){this.set(vs,t)},e.prototype.setView=function(t){if(!t||t instanceof Ka)this.set(ms,t);else{this.set(ms,new Ka);var e=this;t.then((function(t){e.setView(new Ka(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),i=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(r)||isNaN(i)||!$a(e=[r,i])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(Di.Z);const rl=nl;var il=n(8775),ol=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const sl=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).ulElement_=document.createElement("ul"),n.collapsed_=void 0===r.collapsed||r.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==r.collapsible,n.collapsible_=void 0===r.collapsible||r.collapsible,n.collapsible_||(n.collapsed_=!1);var i=void 0!==r.className?r.className:"ol-attribution",o=void 0!==r.tipLabel?r.tipLabel:"Attributions",s=void 0!==r.expandClassName?r.expandClassName:i+"-expand",a=void 0!==r.collapseLabel?r.collapseLabel:"›",l=void 0!==r.collapseClassName?r.collapseClassName:i+"-collapse";"string"==typeof a?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=a,n.collapseLabel_.className=l):n.collapseLabel_=a;var c=void 0!==r.label?r.label:"i";"string"==typeof c?(n.label_=document.createElement("span"),n.label_.textContent=c,n.label_.className=s):n.label_=c;var u=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=o,n.toggleButton_.appendChild(u),n.toggleButton_.addEventListener(Vi.Z.CLICK,n.handleClick_.bind(n),!1);var h=i+" "+"ol-unselectable "+vo+(n.collapsed_&&n.collapsible_?" ol-collapsed":"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;return p.className=h,p.appendChild(n.toggleButton_),p.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return ol(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],r=!0,i=t.layerStatesArray,o=0,s=i.length;o<s;++o){var a=i[o];if(io(a,t.viewState)){var l=a.layer.getSource();if(l){var c=l.getAttributions();if(c){var u=c(t);if(u)if(r=r&&!1!==l.getAttributionsCollapsible(),Array.isArray(u))for(var h=0,p=u.length;h<p;++h)u[h]in e||(n.push(u[h]),e[u[h]]=!0);else u in e||(n.push(u),e[u]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(r),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!(0,Ds.fS)(e,this.renderedAttributions_)){(0,wo.ep)(this.ulElement_);for(var r=0,i=e.length;r<i;++r){var o=document.createElement("li");o.innerHTML=e[r],this.ulElement_.appendChild(o)}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(mo),this.collapsed_?(0,wo.$H)(this.collapseLabel_,this.label_):(0,wo.$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}(il.default);var al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ll=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this;var i=void 0!==r.className?r.className:"ol-rotate",o=void 0!==r.label?r.label:"⇧",s=void 0!==r.compassClassName?r.compassClassName:"ol-compass";n.label_=null,"string"==typeof o?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var a=r.tipLabel?r.tipLabel:"Reset rotation",l=document.createElement("button");l.className=i+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(Vi.Z.CLICK,n.handleClick_.bind(n),!1);var c=i+" "+"ol-unselectable "+vo,u=n.element;return u.className=c,u.appendChild(l),n.callResetNorth_=r.resetNorth?r.resetNorth:void 0,n.duration_=void 0!==r.duration?r.duration:250,n.autoHide_=void 0===r.autoHide||r.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(fo),n}return al(e,t),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:Xs}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var r="rotate("+n+"rad)";if(this.autoHide_){var i=this.element.classList.contains(fo);i||0!==n?i&&0!==n&&this.element.classList.remove(fo):this.element.classList.add(fo)}this.label_.style.transform=r}this.rotation_=n}},e}(il.default);const cl=ll;var ul=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const hl=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),target:r.target})||this;var i=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:i+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:i+"-out",l=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"–",u=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",h=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(Vi.Z.CLICK,n.handleClick_.bind(n,o),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=h,f.appendChild("string"==typeof c?document.createTextNode(c):c),f.addEventListener(Vi.Z.CLICK,n.handleClick_.bind(n,-o),!1);var d=i+" "+"ol-unselectable "+vo,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==r.duration?r.duration:250,n}return ul(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var r=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:r,duration:this.duration_,easing:Xs})):e.setZoom(r)}}},e}(il.default);const pl="active";var fl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function dl(t,e,n,r){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==r?r:250,easing:Xs})}}const gl=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return fl(e,t),e.prototype.getActive=function(){return this.get(pl)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(pl,t)},e.prototype.setMap=function(t){this.map_=t},e}(Di.Z);var vl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ml=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:250,n}return vl(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==as.DBLCLICK){var n=t.originalEvent,r=t.map,i=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_;dl(r.getView(),o,i,this.duration_),n.preventDefault(),e=!0}return!e},e}(gl);var yl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function _l(t){for(var e=t.length,n=0,r=0,i=0;i<e;i++)n+=t[i].clientX,r+=t[i].clientY;return[n/e,r/e]}const bl=function(t){function e(e){var n=this,r=e||{};return n=t.call(this,r)||this,r.handleDownEvent&&(n.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(n.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(n.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(n.handleUpEvent=r.handleUpEvent),r.stopDown&&(n.stopDown=r.stopDown),n.handlingDownUpSequence=!1,n.targetPointers=[],n}return yl(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==as.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==as.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==as.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==as.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},e}(gl);function wl(t){var e=arguments;return function(t){for(var n=!0,r=0,i=e.length;r<i&&(n=n&&e[r](t));++r);return n}}var xl=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Sl=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},El=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),n=t.map.getOwnerDocument().activeElement;return e.contains(n)}(t)},Cl=mi.uX,Tl=function(t){var e=t.originalEvent;return 0==e.button&&!(yi.G$&&yi.tK&&e.ctrlKey)},Ol=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},kl=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ml=function(t){var e=t.originalEvent,n=e.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n&&!e.target.isContentEditable},Pl=function(t){var e=t.originalEvent;return An(void 0!==e,56),"mouse"==e.pointerType},Ll=function(t){var e=t.originalEvent;return An(void 0!==e,56),e.isPrimary&&0===e.button},Al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Il=function(t){function e(e){var n=t.call(this,{stopDown:mi.Dv})||this,r=e||{};n.kinetic_=r.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var i=r.condition?r.condition:wl(Ol,Ll);return n.condition_=r.onFocusOnly?wl(El,i):i,n.noKinetic_=!1,n}return Al(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=_l(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map.getView();!function(t,e){t[0]*=e,t[1]*=e}(r,i.getResolution()),pr(r,i.getRotation()),i.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),i=this.kinetic_.getAngle(),o=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-r*Math.cos(i),s[1]-r*Math.sin(i)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:Xs})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(bl);const Rl=Il;var Dl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jl=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{stopDown:mi.Dv})||this).condition_=r.condition?r.condition:Sl,n.lastAngle_=void 0,n.duration_=void 0!==r.duration?r.duration:250,n}return Dl(e,t),e.prototype.handleDragEvent=function(t){if(Pl(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==Bs){var r=e.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!Pl(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!Pl(t)&&(!(!Tl(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(bl);const Fl=jl;var Nl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bl=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Nl(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.height=Math.abs(e[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new Ha([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(vi.Z);const zl=Bl;var Gl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xl="boxstart",Hl="boxdrag",Ul="boxend",Zl="boxcancel",ql=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.coordinate=n,i.mapBrowserEvent=r,i}return Gl(e,t),e}(Re.ZP),Wl=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.box_=new zl(r.className||"ol-dragbox"),n.minArea_=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(n.onBoxEnd=r.onBoxEnd),n.startPixel_=null,n.condition_=r.condition?r.condition:Tl,n.boxEndCondition_=r.boxEndCondition?r.boxEndCondition:n.defaultBoxEndCondition,n}return Gl(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var r=n[0]-e[0],i=n[1]-e[1];return r*r+i*i>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new ql(Hl,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new ql(e?Ul:Zl,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new ql(Xl,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(bl);const Yl=Wl;var Vl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kl=function(t){function e(e){var n=this,r=e||{},i=r.condition?r.condition:kl;return(n=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).duration_=void 0!==r.duration?r.duration:200,n.out_=void 0!==r.out&&r.out,n}return Vl(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var r=e.rotatedExtentForGeometry(n),i=e.getResolutionForExtentInternal(r),o=e.getResolution()/i;(n=n.clone()).scale(o*o)}e.fitInternal(n,{duration:this.duration_,easing:Xs})},e}(Yl);const $l=Kl,Jl=37,Ql=38,tc=39,ec=40;var nc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const rc=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.defaultCondition_=function(t){return Ol(t)&&Ml(t)},n.condition_=void 0!==r.condition?r.condition:n.defaultCondition_,n.duration_=void 0!==r.duration?r.duration:100,n.pixelDelta_=void 0!==r.pixelDelta?r.pixelDelta:128,n}return nc(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Vi.Z.KEYDOWN){var n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==ec||r==Jl||r==tc||r==Ql)){var i=t.map.getView(),o=i.getResolution()*this.pixelDelta_,s=0,a=0;r==ec?a=-o:r==Jl?s=-o:r==tc?s=o:a=o;var l=[s,a];pr(l,i.getRotation()),function(t,e,n){var r=t.getCenterInternal();if(r){var i=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:Us,center:t.getConstrainedCenter(i)})}}(i,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(gl);var ic=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const oc=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.condition_=r.condition?r.condition:Ml,n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:100,n}return ic(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Vi.Z.KEYDOWN||t.type==Vi.Z.KEYPRESS){var n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var i=t.map,o=r=="+".charCodeAt(0)?this.delta_:-this.delta_;dl(i.getView(),o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(gl);const sc=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;var i=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/r,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var ac=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lc="trackpad",cc="wheel",uc=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,r)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==r.maxDelta?r.maxDelta:1,n.duration_=void 0!==r.duration?r.duration:250,n.timeout_=void 0!==r.timeout?r.timeout:80,n.useAnchor_=void 0===r.useAnchor||r.useAnchor,n.constrainResolution_=void 0!==r.constrainResolution&&r.constrainResolution;var i=r.condition?r.condition:Cl;return n.condition_=r.onFocusOnly?wl(El,i):i,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return ac(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==Vi.Z.WHEEL)return!0;var e,n=t.map,r=t.originalEvent;if(r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==Vi.Z.WHEEL&&(e=r.deltaY,yi.V&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=yi.MP),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var i=Date.now();void 0===this.startTime_&&(this.startTime_=i),(!this.mode_||i-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?lc:cc);var o=n.getView();if(this.mode_===lc&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=i,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(i-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-Ze(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),dl(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(gl);const hc=uc;var pc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fc=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=mi.Dv),(n=t.call(this,i)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==r.threshold?r.threshold:.3,n.duration_=void 0!==r.duration?r.duration:250,n}return pc(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Bs){var l=s.getViewport().getBoundingClientRect(),c=_l(this.targetPointers);c[0]-=l.left,c[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(c),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(bl);const dc=fc;var gc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vc=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=mi.Dv),(n=t.call(this,i)||this).anchor_=null,n.duration_=void 0!==r.duration?r.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return gc(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],r=this.targetPointers[1],i=n.clientX-r.clientX,o=n.clientY-r.clientY,s=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var c=a.getViewport().getBoundingClientRect(),u=_l(this.targetPointers);u[0]-=c.left,u[1]-=c.top,this.anchor_=a.getCoordinateFromPixelInternal(u),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(bl);const mc=vc;function yc(t){var e=t||{},n=new $o,r=new sc(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Fl),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new ml({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Rl({onFocusOnly:e.onFocusOnly,kinetic:r})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new dc),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new mc({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new rc),n.push(new oc({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new hc({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new $l({duration:e.zoomDuration})),n}var _c=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const bc=function(t){function e(e){return(e=(0,qi.f0)({},e)).controls||(e.controls=function(t){var e=t||{},n=new $o;return(void 0===e.zoom||e.zoom)&&n.push(new hl(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new cl(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new sl(e.attributionOptions)),n}()),e.interactions||(e.interactions=yc({onFocusOnly:!0})),t.call(this,e)||this}return _c(e,t),e.prototype.createRenderer=function(){return new Uo(this)},e}(rl);var wc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xc=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var r=e;n.setGeometry(r)}else{var i=e;n.setProperties(i)}return n}return wc(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var r=this.getStyle();return r&&t.setStyle(r),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,eo.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,eo.oL)(t,Vi.Z.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(An("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(Di.Z);const Sc=xc;var Ec=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cc="accuracy",Tc="accuracyGeometry",Oc="altitude",kc="altitudeAccuracy",Mc="heading",Pc="position",Lc="projection",Ac="speed",Ic="tracking",Rc="trackingOptions",Dc=function(t){function e(e){var n=t.call(this,Vi.Z.ERROR)||this;return n.code=e.code,n.message=e.message,n}return Ec(e,t),e}(Re.ZP),jc=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.position_=null,n.transform_=br,n.watchId_=void 0,n.addChangeListener(Lc,n.handleProjectionChanged_),n.addChangeListener(Ic,n.handleTrackingChanged_),void 0!==r.projection&&n.setProjection(r.projection),void 0!==r.trackingOptions&&n.setTrackingOptions(r.trackingOptions),n.setTracking(void 0!==r.tracking&&r.tracking),n}return Ec(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=Pr(xr("EPSG:4326"),t),this.position_&&this.set(Pc,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(Cc,e.accuracy),this.set(Oc,null===e.altitude?void 0:e.altitude),this.set(kc,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Mc,null===e.heading?void 0:$e(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var n=this.transform_(this.position_);this.set(Pc,n),this.set(Ac,null===e.speed?void 0:e.speed);var r=function(t,e,n,r){for(var i=n||32,o=[],s=0;s<i;++s)(0,Ds.l7)(o,vr(t,e,2*Math.PI*s/i,r));return o.push(o[0],o[1]),new Xa(o,Zs,[o.length])}(this.position_,e.accuracy);r.applyTransform(this.transform_),this.set(Tc,r),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Dc(t))},e.prototype.getAccuracy=function(){return this.get(Cc)},e.prototype.getAccuracyGeometry=function(){return this.get(Tc)||null},e.prototype.getAltitude=function(){return this.get(Oc)},e.prototype.getAltitudeAccuracy=function(){return this.get(kc)},e.prototype.getHeading=function(){return this.get(Mc)},e.prototype.getPosition=function(){return this.get(Pc)},e.prototype.getProjection=function(){return this.get(Lc)},e.prototype.getSpeed=function(){return this.get(Ac)},e.prototype.getTracking=function(){return this.get(Ic)},e.prototype.getTrackingOptions=function(){return this.get(Rc)},e.prototype.setProjection=function(t){this.set(Lc,xr(t))},e.prototype.setTracking=function(t){this.set(Ic,t)},e.prototype.setTrackingOptions=function(t){this.set(Rc,t)},e}(Di.Z);const Fc=jc;Ka.prototype.getDecimalZoom=function(){const t=this.getResolution(),e=Math.log(this.maxResolution_/t)/Math.log(2);return void 0!==e?this.minZoom_+e:e};var Nc=n(4331);const Bc=0,zc=1,Gc=2,Xc=3;const Hc=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ja(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getDeclutterMode=function(){return this.declutterMode_},t.prototype.getAnchor=function(){return(0,Mn.O3)()},t.prototype.getImage=function(t){return(0,Mn.O3)()},t.prototype.getHitDetectionImage=function(){return(0,Mn.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,Mn.O3)()},t.prototype.getImageSize=function(){return(0,Mn.O3)()},t.prototype.getOrigin=function(){return(0,Mn.O3)()},t.prototype.getSize=function(){return(0,Mn.O3)()},t.prototype.setDisplacement=function(t){this.displacement_=t},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Ja(t)},t.prototype.listenImageChange=function(t){(0,Mn.O3)()},t.prototype.load=function(){(0,Mn.O3)()},t.prototype.unlistenImageChange=function(t){(0,Mn.O3)()},t}();function Uc(t){return Array.isArray(t)?Li(t):t}var Zc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qc=function(t){function e(e){var n=this,r=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode})||this).canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return Zc(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.setFill=function(t){this.fill_=t,this.render()},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,r=(0,wo.E4)(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return Gc},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.setStroke=function(t){this.stroke_=t,this.render()},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var r=this.radius_,i=void 0===this.radius2_?r:this.radius2_;if(r<i){var o=r;r=i,i=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=i*Math.sin(a),c=r-Math.sqrt(i*i-l*l),u=Math.sqrt(l*l+c*c),h=u/l;if("miter"===t&&h<=n)return h*e;var p=e/2/h,f=e/2*(c/u),d=Math.sqrt((r+p)*(r+p)+f*f)-r;if(void 0===this.radius2_||"bevel"===t)return 2*d;var g=r*Math.sin(a),v=i-Math.sqrt(r*r-g*g),m=Math.sqrt(g*g+v*v)/g;if(m<=n){var y=m*e/2-i-r;return 2*Math.max(d,y)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=To,n=0,r=null,i=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=Oo),t=Uc(t),void 0===(o=this.stroke_.getWidth())&&(o=1),r=this.stroke_.getLineDash(),i=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=To),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var s=this.calculateLineJoinSize_(e,o,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:r,lineDashOffset:i,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var r=this.fill_.getColor();null===r&&(r=So),e.fillStyle=Uc(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),n=0;if("string"==typeof e&&(e=Mi(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var r=(0,wo.E4)(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{var r=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var i=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=i+s*o,l=s%2==0?n:r;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=So,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(Hc);const Wc=qc;var Yc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Vc=function(t){function e(e){var n=e||{};return t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:void 0!==n.scale?n.scale:1,rotation:void 0!==n.rotation?n.rotation:0,rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView,displacement:void 0!==n.displacement?n.displacement:[0,0],declutterMode:n.declutterMode})||this}return Yc(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Wc);const Kc=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();var $c=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();const Jc=$c;var Qc=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=nu,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=nu,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var tu=null;function eu(t,e){if(!tu){var n=new Kc({color:"rgba(255,255,255,0.4)"}),r=new Jc({color:"#3399CC",width:1.25});tu=[new Qc({image:new Vc({fill:n,stroke:r,radius:5}),fill:n,stroke:r})]}return tu}function nu(t){return t.getGeometry()}const ru=Qc;var iu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ou="renderOrder",su=function(t){function e(e){var n=this,r=e||{},i=(0,qi.f0)({},r);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(n=t.call(this,i)||this).declutter_=void 0!==r.declutter&&r.declutter,n.renderBuffer_=void 0!==r.renderBuffer?r.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(r.style),n.updateWhileAnimating_=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,n.updateWhileInteracting_=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,n}return iu(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(ou)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Nc(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(ou,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:eu,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var n;Array.isArray(t)?n=t:(An("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n}}return e}(this.style_),this.changed()},e}(oo);const au=su;var lu={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},cu=[lu.FILL],uu=[lu.STROKE],hu=[lu.BEGIN_PATH],pu=[lu.CLOSE_PATH];const fu=lu;const du=function(){function t(){}return t.prototype.drawCustom=function(t,e,n,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();var gu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vu=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=r,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return gu(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,i=this.coordinates,o=i.length,s=0,a=t.length;s<a;s+=e)r[0]=t[s],r[1]=t[s+1],Fn(n,r)&&(i[o++]=r[0],i[o++]=r[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,n,r,i,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(e+=r);var c,u,h,p=t[e],f=t[e+1],d=this.tmpCoordinate_,g=!0;for(c=e+r;c<n;c+=r)d[0]=t[c],d[1]=t[c+1],(h=zn(l,d))!==u?(g&&(s[a++]=p,s[a++]=f,g=!1),s[a++]=d[0],s[a++]=d[1]):h===En?(s[a++]=d[0],s[a++]=d[1],g=!1):g=!0,p=d[0],f=d[1],u=h;return(i&&g||c===e+r)&&(s[a++]=p,s[a++]=f),a},e.prototype.drawCustomCoordinates_=function(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o){var a=n[o],l=this.appendFlatLineCoordinates(t,e,a,r,!1,!1);i.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,n,r){this.beginGeometry(t,e);var i,o,s,a,l,c=t.getType(),u=t.getStride(),h=this.coordinates.length;switch(c){case"MultiPolygon":i=t.getOrientedFlatCoordinates(),a=[];var p=t.getEndss();l=0;for(var f=0,d=p.length;f<d;++f){var g=[];l=this.drawCustomCoordinates_(i,l,p[f],u,g),a.push(g)}this.instructions.push([fu.CUSTOM,h,a,t,n,ba]),this.hitDetectionInstructions.push([fu.CUSTOM,h,a,t,r||n,ba]);break;case"Polygon":case"MultiLineString":s=[],i="Polygon"==c?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(i,0,t.getEnds(),u,s),this.instructions.push([fu.CUSTOM,h,s,t,n,_a]),this.hitDetectionInstructions.push([fu.CUSTOM,h,s,t,r||n,_a]);break;case"LineString":case"Circle":i=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(i,0,i.length,u,!1,!1),this.instructions.push([fu.CUSTOM,h,o,t,n,ya]),this.hitDetectionInstructions.push([fu.CUSTOM,h,o,t,r||n,ya]);break;case"MultiPoint":i=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(i,u))>h&&(this.instructions.push([fu.CUSTOM,h,o,t,n,ya]),this.hitDetectionInstructions.push([fu.CUSTOM,h,o,t,r||n,ya]));break;case"Point":i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([fu.CUSTOM,h,o,t,n]),this.hitDetectionInstructions.push([fu.CUSTOM,h,o,t,r||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[fu.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[fu.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,r,i=e.length,o=-1;for(t=0;t<i;++t)(r=(n=e[t])[0])==fu.END_GEOMETRY?o=t:r==fu.BEGIN_GEOMETRY&&(n[2]=t,(0,Ds.FZ)(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var r=t.getColor();n.fillStyle=Uc(r||So)}else n.fillStyle=void 0;if(e){var i=e.getColor();n.strokeStyle=Uc(i||Oo);var o=e.getLineCap();n.lineCap=void 0!==o?o:Eo;var s=e.getLineDash();n.lineDash=s?s.slice():Co;var a=e.getLineDashOffset();n.lineDashOffset=a||0;var l=e.getLineJoin();n.lineJoin=void 0!==l?l:To;var c=e.getWidth();n.lineWidth=void 0!==c?c:1;var u=e.getMiterLimit();n.miterLimit=void 0!==u?u:10,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[fu.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[fu.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||i!=t.currentLineDash&&!(0,Ds.fS)(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[fu.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Dn(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Rn(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(du);const mu=vu;var yu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const _u=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterMode_=void 0,o.declutterImageWithText_=void 0,o}return yu(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([fu.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([fu.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([fu.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([fu.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),r=t.getSize(),i=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=i[0],this.originY_=i[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e},e}(mu);var bu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wu=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return bu(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,r){var i=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),s=[fu.MOVE_TO_LINE_TO,i,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([fu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Co,0],hu);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(uu),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([fu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],hu);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,c=0,u=o.length;c<u;++c)l=this.drawFlatCoordinates_(s,l,o[c],a);this.hitDetectionInstructions.push(uu),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(uu),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(uu),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(hu)},e}(mu);const xu=wu;var Su=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Eu=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return Su(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,r){var i=this.state,o=void 0!==i.fillStyle,s=void 0!==i.strokeStyle,a=n.length;this.instructions.push(hu),this.hitDetectionInstructions.push(hu);for(var l=0;l<a;++l){var c=n[l],u=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,c,r,!0,!s),p=[fu.MOVE_TO_LINE_TO,u,h];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(pu),this.hitDetectionInstructions.push(pu)),e=c}return o&&(this.instructions.push(cu),this.hitDetectionInstructions.push(cu)),s&&(this.instructions.push(uu),this.hitDetectionInstructions.push(uu)),e},e.prototype.drawCircle=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([fu.SET_FILL_STYLE,So]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([fu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[fu.CIRCLE,a];this.instructions.push(hu,l),this.hitDetectionInstructions.push(hu,l),void 0!==n.fillStyle&&(this.instructions.push(cu),this.hitDetectionInstructions.push(cu)),void 0!==n.strokeStyle&&(this.instructions.push(uu),this.hitDetectionInstructions.push(uu)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([fu.SET_FILL_STYLE,So]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([fu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([fu.SET_FILL_STYLE,So]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([fu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,c=0,u=o.length;c<u;++c)l=this.drawFlatCoordinatess_(s,l,o[c],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var n=this.coordinates,r=0,i=n.length;r<i;++r)n[r]=ga(n[r],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(mu);const Cu=Eu,Tu="line";function Ou(t,e,n,r,i){var o,s,a,l,c,u,h,p,f,d=n,g=n,v=0,m=0,y=n;for(o=n;o<r;o+=i){var _=e[o],b=e[o+1];void 0!==l&&(p=_-l,f=b-c,a=Math.sqrt(p*p+f*f),void 0!==u&&(m+=s,Math.acos((u*p+h*f)/(s*a))>t&&(m>v&&(v=m,d=y,g=o),m=0,y=o-i)),s=a,u=p,h=f),l=_,c=b}return(m+=a)>v?[y,o]:[d,g]}var ku=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mu={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Pu=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return ku(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,r=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(n||r)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,c=t.getStride();if(i.placement!==Tu||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){var u=i.overflow?null:[];switch(a){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),c=2;break;case"Polygon":l=t.getFlatInteriorPoint(),i.overflow||u.push(l[2]/this.resolution),c=3;break;case"MultiPolygon":var h=t.getFlatInteriorPoints();l=[];for(x=0,S=h.length;x<S;x+=3)i.overflow||u.push(h[x+2]/this.resolution),l.push(h[x],h[x+1]);if(0===l.length)return;c=2}if((P=this.appendFlatPointCoordinates(l,c))===s)return;if(u&&(P-s)/2!=l.length/c){var p=s/2;u=u.filter((function(t,e){var n=o[2*(p+e)]===l[e*c]&&o[2*(p+e)+1]===l[e*c+1];return n||--p,n}))}this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var f=i.padding;if(f!=Po&&(i.scale[0]<0||i.scale[1]<0)){var d=i.padding[0],g=i.padding[1],v=i.padding[2],m=i.padding[3];i.scale[0]<0&&(g=-g,m=-m),i.scale[1]<0&&(d=-d,v=-v),f=[d,g,v,m]}var y=this.pixelRatio;this.instructions.push([fu.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==Po?Po:f.map((function(t){return t*y})),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);var _=1/y;this.hitDetectionInstructions.push([fu.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[_,_],NaN,void 0,this.declutterImageWithText_,f,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}else{if(!ar(this.getBufferedMaxExtent(),t.getExtent()))return;var b=void 0;if(l=t.getFlatCoordinates(),"LineString"==a)b=[l.length];else if("MultiLineString"==a)b=t.getEnds();else if("Polygon"==a)b=t.getEnds().slice(0,1);else if("MultiPolygon"==a){var w=t.getEndss();b=[];for(var x=0,S=w.length;x<S;++x)b.push(w[x][0])}this.beginGeometry(t,e);for(var E=i.textAlign,C=0,T=void 0,O=0,k=b.length;O<k;++O){if(null==E){var M=Ou(i.maxAngle,l,C,b[O],c);C=M[0],T=M[1]}else T=b[O];for(var x=C;x<T;x+=c)o.push(l[x],l[x+1]);var P=o.length;C=b[O],this.drawChars_(s,P),s=P}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var i=this.textKey_;i in this.textStates||(this.textStates[i]={font:e.font,textAlign:e.textAlign||ko,justify:e.justify,textBaseline:e.textBaseline||Mo,scale:e.scale});var o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,r=this.textState_,i=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=Mu[r.textBaseline],c=this.textOffsetY_*a,u=this.text_,h=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([fu.DRAW_CHARS,t,e,l,r.overflow,s,r.maxAngle,a,c,i,h*a,u,o,1]),this.hitDetectionInstructions.push([fu.DRAW_CHARS,t,e,l,r.overflow,s,r.maxAngle,1,c,i,h,u,o,1/a])},e.prototype.setTextStyle=function(t,e){var n,r,i;if(t){var o=t.getFill();o?((r=this.textFillState_)||(r={},this.textFillState_=r),r.fillStyle=Uc(o.getColor()||So)):(r=null,this.textFillState_=r);var s=t.getStroke();if(s){(i=this.textStrokeState_)||(i={},this.textStrokeState_=i);var a=s.getLineDash(),l=s.getLineDashOffset(),c=s.getWidth(),u=s.getMiterLimit();i.lineCap=s.getLineCap()||Eo,i.lineDash=a?a.slice():Co,i.lineDashOffset=void 0===l?0:l,i.lineJoin=s.getLineJoin()||To,i.lineWidth=void 0===c?1:c,i.miterLimit=void 0===u?10:u,i.strokeStyle=Uc(s.getColor()||Oo)}else i=null,this.textStrokeState_=i;n=this.textState_;var h=t.getFont()||xo;jo(h);var p=t.getScaleArray();n.overflow=t.getOverflow(),n.font=h,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Mo,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Po,n.scale=void 0===p?[1,1]:p;var f=t.getOffsetX(),d=t.getOffsetY(),g=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===d?0:d,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===v?0:v,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:(0,Mn.sq)(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+(0,Mn.sq)(r.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(mu);var Lu={Circle:Cu,Default:mu,Image:_u,LineString:xu,Polygon:Cu,Text:Pu};const Au=function(){function t(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var r in n){var i=n[r].finish();t[e][r]=i}}return t},t.prototype.getBuilder=function(t,e){var n=void 0!==t?t.toString():"0",r=this.buildersByZIndex_[n];void 0===r&&(r={},this.buildersByZIndex_[n]=r);var i=r[e];void 0===i&&(i=new(0,Lu[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=i);return i},t}();var Iu=n(2706),Ru=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Du=function(t){function e(e){var n=t.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return Ru(e,t),e.prototype.getFeatures=function(t){return(0,Mn.O3)()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return(0,Mn.O3)()},e.prototype.renderFrame=function(t,e){return(0,Mn.O3)()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(r,i){var o=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,i,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){},e.prototype.getDataAtPixel=function(t,e,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Gc&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Gc&&e!=Xc&&t.addEventListener(Vi.Z.CHANGE,this.boundHandleImageChange_),e==Bc&&(t.load(),e=t.getState()),e==Gc},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(Iu.Z);const ju=Du;var Fu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nu=[],Bu=null;var zu=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=[1,0,0,1,0,0],n.pixelTransform=[1,0,0,1,0,0],n.inversePixelTransform=[1,0,0,1,0,0],n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return Fu(e,t),e.prototype.getImageData=function(t,e,n){var r,i;Bu||((r=document.createElement("canvas")).width=1,r.height=1,Bu=r.getContext("2d")),Bu.clearRect(0,0,1,1);try{Bu.drawImage(t,e,n,1,1,0,0,1,1),i=Bu.getImageData(0,0,1,1).data}catch(t){return Bu=null,null}return i},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,n){var r,i,o=this.getLayer().getClassName();t&&t.className===o&&(!n||t&&t.style.backgroundColor&&(0,Ds.fS)(Mi(t.style.backgroundColor),Mi(n)))&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(i=a.getContext("2d")));if(i&&i.canvas.style.transform===e?(this.container=t,this.context=i,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=o;var s=r.style;s.position="absolute",s.width="100%",s.height="100%";var a=(i=(0,wo.E4)()).canvas;r.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=r,this.context=i}this.containerReused||!n||this.container.style.backgroundColor||(this.container.style.backgroundColor=n)},e.prototype.clipUnrotated=function(t,e,n){var r=ir(n),i=or(n),o=$n(n),s=Kn(n);bi(e.coordinateToPixelTransform,r),bi(e.coordinateToPixelTransform,i),bi(e.coordinateToPixelTransform,o),bi(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;bi(a,r),bi(a,i),bi(a,o),bi(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var r=this.getLayer();if(r.hasListener(t)){var i=new po(t,this.inversePixelTransform,n,e);r.dispatchEvent(i)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(Ki,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_($i,t,e)},e.prototype.getRenderTransform=function(t,e,n,r,i,o,s){var a=i/2,l=o/2,c=r/e,u=-c,h=-t[0]+s,p=-t[1];return wi(this.tempTransform,a,l,c,u,-n,h,p)},e.prototype.getDataAtPixel=function(t,e,n){var r=bi(this.inversePixelTransform,t.slice()),i=this.context,o=this.getLayer().getExtent();if(o&&!Fn(o,bi(e.pixelToCoordinateTransform,t.slice())))return null;var s,a=Math.round(r[0]),l=Math.round(r[1]),c=this.pixelContext_;if(!c){var u=document.createElement("canvas");u.width=1,u.height=1,c=u.getContext("2d"),this.pixelContext_=c}c.clearRect(0,0,1,1);try{c.drawImage(i.canvas,a,l,1,1,0,0,1,1),s=c.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):s}return 0===s[3]?null:s},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(ju);const Gu=zu;function Xu(t,e,n,r,i,o,s,a,l,c,u,h){var p=t[e],f=t[e+1],d=0,g=0,v=0,m=0;function y(){d=p,g=f,p=t[e+=r],f=t[e+1],m+=v,v=Math.sqrt((p-d)*(p-d)+(f-g)*(f-g))}do{y()}while(e<n-r&&m+v<o);for(var _=0===v?0:(o-m)/v,b=Qe(d,p,_),w=Qe(g,f,_),x=e-r,S=m,E=o+a*l(c,i,u);e<n-r&&m+v<E;)y();var C,T=Qe(d,p,_=0===v?0:(E-m)/v),O=Qe(g,f,_);if(h){var k=[b,w,T,O];Ks(k,0,4,2,h,k,k),C=k[0]>k[2]}else C=b>T;var M,P=Math.PI,L=[],A=x+r===e;if(v=0,m=S,p=t[e=x],f=t[e+1],A){y(),M=Math.atan2(f-g,p-d),C&&(M+=M>0?-P:P);var I=(T+b)/2,R=(O+w)/2;return L[0]=[I,R,(E-o)/2,M,i],L}for(var D=0,j=(i=i.replace(/\n/g," ")).length;D<j;){y();var F=Math.atan2(f-g,p-d);if(C&&(F+=F>0?-P:P),void 0!==M){var N=F-M;if(N+=N>P?-2*P:N<-P?2*P:0,Math.abs(N)>s)return null}M=F;for(var B=D,z=0;D<j;++D){var G=a*l(c,i[C?j-D-1:D],u);if(e+r<n&&m+v<o+z+G/2)break;z+=G}if(D!==B){var X=C?i.substring(j-B,j-D):i.substring(B,D);I=Qe(d,p,_=0===v?0:(o+z/2-m)/v),R=Qe(g,f,_);L.push([I,R,z/2,F,X]),o+=z}}return L}function Hu(t,e,n,r){for(var i=t[e],o=t[e+1],s=0,a=e+r;a<n;a+=r){var l=t[a],c=t[a+1];s+=Math.sqrt((l-i)*(l-i)+(c-o)*(c-o)),i=l,o=c}return s}var Uu=[1/0,1/0,-1/0,-1/0],Zu=[],qu=[],Wu=[],Yu=[];function Vu(t){return t[3].declutterBox}var Ku=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function $u(t,e){return"start"!==e&&"end"!==e||Ku.test(t)||(e="start"===e?"left":"right"),Mu[e]}function Ju(t,e,n){return n>0&&t.push("\n",""),t.push(e,""),t}var Qu=function(){function t(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,r){var i=t+e+n+r;if(this.labels_[i])return this.labels_[i];var o=r?this.strokeStates[r]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,c=[a.scale[0]*l,a.scale[1]*l],u=Array.isArray(t),h=a.justify?Mu[a.justify]:$u(Array.isArray(t)?t[0]:t,a.textAlign||ko),p=r&&o.lineWidth?o.lineWidth:0,f=u?t:t.split("\n").reduce(Ju,[]),d=function(t,e){for(var n=[],r=[],i=[],o=0,s=0,a=0,l=0,c=0,u=e.length;c<=u;c+=2){var h=e[c];if("\n"!==h&&c!==u){var p=e[c+1]||t.font,f=Bo(p,h);n.push(f),s+=f;var d=Fo(p);r.push(d),l=Math.max(l,d)}else o=Math.max(o,s),i.push(s),s=0,a+=l}return{width:o,height:a,widths:n,heights:r,lineWidths:i}}(a,f),g=d.width,v=d.height,m=d.widths,y=d.heights,_=d.lineWidths,b=g+p,w=[],x=(b+2)*c[0],S=(v+p)*c[1],E={width:x<0?Math.floor(x):Math.ceil(x),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:w};(1==c[0]&&1==c[1]||w.push("scale",c),r)&&(w.push("strokeStyle",o.strokeStyle),w.push("lineWidth",p),w.push("lineCap",o.lineCap),w.push("lineJoin",o.lineJoin),w.push("miterLimit",o.miterLimit),(yi.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(w.push("setLineDash",[o.lineDash]),w.push("lineDashOffset",o.lineDashOffset)));n&&w.push("fillStyle",s.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");for(var C,T=.5-h,O=h*b+T*p,k=[],M=[],P=0,L=0,A=0,I=0,R=0,D=f.length;R<D;R+=2){var j=f[R];if("\n"!==j){var F=f[R+1]||a.font;F!==C&&(r&&k.push("font",F),n&&M.push("font",F),C=F),P=Math.max(P,y[A]);var N=[j,O+T*m[A]+h*(m[A]-_[I]),.5*(p+P)+L];O+=m[A],r&&k.push("strokeText",N),n&&M.push("fillText",N),++A}else L+=P,P=0,O=h*b+T*p,++I}return Array.prototype.push.apply(w,k),Array.prototype.push.apply(w,M),this.labels_[i]=E,E},t.prototype.replayTextBackground_=function(t,e,n,r,i,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,r,i,o,s,a,l,c,u,h,p,f,d,g){var v,m=n-(s*=h[0]),y=r-(a*=h[1]),_=i+l>t?t-l:i,b=o+c>e?e-c:o,w=f[3]+_*h[0]+f[1],x=f[0]+b*h[1]+f[2],S=m-f[3],E=y-f[0];return(d||0!==u)&&(Zu[0]=S,Yu[0]=S,Zu[1]=E,qu[1]=E,qu[0]=S+w,Wu[0]=qu[0],Wu[1]=E+x,Yu[1]=Wu[1]),0!==u?(bi(v=wi([1,0,0,1,0,0],n,r,1,1,u,-n,-r),Zu),bi(v,qu),bi(v,Wu),bi(v,Yu),Xn(Math.min(Zu[0],qu[0],Wu[0],Yu[0]),Math.min(Zu[1],qu[1],Wu[1],Yu[1]),Math.max(Zu[0],qu[0],Wu[0],Yu[0]),Math.max(Zu[1],qu[1],Wu[1],Yu[1]),Uu)):Xn(Math.min(S,S+w),Math.min(E,E+x),Math.max(S,S+w),Math.max(E,E+x),Uu),p&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:_,drawImageH:b,originX:l,originY:c,declutterBox:{minX:Uu[0],minY:Uu[1],maxX:Uu[2],maxY:Uu[3],value:g},canvasTransform:v,scale:h}},t.prototype.replayImageOrLabel_=function(t,e,n,r,i,o,s){var a=!(!o&&!s),l=r.declutterBox,c=t.canvas,u=s?s[2]*r.scale[0]/2:0;return l.minX-u<=c.width/e&&l.maxX+u>=0&&l.minY-u<=c.height/e&&l.maxY+u>=0&&(a&&this.replayTextBackground_(t,Zu,qu,Wu,Yu,o,s),Go(t,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=bi(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,n,r){var i=this.textStates[e],o=this.createLabel(t,e,r,n),s=this.strokeStates[n],a=this.pixelRatio,l=$u(Array.isArray(t)?t[0]:t,i.textAlign||ko),c=Mu[i.textBaseline||Mo],u=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*i.scale[0])+2*(.5-l)*u,anchorY:c*o.height/a+2*(.5-c)*u}},t.prototype.execute_=function(t,e,n,r,i,o,s,a){var l,c,u;this.pixelCoordinates_&&(0,Ds.fS)(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Vs(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),c=this.renderedTransform_,u=n,c[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5]);for(var h,p,f,d,g,v,m,y,_,b,w,x,S,E,C,T,O=0,k=r.length,M=0,P=0,L=0,A=null,I=null,R=this.coordinateCache_,D=this.viewRotation_,j=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,F={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},N=this.instructions!=r||this.overlaps?0:200;O<k;){var B=r[O];switch(B[0]){case fu.BEGIN_GEOMETRY:S=B[1],T=B[3],S.getGeometry()?void 0===s||ar(s,T.getExtent())?++O:O=B[2]+1:O=B[2];break;case fu.BEGIN_PATH:P>N&&(this.fill_(t),P=0),L>N&&(t.stroke(),L=0),P||L||(t.beginPath(),d=NaN,g=NaN),++O;break;case fu.CIRCLE:var z=l[M=B[1]],G=l[M+1],X=l[M+2]-z,H=l[M+3]-G,U=Math.sqrt(X*X+H*H);t.moveTo(z+U,G),t.arc(z,G,U,0,2*Math.PI,!0),++O;break;case fu.CLOSE_PATH:t.closePath(),++O;break;case fu.CUSTOM:M=B[1],h=B[2];var Z=B[3],q=B[4],W=6==B.length?B[5]:void 0;F.geometry=Z,F.feature=S,O in R||(R[O]=[]);var Y=R[O];W?W(l,M,h,2,Y):(Y[0]=l[M],Y[1]=l[M+1],Y.length=2),q(Y,F),++O;break;case fu.DRAW_IMAGE:M=B[1],h=B[2],y=B[3],p=B[4],f=B[5];var V=B[6],K=B[7],$=B[8],J=B[9],Q=B[10],tt=B[11],et=B[12],nt=B[13],rt=B[14],it=B[15];if(!y&&B.length>=20){_=B[19],b=B[20],w=B[21],x=B[22];var ot=this.drawLabelWithPointPlacement_(_,b,w,x);y=ot.label,B[3]=y;var st=B[23];p=(ot.anchorX-st)*this.pixelRatio,B[4]=p;var at=B[24];f=(ot.anchorY-at)*this.pixelRatio,B[5]=f,V=y.height,B[6]=V,nt=y.width,B[13]=nt}var lt=void 0;B.length>25&&(lt=B[25]);var ct=void 0,ut=void 0,ht=void 0;B.length>17?(ct=B[16],ut=B[17],ht=B[18]):(ct=Po,ut=!1,ht=!1),Q&&j?tt+=D:Q||j||(tt-=D);for(var pt=0;M<h;M+=2)if(!(lt&&lt[pt++]<nt/this.pixelRatio)){var ft=[t,e,y,zt=this.calculateImageOrLabelDimensions_(y.width,y.height,l[M],l[M+1],nt,V,p,f,$,J,tt,et,i,ct,ut||ht,S),K,ut?A:null,ht?I:null];if(a){if("none"===rt)continue;if("obstacle"===rt){a.insert(zt.declutterBox);continue}var dt=void 0,gt=void 0;if(it){var vt=h-M;if(!it[vt]){it[vt]=ft;continue}if(dt=it[vt],delete it[vt],gt=Vu(dt),a.collides(gt))continue}if(a.collides(zt.declutterBox))continue;dt&&(a.insert(gt),this.replayImageOrLabel_.apply(this,dt)),a.insert(zt.declutterBox)}this.replayImageOrLabel_.apply(this,ft)}++O;break;case fu.DRAW_CHARS:var mt=B[1],yt=B[2],_t=B[3],bt=B[4];x=B[5];var wt=B[6],xt=B[7],St=B[8];w=B[9];var Et=B[10];_=B[11],b=B[12];var Ct=[B[13],B[13]],Tt=this.textStates[b],Ot=Tt.font,kt=[Tt.scale[0]*xt,Tt.scale[1]*xt],Mt=void 0;Ot in this.widths_?Mt=this.widths_[Ot]:(Mt={},this.widths_[Ot]=Mt);var Pt=Hu(l,mt,yt,2),Lt=Math.abs(kt[0])*zo(Ot,_,Mt);if(bt||Lt<=Pt){var At=this.textStates[b].textAlign,It=Xu(l,mt,yt,2,_,(Pt-Lt)*Mu[At],wt,Math.abs(kt[0]),zo,Ot,Mt,j?0:this.viewRotation_);t:if(It){var Rt=[],Dt=void 0,jt=void 0,Ft=void 0,Nt=void 0,Bt=void 0;if(w)for(Dt=0,jt=It.length;Dt<jt;++Dt){Ft=(Bt=It[Dt])[4],Nt=this.createLabel(Ft,b,"",w),p=Bt[2]+(kt[0]<0?-Et:Et),f=_t*Nt.height+2*(.5-_t)*Et*kt[1]/kt[0]-St;var zt=this.calculateImageOrLabelDimensions_(Nt.width,Nt.height,Bt[0],Bt[1],Nt.width,Nt.height,p,f,0,0,Bt[3],Ct,!1,Po,!1,S);if(a&&a.collides(zt.declutterBox))break t;Rt.push([t,e,Nt,zt,1,null,null])}if(x)for(Dt=0,jt=It.length;Dt<jt;++Dt){Ft=(Bt=It[Dt])[4],Nt=this.createLabel(Ft,b,x,""),p=Bt[2],f=_t*Nt.height-St;zt=this.calculateImageOrLabelDimensions_(Nt.width,Nt.height,Bt[0],Bt[1],Nt.width,Nt.height,p,f,0,0,Bt[3],Ct,!1,Po,!1,S);if(a&&a.collides(zt.declutterBox))break t;Rt.push([t,e,Nt,zt,1,null,null])}a&&a.load(Rt.map(Vu));for(var Gt=0,Xt=Rt.length;Gt<Xt;++Gt)this.replayImageOrLabel_.apply(this,Rt[Gt])}}++O;break;case fu.END_GEOMETRY:if(void 0!==o){var Ht=o(S=B[1],T);if(Ht)return Ht}++O;break;case fu.FILL:N?P++:this.fill_(t),++O;break;case fu.MOVE_TO_LINE_TO:for(M=B[1],h=B[2],E=l[M],m=(C=l[M+1])+.5|0,(v=E+.5|0)===d&&m===g||(t.moveTo(E,C),d=v,g=m),M+=2;M<h;M+=2)v=(E=l[M])+.5|0,m=(C=l[M+1])+.5|0,M!=h-2&&v===d&&m===g||(t.lineTo(E,C),d=v,g=m);++O;break;case fu.SET_FILL_STYLE:A=B,this.alignFill_=B[2],P&&(this.fill_(t),P=0,L&&(t.stroke(),L=0)),t.fillStyle=B[1],++O;break;case fu.SET_STROKE_STYLE:I=B,L&&(t.stroke(),L=0),this.setStrokeStyle_(t,B),++O;break;case fu.STROKE:N?L++:t.stroke(),++O;break;default:++O}}P&&this.fill_(t),L&&t.stroke()},t.prototype.execute=function(t,e,n,r,i,o){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,i,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,n,r,i){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,i)},t}();const th=Qu;var eh=["Polygon","Circle","LineString","Image","Text","Default"],nh=function(){function t(t,e,n,r,i,o){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(i)}return t.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];void 0===n&&(n={},this.executorsByZIndex_[e]=n);var r=t[e];for(var i in r){var o=r[i];n[i]=new th(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],r=0,i=t.length;r<i;++r)if(t[r]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i,o){var s=2*(r=Math.round(r))+1,a=wi(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=(0,wo.E4)(s,s));var c,u=this.hitDetectionContext_;u.canvas.width!==s||u.canvas.height!==s?(u.canvas.width=s,u.canvas.height=s):l||u.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(Zn(c=[1/0,1/0,-1/0,-1/0],t),Rn(c,e*(this.renderBuffer_+r),c));var h,p=function(t){if(void 0!==rh[t])return rh[t];for(var e=2*t+1,n=t*t,r=new Array(n+1),i=0;i<=t;++i)for(var o=0;o<=t;++o){var s=i*i+o*o;if(s>n)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+i)*e+(t+o))+3),i>0&&a.push(4*((t-i)*e+(t+o))+3),o>0&&(a.push(4*((t+i)*e+(t-o))+3),i>0&&a.push(4*((t-i)*e+(t-o))+3))}for(var l=[],c=(i=0,r.length);i<c;++i)r[i]&&l.push.apply(l,r[i]);return rh[t]=l,l}(r);function f(t,e){for(var n=u.getImageData(0,0,s,s).data,a=0,l=p.length;a<l;a++)if(n[p[a]]>0){if(!o||"Image"!==h&&"Text"!==h||-1!==o.indexOf(t)){var c=(p[a]-3)/4,f=r-c%s,d=r-(c/s|0),g=i(t,e,f*f+d*d);if(g)return g}u.clearRect(0,0,s,s);break}}var d,g,v,m,y,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(Ds.kK),d=_.length-1;d>=0;--d){var b=_[d].toString();for(v=this.executorsByZIndex_[b],g=eh.length-1;g>=0;--g)if(void 0!==(m=v[h=eh[g]])&&(y=m.executeHitDetection(u,a,n,f,c)))return y}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],r=e[1],i=e[2],o=e[3],s=[n,r,n,o,i,o,i,r];return Vs(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return(0,qi.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,r,i,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(Ds.kK),this.maxExtent_&&(t.save(),this.clip(t,n));var l,c,u,h,p,f,d=o||eh;for(s&&a.reverse(),l=0,c=a.length;l<c;++l){var g=a[l].toString();for(p=this.executorsByZIndex_[g],u=0,h=d.length;u<h;++u){void 0!==(f=p[d[u]])&&f.execute(t,e,n,r,i,s)}}this.maxExtent_&&t.restore()},t}(),rh={};const ih=nh;var oh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sh=function(t){function e(e,n,r,i,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=n,l.extent_=r,l.transform_=i,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return oh(e,t),e.prototype.drawImages_=function(t,e,n,r){if(this.image_){var i=Vs(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var c=0,u=i.length;c<u;c+=2){var h=i[c]-this.imageAnchorX_,p=i[c+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var f=h+this.imageAnchorX_,d=p+this.imageAnchorY_;wi(s,f,d,1,1,l,-f,-d),o.setTransform.apply(o,s),o.translate(f,d),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,h,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,n,r){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var i=Vs(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<n;e+=r){var a=i[e]+this.textOffsetX_,l=i[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=wi(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,c),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,n,r,i){var o=this.context_,s=Vs(t,e,n,r,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;i&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return i&&o.closePath(),n},e.prototype.drawRings_=function(t,e,n,r){for(var i=0,o=n.length;i<o;++i)e=this.moveToLineTo_(t,e,n[i],r,!0);return e},e.prototype.drawCircle=function(t){if(ar(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,n){var r=t.getFlatCoordinates();if(r){var i=t.getStride();return Vs(r,0,r.length,i,e,n)}return null}(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],i=Math.sqrt(n*n+r*r),o=this.context_;o.beginPath(),o.arc(e[0],e[1],i,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&ar(this.extent_,n.getExtent())&&(this.setStyle(e),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ar(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var r=t.getFlatMidpoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(ar(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,r=t.getFlatCoordinates(),i=0,o=t.getEnds(),s=t.getStride();n.beginPath();for(var a=0,l=o.length;a<l;++a)i=this.moveToLineTo_(r,i,o[a],s,!1);n.stroke()}if(""!==this.text_){var c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ar(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ar(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getOrientedFlatCoordinates(),r=0,i=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=i.length;s<a;++s){var l=i[s];r=this.drawRings_(n,r,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var c=t.getFlatInteriorPoints();this.drawText_(c,0,c.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,Ds.fS)(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:ko;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var n=this;if(t){var r=t.getColor();this.fillState_={fillStyle:Uc(r||So)}}else this.fillState_=null;if(e){var i=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),c=e.getWidth(),u=e.getMiterLimit(),h=s||Co;this.strokeState_={lineCap:void 0!==o?o:Eo,lineDash:1===this.pixelRatio_?h:h.map((function(t){return t*n.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:To,lineWidth:(void 0!==c?c:1)*this.pixelRatio_,miterLimit:void 0!==u?u:10,strokeStyle:Uc(i||Oo)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var n=e.getColor();this.textFillState_={fillStyle:Uc(n||So)}}else this.textFillState_=null;var r=t.getStroke();if(r){var i=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),a=r.getLineDashOffset(),l=r.getLineJoin(),c=r.getWidth(),u=r.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:Eo,lineDash:s||Co,lineDashOffset:a||0,lineJoin:void 0!==l?l:To,lineWidth:void 0!==c?c:1,miterLimit:void 0!==u?u:10,strokeStyle:Uc(i||Oo)}}else this.textStrokeState_=null;var h=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),v=t.getScaleArray(),m=t.getText(),y=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:void 0!==h?h:xo,textAlign:void 0!==y?y:ko,textBaseline:void 0!==_?_:Mo},this.text_=void 0!==m?Array.isArray(m)?m.reduce((function(t,e,n){return t+(n%2?" ":e)}),""):m:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*v[0],this.pixelRatio_*v[1]]}else this.text_=""},e}(du);const ah=sh,lh="fraction",ch="pixels",uh="bottom-left",hh="bottom-right",ph="top-left",fh="top-right";var dh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const gh=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=r,o.resolution=n,o.state=i,o}return dh(e,t),e.prototype.changed=function(){this.dispatchEvent(Vi.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,Mn.O3)()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){(0,Mn.O3)()},e}(st.Z);var vh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,r,Bc)||this;return a.src_=i,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=Bc,a.imageLoadFunction_=s,a}vh(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Xc,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=nr(this.extent)/this.image_.height),this.state=Gc,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Bc&&this.state!=Xc||(this.state=zc,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=mh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=nr(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(gh);function mh(t,e,n){var r=t,i=!0,o=!1,s=!1,a=[(0,eo.Vx)(r,Vi.Z.LOAD,(function(){s=!0,o||e()}))];return r.src&&yi.Tp?(o=!0,r.decode().then((function(){i&&e()})).catch((function(t){i&&(s?e():n())}))):a.push((0,eo.Vx)(r,Vi.Z.ERROR,n)),function(){i=!1,a.forEach(eo.bN)}}var yh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_h=null,bh=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==i&&(a.image_.crossOrigin=i),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=r,a.src_=n,a.tainted_,a}return yh(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Gc){_h||(_h=(0,wo.E4)(1,1)),_h.drawImage(this.image_,0,0);try{_h.getImageData(0,0,1,1),this.tainted_=!1}catch(t){_h=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(Vi.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=Xc,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Gc,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=(0,wo.E4)(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==Bc){this.imageState_=zc;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=mh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===Gc){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=Ti(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var r=n.getImageData(0,0,e.width,e.height),i=r.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],c=0,u=i.length;c<u;c+=4)i[c]*=o,i[c+1]*=s,i[c+2]*=a,i[c+3]*=l;n.putImageData(r,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(st.Z);var wh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xh=function(t){function e(e){var n=this,r=e||{},i=void 0!==r.opacity?r.opacity:1,o=void 0!==r.rotation?r.rotation:0,s=void 0!==r.scale?r.scale:1,a=void 0!==r.rotateWithView&&r.rotateWithView;(n=t.call(this,{opacity:i,rotation:o,scale:s,displacement:void 0!==r.displacement?r.displacement:[0,0],rotateWithView:a,declutterMode:r.declutterMode})||this).anchor_=void 0!==r.anchor?r.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==r.anchorOrigin?r.anchorOrigin:ph,n.anchorXUnits_=void 0!==r.anchorXUnits?r.anchorXUnits:lh,n.anchorYUnits_=void 0!==r.anchorYUnits?r.anchorYUnits:lh,n.crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null;var l=void 0!==r.img?r.img:null;n.imgSize_=r.imgSize;var c=r.src;An(!(void 0!==c&&l),4),An(!l||l&&n.imgSize_,5),void 0!==c&&0!==c.length||!l||(c=l.src||(0,Mn.sq)(l)),An(void 0!==c&&c.length>0,6);var u=void 0!==r.src?Bc:Gc;return n.color_=void 0!==r.color?Mi(r.color):null,n.iconImage_=function(t,e,n,r,i,o){var s=Ri.get(e,r,o);return s||(s=new bh(t,e,n,r,i,o),Ri.set(e,r,o,s)),s}(l,c,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,u,n.color_),n.offset_=void 0!==r.offset?r.offset:[0,0],n.offsetOrigin_=void 0!==r.offsetOrigin?r.offsetOrigin:ph,n.origin_=null,n.size_=void 0!==r.size?r.size:null,n}return wh(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==lh||this.anchorYUnits_==lh){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==lh&&(t[0]*=e[0]),this.anchorYUnits_==lh&&(t[1]*=e[1])}if(this.anchorOrigin_!=ph){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=fh&&this.anchorOrigin_!=hh||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=uh&&this.anchorOrigin_!=hh||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=ph){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=fh&&this.offsetOrigin_!=hh||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=uh&&this.offsetOrigin_!=hh||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(Vi.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(Vi.Z.CHANGE,t)},e}(Hc);const Sh=xh;var Eh=.5;var Ch={Point:function(t,e,n,r,i){var o,s=n.getImage(),a=n.getText();if(s){if(s.getImageState()!=Gc)return;var l=t;if(i){var c=s.getDeclutterMode();if("none"!==c)if(l=i,"obstacle"===c){var u=t.getBuilder(n.getZIndex(),"Image");u.setImageStyle(s,o),u.drawPoint(e,r)}else a&&a.getText()&&(o={})}var h=l.getBuilder(n.getZIndex(),"Image");h.setImageStyle(s,o),h.drawPoint(e,r)}if(a&&a.getText()){var p=t;i&&(p=i);var f=p.getBuilder(n.getZIndex(),"Text");f.setTextStyle(a,o),f.drawText(e,r)}},LineString:function(t,e,n,r,i){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(e,r)}var a=n.getText();if(a&&a.getText()){var l=(i||t).getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r)}},Polygon:function(t,e,n,r,i){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawPolygon(e,r)}var l=n.getText();if(l&&l.getText()){var c=(i||t).getBuilder(n.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,r)}},MultiPoint:function(t,e,n,r,i){var o,s=n.getImage(),a=n.getText();if(s){if(s.getImageState()!=Gc)return;var l=t;if(i){var c=s.getDeclutterMode();if("none"!==c)if(l=i,"obstacle"===c){var u=t.getBuilder(n.getZIndex(),"Image");u.setImageStyle(s,o),u.drawMultiPoint(e,r)}else a&&a.getText()&&(o={})}var h=l.getBuilder(n.getZIndex(),"Image");h.setImageStyle(s,o),h.drawMultiPoint(e,r)}if(a&&a.getText()){var p=t;i&&(p=i);var f=p.getBuilder(n.getZIndex(),"Text");f.setTextStyle(a,o),f.drawText(e,r)}},MultiLineString:function(t,e,n,r,i){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,r)}var a=n.getText();if(a&&a.getText()){var l=(i||t).getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r)}},MultiPolygon:function(t,e,n,r,i){var o=n.getFill(),s=n.getStroke();if(s||o){var a=t.getBuilder(n.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,r)}var l=n.getText();if(l&&l.getText()){var c=(i||t).getBuilder(n.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,r)}},GeometryCollection:function(t,e,n,r,i){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o){(0,Ch[a[o].getType()])(t,a[o],n,r,i)}},Circle:function(t,e,n,r,i){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),"Circle");a.setFillStrokeStyle(o,s),a.drawCircle(e,r)}var l=n.getText();if(l&&l.getText()){var c=(i||t).getBuilder(n.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,r)}}};function Th(t,e){return parseInt((0,Mn.sq)(t),10)-parseInt((0,Mn.sq)(e),10)}function Oh(t,e){return.5*t/e}function kh(t,e,n,r,i,o,s){var a=!1,l=n.getImage();if(l){var c=l.getImageState();c==Gc||c==Xc?l.unlistenImageChange(i):(c==Bc&&l.load(),l.listenImageChange(i),a=!0)}return function(t,e,n,r,i,o){var s=n.getGeometryFunction()(e);if(!s)return;var a=s.simplifyTransformed(r,i);if(n.getRenderer())Mh(t,a,n,e);else{(0,Ch[a.getType()])(t,a,n,e,o)}}(t,e,n,r,o,s),a}function Mh(t,e,n,r){if("GeometryCollection"!=e.getType())t.getBuilder(n.getZIndex(),"Default").drawCustom(e,r,n.getRenderer(),n.getHitDetectionRenderer());else for(var i=e.getGeometries(),o=0,s=i.length;o<s;++o)Mh(t,i[o],n,r)}var Ph=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lh=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=[1/0,1/0,-1/0,-1/0],n.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n.compositionContext_=null,n.opacity_=1,n}return Ph(e,t),e.prototype.renderWorlds=function(t,e,n){var r=e.extent,i=e.viewState,o=i.center,s=i.resolution,a=i.projection,l=i.rotation,c=a.getExtent(),u=this.getLayer().getSource(),h=e.pixelRatio,p=e.viewHints,f=!(p[Ms]||p[Ps]),d=this.compositionContext_,g=Math.round(e.size[0]*h),v=Math.round(e.size[1]*h),m=u.getWrapX()&&a.canWrapX(),y=m?sr(c):null,_=m?Math.ceil((r[2]-c[2])/y)+1:1,b=m?Math.floor((r[0]-c[0])/y):0;do{var w=this.getRenderTransform(o,s,l,h,g,v,b*y);t.execute(d,1,w,l,f,void 0,n)}while(++b<_)},e.prototype.setupCompositionContext_=function(){if(1!==this.opacity_){var t=(0,wo.E4)(this.context.canvas.width,this.context.canvas.height,Nu);this.compositionContext_=t}else this.compositionContext_=this.context},e.prototype.releaseCompositionContext_=function(){if(1!==this.opacity_){var t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,(0,wo.jy)(this.compositionContext_),Nu.push(this.compositionContext_.canvas),this.compositionContext_=null}},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())},e.prototype.renderFrame=function(t,e){var n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];!function(t,e,n){_i(t,e,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),xi(this.inversePixelTransform,this.pixelTransform);var i=Si(this.pixelTransform);this.useContainer(e,i,this.getBackground(t));var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;var c=Math.round(t.size[0]*n),u=Math.round(t.size[1]*n);s.width!=c||s.height!=u?(s.width=c,s.height=u,s.style.transform!==i&&(s.style.transform=i)):this.containerReused||o.clearRect(0,0,c,u),this.preRender(o,t);var h=t.viewState,p=h.projection;this.opacity_=r.opacity,this.setupCompositionContext_();var f=!1,d=!0;if(r.extent&&this.clipping){var g=Xr(r.extent,p);(f=(d=ar(g,t.extent))&&!Nn(g,t.extent))&&this.clipUnrotated(this.compositionContext_,t,g)}return d&&this.renderWorlds(a,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==h.rotation&&(this.renderedRotation_=h.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];bi(this.pixelTransform,n);var r=this.renderedCenter_,i=this.renderedResolution_,o=this.renderedRotation_,s=this.renderedProjection_,a=this.wrappedRenderedExtent_,l=this.getLayer(),c=[],u=n[0]*Eh,h=n[1]*Eh;c.push(this.getRenderTransform(r,i,o,Eh,u,h,0).slice());var p=l.getSource(),f=s.getExtent();if(p.getWrapX()&&s.canWrapX()&&!Nn(f,a)){for(var d=a[0],g=sr(f),v=0,m=void 0;d<f[0];)m=g*--v,c.push(this.getRenderTransform(r,i,o,Eh,u,h,m).slice()),d+=g;for(v=0,d=a[2];d>f[2];)m=g*++v,c.push(this.getRenderTransform(r,i,o,Eh,u,h,m).slice()),d-=g}this.hitDetectionImageData_=function(t,e,n,r,i,o,s){var a=t[0]*Eh,l=t[1]*Eh,c=(0,wo.E4)(a,l);c.imageSmoothingEnabled=!1;for(var u=c.canvas,h=new ah(c,Eh,i,null,s),p=n.length,f=Math.floor(16777215/p),d={},g=1;g<=p;++g){var v=n[g-1],m=v.getStyleFunction()||r;if(r){var y=m(v,o);if(y){Array.isArray(y)||(y=[y]);for(var _="#"+("000000"+(g*f).toString(16)).slice(-6),b=0,w=y.length;b<w;++b){var x=y[b],S=x.getGeometryFunction()(v);if(S&&ar(i,S.getExtent())){var E=x.clone(),C=E.getFill();C&&C.setColor(_);var T=E.getStroke();T&&(T.setColor(_),T.setLineDash(null)),E.setText(void 0);var O=x.getImage();if(O&&0!==O.getOpacity()){var k=O.getImageSize();if(!k)continue;var M=(0,wo.E4)(k[0],k[1],void 0,{alpha:!1}),P=M.canvas;M.fillStyle=_,M.fillRect(0,0,P.width,P.height),E.setImage(new Sh({img:P,imgSize:k,anchor:O.getAnchor(),anchorXUnits:ch,anchorYUnits:ch,offset:O.getOrigin(),opacity:1,size:O.getSize(),scale:O.getScale(),rotation:O.getRotation(),rotateWithView:O.getRotateWithView()}))}var L=E.getZIndex()||0;(R=d[L])||(R={},d[L]=R,R.Polygon=[],R.Circle=[],R.LineString=[],R.Point=[]),R[S.getType().replace("Multi","")].push(S,E)}}}}}for(var A=Object.keys(d).map(Number).sort(Ds.kK),I=(g=0,A.length);g<I;++g){var R=d[A[g]];for(var D in R){var j=R[D];for(b=0,w=j.length;b<w;b+=2){h.setStyle(j[b+1]);for(var F=0,N=e.length;F<N;++F)h.setTransform(e[F]),h.drawGeometry(j[b])}}}return c.getImageData(0,0,u.width,u.height)}(n,c,this.renderedFeatures_,l.getStyleFunction(),a,i,o)}e(function(t,e,n){var r=[];if(n){var i=Math.floor(Math.round(t[0])*Eh),o=Math.floor(Math.round(t[1])*Eh),s=4*(Ze(i,0,n.width-1)+Ze(o,0,n.height-1)*n.width),a=n.data[s],l=n.data[s+1],c=n.data[s+2]+256*(l+256*a),u=Math.floor(16777215/e.length);c&&c%u==0&&r.push(e[c/u-1])}return r}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,l=e.viewState.rotation,c=this.getLayer(),u={},h=function(t,e,n){var o=(0,Mn.sq)(t),s=u[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return u[o]=!0,i.splice(i.lastIndexOf(s),1),r(t,c,e);s.geometry=e,s.distanceSq=n}}else{if(0===n)return u[o]=!0,r(t,c,e);i.push(u[o]={feature:t,layer:c,geometry:e,distanceSq:n,callback:r})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some((function(r){return s=r.forEachFeatureAtCoordinate(t,a,l,n,h,r===o.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var r=t.viewHints[Ms],i=t.viewHints[Ps],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(this.ready&&!o&&r||!s&&i)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,c=l.projection,u=l.resolution,h=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=Th);var g=l.center.slice(),v=Rn(a,f*u),m=v.slice(),y=[v.slice()],_=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!Nn(_,t.extent)){var b=sr(_),w=Math.max(sr(v)/2,b);v[0]=_[0]-w,v[2]=_[2]+w,fr(g,c);var x=ur(y[0],c);x[0]<_[0]&&x[2]<_[2]?y.push([x[0]+b,x[1],x[2]+b,x[3]]):x[0]>_[0]&&x[2]>_[2]&&y.push([x[0]-b,x[1],x[2]-b,x[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&Nn(this.wrappedRenderedExtent_,v))return(0,Ds.fS)(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var S,E=new Au(Oh(u,h),v,u,h);this.getLayer().getDeclutter()&&(S=new Au(Oh(u,h),v,u,h));var C,T=Nr();if(T){for(var O=0,k=y.length;O<k;++O){var M=Gr(y[O],c);n.loadFeatures(M,Hr(u,c),T)}C=Pr(T,c)}else for(O=0,k=y.length;O<k;++O)n.loadFeatures(y[O],u,c);var P=function(t,e){var n=Oh(t,e);return n*n}(u,h),L=!0,A=function(t){var n,r=t.getStyleFunction()||e.getStyleFunction();if(r&&(n=r(t,u)),n){var i=this.renderFeature(t,P,n,E,C,S);L=L&&!i}}.bind(this),I=Gr(v,c),R=n.getFeaturesInExtent(I);d&&R.sort(d);for(O=0,k=R.length;O<k;++O)A(R[O]);this.renderedFeatures_=R,this.ready=L;var D=E.finish(),j=new ih(v,u,h,n.getOverlaps(),D,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new ih(v,u,h,n.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=m,this.wrappedRenderedExtent_=v,this.renderedCenter_=g,this.renderedProjection_=c,this.replayGroup_=j,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,n,r,i,o){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var a=0,l=n.length;a<l;++a)s=kh(r,t,n[a],e,this.boundHandleStyleImageChange_,i,o)||s;else s=kh(r,t,n,e,this.boundHandleStyleImageChange_,i,o);return s},e}(Gu);const Ah=Lh;var Ih=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Rh=function(t){function e(e){return t.call(this,e)||this}return Ih(e,t),e.prototype.createRenderer=function(){return new Ah(this)},e}(au),Dh="preload",jh="useInterimTilesOnError";var Fh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Nh=function(t){function e(e){var n=this,r=e||{},i=(0,qi.f0)({},r);return delete i.preload,delete i.useInterimTilesOnError,(n=t.call(this,i)||this).on,n.once,n.un,n.setPreload(void 0!==r.preload?r.preload:0),n.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),n}return Fh(e,t),e.prototype.getPreload=function(){return this.get(Dh)},e.prototype.setPreload=function(t){this.set(Dh,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(jh)},e.prototype.setUseInterimTilesOnError=function(t){this.set(jh,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(oo);var Bh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zh=function(t){function e(e,n,r){var i=t.call(this)||this,o=r||{};return i.tileCoord=e,i.state=n,i.interimTile=null,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i.interpolate=!!o.interpolate,i}return Bh(e,t),e.prototype.changed=function(){this.dispatchEvent(Vi.Z.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==Ss)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==Ss){t.interimTile=null;break}t.getState()==xs?e=t:t.getState()==ws?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==Es&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,Mn.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var r=e-n+1e3/60;return r>=this.transition_?1:Gs(r/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(st.Z);const Gh=zh;var Xh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Hh=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=i,a.src_=r,a.key=r,a.image_=new Image,null!==i&&(a.image_.crossOrigin=i),a.unlisten_=null,a.tileLoadFunction_=o,a}return Xh(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=Ss,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=Es,this.unlistenImage_(),this.image_=((t=(0,wo.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=Ss:this.state=Cs,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Es&&(this.state=ws,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ws&&(this.state=xs,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=mh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Gh);var Uh=function(){function t(t,e,n,r,i,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=Lr(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&sr(r)==sr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?sr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?sr(this.targetProj_.getExtent()):null;var l=ir(n),c=or(n),u=$n(n),h=Kn(n),p=this.transformInv_(l),f=this.transformInv_(c),d=this.transformInv_(u),g=this.transformInv_(h),v=10+(o?Math.max(0,Math.ceil(We(Vn(n)/(o*o*256*256)))):0);if(this.addQuad_(l,c,u,h,p,f,d,g,v),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,n){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,n,r,i,o){this.triangles_.push({source:[r,i,o],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,r,i,o,s,a,l){var c=In([i,o,s,a]),u=this.sourceWorldWidth_?sr(c)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=sr(In([t,e,n,r]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||ar(c,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(l>0){if(!f){var g=[(t[0]+n[0])/2,(t[1]+n[1])/2],v=this.transformInv_(g),m=void 0;if(p)m=(Je(i[0],h)+Je(s[0],h))/2-Je(v[0],h);else m=(i[0]+s[0])/2-v[0];var y=(i[1]+s[1])/2-v[1];f=m*m+y*y>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var _=[(e[0]+n[0])/2,(e[1]+n[1])/2],b=this.transformInv_(_),w=[(r[0]+t[0])/2,(r[1]+t[1])/2],x=this.transformInv_(w);this.addQuad_(t,e,_,w,i,o,b,x,l-1),this.addQuad_(w,_,n,r,x,b,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(S),C=[(n[0]+r[0])/2,(n[1]+r[1])/2],T=this.transformInv_(C);this.addQuad_(t,S,C,r,i,E,T,a,l-1),this.addQuad_(S,e,n,C,E,o,s,T,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,n,r,i,s,a),0==(14&d)&&this.addTriangle_(t,n,e,i,s,o),d&&(0==(13&d)&&this.addTriangle_(e,r,t,o,a,i),0==(7&d)&&this.addTriangle_(e,r,n,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,n,r){var i=e.source;Zn(t,i[0]),Zn(t,i[1]),Zn(t,i[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();const Zh=Uh;var qh,Wh={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Yh={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},Vh=[];function Kh(t,e,n,r,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(r,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,r)+1,Math.max(n,i)),t.restore()}function $h(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Jh(t,e,n,r){var i=Ar(n,e,t),o=Sr(e,r,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||Fn(l,i)){var c=Sr(t,o,i)/o;isFinite(c)&&c>0&&(o/=c)}return o}function Qh(t,e,n,r,i,o,s,a,l,c,u,h){var p=(0,wo.E4)(Math.round(n*t),Math.round(n*e),Vh);if(h||(0,qi.f0)(p,Wh),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,n){var r,i;r=d,(i=t.extent)[0]<r[0]&&(r[0]=i[0]),i[2]>r[2]&&(r[2]=i[2]),i[1]<r[1]&&(r[1]=i[1]),i[3]>r[3]&&(r[3]=i[3])}));var g=sr(d),v=nr(d),m=(0,wo.E4)(Math.round(n*g/r),Math.round(n*v/r));h||(0,qi.f0)(m,Wh);var y=n/r;l.forEach((function(t,e,n){var r=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=sr(t.extent),s=nr(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,r*y,i*y,o*y,s*y)}));var _=ir(s);return a.getTriangles().forEach((function(t,e,i){var s=t.source,a=t.target,l=s[0][0],c=s[0][1],u=s[1][0],g=s[1][1],v=s[2][0],y=s[2][1],b=f((a[0][0]-_[0])/o),w=f(-(a[0][1]-_[1])/o),x=f((a[1][0]-_[0])/o),S=f(-(a[1][1]-_[1])/o),E=f((a[2][0]-_[0])/o),C=f(-(a[2][1]-_[1])/o),T=l,O=c;l=0,c=0;var k=function(t){for(var e=t.length,n=0;n<e;n++){for(var r=n,i=Math.abs(t[n][n]),o=n+1;o<e;o++){var s=Math.abs(t[o][n]);s>i&&(i=s,r=o)}if(0===i)return null;var a=t[r];t[r]=t[n],t[n]=a;for(var l=n+1;l<e;l++)for(var c=-t[l][n]/t[n][n],u=n;u<e+1;u++)n==u?t[l][u]=0:t[l][u]+=c*t[n][u]}for(var h=new Array(e),p=e-1;p>=0;p--){h[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*h[p]}return h}([[u-=T,g-=O,0,0,x-b],[v-=T,y-=O,0,0,E-b],[0,0,u,g,S-w],[0,0,v,y,C-w]]);if(k){if(p.save(),p.beginPath(),function(){if(void 0===qh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Kh(t,4,5,4,0),Kh(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;qh=$h(e,0)||$h(e,4)||$h(e,8)}return qh}()||!h){p.moveTo(x,S);for(var M=b-x,P=w-S,L=0;L<4;L++)p.lineTo(x+f((L+1)*M/4),S+f(L*P/3)),3!=L&&p.lineTo(x+f((L+1)*M/4),S+f((L+1)*P/3));p.lineTo(E,C)}else p.moveTo(x,S),p.lineTo(b,w),p.lineTo(E,C);p.clip(),p.transform(k[0],k[2],k[1],k[3],b,w),p.translate(d[0]-T,d[3]-O),p.scale(r/n,-r/n),p.drawImage(m.canvas,0,0),p.restore()}})),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var r=t.target,i=(r[0][0]-_[0])/o,s=-(r[0][1]-_[1])/o,a=(r[1][0]-_[0])/o,l=-(r[1][1]-_[1])/o,c=(r[2][0]-_[0])/o,u=-(r[2][1]-_[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(i,s),p.lineTo(c,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}var tp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ep=function(t){function e(e,n,r,i,o,s,a,l,c,u,h,p){var f=t.call(this,o,ws,{interpolate:!!p})||this;f.renderEdges_=void 0!==h&&h,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=i,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=i.getTileCoordExtent(f.wrappedTileCoord_),g=f.targetTileGrid_.getExtent(),v=f.sourceTileGrid_.getExtent(),m=g?rr(d,g):d;if(0===Vn(m))return f.state=Cs,f;var y=e.getExtent();y&&(v=v?rr(v,y):y);var _=i.getResolution(f.wrappedTileCoord_[0]),b=function(t,e,n,r){var i=Jn(n),o=Jh(t,e,i,r);return(!isFinite(o)||o<=0)&&Yn(n,(function(n){return o=Jh(t,e,n,r),isFinite(o)&&o>0})),o}(e,r,m,_);if(!isFinite(b)||b<=0)return f.state=Cs,f;var w=void 0!==u?u:.5;if(f.triangulation_=new Zh(e,r,m,v,b*w,_),0===f.triangulation_.getTriangles().length)return f.state=Cs,f;f.sourceZ_=n.getZForResolution(b);var x=f.triangulation_.calculateSourceExtent();if(v&&(e.canWrapX()?(x[1]=Ze(x[1],v[1],v[3]),x[3]=Ze(x[3],v[1],v[3])):x=rr(x,v)),Vn(x)){for(var S=n.getTileRangeForExtentAndZ(x,f.sourceZ_),E=S.minX;E<=S.maxX;E++)for(var C=S.minY;C<=S.maxY;C++){var T=c(f.sourceZ_,E,C,a);T&&f.sourceTiles_.push(T)}0===f.sourceTiles_.length&&(f.state=Cs)}else f.state=Cs;return f}return tp(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==Ss&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=Es;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r="number"==typeof n?n:n[0],i="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Qh(r,i,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=Ss}this.changed()},e.prototype.load=function(){if(this.state==ws){this.state=xs,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){var i=e.getState();if(i==ws||i==xs){t++;var o=(0,eo.oL)(e,Vi.Z.CHANGE,(function(n){var r=e.getState();r!=Ss&&r!=Es&&r!=Cs||((0,eo.bN)(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){t.getState()==ws&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(eo.bN),this.sourcesListenerKeys_=null},e.prototype.release=function(){this.canvas_&&((0,wo.jy)(this.canvas_.getContext("2d")),Vh.push(this.canvas_),this.canvas_=null),t.prototype.release.call(this)},e}(Gh);const np=ep;var rp=function(){function t(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function ip(t,e,n,r,i){return void 0!==i?(i.minX=t,i.maxX=e,i.minY=n,i.maxY=r,i):new rp(t,e,n,r)}const op=rp;var sp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ap=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=[1/0,1/0,-1/0,-1/0],n.tmpTileRange_=new op(0,0,0,0),n}return sp(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==Ss||n==Cs||n==Es&&!r},e.prototype.getTile=function(t,e,n,r){var i=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,i,o);return a.getState()==Es&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(Ss)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),r=bi(e.pixelToCoordinateTransform,t.slice()),i=n.getExtent();if(i&&!Fn(i,r))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),c=l.getTileGridForProjection(a.projection),u=l.getTilePixelRatio(e.pixelRatio),h=c.getZForResolution(a.resolution);h>=c.getMinZoom();--h){var p=c.getTileCoordForCoordAndZ(r,h),f=l.getTile(h,p[1],p[2],o,s);if(!(f instanceof Hh||f instanceof np))return null;if(f.getState()===Ss){var d=c.getOrigin(h),g=Ja(c.getTileSize(h)),v=c.getResolution(h),m=Math.floor(u*((r[0]-d[0])/v-p[1]*g[0])),y=Math.floor(u*((d[1]-r[1])/v-p[2]*g[1])),_=Math.round(u*l.getGutterForProjection(a.projection));return this.getImageData(f.getImage(),m+_,y+_)}}return null},e.prototype.loadedTileCallback=function(e,n,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,e,n,r)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],r=t.viewState,i=r.projection,o=r.resolution,s=r.center,a=r.rotation,l=t.pixelRatio,c=this.getLayer(),u=c.getSource(),h=u.getRevision(),p=u.getTileGridForProjection(i),f=p.getZForResolution(o,u.zDirection),d=p.getResolution(f),g=t.extent,v=t.viewState.resolution,m=u.getTilePixelRatio(l),y=Math.round(sr(g)/v*l),_=Math.round(nr(g)/v*l),b=n.extent&&Xr(n.extent,i);b&&(g=rr(g,Xr(n.extent,i)));var w=d*y/2/m,x=d*_/2/m,S=[s[0]-w,s[1]-x,s[0]+w,s[1]+x],E=p.getTileRangeForExtentAndZ(g,f),C={};C[f]={};var T=this.createLoadedTileFinder(u,i,C),O=this.tmpExtent,k=this.tmpTileRange_;this.newTiles_=!1;for(var M=a?er(r.center,v,a,t.size):void 0,P=E.minX;P<=E.maxX;++P)for(var L=E.minY;L<=E.maxY;++L)if(!a||p.tileCoordIntersectsViewport([f,P,L],M)){var A=this.getTile(f,P,L,t);if(this.isDrawableTile(A)){var I=(0,Mn.sq)(this);if(A.getState()==Ss)C[f][A.tileCoord.toString()]=A,(nt=A.inTransition(I))&&1!==n.opacity&&(A.endTransition(I),nt=!1),this.newTiles_||!nt&&-1!==this.renderedTiles.indexOf(A)||(this.newTiles_=!0);if(1===A.getAlpha(I,t.time))continue}var R=p.getTileCoordChildTileRange(A.tileCoord,k,O),D=!1;R&&(D=T(f+1,R)),D||p.forEachTileCoordParentTileRange(A.tileCoord,T,k,O)}var j=d/o*l/m;wi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,a,-y/2,-_/2);var F=Si(this.pixelTransform);this.useContainer(e,F,this.getBackground(t));var N=this.context,B=N.canvas;xi(this.inversePixelTransform,this.pixelTransform),wi(this.tempTransform,y/2,_/2,j,j,0,-y/2,-_/2),B.width!=y||B.height!=_?(B.width=y,B.height=_):this.containerReused||N.clearRect(0,0,y,_),b&&this.clipUnrotated(N,t,b),u.getInterpolate()||(0,qi.f0)(N,Wh),this.preRender(N,t),this.renderedTiles.length=0;var z,G,X,H=Object.keys(C).map(Number);H.sort(Ds.kK),1!==n.opacity||this.containerReused&&!u.getOpaque(t.viewState.projection)?(z=[],G=[]):H=H.reverse();for(var U=H.length-1;U>=0;--U){var Z=H[U],q=u.getTilePixelSize(Z,l,i),W=p.getResolution(Z)/d,Y=q[0]*W*j,V=q[1]*W*j,K=p.getTileCoordForCoordAndZ(ir(S),Z),$=p.getTileCoordExtent(K),J=bi(this.tempTransform,[m*($[0]-S[0])/d,m*(S[3]-$[3])/d]),Q=m*u.getGutterForProjection(i),tt=C[Z];for(var et in tt){var nt,rt=(A=tt[et]).tileCoord,it=K[1]-rt[1],ot=Math.round(J[0]-(it-1)*Y),st=K[2]-rt[2],at=Math.round(J[1]-(st-1)*V),lt=ot-(P=Math.round(J[0]-it*Y)),ct=at-(L=Math.round(J[1]-st*V)),ut=f===Z,ht=!1;if(!(nt=ut&&1!==A.getAlpha((0,Mn.sq)(this),t.time)))if(z){X=[P,L,P+lt,L,P+lt,L+ct,P,L+ct];for(var pt=0,ft=z.length;pt<ft;++pt)if(f!==Z&&Z<G[pt]){var dt=z[pt];ar([P,L,P+lt,L+ct],[dt[0],dt[3],dt[4],dt[7]])&&(ht||(N.save(),ht=!0),N.beginPath(),N.moveTo(X[0],X[1]),N.lineTo(X[2],X[3]),N.lineTo(X[4],X[5]),N.lineTo(X[6],X[7]),N.moveTo(dt[6],dt[7]),N.lineTo(dt[4],dt[5]),N.lineTo(dt[2],dt[3]),N.lineTo(dt[0],dt[1]),N.clip())}z.push(X),G.push(Z)}else N.clearRect(P,L,lt,ct);this.drawTileImage(A,t,P,L,lt,ct,Q,ut),z&&!nt?(ht&&N.restore(),this.renderedTiles.unshift(A)):this.renderedTiles.push(A),this.updateUsedTiles(t.usedTiles,u,A)}}return this.renderedRevision=h,this.renderedResolution=d,this.extentChanged=!this.renderedExtent_||!Un(this.renderedExtent_,S),this.renderedExtent_=S,this.renderedPixelRatio=l,this.renderedProjection=i,this.manageTilePyramid(t,u,p,l,i,g,f,c.getPreload()),this.scheduleExpireCache(t,u),this.postRender(N,t),n.extent&&N.restore(),(0,qi.f0)(N,Yh),F!==B.style.transform&&(B.style.transform=F),this.container},e.prototype.drawTileImage=function(t,e,n,r,i,o,s,a){var l=this.getTileImage(t);if(l){var c=(0,Mn.sq)(this),u=e.layerStatesArray[e.layerIndex],h=u.opacity*(a?t.getAlpha(c,e.time):1),p=h!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(l,s,s,l.width-2*s,l.height-2*s,n,r,i,o),p&&this.context.restore(),h!==u.opacity?e.animate=!0:a&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var r=(0,Mn.sq)(t);r in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[r])}.bind(null,e);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,e,n){var r=(0,Mn.sq)(e);r in t||(t[r]={}),t[r][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,n,r,i,o,s,a,l){var c=(0,Mn.sq)(e);c in t.wantedTiles||(t.wantedTiles[c]={});var u,h,p,f,d,g,v=t.wantedTiles[c],m=t.tileQueue,y=n.getMinZoom(),_=t.viewState.rotation,b=_?er(t.viewState.center,t.viewState.resolution,_,t.size):void 0,w=0;for(g=y;g<=s;++g)for(h=n.getTileRangeForExtentAndZ(o,g,h),p=n.getResolution(g),f=h.minX;f<=h.maxX;++f)for(d=h.minY;d<=h.maxY;++d)_&&!n.tileCoordIntersectsViewport([g,f,d],b)||(s-g<=a?(++w,(u=e.getTile(g,f,d,r,i)).getState()==ws&&(v[u.getKey()]=!0,m.isKeyQueued(u.getKey())||m.enqueue([u,c,n.getTileCoordCenter(u.tileCoord),p])),void 0!==l&&l(u)):e.useTile(g,f,d,i));e.updateCacheSize(w,i)},e}(Gu);const lp=ap;var cp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const up=function(t){function e(e){return t.call(this,e)||this}return cp(e,t),e.prototype.createRenderer=function(){return new lp(this)},e}(Nh);var hp=function(){function t(t){this.rbush_=new Nc(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[(0,Mn.sq)(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),r=0,i=e.length;r<i;r++){var o=t[r],s=e[r],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[r]=a,this.items_[(0,Mn.sq)(s)]=a}this.rbush_.load(n)},t.prototype.remove=function(t){var e=(0,Mn.sq)(t),n=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(n)},t.prototype.update=function(t,e){var n=this.items_[(0,Mn.sq)(e)];Un([n.minX,n.minY,n.maxX,n.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var n,r=0,i=t.length;r<i;r++)if(n=e(t[r]))return n;return n},t.prototype.isEmpty=function(){return(0,qi.xb)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Xn(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}();const pp=hp;var fp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function dp(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const gp=function(t){function e(e){var n=t.call(this)||this;n.projection=xr(e.projection),n.attributions_=dp(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:"ready",n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var r=n;return n.viewPromise_=new Promise((function(t,e){r.viewResolver=t,r.viewRejector=e})),n}return fp(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return(0,Mn.O3)()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=dp(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Di.Z),vp="addfeature",mp="changefeature",yp="clear",_p="removefeature",bp="featuresloadstart",wp="featuresloadend",xp="featuresloaderror";function Sp(t,e){return[[-1/0,-1/0,1/0,1/0]]}var Ep=!1;function Cp(t,e){return function(n,r,i,o,s){var a=this;!function(t,e,n,r,i,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,r,i):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=Ep,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=e.getType(),l=void 0;"json"==r||"text"==r?l=a.responseText:"xml"==r?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):"arraybuffer"==r&&(l=a.response),l?o(e.readFeatures(l,{extent:n,featureProjection:i}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,r,i,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||mi.Zn)}}var Tp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Op=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.feature=n,i.features=r,i}return Tp(e,t),e}(Re.ZP),kp=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===r.wrapX||r.wrapX})||this).on,n.once,n.un,n.loader_=mi.Zn,n.format_=r.format,n.overlaps_=void 0===r.overlaps||r.overlaps,n.url_=r.url,void 0!==r.loader?n.loader_=r.loader:void 0!==n.url_&&(An(n.format_,7),n.loader_=Cp(n.url_,n.format_)),n.strategy_=void 0!==r.strategy?r.strategy:Sp;var i,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return n.featuresRtree_=s?new pp:null,n.loadedExtentsRtree_=new pp,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(i=r.features).getArray()),s||void 0!==i||(i=new $o(o)),void 0!==o&&n.addFeaturesInternal(o),void 0!==i&&n.bindFeaturesCollection_(i),n}return Tp(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,Mn.sq)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Op(vp,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,eo.oL)(e,Vi.Z.CHANGE,this.handleFeatureChange_,this),(0,eo.oL)(e,uo.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,r=e.getId();return void 0!==r&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(An(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],r=[],i=0,o=t.length;i<o;i++){var s=t[i],a=(0,Mn.sq)(s);this.addToIndex_(a,s)&&n.push(s)}i=0;for(var l=n.length;i<l;i++){s=n[i],a=(0,Mn.sq)(s);this.setupChangeEvents_(a,s);var c=s.getGeometry();if(c){var u=c.getExtent();e.push(u),r.push(s)}else this.nullGeometryFeatures_[a]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(vp)){i=0;for(var h=n.length;i<h;i++)this.dispatchEvent(new Op(vp,n[i]))}},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(vp,(function(n){e||(e=!0,t.push(n.feature),e=!1)})),this.addEventListener(_p,(function(n){e||(e=!0,t.remove(n.feature),e=!1)})),t.addEventListener(Zo,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(qo,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(eo.bN)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var n=function(t){this.removeFeatureInternal(t)}.bind(this);for(var r in this.featuresRtree_.forEach(n),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var i=new Op(yp);this.dispatchEvent(i),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,(function(n){return n.getGeometry().intersectsCoordinate(t)?e(n):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(n){if(n.getGeometry().intersectsExtent(t)){var r=e(n);if(r)return r}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,qi.xb)(this.nullGeometryFeatures_)||(0,Ds.l7)(t,(0,qi.KX)(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t,e){var n=this;if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);var r=function(t,e){if(e.canWrapX()){var n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];ur(t,e);var r=sr(n);if(sr(t)>r)return[[n[0],t[1],n[2],t[3]]];if(t[0]<n[0])return[[t[0]+r,t[1],n[2],t[3]],[n[0],t[1],t[2],t[3]]];if(t[2]>n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-r,t[3]]]}return[t]}(t,e);return[].concat.apply([],r.map((function(t){return n.featuresRtree_.getInExtent(t)})))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],r=t[1],i=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||mi.uX;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),c=s;if((s=e.closestPointXY(n,r,o,s))<c){i=t;var u=Math.sqrt(s);a[0]=n-u,a[1]=r-u,a[2]=n+u,a[3]=r+u}}})),i},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,n=(0,Mn.sq)(e),r=e.getGeometry();if(r){var i=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(i,e)):this.featuresRtree_&&this.featuresRtree_.update(i,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new Op(mp,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:(0,Mn.sq)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,qi.xb)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},e.prototype.loadFeatures=function(t,e,n){for(var r=this.loadedExtentsRtree_,i=this.strategy_(t,e,n),o=function(t,o){var a=i[t];r.forEachInExtent(a,(function(t){return Nn(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new Op(bp)),s.loader_.call(s,a,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new Op(wp,void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Op(xp))}.bind(s)),r.insert(a,{extent:a.slice()}))},s=this,a=0,l=i.length;a<l;++a)o(a);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if(Un(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,Mn.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=(0,Mn.sq)(t),n=this.featureChangeKeys_[e];if(n){n.forEach(eo.bN),delete this.featureChangeKeys_[e];var r=t.getId();return void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Op(_p,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){An(this.format_,7),this.url_=t,this.setLoader(Cp(t,this.format_))},e}(gp);const Mp=kp;var Pp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lp=function(t){function e(e,n,r){var i=t.call(this)||this;if(void 0!==r&&void 0===n)i.setFlatCoordinates(r,e);else{var o=n||0;i.setCenterAndRadius(e,o,r)}return i}return Pp(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){var i=this.flatCoordinates,o=t-i[0],s=e-i[1],a=o*o+s*s;if(a<r){if(0===a)for(var l=0;l<this.stride;++l)n[l]=i[l];else{var c=this.getRadius()/Math.sqrt(a);n[0]=i[0]+c*o,n[1]=i[1]+c*s;for(l=2;l<this.stride;++l)n[l]=i[l]}return n.length=this.stride,a}return r},e.prototype.containsXY=function(t,e){var n=this.flatCoordinates,r=t-n[0],i=e-n[1];return r*r+i*i<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,n=e[this.stride]-e[0];return Xn(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return"Circle"},e.prototype.intersectsExtent=function(t){if(ar(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||Yn(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(var i=1;i<e;++i)r[e+i]=t[i];this.setFlatCoordinates(this.layout,r),this.changed()},e.prototype.setCenterAndRadius=function(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,i=ha(r,0,t,this.stride);r[i++]=r[0]+e;for(var o=1,s=this.stride;o<s;++o)r[i++]=r[o];r.length=i,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var n=this.getCenter(),r=this.getStride();this.setCenter(Ks(n,0,n.length,r,t,e,n)),this.changed()},e.prototype.translate=function(t,e){var n=this.getCenter(),r=this.getStride();this.setCenter($s(n,0,n.length,r,t,e,n)),this.changed()},e}(oa);Lp.prototype.transform;const Ap=Lp;function Ip(t,e,n,r,i,o){if(n==e)return null;var s;if(i<t[e+r-1])return o?((s=t.slice(e,e+r))[r-1]=i,s):null;if(t[n-1]<i)return o?((s=t.slice(n-r,n))[r-1]=i,s):null;if(i==t[e+r-1])return t.slice(e,e+r);for(var a=e/r,l=n/r;a<l;){var c=a+l>>1;i<t[(c+1)*r-1]?l=c:a=c+1}var u=t[a*r-1];if(i==u)return t.slice((a-1)*r,(a-1)*r+r);var h=(i-u)/(t[(a+1)*r-1]-u);s=[];for(var p=0;p<r-1;++p)s.push(Qe(t[(a-1)*r+p],t[a*r+p],h));return s.push(i),s}var Rp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dp=function(t){function e(e,n){var r=t.call(this)||this;return r.flatMidpoint_=null,r.flatMidpointRevision_=-1,r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return Rp(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,Ds.l7)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(aa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ca(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))},e.prototype.forEachSegment=function(t){return Ia(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=Ws&&this.layout!=Ys)return null;var n=void 0!==e&&e;return Ip(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n)},e.prototype.getCoordinates=function(){return ya(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return function(t,e,n,r,i,o,s){var a,l,c=(n-e)/r;if(1===c)a=e;else if(2===c)a=e,l=i;else if(0!==c){for(var u=t[e],h=t[e+1],p=0,f=[0],d=e+r;d<n;d+=r){var g=t[d],v=t[d+1];p+=Math.sqrt((g-u)*(g-u)+(v-h)*(v-h)),f.push(p),u=g,h=v}var m=i*p,y=(0,Ds.ry)(f,m);y<0?(l=(m-f[-y-2])/(f[-y-1]-f[-y-2]),a=e+(-y-2)*r):a=e+y*r}var _=s>1?s:2,b=o||new Array(_);for(d=0;d<_;++d)b[d]=void 0===a?NaN:void 0===l?t[a+d]:Qe(t[a+d],t[a+r+d],l);return b}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return Hu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=da(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Zs)},e.prototype.getType=function(){return"LineString"},e.prototype.intersectsExtent=function(t){return Ra(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=pa(this.flatCoordinates,0,t,this.stride),this.changed()},e}(oa);const jp=Dp;var Fp=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return An(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return An(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){An(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();const Np=Fp;function Bp(t,e,n,r){return void 0!==r?(r[0]=t,r[1]=e,r[2]=n,r):[t,e,n]}function zp(t,e,n){return t+"/"+e+"/"+n}function Gp(t){return zp(t[0],t[1],t[2])}var Xp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xp(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey()),e=t[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(Gp(t.tileCoord)),t.release())}.bind(this))}},e}(Np);const Up=Hp,Zp="tileloadstart",qp="tileloadend",Wp="tileloaderror";var Yp=[0,0,0],Vp=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,An((0,Ds.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var n=0,r=this.resolutions_.length-1;n<r;++n)if(e){if(this.resolutions_[n]/this.resolutions_[n+1]!==e){e=void 0;break}}else e=this.resolutions_[n]/this.resolutions_[n+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,An(this.origins_.length==this.resolutions_.length,20));var i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=ir(i)),An(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,An(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:As,An(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==i?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var n=new op(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){var r=this.getTileRangeForExtentAndZ(i,e);n.minX=Math.max(r.minX,n.minX),n.maxX=Math.min(r.maxX,n.maxX),n.minY=Math.max(r.minY,n.minY),n.maxY=Math.min(r.maxY,n.maxY)}return n}),this):i&&this.calculateTileRanges_(i)}return t.prototype.forEachTileCoord=function(t,e,n){for(var r=this.getTileRangeForExtentAndZ(t,e),i=r.minX,o=r.maxX;i<=o;++i)for(var s=r.minY,a=r.maxY;s<=a;++s)n([e,i,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,r){var i,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(i=t[1],o=t[2]):s=this.getTileCoordExtent(t,r);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?ip(i=Math.floor(i/2),i,o=Math.floor(o/2),o,n):this.getTileRangeForExtentAndZ(s,a,n)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var r=2*t[1],i=2*t[2];return ip(r,r+1,i,i+1,e)}var o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var r=t[0],i=t[1],o=t[2];if(e===r)return ip(i,o,i,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-r),a=Math.floor(i*s),l=Math.floor(o*s);return e<r?ip(a,a,l,l,n):ip(a,Math.floor(s*(i+1))-1,l,Math.floor(s*(o+1))-1,n)}var c=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(c,e,n)},t.prototype.getTileRangeExtent=function(t,e,n){var r=this.getOrigin(t),i=this.getResolution(t),o=Ja(this.getTileSize(t),this.tmpSize_),s=r[0]+e.minX*o[0]*i,a=r[0]+(e.maxX+1)*o[0]*i;return Xn(s,r[1]+e.minY*o[1]*i,a,r[1]+(e.maxY+1)*o[1]*i,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var r=Yp;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,r);var i=r[1],o=r[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,r),ip(i,r[1],o,r[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=Ja(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]},t.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),r=this.getResolution(t[0]),i=Ja(this.getTileSize(t[0]),this.tmpSize_),o=n[0]+t[1]*i[0]*r,s=n[1]-(t[2]+1)*i[1]*r;return Xn(o,s,o+i[0]*r,s+i[1]*r,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,n,r,i){var o=this.getZForResolution(n),s=n/this.getResolution(o),a=this.getOrigin(o),l=Ja(this.getTileSize(o),this.tmpSize_),c=s*(t-a[0])/n/l[0],u=s*(a[1]-e)/n/l[1];return r?(c=nn(c,5)-1,u=nn(u,5)-1):(c=en(c,5),u=en(u,5)),Bp(o,c,u,i)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,r,i){var o=this.getOrigin(n),s=this.getResolution(n),a=Ja(this.getTileSize(n),this.tmpSize_),l=(t-o[0])/s/a[0],c=(o[1]-e)/s/a[1];return r?(l=nn(l,5)-1,c=nn(c,5)-1):(l=en(l,5),c=en(c,5)),Bp(n,l,c,i)},t.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return Ze((0,Ds.h7)(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.tileCoordIntersectsViewport=function(t,e){return Da(e,0,e.length,2,this.getTileCoordExtent(t))},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n},t}();const Kp=Vp;function $p(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,n,r){return function(t,e,n,r){var i=void 0!==r?r:"top-left",o=Jp(t,e,n);return new Kp({extent:t,origin:Qn(t,i),resolutions:o,tileSize:n})}(Qp(t),e,n,r)}(t),t.setDefaultTileGrid(e)),e}function Jp(t,e,n,r){for(var i=void 0!==e?e:42,o=nr(t),s=sr(t),a=Ja(void 0!==n?n:As),l=r>0?r:Math.max(s/a[0],o/a[1]),c=i+1,u=new Array(c),h=0;h<c;++h)u[h]=l/Math.pow(2,h);return u}function Qp(t){var e=(t=xr(t)).getExtent();if(!e){var n=180*Ge[Xe.DEGREES]/t.getMetersPerUnit();e=Xn(-n,-n,n,n)}return e}var tf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ef=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;return n.tileGrid&&Ja(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),[256,256]),n.tileCache=new Up(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return tf(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,s,a,l=!0,c=n.minX;c<=n.maxX;++c)for(var u=n.minY;u<=n.maxY;++u)s=zp(e,c,u),a=!1,i.containsKey(s)&&(a=(o=i.get(s)).getState()===Ss)&&(a=!1!==r(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,r,i){return(0,Mn.O3)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:$p(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return An(null===e||Mr(e,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r,i,o,s=this.getTileGridForProjection(n),a=this.getTilePixelRatio(e),l=Ja(s.getTileSize(t),this.tmpSize);return 1==a?l:(r=l,i=a,void 0===(o=this.tmpSize)&&(o=[0,0]),o[0]=r[0]*i+.5|0,o[1]=r[1]*i+.5|0,o)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=function(t,e,n){var r=e[0],i=t.getTileCoordCenter(e),o=Qp(n);if(Fn(o,i))return e;var s=sr(o),a=Math.ceil((o[0]-i[0])/s);return i[0]+=s*a,t.getTileCoordForCoordAndZ(i,r)}(r,t,n)),function(t,e){var n=t[0],r=t[1],i=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(r,i)}(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,r){},e}(gp),nf=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tile=n,r}return tf(e,t),e}(Re.ZP);const rf=ef;function of(t,e){var n=/\{z\}/g,r=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(r,s[1].toString()).replace(i,s[2].toString()).replace(o,(function(){var t=s[0],n=e.getFullTileRange(t);return An(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}function sf(t,e){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=of(t[i],e);return function(t){if(1===t.length)return t[0];return function(e,n,r){if(e){var i=function(t){return(t[1]<<t[0])+t[2]}(e),o=Je(i,t.length);return t[o](e,n,r)}}}(r)}function af(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r=n[1].charCodeAt(0),i=n[2].charCodeAt(0),o=void 0;for(o=r;o<=i;++o)e.push(t.replace(n[0],String.fromCharCode(o)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(n[2],10),a=parseInt(n[1],10);a<=s;a++)e.push(t.replace(n[0],a.toString()));return e}return e.push(t),e}var lf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cf=function(t){function e(n){var r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(r.tileUrlFunction=n.tileUrlFunction),r.urls=null,n.urls?r.setUrls(n.urls):n.url&&r.setUrl(n.url),r.tileLoadingKeys_={},r}return lf(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=(0,Mn.sq)(n),i=n.getState();i==xs?(this.tileLoadingKeys_[r]=!0,e=Zp):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=i==Es?Wp:i==Ss?qp:void 0),null!=e&&this.dispatchEvent(new nf(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=af(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(sf(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var r=zp(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(rf);const uf=cf;var hf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pf=function(t){function e(e){var n=this,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),(n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:ff,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:r,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:Hh,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return hf(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[r];i.expireCache(i==n?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Mr(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Mr(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Mr(e,t)){var n=(0,Mn.sq)(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=$p(t)),this.tileGridForProjection[n]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Mr(e,t))return this.tileCache;var n=(0,Mn.sq)(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Up(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,e,n,r,i,o){var s=[t,e,n],a=this.getTileCoordForTileUrlFunction(s,i),l=a?this.tileUrlFunction(a,r,i):void 0,c=new this.tileClass(s,void 0!==l?ws:Cs,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(Vi.Z.CHANGE,this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,e,n,r,i){var o=this.getProjection();if(o&&i&&!Mr(o,i)){var s=this.getTileCacheForProjection(i),a=[t,e,n],l=void 0,c=Gp(a);s.containsKey(c)&&(l=s.get(c));var u=this.getKey();if(l&&l.key==u)return l;var h=this.getTileGridForProjection(o),p=this.getTileGridForProjection(i),f=this.getTileCoordForTileUrlFunction(a,i),d=new np(o,h,i,p,a,f,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return d.key=u,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(c,d)):s.set(c,d),d}return this.getTileInternal(t,e,n,r,o||i)},e.prototype.getTileInternal=function(t,e,n,r,i){var o=null,s=zp(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,n,r,i,a),l.getState()==ws?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,n,r,i,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var n=xr(t);if(n){var r=(0,Mn.sq)(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}},e}(uf);function ff(t,e){t.getImage().src=e}const df=pf;var gf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const vf=function(t){function e(e){var n=this,r=e||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate);var o=void 0!==r.projection?r.projection:"EPSG:3857",s=void 0!==r.tileGrid?r.tileGrid:function(t){var e=t||{},n=e.extent||xr("EPSG:3857").getExtent(),r={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Jp(n,e.maxZoom,e.tileSize,e.maxResolution)};return new Kp(r)}({extent:Qp(o),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return(n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,opaque:r.opaque,projection:o,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:s,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this).gutter_=void 0!==r.gutter?r.gutter:0,n}return gf(e,t),e.prototype.getGutter=function(){return this.gutter_},e}(df);var mf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const yf=function(t){function e(e){var n,r=e||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate),n=void 0!==r.attributions?r.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var o=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",s=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:r.cacheSize,crossOrigin:o,interpolate:i,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,opaque:void 0===r.opaque||r.opaque,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,transition:r.transition,url:s,wrapX:r.wrapX,zDirection:r.zDirection})||this}return mf(e,t),e}(vf);function _f(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function bf(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function wf(t){return"Feature"===t.type?t.geometry:t}function xf(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=_f(t),i=wf(e),o=i.type,s=e.bbox,a=i.coordinates;if(s&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===o&&(a=[a]);for(var l=!1,c=0;c<a.length&&!l;c++)if(Sf(r,a[c][0],n.ignoreBoundary)){for(var u=!1,h=1;h<a[c].length&&!u;)Sf(r,a[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function Sf(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var s=e[i][0],a=e[i][1],l=e[o][0],c=e[o][1];if(t[1]*(s-l)+a*(l-t[0])+c*(t[0]-s)==0&&(s-t[0])*(l-t[0])<=0&&(a-t[1])*(c-t[1])<=0)return!n;a>t[1]!=c>t[1]&&t[0]<(l-s)*(t[1]-a)/(c-a)+s&&(r=!r)}return r}function Ef(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Cf(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Of(t[0])||!Of(t[1]))throw new Error("coordinates must contain numbers");return Ef({type:"Point",coordinates:t},e,n)}function Tf(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function Of(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function kf(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Mf(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return kf({type:"LineString",coordinates:t},e,n)}function Pf(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function Lf(t,e){var n,r,i,o,s,a,l,c,u,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,c=f?t.features[n].properties:d?t.properties:{},u=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,c,u,h))return!1;p++}}function Af(t,e){Lf(t,(function(t,n,r,i,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(kf(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l];if(!1===e(kf({type:s,coordinates:c},r),n,l))return!1}}))}const If=function(t){if(!t)throw new Error("geojson is required");var e=[];return Af(t,(function(t){!function(t,e){var n=[],r=t.geometry;if(null!==r){switch(r.type){case"Polygon":n=bf(r);break;case"LineString":n=[bf(r)]}n.forEach((function(n){var r=function(t,e){var n=[];return t.reduce((function(t,r){var i,o,s,a,l,c,u=Mf([t,r],e);return u.bbox=(o=r,s=(i=t)[0],a=i[1],l=o[0],c=o[1],[s<l?s:l,a<c?a:c,s>l?s:l,a>c?a:c]),n.push(u),r})),n}(n,t.properties);r.forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),Pf(e)};function Rf(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}var Df=n(1787);function jf(t,e){var n=bf(t),r=bf(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=r[0][0],c=r[0][1],u=r[1][0],h=r[1][1],p=(h-c)*(s-i)-(u-l)*(a-o),f=(u-l)*(o-c)-(h-c)*(i-l),d=(s-i)*(o-c)-(a-o)*(i-l);if(0===p)return null;var g=f/p,v=d/p;return g>=0&&g<=1&&v>=0&&v<=1?Cf([i+g*(s-i),o+g*(a-o)]):null}const Ff=function(t,e){var n={},r=[];if("LineString"===t.type&&(t=Ef(t)),"LineString"===e.type&&(e=Ef(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var i=jf(t,e);return i&&r.push(i),Tf(r)}var o=Df();return o.load(If(e)),Rf(If(t),(function(t){Rf(o.search(t),(function(e){var i=jf(t,e);if(i){var o=bf(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Tf(r)};class Nf extends(si(yf)){constructor(t={}){super(((t=di(t)).imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=t.tms?`tiles/${t.mapID}/{z}/{x}/{-y}.${t.imageExtension}`:`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t)),t.mapID&&(this.mapID=t.mapID),ci(this,t),ui(this)}static async createAsync(t){return new Nf(t)}insideCheckXy(t){return!this.envelope||xf(t,this.envelope)}insideCheckSysCoord(t){return this.insideCheckXy(t)}modulateXyInside(t){if(!this.centroid)return t;const e=(0,ti.Tu)([t,this.centroid]),n=Ff(this.envelope,e);return n.features.length>0&&n.features[0].geometry?n.features[0].geometry.coordinates:t}modulateSysCoordInside(t){return this.modulateXyInside(t)}merc2XyAsync(t){return Promise.resolve(t)}merc2XyAsync_ignoreBackground(t){return this.merc2XyAsync(t)}xy2MercAsync(t){return Promise.resolve(t)}xy2SysCoord(t){return t}sysCoord2Xy(t){return t}viewpoint2MercsAsync(t,e){const n=this.viewpoint2SysCoords(t,e),r=this.sysCoords2Xys(n);return this.xys2MercsAsync(r)}mercs2ViewpointAsync(t){return this.mercs2XysAsync(t).then((t=>{const e=this.xys2SysCoords(t);return this.sysCoords2Viewpoint(e)}))}mercs2SysCoordsAsync_multiLayer(t){return Promise.all(t[0].map((t=>this.merc2SysCoordAsync(t)))).then((e=>[[e,t[1]]]))}}class Bf extends Nf{constructor(t={}){super(t),this.style="",this.accessToken="",this.style=t.style,this.mapboxMap=t.mapboxMap}static async createAsync(t){return new Bf(t)}}function zf(t,e){return t+(Math.random()-.5)*e}function Gf(t,e){if(t instanceof Array)return t.map((t=>Gf(t,e)));const n=Math.pow(10,e);return Math.round(t*n)/n}function Xf(t){return t*Math.PI/180}class Hf extends oo{constructor(t){super({render:function(t){const e=this.getSource(),n=e.mapboxMap;n.setStyle(e.style);const r=n.getCanvas(),i=t.viewState,o=this.getVisible();r.style.display=o?"block":"none";const s=this.getOpacity();r.style.opacity=s;const a=-180*i.rotation/Math.PI,l=kr(i.center),c=i.zoom-1,u=n.getBearing(),h=n.getCenter().toArray(),p=n.getZoom();return a==u&&l[0]==h[0]&&l[1]==h[1]&&c==p||(a!=u&&n.rotateTo(a,{animate:!1}),l[0]==h[0]&&l[1]==h[1]&&c==p||n.jumpTo({center:l,zoom:c,animate:!1}),n._frame&&(n._frame.cancel(),n._frame=null),n._render()),r},source:t.source})}}const Uf="assets/images/9ac6d81f417d6a5626b7c8d5a087c32b.png",Zf=new ru({image:new Sh({anchor:[.5,.5],anchorXUnits:lh,anchorYUnits:lh,src:"assets/images/6e1f2f2f6fed3c5cddeb925e7ae75aba.png"})}),qf=new ru({image:new Sh({anchor:[.5,.5],anchorXUnits:lh,anchorYUnits:lh,src:"assets/images/6c5dba7f7d76e74c3a8c7c5b1c3fc544.png"})}),Wf=new ru({image:new Sh({anchor:[.5,.5],anchorXUnits:lh,anchorYUnits:lh,src:"assets/images/0beac2cb41dfab43ddfd9df80b32b85d.png"})}),Yf=new ru({fill:new Kc({color:[128,128,256,.2]}),stroke:new Jc({color:[128,128,256,1],width:3})}),Vf=new ru({image:new Sh({anchor:[.5,1],anchorXUnits:lh,anchorYUnits:lh,src:Uf})});class Kf extends bc{constructor(t){t=di(t||{});const e=new Rh({source:new Mp({wrapX:!1})});e.set("name","gps");const n=new Rh({source:new Mp({wrapX:!1})});n.set("name","marker");const r=new Rh({source:new Mp({wrapX:!1})});r.set("name","feature");const i=new Rh({source:new Mp({wrapX:!1})});i.set("name","envelope");const o=Kf.spawnLayer(null,t.source,t.target),s=new ns;s.set("name","overlay");const a={controls:t.controls?t.controls:[],layers:[o,s,i,r,e,n],target:t.div,view:new Ka({center:t.defaultCenter||[0,0],zoom:t.defaultZoom||2,rotation:t.defaultRotation||0,multiWorld:!0})};t.interactions&&(a.interactions=t.interactions),super(a),this._overlay_group=s,this.fakeGps=t.fakeGps,this.fakeRadius=t.fakeRadius,this.homePosition=t.homePosition;const l=this.getView();this.__AvoidFirstMoveStart=!0;const c=()=>{this.__AvoidFirstMoveStart||this.dispatchEvent("movestart"),this.__AvoidFirstMoveStart=!1,l.un("propertychange",c)};l.on("propertychange",c),this.on("moveend",(()=>{l.on("propertychange",c)}))}static spawnLayer(t,e,n){return e instanceof Bf||!(t instanceof up)?(t=e instanceof Bf?new Hf({style:e.style,accessToken:e.accessToken,container:n,source:e}):new up({source:e})).set("name","base"):t.setSource(e),t}getLayer(t="base"){const e=n=>{const r=n.getArray().map((n=>n.get("name")==t?n:n.getLayers?e(n.getLayers()):void 0)).filter((t=>t));if(0!=r.length)return r[0]};return e(this.getLayers())}getSource(t="base"){const e=this.getLayer(t);if(e)return e.getSource()}setFeature(t,e,n){const r=this.getSource(n),i=new Sc(t);return e&&i.setStyle(e),r.addFeature(i),i}removeFeature(t,e){this.getSource(e).removeFeature(t)}resetFeature(t){this.getSource(t).clear()}setGPSPosition(t,e){const n="sub"==e?Wf:"hide"==e?qf:Zf;"sub"!=e&&this.resetFeature("gps"),t&&(this.setFeature({geometry:new ka(t.xy)},n,"gps"),e||this.setFeature({geometry:new Ap(t.xy,t.rad)},Yf,"gps"))}setMarker(t,e,n,r){return r||(r="marker"),e.geometry=new ka(t),n?"string"==typeof n?n=new ru({image:new Sh({anchor:[.5,1],anchorXUnits:lh,anchorYUnits:lh,src:n})}):n instanceof ru||(n=new ru({image:new Sh(n)})):n=Vf,this.setFeature(e,n,r)}resetMarker(t){t||(t="marker"),this.resetFeature(t)}setLine(t,e,n){return this.setVector(t,"Line",e?{stroke:e}:null,n)}setVector(t,e="Line",n,r){r||(r="feature");const i={};null!=n.stroke&&(i.stroke=new Jc(n.stroke)),null!=n.fill&&(i.fill=new Kc(n.fill));const o=new ru(i),s="Line"===e?new jp(t):new Ha(t);return this.setFeature({geometry:s,name:e},o,r)}resetLine(t){this.resetVector(t)}resetVector(t){t||(t="feature"),this.resetFeature(t)}setEnvelope(t,e,n){return n||(n="envelope"),this.setLine(t,e,n)}removeEnvelope(t,e){e||(e="envelope"),this.removeFeature(t,e)}resetEnvelope(t){t||(t="envelope"),this.resetFeature(t)}setFillEnvelope(t,e,n,r){r||(r="envelope");let i=null;if(null!=e||null!=n){const t={};null!=e&&(t.stroke=new Jc(e)),null!=n&&(t.fill=new Kc(n)),i=new ru(t)}return this.setFeature({geometry:new Ha([t])},i,r)}exchangeSource(t){const e=this.getLayers(),n=e.item(0),r=Kf.spawnLayer(n,t,this.getTarget());r!=n&&e.setAt(0,r),t&&(t._map=this)}setLayer(t){const e=this.getLayer("overlay").getLayers();if(e.clear(),t){const n=new up({source:t});e.push(n)}}setTransparency(t){const e=(100-t)/100;this.getSource()instanceof Nf?(this.getLayers().item(0).setOpacity(1),this.getLayers().item(1).setOpacity(e)):this.getLayers().item(0).setOpacity(e)}setGPSMarker(t,e){this.getLayers().item(0).getSource().setGPSMarker(t,e)}handleGPS(t,e){if(t)if(this.dispatchEvent("gps_request"),this._first_gps_request=!0,this.geolocation)this.geolocation.setTracking(!0);else{const t=this.geolocation=new Fc({tracking:!0});t.on("change",(e=>{const n=this.getLayer("overlay").getLayers().item(0),r=n?n.getSource():this.getLayers().item(0).getSource();let i=t.getPosition(),o=t.getAccuracy();var s,a;this.fakeGps&&(s=this.homePosition,a=i,6378.14*Math.acos(Math.cos(Xf(s[1]))*Math.cos(Xf(a[1]))*Math.cos(Xf(a[0])-Xf(s[0]))+Math.sin(Xf(s[1]))*Math.sin(Xf(a[1])))>this.fakeGps)&&(i=[zf(this.homePosition[0],.001),zf(this.homePosition[1],.001)],o=zf(15,10));let l={lnglat:i,acc:o};r.setGPSMarkerAsync(l,!this._first_gps_request).then((t=>{t||(l={error:"gps_out"}),this._first_gps_request=!1,this.dispatchEvent(new is("gps_result",this,l))}))})),t.on("error",(t=>{const e=this.getLayers().item(0).getSource();let n=null;if(this.fakeGps){const t=[zf(this.homePosition[0],.001),zf(this.homePosition[1],.001)],e=zf(15,10);n={lnglat:t,acc:e}}e.setGPSMarkerAsync(n,!this._first_gps_request).then((t=>{t||(n={error:"gps_out"}),this._first_gps_request=!1,this.dispatchEvent(new is("gps_result",this,n))}))}))}else{this.geolocation&&this.geolocation.setTracking(!1);this.getLayers().item(0).getSource().setGPSMarker(),e||this.dispatchEvent(new is("gps_result",this,{error:"gps_off"}))}}}var $f=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jf=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,r)||this).condition_=r.condition?r.condition:kl,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=void 0!==r.duration?r.duration:400,n}return $f(e,t),e.prototype.handleDragEvent=function(t){if(Pl(t)){var e=t.map,n=e.getSize(),r=t.pixel,i=r[0]-n[0]/2,o=n[1]/2-r[1],s=Math.atan2(o,i),a=Math.sqrt(i*i+o*o),l=e.getView();if(void 0!==this.lastAngle_){var c=this.lastAngle_-s;l.adjustRotationInternal(c)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&l.adjustResolutionInternal(this.lastMagnitude_/a),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/a),this.lastMagnitude_=a}},e.prototype.handleUpEvent=function(t){if(!Pl(t))return!0;var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!Pl(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(bl);const Qf=Jf;for(let t=0;t<9;t++){!function(t,e){const n=new Ue({code:t,extent:[0,0,e,e],units:"m"});wr(n),Or("EPSG:3857",n,(t=>[(t[0]+Ur)*e/(2*Ur),(-t[1]+Ur)*e/(2*Ur)]),(t=>[t[0]*(2*Ur)/e-Ur,-1*(t[1]*(2*Ur)/e-Ur)]))}(`ZOOM:${t}`,256*Math.pow(2,t))}class td extends(si(vf)){constructor(t={}){super(t=(()=>{(t=di(t)).wrapX=!1,t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`);const e=Math.log2(t.width/Wr),n=Math.log2(t.height/Wr);return t.maxZoom=Math.ceil(Math.max(e,n)),t.tileUrlFunction=t.tileUrlFunction||function(t){const e=t[0],n=t[1],r=t[2];return n*Wr*Math.pow(2,this.maxZoom-e)>=this.width||r*Wr*Math.pow(2,this.maxZoom-e)>=this.height||n<0||r<0?qr:this._tileUrlFunction(t)},t})()),t.mapID&&(this.mapID=t.mapID),t.urls?this._tileUrlFunction=sf(t.urls):t.url&&(this._tileUrlFunction=sf(af(t.url))),this.width=t.width,this.height=t.height,this.maxZoom=t.maxZoom,this._maxxy=Math.pow(2,this.maxZoom)*Wr,ci(this,t),ui(this)}insideCheckXy(t){return!(t[0]<0||t[0]>this.width||t[1]<0||t[1]>this.height)}insideCheckSysCoord(t){return this.insideCheckXy(this.sysCoord2Xy(t))}modulateXyInside(t){const e=t[0]/(this.width/2)-1,n=t[1]/(this.height/2)-1,r=Math.max(Math.abs(e),Math.abs(n));return[(e/r+1)*this.width/2,(n/r+1)*this.height/2]}modulateSysCoordInside(t){const e=this.sysCoord2Xy(t),n=this.modulateXyInside(e);return this.xy2SysCoord(n)}xy2SysCoord(t){return[t[0]*(2*Ur)/this._maxxy-Ur,-1*(t[1]*(2*Ur)/this._maxxy-Ur)]}sysCoord2Xy(t){return[(t[0]+Ur)*this._maxxy/(2*Ur),(-t[1]+Ur)*this._maxxy/(2*Ur)]}}class ed extends Nf{constructor(t={}){super(Object.assign(t,{opaque:!1}))}static async createAsync(t){return new ed(t)}}const nd="https://weiwudi.example.com/api/";let rd,id;!function(){if("function"==typeof window.CustomEvent)return!1;function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.Event.prototype,window.CustomEvent=t}();class od{constructor(){this.listeners={}}addEventListener(t,e){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(e)}removeEventListener(t,e){if(!(t in this.listeners))return;const n=this.listeners[t];for(let t=0,r=n.length;t<r;t++)if(n[t]===e)return void n.splice(t,1)}dispatchEvent(t){if(!(t.type in this.listeners))return!0;const e=this.listeners[t.type].slice();for(let n=0,r=e.length;n<r;n++)e[n].call(this,t);return!t.defaultPrevented}}class sd extends od{static async registerSW(t,e){if(!("serviceWorker"in navigator))throw"Error: Service worker is not supported";try{const n=await navigator.serviceWorker.register(t,e),r=n.installing,i=n.waiting;return r&&("activated"!==r.state||i||window.location.reload(),r.addEventListener("statechange",(t=>{"activated"!==r.state||i||window.location.reload()}))),n.onupdatefound=()=>{n.update()},await sd.swCheck(),n}catch(t){throw`Error: Service worker registration failed with ${t}`}}static async swCheck(){return void 0!==id?id:(void 0===rd&&(rd=new Promise((async(t,e)=>{try{id=await fetch(`${nd}ping`),id=!!id}catch(t){id=!1}t(id)}))),rd)}static async registerMap(t,e){if(!await sd.swCheck())throw"Weiwudi service worker is not implemented.";let n;try{const r=["type","url","width","height","tileSize","minZoom","maxZoom","maxLng","maxLat","minLng","minLat"].reduce(((t,n)=>(void 0!==e[n]&&(e[n]instanceof Array?e[n].map((e=>{t.append(n,e)})):t.append(n,e[n])),t)),new URLSearchParams);r.append("mapID",t);const i=new URL(`${nd}add`);i.search=r;const o=await fetch(i.href);n=await o.text()}catch(t){throw t}if(n.match(/^Error: /))throw n;return new sd(t,JSON.parse(n))}static async retrieveMap(t){if(!await sd.swCheck())throw"Weiwudi service worker is not implemented.";let e;try{const n=await fetch(`${nd}info?mapID=${t}`);e=await n.text()}catch(t){throw t}if(e.match(/^Error: /))throw e;return console.log(e),new sd(t,JSON.parse(e))}static async removeMap(t){if(!await sd.swCheck())throw"Weiwudi service worker is not implemented.";let e;try{const n=await fetch(`${nd}delete?mapID=${t}`);e=await n.text()}catch(t){throw t}if(e.match(/^Error: /))throw e}constructor(t,e){if(super(),!t)throw"MapID is necessary.";this.mapID=t,e&&Object.assign(this,e),this.url=`${nd}cache/${t}/{z}/{x}/{y}`,this.listener=e=>{e.data.mapID===t&&this.dispatchEvent(new CustomEvent(e.data.type,{detail:e.data}))},navigator.serviceWorker.addEventListener("message",this.listener)}release(){navigator.serviceWorker.removeEventListener("message",this.listener),delete this.mapID}checkAspect(){if(!this.mapID)throw"This instance is already released."}async stats(){let t;this.checkAspect();try{const e=await fetch(`${nd}stats?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if("string"==typeof t&&t.match(/^Error: /))throw t;return JSON.parse(t)}async clean(){let t;this.checkAspect();try{const e=await fetch(`${nd}clean?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if(t.match(/^Error: /))throw t}async fetchAll(){let t;this.checkAspect();try{const e=await fetch(`${nd}fetchAll?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if(t.match(/^Error: /))throw t}async remove(){this.checkAspect(),await sd.removeMap(this.mapID),this.release()}async cancel(){let t;this.checkAspect();try{const e=await fetch(`${nd}cancel?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if(t.match(/^Error: /))throw t}}function ad(t,e,n){const r="string"==typeof t?t:t.getCode(),i="string"==typeof e?e:e.getCode();let o=Lr(t,e);if(o==br&&r!=i){const n=Lr(t,"EPSG:3857"),s=Lr("EPSG:3857",e);if(n==br&&"EPSG:3857"!=r)throw"Transform of Source projection is not defined.";if(s==br&&"EPSG:3857"!=i)throw"Transform of Distination projection is not defined.";o=function(n){return Ar(Ar(n,t,"EPSG:3857"),"EPSG:3857",e)};const a=function(n){return Ar(Ar(n,e,"EPSG:3857"),"EPSG:3857",t)};Or(t,e,o,a)}if(n)return o(n)}function ld(t,e,n={}){if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");const r=_f(t),i=wf(e),o=i.type,s=e.bbox;let a=i.coordinates;if(s&&!function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===o&&(a=[a]);let l=!1;for(let t=0;t<a.length&&!l;t++){const e=cd(r,a[t]);(0===e&&!n.ignoreBoundary||e)&&(l=!0)}return l}function cd(t,e){let n=0,r=0,i=0,o=0,s=0,a=0,l=0,c=0,u=null,h=null;const p=t[0],f=t[1],d=e.length;for(;n<d;n++){r=0;const d=e[n].length-1,g=e[n];for(u=g[0],s=u[0]-p,a=u[1]-f;r<d;r++)if(h=g[r+1],c=h[1]-f,a<0&&c<0||a>0&&c>0)u=h,a=c,s=u[0]-p;else{if(l=h[0]-t[0],c>0&&a<=0){if(o=s*c-l*a,o>0)i+=1;else if(0===o)return 0}else if(a>0&&c<=0){if(o=s*c-l*a,o<0)i+=1;else if(0===o)return 0}else if(0===c&&a<0){if(o=s*c-l*a,0===o)return 0}else if(0===a&&c<0){if(o=s*c-l*a,0===o)return 0}else if(0===a&&0===c){if(l<=0&&s>=0)return 0;if(s<=0&&l>=0)return 0}u=h,a=c,s=l}}return i%2!=0}function ud(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function hd(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return ud({type:"Polygon",coordinates:t},e,n)}function pd(t,e,n){if(null!==t)for(var r,i,o,s,a,l,c,u,h=0,p=0,f=t.type,d="FeatureCollection"===f,g="Feature"===f,v=d?t.features.length:1,m=0;m<v;m++){a=(u=!!(c=d?t.features[m].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var y=0;y<a;y++){var _=0,b=0;if(null!==(s=u?c.geometries[y]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,m,_,b))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,m,_,b))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,m,_,b))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,m,_,b))return!1;p++}b++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===pd(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var fd=n(2273);function dd(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(pd(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var r=fd(n,e.concavity);return r.length>3?hd([r]):null}var gd=n(2676);function vd(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function md(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return vd({type:"Polygon",coordinates:t},e,n)}function yd(t,e,n){return void 0===n&&(n={}),vd({type:"MultiPolygon",coordinates:t},e,n)}const _d=function(t,e){var n=wf(t),r=wf(e),i=t.properties||{},o=gd.difference(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?md(o[0],i):yd(o,i)};function bd(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function wd(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return bd({type:"Polygon",coordinates:t},e,n)}function xd(t,e,n){return void 0===n&&(n={}),bd({type:"MultiPolygon",coordinates:t},e,n)}function Sd(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Ed(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return Sd({type:"Polygon",coordinates:t},e,n)}function Cd(t,e,n){return void 0===n&&(n={}),Sd({type:"MultiPolygon",coordinates:t},e,n)}const Td=function(t,e,n){void 0===n&&(n={});var r=wf(t),i=wf(e),o=gd.union(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?Ed(o[0],n.properties):Cd(o,n.properties)};class Od{constructor(t){this._zlimit=0,this.initArcs(t)}initArcs(t){const e=[],n=[],r=t.map((t=>{const r=t?t.length:0;for(let i=0;i<r;i++)e.push(t[i][0]),n.push(t[i][1]);return r}));this.initXYData(r,e,n)}initXYData(t,e,n){const r=t.length;this._xx=new Float64Array(e),this._yy=new Float64Array(n),this._nn=new Uint32Array(t),this._zz=null,this._zlimit=0,this._filteredArcIter=null,this._ii=new Uint32Array(r);let i=0;for(let e=0;e<r;e++)this._ii[e]=i,i+=t[e];i==this._xx.length&&this._xx.length==this._yy.length||kd("ArcCollection#initXYData() Counting error"),this.initBounds(),this._arcIter=new Zd(this._xx,this._yy)}initBounds(){const t=this.calcArcBounds_(this._xx,this._yy,this._nn);this._bb=t.bb,this._allBounds=t.bounds}calcArcBounds_(t,e,n){const r=n.length,i=new Float64Array(4*r),o=new Wd;let s,a,l,c=0;for(let u=0;u<r;u++)s=n[u],s>0&&(a=4*u,l=qd(t,e,c,s),i[a++]=l[0],i[a++]=l[1],i[a++]=l[2],i[a]=l[3],c+=s,o.mergeBounds(l));return{bb:i,bounds:o}}getBounds(){return this._allBounds.clone()}forEachSegment(t){let e=0;for(let n=0,r=this.size();n<r;n++)e+=this.forEachArcSegment(n,t);return e}size(){return this._ii&&this._ii.length||0}forEachArcSegment(t,e){const n=t>=0,r=n?t:~t,i=this.getRetainedInterval(),o=this._nn[r],s=n?1:-1;let a=n?this._ii[r]:this._ii[r]+o-1,l=a,c=0;for(let t=1;t<o;t++)l+=s,(0===i||this._zz[l]>=i)&&(e(a,l,this._xx,this._yy),a=l,c++);return c}getRetainedInterval(){return this._zlimit}getVertexData(){return{xx:this._xx,yy:this._yy,zz:this._zz,bb:this._bb,nn:this._nn,ii:this._ii}}getUint32Array(t){const e=4*t;return(!this.buf||this.buf.byteLength<e)&&(this.buf=new ArrayBuffer(e)),new Uint32Array(this.buf,0,t)}getAvgSegment2(){let t=0,e=0;const n=this.forEachSegment(((n,r,i,o)=>{t+=Math.abs(i[n]-i[r]),e+=Math.abs(o[n]-o[r])}));return[t/n||0,e/n||0]}calcSegmentIntersectionStripeCount(){const t=this.getBounds().height(),e=this.getAvgSegment2()[1];let n=1;return e>0&&t>0&&(n=Math.ceil(t/e/20)),n||1}findSegmentIntersections(){const t=this.getBounds(),e=t.ymin,n=t.ymax-e,r=this.calcSegmentIntersectionStripeCount(),i=new Uint32Array(r),o=r>1?t=>Math.floor((r-1)*(t-e)/n):()=>0;let s,a;this.forEachSegment(((t,e,n,r)=>{let s=o(r[t]);const a=o(r[e]);for(;i[s]=i[s]+2,s!=a;)s+=a>s?1:-1}));const l=this.getUint32Array(function(t,e){Md(t)||kd("utils.sum() expects an array, received:",t);let n,r=0,i=0;for(let e=0,o=t.length;e<o;e++)n=t[e],n?r+=n:isNaN(n)&&i++;e&&(e.nan=i);return r}(i));let c=0;const u=[];!function(t,e,n){if(!Md(t))throw new Error(`#forEach() takes an array-like argument. ${t}`);for(let r=0,i=t.length;r<i;r++)e.call(n,t[r],r)}(i,(t=>{const e=c;c+=t,u.push(l.subarray(e,c))})),function(t,e){for(let n=0,r=t.length;n<r;n++)t[n]=e}(i,0),this.forEachSegment(((t,e,n,r)=>{let s=o(r[t]);const a=o(r[e]);let l,c;for(;l=i[s],i[s]=l+2,c=u[s],c[l]=t,c[l+1]=e,s!=a;)s+=a>s?1:-1}));const h=this.getVertexData(),p=[];let f;for(s=0;s<r;s++)for(f=Pd(u[s],h.xx,h.yy),a=0;a<f.length;a++)p.push(f[a]);return Ud(p)}}function kd(...t){const e=t.join(" ");throw new Error(e)}function Md(t){return!!t&&(!!function(t){return Array.isArray(t)}(t)||!function(t){return null!=t&&t.toString===String.prototype.toString}(t)&&(0===t.length||t.length>0))}function Pd(t,e,n){const r=t.length-2,i=[];let o,s,a,l,c,u,h,p,f,d,g,v,m,y,_,b,w;for(!function(t,e){(function(t,e){for(let n=0,r=e.length;n<r;n+=2)t[e[n]]>t[e[n+1]]&&Bd(e,n,n+1)})(t,e),zd(t,e,0,e.length-2)}(e,t),b=0;b<r;){for(o=t[b],s=t[b+1],c=e[o],u=e[s],f=n[o],d=n[s],w=b;w<r&&(w+=2,a=t[w],h=e[a],!(u<h));){if(g=n[a],l=t[w+1],p=e[l],v=n[l],f>=g){if(f>v&&d>g&&d>v)continue}else if(f<v&&d<g&&d<v)continue;o!=a&&o!=l&&s!=a&&s!=l&&(m=Ld(c,f,u,d,h,g,p,v),m&&(y=[o,s],_=[a,l],i.push(Xd(m,y,_,e,n)),4==m.length&&i.push(Xd(m.slice(2),y,_,e,n))))}b+=2}return i}function Ld(t,e,n,r,i,o,s,a){const l=function(t,e,n,r,i,o,s,a){return Ad(t,e,n,r,i,o)*Ad(t,e,n,r,s,a)<=0&&Ad(i,o,s,a,t,e)*Ad(i,o,s,a,n,r)<=0}(t,e,n,r,i,o,s,a);let c=null;return l&&(c=function(t,e,n,r,i,o,s,a){let l,c=Rd(t,e,n,r,i,o,s,a);c&&(l=function(t,e,...n){let r,i=-1,o=1/0;for(let s=0,a=0,l=n.length;a<l;s++,a+=2)r=jd(t,e,n[a],n[a+1]),r<o&&(o=r,i=s);return i}(c[0],c[1],t,e,n,r,i,o,s,a),1==l?c=Rd(n,r,t,e,i,o,s,a):2==l?c=Rd(i,o,s,a,t,e,n,r):3==l&&(c=Rd(s,a,i,o,t,e,n,r)));c&&function(t,e,n,r,i,o,s,a,l){let c=t[0],u=t[1];c=Fd(c,e,r),c=Fd(c,o,a),u=Fd(u,n,i),u=Fd(u,s,l),t[0]=c,t[1]=u}(c,t,e,n,r,i,o,s,a);return c}(t,e,n,r,i,o,s,a),c?function(t,e,n,r,i,o,s,a){return t==i&&e==o||t==s&&e==a||n==i&&r==o||n==s&&r==a}(t,e,n,r,i,o,s,a)&&(c=null):c=function(t,e,n,r,i,o,s,a){const l=Math.min(t,n,i,s),c=Math.max(t,n,i,s),u=Math.min(e,r,o,a),h=Math.max(e,r,o,a),p=h-u>c-l;let f=[];(p?Nd(e,u,h):Nd(t,l,c))&&f.push(t,e);(p?Nd(r,u,h):Nd(n,l,c))&&f.push(n,r);(p?Nd(o,u,h):Nd(i,l,c))&&f.push(i,o);(p?Nd(a,u,h):Nd(s,l,c))&&f.push(s,a);(2!=f.length&&4!=f.length||4==f.length&&f[0]==f[2]&&f[1]==f[3])&&(f=null);return f}(t,e,n,r,i,o,s,a)),c}function Ad(t,e,n,r,i,o){return Id(t-i,e-o,n-i,r-o)}function Id(t,e,n,r){return t*r-e*n}function Rd(t,e,n,r,i,o,s,a){const l=Id(n-t,r-e,s-i,a-o);let c;if(0===l)return null;const u=Ad(i,o,s,a,t,e)/l;return c=l<=1e-18&&l>=-1e-18?function(t,e,n,r,i,o,s,a){let l=null;Dd(t,i,s)||Dd(e,o,a)?Dd(n,i,s)||Dd(r,o,a)?Dd(i,t,n)||Dd(o,e,r)?Dd(s,t,n)||Dd(a,e,r)||(l=[s,a]):l=[i,o]:l=[n,r]:l=[t,e];return l}(t,e,n,r,i,o,s,a):[t+u*(n-t),e+u*(r-e)],c}function Dd(t,e,n){let r;return r=e<n?t<e||t>n:e>n?t>e||t<n:t!=e,r}function jd(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function Fd(t,e,n){let r;return Dd(t,e,n)&&(r=Math.abs(t-e)<Math.abs(t-n)?e:n,Math.abs(t-r),t=r),t}function Nd(t,e,n){return t>e&&t<n}function Bd(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function zd(t,e,n,r){let i,o,s=n,a=r;for(;s<r;){for(i=t[e[n+r>>2<<1]];s<=a;){for(;t[e[s]]<i;)s+=2;for(;t[e[a]]>i;)a-=2;s<=a&&(o=e[s],e[s]=e[a],e[a]=o,o=e[s+1],e[s+1]=e[a+1],e[a+1]=o,s+=2,a-=2)}if(a-n<40?Gd(t,e,n,a):zd(t,e,n,a),r-s<40)return void Gd(t,e,s,r);n=s,a=r}}function Gd(t,e,n,r){let i,o;for(let s=n+2;s<=r;s+=2){let r;for(i=e[s],o=e[s+1],r=s-2;r>=n&&t[i]<t[e[r]];r-=2)e[r+2]=e[r],e[r+3]=e[r+1];e[r+2]=i,e[r+3]=o}}function Xd(t,e,n,r,i){const o=t[0],s=t[1];e=Hd(o,s,e[0],e[1],r,i),n=Hd(o,s,n[0],n[1],r,i);const a=e[0]<n[0]?e:n;return{x:o,y:s,a,b:a==e?n:e}}function Hd(t,e,n,r,i,o){let s=n<r?n:r,a=s===n?r:n;return i[s]==t&&o[s]==e?a=s:i[a]==t&&o[a]==e&&(s=a),[s,a]}function Ud(t){const e={};return t.filter((t=>{const n=function(t){return`${t.a.join(",")};${t.b.join(",")}`}(t);return!(n in e)&&(e[n]=!0,!0)}))}class Zd{constructor(t,e){this._i=0,this._n=0,this._inc=1,this.i=0,this.x=0,this.y=0,this._xx=t,this._yy=e}}function qd(t,e,n,r){let i=0|n;const o=isNaN(r)?t.length-i:r+i;let s,a,l,c,u,h;if(!(o>0))return[void 0,void 0,void 0,void 0];for(l=u=t[i],c=h=e[i],i++;i<o;i++)s=t[i],a=e[i],s<l&&(l=s),s>u&&(u=s),a<c&&(c=a),a>h&&(h=a);return[l,c,u,h]}class Wd{constructor(...t){t.length>0&&this.setBounds(t)}cloneBounds(){return this.clone()}clone(){return new Wd(this.xmin,this.ymin,this.xmax,this.ymax)}width(){return this.xmax-this.xmin||0}height(){return this.ymax-this.ymin||0}setBounds(t,e,n,r){return 1==arguments.length&&(Md(t)?(e=t[1],n=t[2],r=t[3],t=t[0]):(e=t.ymin,n=t.xmax,r=t.ymax,t=t.xmin)),this.xmin=t,this.ymin=e,this.xmax=n,this.ymax=r,(t>n||e>r)&&this.update(),this}update(){let t;this.xmin>this.xmax&&(t=this.xmin,this.xmin=this.xmax,this.xmax=t),this.ymin>this.ymax&&(t=this.ymin,this.ymin=this.ymax,this.ymax=t)}mergeBounds(t,...e){let n,r,i,o;return t instanceof Wd?(n=t.xmin,r=t.ymin,i=t.xmax,o=t.ymax):3==e.length?(n=t,r=e[0],i=e[1],o=e[2]):4==t.length?(n=t[0],r=t[1],i=t[2],o=t[3]):kd("Bounds#mergeBounds() invalid argument:",t),void 0===this.xmin?this.setBounds(n,r,i,o):(n<this.xmin&&(this.xmin=n),r<this.ymin&&(this.ymin=r),i>this.xmax&&(this.xmax=i),o>this.ymax&&(this.ymax=o)),this}}const Yd=134217729;function Vd(t,e,n,r,i){let o,s,a,l,c=e[0],u=r[0],h=0,p=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=r[++p]);let f=0;if(h<t&&p<n)for(u>c==u>-c?(s=c+o,a=o-(s-c),c=e[++h]):(s=u+o,a=o-(s-u),u=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)u>c==u>-c?(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h]):(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function Kd(t){return new Float64Array(t)}const $d=Kd(4),Jd=Kd(8),Qd=Kd(12),tg=Kd(16),eg=Kd(4);function ng(t,e,n,r,i,o){const s=(e-o)*(n-i),a=(t-i)*(r-o),l=s-a;if(0===s||0===a||s>0!=a>0)return l;const c=Math.abs(s+a);return Math.abs(l)>=33306690738754716e-32*c?l:-function(t,e,n,r,i,o,s){let a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E;const C=t-i,T=n-i,O=e-o,k=r-o;b=C*k,p=Yd*C,f=p-(p-C),d=C-f,p=Yd*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=O*T,p=Yd*O,f=p-(p-O),d=O-f,p=Yd*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,$d[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,$d[1]=_-(m+h)+(h-x),E=y+m,h=E-y,$d[2]=y-(E-h)+(m-h),$d[3]=E;let M=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,$d),P=22204460492503146e-32*s;if(M>=P||-M>=P)return M;if(h=t-C,a=t-(C+h)+(h-i),h=n-T,c=n-(T+h)+(h-i),h=e-O,l=e-(O+h)+(h-o),h=r-k,u=r-(k+h)+(h-o),0===a&&0===l&&0===c&&0===u)return M;if(P=11093356479670487e-47*s+33306690738754706e-32*Math.abs(M),M+=C*u+k*a-(O*c+T*l),M>=P||-M>=P)return M;b=a*k,p=Yd*a,f=p-(p-a),d=a-f,p=Yd*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=l*T,p=Yd*l,f=p-(p-l),d=l-f,p=Yd*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,eg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,eg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,eg[2]=y-(E-h)+(m-h),eg[3]=E;const L=Vd(4,$d,4,eg,Jd);b=C*u,p=Yd*C,f=p-(p-C),d=C-f,p=Yd*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=O*c,p=Yd*O,f=p-(p-O),d=O-f,p=Yd*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,eg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,eg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,eg[2]=y-(E-h)+(m-h),eg[3]=E;const A=Vd(L,Jd,4,eg,Qd);b=a*u,p=Yd*a,f=p-(p-a),d=a-f,p=Yd*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=l*c,p=Yd*l,f=p-(p-l),d=l-f,p=Yd*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,eg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,eg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,eg[2]=y-(E-h)+(m-h),eg[3]=E;const I=Vd(A,Qd,4,eg,tg);return tg[I-1]}(t,e,n,r,i,o,c)}Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(8),Kd(8),Kd(8),Kd(4),Kd(8),Kd(8),Kd(8),Kd(12);Kd(192),Kd(192);Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(4),Kd(4),Kd(4),Kd(8),Kd(16),Kd(16),Kd(16),Kd(32),Kd(32),Kd(48),Kd(64);Kd(1152),Kd(1152);Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(1152),Kd(1152),Kd(1152),Kd(1152),Kd(1152),Kd(2304),Kd(2304),Kd(3456),Kd(5760),Kd(8),Kd(8),Kd(8),Kd(16),Kd(24),Kd(48),Kd(48),Kd(96),Kd(192),Kd(384),Kd(384),Kd(384),Kd(768);Kd(96),Kd(96),Kd(96),Kd(1152);const rg=Math.pow(2,-52),ig=new Uint32Array(512);class og{static from(t,e=hg,n=pg){const r=t.length,i=new Float64Array(2*r);for(let o=0;o<r;o++){const r=t[o];i[2*o]=e(r),i[2*o+1]=n(r)}return new og(i)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let s=1/0,a=1/0,l=-1/0,c=-1/0;for(let e=0;e<o;e++){const n=t[2*e],r=t[2*e+1];n<s&&(s=n),r<a&&(a=r),n>l&&(l=n),r>c&&(c=r),this._ids[e]=e}const u=(s+l)/2,h=(a+c)/2;let p,f,d,g=1/0;for(let e=0;e<o;e++){const n=sg(u,h,t[2*e],t[2*e+1]);n<g&&(p=e,g=n)}const v=t[2*p],m=t[2*p+1];g=1/0;for(let e=0;e<o;e++){if(e===p)continue;const n=sg(v,m,t[2*e],t[2*e+1]);n<g&&n>0&&(f=e,g=n)}let y=t[2*f],_=t[2*f+1],b=1/0;for(let e=0;e<o;e++){if(e===p||e===f)continue;const n=lg(v,m,y,_,t[2*e],t[2*e+1]);n<b&&(d=e,b=n)}let w=t[2*d],x=t[2*d+1];if(b===1/0){for(let e=0;e<o;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];cg(this._ids,this._dists,0,o-1);const e=new Uint32Array(o);let n=0;for(let t=0,r=-1/0;t<o;t++){const i=this._ids[t];this._dists[i]>r&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ng(v,m,y,_,w,x)<0){const t=f,e=y,n=_;f=d,y=w,_=x,d=t,w=e,x=n}const S=function(t,e,n,r,i,o){const s=n-t,a=r-e,l=i-t,c=o-e,u=s*s+a*a,h=l*l+c*c,p=.5/(s*c-a*l);return{x:t+(c*u-a*h)*p,y:e+(s*h-l*u)*p}}(v,m,y,_,w,x);this._cx=S.x,this._cy=S.y;for(let e=0;e<o;e++)this._dists[e]=sg(t[2*e],t[2*e+1],S.x,S.y);cg(this._ids,this._dists,0,o-1),this._hullStart=p;let E=3;n[p]=e[d]=f,n[f]=e[p]=d,n[d]=e[f]=p,r[p]=0,r[f]=1,r[d]=2,i.fill(-1),i[this._hashKey(v,m)]=p,i[this._hashKey(y,_)]=f,i[this._hashKey(w,x)]=d,this.trianglesLen=0,this._addTriangle(p,f,d,-1,-1,-1);for(let o,s,a=0;a<this._ids.length;a++){const l=this._ids[a],c=t[2*l],u=t[2*l+1];if(a>0&&Math.abs(c-o)<=rg&&Math.abs(u-s)<=rg)continue;if(o=c,s=u,l===p||l===f||l===d)continue;let h=0;for(let t=0,e=this._hashKey(c,u);t<this._hashSize&&(h=i[(e+t)%this._hashSize],-1===h||h===n[h]);t++);h=e[h];let g,v=h;for(;g=n[v],ng(c,u,t[2*v],t[2*v+1],t[2*g],t[2*g+1])>=0;)if(v=g,v===h){v=-1;break}if(-1===v)continue;let m=this._addTriangle(v,l,n[v],-1,-1,r[v]);r[l]=this._legalize(m+2),r[v]=m,E++;let y=n[v];for(;g=n[y],ng(c,u,t[2*y],t[2*y+1],t[2*g],t[2*g+1])<0;)m=this._addTriangle(y,l,g,r[l],-1,r[y]),r[l]=this._legalize(m+2),n[y]=y,E--,y=g;if(v===h)for(;g=e[v],ng(c,u,t[2*g],t[2*g+1],t[2*v],t[2*v+1])<0;)m=this._addTriangle(g,l,v,-1,r[v],r[g]),this._legalize(m+2),r[g]=m,n[v]=v,E--,v=g;this._hullStart=e[l]=v,n[v]=e[y]=l,n[l]=y,i[this._hashKey(c,u)]=l,i[this._hashKey(t[2*v],t[2*v+1])]=v}this.hull=new Uint32Array(E);for(let t=0,e=this._hullStart;t<E;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===i)break;t=ig[--i];continue}const l=s-s%3,c=a+(t+1)%3,u=l+(s+2)%3,h=e[o],p=e[t],f=e[c],d=e[u];if(ag(r[2*h],r[2*h+1],r[2*p],r[2*p+1],r[2*f],r[2*f+1],r[2*d],r[2*d+1])){e[t]=d,e[s]=h;const r=n[u];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===u){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(s,n[o]),this._link(o,u);const a=l+(s+1)%3;i<ig.length&&(ig[i++]=a)}else{if(0===i)break;t=ig[--i]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,r),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function sg(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function ag(t,e,n,r,i,o,s,a){const l=t-s,c=e-a,u=n-s,h=r-a,p=i-s,f=o-a,d=u*u+h*h,g=p*p+f*f;return l*(h*g-d*f)-c*(u*g-d*p)+(l*l+c*c)*(u*f-h*p)<0}function lg(t,e,n,r,i,o){const s=n-t,a=r-e,l=i-t,c=o-e,u=s*s+a*a,h=l*l+c*c,p=.5/(s*c-a*l),f=(c*u-a*h)*p,d=(s*h-l*u)*p;return f*f+d*d}function cg(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],o=e[r];let s=i-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;ug(t,n+r>>1,i),e[t[n]]>e[t[r]]&&ug(t,n,r),e[t[i]]>e[t[r]]&&ug(t,i,r),e[t[n]]>e[t[i]]&&ug(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]<a);do{o--}while(e[t[o]]>a);if(o<i)break;ug(t,i,o)}t[n+1]=t[o],t[o]=s,r-i+1>=o-n?(cg(t,e,i,r),cg(t,e,n,o-1)):(cg(t,e,n,o-1),cg(t,e,i,r))}}function ug(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function hg(t){return t[0]}function pg(t){return t[1]}const fg=134217729,dg=33306690738754706e-32;function gg(t,e,n,r,i){let o,s,a,l,c=e[0],u=r[0],h=0,p=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=r[++p]);let f=0;if(h<t&&p<n)for(u>c==u>-c?(s=c+o,a=o-(s-c),c=e[++h]):(s=u+o,a=o-(s-u),u=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)u>c==u>-c?(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h]):(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function vg(t,e,n,r,i,o,s,a){return gg(gg(t,e,n,r,s),s,i,o,a)}function mg(t,e,n,r){let i,o,s,a,l,c,u,h,p,f,d;u=fg*n,f=u-(u-n),d=n-f;let g=e[0];i=g*n,u=fg*g,h=u-(u-g),p=g-h,s=p*d-(i-h*f-p*f-h*d);let v=0;0!==s&&(r[v++]=s);for(let m=1;m<t;m++)g=e[m],a=g*n,u=fg*g,h=u-(u-g),p=g-h,l=p*d-(a-h*f-p*f-h*d),o=i+l,c=o-i,s=i-(o-c)+(l-c),0!==s&&(r[v++]=s),i=a+o,s=o-(i-a),0!==s&&(r[v++]=s);return 0===i&&0!==v||(r[v++]=i),v}function yg(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function _g(t){return new Float64Array(t)}const bg=_g(4),wg=_g(8),xg=_g(12),Sg=_g(16),Eg=_g(4);function Cg(t,e,n,r,i,o){const s=(e-o)*(n-i),a=(t-i)*(r-o),l=s-a;if(0===s||0===a||s>0!=a>0)return l;const c=Math.abs(s+a);return Math.abs(l)>=33306690738754716e-32*c?l:-function(t,e,n,r,i,o,s){let a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E;const C=t-i,T=n-i,O=e-o,k=r-o;b=C*k,p=fg*C,f=p-(p-C),d=C-f,p=fg*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=O*T,p=fg*O,f=p-(p-O),d=O-f,p=fg*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,bg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,bg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,bg[2]=y-(E-h)+(m-h),bg[3]=E;let M=yg(4,bg),P=22204460492503146e-32*s;if(M>=P||-M>=P)return M;if(h=t-C,a=t-(C+h)+(h-i),h=n-T,c=n-(T+h)+(h-i),h=e-O,l=e-(O+h)+(h-o),h=r-k,u=r-(k+h)+(h-o),0===a&&0===l&&0===c&&0===u)return M;if(P=11093356479670487e-47*s+dg*Math.abs(M),M+=C*u+k*a-(O*c+T*l),M>=P||-M>=P)return M;b=a*k,p=fg*a,f=p-(p-a),d=a-f,p=fg*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=l*T,p=fg*l,f=p-(p-l),d=l-f,p=fg*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Eg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Eg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Eg[2]=y-(E-h)+(m-h),Eg[3]=E;const L=gg(4,bg,4,Eg,wg);b=C*u,p=fg*C,f=p-(p-C),d=C-f,p=fg*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=O*c,p=fg*O,f=p-(p-O),d=O-f,p=fg*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Eg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Eg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Eg[2]=y-(E-h)+(m-h),Eg[3]=E;const A=gg(L,wg,4,Eg,xg);b=a*u,p=fg*a,f=p-(p-a),d=a-f,p=fg*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=l*c,p=fg*l,f=p-(p-l),d=l-f,p=fg*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Eg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Eg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Eg[2]=y-(E-h)+(m-h),Eg[3]=E;const I=gg(A,xg,4,Eg,Sg);return Sg[I-1]}(t,e,n,r,i,o,c)}_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(8),_g(8),_g(8),_g(4),_g(8),_g(8),_g(8),_g(12);_g(192),_g(192);const Tg=_g(4),Og=_g(4),kg=_g(4),Mg=_g(4),Pg=_g(4),Lg=_g(4),Ag=_g(4),Ig=_g(4),Rg=_g(8),Dg=_g(8),jg=_g(8),Fg=_g(8),Ng=_g(8),Bg=_g(8),zg=_g(8),Gg=_g(8),Xg=_g(8),Hg=_g(4),Ug=_g(4),Zg=_g(4),qg=_g(8),Wg=_g(16),Yg=_g(16),Vg=_g(16),Kg=_g(32),$g=_g(32),Jg=_g(48),Qg=_g(64);let tv=_g(1152),ev=_g(1152);function nv(t,e,n){t=gg(t,tv,e,n,ev);const r=tv;return tv=ev,ev=r,t}function rv(t,e,n,r,i,o,s,a){const l=t-s,c=n-s,u=i-s,h=e-a,p=r-a,f=o-a,d=c*f,g=u*p,v=l*l+h*h,m=u*h,y=l*f,_=c*c+p*p,b=l*p,w=c*h,x=u*u+f*f,S=v*(d-g)+_*(m-y)+x*(b-w),E=(Math.abs(d)+Math.abs(g))*v+(Math.abs(m)+Math.abs(y))*_+(Math.abs(b)+Math.abs(w))*x,C=11102230246251577e-31*E;return S>C||-S>C?S:function(t,e,n,r,i,o,s,a,l){let c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E,C,T,O,k,M,P,L,A,I,R,D,j,F,N,B,z,G,X,H;const U=t-s,Z=n-s,q=i-s,W=e-a,Y=r-a,V=o-a;B=Z*V,L=fg*Z,A=L-(L-Z),I=Z-A,L=fg*V,R=L-(L-V),D=V-R,z=I*D-(B-A*R-I*R-A*D),G=q*Y,L=fg*q,A=L-(L-q),I=q-A,L=fg*Y,R=L-(L-Y),D=Y-R,X=I*D-(G-A*R-I*R-A*D),j=z-X,P=z-j,Tg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Tg[1]=N-(j+P)+(P-G),H=F+j,P=H-F,Tg[2]=F-(H-P)+(j-P),Tg[3]=H,B=q*W,L=fg*q,A=L-(L-q),I=q-A,L=fg*W,R=L-(L-W),D=W-R,z=I*D-(B-A*R-I*R-A*D),G=U*V,L=fg*U,A=L-(L-U),I=U-A,L=fg*V,R=L-(L-V),D=V-R,X=I*D-(G-A*R-I*R-A*D),j=z-X,P=z-j,Og[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Og[1]=N-(j+P)+(P-G),H=F+j,P=H-F,Og[2]=F-(H-P)+(j-P),Og[3]=H,B=U*Y,L=fg*U,A=L-(L-U),I=U-A,L=fg*Y,R=L-(L-Y),D=Y-R,z=I*D-(B-A*R-I*R-A*D),G=Z*W,L=fg*Z,A=L-(L-Z),I=Z-A,L=fg*W,R=L-(L-W),D=W-R,X=I*D-(G-A*R-I*R-A*D),j=z-X,P=z-j,kg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,kg[1]=N-(j+P)+(P-G),H=F+j,P=H-F,kg[2]=F-(H-P)+(j-P),kg[3]=H,c=gg(gg(gg(mg(mg(4,Tg,U,qg),qg,U,Wg),Wg,mg(mg(4,Tg,W,qg),qg,W,Yg),Yg,Kg),Kg,gg(mg(mg(4,Og,Z,qg),qg,Z,Wg),Wg,mg(mg(4,Og,Y,qg),qg,Y,Yg),Yg,$g),$g,Qg),Qg,gg(mg(mg(4,kg,q,qg),qg,q,Wg),Wg,mg(mg(4,kg,V,qg),qg,V,Yg),Yg,Kg),Kg,tv);let K=yg(c,tv),$=4440892098500632e-31*l;if(K>=$||-K>=$)return K;if(P=t-U,u=t-(U+P)+(P-s),P=e-W,f=e-(W+P)+(P-a),P=n-Z,h=n-(Z+P)+(P-s),P=r-Y,d=r-(Y+P)+(P-a),P=i-q,p=i-(q+P)+(P-s),P=o-V,g=o-(V+P)+(P-a),0===u&&0===h&&0===p&&0===f&&0===d&&0===g)return K;if($=5423418723394464e-46*l+dg*Math.abs(K),K+=(U*U+W*W)*(Z*g+V*h-(Y*p+q*d))+2*(U*u+W*f)*(Z*V-Y*q)+((Z*Z+Y*Y)*(q*f+W*p-(V*u+U*g))+2*(Z*h+Y*d)*(q*W-V*U))+((q*q+V*V)*(U*d+Y*u-(W*h+Z*f))+2*(q*p+V*g)*(U*Y-W*Z)),K>=$||-K>=$)return K;if(0===h&&0===d&&0===p&&0===g||(B=U*U,L=fg*U,A=L-(L-U),I=U-A,z=I*I-(B-A*A-(A+A)*I),G=W*W,L=fg*W,A=L-(L-W),I=W-A,X=I*I-(G-A*A-(A+A)*I),j=z+X,P=j-z,Mg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Mg[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Mg[2]=F-(H-P)+(j-P),Mg[3]=H),0===p&&0===g&&0===u&&0===f||(B=Z*Z,L=fg*Z,A=L-(L-Z),I=Z-A,z=I*I-(B-A*A-(A+A)*I),G=Y*Y,L=fg*Y,A=L-(L-Y),I=Y-A,X=I*I-(G-A*A-(A+A)*I),j=z+X,P=j-z,Pg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Pg[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Pg[2]=F-(H-P)+(j-P),Pg[3]=H),0===u&&0===f&&0===h&&0===d||(B=q*q,L=fg*q,A=L-(L-q),I=q-A,z=I*I-(B-A*A-(A+A)*I),G=V*V,L=fg*V,A=L-(L-V),I=V-A,X=I*I-(G-A*A-(A+A)*I),j=z+X,P=j-z,Lg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Lg[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Lg[2]=F-(H-P)+(j-P),Lg[3]=H),0!==u&&(v=mg(4,Tg,u,Rg),c=nv(c,vg(mg(v,Rg,2*U,Wg),Wg,mg(mg(4,Lg,u,qg),qg,Y,Yg),Yg,mg(mg(4,Pg,u,qg),qg,-V,Vg),Vg,Kg,Jg),Jg)),0!==f&&(m=mg(4,Tg,f,Dg),c=nv(c,vg(mg(m,Dg,2*W,Wg),Wg,mg(mg(4,Pg,f,qg),qg,q,Yg),Yg,mg(mg(4,Lg,f,qg),qg,-Z,Vg),Vg,Kg,Jg),Jg)),0!==h&&(y=mg(4,Og,h,jg),c=nv(c,vg(mg(y,jg,2*Z,Wg),Wg,mg(mg(4,Mg,h,qg),qg,V,Yg),Yg,mg(mg(4,Lg,h,qg),qg,-W,Vg),Vg,Kg,Jg),Jg)),0!==d&&(_=mg(4,Og,d,Fg),c=nv(c,vg(mg(_,Fg,2*Y,Wg),Wg,mg(mg(4,Lg,d,qg),qg,U,Yg),Yg,mg(mg(4,Mg,d,qg),qg,-q,Vg),Vg,Kg,Jg),Jg)),0!==p&&(b=mg(4,kg,p,Ng),c=nv(c,vg(mg(b,Ng,2*q,Wg),Wg,mg(mg(4,Pg,p,qg),qg,W,Yg),Yg,mg(mg(4,Mg,p,qg),qg,-Y,Vg),Vg,Kg,Jg),Jg)),0!==g&&(w=mg(4,kg,g,Bg),c=nv(c,vg(mg(w,Bg,2*V,Wg),Wg,mg(mg(4,Mg,g,qg),qg,Z,Yg),Yg,mg(mg(4,Pg,g,qg),qg,-U,Vg),Vg,Kg,Jg),Jg)),0!==u||0!==f){if(0!==h||0!==d||0!==p||0!==g?(B=h*V,L=fg*h,A=L-(L-h),I=h-A,L=fg*V,R=L-(L-V),D=V-R,z=I*D-(B-A*R-I*R-A*D),G=Z*g,L=fg*Z,A=L-(L-Z),I=Z-A,L=fg*g,R=L-(L-g),D=g-R,X=I*D-(G-A*R-I*R-A*D),j=z+X,P=j-z,Ag[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ag[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Ag[2]=F-(H-P)+(j-P),Ag[3]=H,B=p*-Y,L=fg*p,A=L-(L-p),I=p-A,L=fg*-Y,R=L-(L- -Y),D=-Y-R,z=I*D-(B-A*R-I*R-A*D),G=q*-d,L=fg*q,A=L-(L-q),I=q-A,L=fg*-d,R=L-(L- -d),D=-d-R,X=I*D-(G-A*R-I*R-A*D),j=z+X,P=j-z,Ig[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ig[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Ig[2]=F-(H-P)+(j-P),Ig[3]=H,S=gg(4,Ag,4,Ig,Gg),B=h*g,L=fg*h,A=L-(L-h),I=h-A,L=fg*g,R=L-(L-g),D=g-R,z=I*D-(B-A*R-I*R-A*D),G=p*d,L=fg*p,A=L-(L-p),I=p-A,L=fg*d,R=L-(L-d),D=d-R,X=I*D-(G-A*R-I*R-A*D),j=z-X,P=z-j,Ug[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Ug[1]=N-(j+P)+(P-G),H=F+j,P=H-F,Ug[2]=F-(H-P)+(j-P),Ug[3]=H,T=4):(Gg[0]=0,S=1,Ug[0]=0,T=1),0!==u){const t=mg(S,Gg,u,Vg);c=nv(c,gg(mg(v,Rg,u,Wg),Wg,mg(t,Vg,2*U,Kg),Kg,Jg),Jg);const e=mg(T,Ug,u,qg);c=nv(c,vg(mg(e,qg,2*U,Wg),Wg,mg(e,qg,u,Yg),Yg,mg(t,Vg,u,Kg),Kg,$g,Qg),Qg),0!==d&&(c=nv(c,mg(mg(4,Lg,u,qg),qg,d,Wg),Wg)),0!==g&&(c=nv(c,mg(mg(4,Pg,-u,qg),qg,g,Wg),Wg))}if(0!==f){const t=mg(S,Gg,f,Vg);c=nv(c,gg(mg(m,Dg,f,Wg),Wg,mg(t,Vg,2*W,Kg),Kg,Jg),Jg);const e=mg(T,Ug,f,qg);c=nv(c,vg(mg(e,qg,2*W,Wg),Wg,mg(e,qg,f,Yg),Yg,mg(t,Vg,f,Kg),Kg,$g,Qg),Qg)}}if(0!==h||0!==d){if(0!==p||0!==g||0!==u||0!==f?(B=p*W,L=fg*p,A=L-(L-p),I=p-A,L=fg*W,R=L-(L-W),D=W-R,z=I*D-(B-A*R-I*R-A*D),G=q*f,L=fg*q,A=L-(L-q),I=q-A,L=fg*f,R=L-(L-f),D=f-R,X=I*D-(G-A*R-I*R-A*D),j=z+X,P=j-z,Ag[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ag[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Ag[2]=F-(H-P)+(j-P),Ag[3]=H,k=-V,M=-g,B=u*k,L=fg*u,A=L-(L-u),I=u-A,L=fg*k,R=L-(L-k),D=k-R,z=I*D-(B-A*R-I*R-A*D),G=U*M,L=fg*U,A=L-(L-U),I=U-A,L=fg*M,R=L-(L-M),D=M-R,X=I*D-(G-A*R-I*R-A*D),j=z+X,P=j-z,Ig[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ig[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Ig[2]=F-(H-P)+(j-P),Ig[3]=H,E=gg(4,Ag,4,Ig,Xg),B=p*f,L=fg*p,A=L-(L-p),I=p-A,L=fg*f,R=L-(L-f),D=f-R,z=I*D-(B-A*R-I*R-A*D),G=u*g,L=fg*u,A=L-(L-u),I=u-A,L=fg*g,R=L-(L-g),D=g-R,X=I*D-(G-A*R-I*R-A*D),j=z-X,P=z-j,Zg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Zg[1]=N-(j+P)+(P-G),H=F+j,P=H-F,Zg[2]=F-(H-P)+(j-P),Zg[3]=H,O=4):(Xg[0]=0,E=1,Zg[0]=0,O=1),0!==h){const t=mg(E,Xg,h,Vg);c=nv(c,gg(mg(y,jg,h,Wg),Wg,mg(t,Vg,2*Z,Kg),Kg,Jg),Jg);const e=mg(O,Zg,h,qg);c=nv(c,vg(mg(e,qg,2*Z,Wg),Wg,mg(e,qg,h,Yg),Yg,mg(t,Vg,h,Kg),Kg,$g,Qg),Qg),0!==g&&(c=nv(c,mg(mg(4,Mg,h,qg),qg,g,Wg),Wg)),0!==f&&(c=nv(c,mg(mg(4,Lg,-h,qg),qg,f,Wg),Wg))}if(0!==d){const t=mg(E,Xg,d,Vg);c=nv(c,gg(mg(_,Fg,d,Wg),Wg,mg(t,Vg,2*Y,Kg),Kg,Jg),Jg);const e=mg(O,Zg,d,qg);c=nv(c,vg(mg(e,qg,2*Y,Wg),Wg,mg(e,qg,d,Yg),Yg,mg(t,Vg,d,Kg),Kg,$g,Qg),Qg)}}if(0!==p||0!==g){if(0!==u||0!==f||0!==h||0!==d?(B=u*Y,L=fg*u,A=L-(L-u),I=u-A,L=fg*Y,R=L-(L-Y),D=Y-R,z=I*D-(B-A*R-I*R-A*D),G=U*d,L=fg*U,A=L-(L-U),I=U-A,L=fg*d,R=L-(L-d),D=d-R,X=I*D-(G-A*R-I*R-A*D),j=z+X,P=j-z,Ag[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ag[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Ag[2]=F-(H-P)+(j-P),Ag[3]=H,k=-W,M=-f,B=h*k,L=fg*h,A=L-(L-h),I=h-A,L=fg*k,R=L-(L-k),D=k-R,z=I*D-(B-A*R-I*R-A*D),G=Z*M,L=fg*Z,A=L-(L-Z),I=Z-A,L=fg*M,R=L-(L-M),D=M-R,X=I*D-(G-A*R-I*R-A*D),j=z+X,P=j-z,Ig[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ig[1]=N-(j-P)+(G-P),H=F+j,P=H-F,Ig[2]=F-(H-P)+(j-P),Ig[3]=H,x=gg(4,Ag,4,Ig,zg),B=u*d,L=fg*u,A=L-(L-u),I=u-A,L=fg*d,R=L-(L-d),D=d-R,z=I*D-(B-A*R-I*R-A*D),G=h*f,L=fg*h,A=L-(L-h),I=h-A,L=fg*f,R=L-(L-f),D=f-R,X=I*D-(G-A*R-I*R-A*D),j=z-X,P=z-j,Hg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Hg[1]=N-(j+P)+(P-G),H=F+j,P=H-F,Hg[2]=F-(H-P)+(j-P),Hg[3]=H,C=4):(zg[0]=0,x=1,Hg[0]=0,C=1),0!==p){const t=mg(x,zg,p,Vg);c=nv(c,gg(mg(b,Ng,p,Wg),Wg,mg(t,Vg,2*q,Kg),Kg,Jg),Jg);const e=mg(C,Hg,p,qg);c=nv(c,vg(mg(e,qg,2*q,Wg),Wg,mg(e,qg,p,Yg),Yg,mg(t,Vg,p,Kg),Kg,$g,Qg),Qg),0!==f&&(c=nv(c,mg(mg(4,Pg,p,qg),qg,f,Wg),Wg)),0!==d&&(c=nv(c,mg(mg(4,Mg,-p,qg),qg,d,Wg),Wg))}if(0!==g){const t=mg(x,zg,g,Vg);c=nv(c,gg(mg(w,Bg,g,Wg),Wg,mg(t,Vg,2*V,Kg),Kg,Jg),Jg);const e=mg(C,Hg,g,qg);c=nv(c,vg(mg(e,qg,2*V,Wg),Wg,mg(e,qg,g,Yg),Yg,mg(t,Vg,g,Kg),Kg,$g,Qg),Qg)}}return tv[c-1]}(t,e,n,r,i,o,s,a,E)}_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(4),_g(24),_g(24),_g(24),_g(24),_g(24),_g(24),_g(24),_g(24),_g(24),_g(24),_g(1152),_g(1152),_g(1152),_g(1152),_g(1152),_g(2304),_g(2304),_g(3456),_g(5760),_g(8),_g(8),_g(8),_g(16),_g(24),_g(48),_g(48),_g(96),_g(192),_g(384),_g(384),_g(384),_g(768);_g(96),_g(96),_g(96),_g(1152);class iv{constructor(t,e){this.W=t,this.bs=e}add(t){const e=this.W,n=t/e|0,r=t%e;return this.bs[n]|=1<<r,this}delete(t){const e=this.W,n=t/e|0,r=t%e;return this.bs[n]&=~(1<<r),this}set(t,e){const n=this.W,r=t/n|0,i=1<<t%n;return this.bs[r]^=(-e^this.bs[r])&i,e}has(t){const e=this.W,n=t/e|0,r=t%e;return!!(this.bs[n]&1<<r)}forEach(t){const e=this.W,n=this.bs,r=n.length;for(let i=0;i<r;i++){let r=0;for(;n[i]&&r<e;)n[i]&1<<r&&t(i*e+r),r++}return this}}class ov extends iv{constructor(t){super(8,new Uint8Array(Math.ceil(t/8)).fill(0))}}function sv(t){return t%3==2?t-2:t+1}function av(t){return t%3==0?t+2:t-1}class lv{constructor(t,e){if(!(t&&"object"==typeof t&&t.triangles&&t.halfedges&&t.coords))throw new Error("Expected an object with Delaunator output");if(t.triangles.length%3||t.halfedges.length!==t.triangles.length||t.coords.length%2)throw new Error("Delaunator output appears inconsistent");if(t.triangles.length<3)throw new Error("No edges in triangulation");this.del=t;const n=2**32-1,r=t.coords.length>>1,i=t.triangles.length;this.vertMap=new Uint32Array(r).fill(n),this.flips=new ov(i),this.consd=new ov(i);for(let e=0;e<i;e++){const r=t.triangles[e];this.vertMap[r]===n&&this.updateVert(e)}e&&this.constrainAll(e)}constrainOne(t,e){const{triangles:n,halfedges:r}=this.del,i=this.vertMap,o=this.consd,s=i[t];let a=s;do{const i=n[a],o=sv(a);if(i===e)return this.protect(a);const s=av(a),l=n[s];if(l===e)return this.protect(o),o;if(this.intersectSegments(t,e,l,i)){a=s;break}a=r[o]}while(-1!==a&&a!==s);let l=a,c=-1;for(;-1!==a;){const i=r[a],s=av(a),u=av(i),h=sv(i);if(-1===i)throw new Error("Constraining edge exited the hull");if(o.has(a))throw new Error("Edge intersects already constrained edge");if(this.isCollinear(t,e,n[a])||this.isCollinear(t,e,n[i]))throw new Error("Constraining edge intersects point");if(this.intersectSegments(n[a],n[i],n[s],n[u])){if(this.flipDiagonal(a),this.intersectSegments(t,e,n[s],n[u])&&(-1===c&&(c=s),c===s))throw new Error("Infinite loop: flipped diagonal still intersects");n[u]===e?(l=u,a=c,c=-1):this.intersectSegments(t,e,n[h],n[u])&&(a=h)}else{if(-1===c&&(c=a),n[u]===e){if(a===c)throw new Error("Infinite loop: non-convex quadrilateral");a=c,c=-1;continue}if(this.intersectSegments(t,e,n[u],n[i]))a=u;else if(this.intersectSegments(t,e,n[h],n[u]))a=h;else if(c===a)throw new Error("Infinite loop: no further intersect after non-convex")}}const u=this.flips;this.protect(l);do{var h=0;u.forEach((t=>{u.delete(t);const e=r[t];-1!==e&&(u.delete(e),this.isDelaunay(t)||(this.flipDiagonal(t),h++))}))}while(h>0);return this.findEdge(t,e)}delaunify(t=!1){const e=this.del.halfedges,n=this.flips,r=this.consd,i=e.length;do{var o=0;for(let t=0;t<i;t++){if(r.has(t))continue;n.delete(t);const i=e[t];-1!==i&&(n.delete(i),this.isDelaunay(t)||(this.flipDiagonal(t),o++))}}while(t&&o>0);return this}constrainAll(t){const e=t.length;for(let n=0;n<e;n++){const e=t[n];this.constrainOne(e[0],e[1])}return this}isConstrained(t){return this.consd.has(t)}findEdge(t,e){const n=this.vertMap[e],{triangles:r,halfedges:i}=this.del;let o=n,s=-1;do{if(r[o]===t)return o;s=sv(o),o=i[s]}while(-1!==o&&o!==n);return r[sv(s)]===t?-s:1/0}protect(t){const e=this.del.halfedges[t],n=this.flips,r=this.consd;return n.delete(t),r.add(t),-1!==e?(n.delete(e),r.add(e),e):-t}markFlip(t){const e=this.del.halfedges,n=this.flips;if(this.consd.has(t))return!1;const r=e[t];return-1!==r&&(n.add(t),n.add(r)),!0}flipDiagonal(t){const{triangles:e,halfedges:n}=this.del,r=this.flips,i=this.consd,o=n[t],s=av(t),a=sv(t),l=av(o),c=sv(o),u=n[s],h=n[l];if(i.has(t))throw new Error("Trying to flip a constrained edge");return e[t]=e[l],n[t]=h,r.set(t,r.has(l))||i.set(t,i.has(l)),-1!==h&&(n[h]=t),n[s]=l,e[o]=e[s],n[o]=u,r.set(o,r.has(s))||i.set(o,i.has(s)),-1!==u&&(n[u]=o),n[l]=s,this.markFlip(t),this.markFlip(a),this.markFlip(o),this.markFlip(c),r.add(s),i.delete(s),r.add(l),i.delete(l),this.updateVert(t),this.updateVert(a),this.updateVert(o),this.updateVert(c),s}isDelaunay(t){const{triangles:e,halfedges:n}=this.del,r=n[t];if(-1===r)return!0;const i=e[av(t)],o=e[t],s=e[sv(t)],a=e[av(r)];return!this.inCircle(i,o,s,a)}updateVert(t){const{triangles:e,halfedges:n}=this.del,r=this.vertMap,i=e[t];let o=av(t),s=n[o];for(;-1!==s&&s!==t;)o=av(s),s=n[o];return r[i]=o,o}intersectSegments(t,e,n,r){const i=this.del.coords;return t!==n&&t!==r&&e!==n&&e!==r&&cv(i[2*t],i[2*t+1],i[2*e],i[2*e+1],i[2*n],i[2*n+1],i[2*r],i[2*r+1])}inCircle(t,e,n,r){const i=this.del.coords;return rv(i[2*t],i[2*t+1],i[2*e],i[2*e+1],i[2*n],i[2*n+1],i[2*r],i[2*r+1])<0}isCollinear(t,e,n){const r=this.del.coords;return 0===Cg(r[2*t],r[2*t+1],r[2*e],r[2*e+1],r[2*n],r[2*n+1])}}function cv(t,e,n,r,i,o,s,a){const l=Cg(t,e,i,o,s,a),c=Cg(n,r,i,o,s,a);if(l>0&&c>0||l<0&&c<0)return!1;const u=Cg(i,o,t,e,n,r),h=Cg(s,a,t,e,n,r);return!(u>0&&h>0||u<0&&h<0)&&(0!==l||0!==c||0!==u||0!==h||!(Math.max(i,s)<Math.min(t,n)||Math.max(t,n)<Math.min(i,s)||Math.max(o,a)<Math.min(e,r)||Math.max(e,r)<Math.min(o,a)))}function uv(t,e,n){if(e||(e=[]),"object"!=typeof t||"FeatureCollection"!==t.type)throw"Argument points must be FeatureCollection";if(!Array.isArray(e))throw"Argument points must be Array of Array";const r=t.features.map((t=>t.geometry.coordinates)),i=og.from(r);let o;const s=[];0!==i.triangles.length&&0!==e.length&&(o=new lv(i),o.constrainAll(e));for(let t=0;t<i.triangles.length;t+=3)s.push([i.triangles[t],i.triangles[t+1],i.triangles[t+2]]);const a=["a","b","c"];return(0,ti.uf)(s.map((e=>{const r={},i=e.map(((e,i)=>{const o=t.features[e],s=o.geometry.coordinates,l=[s[0],s[1]];return 3===s.length?l[2]=s[2]:r[a[i]]=o.properties[n],l}));return i[3]=i[0],(0,ti.yu)([i],r)})))}lv.intersectSegments=cv;const hv=2.00703;class pv{constructor(t={}){this.points=[],t.bounds?this.setBounds(t.bounds):(this.setWh(t.wh),this.vertexMode=t.vertexMode||pv.VERTEX_PLAIN),this.strictMode=t.strictMode||pv.MODE_AUTO,this.yaxisMode=t.yaxisMode||pv.YAXIS_INVERT,this.importance=t.importance||0,this.priority=t.priority||0,this.stateFull=t.stateFull||!1,t.points&&this.setPoints(t.points),t.edges&&this.setEdges(t.edges)}getFormatVersion(){return hv}setPoints(t){this.yaxisMode==pv.YAXIS_FOLLOW&&(t=t.map((t=>[t[0],[t[1][0],-1*t[1][1]]]))),this.points=t,this.tins=void 0,this.indexedTins=void 0}setEdges(t=[]){this.edges=Tv(t),this.edgeNodes=void 0,this.tins=void 0,this.indexedTins=void 0}setBounds(t){this.bounds=t;let e=t[0][0],n=e,r=t[0][1],i=r;const o=[t[0]];for(let s=1;s<t.length;s++){const a=t[s];a[0]<e&&(e=a[0]),a[0]>n&&(n=a[0]),a[1]<r&&(r=a[1]),a[1]>i&&(i=a[1]),o.push(a)}o.push(t[0]),this.boundsPolygon=(0,ti.yu)([o]),this.xy=[e,r],this.wh=[n-e,i-r],this.vertexMode=pv.VERTEX_PLAIN,this.tins=void 0,this.indexedTins=void 0}setCompiled(t){if(t.version||!t.tins&&t.points&&t.tins_points){this.points=t.points,this.pointsWeightBuffer=!t.version||t.version<2.00703?["forw","bakw"].reduce(((e,n)=>{const r=t.weight_buffer[n];return r&&(e[n]=Object.keys(r).reduce(((t,e)=>(t[Cv(e)]=r[e],t)),{})),e}),{}):t.weight_buffer,t.strict_status?this.strict_status=t.strict_status:t.kinks_points?this.strict_status=pv.STATUS_ERROR:2==t.tins_points.length?this.strict_status=pv.STATUS_LOOSE:this.strict_status=pv.STATUS_STRICT,this.vertices_params={forw:[t.vertices_params[0]],bakw:[t.vertices_params[1]]},this.vertices_params.forw[1]=[0,1,2,3].map((e=>{const n=Ev(["c",`b${e}`,`b${(e+1)%4}`],t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!1,hv);return(0,ti.uf)([n])})),this.vertices_params.bakw[1]=[0,1,2,3].map((e=>{const n=Ev(["c",`b${e}`,`b${(e+1)%4}`],t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!0,hv);return(0,ti.uf)([n])})),this.centroid={forw:(0,ti.xm)(t.centroid_point[0],{target:{geom:t.centroid_point[1],index:"c"}}),bakw:(0,ti.xm)(t.centroid_point[1],{target:{geom:t.centroid_point[0],index:"c"}})},this.edges=Tv(t.edges||[]),this.edgeNodes=t.edgeNodes||[];const e=1==t.tins_points.length?0:1;this.tins={forw:(0,ti.uf)(t.tins_points[0].map((e=>Ev(e,t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!1,t.version)))),bakw:(0,ti.uf)(t.tins_points[e].map((e=>Ev(e,t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!0,t.version))))},this.addIndexedTin(),t.kinks_points&&(this.kinks={bakw:(0,ti.uf)(t.kinks_points.map((t=>(0,ti.xm)(t))))}),t.yaxisMode?this.yaxisMode=t.yaxisMode:this.yaxisMode=pv.YAXIS_INVERT,t.vertexMode&&(this.vertexMode=t.vertexMode),t.strictMode&&(this.strictMode=t.strictMode),t.bounds?(this.bounds=t.bounds,this.boundsPolygon=t.boundsPolygon,this.xy=t.xy,this.wh=t.wh):(this.xy=[0,0],t.wh&&(this.wh=t.wh),this.bounds=void 0,this.boundsPolygon=void 0)}else{t=JSON.parse(JSON.stringify(t).replace('"cent"','"c"').replace(/"bbox(\d+)"/g,'"b$1"')),this.tins=t.tins,this.addIndexedTin(),this.strict_status=t.strict_status,this.pointsWeightBuffer=t.weight_buffer,this.vertices_params=t.vertices_params,this.centroid=t.centroid,this.kinks=t.kinks;const e=[];for(let t=0;t<this.tins.forw.features.length;t++){const n=this.tins.forw.features[t];["a","b","c"].map(((t,r)=>{const i=n.geometry.coordinates[0][r],o=n.properties[t].geom,s=n.properties[t].index;e[s]=[i,o]}))}this.points=e}return{tins:this.tins,strict_status:this.strict_status,weight_buffer:this.pointsWeightBuffer,vertices_params:this.vertices_params,centroid:this.centroid,kinks:this.kinks}}getCompiled(){const t={};t.version=hv,t.points=this.points,t.weight_buffer=this.pointsWeightBuffer,t.centroid_point=[this.centroid.forw.geometry.coordinates,this.centroid.forw.properties.target.geom],t.vertices_params=[this.vertices_params.forw[0],this.vertices_params.bakw[0]],t.vertices_points=[];const e=this.vertices_params.forw[1];return[0,1,2,3].map((n=>{const r=e[n].features[0],i=r.geometry.coordinates[0][1],o=r.properties.b.geom;t.vertices_points[n]=[i,o]})),t.strict_status=this.strict_status,t.tins_points=[[]],this.tins.forw.features.map((e=>{t.tins_points[0].push(["a","b","c"].map((t=>e.properties[t].index)))})),this.strict_status==pv.STATUS_LOOSE?(t.tins_points[1]=[],this.tins.bakw.features.map((e=>{t.tins_points[1].push(["a","b","c"].map((t=>e.properties[t].index)))}))):this.strict_status==pv.STATUS_ERROR&&(t.kinks_points=this.kinks.bakw.features.map((t=>t.geometry.coordinates))),t.yaxisMode=this.yaxisMode,t.vertexMode=this.vertexMode,t.strictMode=this.strictMode,this.bounds?(t.bounds=this.bounds,t.boundsPolygon=this.boundsPolygon,t.xy=this.xy,t.wh=this.wh):t.wh=this.wh,t.edges=this.edges,t.edgeNodes=this.edgeNodes,t}addIndexedTin(){const t=this.tins,e=t.forw,n=t.bakw,r=Math.ceil(Math.sqrt(e.features.length));if(r<3)return void(this.indexedTins=void 0);let i=[],o=[];const s=e.features.map((t=>{let e=[];return bf(t)[0].map((t=>{0===i.length?i=[Array.from(t),Array.from(t)]:(t[0]<i[0][0]&&(i[0][0]=t[0]),t[0]>i[1][0]&&(i[1][0]=t[0]),t[1]<i[0][1]&&(i[0][1]=t[1]),t[1]>i[1][1]&&(i[1][1]=t[1])),0===e.length?e=[Array.from(t),Array.from(t)]:(t[0]<e[0][0]&&(e[0][0]=t[0]),t[0]>e[1][0]&&(e[1][0]=t[0]),t[1]<e[0][1]&&(e[0][1]=t[1]),t[1]>e[1][1]&&(e[1][1]=t[1]))})),e})),a=(i[1][0]-i[0][0])/r,l=(i[1][1]-i[0][1])/r,c=s.reduce(((t,e,n)=>{const o=wv(e[0][0],i[0][0],a,r),s=wv(e[1][0],i[0][0],a,r),c=wv(e[0][1],i[0][1],l,r),u=wv(e[1][1],i[0][1],l,r);for(let e=o;e<=s;e++){t[e]||(t[e]=[]);for(let r=c;r<=u;r++)t[e][r]||(t[e][r]=[]),t[e][r].push(n)}return t}),[]),u=n.features.map((t=>{let e=[];return bf(t)[0].map((t=>{0===o.length?o=[Array.from(t),Array.from(t)]:(t[0]<o[0][0]&&(o[0][0]=t[0]),t[0]>o[1][0]&&(o[1][0]=t[0]),t[1]<o[0][1]&&(o[0][1]=t[1]),t[1]>o[1][1]&&(o[1][1]=t[1])),0===e.length?e=[Array.from(t),Array.from(t)]:(t[0]<e[0][0]&&(e[0][0]=t[0]),t[0]>e[1][0]&&(e[1][0]=t[0]),t[1]<e[0][1]&&(e[0][1]=t[1]),t[1]>e[1][1]&&(e[1][1]=t[1]))})),e})),h=(o[1][0]-o[0][0])/r,p=(o[1][1]-o[0][1])/r,f=u.reduce(((t,e,n)=>{const i=wv(e[0][0],o[0][0],h,r),s=wv(e[1][0],o[0][0],h,r),a=wv(e[0][1],o[0][1],p,r),l=wv(e[1][1],o[0][1],p,r);for(let e=i;e<=s;e++){t[e]||(t[e]=[]);for(let r=a;r<=l;r++)t[e][r]||(t[e][r]=[]),t[e][r].push(n)}return t}),[]);this.indexedTins={forw:{gridNum:r,xOrigin:i[0][0],yOrigin:i[0][1],xUnit:a,yUnit:l,gridCache:c},bakw:{gridNum:r,xOrigin:o[0][0],yOrigin:o[0][1],xUnit:h,yUnit:p,gridCache:f}}}setWh(t){this.wh=t,this.xy=[0,0],this.bounds=void 0,this.boundsPolygon=void 0,this.tins=void 0,this.indexedTins=void 0}setVertexMode(t){this.vertexMode=t,this.tins=void 0,this.indexedTins=void 0}setStrictMode(t){this.strictMode=t,this.tins=void 0,this.indexedTins=void 0}calcurateStrictTinAsync(){const t=this.pointsSet.edges;return Promise.all(this.tins.forw.features.map((t=>Promise.resolve(Sv(t))))).then((t=>{this.tins.bakw=(0,ti.uf)(t)})).then((()=>{const t={};return Promise.all(this.tins.forw.features.map(((e,n)=>{const r=this.tins.bakw.features[n];return Promise.resolve(kv(t,{forw:e,bakw:r}))}))).then((()=>Promise.all([Ov(t),Promise.resolve(t)]))).catch((t=>{throw t}))})).then((e=>{const n=e[0],r=e[1];return n.bakw&&Object.keys(n.bakw).map((e=>{if("Not include case"==n.bakw[e])return;const i=r[e],o=Td(i[0].forw,i[1].forw),s=dd((0,ti.uf)([i[0].forw,i[1].forw]));if(_d(s,o))return;const a=e.split("-");if(a[0].match(/^[0-9]+$/)&&a[1].match(/^[0-9]+$/)){const e=a.map((t=>parseInt(t))).sort(((t,e)=>t<e?-1:1));for(let n=0;n<t.length-1;n++)if(e[0]==t[n][0]&&e[1]==t[n][1])return}const l=a.map((t=>["a","b","c"].map(((t,e)=>{const n=i[0].bakw.properties[t];return{geom:i[0].bakw.geometry.coordinates[0][e],prop:n}})).filter((e=>e.prop.index==t))[0])),c=i.map((t=>["a","b","c"].map(((e,n)=>{const r=t.bakw.properties[e];return{geom:t.bakw.geometry.coordinates[0][n],prop:r}})).filter((t=>t.prop.index!=l[0].prop.index&&t.prop.index!=l[1].prop.index))[0]));Mv(r,i[0],this.tins),Mv(r,i[1],this.tins),l.map((t=>{const e=[t.geom,c[0].geom,c[1].geom,t.geom],n={a:t.prop,b:c[0].prop,c:c[1].prop},i=(0,ti.yu)([e],n),o=Sv(i);kv(r,{forw:o,bakw:i},this.tins)}))})),Promise.all(["forw","bakw"].map((t=>new Promise((e=>{e(function(t){return Ud(new Od(t).findSegmentIntersections()).reduce(((t,e,n,r)=>(t||(t={}),t[`${e.x}:${e.y}`]=e,n!=r.length-1?t:Object.keys(t).map((e=>(0,ti.xm)([t[e].x,t[e].y]))))),[])}(this.tins[t].features.map((t=>t.geometry.coordinates[0]))))})).catch((t=>{throw t}))))).then((t=>{0==t[0].length&&0==t[1].length?(this.strict_status=pv.STATUS_STRICT,delete this.kinks):(this.strict_status=pv.STATUS_ERROR,this.kinks={},t[0].length>0&&(this.kinks.forw=(0,ti.uf)(t[0])),t[1].length>0&&(this.kinks.bakw=(0,ti.uf)(t[1])))})).catch((t=>{throw t}))})).catch((t=>{throw t}))}generatePointsSet(){const t={forw:[],bakw:[]};for(let e=0;e<this.points.length;e++){const n=vv(this.points[e][0],this.points[e][1],e);t.forw.push(n),t.bakw.push(mv(n))}const e=[];let n=0;this.edgeNodes=[],this.edges||(this.edges=[]);for(let r=0;r<this.edges.length;r++){const i=this.edges[r][2],o=Object.assign([],this.edges[r][0]),s=Object.assign([],this.edges[r][1]);if(0===o.length&&0===s.length){e.push(i);continue}o.unshift(this.points[i[0]][0]),o.push(this.points[i[1]][0]),s.unshift(this.points[i[0]][1]),s.push(this.points[i[1]][1]);const a=[o,s].map((t=>{const e=t.map(((t,e,n)=>{if(0===e)return 0;const r=n[e-1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))})),n=e.reduce(((t,e,n)=>0===n?[0]:(t.push(t[n-1]+e),t)),[]);return n.map(((r,i,o)=>{const s=r/o[o.length-1];return[t[i],e[i],n[i],s]}))}));a.map(((t,e)=>{const n=a[e?0:1];return t.filter(((e,n)=>!(0===n||n===t.length-1||"handled"===e[4]))).map((t=>{const r=t[0],i=t[3],o=n.reduce(((t,e,n,r)=>{if(t)return t;const o=r[n+1];return e[3]===i?(e[4]="handled",[e]):e[3]<i&&o[3]>i?[e,o]:void 0}),void 0);if(1===o.length)return 0===e?[r,o[0][0],i]:[o[0][0],r,i];{const t=o[0],n=o[1],s=(i-t[3])/(n[3]-t[3]),a=[(n[0][0]-t[0][0])*s+t[0][0],(n[0][1]-t[0][1])*s+t[0][1]];return 0===e?[r,a,i]:[a,r,i]}}))})).reduce(((t,e)=>t.concat(e)),[]).sort(((t,e)=>t[2]<e[2]?-1:1)).map(((r,o,s)=>{this.edgeNodes[n]=[r[0],r[1]];const a=vv(r[0],r[1],`e${n}`);n++,t.forw.push(a),t.bakw.push(mv(a)),0===o?e.push([i[0],t.forw.length-1]):e.push([t.forw.length-2,t.forw.length-1]),o===s.length-1&&e.push([t.forw.length-1,i[1]])}))}return{forw:(0,ti.uf)(t.forw),bakw:(0,ti.uf)(t.bakw),edges:e}}updateTinAsync(){let t=this.strictMode;const e=this.xy[0]-.05*this.wh[0],n=this.xy[0]+1.05*this.wh[0],r=this.xy[1]-.05*this.wh[1],i=this.xy[1]+1.05*this.wh[1],o=this.bounds?t=>ld(t,this.boundsPolygon):t=>t[0]>=this.xy[0]&&t[0]<=this.xy[0]+this.wh[0]&&t[1]>=this.xy[1]&&t[1]<=this.xy[1]+this.wh[1],s=this.points.reduce(((t,e)=>t&&o(e[0])),!0);return s?new Promise((o=>{t!=pv.MODE_STRICT&&t!=pv.MODE_LOOSE&&(t=pv.MODE_AUTO);let s=[];this.wh&&(s=[[e,r],[n,r],[e,i],[n,i]]);o([this.generatePointsSet(),s])})).then((t=>{const e=t[0];return Promise.all([new Promise((t=>{t(uv(e.forw,e.edges,"target"))})),new Promise((t=>{t(uv(e.bakw,e.edges,"target"))})),new Promise((t=>{t(oi(e.forw))})),Promise.resolve(t)]).catch((t=>{throw t}))})).then((t=>{const e=t[0],n=t[1],r=t[2],i=t[3],o=i[0];if(0==e.features.length||0==n.features.length)throw"TOO LINEAR1";const s={forw:r.geometry.coordinates,bakw:xv(r,e)},a=vv(s.forw,s.bakw,"c");this.centroid={forw:a,bakw:mv(a)};const l={};return Promise.all([new Promise((t=>{const n=dd(o.forw).geometry.coordinates[0];let r;try{r=n.map((t=>({forw:t,bakw:xv((0,ti.xm)(t),e)})))}catch(t){throw"TOO LINEAR2"}r.map((t=>{l[`${t.forw[0]}:${t.forw[1]}`]=t})),t(void 0)})),new Promise((t=>{const e=dd(o.bakw).geometry.coordinates[0];let r;try{r=e.map((t=>({bakw:t,forw:xv((0,ti.xm)(t),n)})))}catch(t){throw"TOO LINEAR2"}r.map((t=>{l[`${t.forw[0]}:${t.forw[1]}`]=t})),t(void 0)}))]).then((()=>[s,l,i])).catch((t=>{throw t}))})).then((t=>{const o=t[0],s=t[1],a=t[2],l=Object.keys(s).reduce(((t,a,l,c)=>{const u=s[a].forw,h=s[a].bakw,p={forw:[u[0]-o.forw[0],u[1]-o.forw[1]]};p.bakw=[h[0]-o.bakw[0],h[1]-o.bakw[1]];const f=0==p.forw[0]?1/0:((p.forw[0]<0?e:n)-o.forw[0])/p.forw[0],d=0==p.forw[1]?1/0:((p.forw[1]<0?r:i)-o.forw[1])/p.forw[1];if(Math.abs(f)/Math.abs(d)<1.1){const e={forw:[p.forw[0]*f+o.forw[0],p.forw[1]*f+o.forw[1]],bakw:[p.bakw[0]*f+o.bakw[0],p.bakw[1]*f+o.bakw[1]]};p.forw[0]<0?t[3].push(e):t[1].push(e)}if(Math.abs(d)/Math.abs(f)<1.1){const e={forw:[p.forw[0]*d+o.forw[0],p.forw[1]*d+o.forw[1]],bakw:[p.bakw[0]*d+o.bakw[0],p.bakw[1]*d+o.bakw[1]]};p.forw[1]<0?t[0].push(e):t[2].push(e)}return t}),[[],[],[],[]]);let c=Object.keys(s).reduce(((t,e,n,r)=>{const i=s[e].forw,a=s[e].bakw,l={forw:[i[0]-o.forw[0],i[1]-o.forw[1]]};if(l.bakw=[a[0]-o.bakw[0],o.bakw[1]-a[1]],0==l.forw[0]||0==l.forw[1])return t;let c=0;return l.forw[0]>0&&(c+=1),l.forw[1]>0&&(c+=2),t[c].push([l.forw,l.bakw]),n==r.length-1?t.length==t.filter((t=>t.length>0)).length&&this.vertexMode==pv.VERTEX_BIRDEYE?t:t.reduce(((t,e)=>[t[0].concat(e)]),[[]]):t}),[[],[],[],[]]).map((t=>t.reduce(((t,e,n,r)=>{t||(t=[1/0,0,0]);let i=Math.sqrt(Math.pow(e[0][0],2)+Math.pow(e[0][1],2))/Math.sqrt(Math.pow(e[1][0],2)+Math.pow(e[1][1],2));i=i<t[0]?i:t[0];const o=Math.atan2(e[0][0],e[0][1])-Math.atan2(e[1][0],e[1][1]),s=t[1]+Math.cos(o),a=t[2]+Math.sin(o);return n==r.length-1?[i,Math.atan2(a,s)]:[i,s,a]}),null)));return 1==c.length&&(c=[c[0],c[0],c[0],c[0]]),[c,o,l,a]})).then((t=>{const e=t[0],n=t[1],r=t[2],i=t[3][0],o=t[3][1];let s=e.map(((t,e)=>{const r=o[e],i=[r[0]-n.forw[0],r[1]-n.forw[1]],s=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2))/t[0],a=Math.atan2(i[0],i[1])-t[1];return{forw:r,bakw:[n.bakw[0]+s*Math.sin(a),n.bakw[1]-s*Math.cos(a)]}}));const a=s[2];s[2]=s[3],s[3]=a;const l=[1,1,1,1];for(let t=0;t<4;t++){const e=(t+1)%4,i=(0,ti.Tu)([s[t].bakw,s[e].bakw]);r[t].map((r=>{const o=(0,ti.Tu)([n.bakw,r.bakw]),s=Ff(i,o);if(s.features.length>0&&s.features[0].geometry){const i=s.features[0],o=Math.sqrt(Math.pow(r.bakw[0]-n.bakw[0],2)+Math.pow(r.bakw[1]-n.bakw[1],2))/Math.sqrt(Math.pow(i.geometry.coordinates[0]-n.bakw[0],2)+Math.pow(i.geometry.coordinates[1]-n.bakw[1],2));o>l[t]&&(l[t]=o),o>l[e]&&(l[e]=o)}}))}return s=s.map(((t,e)=>{const r=l[e],i=[(t.bakw[0]-n.bakw[0])*r+n.bakw[0],(t.bakw[1]-n.bakw[1])*r+n.bakw[1]];return{forw:t.forw,bakw:i}})),[s,i]})).then((e=>{const n=e[0],r=e[1],i={forw:[],bakw:[]};for(let t=0;t<n.length;t++){const e=vv(n[t].forw,n[t].bakw,`b${t}`),o=mv(e);r.forw.features.push(e),r.bakw.features.push(o),i.forw.push(e),i.bakw.push(o)}let o;return this.pointsSet=r,this.tins={forw:fv(uv(r.forw,r.edges,"target"))},o=t==pv.MODE_STRICT||t==pv.MODE_AUTO?this.calcurateStrictTinAsync():Promise.resolve(),o.then((()=>((t==pv.MODE_LOOSE||t==pv.MODE_AUTO&&this.strict_status==pv.STATUS_ERROR)&&(this.tins.bakw=fv(uv(r.bakw,r.edges,"target")),delete this.kinks,this.strict_status=pv.STATUS_LOOSE),this.vertices_params={forw:dv(i.forw,this.centroid.forw),bakw:dv(i.bakw,this.centroid.bakw)},this.addIndexedTin(),this.calculatePointsWeightAsync()))).catch((t=>{throw t}))})).catch((t=>{throw t})):new Promise(((t,e)=>{e("SOME POINTS OUTSIDE")}))}transform(t,e,n){if(e&&this.strict_status==pv.STATUS_ERROR)throw'Backward transform is not allowed if strict_status == "strict_error"';this.yaxisMode==pv.YAXIS_FOLLOW&&e&&(t=[t[0],-1*t[1]]);const r=(0,ti.xm)(t);if(this.bounds&&!e&&!n&&!ld(r,this.boundsPolygon))return!1;const i=e?this.tins.bakw:this.tins.forw,o=e?this.indexedTins.bakw:this.indexedTins.forw,s=e?this.vertices_params.bakw:this.vertices_params.forw,a=e?this.centroid.bakw:this.centroid.forw,l=e?this.pointsWeightBuffer.bakw:this.pointsWeightBuffer.forw;let c,u;this.stateFull&&(this.stateBackward==e?c=this.stateTriangle:(this.stateBackward=e,this.stateTriangle=void 0),u=t=>{this.stateTriangle=t});let h=xv(r,i,o,s,a,l,c,u);if(this.bounds&&e&&!n){if(!ld((0,ti.xm)(h),this.boundsPolygon))return!1}else this.yaxisMode!=pv.YAXIS_FOLLOW||e||(h=[h[0],-1*h[1]]);return h}calculatePointsWeightAsync(){const t=["forw"];this.strict_status==pv.STATUS_LOOSE&&t.push("bakw");const e={};return Promise.all(t.map((t=>{e[t]={};const n={},r=this.tins[t];return Promise.all(r.features.map((r=>{const i=["a","b","c"];return new Promise((o=>{for(let o=0;o<3;o++){const s=(o+1)%3,a=i[o],l=i[s],c=r.properties[a].index,u=r.properties[l].index,h=[c,u].sort().join("-");if(!n[h]){const i=r.geometry.coordinates[0][o],p=r.geometry.coordinates[0][s],f=r.properties[a].geom,d=r.properties[l].geom;n[h]=1;const g=Math.sqrt(Math.pow(f[0]-d[0],2)+Math.pow(f[1]-d[1],2))/Math.sqrt(Math.pow(i[0]-p[0],2)+Math.pow(i[1]-p[1],2));e[t][c]||(e[t][c]={}),e[t][u]||(e[t][u]={}),e[t][c][h]=g,e[t][u][h]=g}}o(void 0)}))}))).catch((t=>{throw t}))}))).then((()=>{const n={};t.map((t=>{n[t]={},this.strict_status==pv.STATUS_STRICT&&(n.bakw={}),Object.keys(e[t]).map((r=>{n[t][r]=Object.keys(e[t][r]).reduce(((n,i,o,s)=>(n+=e[t][r][i],o==s.length-1?n/s.length:n)),0),this.strict_status==pv.STATUS_STRICT&&(n.bakw[r]=1/n[t][r])})),n[t].c=[0,1,2,3].reduce(((e,r)=>{const i=`b${r}`;return e+=n[t][i],3==r?e/4:e}),0),this.strict_status==pv.STATUS_STRICT&&(n.bakw.c=1/n[t].c)})),this.pointsWeightBuffer=n})).catch((t=>{throw t}))}}function fv(t){const e=t.features;for(let t=0;t<e.length;t++){const n=e[t];"b"===`${n.properties.a.index}`.substring(0,1)&&"b"===`${n.properties.b.index}`.substring(0,1)?e[t]={geometry:{type:"Polygon",coordinates:[[n.geometry.coordinates[0][2],n.geometry.coordinates[0][0],n.geometry.coordinates[0][1],n.geometry.coordinates[0][2]]]},properties:{a:{geom:n.properties.c.geom,index:n.properties.c.index},b:{geom:n.properties.a.geom,index:n.properties.a.index},c:{geom:n.properties.b.geom,index:n.properties.b.index}},type:"Feature"}:"b"===`${n.properties.c.index}`.substring(0,1)&&"b"===`${n.properties.a.index}`.substring(0,1)&&(e[t]={geometry:{type:"Polygon",coordinates:[[n.geometry.coordinates[0][1],n.geometry.coordinates[0][2],n.geometry.coordinates[0][0],n.geometry.coordinates[0][1]]]},properties:{a:{geom:n.properties.b.geom,index:n.properties.b.index},b:{geom:n.properties.c.geom,index:n.properties.c.index},c:{geom:n.properties.a.geom,index:n.properties.a.index}},type:"Feature"})}return t}function dv(t,e){const n=e.geometry.coordinates;return[0,1,2,3].map((r=>{const i=(r+1)%4,o=t[r],s=t[i],a=o.geometry.coordinates,l=Math.atan2(a[0]-n[0],a[1]-n[1]),c=[e,o,s,e].map((t=>t.geometry.coordinates)),u={a:{geom:e.properties.target.geom,index:e.properties.target.index},b:{geom:o.properties.target.geom,index:o.properties.target.index},c:{geom:s.properties.target.geom,index:s.properties.target.index}};return[l,(0,ti.uf)([(0,ti.yu)([c],u)])]})).reduce(((t,e)=>(t[0].push(e[0]),t[1].push(e[1]),t)),[[],[]])}function gv(t,e=!1){const n=e?function(t){return!(t>=0&&t<2*Math.PI)}:function(t){return!(t>-1*Math.PI&&t<=Math.PI)};for(;n(t);)t+=2*Math.PI*(t>0?-1:1);return t}function vv(t,e,n){return(0,ti.xm)(t,{target:{geom:e,index:n}})}function mv(t){return(0,ti.xm)(t.properties.target.geom,{target:{geom:t.geometry.coordinates,index:t.properties.target.index}})}function yv(t,e,n){const r=e.geometry.coordinates[0][0],i=e.geometry.coordinates[0][1],o=e.geometry.coordinates[0][2],s=t.geometry.coordinates,a=e.properties.a.geom,l=e.properties.b.geom,c=e.properties.c.geom,u=[i[0]-r[0],i[1]-r[1]],h=[o[0]-r[0],o[1]-r[1]],p=[s[0]-r[0],s[1]-r[1]],f=[l[0]-a[0],l[1]-a[1]],d=[c[0]-a[0],c[1]-a[1]];let g=(h[1]*p[0]-h[0]*p[1])/(u[0]*h[1]-u[1]*h[0]),v=(u[0]*p[1]-u[1]*p[0])/(u[0]*h[1]-u[1]*h[0]);if(n){const t=n[e.properties.a.index],r=n[e.properties.b.index],i=n[e.properties.c.index];let o;if(g<0||v<0||1-g-v<0){const t=g/(g+v),e=v/(g+v);o=g/r/(t/r+e/i),v=v/i/(t/r+e/i)}else o=g/r/(g/r+v/i+(1-g-v)/t),v=v/i/(g/r+v/i+(1-g-v)/t);g=o}return[g*f[0]+v*d[0]+a[0],g*f[1]+v*d[1]+a[1]]}function _v(t,e,n,r){const i=t.geometry.coordinates,o=n.geometry.coordinates,s=function(t,e){let n,r=gv(t-e[0]),i=2*Math.PI;for(let o=0;o<e.length;o++){const s=gv(t-e[(o+1)%e.length]),a=Math.min(Math.abs(r),Math.abs(s));r*s<=0&&a<i&&(i=a,n=o),r=s}return n}(Math.atan2(i[0]-o[0],i[1]-o[1]),e[0]);return yv(t,e[1][s].features[0],r)}function bv(t,e){for(let n=0;n<e.features.length;n++){if(ld(t,e.features[n]))return e.features[n]}}function wv(t,e,n,r){let i=Math.floor((t-e)/n);return i>=r&&(i=r-1),i}function xv(t,e,n,r,i,o,s,a){let l;if(s&&(l=bv(t,(0,ti.uf)([s]))),!l){if(n){const r=t.geometry.coordinates,i=n.gridNum,o=n.xOrigin,s=n.yOrigin,a=n.xUnit,l=n.yUnit,c=n.gridCache,u=wv(r[0],o,a,i),h=wv(r[1],s,l,i),p=c[u]&&c[u][h]?c[u][h]:[];e=(0,ti.uf)(p.map((t=>e.features[t])))}l=bv(t,e)}return a&&a(l),l?yv(t,l,o):_v(t,r,i,o)}function Sv(t){const e=["a","b","c","a"].map((e=>t.properties[e].geom)),n=t.geometry.coordinates[0],r=t.properties,i={a:{geom:n[0],index:r.a.index},b:{geom:n[1],index:r.b.index},c:{geom:n[2],index:r.c.index}};return(0,ti.yu)([e],i)}function Ev(t,e,n,r,i,o=!1,s){const a=t.map((t=>{(!s||s<2.00703)&&(t=Cv(t));const a=isFinite(t)?e[t]:"c"===t?r:"b0"===t?i[0]:"b1"===t?i[1]:"b2"===t?i[2]:"b3"===t?i[3]:function(){const e=t.match(/e(\d+)/);if(e){const t=parseInt(e[1]);return n[t]}throw"Bad index value for indexesToTri"}();return o?[[a[1],a[0]],t]:[[a[0],a[1]],t]}));return function(t){const e=[0,1,2,0].map((e=>t[e][0][0])),n={a:{geom:t[0][0][1],index:t[0][1]},b:{geom:t[1][0][1],index:t[1][1]},c:{geom:t[2][0][1],index:t[2][1]}};return(0,ti.yu)([e],n)}(a)}function Cv(t){return"number"==typeof t?t:t.replace(/^(c|e|b)(?:ent|dgeNode|box)(\d+)?$/,"$1$2")}function Tv(t,e){return e&&e>=2.00703||Array.isArray(t[0])?t:t.map((t=>[t.illstNodes,t.mercNodes,t.startEnd]))}function Ov(t){const e={forw:{},bakw:{}};return Promise.all(Object.keys(t).map((e=>new Promise((n=>{const r=t[e];if(r.length<2)return n(void 0);["forw","bakw"].map((t=>{const e=function(t,e,n){void 0===n&&(n={});var r=wf(t),i=wf(e),o=gd.intersection(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?wd(o[0],n.properties):xd(o,n.properties)}(r[0][t],r[1][t]);if(!e||"Point"==e.geometry.type||"LineString"==e.geometry.type)return n(void 0);n(void 0)}))}))))).then((()=>(0==Object.keys(e.forw).length&&delete e.forw,0==Object.keys(e.bakw).length&&delete e.bakw,e))).catch((t=>{throw t}))}function kv(t,e,n){const r=Pv(e.forw),i=Pv(e.bakw);if(JSON.stringify(r)!=JSON.stringify(i))throw`${JSON.stringify(e,null,2)}\n${JSON.stringify(r)}\n${JSON.stringify(i)}`;for(let n=0;n<r.length;n++){const i=r[n];t[i]||(t[i]=[]),t[i].push(e)}n&&(n.forw.features.push(e.forw),n.bakw.features.push(e.bakw))}function Mv(t,e,n){const r=Pv(e.forw),i=Pv(e.bakw);if(JSON.stringify(r)!=JSON.stringify(i))throw`${JSON.stringify(e,null,2)}\n${JSON.stringify(r)}\n${JSON.stringify(i)}`;for(let n=0;n<r.length;n++){const i=r[n],o=t[i].filter((t=>t.forw!=e.forw));0==o.length?delete t[i]:t[i]=o}if(n){let t=n.forw.features.filter((t=>t!=e.forw));n.forw.features=t,t=n.bakw.features.filter((t=>t!=e.bakw)),n.bakw.features=t}}function Pv(t){const e=["a","b","c"].map((e=>t.properties[e].index));return[[0,1],[0,2],[1,2],[0,1,2]].map((t=>t.map((t=>e[t])).sort().join("-"))).sort()}pv.VERTEX_PLAIN="plain",pv.VERTEX_BIRDEYE="birdeye",pv.MODE_STRICT="strict",pv.MODE_AUTO="auto",pv.MODE_LOOSE="loose",pv.STATUS_STRICT="strict",pv.STATUS_ERROR="strict_error",pv.STATUS_LOOSE="loose",pv.YAXIS_FOLLOW="follow",pv.YAXIS_INVERT="invert",n.g.Tin=pv;const Lv=["title","attr","officialTitle","dataAttr","author","createdAt","era","license","dataLicense","contributor","mapper","reference","description","url","lang","imageExtension","homePosition","mercZoom"];async function Av(t,e,n){const r=n?t:{},i=[];if(Lv.forEach((e=>{r[e]=t[e]})),t.imageExtention&&(r.imageExtension=t.imageExtention),t.compiled){const n={};t.compiled.wh||(n.wh=[t.width,t.height]),t.compiled.strictMode||(n.strictMode=t.strictMode),t.compiled.vertexMode||(n.vertexMode=t.vertexMode),t.compiled.yaxisMode||(n.yaxisMode=t.yaxisMode);let o=new pv(n);o.setCompiled(t.compiled),e&&(o=o.getCompiled()),r.strictMode=o.strictMode,r.vertexMode=o.vertexMode,r.yaxisMode=o.yaxisMode,r.width=o.wh[0],r.height=o.wh[1],r.gcps=o.points,r.edges=o.edges,i.push(o)}else{r.strictMode=t.strictMode,r.vertexMode=t.vertexMode,r.yaxisMode=t.yaxisMode,r.width=t.width,r.height=t.height,r.gcps=t.gcps,r.edges=t.edges;let n=await Iv(t.strictMode,t.vertexMode,t.yaxisMode,t.gcps,t.edges,[t.width,t.height]);e&&"string"!=typeof n&&(n=n.getCompiled()),i.push(n)}if(t.sub_maps){const n=[];for(let r=0;r<t.sub_maps.length;r++){const o=t.sub_maps[r],s={};if(s.importance=o.importance,s.priority=o.priority,o.compiled){const n={};o.compiled.strictMode||(n.strictMode=t.strictMode),o.compiled.vertexMode||(n.vertexMode=t.vertexMode),o.compiled.yaxisMode||(n.yaxisMode=t.yaxisMode);let r=new pv(n);r.setCompiled(o.compiled),e&&(r=r.getCompiled()),s.bounds=r.bounds,s.gcps=r.points,s.edges=r.edges,i.push(r)}else{s.bounds=o.bounds,s.gcps=o.gcps,s.edges=o.edges;let n=await Iv(t.strictMode,t.vertexMode,t.yaxisMode,o.gcps,o.edges,void 0,o.bounds);e&&"string"!=typeof n&&(n=n.getCompiled()),i.push(n)}n.push(s)}r.sub_maps=n}return[r,i]}async function Iv(t,e,n,r=[],i=[],o,s){if(r.length<3)return"tooLessGcps";const a=new pv({yaxisMode:n});if(o)a.setWh(o);else{if(!s)throw"Both wh and bounds are missing";a.setBounds(s)}a.setStrictMode(t),a.setVertexMode(e),a.setPoints(r),a.setEdges(i);try{return await a.updateTinAsync(),a}catch(t){if(console.log(t),"SOME POINTS OUTSIDE"==t)return"pointsOutside";if(0==t.indexOf("TOO LINEAR"))return"tooLinear";if(t.indexOf("Vertex indices of edge")>-1||t.indexOf("is degenerate!")>-1||t.indexOf("already exists or intersects with an existing edge!")>-1)return"edgeError";throw t}}class Rv extends td{constructor(t={}){super(t),this.tins=[]}static async createAsync(t){const e=await async function(t){return Av(t,!1,!0)}(t);t=e[0];const n=new Rv(t);n.tins=e[1];const r=new Ue({code:`Illst:${n.mapID}`,extent:[0,0,n.width,n.height],units:"m"});return wr(r),Or(r,"EPSG:3857",(t=>n.tins[0].transform(t,!1)),(t=>n.tins[0].transform(t,!0))),ad("EPSG:4326",r),t.sub_maps&&t.sub_maps.map(((t,e)=>{const r=e+1,i=`Illst:${n.mapID}#${r}`,o=n.tins[r],s=new Ue({code:i,extent:[o.xy[0],o.xy[1],o.wh[0],o.wh[1]],units:"m"});wr(s),Or(s,"EPSG:3857",(t=>o.transform(t,!1,!0)),(t=>o.transform(t,!0,!0))),ad("EPSG:4326",s);const a=Object.assign([],t.bounds);a.push(t.bounds[0]);const l=a.map((t=>o.transform(t,!1))),c=(0,ti.yu)([a]),u=(0,ti.yu)([l]);o.xyBounds=c,o.mercBounds=u})),n}xy2MercAsync_specifyLayer(t,e){const n=`Illst:${this.mapID}${e?`#${e}`:""}`;return new Promise(((e,r)=>{e(ad(n,"EPSG:3857",t))}))}merc2XyAsync_specifyLayer(t,e){const n=`Illst:${this.mapID}${e?`#${e}`:""}`;return new Promise(((e,r)=>{e(ad("EPSG:3857",n,t))}))}xy2MercAsync_returnLayer(t){return new Promise(((e,n)=>{const r=this.tins.map(((t,e)=>[e,t])).sort(((t,e)=>t[1].priority<e[1].priority?1:-1));for(let i=0;i<r.length;i++){const o=r[i][0],s=r[i][1];if(0==o||xf(t,s.xyBounds)){this.xy2MercAsync_specifyLayer(t,o).then((t=>{e([o,t])})).catch((t=>{n(t)}));break}}}))}merc2XyAsync_returnLayer(t){return Promise.all(this.tins.map(((e,n)=>new Promise(((r,i)=>{this.merc2XyAsync_specifyLayer(t,n).then((t=>{0===n||xf(t,e.xyBounds)?r([e,n,t]):r([e,n])})).catch((t=>{i(t)}))}))))).then((t=>t.sort(((t,e)=>t[0].priority<e[0].priority?1:-1)).reduce(((t,e,n,r)=>{const i=e[0],o=e[1],s=e[2];if(!s)return t;for(let e=0;e<n;e++){const n=r[e][0];if(0===r[e][1]||xf(s,n.xyBounds)){if(t.length){const e=!t[0],n=e?t[1][2]:t[0][2];return!e||i.importance<n.importance?t:[void 0,[o,s,i]]}return[void 0,[o,s,i]]}}return t.length&&t[0]?(t.push([o,s,i]),t.sort(((t,e)=>t[2].importance<e[2].importance?1:-1)).filter(((t,e)=>e<2))):[[o,s,i]]}),[]).map((t=>{if(t)return[t[0],t[1]]}))))}setupMapParameter(t){const e=[this.width/2,this.height/2];this.xy2MercAsync_returnLayer(e).then((n=>{const r=n[0],i=n[1],o=[[e[0]-150,e[1]],[e[0]+150,e[1]],[e[0],e[1]-150],[e[0],e[1]+150]],s=[[0,0],[this.width,0],[this.width,this.height],[0,this.height]],a=[];for(let t=0;t<9;t++){const e=t<4?this.xy2MercAsync_specifyLayer(o[t],r):4==t?Promise.resolve(i):this.xy2MercAsync_specifyLayer(s[t-5],0);a.push(e)}Promise.all(a).then((e=>{const n=(Math.sqrt(Math.pow(e[0][0]-e[1][0],2)+Math.pow(e[0][1]-e[1][1],2))+Math.sqrt(Math.pow(e[2][0]-e[3][0],2)+Math.pow(e[2][1]-e[3][1],2)))/2;this.mercZoom||(this.mercZoom=Math.log(46962910.17841229/n)/Math.log(2)-3),this.homePosition||(this.homePosition=kr(e[4])),this.envelope=(0,ti.yu)([[e[5],e[6],e[7],e[8],e[5]]]),t(this)})).catch((t=>{throw t}))})).catch((t=>{throw t}))}mercs2SysCoordsAsync_multiLayer(t){const e=this.merc2XyAsync_returnLayer(t[0][0]).then((e=>{let n=!1;return Promise.all(e.map(((e,r)=>{if(!e)return void(n=!0);const i=e[0],o=e[1];return 0===r||n?Promise.all(t[0].map(((t,e)=>0===e?Promise.resolve(o):this.merc2XyAsync_specifyLayer(t,i)))):Promise.resolve([o])})))}));return e.then((e=>e.map((e=>{if(e)return[e.map((t=>this.xy2SysCoord(t))),t[1]]}))))}merc2XyAsync_base(t,e){return this.merc2XyAsync_returnLayer(t).then((t=>{if(!e||t[0])return t[0]?t[0][1]:t[1][1]}))}merc2XyAsync_ignoreBackground(t){return this.merc2XyAsync_base(t,!0)}merc2XyAsync(t){return this.merc2XyAsync_base(t,!1)}xy2MercAsync(t){return this.xy2MercAsync_returnLayer(t).then((t=>t[1]))}viewpoint2MercsAsync(t,e){const n=this.viewpoint2SysCoords(t,e),r=this.sysCoords2Xys(n);return this.xy2MercAsync_returnLayer(r[0][0]).then((t=>{const n=t[0],i=t[1],o=r[0].map(((t,e)=>0===e?Promise.resolve(i):this.xy2MercAsync_specifyLayer(t,n)));return Promise.all(o).then((t=>[t,e]))}))}mercs2ViewpointAsync(t){const e=this.merc2XyAsync_returnLayer(t[0][0]).then((e=>{const n=e[0]||e[1],r=n[0],i=n[1];return Promise.all(t[0].map(((t,e)=>0===e?i:this.merc2XyAsync_specifyLayer(t,r))))}));return e.then((e=>{const n=this.xys2SysCoords([e,t[1]]);return this.sysCoords2Viewpoint(n)}))}}var Dv="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Dv&&Dv,jv="URLSearchParams"in Dv,Fv="Symbol"in Dv&&"iterator"in Symbol,Nv="FileReader"in Dv&&"Blob"in Dv&&function(){try{return new Blob,!0}catch(t){return!1}}(),Bv="FormData"in Dv,zv="ArrayBuffer"in Dv;if(zv)var Gv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xv=ArrayBuffer.isView||function(t){return t&&Gv.indexOf(Object.prototype.toString.call(t))>-1};function Hv(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function Uv(t){return"string"!=typeof t&&(t=String(t)),t}function Zv(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return Fv&&(e[Symbol.iterator]=function(){return e}),e}function qv(t){this.map={},t instanceof qv?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Wv(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function Yv(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function Vv(t){var e=new FileReader,n=Yv(e);return e.readAsArrayBuffer(t),n}function Kv(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function $v(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:Nv&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Bv&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:jv&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():zv&&Nv&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=Kv(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):zv&&(ArrayBuffer.prototype.isPrototypeOf(t)||Xv(t))?this._bodyArrayBuffer=Kv(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):jv&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Nv&&(this.blob=function(){var t=Wv(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=Wv(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(Vv)}),this.text=function(){var t,e,n,r=Wv(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=Yv(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Bv&&(this.formData=function(){return this.text().then(tm)}),this.json=function(){return this.text().then(JSON.parse)},this}qv.prototype.append=function(t,e){t=Hv(t),e=Uv(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},qv.prototype.delete=function(t){delete this.map[Hv(t)]},qv.prototype.get=function(t){return t=Hv(t),this.has(t)?this.map[t]:null},qv.prototype.has=function(t){return this.map.hasOwnProperty(Hv(t))},qv.prototype.set=function(t,e){this.map[Hv(t)]=Uv(e)},qv.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},qv.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),Zv(t)},qv.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),Zv(t)},qv.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),Zv(t)},Fv&&(qv.prototype[Symbol.iterator]=qv.prototype.entries);var Jv=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Qv(t,e){if(!(this instanceof Qv))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof Qv){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new qv(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new qv(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),Jv.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function tm(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function em(t,e){if(!(this instanceof em))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new qv(e.headers),this.url=e.url||"",this._initBody(t)}Qv.prototype.clone=function(){return new Qv(this,{body:this._bodyInit})},$v.call(Qv.prototype),$v.call(em.prototype),em.prototype.clone=function(){return new em(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new qv(this.headers),url:this.url})},em.error=function(){var t=new em(null,{status:0,statusText:""});return t.type="error",t};var nm=[301,302,303,307,308];em.redirect=function(t,e){if(-1===nm.indexOf(e))throw new RangeError("Invalid status code");return new em(null,{status:e,headers:{location:t}})};var rm=Dv.DOMException;try{new rm}catch(t){rm=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},rm.prototype=Object.create(Error.prototype),rm.prototype.constructor=rm}function im(t,e){return new Promise((function(n,r){var i=new Qv(t,e);if(i.signal&&i.signal.aborted)return r(new rm("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var t,e,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new qv,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new em(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new rm("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&Dv.location.href?Dv.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Nv?o.responseType="blob":zv&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof qv?i.headers.forEach((function(t,e){o.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){o.setRequestHeader(t,Uv(e.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}im.polyfill=!0,Dv.fetch||(Dv.fetch=im,Dv.Headers=qv,Dv.Request=Qv,Dv.Response=em);const om={osm:{mapID:"osm",title:{ja:"オープンストリートマップ",en:"OpenStreetMap"},label:{ja:"OSM(現在)",en:"OSM(Now)"},attr:"©︎ OpenStreetMap contributors",maptype:"base",thumbnail:"assets/images/6345ee67d554fbfbf484ba4035ad19d9.jpg",urls:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png","https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"]},gsi:{mapID:"gsi",title:{ja:"地理院地図",en:"Geospatial Information Authority of Japan Map"},label:{ja:"地理院地図",en:"GSI Map"},attr:{ja:"国土地理院",en:"The Geospatial Information Authority of Japan"},maptype:"base",url:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",maxZoom:18,thumbnail:"assets/images/b9ae27f0a01228380dff76a33b605707.jpg"},gsi_ortho:{mapID:"gsi_ortho",title:{ja:"地理院地図オルソ航空写真",en:"Geospatial Information Authority of Japan Ortho aerial photo"},label:{ja:"地理院オルソ",en:"GSI Ortho"},attr:{ja:"国土地理院",en:"The Geospatial Information Authority of Japan"},maptype:"base",url:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg",maxZoom:18,thumbnail:"assets/images/41b2cf0fa604d3f196ca52337d238219.jpg"}};async function sm(t,e){if("string"==typeof t&&(t=om[t]),(t=di(Object.assign(t,e))).label=t.label||t.year,"base"===t.maptype||"overlay"===t.maptype||"mapbox"===t.maptype){const e="base"===t.maptype?Nf:"overlay"===t.maptype?ed:Bf;e instanceof ed?(t.homePosition||(t.homePosition=t.homePos),t.mercZoom||(t.mercZoom=t.defZoom)):(t.homePosition=t.homePos,t.mercZoom=t.defZoom),delete t.homePos,delete t.defZoom,t.zoomRestriction&&(t.maxZoom=t.maxZoom||t.mercMaxZoom,t.minZoom=t.minZoom||t.mercMinZoom),t.zoomRestriction=t.mercMaxZoom=t.mercMinZoom=void 0,t.translator&&(t.url=t.translator(t.url)),t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=t.tms?`tiles/${t.mapID}/{z}/{x}/{-y}.${t.imageExtension}`:`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t.weiwudi=await am(t),t.weiwudi&&(t.url=t.weiwudi.url,delete t.urls);const n=await e.createAsync(t);return await n.initialWait,n}return t.noload?(t.mercMaxZoom=t.mercMinZoom=void 0,new Rv(t)):new Promise(((e,n)=>{const r=t.settingFile||`maps/${t.mapID}.json`,i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="json",i.onload=async function(r){if(200===this.status||0===this.status)try{let r=this.response;if("object"!=typeof r&&(r=JSON.parse(r)),(t=di(Object.assign(r,t))).label=t.label||r.year,t.translator&&(t.url=t.translator(t.url)),t.maptype||(t.maptype="maplat"),"base"===t.maptype||"overlay"===t.maptype||"mapbox"===t.maptype){const r="base"===t.maptype?Nf:"overlay"===t.maptype?ed:Bf;r instanceof ed?(t.homePosition||(t.homePosition=t.homePos),t.mercZoom||(t.mercZoom=t.defZoom)):(t.homePosition=t.homePos,t.mercZoom=t.defZoom),delete t.homePos,delete t.defZoom,t.zoomRestriction&&(t.maxZoom=t.maxZoom||t.mercMaxZoom,t.minZoom=t.minZoom||t.mercMinZoom),t.zoomRestriction=t.mercMaxZoom=t.mercMinZoom=void 0;try{t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=t.tms?`tiles/${t.mapID}/{z}/{x}/{-y}.${t.imageExtension}`:`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t.weiwudi=await am(t),t.weiwudi&&(t.url=t.weiwudi.url,delete t.urls);const n=await r.createAsync(t);try{await n.initialWait,e(n)}catch(t){e(n)}}catch(t){n(t)}return}try{delete t.homePos,delete t.defZoom,t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t.width=t.width||t.compiled.wh[0],t.height=t.height||t.compiled.wh[1],t.weiwudi=await am(t),t.weiwudi&&(t.url=t.weiwudi.url,delete t.urls);const n=await Rv.createAsync(t);try{await n.initialWait,n.setupMapParameter(e)}catch(t){n.setupMapParameter(e)}}catch(t){n(t)}}catch(t){n(t)}else n("Fail to load map json")},i.send()}))}async function am(t){const e={};if("mapbox"===t.maptype||!t.enableCache)return;"base"===t.maptype||"overlay"===t.maptype?e.type="wmts":e.type="xyz",e.url=t.urls?t.urls:t.url,e.width=t.width,e.height=t.height,e.maxZoom=t.maxZoom,e.minZoom=t.minZoom;const n=t.envelopeLngLats;if(n){const t=n.reduce(((t,e)=>(t[0]=t[0]>e[0]?e[0]:t[0],t[1]=t[1]<e[0]?e[0]:t[1],t[2]=t[2]>e[1]?e[1]:t[2],t[3]=t[3]<e[1]?e[1]:t[3],t)),[1/0,-1/0,1/0,-1/0]);["minLng","maxLng","minLat","maxLat"].map(((n,r)=>{e[n]=t[r]}))}let r;try{r=await sd.registerMap(t.mapID,e)}catch(t){}return r}const lm={};var cm=n(6816),um=n.n(cm);function hm(t,...e){const n=di(Object.assign({},t));if(n.icon)return n;const r=e.reduce(((t,e)=>{if(t)return t;const r=e.iconTemplate||e.iconTemplate;return r?JSON.parse(um()(r)(n)):e.icon?{icon:e.icon,selectedIcon:e.selectedIcon||e.selectedIcon}:void 0}),void 0);return r&&(n.icon=r.icon,n.selectedIcon=r.selectedIcon),n}function pm(t,...e){return(t=di(t)).html?t:e.reduce(((e,n)=>{if(e)return e;const r=n.poiTemplate;return r?(t.html=um()(r)(t),t.poiStyle=t.poiStyle||n.poiStyle,t):void 0}),void 0)||t}class fm extends st.Z{constructor(t){super(),this.translateUI=!1,this.noRotate=!1,this.initialRestore={},this.mapDiv="map_div",this.restoreSession=!1,this.stateBuffer={},this.overlay=!0,this.appLang="ja",this.timer=void 0,this.startFrom="",this.vectors=[],this.__backMapMoving=!1,this.__init=!0,this.__redrawMarkerBlock=!1,this.__redrawMarkerThrottle=[],t=di(t),this.appid=t.appid||"sample",t.mapboxgl&&(this.mapboxgl=t.mapboxgl,t.mapboxToken&&(this.mapboxgl.accessToken=t.mapboxToken)),this.mapDiv=t.div||"map_div",this.mapDivDocument=document.querySelector(`#${this.mapDiv}`),this.mapDivDocument.classList.add("maplat"),this.logger=new Be(t.debug?Ne.ALL:Ne.INFO),this.enableCache=t.enableCache||!1,this.icon=t.icon,this.selectedIcon=t.selectedIcon,this.translateUI=t.translateUI;const e=t.setting;if(this.lang=t.lang,this.lang||(this.lang=je()),"zh-hk"!=this.lang.toLowerCase()&&"zh-hant"!=this.lang.toLowerCase()||(this.lang="zh-TW"),t.restore)t.restoreSession&&(this.restoreSession=!0),this.initialRestore=t.restore;else if(t.restoreSession){this.restoreSession=!0;const t=parseInt(localStorage.getItem("epoch")||"0"),e=Math.floor((new Date).getTime()/1e3);t&&e-t<3600&&(this.initialRestore.mapID=localStorage.getItem("mapID")||localStorage.getItem("sourceID")||void 0,this.initialRestore.backgroundID=localStorage.getItem("backgroundID")||localStorage.getItem("backID")||void 0,this.initialRestore.position={x:parseFloat(localStorage.getItem("x")||"0"),y:parseFloat(localStorage.getItem("y")||"0"),zoom:parseFloat(localStorage.getItem("zoom")||"0"),rotation:parseFloat(localStorage.getItem("rotation")||"0")},this.initialRestore.transparency=parseFloat(localStorage.getItem("transparency")||"0"),this.initialRestore.hideMarker=parseInt(localStorage.getItem("hideMarker")||"0"),this.initialRestore.hideLayer=localStorage.getItem("hideLayer")||void 0)}const n=hi('<img id="center_circle" class="prevent-default" alt=""\n style="position:absolute;top:50%;left:50%;margin-top:-10px;\n margin-left:-10px;" src="assets/images/7df82bae917b68159f84998182f2fdc6.png">');for(let t=n.length-1;t>=0;t--)this.mapDivDocument.insertBefore(n[t],this.mapDivDocument.firstChild);const r=this.mapDivDocument.querySelectorAll(".prevent-default");for(let t=0;t<r.length;t++){r[t].addEventListener("touchstart",(t=>{t.preventDefault()}))}this.overlay=!("overlay"in t)||t.overlay,this.overlay&&this.mapDivDocument.classList.add("with-opacity"),this.waitReady=this.settingLoader(e).then((e=>this.handleSetting(e,t)))}async settingLoader(t){return t||new Promise(((t,e)=>{const n=new XMLHttpRequest;n.open("GET",`apps/${this.appid}.json`,!0),n.responseType="json",n.onload=function(e){let n=this.response;"object"!=typeof n&&(n=JSON.parse(n)),t(n)},n.send()}))}async i18nLoader(){return new Promise(((t,e)=>{const n=0!=Object.keys(lm).length;(this.translateUI&&!n?Ee.use(Ie):Ee).init({lng:this.lang,fallbackLng:["en"],backend:{loadPath:"assets/locales/{{lng}}/{{ns}}.json"},resources:n?lm:void 0},((e,n)=>{t([n,Ee])}))}))}async sourcesLoader(t){const e=this.appData.sources,n=[],r={homePos:t.homePos,defZoom:t.defZoom,zoomRestriction:t.zoomRestriction,mercMinZoom:t.mercMinZoom,mercMaxZoom:t.mercMaxZoom,enableCache:this.enableCache,translator:t=>this.translate(t)};for(let t=0;t<e.length;t++){const i=e[t];n.push(sm(i,r))}return Promise.all(n)}handleSetting(t,e){return this.appData=di(t),!this.lang&&this.appData.lang&&(this.lang=this.appData.lang),this.i18nLoader().then((t=>this.handleI18n(t,e)))}handleI18n(t,e){this.i18n=t[1],this.t=t[0];const n=this.prepareMap(e);return Kr(this.appData.pois||[],this).then((t=>this.handlePois(t,n)))}prepareMap(t){t=di(t),this.mercBuffer=null;const e=this.appData.homePosition,n=this.appData.defaultZoom,r=this.appData.zoomRestriction,i=this.appData.minZoom,o=this.appData.maxZoom;this.appName=this.appData.appName;const s=!!t.fake&&this.appData.fakeGps,a=!!t.fake&&this.appData.fakeRadius;this.appLang=this.appData.lang||"ja",this.noRotate=t.noRotate||this.appData.noRotate||!1,this.poiTemplate=t.poiTemplate||this.appData.poiTemplate||!1,this.poiStyle=t.poiStyle||this.appData.poiStyle||!1,this.iconTemplate=t.iconTemplate||this.appData.iconTemplate||!1,this.currentPosition=null,this.__init=!0,this.dispatchEvent(new De("uiPrepare"));const l=`${this.mapDiv}_front`;let c=hi(`<div id="${l}" class="map" style="top:0; left:0; right:0; bottom:0; position:absolute;"></div>`)[0];this.mapDivDocument.insertBefore(c,this.mapDivDocument.firstChild),this.mapObject=new Kf({div:l,controls:this.appData.controls||[],interactions:this.noRotate?yc({altShiftDragRotate:!1,pinchRotate:!1}):yc().extend([new Qf({condition:xl})]),fakeGps:s,fakeRadius:a,homePosition:e});let u=null;if(this.overlay&&(u=`${this.mapDiv}_back`,c=hi(`<div id="${u}" class="map" style="top:0; left:0; right:0; bottom:0; position:absolute;"></div>`)[0],this.mapDivDocument.insertBefore(c,this.mapDivDocument.firstChild),this.backMap=new Kf({off_control:!0,div:u})),this.mapboxgl){const t=this.mapboxgl;delete this.mapboxgl;const e=`${this.mapDiv}_mapbox`;c=hi(`<div id="${e}" class="map" style="top:0; left:0; right:0; bottom:0; position:absolute;visibility:hidden;"></div>`)[0],this.mapDivDocument.insertBefore(c,this.mapDivDocument.firstChild),this.mapboxMap=new t.Map({attributionControl:!1,boxZoom:!1,container:e,doubleClickZoom:!1,dragPan:!1,dragRotate:!1,interactive:!1,keyboard:!1,pitchWithRotate:!1,scrollZoom:!1,touchZoomRotate:!1})}return this.startFrom=this.appData.startFrom,{homePos:e,defZoom:n,zoomRestriction:r,mercMinZoom:i,mercMaxZoom:o}}handlePois(t,e){return this.pois=t,this.sourcesLoader(e).then((t=>this.handleSources(t)))}handleSources(t){this.mercSrc=t.reduce(((t,e)=>t||(e instanceof Nf&&!(e instanceof ed)?e:void 0)),null);const e=[];this.cacheHash={};for(let n=0;n<t.length;n++){const r=t[n];if(r._map=this.mapObject,r instanceof Bf){if(!this.mapboxMap)throw"To use mapbox gl based base map, you have to make Maplat object with specifying 'mapboxgl' option.";r.mapboxMap=this.mapboxMap}e.push(r),this.cacheHash[r.mapID]=r}this.dispatchEvent(new De("sourceLoaded",t)),this.setInitialMap(e),this.setMapClick(),this.setPointerEvents(),this.setMapOnOff(),this.setMouseCursor(),this.setBackMapBehavior(),this.raiseChangeViewpoint()}async setInitialMap(t){const e=this.initialRestore.mapID||this.startFrom||t[t.length-1].mapID;this.from=t.reduce(((t,n)=>t?t instanceof td||n.mapID==e?t:n:n.mapID!=e?n:t),void 0),await this.changeMap(e,this.initialRestore)}setMapClick(){this.mapObject.on("click",(t=>{this.logger.debug(t.pixel),this.lastClickEvent=t;const e=[];if(t.target.forEachFeatureAtPixel(t.pixel,(n=>{this.logger.debug(t.pixel),n.get("datum")&&e.push(n.get("datum"))})),e.length>0)this.dispatchEvent(new De("clickMarker",e[0])),this.dispatchEvent(new De("clickMarkers",e));else{const e=t.coordinate;this.dispatchEvent(new De("clickMapXy",e)),this.from.sysCoord2MercAsync(e).then((t=>{this.dispatchEvent(new De("clickMapMerc",t));const e=Ar(t,"EPSG:3857","EPSG:4326");this.dispatchEvent(new De("clickMap",{longitude:e[0],latitude:e[1]}))}))}}))}setPointerEvents(){let t,e=!1,n=!1;const r={},i=n=>{this.dispatchEvent(new De("pointerMoveOnMapXy",n)),this.from.sysCoord2MercAsync(n).then((n=>{if(this.dispatchEvent(new De("pointerMoveOnMapMerc",n)),t){const e=t;t=!1,i(e)}else e=!1}))};this.mapObject.on("pointermove",(r=>{n||(e?t=r.coordinate:(e=!0,i(r.coordinate)))})),this.mapObject.on("pointerdown",(t=>{t.originalEvent&&null!=t.originalEvent.pointerId&&(r[t.originalEvent.pointerId]=!0),n=!0})),this.mapObject.on("pointerdrag",(t=>{t.originalEvent&&null!=t.originalEvent.pointerId&&(r[t.originalEvent.pointerId]=!0),n=!0})),this.mapObject.on("pointerup",(t=>{t.originalEvent&&null!=t.originalEvent.pointerId?(delete r[t.originalEvent.pointerId],0==Object.keys(r).length&&(n=!1)):t.originalEvent&&t.originalEvent.touches?0==t.originalEvent.touches.length&&(n=!1):n=!1}))}setMapOnOff(){let t;this.mapObject.on("click",(()=>{t&&(clearTimeout(t),t=void 0);const e=this.mapDivDocument.querySelectorAll(".ol-control");for(let t=0;t<e.length;t++)e[t].classList.remove("fade")})),this.mapObject.on("pointerdrag",(()=>{t&&(clearTimeout(t),t=void 0);const e=this.mapDivDocument.querySelectorAll(".ol-control");for(let t=0;t<e.length;t++)e[t].classList.add("fade")})),this.mapObject.on("moveend",(()=>{t&&(clearTimeout(t),t=void 0),t=setTimeout((()=>{t=void 0;const e=this.mapDivDocument.querySelectorAll(".ol-control");for(let t=0;t<e.length;t++)e[t].classList.remove("fade")}),3e3)}))}setMouseCursor(){this.mapObject.on("pointermove",(t=>{const e=t.target.getEventPixel(t.originalEvent),n=t.target.hasFeatureAtPixel(e),r=t.target.getTarget();if(n){const e=t.target.forEachFeatureAtPixel(t.pixel,(t=>{if(t.get("datum"))return t}));this.mapDivDocument.querySelector(`#${r}`).style.cursor=e?"pointer":""}else this.mapDivDocument.querySelector(`#${r}`).style.cursor=""}));this.mapObject.on("moveend",(t=>{let e=t.frameState.viewState.center;const n=this.from;n.insideCheckSysCoord(e)||(e=n.modulateSysCoordInside(e),t.target.getView().setCenter(e))}))}setBackMapBehavior(){this.mapObject.on("postrender",(t=>{if(!this.backMap)return;if(this.__backMapMoving)return void this.logger.debug("Backmap moving skipped");const e=this.backMap.getSource();e&&(this.__backMapMoving=!0,this.logger.debug("Backmap moving started"),this.convertParametersFromCurrent(e,(t=>{const e=this.backMap.getView();e.setCenter(t[0]),e.setZoom(t[1]),e.setRotation(this.noRotate?0:t[2]),this.logger.debug("Backmap moving ended"),this.__backMapMoving=!1})))}))}raiseChangeViewpoint(){this.mapObject.on("postrender",(t=>{const e=this.mapObject.getView(),n=e.getCenter(),r=e.getDecimalZoom(),i=pi(180*e.getRotation()/Math.PI);this.from.viewpoint2MercsAsync().then((t=>this.mercSrc.mercs2ViewpointAsync(t))).then((t=>{if(this.mobileMapMoveBuffer&&this.mobileMapMoveBuffer[0][0]==t[0][0]&&this.mobileMapMoveBuffer[0][1]==t[0][1]&&this.mobileMapMoveBuffer[1]==t[1]&&this.mobileMapMoveBuffer[2]==t[2])return;this.mobileMapMoveBuffer=t;const e=Ar(t[0],"EPSG:3857","EPSG:4326"),o=pi(180*t[2]/Math.PI);this.dispatchEvent(new De("changeViewpoint",{x:n[0],y:n[1],longitude:e[0],latitude:e[1],mercator_x:t[0][0],mercator_y:t[0][1],zoom:r,mercZoom:t[1],direction:o,rotation:i})),this.requestUpdateState({position:{x:n[0],y:n[1],zoom:r,rotation:i}})}))}))}currentMapInfo(){return fi(this.from)}mapInfo(t){return fi(this.cacheHash[t])}setMarker(t){this.logger.debug(t);const e=t.lnglat||[t.lng||t.longitude,t.lat||t.latitude],n=t.x,r=t.y,i=t.coordinates,o=this.from,s=t.icon?this.__selectedMarker==t.namespaceID&&t.selectedIcon?t.selectedIcon:t.icon:this.__selectedMarker==t.namespaceID?"assets/images/f115726e6249018905cca51653e1262c.png":Uf;return(i?o.merc2SysCoordAsync_ignoreBackground(i):n&&r?new Promise((t=>{t(o.xy2SysCoord([n,r]))})):function(){const t=Ar(e,"EPSG:4326","EPSG:3857");return o.merc2SysCoordAsync_ignoreBackground(t)}()).then((e=>{e&&o.insideCheckSysCoord(e)&&this.mapObject.setMarker(e,{datum:t},s)}))}resetMarker(){this.mapObject.resetMarker()}setLine(t){t.type="Line",!t.style&&t.stroke&&(t.style={stroke:t.stroke}),this.setVector(t)}setVector(t){let e;this.logger.debug(t);const n=(t,e=!1)=>Promise.all(t.map((t=>Array.isArray(t[0])?n(t,e):(e&&(t=Ar(t,"EPSG:4326","EPSG:3857")),this.from.merc2SysCoordAsync(t)))));e=t.coordinates?n(t.coordinates):n(t.lnglats,!0),e.then((e=>{this.mapObject.setVector(e,t.type,t.style)}))}resetLine(){this.resetVector()}resetVector(){this.mapObject.resetVector()}redrawMarkers(t){if(t||(t=this.from),this.__redrawMarkerBlock){this.__redrawMarkerThrottle||(this.__redrawMarkerThrottle=[]);const e=this.__redrawMarkerThrottle;if(0==e.length||e[e.length-1]!==t)return void e.push(t)}this.__redrawMarkerBlock=!0;const e=t=>{const n=[];let r;this.resetMarker(),this.stateBuffer.hideMarker||(Object.keys(this.pois).map((t=>{const e=this.pois[t];e.hide||e.pois.map((t=>{const i=hm(t,e,this);pm(i,e,this),this.__selectedMarker==i.namespaceID?r=i:n.push(this.setMarker(i))}))})),t.pois&&Object.keys(t.pois).map((e=>{const i=t.pois[e];i.hide||i.pois.map((e=>{const o=hm(e,i,t,this);pm(o,i,t,this),this.__selectedMarker==o.namespaceID?r=o:n.push(this.setMarker(o))}))})));let i=Promise.all(n);r&&(i=i.then((()=>this.setMarker(r)))),i.then((()=>{this.__redrawMarkerThrottle&&this.__redrawMarkerThrottle.length>0?e(this.__redrawMarkerThrottle.shift()):this.__redrawMarkerBlock=!1}))};e(t)}selectMarker(t){const e=this.getMarker(t);if(!e)return;this.__selectedMarker=t;const n={latitude:e.lnglat?e.lnglat[1]:e.lat?e.lat:e.latitude,longitude:e.lnglat?e.lnglat[0]:e.lng?e.lng:e.longitude};this.setViewpoint(n),this.redrawMarkers()}unselectMarker(){delete this.__selectedMarker,this.redrawMarkers()}getMarker(t){if(t.indexOf("#")<0){let e;return Object.keys(this.pois).map((n=>{this.pois[n].pois.map(((r,i)=>{r.id==t&&(e=this.pois[n].pois[i])}))})),e}{const e=t.split("#"),n=this.cacheHash[e[0]];if(n)return n.getPoi(e[1])}}updateMarker(t,e,n){const r=this.getMarker(t);r&&(e=Jr(e||{}),n?(Object.keys(r).map((t=>{"id"!=t&&"namespaceID"!=t&&delete r[t]})),Object.assign(r,e)):Object.keys(e).map((t=>{"id"!=t&&"namespaceID"!=t&&("____delete____"==e[t]?delete r[t]:r[t]=e[t])})),this.redrawMarkers())}addMarker(t,e){if(e||(e="main"),e.indexOf("#")<0){if(this.pois[e])return this.pois[e].pois.push(Jr(t)),Qr(this.pois,e,{name:this.appName}),this.dispatchPoiNumber(),this.redrawMarkers(),t.namespaceID}else{const n=e.split("#"),r=this.cacheHash[n[0]];if(r){const e=r.addPoi(t,n[1]);return this.dispatchPoiNumber(),this.redrawMarkers(),e}}}removeMarker(t){if(t.indexOf("#")<0)Object.keys(this.pois).map((e=>{this.pois[e].pois.map(((n,r)=>{n.id==t&&(delete this.pois[e].pois[r],this.dispatchPoiNumber(),this.redrawMarkers())}))}));else{const e=t.split("#"),n=this.cacheHash[e[0]];n&&(n.removePoi(e[1]),this.dispatchPoiNumber(),this.redrawMarkers())}}clearMarker(t){if(t||(t="main"),t.indexOf("#")<0){if("all"==t)Object.keys(this.pois).map((t=>{this.pois[t].pois=[]}));else{if(!this.pois[t])return;this.pois[t].pois=[]}this.dispatchPoiNumber(),this.redrawMarkers()}else{const e=t.split("#"),n=this.cacheHash[e[0]];n&&(n.clearPoi(e[1]),this.dispatchPoiNumber(),this.redrawMarkers())}}showAllMarkers(){this.requestUpdateState({hideMarker:0}),this.redrawMarkers()}hideAllMarkers(){this.requestUpdateState({hideMarker:1}),this.redrawMarkers()}dispatchPoiNumber(){this.dispatchEvent(new De("poi_number",this.listPoiLayers(!1,!0).reduce(((t,e)=>t+e.pois.length),0)))}listPoiLayers(t=!1,e=!1){const n=Object.keys(this.pois).sort(((t,e)=>"main"==t?-1:"main"==e?1:t<e?-1:t>e?1:0)).map((t=>this.pois[t])).filter((n=>e?t?n.pois.length&&n.hide:n.pois.length:!t||n.hide)),r=this.from.listPoiLayers(t,e);return n.concat(r)}showPoiLayer(t){const e=this.getPoiLayer(t);e&&(delete e.hide,this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.redrawMarkers())}hidePoiLayer(t){const e=this.getPoiLayer(t);e&&(e.hide=!0,this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.redrawMarkers())}getPoiLayer(t){if(t.indexOf("#")<0)return this.pois[t];{const e=t.split("#"),n=this.cacheHash[e[0]];if(n)return n.getPoiLayer(e[1])}}addPoiLayer(t,e){if("main"!=t&&!this.pois[t])if(t.indexOf("#")<0)this.pois[t]=$r(e||[],t,{name:this.appName}),this.redrawMarkers();else{const n=t.split("#"),r=this.cacheHash[n[0]];r&&(r.addPoiLayer(n[1],e),this.redrawMarkers())}}removePoiLayer(t){if("main"!=t&&this.pois[t])if(t.indexOf("#")<0)delete this.pois[t],this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.dispatchPoiNumber(),this.redrawMarkers();else{const e=t.split("#"),n=this.cacheHash[e[0]];n&&(n.removePoiLayer(e[1]),this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.dispatchPoiNumber(),this.redrawMarkers())}}addLine(t){this.vectors.push(t),this.setLine(t)}addVector(t){this.vectors.push(t),this.setVector(t)}clearLine(){this.vectors=[],this.resetLine()}clearVector(){this.vectors=[],this.resetVector()}setGPSMarker(t){this.currentPosition=t,this.from.setGPSMarker(t,!0)}changeMap(t,e){void 0===e&&(e={});const n=this.mercSrc,r=this.cacheHash[t];return this.changeMapSeq||(this.changeMapSeq=Promise.resolve()),this.changeMapSeq=this.changeMapSeq.then((()=>new Promise(((t,i)=>{this.convertParametersFromCurrent(r,(i=>{let o=null,s=null;const a=e.backgroundID?this.cacheHash[e.backgroundID]:void 0;if(this.backMap&&(o=this.backMap.getSource(),r instanceof Nf?this.backMap.exchangeSource():(a?(s=a,this.backMap.exchangeSource(s)):o?s=o:(s=n,this.from instanceof Nf&&(s=this.from instanceof ed?this.mapObject.getSource():this.from),this.backMap.exchangeSource(s)),this.requestUpdateState({backgroundID:s.mapID}))),r instanceof ed){if(this.mapObject.setLayer(r),a)this.mapObject.exchangeSource(a);else if(!(this.from instanceof Nf)){const t=o||n;this.mapObject.exchangeSource(t)}this.requestUpdateState({backgroundID:this.mapObject.getSource().mapID})}else this.mapObject.setLayer(),this.mapObject.exchangeSource(r);const l={mapID:r.mapID};r instanceof Nf&&!(r instanceof ed)&&(l.backgroundID="____delete____"),this.requestUpdateState(l),this.from=r,this.dispatchPoiNumber();const c=this.mapObject.getView();if(this.appData.zoomRestriction&&(c.setMaxZoom(r.maxZoom),c.setMinZoom(r.minZoom||0)),r.insideCheckSysCoord(i[0])?(c.setCenter(i[0]),c.setZoom(i[1]),c.setRotation(this.noRotate?0:i[2])):this.__init||(this.dispatchEvent(new De("outOfMap",{})),r.goHome()),r.setGPSMarker(this.currentPosition,!0),e.hideLayer){e.hideLayer.split(",").map((t=>{const e=this.getPoiLayer(t);e&&(e.hide=!0)})),this.requestUpdateState({hideLayer:e.hideLayer})}e.hideMarker?this.hideAllMarkers():this.redrawMarkers(),this.resetVector();for(let t=0;t<this.vectors.length;t++)(t=>{this.setVector(t)})(this.vectors[t]);this.dispatchEvent(new De("mapChanged",this.getMapMeta(r.mapID))),this.mapObject.updateSize(),this.mapObject.renderSync(),e.position&&(this.__init=!1,r.setViewpoint(e.position)),e.transparency&&this.setTransparency(e.transparency),this.__init?(this.__init=!1,r.goHome()):this.backMap&&s&&this.convertParametersFromCurrent(s,(t=>{const e=this.backMap.getView();e.setCenter(t[0]),e.setZoom(t[1]),e.setRotation(this.noRotate?0:t[2]),this.backMap.updateSize(),this.backMap.renderSync()})),t(void 0)}))}))))}requestUpdateState(t){if(this.stateBuffer=Object.assign(this.stateBuffer,t),"____delete____"==this.stateBuffer.backgroundID&&delete this.stateBuffer.backgroundID,this.restoreSession){const e=Math.floor((new Date).getTime()/1e3);localStorage.setItem("epoch",`${e}`);const n=function(t){Object.keys(t).map((e=>{"position"==e?n(t[e]):"backgroundID"==e&&"____delete____"==t[e]?localStorage.removeItem(e):localStorage.setItem(e,t[e])}))};n(t)}this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.timer=void 0,this.dispatchEvent(new De("updateState",this.stateBuffer))}),50)}setTransparency(t){this.__transparency=t,this.mapObject.setTransparency(t),this.requestUpdateState({transparency:t})}getTransparency(){return null==this.__transparency?0:this.__transparency}setViewpoint(t){this.from.setViewpoint(t)}getMapMeta(t){let e;if(e=t?this.cacheHash[t]:this.from,e)return ai.reduce(((t,n)=>(t[n]=e[n],t)),{mapID:e.mapID,label:e.label})}getMapCacheEnable(t){let e;return e=t?this.cacheHash[t]:this.from,!!e&&e.getCacheEnable()}async getMapTileCacheStatsAsync(t){let e;return e=t?this.cacheHash[t]:this.from,e?await e.getTileCacheStatsAsync():{}}async getMapTileCacheSizeAsync(t){return(await this.getMapTileCacheStatsAsync(t)).size||0}async clearMapTileCacheAsync(t){let e;e=t?this.cacheHash[t]:this.from,e&&await e.clearTileCacheAsync()}async fetchAllMapTileCacheAsync(t,e){let n;n=t?this.cacheHash[t]:this.from,n?await n.fetchAllTileCacheAsync(e):e("stop",{})}async cancelMapTileCacheAsync(t){let e;e=t?this.cacheHash[t]:this.from,e&&await e.cancelTileCacheAsync()}convertParametersFromCurrent(t,e){const n=this.mapObject.getView();let r=this.from.viewpoint2MercsAsync();const i=Gf([n.getCenter(),n.getZoom(),n.getRotation()],10);if(this.mercBuffer&&this.mercBuffer.mercs&&this.mercBuffer.buffer[this.from.mapID]){const t=this.mercBuffer.buffer[this.from.mapID];t[0][0]==i[0][0]&&t[0][1]==i[0][1]&&t[1]==i[1]&&t[2]==i[2]?(this.logger.debug(t),this.logger.debug(i),this.logger.debug("From: Use buffer"),r=new Promise(((t,e)=>{t(this.mercBuffer.mercs)}))):(this.mercBuffer={buffer:{}},this.mercBuffer.buffer[this.from.mapID]=i)}else this.mercBuffer={buffer:{}},this.mercBuffer.buffer[this.from.mapID]=i;this.logger.debug(`From: Center: ${i[0]} Zoom: ${i[1]} Rotation: ${i[2]}`),this.logger.debug(`From: ${this.from.mapID}`),r.then((n=>{this.mercBuffer.mercs=n,this.logger.debug(`Mercs: ${n}`);let r=t.mercs2ViewpointAsync(n);const i=t.mapID;this.mercBuffer.buffer[i]&&(this.logger.debug("To: Use buffer"),r=new Promise(((t,e)=>{t(this.mercBuffer.buffer[i])}))),r.then((n=>{this.logger.debug(`To: Center: ${n[0]} Zoom: ${n[1]} Rotation: ${n[2]}`),this.logger.debug(`To: ${t.mapID}`),this.mercBuffer.buffer[t.mapID]=Gf(n,10),e(n)})).catch((t=>{throw t}))})).catch((t=>{throw t}))}translate(t){if(!t||"string"==typeof t)return t;const e=Object.keys(t);let n=e.reduce(((e,n,r,i)=>(n==this.appLang?e=[t[n],!0]:e&&("en"!=n||e[1])||(e=[t[n],!1]),r==i.length-1?e[0]:e)),void 0);if(n="string"==typeof n?n:`${n}`,this.i18n.exists(n,{ns:"translation",nsSeparator:"__X__yX__X__"}))return this.t(n,{ns:"translation",nsSeparator:"__X__yX__X__"});for(let r=0;r<e.length;r++){const i=e[r];this.i18n.addResource(i,"translation",n,t[i])}return this.t(n,{ns:"translation",nsSeparator:"__X__yX__X__"})}remove(){this.mapboxMap&&this.mapboxMap.remove(),this.mapDivDocument.innerHTML="",this.mapDivDocument.classList.remove("maplat")}}var dm=n(5025);function gm(t){return gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gm(t)}function vm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mm(t,e){return mm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mm(t,e)}function ym(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=bm(t);if(e){var i=bm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _m(this,n)}}function _m(t,e){if(e&&("object"===gm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function bm(t){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bm(t)}var wm,xm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mm(t,e)}(o,t);var e,n,r,i=ym(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).Internal.setItemListener=function(t,e){var n,r=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("pointerdown",(function(t){t.stopPropagation()})),t.addEventListener("click",(function(t){t.preventDefault();var i={coordinate:r.getCoordinateClicked(),data:r.items[e].data||null};n(i,r.map)||r.closeMenu()}),!1))},e}return e=o,n&&vm(e.prototype,n),r&&vm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(n.n(dm)()),Sm=n(953);n(9714);(function(){function t(t){this.mode=n.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var i=[],o=this.data.charCodeAt(e);o>65536?(i[0]=240|(1835008&o)>>>18,i[1]=128|(258048&o)>>>12,i[2]=128|(4032&o)>>>6,i[3]=128|63&o):o>2048?(i[0]=224|(61440&o)>>>12,i[1]=128|(4032&o)>>>6,i[2]=128|63&o):o>128?(i[0]=192|(1984&o)>>>6,i[1]=128|63&o):i[0]=o,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},e.prototype={addData:function(e){var n=new t(e);this.dataList.push(n),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,n){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[r][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,n),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,n)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=p.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},createMovieClip:function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,s=0;s<this.modules[i].length;s++){var a=1*s;this.modules[i][s]&&(r.beginFill(0,100),r.moveTo(a,o),r.lineTo(a+1,o),r.lineTo(a+1,o+1),r.lineTo(a,o+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=p.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},setupTypeNumber:function(t){for(var e=p.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=p.getBCHTypeInfo(n),i=0;i<15;i++){var o=!t&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[r][s-a]){var l=!1;o<t.length&&(l=1==(t[o]>>>i&1)),p.getMask(e,r,s-a)&&(l=!l),this.modules[r][s-a]=l,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,n,r){for(var i=v.getRSBlocks(t,n),o=new m,s=0;s<r.length;s++){var a=r[s];o.put(a.mode,4),o.put(a.getLength(),p.getLengthInBits(a.mode,t)),a.write(o)}var l=0;for(s=0;s<i.length;s++)l+=i[s].dataCount;if(o.getLengthInBits()>8*l)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*l+")");for(o.getLengthInBits()+4<=8*l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*l||(o.put(e.PAD0,8),o.getLengthInBits()>=8*l));)o.put(e.PAD1,8);return e.createBytes(o,i)},e.createBytes=function(t,e){for(var n=0,r=0,i=0,o=new Array(e.length),s=new Array(e.length),a=0;a<e.length;a++){var l=e[a].dataCount,c=e[a].totalCount-l;r=Math.max(r,l),i=Math.max(i,c),o[a]=new Array(l);for(var u=0;u<o[a].length;u++)o[a][u]=255&t.buffer[u+n];n+=l;var h=p.getErrorCorrectPolynomial(c),f=new g(o[a],h.getLength()-1).mod(h);s[a]=new Array(h.getLength()-1);for(u=0;u<s[a].length;u++){var d=u+f.getLength()-s[a].length;s[a][u]=d>=0?f.get(d):0}}var v=0;for(u=0;u<e.length;u++)v+=e[u].totalCount;var m=new Array(v),y=0;for(u=0;u<r;u++)for(a=0;a<e.length;a++)u<o[a].length&&(m[y++]=o[a][u]);for(u=0;u<i;u++)for(a=0;a<e.length;a++)u<s[a].length&&(m[y++]=s[a][u]);return m};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},i=0,o=1,s=2,a=3,l=4,c=5,u=6,h=7,p={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;p.getBCHDigit(e)-p.getBCHDigit(p.G15)>=0;)e^=p.G15<<p.getBCHDigit(e)-p.getBCHDigit(p.G15);return(t<<10|e)^p.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;p.getBCHDigit(e)-p.getBCHDigit(p.G18)>=0;)e^=p.G18<<p.getBCHDigit(e)-p.getBCHDigit(p.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return p.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case i:return(e+n)%2==0;case o:return e%2==0;case s:return n%3==0;case a:return(e+n)%3==0;case l:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case c:return e*n%2+e*n%3==0;case u:return(e*n%2+e*n%3)%2==0;case h:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new g([1],0),n=0;n<t;n++)e=e.multiply(new g([1,f.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var o=0,s=t.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||e<=r+a))for(var l=-1;l<=1;l++)i+l<0||e<=i+l||0==a&&0==l||s==t.isDark(r+a,i+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var u=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&u++;return n+=10*(Math.abs(100*u/e/e-50)/5)}},f={glog:function(t){if(t<1)throw new Error("glog("+t+")");return f.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return f.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},d=0;d<8;d++)f.EXP_TABLE[d]=1<<d;for(d=8;d<256;d++)f.EXP_TABLE[d]=f.EXP_TABLE[d-4]^f.EXP_TABLE[d-5]^f.EXP_TABLE[d-6]^f.EXP_TABLE[d-8];for(d=0;d<255;d++)f.LOG_TABLE[f.EXP_TABLE[d]]=d;function g(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function v(t,e){this.totalCount=t,this.dataCount=e}function m(){this.buffer=[],this.length=0}g.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=f.gexp(f.glog(this.get(n))+f.glog(t.get(r)));return new g(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=f.glog(this.get(0))-f.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=f.gexp(f.glog(t.get(r))+e);return new g(n,0).mod(t)}},v.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],v.getRSBlocks=function(t,e){var n=v.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var s=n[3*o+0],a=n[3*o+1],l=n[3*o+2],c=0;c<s;c++)i.push(new v(a,l));return i},v.getRsBlockTable=function(t,e){switch(e){case r.L:return v.RS_BLOCK_TABLE[4*(t-1)+0];case r.M:return v.RS_BLOCK_TABLE[4*(t-1)+1];case r.Q:return v.RS_BLOCK_TABLE[4*(t-1)+2];case r.H:return v.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},m.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var y=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function _(){var t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;var n=e.toString().match(/android ([0-9]\.[0-9])/i);n&&n[1]&&(t=parseFloat(n[1]))}return t}var b=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){var e=this._htOption,n=this._el,r=t.getModuleCount();Math.floor(e.width/r),Math.floor(e.height/r);function i(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg",t);for(var r in e)e.hasOwnProperty(r)&&n.setAttribute(r,e[r]);return n}this.clear();var o=i("svg",{viewBox:"0 0 "+String(r)+" "+String(r),width:"100%",height:"100%",fill:e.colorLight});o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),n.appendChild(o),o.appendChild(i("rect",{fill:e.colorLight,width:"100%",height:"100%"})),o.appendChild(i("rect",{fill:e.colorDark,width:"1",height:"1",id:"template"}));for(var s=0;s<r;s++)for(var a=0;a<r;a++)if(t.isDark(s,a)){var l=i("use",{x:String(a),y:String(s)});l.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),o.appendChild(l)}},t.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},t}.apply(window),w="svg"===document.documentElement.tagName.toLowerCase()?b:"undefined"==typeof CanvasRenderingContext2D?function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){for(var e=this._htOption,n=this._el,r=t.getModuleCount(),i=Math.floor(e.width/r),o=Math.floor(e.height/r),s=['<table style="border:0;border-collapse:collapse;">'],a=0;a<r;a++){s.push("<tr>");for(var l=0;l<r;l++)s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+i+"px;height:"+o+"px;background-color:"+(t.isDark(a,l)?e.colorDark:e.colorLight)+';"></td>');s.push("</tr>")}s.push("</table>"),n.innerHTML=s.join("");var c=n.childNodes[0],u=(e.width-c.offsetWidth)/2,h=(e.height-c.offsetHeight)/2;u>0&&h>0&&(c.style.margin=h+"px "+u+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}.apply(window):function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}if(this._android&&this._android<=2.1){var e=1/window.devicePixelRatio,n=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,r,i,o,s,a,l,c,u){if("nodeName"in t&&/img/i.test(t.nodeName))for(var h=arguments.length-1;h>=1;h--)arguments[h]=arguments[h]*e;else void 0===c&&(arguments[1]*=e,arguments[2]*=e,arguments[3]*=e,arguments[4]*=e);n.apply(this,arguments)}}function r(t,e){var n=this;if(n._fFail=e,n._fSuccess=t,null===n._bSupportDataURI){var r=document.createElement("img"),i=function(){n._bSupportDataURI=!1,n._fFail&&n._fFail.call(n)};return r.onabort=i,r.onerror=i,r.onload=function(){n._bSupportDataURI=!0,n._fSuccess&&n._fSuccess.call(n)},void(r.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===n._bSupportDataURI&&n._fSuccess?n._fSuccess.call(n):!1===n._bSupportDataURI&&n._fFail&&n._fFail.call(n)}var i=function(t,e){this._bIsPainted=!1,this._android=_(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return i.prototype.draw=function(t){var e=this._elImage,n=this._oContext,r=this._htOption,i=t.getModuleCount(),o=r.width/i,s=r.height/i,a=Math.round(o),l=Math.round(s);e.style.display="none",this.clear();for(var c=0;c<i;c++)for(var u=0;u<i;u++){var h=t.isDark(c,u),p=u*o,f=c*s;n.strokeStyle=h?r.colorDark:r.colorLight,n.lineWidth=1,n.fillStyle=h?r.colorDark:r.colorLight,n.fillRect(p,f,o,s),n.strokeRect(Math.floor(p)+.5,Math.floor(f)+.5,a,l),n.strokeRect(Math.ceil(p)-.5,Math.ceil(f)-.5,a,l)}this._bIsPainted=!0},i.prototype.makeImage=function(){this._bIsPainted&&r.call(this,t)},i.prototype.isPainted=function(){return this._bIsPainted},i.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},i.prototype.round=function(t){return t?Math.floor(1e3*t)/1e3:t},i}.apply(window);function x(t,e){for(var n=1,i=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),o=0,s=y.length;o<=s;o++){var a=0;switch(e){case r.L:a=y[o][0];break;case r.M:a=y[o][1];break;case r.Q:a=y[o][2];break;case r.H:a=y[o][3]}if(i<=a)break;n++}if(n>y.length)throw new Error("Too long data");return n}wm=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:r.H},"string"==typeof e&&(e={text:e}),e)for(var n in e)this._htOption[n]=e[n];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(w=b),this._android=_(),this._el=t,this._oQRCode=null,this._oDrawing=new w(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},wm.prototype.makeCode=function(t){this._oQRCode=new e(x(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},wm.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},wm.prototype.clear=function(){this._oDrawing.clear()},wm.CorrectLevel=r}).apply(window);const Em=wm;var Cm,Tm=n(686);n(4603),n(4819),n(5003);!function(){var t,e,n=document.attachEvent,r=!1;if(!n){var i=(e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)},function(t){return e(t)}),o=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),s=function(t){var e=t.__resizeTriggers__,n=e.firstElementChild,r=e.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},a=function(t){var e=this;s(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=i((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(e)&&(e.__resizeLast__.width=e.offsetWidth,e.__resizeLast__.height=e.offsetHeight,e.__resizeListeners__.forEach((function(n){n.call(e,t)})))}))},l=!1,c="",u="animationstart",h="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f="",d=document.createElement("fakeelement");if(void 0!==d.style.animationName&&(l=!0),!1===l)for(var g=0;g<h.length;g++)if(void 0!==d.style[h[g]+"AnimationName"]){(f=h[g])+"Animation",c="-"+f.toLowerCase()+"-",u=p[g],l=!0;break}var v="resizeanim",m="@"+c+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",y=c+"animation: 1ms "+v+"; "}Cm=function(t,e){n?t.attachEvent("onresize",e):(t.__resizeTriggers__||("static"==getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!r){var t=(m||"")+".resize-triggers { "+(y||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; } .contract-trigger:before { width: 200%; height: 200%; }',e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),e.appendChild(n),r=!0}}(),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),s(t),t.addEventListener("scroll",a,!0),u&&t.__resizeTriggers__.addEventListener(u,(function(e){e.animationName==v&&s(t)}))),t.__resizeListeners__.push(e))},function(t,e){n?t.detachEvent("onresize",e):(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||(t.removeEventListener("scroll",a),t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)))}}();const Om={"Maplat.png":"assets/images/558bc7e8b9b6c5f41a7141cddb8cdb5e.png","all_right_reserved.png":"assets/images/f101a0974972eeab41189185a5c5b225.png","attr.png":"assets/images/acc6eab0ba9c470ae20fb4b74135e865.png","basemap.png":"assets/images/7bef6f357e921c43f4f800cfcb757872.png","blue_marker.png":"assets/images/927c34e7b9b2f95c82ba477993117eaf.png","bluedot.png":"assets/images/6e1f2f2f6fed3c5cddeb925e7ae75aba.png","bluedot_small.png":"assets/images/0beac2cb41dfab43ddfd9df80b32b85d.png","bluedot_transparent.png":"assets/images/6c5dba7f7d76e74c3a8c7c5b1c3fc544.png","border.png":"assets/images/90c32e751366be22777f3fe40a53fe06.png","cc0.png":"assets/images/7d9d643a903df6f57b8b7386316021e5.png","cc_by-nc-nd.png":"assets/images/ffea4dd10bf2506aa1e0cd4c61426b42.png","cc_by-nc-sa.png":"assets/images/95e9ca8285131f8ccb6da5052093173c.png","cc_by-nc.png":"assets/images/ca6b77b234b18e7bb9b1ccda774da286.png","cc_by-nd.png":"assets/images/1354b4f40dd58bb0f2a4871cb4ff81d8.png","cc_by-sa.png":"assets/images/649fce122b354de2ac725ba5f2661955.png","cc_by.png":"assets/images/2a61e310e46b50b5f8ddd5e905ba9db9.png","compass.png":"assets/images/cd213169df16398b0017450e31788d73.png","defaultpin.png":"assets/images/9ac6d81f417d6a5626b7c8d5a087c32b.png","defaultpin_selected.png":"assets/images/f115726e6249018905cca51653e1262c.png","favicon.png":"assets/images/3131423d782cd3ea89a81247065e7f9d.png","fullscreen.png":"assets/images/9247459937b9c882303962e42bd8d989.png","gps.png":"assets/images/ba48b220f61a6e1028f1854326f43acd.png","gsi.jpg":"assets/images/b9ae27f0a01228380dff76a33b605707.jpg","gsi_ortho.jpg":"assets/images/41b2cf0fa604d3f196ca52337d238219.jpg","help.png":"assets/images/c49f2344772e33256ba24d64b59b20d1.png","hide_marker.png":"assets/images/9a243e0cb0fc43e2a016d5d3aaa330d5.png","home.png":"assets/images/09c3ce5a86d600e24f8e85de3a019853.png","loading.png":"assets/images/8e5d0335f6598b8d874ba23ea9fb295f.png","loading_image.png":"assets/images/5ba349e3596aca094c41c56966b45dc7.png","minus.png":"assets/images/f7acb820d978ab2dd69e8bf695c574d1.png","no_image.png":"assets/images/56f7003805ed02f8a21199947651db2e.png","osm.jpg":"assets/images/6345ee67d554fbfbf484ba4035ad19d9.jpg","overlay.png":"assets/images/799a0177b0dc540682fa4a2e349a8f4f.png","pd.png":"assets/images/bf67cc860289b85c0402a4d4f890a3bd.png","plus.png":"assets/images/6111b8076a2cf81c73f0e46f41a3af60.png","red_marker.png":"assets/images/6a580287dea82c2fb9b214321a375145.png","redcircle.png":"assets/images/7df82bae917b68159f84998182f2fdc6.png","share.png":"assets/images/9d3a01c866095b8b3e8e63f9cf11dd51.png","slider.png":"assets/images/9df733bcb29a746cb16b47eedea9fc3a.png"};function km(t){return km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},km(t)}function Mm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Lm(t,e,n){return e&&Pm(t.prototype,e),n&&Pm(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Am(){return Am="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Im(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Am.apply(this,arguments)}function Im(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Bm(t)););return t}function Rm(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dm(t,e)}function Dm(t,e){return Dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dm(t,e)}function jm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Bm(t);if(e){var i=Bm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fm(this,n)}}function Fm(t,e){if(e&&("object"===km(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nm(t)}function Nm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bm(t){return Bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bm(t)}var zm={},Gm={compass:"compass.png",border:"border.png",attr:"attr.png",gps:"gps.png",zoom_plus:"plus.png",zoom_minus:"minus.png",help:"help.png",home:"home.png",hide_marker:"hide_marker.png",share:"share.png",slider_in_help:"slider.png",favicon:"favicon.png"};function Xm(t){var e={};return t.match(/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i)?(e.red=parseInt(RegExp.$1,16),e.green=parseInt(RegExp.$2,16),e.blue=parseInt(RegExp.$3,16)):t.match(/^#?([0-9A-F])([0-9A-F])([0-9A-F])$/i)&&(e.red=parseInt("".concat(RegExp.$1).concat(RegExp.$1),16),e.green=parseInt("".concat(RegExp.$2).concat(RegExp.$2),16),e.blue=parseInt("".concat(RegExp.$3).concat(RegExp.$3),16)),e}var Hm=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{},o=document.createElement("div"),s=i.render?i.render:n.render;(r=e.call(this,{element:o,render:s})).direction_=n.Direction_.VERTICAL,r.dragging_=void 0,r.value_=void 0,r.previousX_=void 0,r.previousY_=void 0,r.thumbSize_=null,r.sliderInitialized_=!1,r.duration_=void 0!==i.duration?i.duration:200,r.reverse_=void 0!==i.reverse&&i.reverse,r.initialValue=i.initialValue;var a=void 0!==i.className?i.className:"ol-slidercommon",l=document.createElement("button");if(l.setAttribute("type","button"),l.className="".concat(a,"-thumb").concat(go),o.title=i.tipLabel,o.className="".concat(a," ").concat(go," ").concat(vo),o.appendChild(l),o.addEventListener("pointerdown",(function(t){t.stopPropagation(),r.handleDraggerStart_(t)})),o.addEventListener("pointermove",(function(t){t.stopPropagation(),r.handleDraggerDrag_(t)})),o.addEventListener("pointerup",(function(t){t.stopPropagation(),r.handleDraggerEnd_(t)})),l.addEventListener("click",(function(t){t.stopPropagation()})),o.addEventListener("mouseout",(function(t){t.stopPropagation(),r.handleDraggerEnd_(t)})),zm.slider_color){var c=Xm(zm.slider_color),u=r.element.querySelector("button");u.addEventListener("mouseover",(function(){u.style.backgroundColor="rgba(".concat(c.red,",").concat(c.green,",").concat(c.blue,",.7)")})),u.addEventListener("mouseout",(function(){var t=r.element.classList.contains("disable");u.style.backgroundColor="rgba(".concat(c.red,",").concat(c.green,",").concat(c.blue,",").concat(t?.2:.5,")")}))}return r}return Lm(n,[{key:"disposeInternal",value:function(){this.dragger_.dispose(),Am(Bm(n.prototype),"disposeInternal",this).call(this)}},{key:"setMap",value:function(t){Am(Bm(n.prototype),"setMap",this).call(this,t),t&&t.render()}},{key:"initSlider_",value:function(){var t=this.element,e=t.offsetWidth,r=t.offsetHeight,i=t.firstElementChild,o=getComputedStyle(i),s=i.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=i.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);this.thumbSize_=[s,a],this.direction_=e>r?n.Direction_.HORIZONTAL:n.Direction_.VERTICAL,this.setValue(this.initialValue||0);var l=this;Cm(t,(function(){l.setValue(l.value_)})),this.sliderInitialized_=!0}},{key:"widthLimit_",value:function(t){return this.element.offsetWidth-this.thumbSize_[0]}},{key:"heightLimit_",value:function(t){return this.element.offsetHeight-this.thumbSize_[1]}},{key:"handleContainerClick_",value:function(t){var e=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2);this.setThumbPosition_(e)}},{key:"handleDraggerStart_",value:function(t){this.dragging_||t.target!==this.element.firstElementChild||this.element.classList.contains("disable")||(this.getMap().getView().setHint(Ps,1),this.previousX_=t.clientX,this.previousY_=t.clientY,this.dragging_=!0)}},{key:"handleDraggerDrag_",value:function(t){if(this.dragging_){var e=this.element.firstElementChild,n=t.clientX-this.previousX_+(parseFloat(e.style.left,10)||0),r=t.clientY-this.previousY_+(parseFloat(e.style.top,10)||0),i=this.getRelativePosition_(n,r);this.setThumbPosition_(i),this.previousX_=t.clientX,this.previousY_=t.clientY}}},{key:"handleDraggerEnd_",value:function(t){this.dragging_&&(this.getMap().getView().setHint(Ps,-1),this.dragging_=!1,this.previousX_=void 0,this.previousY_=void 0)}},{key:"setThumbPosition_",value:function(t){var e=this.element.firstElementChild;this.direction_==n.Direction_.HORIZONTAL?e.style.left="".concat(this.widthLimit_()*t,"px"):e.style.top="".concat(this.heightLimit_()*t,"px"),this.value_=this.reverse_?1-t:t,this.set("slidervalue",this.value_)}},{key:"getRelativePosition_",value:function(t,e){return Ze(this.direction_===n.Direction_.HORIZONTAL?t/this.widthLimit_():e/this.heightLimit_(),0,1)}},{key:"setValue",value:function(t){t=this.reverse_?1-t:t,this.setThumbPosition_(t)}},{key:"setEnable",value:function(t){var e=this.element;if(t?e.classList.remove("disable"):e.classList.add("disable"),zm.slider_color){var n=Xm(zm.slider_color);e.querySelector("button").style.backgroundColor="rgba(".concat(n.red,",").concat(n.green,",").concat(n.blue,",").concat(t?.5:.2,")")}}}],[{key:"render",value:function(t){t.frameState&&(this.sliderInitialized_||this.initSlider_())}},{key:"Direction_",get:function(){return{VERTICAL:0,HORIZONTAL:1}}}]),n}(il.default),Um=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{},o=document.createElement("div");r=e.call(this,{element:o,target:i.target,render:i.render});var s=document.createElement("button");s.setAttribute("type","button"),s.title=i.tipLabel;var a,l,c=document.createElement("span");c.innerHTML=i.character,s.appendChild(c);var u=Nm(r);return s.addEventListener("click",(function(t){t.stopPropagation()})),s.addEventListener("mouseup",(function(t){l||a&&(i.long_callback&&clearTimeout(a),a=null,i.callback.apply(u)),t.stopPropagation()}),!1),s.addEventListener("mousemove",(function(t){t.stopPropagation()}),!1),s.addEventListener("mousedown",(function(t){l||(a=!i.long_callback||setTimeout((function(){a=null,i.long_callback.apply(u)}),1500)),t.stopPropagation()}),!1),s.addEventListener("touchstart",(function(t){l=!0,a=!i.long_callback||setTimeout((function(){a=null,i.long_callback.apply(u)}),1500),t.stopPropagation()}),!1),s.addEventListener("touchend",(function(t){a&&(i.long_callback&&clearTimeout(a),a=null,i.callback.apply(u)),t.stopPropagation()}),!1),s.addEventListener("mouseout",(function(t){i.long_callback&&clearTimeout(a),a=null,t.stopPropagation()}),!1),s.addEventListener("dblclick",(function(t){t.preventDefault()}),!1),o.className="".concat(i.cls," ol-unselectable ol-control"),o.appendChild(s),r}return Lm(n)}(il.default),Zm=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.home?'<img src="'.concat(zm.home,'">'):'<i class="fa fa-home fa-lg"></i>',i.cls="home",i.callback=function(){this.getMap().getLayers().item(0).getSource().goHome()},r=e.call(this,i),zm.home)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),qm=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.gps?'<img src="'.concat(zm.gps,'">'):'<i class="fa fa-crosshairs fa-lg"></i>',i.cls="gps",i.render=function(t){if(t.frameState){var e=this.getMap();if(e.geolocation){var n=e.geolocation.getTracking(),r=this.element.classList.contains("disable");r&&!n?this.element.classList.remove("disable"):!r&&n&&this.element.classList.add("disable")}}},i.callback=function(){var t=this.element.classList.contains("disable");this.getMap().handleGPS(!t),t?this.element.classList.remove("disable"):this.element.classList.add("disable")},r=e.call(this,i),zm.gps)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),Wm=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};i.autoHide=!1;var o=document.createElement("span");(o.innerHTML=zm.compass?'<img src="'.concat(zm.compass,'">'):'<i class="fa fa-compass fa-lg ol-compass-fa"></i>',i.label=o,i.render=function(t){var e=t.frameState;if(e){var n=this.getMap().getView(),r=e.viewState.rotation,i=n.getCenter(),o=n.getDecimalZoom();if(r!=this.rotation_||i[0]!=this.center_[0]||i[1]!=this.center_[1]||o!=this.zoom_){var s=this.element.classList.contains("disable");s||0!==r?s&&0!==r&&this.element.classList.remove("disable"):this.element.classList.add("disable");var a=this,l=this.getMap().getLayers().item(0),c=l.getSource?l.getSource():l.getLayers().item(0).getSource();if(!c){var u="rotate(0rad)";return a.label_.style.msTransform=u,a.label_.style.webkitTransform=u,void(a.label_.style.transform=u)}c.viewpoint2MercsAsync().then((function(t){var e=c.mercs2MercViewpoint(t)[2],n="rotate(".concat(e,"rad)");a.label_.style.msTransform=n,a.label_.style.webkitTransform=n,a.label_.style.transform=n}))}this.rotation_=r,this.center_=i,this.zoom_=o}},r=e.call(this,i),zm.compass)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r.center_=[],r.zoom_=void 0,r}return Lm(n)}(cl),Ym=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.share?'<img src="'.concat(zm.share,'">'):'<i class="fa fa-share-alt-square fa-lg"></i>',i.cls="ol-share",i.callback=function(){var t=this.getMap();t.dispatchEvent(new is("click_control",t,{control:"share"}))},r=e.call(this,i),zm.share)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),Vm=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.border?'<img src="'.concat(zm.border,'">'):'<i class="fa fa-clone fa-lg"></i>',i.cls="ol-border",i.callback=function(){var t=this.getMap();t.dispatchEvent(new is("click_control",t,{control:"border"}))},r=e.call(this,i),zm.border)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),Km=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.help?'<img src="'.concat(zm.help,'">'):'<i class="fa fa-question-circle fa-lg"></i>',i.cls="ol-maplat",i.callback=function(){var t=this.getMap();t.dispatchEvent(new is("click_control",t,{control:"help"}))},r=e.call(this,i),zm.help)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),$m=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.attr?'<img src="'.concat(zm.attr,'">'):'<i class="fa fa-info-circle fa-lg"></i>',i.cls="ol-copyright",i.callback=function(){var t=this.getMap();t.dispatchEvent(new is("click_control",t,{control:"copyright"}))},r=e.call(this,i),zm.attr)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),Jm=function(t){Rm(n,t);var e=jm(n);function n(t){var r;Mm(this,n);var i=t||{};(i.character=zm.hide_marker?'<img src="'.concat(zm.hide_marker,'">'):'<i class="fa fa-map-marker fa-lg"></i>',i.cls="ol-hide-marker",i.callback=function(){var t=this.getMap();t.dispatchEvent(new is("click_control",t,{control:"hideMarker"}))},i.long_callback=function(){var t=this.getMap();t.dispatchEvent(new is("click_control",t,{control:"hideLayer"}))},r=e.call(this,i),zm.hide_marker)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Lm(n)}(Um),Qm=function(t){Rm(n,t);var e=jm(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Mm(this,n),zm.zoom_plus&&(r.zoomInLabel=hi('<img src="'.concat(zm.zoom_plus,'">'))[0]),zm.zoom_minus&&(r.zoomOutLabel=hi('<img src="'.concat(zm.zoom_minus,'">'))[0]),t=e.call(this,r),zm.compass){var i=t.element.querySelectorAll("button");i.forEach((function(t){t.style.backgroundColor="rgba(0,0,0,0)"}))}return t}return Lm(n)}(hl);function ty(t){return function(t){if(Array.isArray(t))return ey(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ey(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ey(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ey(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ny(){ny=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new C(i||[]);return r(s,"_invoke",{value:w(t,n,a)}),s}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function p(){}function f(){}function d(){}var g={};l(g,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(T([])));m&&m!==e&&n.call(m,o)&&(g=m);var y=d.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,s,a){var l=u(t[r],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==ry(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return i("throw",t,s,a)}))}a(l.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:f,configurable:!0}),f.displayName=l(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new b(c(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(y),l(y,a,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function ry(t){return ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(t)}function iy(t,e,n,r,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,i)}function oy(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){iy(o,r,i,s,a,"next",t)}function a(t){iy(o,r,i,s,a,"throw",t)}s(void 0)}))}}function sy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ay(t,e){return ay=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ay(t,e)}function ly(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=hy(t);if(e){var i=hy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cy(this,n)}}function cy(t,e){if(e&&("object"===ry(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return uy(t)}function uy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hy(t){return hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hy(t)}var py=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ay(t,e)}(l,e);var n,r,i,o,s,a=ly(l);function l(t){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),e=a.call(this),r={state_url:"stateUrl",restore_session:"restoreSession",enable_share:"enableShare",mobile_if:"mobileIF",pwa_manifest:"pwaManifest",pwa_worker:"pwaWorker",pwa_scope:"pwaScope"},n=di(n=t),(t=Object.keys(r).reduce((function(t,e){return t[e]&&(t[r[e]]=t[e],delete t[e]),t}),n)).control&&function(t){zm=t,Object.keys(zm).forEach((function(t){Gm[t]&&(Om[Gm[t]]=zm[t])}))}(t.control);var i=uy(e);return i.html_id_seed="".concat(Math.floor(9e3*Math.random())+1e3),t.stateUrl?((0,at.Z)((function(e,n){var r=e.canonicalPath.split("#!"),o=r.length>1?r[1]:r[0];if(r=o.split("?"),(o=r[0])!==i.pathThatSet){var s={transparency:0,position:{rotation:0}};o.split("/").map((function(t){var e=t.split(":");switch(e[0]){case"s":s.mapID=e[1];break;case"b":s.backgroundID=e[1];break;case"t":s.transparency=parseFloat(e[1]);break;case"r":s.position.rotation=parseFloat(e[1]);break;case"z":s.position.zoom=parseFloat(e[1]);break;case"x":case"y":s.position[e[0]]=parseFloat(e[1]);break;case"sb":s.showBorder=!!parseInt(e[1]);break;case"hm":s.hideMarker=!!parseInt(e[1]);break;case"hl":s.hideLayer=e[1];break;case"c":if(i.core){var n=i.core.mapDivDocument.querySelector(".modalBase");new lt.Z.Modal(n,{root:i.core.mapDivDocument}).hide()}}})),i.core?s.mapID&&i.core.waitReady.then((function(){i.core.changeMap(s.mapID,s)})):(s.mapID&&(t.restore=s),i.initializer(t))}else delete i.pathThatSet})),(0,at.Z)({hashbang:!0}),(0,at.Z)(),i.waitReady=new Promise((function(t,e){i.waitReadyBridge=t}))):i.initializer(t),e}return n=l,r=[{key:"initializer",value:(s=oy(ny().mark((function e(n){var r,i,o,s,a,l,c,u,h,p,f,d,g,v,m,y,_,b,w;return ny().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:w=function(t){r.contextMenu.clear();var e=[];t.forEach((function(t){r.contextMenu.push(t),t.mouseOnTask&&e.push([t.mouseOnTask,t.mouseOutTask])}));var n=r.core.lastClickEvent.coordinate,i=r.core.lastClickEvent.pixel;r.contextMenu.disabled||(r.contextMenu.on("open",(function t(){if(r.contextMenu.removeEventListener("open",t),e.length>0){var n=ty(r.core.mapDivDocument.querySelectorAll(".ol-ctx-menu-container ul li")).map((function(t,n){var r=e[n];return t.addEventListener("mouseover",r[0]),t.addEventListener("mouseout",r[1]),[t,r[0],r[1]]}));r.contextMenu.on("close",(function t(){r.contextMenu.removeEventListener("close",t),n.forEach((function(t){t[0].removeEventListener("mouseover",t[1]),t[0].removeEventListener("mouseout",t[2])}))}))}})),r.contextMenu.Internal.openMenu(i,n),r.core.mapObject.getViewport().addEventListener("pointerdown",{handleEvent:function(t){r.contextMenu.Internal.opened&&(r.contextMenu.Internal.closeMenu(),t.stopPropagation(),r.core.mapObject.getViewport().removeEventListener(t.type,this,!1))}},!1))},r=this,n.translateUI=!0,r.core=new fm(n),n.icon&&(Om["defaultpin.png"]=n.icon),n.restore?(r.setShowBorder(n.restore.showBorder||!1),n.restore.hideMarker&&r.core.mapDivDocument.classList.add("hide-marker")):n.restoreSession?(i=parseInt(localStorage.getItem("epoch")||0),o=Math.floor((new Date).getTime()/1e3),i&&o-i<3600&&r.setShowBorder(!!parseInt(localStorage.getItem("showBorder")||"0")),r.core.initialRestore.hideMarker&&r.core.mapDivDocument.classList.add("hide-marker")):r.setShowBorder(!1),s=!r.core.initialRestore.mapID,a=r.core.initialRestore.transparency,l=!n.presentation_mode,n.enableShare&&(r.core.mapDivDocument.classList.add("enable_share"),r.enableShare=!0),n.enableHideMarker&&(r.core.mapDivDocument.classList.add("enable_hide_marker"),r.enableHideMarker=!0),n.enableBorder&&(r.core.mapDivDocument.classList.add("enable_border"),r.enableBorder=!0),n.disableNoimage&&(r.disableNoimage=!0),n.stateUrl&&r.core.mapDivDocument.classList.add("state_url"),r.core.enableCache&&r.core.mapDivDocument.classList.add("enable_cache"),"ontouchstart"in window&&(r.core.mapDivDocument.classList.add("ol-touch"),r.isTouch=!0),n.mobileIF&&(n.debug=!0),n.appEnvelope&&(r.appEnvelope=!0),c=n.pwaManifest,u=n.pwaWorker,h=n.pwaScope,p=hi('<d c="ol-control map-title"><s></s></d> <d c="swiper-container ol-control base-swiper prevent-default-ui"> <d c="swiper-wrapper"></d> <d c="swiper-button-next base-next swiper-button-white"></d> <d c="swiper-button-prev base-prev swiper-button-white"></d> </d> <d c="swiper-container ol-control overlay-swiper prevent-default-ui"> <d c="swiper-wrapper"></d> <d c="swiper-button-next overlay-next swiper-button-white"></d> <d c="swiper-button-prev overlay-prev swiper-button-white"></d> </d> ');for(f=p.length-1;f>=0;f--)r.core.mapDivDocument.insertBefore(p[f],r.core.mapDivDocument.firstChild);for(d=r.core.mapDivDocument.querySelectorAll(".prevent-default-ui"),g=0;g<d.length;g++)d[g].addEventListener("touchstart",(function(t){t.preventDefault()}));for(p=hi('<d c="modal modalBase" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel" aria-hidden="true" data-show="true" data-keyboard="false" data-backdrop="static"> <d c="modal-dialog"> <d c="modal-content"> <d c="modal-header"> <button type="button" c="close" data-dismiss="modal"> <s aria-hidden="true">&#215;</s><s c="sr-only" din="html.close"></s> </button> <h4 c="modal-title"> <s c="modal_title"></s> <s c="modal_load_title"></s> <s c="modal_gpsW_title" din="html.acquiring_gps"></s> <s c="modal_help_title" din="html.help_title"></s> <s c="modal_share_title" din="html.share_title"></s> <s c="modal_hide_marker_title" din="html.hide_marker_title"></s> </h4> </d> <d c="modal-body"> <d c="modal_help_content"> <d c="help_content"> <s dinh="html.help_using_maplat"></s> <p c="col-xs-12 help_img"><img src="'.concat(Om["fullscreen.png"],'"></p> <h4 din="html.help_operation_title"></h4> <p dinh="html.help_operation_content" c="recipient"></p> <h4 din="html.help_selection_title"></h4> <p dinh="html.help_selection_content" c="recipient"></p> <h4 din="html.help_gps_title"></h4> <p dinh="html.help_gps_content" c="recipient"></p> <h4 din="html.help_poi_title"></h4> <p dinh="html.help_poi_content" c="recipient"></p> <h4 din="html.help_etc_title"></h4> <ul> <li dinh="html.help_etc_attr" c="recipient"></li> <li dinh="html.help_etc_help" c="recipient"></li> <s c="share_help"><li dinh="html.help_share_help" c="recipient"></li></s> <s c="border_help"><li dinh="html.help_etc_border" c="recipient"></li></s> <s c="hide_marker_help"><li dinh="html.help_etc_hide_marker" c="recipient"></li></s> <li dinh="html.help_etc_slider" c="recipient"></li> </ul> <p><a href="https://github.com/code4history/Maplat/wiki" target="_blank">Maplat</a> © 2015- Kohei Otsuka, Code for History</p> </d> </d> <d c="modal_poi_content"> <d c="poi_web embed-responsive embed-responsive-60vh"> <iframe c="poi_iframe iframe_poi" frameborder="0" src=""></iframe> </d> <d c="poi_data hide"> <d c="col-xs-12 swiper-container poi_img_swiper"> <d c="swiper-wrapper"></d> <d c="swiper-button-next poi-img-next"></d> <d c="swiper-button-prev poi-img-prev"></d> </d> <p c="recipient poi_address"></p> <p c="recipient poi_desc"></p> </d> </d> <d c="modal_share_content"> <h4 din="html.share_app_title"></h4> <d id="___maplat_app_toast_').concat(r.html_id_seed,'"></d> <d c="recipient row"> <d c="form-group col-xs-4 text-center"><button title="Copy to clipboard" c="share btn btn-light" data="cp_app"><i c="fa fa-clipboard"></i>&nbsp;<small din="html.share_copy"></small></button></d> <d c="form-group col-xs-4 text-center"><button title="Twitter" c="share btn btn-light" data="tw_app"><i c="fa fa-twitter"></i>&nbsp;<small>Twitter</small></button></d> <d c="form-group col-xs-4 text-center"><button title="Facebook" c="share btn btn-light" data="fb_app"><i c="fa fa-facebook"></i>&nbsp;<small>Facebook</small></button></d> </d> <d c="qr_app center-block" style="width:128px;"></d> <d c="modal_share_state"> <h4 din="html.share_state_title"></h4> <d id="___maplat_view_toast_').concat(r.html_id_seed,'"></d> <d c="recipient row"> <d c="form-group col-xs-4 text-center"><button title="Copy to clipboard" c="share btn btn-light" data="cp_view"><i c="fa fa-clipboard"></i>&nbsp;<small din="html.share_copy"></small></button></d> <d c="form-group col-xs-4 text-center"><button title="Twitter" c="share btn btn-light" data="tw_view"><i c="fa fa-twitter"></i>&nbsp;<small>Twitter</small></button></d> <d c="form-group col-xs-4 text-center"><button title="Facebook" c="share btn btn-light" data="fb_view"><i c="fa fa-facebook"></i>&nbsp;<small>Facebook</small></button></d> </d> <d c="qr_view center-block" style="width:128px;"></d> </d> <p><img src="" height="0px" width="0px"></p> </d> <d c="modal_map_content"> ').concat(ai.map((function(t){return"title"==t||"officialTitle"==t?"":'<d c="recipients '.concat(t,'_div"><dl c="dl-horizontal"> <dt din="html.').concat(t,'"></dt> <dd c="').concat(t,'_dd"></dd> </dl></d> ')})).join(""),' <d c="recipients modal_cache_content"><dl c="dl-horizontal"> <dt din="html.cache_handle"></dt> <dd><s c="cache_size"></s></dd> <dt></dt> <dd><s c="pull-right"><button c="cache_fetch btn btn-default" href="#" din="html.cache_fetch"></button> <button c="cache_delete btn btn-default" href="#" din="html.cache_delete"></button></s></dd> </dl></d> </d> <d c="modal_load_content"> <p c="recipient"><img src="').concat(Om["loading.png"],'"><s din="html.app_loading_body"></s></p> <d c="splash_div hide row"><p c="col-xs-12 poi_img"><img c="splash_img" src=""></p></d> <p><img src="" height="0px" width="0px"></p> </d> <d c="modal_hide_marker_content"> <ul c="list-group"></ul> </d> <p c="modal_gpsD_content" c="recipient"></p> <p c="modal_gpsW_content" c="recipient"></p> </d> </d> </d> </d> ')),v=p.length-1;v>=0;v--)r.core.mapDivDocument.insertBefore(p[v],r.core.mapDivDocument.firstChild);for(m=r.core.mapDivDocument.querySelectorAll(".btn.share"),y=0;y<m.length;y++)m[y].addEventListener("click",(function(t){var e=t.target;e.classList.contains("share")||(e=e.parentElement);var n=e.getAttribute("data").split("_"),i=t.target.baseURI;i||(i=window.location.href);var o=i.split("#!"),s=o.length>1?o[1].split("?")[0]:"",a=o[0].split("?"),l=a[0],c=a.length>1?a[1].split("&").filter((function(t){return"pwa"!==t})).join("&"):"";if(c&&(l="".concat(l,"?").concat(c)),"view"===n[1]&&s&&(l="".concat(l,"#!").concat(s)),"cp"===n[0]){var u=document.createElement("textarea");u.textContent=l;var h=document.querySelector("body");if(h.appendChild(u),/iP(hone|[oa]d)/.test(navigator.userAgent)){var p=document.createRange();p.selectNode(u),window.getSelection().addRange(p)}else u.select();document.execCommand("copy"),h.removeChild(u);var f="#___maplat_".concat(n[1],"_toast_").concat(r.html_id_seed);Sm.Z.show({message:r.core.t("app.copy_toast",{ns:"translation"}),close:!1,pauseOnHover:!1,timeout:1e3,progressBar:!1,target:f})}else if("tw"===n[0]){var d="https://twitter.com/share?url=".concat(encodeURIComponent(l),"&hashtags=Maplat");window.open(d,"_blank","width=650,height=450,menubar=no,toolbar=no,scrollbars=yes")}else if("fb"===n[0]){var g="https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(l),"&display=popup&ref=plugin&src=like&kid_directed_site=0");window.open(g,"_blank","width=650,height=450,menubar=no,toolbar=no,scrollbars=yes")}}));if(c){!0===c&&(c="./pwa/".concat(r.core.appid,"_manifest.json")),u||(u="./service-worker.js"),h||(h="./"),(_=document.querySelector("head")).querySelector('link[rel="manifest"]')||_.appendChild(hi('<link rel="manifest" href="'.concat(c,'">'))[0]);try{sd.registerSW(u,{scope:h})}catch(t){}_.querySelector('link[rel="apple-touch-icon"]')||((b=new XMLHttpRequest).open("GET",c,!0),b.responseType="json",b.onload=function(e){var n=this.response;if(n&&("object"!=ry(n)&&(n=JSON.parse(n)),n.icons))for(var r=0;r<n.icons.length;r++){var i=t(c,n.icons[r].src),o=n.icons[r].sizes,s='<link rel="apple-touch-icon" sizes="'.concat(o,'" href="').concat(i,'">');_.appendChild(hi(s)[0])}},b.send())}r.core.addEventListener("uiPrepare",(function(t){for(var e=function(t){for(var e,n=/\$\{([a-zA-Z0-9_\.\/\-]+)\}/g,r=t;null!=(e=n.exec(t));)r=r.replace(e[0],Om[e[1]]);return r},n=r.core.mapDivDocument.querySelectorAll("[data-i18n]"),i=0;i<n.length;i++){var o=n[i],l=o.getAttribute("data-i18n");o.innerText=e(r.core.t(l))}n=r.core.mapDivDocument.querySelectorAll("[data-i18n-html]");for(var c=0;c<n.length;c++){var u=n[c],h=u.getAttribute("data-i18n-html");u.innerHTML=e(r.core.t(h))}var p={reverse:!0,tipLabel:r.core.t("control.trans",{ns:"translation"})};if(a&&(p.initialValue=a/100),r.sliderCommon=new Hm(p),r.core.appData.controls=[new $m({tipLabel:r.core.t("control.info",{ns:"translation"})}),new Wm({tipLabel:r.core.t("control.compass",{ns:"translation"})}),new Qm({tipLabel:r.core.t("control.zoom",{ns:"translation"})}),new qm({tipLabel:r.core.t("control.gps",{ns:"translation"})}),new Zm({tipLabel:r.core.t("control.home",{ns:"translation"})}),r.sliderCommon,new Km({tipLabel:r.core.t("control.help",{ns:"translation"})})],r.enableShare&&r.core.appData.controls.push(new Ym({tipLabel:r.core.t("control.share",{ns:"translation"})})),r.enableBorder&&r.core.appData.controls.push(new Vm({tipLabel:r.core.t("control.border",{ns:"translation"})})),r.enableHideMarker&&r.core.appData.controls.push(new Jm({tipLabel:r.core.t("control.hide_marker",{ns:"translation"})})),r.contextMenu=new xm({eventType:"__dummy__",width:170,defaultItems:!1,items:[]}),r.core.appData.controls.push(r.contextMenu),r.core.mapObject&&r.core.appData.controls.map((function(t){r.core.mapObject.addControl(t)})),r.sliderCommon.on("propertychange",(function(t){"slidervalue"===t.key&&r.core.setTransparency(100*r.sliderCommon.get(t.key))})),s){var f=!1;r.core.appData.splash&&(f=!0);var d=r.core.mapDivDocument.querySelector(".modalBase"),g=new lt.Z.Modal(d,{root:r.core.mapDivDocument});r.core.mapDivDocument.querySelector(".modal_load_title").innerText=r.core.translate(r.core.appData.appName),f&&(r.core.mapDivDocument.querySelector(".splash_img").setAttribute("src","img/".concat(r.core.appData.splash)),r.core.mapDivDocument.querySelector(".splash_div").classList.remove("hide")),r.modalSetting("load"),g.show();var v=f?1e3:200;r.splashPromise=new Promise((function(t){setTimeout((function(){t()}),v)}))}document.querySelector("title").innerHTML=r.core.translate(r.core.appName)})),r.core.addEventListener("sourceLoaded",(function(t){for(var e=t.detail,n=["maroon","deeppink","indigo","olive","royalblue","red","hotpink","green","yellow","navy","saddlebrown","fuchsia","darkslategray","yellowgreen","blue","mediumvioletred","purple","lime","darkorange","teal","crimson","darkviolet","darkolivegreen","steelblue","aqua"],i=[],o=0,s=0;s<e.length;s++){var a=e[s];if(a.envelope){r.appEnvelope&&a.envelope.geometry.coordinates[0].map((function(t){0===i.length?(i[0]=i[2]=t[0],i[1]=i[3]=t[1]):(t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1]))})),a.envelopeColor=n[o],(o+=1)===n.length&&(o=0);var l=a.envelope.geometry.coordinates[0];a.envelopeAreaIndex=r.areaIndex(l)}}r.appEnvelope&&console.log("This app's envelope is: ".concat(i)),r.splashPromise&&r.splashPromise.then((function(){var t=r.core.mapDivDocument.querySelector(".modalBase"),e=new lt.Z.Modal(t,{root:r.core.mapDivDocument});r.modalSetting("load"),e.hide()}));for(var c=[],u=[],h=0;h<e.length;h++){var p=e[h];p instanceof Nf&&!(p instanceof ed)?c.push(p):u.push(p)}var f=r.baseSwiper=new ot(".base-swiper",{slidesPerView:2,spaceBetween:15,breakpoints:{480:{slidesPerView:1.4,spaceBetween:10}},centeredSlides:!0,threshold:2,loop:c.length>=2,navigation:{nextEl:".base-next",prevEl:".base-prev"}});f.on("click",(function(t){if(f.clickedSlide){var e=f.clickedSlide;r.core.changeMap(e.getAttribute("data")),delete r._selectCandidateSources,f.setSlideIndexAsSelected(e.getAttribute("data-swiper-slide-index"))}})),c.length<2&&r.core.mapDivDocument.querySelector(".base-swiper").classList.add("single-map");var d=r.overlaySwiper=new ot(".overlay-swiper",{slidesPerView:2,spaceBetween:15,breakpoints:{480:{slidesPerView:1.4,spaceBetween:10}},centeredSlides:!0,threshold:2,loop:u.length>=2,navigation:{nextEl:".overlay-next",prevEl:".overlay-prev"}});d.on("click",(function(t){if(d.clickedSlide){var e=d.clickedSlide;r.core.changeMap(e.getAttribute("data")),delete r._selectCandidateSources,d.setSlideIndexAsSelected(e.getAttribute("data-swiper-slide-index"))}})),u.length<2&&r.core.mapDivDocument.querySelector(".overlay-swiper").classList.add("single-map");for(var g=0;g<c.length;g++){var v=c[g];f.appendSlide('<div class="swiper-slide" data="'.concat(v.mapID,'">')+'<img crossorigin="anonymous" src="'.concat(v.thumbnail,'"><div> ').concat(r.core.translate(v.label),"</div> </div> "))}for(var m=0;m<u.length;m++){var y=u[m],_=y.envelope?" ".concat(y.envelopeColor):"";d.appendSlide('<div class="swiper-slide'.concat(_,'" data="').concat(y.mapID,'">')+'<img crossorigin="anonymous" src="'.concat(y.thumbnail,'"><div> ').concat(r.core.translate(y.label),"</div> </div> "))}f.on,d.on,f.slideToLoop(0),d.slideToLoop(0),r.ellips()})),r.core.addEventListener("mapChanged",(function(t){var e=t.detail;r.baseSwiper.setSlideMapID(e.mapID),r.overlaySwiper.setSlideMapID(e.mapID);var n=e.officialTitle||e.title||e.label;r.core.mapDivDocument.querySelector(".map-title span").innerText=r.core.translate(n),r.checkOverlayID(e.mapID)?r.sliderCommon.setEnable(!0):r.sliderCommon.setEnable(!1);var i=100*r.sliderCommon.get("slidervalue");r.core.mapObject.setTransparency(i),r.updateEnvelope()})),r.core.addEventListener("poi_number",(function(t){t.detail?r.core.mapDivDocument.classList.remove("no_poi"):r.core.mapDivDocument.classList.add("no_poi")})),r.core.addEventListener("outOfMap",(function(t){if(l){r.core.mapDivDocument.querySelector(".modal_title").innerText=r.core.t("app.out_of_map"),r.core.mapDivDocument.querySelector(".modal_gpsD_content").innerText=r.core.t("app.out_of_map_area");var e=r.core.mapDivDocument.querySelector(".modalBase"),n=new lt.Z.Modal(e,{root:r.core.mapDivDocument});r.modalSetting("gpsD"),n.show()}})),r.core.mapDivDocument.addEventListener("mouseout",(function(t){r._selectCandidateSources&&(Object.keys(r._selectCandidateSources).forEach((function(t){return r.core.mapObject.removeEnvelope(r._selectCandidateSources[t])})),delete r._selectCandidateSources)})),r.core.addEventListener("pointerMoveOnMapXy",function(){var t=oy(ny().mark((function t(e){var n;return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.core.stateBuffer.showBorder){t.next=3;break}return r._selectCandidateSources&&(Object.keys(r._selectCandidateSources).forEach((function(t){return r.core.mapObject.removeEnvelope(r._selectCandidateSources[t])})),delete r._selectCandidateSources),t.abrupt("return");case 3:return t.next=5,r.xyToMapIDs(e.detail);case 5:n=t.sent,r.showFillEnvelope(n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),r.core.addEventListener("clickMapXy",function(){var t=oy(ny().mark((function t(e){var n,i;return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.core.stateBuffer.showBorder){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,r.xyToMapIDs(e.detail);case 4:(n=t.sent).length>0&&(w(n.map((function(t){var e=r.core.cacheHash[t],o=e.envelopeColor,s='<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"> <polygon x="0" y="0" points="2,2 2,8 8,8 8,2 2,2" stroke="'.concat(o,'" fill="').concat(o,'" stroke-width="2" style="fill-opacity: .25;"></polygon></svg>');return{icon:s="data:image/svg+xml,".concat(encodeURIComponent(s)),text:r.core.translate(e.title),callback:function(){var e=ty(r.core.mapDivDocument.querySelectorAll(".ol-ctx-menu-container ul li"));if(e.forEach((function(t){return t.classList.remove("selected")})),!i||i!==t){i=t,r.showFillEnvelope([t]),r.overlaySwiper.slideToMapID(t);var o=n.indexOf(t);return o>-1&&e[o].classList.add("selected"),!0}delete r._selectCandidateSources,r.core.changeMap(t)},mouseOnTask:function(e){r.isTouch||(i=t,r.showFillEnvelope([t]),r.overlaySwiper.slideToMapID(t))},mouseOutTask:function(t){r.isTouch||(i=void 0,r.showFillEnvelope([]))}}}))),r.showFillEnvelope(n));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),r.core.addEventListener("clickMarkers",(function(t){var e=t.detail;1===e.length?r.handleMarkerAction(e[0]):w(e.map((function(t){return{icon:t.icon||Om["defaultpin.png"],text:r.core.translate(t.name),callback:function(){r.handleMarkerAction(t)}}})))})),n.stateUrl&&r.core.addEventListener("updateState",(function(t){var e=t.detail;if(e.position&&e.mapID){var n="s:".concat(e.mapID);e.backgroundID&&(n="".concat(n,"/b:").concat(e.backgroundID)),e.transparency&&(n="".concat(n,"/t:").concat(e.transparency)),n="".concat(n,"/x:").concat(e.position.x,"/y:").concat(e.position.y),n="".concat(n,"/z:").concat(e.position.zoom),e.position.rotation&&(n="".concat(n,"/r:").concat(e.position.rotation)),e.showBorder&&(n="".concat(n,"/sb:").concat(e.showBorder)),e.hideMarker&&(n="".concat(n,"/hm:").concat(e.hideMarker)),e.hideLayer&&(n="".concat(n,"/hl:").concat(e.hideLayer)),r.pathThatSet=n,(0,at.Z)(n)}})),r.waitReady=r.core.waitReady.then((function(){var t,e,i=!!n.fake&&r.core.appData.fake_gps,o=!!n.fake&&r.core.appData.fake_center,s=!!n.fake&&r.core.appData.fake_radius,a=!1,l=null;function c(t){if(t&&t.error){if(r.core.currentPosition=null,"gps_out"===t.error&&a){a=!1;var e=r.core.mapDivDocument.querySelector(".modalBase"),n=new lt.Z.Modal(e,{root:r.core.mapDivDocument});r.core.mapDivDocument.querySelector(".modal_title").innerText=r.core.t("app.out_of_map"),r.core.mapDivDocument.querySelector(".modal_gpsD_content").innerText=r.core.t("app.out_of_map_desc"),r.modalSetting("gpsD"),n.show()}}else r.core.currentPosition=t;if(a){a=!1;var i=r.core.mapDivDocument.querySelector(".modalBase");new lt.Z.Modal(i,{root:r.core.mapDivDocument}).hide()}}if(r.core.mapObject.on("gps_request",(function(){l="gps_request";var t=[new Promise((function(t){"gps_request"!==l?t(l):l=t}))];a=!0;var e=r.core.mapDivDocument.querySelector(".modalBase"),n=new lt.Z.Modal(e,{root:r.core.mapDivDocument});r.modalSetting("gpsW"),n.show(),t.push(new Promise((function(t){setTimeout(t,200)}))),Promise.all(t).then((function(t){c(t[0])}))})),r.core.mapObject.on("gps_result",(function(t){"gps_request"===l?l=t.frameState:l?(l(t.frameState),l=null):a||c(t.frameState)})),r.core.mapObject.on("click_control",function(){var n=oy(ny().mark((function n(i){var o,s,a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E,C,T,O,k;return ny().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=i.frameState.control,s=r.core.mapDivDocument.querySelector(".modalBase"),a=new lt.Z.Modal(s,{root:r.core.mapDivDocument}),"copyright"!==o){n.next=34;break}if(l=r.core.getMapMeta(),ai.reduce((function(t,e){return"title"===e?t:l[e]||t}),!1)){n.next=7;break}return n.abrupt("return");case 7:if(r.core.mapDivDocument.querySelector(".modal_title").innerText=r.core.translate(l.officialTitle||l.title),ai.map((function(t){"title"!==t&&"officialTitle"!==t&&(l[t]&&""!==l[t]?(r.core.mapDivDocument.querySelector(".".concat(t,"_div")).classList.remove("hide"),r.core.mapDivDocument.querySelector(".".concat(t,"_dd")).innerHTML="license"===t||"dataLicense"===t?'<img src="'.concat(Om["".concat(l[t].toLowerCase().replace(/ /g,"_"),".png")],'">'):r.core.translate(l[t])):r.core.mapDivDocument.querySelector(".".concat(t,"_div")).classList.add("hide"))})),c=r.core.mapDivDocument.querySelector(".cache_delete"),u=r.core.mapDivDocument.querySelector(".cache_fetch"),h=function(t){var e=t.size||0,n="Bytes";-1!==e&&(e>1024&&(e=Math.round(10*e/1024)/10,n="KBytes"),e>1024&&(e=Math.round(10*e/1024)/10,n="MBytes"),e>1024&&(e=Math.round(10*e/1024)/10,n="GBytes"));var i=-1===e?r.core.t("html.cache_processing"):"".concat(e," ").concat(n);i=t.total?"".concat(i," (").concat(t.count," / ").concat(t.total," tiles [").concat(t.percent,"%])"):"".concat(i," (").concat(t.count," tiles)"),r.core.mapDivDocument.querySelector(".cache_size").innerHTML=i,0!=t.count?c.removeAttribute("disabled"):c.setAttribute("disabled",!0),t.total?(u.classList.remove("hide"),t.total===t.count?u.setAttribute("disabled",!0):u.removeAttribute("disabled")):u.classList.add("hide")},r.modalSetting("map"),p=r.core.mapDivDocument.querySelector(".modal_cache_content"),!r.core.getMapCacheEnable(l.mapID)){n.next=30;break}return p.classList.remove("hide"),f=function(){var t=oy(ny().mark((function t(e){var n;return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.preventDefault(),n=r.core.getMapMeta(),t.next=4,r.core.clearMapTileCacheAsync(n.mapID);case 4:return t.t0=h,t.next=7,r.core.getMapTileCacheStatsAsync(n.mapID);case 7:t.t1=t.sent,(0,t.t0)(t.t1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var t=oy(ny().mark((function t(e){var n;return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&e.preventDefault(),n=r.core.getMapMeta(),t.next=4,r.core.cancelMapTileCacheAsync(n.mapID);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=oy(ny().mark((function t(e){var n,i;return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.core.mapDivDocument.querySelector(".close"),e.preventDefault(),u.innerHTML=r.core.t("html.cache_cancel"),u.removeEventListener("click",g),u.addEventListener("click",d),n.classList.add("temp_no_close"),i=r.core.getMapMeta(),t.next=9,r.core.fetchAllMapTileCacheAsync(i.mapID,function(){var t=oy(ny().mark((function t(e,o){return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="proceed"===t.t0?3:"canceled"===t.t0||"stop"===t.t0||"finish"===t.t0?5:14;break;case 3:return h({count:o.processed,total:o.total,percent:o.percent,size:-1}),t.abrupt("return");case 5:return u.innerHTML=r.core.t("html.cache_fetch"),u.removeEventListener("click",d),u.addEventListener("click",g),n.classList.remove("temp_no_close"),t.t1=h,t.next=12,r.core.getMapTileCacheStatsAsync(i.mapID);case 12:t.t2=t.sent,(0,t.t1)(t.t2);case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}());case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),v=function t(e){c.removeEventListener("click",f,!1),u.removeEventListener("click",g,!1),u.removeEventListener("click",d,!1),s.removeEventListener("hide.bs.modal",t,!1)},s.addEventListener("hide.bs.modal",v,!1),n.t0=h,n.next=25,r.core.getMapTileCacheStatsAsync(l.mapID);case 25:n.t1=n.sent,(0,n.t0)(n.t1),setTimeout((function(){c.addEventListener("click",f,!1),u.addEventListener("click",g,!1),u.innerHTML=r.core.t("html.cache_fetch")}),200),n.next=31;break;case 30:p.classList.add("hide");case 31:a.show(),n.next=35;break;case 34:"help"===o?(r.modalSetting("help"),a.show()):"share"===o?(r.modalSetting("share"),m=location.href,y=m.split("#!"),_=y.length>1?y[1].split("?")[0]:"",b=y[0].split("?"),w=b[0],(x=b.length>1?b[1].split("&").filter((function(t){return"pwa"!==t})).join("&"):"")&&(w="".concat(w,"?").concat(x)),S=w,_&&(S="".concat(S,"#!").concat(_)),t?t.makeCode(w):t=new Em(r.core.mapDivDocument.querySelector(".qr_app"),{text:w,width:128,height:128,colorDark:"#000000",colorLight:"#ffffff",correctLevel:Em.CorrectLevel.H}),e?e.makeCode(S):e=new Em(r.core.mapDivDocument.querySelector(".qr_view"),{text:S,width:128,height:128,colorDark:"#000000",colorLight:"#ffffff",correctLevel:Em.CorrectLevel.H}),a.show()):"border"===o?(E=!r.core.stateBuffer.showBorder,r.setShowBorder(E)):"hideMarker"===o?(C=!r.core.stateBuffer.hideMarker,r.setHideMarker(C)):"hideLayer"===o&&(r.modalSetting("hide_marker"),T=r.core.listPoiLayers(!1,!0),O=r.core.mapDivDocument.querySelector("ul.list-group"),k=r.core.mapDivDocument.querySelector(".modalBase"),O.innerHTML="",T.map((function(t,e){for(var n=t.icon||Om["defaultpin.png"],i=r.core.translate(t.name),o=!t.hide,s=t.namespaceID,a=hi('<li c="list-group-item"> <d c="row"> <d c="col-sm-1"><img c="markerlist" src="'.concat(n,'"></d> <d c="col-sm-9">').concat(i,'</d> <d c="col-sm-2"> <input type="checkbox" c="markerlist" data="').concat(s,'" id="___maplat_marker_').concat(e,"_").concat(r.html_id_seed,'"').concat(o?" checked":"",'/> <label c="check" for="___maplat_marker_').concat(e,"_").concat(r.html_id_seed,'"><d> </d> </label> </d> </d> </li>')),l=0;l<a.length;l++)O.appendChild(a[l]);var c=r.core.mapDivDocument.querySelector("#___maplat_marker_".concat(e,"_").concat(r.html_id_seed)),u=function(t){var e=t.target.getAttribute("data");t.target.checked?r.core.showPoiLayer(e):r.core.hidePoiLayer(e)};k.addEventListener("hide.bs.modal",(function t(e){k.removeEventListener("hide.bs.modal",t,!1),c.removeEventListener("change",u,!1)}),!1),c.addEventListener("change",u,!1)})),a.show());case 35:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()),i){var u=hi((0,Tm.Z)(r.core.t("app.fake_explanation"),r.core.translate(o),s))[0];r.core.mapDivDocument.querySelector(".modal_gpsW_content").appendChild(u)}else{var h=hi(r.core.t("app.acquiring_gps_desc"))[0];r.core.mapDivDocument.querySelector(".modal_gpsW_content").appendChild(h)}r.waitReadyBridge&&(r.waitReadyBridge(),delete r.waitReadyBridge)}));case 41:case"end":return e.stop()}}),e,this)}))),function(t){return s.apply(this,arguments)})},{key:"modalSetting",value:function(t){var e=this.core.mapDivDocument.querySelector(".modalBase");["poi","map","load","gpsW","gpsD","help","share","hide_marker"].map((function(n){var r="modal_".concat(n);t===n?e.classList.add(r):e.classList.remove(r)}))}},{key:"handleMarkerAction",value:function(t){var e=this;if(t.directgo){var n=!1,r="";return"string"==typeof t.directgo?r=t.directgo:(r=t.directgo.href,n=t.directgo.blank||!1),void(n?window.open(r,"_blank"):window.location.href=r)}this.core.mapDivDocument.querySelector(".modal_title").innerText=this.core.translate(t.name);var i=this.core.mapDivDocument.querySelector(".modalBase");if(t.url||t.html){this.core.mapDivDocument.querySelector(".poi_web").classList.remove("hide"),this.core.mapDivDocument.querySelector(".poi_data").classList.add("hide");var o=this.core.mapDivDocument.querySelector(".poi_iframe");t.html?(o.addEventListener("load",(function t(e){e.currentTarget.removeEventListener(e.type,t);var n=hi('<style type="text/css">html, body { height: 100vh; } img { width: 100vw; }</style>');console.log(n),o.contentDocument.head.appendChild(n[0])})),o.removeAttribute("src"),o.setAttribute("srcdoc",this.core.translate(t.html))):(o.removeAttribute("srcdoc"),o.setAttribute("src",this.core.translate(t.url)))}else{this.core.mapDivDocument.querySelector(".poi_data").classList.remove("hide"),this.core.mapDivDocument.querySelector(".poi_web").classList.add("hide");var s=[];t.image&&""!==t.image?(Array.isArray(t.image)?t.image:[t.image]).forEach((function(t){"string"==typeof t&&(t={src:t});var n=e.resolveRelativeLink(t.src,"img"),r='<a target="_blank" href="'.concat(n,'"><img src="').concat(n,'"></a>');t.desc&&(r="".concat(r,"<div>").concat(t.desc,"</div>")),s.push('<div class="swiper-slide">'.concat(r,"</div>"))})):this.disableNoimage||s.push('<div class="swiper-slide"><img src="'.concat(Om["no_image.png"],'"></div>')),i.addEventListener("shown.bs.modal",(function t(n){i.removeEventListener("shown.bs.modal",t,!1);var r=e.core.mapDivDocument.querySelector(".swiper-container.poi_img_swiper");0===s.length?r.classList.add("hide"):(r.classList.remove("hide"),e.poiSwiper||(e.poiSwiper=new ot(".swiper-container.poi_img_swiper",{lazy:!0,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".poi-img-next",prevEl:".poi-img-prev"}})),s.forEach((function(t){return e.poiSwiper.appendSlide(t)})))}),!1),this.core.mapDivDocument.querySelector(".poi_address").innerText=this.core.translate(t.address),this.core.mapDivDocument.querySelector(".poi_desc").innerHTML=this.core.translate(t.desc).replace(/\n/g,"<br>")}var a=new lt.Z.Modal(i,{root:this.core.mapDivDocument});this.core.selectMarker(t.namespaceID),i.addEventListener("hide.bs.modal",(function t(n){i.removeEventListener("hide.bs.modal",t,!1),e.core.unselectMarker()}),!1),i.addEventListener("hidden.bs.modal",(function t(n){i.removeEventListener("hidden.bs.modal",t,!1),e.poiSwiper&&(e.poiSwiper.removeAllSlides(),e.poiSwiper=void 0)}),!1),this.modalSetting("poi"),a.show()}},{key:"showFillEnvelope",value:function(t){var e=this;t.length>0?(e._selectCandidateSources||(e._selectCandidateSources={}),Object.keys(e._selectCandidateSources).forEach((function(n){var r=t.indexOf(n);r<0?(e.core.mapObject.removeEnvelope(e._selectCandidateSources[n]),delete e._selectCandidateSources[n]):t.splice(r,1)})),t.forEach((function(t){if(t!==e.core.from.mapID){var n=e.core.cacheHash[t],r=n.envelope.geometry.coordinates[0].map((function(t){return e.core.from.merc2SysCoordAsync(t)})),i=Mi(n.envelopeColor);(i=i.slice())[3]=.2,Promise.all(r).then((function(n){e._selectCandidateSources[t]=e.core.mapObject.setFillEnvelope(n,null,{color:i})}))}}))):e._selectCandidateSources&&(Object.keys(e._selectCandidateSources).forEach((function(t){return e.core.mapObject.removeEnvelope(e._selectCandidateSources[t])})),delete e._selectCandidateSources)}},{key:"xyToMapIDs",value:(o=oy(ny().mark((function t(e){var n,r,i,o,s,a,l,c,u,h=arguments;return ny().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=h.length>1&&void 0!==h[1]?h[1]:10,r=this,i=(0,ti.xm)(e),o=r.core.mapObject,s=o.getSize(),a=[[0,0],[s[0],0],s,[0,s[1]],[0,0]],l=a.map((function(t){return o.getCoordinateFromPixel(t)})),t.next=9,r.core.from instanceof Nf?Promise.resolve(l):Promise.all(l.map((function(t){return r.core.from.sysCoord2MercAsync(t)})));case 9:return c=t.sent,u=r.areaIndex(c),t.abrupt("return",Promise.all(Object.keys(r.core.cacheHash).filter((function(t){return r.core.cacheHash[t].envelope})).map((function(t){var e=r.core.cacheHash[t];return Promise.all([Promise.resolve(e),Promise.all(e.envelope.geometry.coordinates[0].map((function(t){return r.core.from.merc2SysCoordAsync(t)})))])}))).then((function(t){var e=t.reduce((function(t,e){var n=e[0],o=e[1];if(n.mapID!==r.core.from.mapID){var s=(0,ti.yu)([o]);xf(i,s)&&t.push(n)}return t}),[]).filter((function(t){return t.envelopeAreaIndex/u<n})).sort((function(t,e){return t.envelopeAreaIndex-e.envelopeAreaIndex})).map((function(t){return t.mapID}));return console.log(e),e})));case 12:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"setShowBorder",value:function(t){if(this.core.requestUpdateState({showBorder:t?1:0}),this.updateEnvelope(),t?this.core.mapDivDocument.classList.add("show-border"):this.core.mapDivDocument.classList.remove("show-border"),this.core.restoreSession){var e=Math.floor((new Date).getTime()/1e3);localStorage.setItem("epoch",e),localStorage.setItem("showBorder",t?1:0)}}},{key:"setHideMarker",value:function(t){t?(this.core.hideAllMarkers(),this.core.mapDivDocument.classList.add("hide-marker")):(this.core.showAllMarkers(),this.core.mapDivDocument.classList.remove("hide-marker"))}},{key:"updateEnvelope",value:function(){var t=this;t.core.mapObject&&(t.core.mapObject.resetEnvelope(),delete t._selectCandidateSources,t.core.stateBuffer.showBorder&&Object.keys(t.core.cacheHash).filter((function(e){return t.core.cacheHash[e].envelope})).map((function(e){var n=t.core.cacheHash[e],r=e===t.core.from.mapID&&n instanceof td?[[0,0],[n.width,0],[n.width,n.height],[0,n.height],[0,0]].map((function(t){return Promise.resolve(n.xy2SysCoord(t))})):n.envelope.geometry.coordinates[0].map((function(e){return t.core.from.merc2SysCoordAsync(e)}));Promise.all(r).then((function(e){t.core.mapObject.setEnvelope(e,{color:n.envelopeColor,width:2,lineDash:[6,6]})}))})))}},{key:"resolveRelativeLink",value:function(t,e){return e||(e="."),t.match(/\//)?t:"".concat(e,"/").concat(t)}},{key:"checkOverlayID",value:function(t){for(var e=this.overlaySwiper.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++)if(e[n].getAttribute("data")===t)return!0;return!1}},{key:"areaIndex",value:function(t){return.5*Math.abs([0,1,2,3].reduce((function(e,n,r){var i=t[r],o=t[r+1];return e+(i[0]-o[0])*(i[1]+o[1])}),0))}},{key:"ellips",value:function(){for(var t=function(t){for(var e=t.innerText.split(""),n="",r=0;r<e.length;r++)n+="<span>".concat(e[r],"</span>");n+='<span class="omit-mark">'.concat("…","</span>"),t.innerHTML=n},e=function(t){var e,n=t.querySelectorAll("span"),r=t.querySelector(".omit-mark"),i=0;n[0].style.display="";for(var o=1;o<n.length;o++)n[o].style.display="none";r.style.display="";for(var s=t.offsetHeight,a=!1,l=1;l<n.length-1;l++){if(n[l].style.display="",t.offsetHeight>s&&(a?(s=t.offsetHeight,i++):(a=!0,t.classList.add("minimize"))),i>=2){e=l-2;break}if(l>=n.length-2)return void(r.style.display="none")}for(var c=e;c<n.length-1;c++)n[c].style.display="none"},n=this.core.mapDivDocument.querySelectorAll(".swiper-slide div"),r=0;r<n.length;r++){var i=n[r];t(i),e(i)}}},{key:"remove",value:function(){this.core.remove(),delete this.core}}],r&&sy(n.prototype,r),i&&sy(n,i),Object.defineProperty(n,"prototype",{writable:!1}),l}(st.Z);(window.Maplat={}).createObject=function(t){return new Promise((function(e){var n=new py(t);n.waitReady.then((function(){e(n)}))}))}})()})();
2
+ (()=>{var t={5432:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});n(9346);function r(t,e,n){if(null!==t)for(var i,o,s,a,l,c,u,h,p=0,f=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;y<m;y++){l=(h=!!(u=g?t.features[y].geometry:v?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var _=0;_<l;_++){var b=0,w=0;if(null!==(a=h?u.geometries[_]:u)){c=a.coordinates;var x=a.type;switch(p=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":e(c,f,y,b,w),f++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++)e(c[i],f,y,b,w),f++,"MultiPoint"===x&&b++;"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(o=0;o<c[i].length-p;o++)e(c[i][o],f,y,b,w),f++;"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for("MultiPolygon"===x&&(w=0),o=0;o<c[i].length;o++){for(s=0;s<c[i][o].length-p;s++)e(c[i][o][s],f,y,b,w),f++;w++}b++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)r(a.geometries[i],e,n);break;default:throw new Error("Unknown Geometry Type")}}}}}const i=function(t){var e=[1/0,1/0,-1/0,-1/0];return r(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}},9346:(t,e,n)=>{"use strict";n.d(e,{Tu:()=>s,uf:()=>a,xm:()=>i,yu:()=>o});function r(t,e,n){if(!c(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&u(r),i&&h(i);var o={type:"Feature"};return i&&(o.id=i),r&&(o.bbox=r),o.properties=e||{},o.geometry=t,o}function i(t,e,n){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!l(t[0])||!l(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function o(t,e,n){if(!t)throw new Error("coordinates is required");for(var i=0;i<t.length;i++){var o=t[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++){if(0===i&&0===s&&!l(o[0][0])||!l(o[0][1]))throw new Error("coordinates must contain numbers");if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}}return r({type:"Polygon",coordinates:t},e,n)}function s(t,e,n){if(!t)throw new Error("coordinates is required");if(t.length<2)throw new Error("coordinates must be an array of two or more positions");if(!l(t[0][1])||!l(t[0][1]))throw new Error("coordinates must contain numbers");return r({type:"LineString",coordinates:t},e,n)}function a(t,e){if(!c(e=e||{}))throw new Error("options is invalid");var n=e.bbox,r=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");n&&u(n),r&&h(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=t,i}function l(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function c(t){return!!t&&t.constructor===Object}function u(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!l(t))throw new Error("bbox must only contain numbers")}))}function h(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},2273:(t,e,n)=>{"use strict";var r=n(1662),i=n(3842),o=n(6960);const s=n(8639).orient2d;function a(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var i=function(t){for(var e=t[0],n=t[0],r=t[0],i=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<e[0]&&(e=a),a[0]>r[0]&&(r=a),a[1]<n[1]&&(n=a),a[1]>i[1]&&(i=a)}var l=[e,n,r,i],c=l.slice();for(s=0;s<t.length;s++)o(t[s],l)||c.push(t[s]);return function(t){t.sort(_);for(var e=[],n=0;n<t.length;n++){for(;e.length>=2&&f(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&f(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),e.pop(),e.concat(r)}(c)}(t),s=new r(16);s.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},s.compareMinX=function(t,e){return t[0]-e[0]},s.compareMinY=function(t,e){return t[1]-e[1]},s.load(t);for(var a,c=[],u=0;u<i.length;u++){var h=i[u];s.remove(h),a=g(h,a),c.push(a)}var p=new r(16);for(u=0;u<c.length;u++)p.insert(d(c[u]));for(var m=e*e,y=n*n;c.length;){var b=c.shift(),w=b.p,x=b.next.p,S=v(w,x);if(!(S<y)){var E=S/m;(h=l(s,b.prev.p,w,x,b.next.next.p,E,p))&&Math.min(v(h,w),v(h,x))<=E&&(c.push(b),c.push(g(h,b)),s.remove(h),p.remove(b),p.insert(d(b)),p.insert(d(b.next)))}}b=a;var C=[];do{C.push(b.p),b=b.next}while(b!==a);return C.push(b.p),C}function l(t,e,n,r,o,s,a){for(var l=new i([],c),h=t.data;h;){for(var f=0;f<h.children.length;f++){var d=h.children[f],g=h.leaf?m(d,n,r):u(n,r,d);g>s||l.push({node:d,dist:g})}for(;l.length&&!l.peek().node.children;){var v=l.pop(),y=v.node,_=m(y,e,n),b=m(y,r,o);if(v.dist<_&&v.dist<b&&p(n,y,a)&&p(r,y,a))return y}(h=l.pop())&&(h=h.node)}return null}function c(t,e){return t.dist-e.dist}function u(t,e,n){if(h(t,n)||h(e,n))return 0;var r=y(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===r)return 0;var i=y(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===i)return 0;var o=y(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var s=y(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===s?0:Math.min(r,i,o,s)}function h(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function p(t,e,n){for(var r,i,o,s,a=Math.min(t[0],e[0]),l=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),u=Math.max(t[1],e[1]),h=n.search({minX:a,minY:l,maxX:c,maxY:u}),p=0;p<h.length;p++)if(r=h[p].p,i=h[p].next.p,o=t,r!==(s=e)&&i!==o&&f(r,i,o)>0!=f(r,i,s)>0&&f(o,s,r)>0!=f(o,s,i)>0)return!1;return!0}function f(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function d(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function g(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function v(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function m(t,e,n){var r=e[0],i=e[1],o=n[0]-r,s=n[1]-i;if(0!==o||0!==s){var a=((t[0]-r)*o+(t[1]-i)*s)/(o*o+s*s);a>1?(r=n[0],i=n[1]):a>0&&(r+=o*a,i+=s*a)}return(o=t[0]-r)*o+(s=t[1]-i)*s}function y(t,e,n,r,i,o,s,a){var l,c,u,h,p=n-t,f=r-e,d=s-i,g=a-o,v=t-i,m=e-o,y=p*p+f*f,_=p*d+f*g,b=d*d+g*g,w=p*v+f*m,x=d*v+g*m,S=y*b-_*_,E=S,C=S;0===S?(c=0,E=1,h=x,C=b):(h=y*x-_*w,(c=_*x-b*w)<0?(c=0,h=x,C=b):c>E&&(c=E,h=x+_,C=b)),h<0?(h=0,-w<0?c=0:-w>y?c=E:(c=-w,E=y)):h>C&&(h=C,-w+_<0?c=0:-w+_>y?c=E:(c=-w+_,E=y));var T=(1-(u=0===h?0:h/C))*i+u*s-((1-(l=0===c?0:c/E))*t+l*n),O=(1-u)*o+u*a-((1-l)*e+l*r);return T*T+O*O}function _(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}i.default&&(i=i.default),t.exports=a,t.exports.default=a},1662:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(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 i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(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 c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=i(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.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 n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<o?(o=h,i=c<i?c:i,s=l):h===o&&c<i&&(i=c,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,c,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),v=s(t,d,n,this.toBBox),m=(i=g,o=v,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),y=u(g)+u(v);m<p?(p=m,r=d,f=y<f?y:f):m===p&&y<f&&(f=y,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),c=h(o)+h(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?i(p):p),c+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},9662:(t,e,n)=>{var r=n(614),i=n(6330),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(4411),i=n(6330),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(614),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},1223:(t,e,n)=>{var r=n(5112),i=n(30),o=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,e,n)=>{"use strict";var r=n(8710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},5787:(t,e,n)=>{var r=n(7976),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,n)=>{var r=n(111),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},8533:(t,e,n)=>{"use strict";var r=n(2092).forEach,i=n(9341)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,n)=>{"use strict";var r=n(9974),i=n(6916),o=n(7908),s=n(3411),a=n(7659),l=n(4411),c=n(6244),u=n(6135),h=n(4121),p=n(1246),f=Array;t.exports=function(t){var e=o(t),n=l(this),d=arguments.length,g=d>1?arguments[1]:void 0,v=void 0!==g;v&&(g=r(g,d>2?arguments[2]:void 0));var m,y,_,b,w,x,S=p(e),E=0;if(!S||this===f&&a(S))for(m=c(e),y=n?new this(m):f(m);m>E;E++)x=v?g(e[E],E):e[E],u(y,E,x);else for(w=(b=h(e,S)).next,y=n?new this:[];!(_=i(w,b)).done;E++)x=v?s(b,g,[_.value,E],!0):_.value,u(y,E,x);return y.length=E,y}},1318:(t,e,n)=>{var r=n(5656),i=n(1400),o=n(6244),s=function(t){return function(e,n,s){var a,l=r(e),c=o(l),u=i(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,e,n)=>{var r=n(9974),i=n(1702),o=n(8361),s=n(7908),a=n(6244),l=n(5417),c=i([].push),u=function(t){var e=1==t,n=2==t,i=3==t,u=4==t,h=6==t,p=7==t,f=5==t||h;return function(d,g,v,m){for(var y,_,b=s(d),w=o(b),x=r(g,v),S=a(w),E=0,C=m||l,T=e?C(d,S):n||p?C(d,0):void 0;S>E;E++)if((f||E in w)&&(_=x(y=w[E],E,b),t))if(e)T[E]=_;else if(_)switch(t){case 3:return!0;case 5:return y;case 6:return E;case 2:c(T,y)}else switch(t){case 4:return!1;case 7:c(T,y)}return h?-1:i||u?u:T}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,n)=>{var r=n(7293),i=n(5112),o=n(7392),s=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,n)=>{"use strict";var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},3658:(t,e,n)=>{"use strict";var r=n(9781),i=n(3157),o=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},1589:(t,e,n)=>{var r=n(1400),i=n(6244),o=n(6135),s=Array,a=Math.max;t.exports=function(t,e,n){for(var l=i(t),c=r(e,l),u=r(void 0===n?l:n,l),h=s(a(u-c,0)),p=0;c<u;c++,p++)o(h,p,t[c]);return h.length=p,h}},206:(t,e,n)=>{var r=n(1702);t.exports=r([].slice)},4362:(t,e,n)=>{var r=n(1589),i=Math.floor,o=function(t,e){var n=t.length,l=i(n/2);return n<8?s(t,e):a(t,o(r(t,0,l),e),o(r(t,l),e),e)},s=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},a=function(t,e,n,r){for(var i=e.length,o=n.length,s=0,a=0;s<i||a<o;)t[s+a]=s<i&&a<o?r(e[s],n[a])<=0?e[s++]:n[a++]:s<i?e[s++]:n[a++];return t};t.exports=o},7475:(t,e,n)=>{var r=n(3157),i=n(4411),o=n(111),s=n(5112)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===a||r(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},3411:(t,e,n)=>{var r=n(9670),i=n(9212);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},7072:(t,e,n)=>{var r=n(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},4326:(t,e,n)=>{var r=n(1702),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:(t,e,n)=>{var r=n(1694),i=n(614),o=n(4326),s=n(5112)("toStringTag"),a=Object,l="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:l?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},9920:(t,e,n)=>{var r=n(2597),i=n(3887),o=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=i(e),l=s.f,c=o.f,u=0;u<a.length;u++){var h=a[u];r(t,h)||n&&r(n,h)||l(t,h,c(e,h))}}},8544:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,e){return{value:t,done:e}}},8880:(t,e,n)=>{var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),i=n(3070),o=n(9114);t.exports=function(t,e,n){var s=r(e);s in t?i.f(t,s,o(0,n)):t[s]=n}},8709:(t,e,n)=>{"use strict";var r=n(9670),i=n(2140),o=TypeError;t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw o("Incorrect hint");return i(this,t)}},7045:(t,e,n)=>{var r=n(6339),i=n(3070);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},8052:(t,e,n)=>{var r=n(614),i=n(3070),o=n(6339),s=n(3072);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&o(n,c,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9190:(t,e,n)=>{var r=n(8052);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},3072:(t,e,n)=>{var r=n(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},5117:(t,e,n)=>{"use strict";var r=n(6330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+r(e)+" of "+r(t))}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},317:(t,e,n)=>{var r=n(7854),i=n(111),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,n)=>{var r=n(317)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},8886:(t,e,n)=>{var r=n(8113).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},7871:(t,e,n)=>{var r=n(3823),i=n(5268);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,e,n)=>{var r=n(8113);t.exports=/MSIE|Trident/.test(r)},1528:(t,e,n)=>{var r=n(8113),i=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),i=n(7854);t.exports="process"==r(i.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,i,o=n(7854),s=n(8113),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},8008:(t,e,n)=>{var r=n(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),s=n(8052),a=n(3072),l=n(9920),c=n(4705);t.exports=function(t,e){var n,u,h,p,f,d=t.target,g=t.global,v=t.stat;if(n=g?r:v?r[d]||a(d,{}):(r[d]||{}).prototype)for(u in e){if(p=e[u],h=t.dontCallGetSet?(f=i(n,u))&&f.value:n[u],!c(g?u:d+(v?".":"#")+u,t.forced)&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(t.sham||h&&h.sham)&&o(p,"sham",!0),s(n,u,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,n)=>{"use strict";n(4916);var r=n(1470),i=n(8052),o=n(2261),s=n(7293),a=n(5112),l=n(8880),c=a("species"),u=RegExp.prototype;t.exports=function(t,e,n,h){var p=a(t),f=!s((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=f&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!f||!d||n){var g=r(/./[p]),v=e(p,""[t],(function(t,e,n,i,s){var a=r(t),l=e.exec;return l===o||l===u.exec?f&&!s?{done:!0,value:g(e,n,i)}:{done:!0,value:a(n,e,i)}:{done:!1}}));i(String.prototype,t,v[0]),i(u,p,v[1])}h&&l(u[p],"sham",!0)}},2104:(t,e,n)=>{var r=n(4374),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(o):function(){return s.apply(o,arguments)})},9974:(t,e,n)=>{var r=n(1470),i=n(9662),o=n(4374),s=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},7065:(t,e,n)=>{"use strict";var r=n(1702),i=n(9662),o=n(111),s=n(2597),a=n(206),l=n(4374),c=Function,u=r([].concat),h=r([].join),p={};t.exports=l?c.bind:function(t){var e=i(this),n=e.prototype,r=a(arguments,1),l=function(){var n=u(r,a(arguments));return this instanceof l?function(t,e,n){if(!s(p,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";p[e]=c("C,a","return new C("+h(r,",")+")")}return p[e](t,n)}(e,n.length,n):e.apply(t,n)};return o(n)&&(l.prototype=n),l}},6916:(t,e,n)=>{var r=n(4374),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6530:(t,e,n)=>{var r=n(9781),i=n(2597),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},1470:(t,e,n)=>{var r=n(4326),i=n(1702);t.exports=function(t){if("Function"===r(t))return i(t)}},1702:(t,e,n)=>{var r=n(4374),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);t.exports=r?s:function(t){return function(){return o.apply(t,arguments)}}},5005:(t,e,n)=>{var r=n(7854),i=n(614);t.exports=function(t,e){return arguments.length<2?(n=r[t],i(n)?n:void 0):r[t]&&r[t][e];var n}},1246:(t,e,n)=>{var r=n(648),i=n(8173),o=n(8554),s=n(7497),a=n(5112)("iterator");t.exports=function(t){if(!o(t))return i(t,a)||i(t,"@@iterator")||s[r(t)]}},4121:(t,e,n)=>{var r=n(6916),i=n(9662),o=n(9670),s=n(6330),a=n(1246),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(i(n))return o(r(n,t));throw l(s(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662),i=n(8554);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},647:(t,e,n)=>{var r=n(1702),i=n(7908),o=Math.floor,s=r("".charAt),a=r("".replace),l=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,h,p){var f=n+t.length,d=r.length,g=u;return void 0!==h&&(h=i(h),g=c),a(p,g,(function(i,a){var c;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,n);case"'":return l(e,f);case"<":c=h[l(a,1,-1)];break;default:var u=+a;if(0===u)return i;if(u>d){var p=o(u/10);return 0===p?i:p<=d?void 0===r[p-1]?s(a,1):r[p-1]+s(a,1):i}c=r[u-1]}return void 0===c?"":c}))}},7854:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:(t,e,n)=>{var r=n(1702),i=n(7908),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(1702),i=n(7293),o=n(4326),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},9587:(t,e,n)=>{var r=n(614),i=n(111),o=n(7674);t.exports=function(t,e,n){var s,a;return o&&r(s=e.constructor)&&s!==n&&i(a=s.prototype)&&a!==n.prototype&&o(t,a),t}},2788:(t,e,n)=>{var r=n(1702),i=n(614),o=n(5465),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},9909:(t,e,n)=>{var r,i,o,s=n(4811),a=n(7854),l=n(111),c=n(8880),u=n(2597),h=n(5465),p=n(6200),f=n(3501),d="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||h.state){var m=h.state||(h.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw g(d);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},o=function(t){return m.has(t)}}else{var y=p("state");f[y]=!0,r=function(t,e){if(u(t,y))throw g(d);return e.facade=t,c(t,y,e),e},i=function(t){return u(t,y)?t[y]:{}},o=function(t){return u(t,y)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:(t,e,n)=>{var r=n(4154),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(1702),i=n(7293),o=n(614),s=n(648),a=n(5005),l=n(2788),c=function(){},u=[],h=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,f=r(p.exec),d=!p.exec(c),g=function(t){if(!o(t))return!1;try{return h(c,u,t),!0}catch(t){return!1}},v=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!f(p,l(t))}catch(t){return!0}};v.sham=!0,t.exports=!h||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?v:g},5032:(t,e,n)=>{var r=n(2597);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},4705:(t,e,n)=>{var r=n(7293),i=n(614),o=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n==u||n!=c&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},8554:t=>{t.exports=function(t){return null==t}},111:(t,e,n)=>{var r=n(614),i=n(4154),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},7850:(t,e,n)=>{var r=n(111),i=n(4326),o=n(5112)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,n)=>{var r=n(5005),i=n(614),o=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},408:(t,e,n)=>{var r=n(9974),i=n(6916),o=n(9670),s=n(6330),a=n(7659),l=n(6244),c=n(7976),u=n(4121),h=n(1246),p=n(9212),f=TypeError,d=function(t,e){this.stopped=t,this.result=e},g=d.prototype;t.exports=function(t,e,n){var v,m,y,_,b,w,x,S=n&&n.that,E=!(!n||!n.AS_ENTRIES),C=!(!n||!n.IS_RECORD),T=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),k=r(e,S),M=function(t){return v&&p(v,"normal",t),new d(!0,t)},P=function(t){return E?(o(t),O?k(t[0],t[1],M):k(t[0],t[1])):O?k(t,M):k(t)};if(C)v=t.iterator;else if(T)v=t;else{if(!(m=h(t)))throw f(s(t)+" is not iterable");if(a(m)){for(y=0,_=l(t);_>y;y++)if((b=P(t[y]))&&c(g,b))return b;return new d(!1)}v=u(t,m)}for(w=C?t.next:v.next;!(x=i(w,v)).done;){try{b=P(x.value)}catch(t){p(v,"throw",t)}if("object"==typeof b&&b&&c(g,b))return b}return new d(!1)}},9212:(t,e,n)=>{var r=n(6916),i=n(9670),o=n(8173);t.exports=function(t,e,n){var s,a;i(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw n;return n}s=r(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return i(s),n}},3061:(t,e,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),s=n(8003),a=n(7497),l=function(){return this};t.exports=function(t,e,n,c){var u=e+" Iterator";return t.prototype=i(r,{next:o(+!c,n)}),s(t,u,!1,!0),a[u]=l,t}},1656:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(1913),s=n(6530),a=n(614),l=n(3061),c=n(9518),u=n(7674),h=n(8003),p=n(8880),f=n(8052),d=n(5112),g=n(7497),v=n(3383),m=s.PROPER,y=s.CONFIGURABLE,_=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=d("iterator"),x="keys",S="values",E="entries",C=function(){return this};t.exports=function(t,e,n,s,d,v,T){l(n,e,s);var O,k,M,P=function(t){if(t===d&&D)return D;if(!b&&t in A)return A[t];switch(t){case x:case S:case E:return function(){return new n(this,t)}}return function(){return new n(this)}},L=e+" Iterator",I=!1,A=t.prototype,R=A[w]||A["@@iterator"]||d&&A[d],D=!b&&R||P(d),j="Array"==e&&A.entries||R;if(j&&(O=c(j.call(new t)))!==Object.prototype&&O.next&&(o||c(O)===_||(u?u(O,_):a(O[w])||f(O,w,C)),h(O,L,!0,!0),o&&(g[L]=C)),m&&d==S&&R&&R.name!==S&&(!o&&y?p(A,"name",S):(I=!0,D=function(){return i(R,this)})),d)if(k={values:P(S),keys:v?D:P(x),entries:P(E)},T)for(M in k)(b||I||!(M in A))&&f(A,M,k[M]);else r({target:e,proto:!0,forced:b||I},k);return o&&!T||A[w]===D||f(A,w,D,{name:d}),g[e]=D,k}},3383:(t,e,n)=>{"use strict";var r,i,o,s=n(7293),a=n(614),l=n(111),c=n(30),u=n(9518),h=n(8052),p=n(5112),f=n(1913),d=p("iterator"),g=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):g=!0),!l(r)||s((function(){var t={};return r[d].call(t)!==t}))?r={}:f&&(r=c(r)),a(r[d])||h(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:g}},7497:t=>{t.exports={}},6244:(t,e,n)=>{var r=n(7466);t.exports=function(t){return r(t.length)}},6339:(t,e,n)=>{var r=n(7293),i=n(614),o=n(2597),s=n(9781),a=n(6530).CONFIGURABLE,l=n(2788),c=n(9909),u=c.enforce,h=c.get,p=Object.defineProperty,f=s&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),d=String(String).split("String"),g=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),f&&n&&o(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=u(t);return o(r,"source")||(r.source=d.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return i(this)&&h(this).source||l(this)}),"toString")},4758:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},5948:(t,e,n)=>{var r,i,o,s,a,l,c,u,h=n(7854),p=n(9974),f=n(1236).f,d=n(261).set,g=n(6833),v=n(1528),m=n(1036),y=n(5268),_=h.MutationObserver||h.WebKitMutationObserver,b=h.document,w=h.process,x=h.Promise,S=f(h,"queueMicrotask"),E=S&&S.value;E||(r=function(){var t,e;for(y&&(t=w.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?s():o=void 0,t}}o=void 0,t&&t.enter()},g||y||m||!_||!b?!v&&x&&x.resolve?((c=x.resolve(void 0)).constructor=x,u=p(c.then,c),s=function(){u(r)}):y?s=function(){w.nextTick(r)}:(d=p(d,h),s=function(){d(r)}):(a=!0,l=b.createTextNode(""),new _(r).observe(l,{characterData:!0}),s=function(){l.data=a=!a})),t.exports=E||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,s()),o=e}},8523:(t,e,n)=>{"use strict";var r=n(9662),i=TypeError,o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},1574:(t,e,n)=>{"use strict";var r=n(9781),i=n(1702),o=n(6916),s=n(7293),a=n(1956),l=n(5181),c=n(5296),u=n(7908),h=n(8361),p=Object.assign,f=Object.defineProperty,d=i([].concat);t.exports=!p||s((function(){if(r&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=p({},t)[n]||a(p({},e)).join("")!=i}))?function(t,e){for(var n=u(t),i=arguments.length,s=1,p=l.f,f=c.f;i>s;)for(var g,v=h(arguments[s++]),m=p?d(a(v),p(v)):a(v),y=m.length,_=0;y>_;)g=m[_++],r&&!o(f,v,g)||(n[g]=v[g]);return n}:p},30:(t,e,n)=>{var r,i=n(9670),o=n(6048),s=n(748),a=n(3501),l=n(490),c=n(317),u=n(6200),h="prototype",p="script",f=u("IE_PROTO"),d=function(){},g=function(t){return"<"+p+">"+t+"</"+p+">"},v=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;m="undefined"!=typeof document?document.domain&&r?v(r):(e=c("iframe"),n="java"+p+":",e.style.display="none",l.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):v(r);for(var i=s.length;i--;)delete m[h][s[i]];return m()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[h]=i(t),n=new d,d[h]=null,n[f]=t):n=m(),void 0===e?n:o.f(n,e)}},6048:(t,e,n)=>{var r=n(9781),i=n(3353),o=n(3070),s=n(9670),a=n(5656),l=n(1956);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=l(e),c=i.length,u=0;c>u;)o.f(t,n=i[u++],r[n]);return t}},3070:(t,e,n)=>{var r=n(9781),i=n(4664),o=n(3353),s=n(9670),a=n(4948),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",p="configurable",f="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n[f]){var r=u(t,e);r&&r[f]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:h in n?n[h]:r[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),i=n(6916),o=n(5296),s=n(9114),a=n(5656),l=n(4948),c=n(2597),u=n(4664),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},1156:(t,e,n)=>{var r=n(4326),i=n(5656),o=n(8006).f,s=n(1589),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==r(t)?function(t){try{return o(t)}catch(t){return s(a)}}(t):o(i(t))}},8006:(t,e,n)=>{var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var r=n(2597),i=n(614),o=n(7908),s=n(6200),a=n(8544),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(r(e,l))return e[l];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},7976:(t,e,n)=>{var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:(t,e,n)=>{var r=n(1702),i=n(2597),o=n(5656),s=n(1318).indexOf,a=n(3501),l=r([].push);t.exports=function(t,e){var n,r=o(t),c=0,u=[];for(n in r)!i(a,n)&&i(r,n)&&l(u,n);for(;e.length>c;)i(r,n=e[c++])&&(~s(u,n)||l(u,n));return u}},1956:(t,e,n)=>{var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(1702),i=n(9670),o=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},288:(t,e,n)=>{"use strict";var r=n(1694),i=n(648);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,n)=>{var r=n(6916),i=n(614),o=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),i=n(1702),o=n(8006),s=n(5181),a=n(9670),l=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?l(e,n(t)):e}},857:(t,e,n)=>{var r=n(7854);t.exports=r},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,e,n)=>{var r=n(7854),i=n(2492),o=n(614),s=n(4705),a=n(2788),l=n(5112),c=n(7871),u=n(3823),h=n(1913),p=n(7392),f=i&&i.prototype,d=l("species"),g=!1,v=o(r.PromiseRejectionEvent),m=s("Promise",(function(){var t=a(i),e=t!==String(i);if(!e&&66===p)return!0;if(h&&(!f.catch||!f.finally))return!0;if(!p||p<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[d]=r,!(g=n.then((function(){}))instanceof r))return!0}return!e&&(c||u)&&!v}));t.exports={CONSTRUCTOR:m,REJECTION_EVENT:v,SUBCLASSING:g}},2492:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},9478:(t,e,n)=>{var r=n(9670),i=n(111),o=n(8523);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},612:(t,e,n)=>{var r=n(2492),i=n(7072),o=n(3702).CONSTRUCTOR;t.exports=o||!i((function(t){r.all(t).then(void 0,(function(){}))}))},2626:(t,e,n)=>{var r=n(3070).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},7651:(t,e,n)=>{var r=n(6916),i=n(9670),o=n(614),s=n(4326),a=n(2261),l=TypeError;t.exports=function(t,e){var n=t.exec;if(o(n)){var c=r(n,t,e);return null!==c&&i(c),c}if("RegExp"===s(t))return r(a,t,e);throw l("RegExp#exec called on incompatible receiver")}},2261:(t,e,n)=>{"use strict";var r,i,o=n(6916),s=n(1702),a=n(1340),l=n(7066),c=n(2999),u=n(2309),h=n(30),p=n(9909).get,f=n(9441),d=n(7168),g=u("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,m=v,y=s("".charAt),_=s("".indexOf),b=s("".replace),w=s("".slice),x=(i=/b*/g,o(v,r=/a/,"a"),o(v,i,"a"),0!==r.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(x||E||S||f||d)&&(m=function(t){var e,n,r,i,s,c,u,f=this,d=p(f),C=a(t),T=d.raw;if(T)return T.lastIndex=f.lastIndex,e=o(m,T,C),f.lastIndex=T.lastIndex,e;var O=d.groups,k=S&&f.sticky,M=o(l,f),P=f.source,L=0,I=C;if(k&&(M=b(M,"y",""),-1===_(M,"g")&&(M+="g"),I=w(C,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==y(C,f.lastIndex-1))&&(P="(?: "+P+")",I=" "+I,L++),n=new RegExp("^(?:"+P+")",M)),E&&(n=new RegExp("^"+P+"$(?!\\s)",M)),x&&(r=f.lastIndex),i=o(v,k?n:f,I),k?i?(i.input=w(i.input,L),i[0]=w(i[0],L),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:x&&i&&(f.lastIndex=f.global?i.index+i[0].length:r),E&&i&&i.length>1&&o(g,i[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&O)for(i.groups=c=h(null),s=0;s<O.length;s++)c[(u=O[s])[0]]=i[u[1]];return i}),t.exports=m},7066:(t,e,n)=>{"use strict";var r=n(9670);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4706:(t,e,n)=>{var r=n(6916),i=n(2597),o=n(7976),s=n(7066),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||i(t,"flags")||!o(a,t)?e:r(s,t)}},2999:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp,o=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),s=o||r((function(){return!i("a","y").sticky})),a=o||r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:o}},9441:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:(t,e,n)=>{var r=n(8554),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},1150:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},6340:(t,e,n)=>{"use strict";var r=n(5005),i=n(3070),o=n(5112),s=n(9781),a=o("species");t.exports=function(t){var e=r(t),n=i.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,i=n(2597),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,o)&&r(t,o,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,n)=>{var r=n(7854),i=n(3072),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},2309:(t,e,n)=>{var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,n)=>{var r=n(9670),i=n(9483),o=n(8554),s=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||o(n=r(a)[s])?e:i(n)}},8710:(t,e,n)=>{var r=n(1702),i=n(9303),o=n(1340),s=n(4488),a=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(t){return function(e,n){var r,u,h=o(s(e)),p=i(n),f=h.length;return p<0||p>=f?t?"":void 0:(r=l(h,p))<55296||r>56319||p+1===f||(u=l(h,p+1))<56320||u>57343?t?a(h,p):r:t?c(h,p,p+2):u-56320+(r-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},3197:(t,e,n)=>{"use strict";var r=n(1702),i=2147483647,o=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",l=RangeError,c=r(s.exec),u=Math.floor,h=String.fromCharCode,p=r("".charCodeAt),f=r([].join),d=r([].push),g=r("".replace),v=r("".split),m=r("".toLowerCase),y=function(t){return t+22+75*(t<26)},_=function(t,e,n){var r=0;for(t=n?u(t/700):t>>1,t+=u(t/e);t>455;)t=u(t/35),r+=36;return u(r+36*t/(t+38))},b=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=p(t,n++);if(i>=55296&&i<=56319&&n<r){var o=p(t,n++);56320==(64512&o)?d(e,((1023&i)<<10)+(1023&o)+65536):(d(e,i),n--)}else d(e,i)}return e}(t);var n,r,o=t.length,s=128,c=0,g=72;for(n=0;n<t.length;n++)(r=t[n])<128&&d(e,h(r));var v=e.length,m=v;for(v&&d(e,"-");m<o;){var b=i;for(n=0;n<t.length;n++)(r=t[n])>=s&&r<b&&(b=r);var w=m+1;if(b-s>u((i-c)/w))throw l(a);for(c+=(b-s)*w,s=b,n=0;n<t.length;n++){if((r=t[n])<s&&++c>i)throw l(a);if(r==s){for(var x=c,S=36;;){var E=S<=g?1:S>=g+26?26:S-g;if(x<E)break;var C=x-E,T=36-E;d(e,h(y(E+C%T))),x=u(C/T),S+=36}d(e,h(y(x))),g=_(c,w,m==v),c=0,m++}}c++,s++}return f(e,"")};t.exports=function(t){var e,n,r=[],i=v(g(m(t),s,"."),".");for(e=0;e<i.length;e++)n=i[e],d(r,c(o,n)?"xn--"+b(n):n);return f(r,".")}},8415:(t,e,n)=>{"use strict";var r=n(9303),i=n(1340),o=n(4488),s=RangeError;t.exports=function(t){var e=i(o(this)),n="",a=r(t);if(a<0||a==1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},6091:(t,e,n)=>{var r=n(6530).PROPER,i=n(7293),o=n(1361);t.exports=function(t){return i((function(){return!!o[t]()||"​…᠎"!=="​…᠎"[t]()||r&&o[t].name!==t}))}},3111:(t,e,n)=>{var r=n(1702),i=n(4488),o=n(1340),s=n(1361),a=r("".replace),l="["+s+"]",c=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),h=function(t){return function(e){var n=o(i(e));return 1&t&&(n=a(n,c,"")),2&t&&(n=a(n,u,"")),n}};t.exports={start:h(1),end:h(2),trim:h(3)}},6293:(t,e,n)=>{var r=n(7392),i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},6532:(t,e,n)=>{var r=n(6916),i=n(5005),o=n(5112),s=n(8052);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,a=o("toPrimitive");e&&!e[a]&&s(e,a,(function(t){return r(n,this)}),{arity:1})}},2015:(t,e,n)=>{var r=n(6293);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},261:(t,e,n)=>{var r,i,o,s,a=n(7854),l=n(2104),c=n(9974),u=n(614),h=n(2597),p=n(7293),f=n(490),d=n(206),g=n(317),v=n(8053),m=n(6833),y=n(5268),_=a.setImmediate,b=a.clearImmediate,w=a.process,x=a.Dispatch,S=a.Function,E=a.MessageChannel,C=a.String,T=0,O={},k="onreadystatechange";try{r=a.location}catch(t){}var M=function(t){if(h(O,t)){var e=O[t];delete O[t],e()}},P=function(t){return function(){M(t)}},L=function(t){M(t.data)},I=function(t){a.postMessage(C(t),r.protocol+"//"+r.host)};_&&b||(_=function(t){v(arguments.length,1);var e=u(t)?t:S(t),n=d(arguments,1);return O[++T]=function(){l(e,void 0,n)},i(T),T},b=function(t){delete O[t]},y?i=function(t){w.nextTick(P(t))}:x&&x.now?i=function(t){x.now(P(t))}:E&&!m?(s=(o=new E).port2,o.port1.onmessage=L,i=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!p(I)?(i=I,a.addEventListener("message",L,!1)):i=k in g("script")?function(t){f.appendChild(g("script"))[k]=function(){f.removeChild(this),M(t)}}:function(t){setTimeout(P(t),0)}),t.exports={set:_,clear:b}},863:(t,e,n)=>{var r=n(1702);t.exports=r(1..valueOf)},1400:(t,e,n)=>{var r=n(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5656:(t,e,n)=>{var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9303:(t,e,n)=>{var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:(t,e,n)=>{var r=n(9303),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(4488),i=Object;t.exports=function(t){return i(r(t))}},7593:(t,e,n)=>{var r=n(6916),i=n(111),o=n(2190),s=n(8173),a=n(2140),l=n(5112),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!i(n)||o(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,n)=>{var r=n(7593),i=n(2190);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},1340:(t,e,n)=>{var r=n(648),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,n)=>{var r=n(1702),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},5143:(t,e,n)=>{var r=n(7293),i=n(5112),o=n(1913),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},3307:(t,e,n)=>{var r=n(6293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,n)=>{var r=n(9781),i=n(7293);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var e=TypeError;t.exports=function(t,n){if(t<n)throw e("Not enough arguments");return t}},4811:(t,e,n)=>{var r=n(7854),i=n(614),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},6800:(t,e,n)=>{var r=n(857),i=n(2597),o=n(6061),s=n(3070).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||s(e,t,{value:o.f(t)})}},6061:(t,e,n)=>{var r=n(5112);e.f=r},5112:(t,e,n)=>{var r=n(7854),i=n(2309),o=n(2597),s=n(9711),a=n(6293),l=n(3307),c=i("wks"),u=r.Symbol,h=u&&u.for,p=l?u:u&&u.withoutSetter||s;t.exports=function(t){if(!o(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&o(u,t)?c[t]=u[t]:c[t]=l&&h?h(e):p(e)}return c[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},2222:(t,e,n)=>{"use strict";var r=n(2109),i=n(7293),o=n(3157),s=n(111),a=n(7908),l=n(6244),c=n(7207),u=n(6135),h=n(5417),p=n(1194),f=n(5112),d=n(7392),g=f("isConcatSpreadable"),v=d>=51||!i((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),m=p("concat"),y=function(t){if(!s(t))return!1;var e=t[g];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!v||!m},{concat:function(t){var e,n,r,i,o,s=a(this),p=h(s,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(y(o=-1===e?s:arguments[e]))for(i=l(o),c(f+i),n=0;n<i;n++,f++)n in o&&u(p,f,o[n]);else c(f+1),u(p,f++,o);return p.length=f,p}})},7327:(t,e,n)=>{"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1038:(t,e,n)=>{var r=n(2109),i=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(t){Array.from(t)}))},{from:i})},6992:(t,e,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),s=n(9909),a=n(3070).f,l=n(1656),c=n(6178),u=n(1913),h=n(9781),p="Array Iterator",f=s.set,d=s.getterFor(p);t.exports=l(Array,"Array",(function(t,e){f(this,{type:p,target:r(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values");var g=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&h&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(t){}},9600:(t,e,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(8361),s=n(5656),a=n(9341),l=i([].join),c=o!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:c||!u},{join:function(t){return l(s(this),void 0===t?",":t)}})},1249:(t,e,n)=>{"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:(t,e,n)=>{"use strict";var r=n(2109),i=n(3157),o=n(4411),s=n(111),a=n(1400),l=n(6244),c=n(5656),u=n(6135),h=n(5112),p=n(1194),f=n(206),d=p("slice"),g=h("species"),v=Array,m=Math.max;r({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var n,r,h,p=c(this),d=l(p),y=a(t,d),_=a(void 0===e?d:e,d);if(i(p)&&(n=p.constructor,(o(n)&&(n===v||i(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return f(p,y,_);for(r=new(void 0===n?v:n)(m(_-y,0)),h=0;y<_;y++,h++)y in p&&u(r,h,p[y]);return r.length=h,r}})},2707:(t,e,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(9662),s=n(7908),a=n(6244),l=n(5117),c=n(1340),u=n(7293),h=n(4362),p=n(9341),f=n(8886),d=n(256),g=n(7392),v=n(8008),m=[],y=i(m.sort),_=i(m.push),b=u((function(){m.sort(void 0)})),w=u((function(){m.sort(null)})),x=p("sort"),S=!u((function(){if(g)return g<70;if(!(f&&f>3)){if(d)return!0;if(v)return v<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)m.push({k:e+r,v:n})}for(m.sort((function(t,e){return e.v-t.v})),r=0;r<m.length;r++)e=m[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:b||!w||!x||!S},{sort:function(t){void 0!==t&&o(t);var e=s(this);if(S)return void 0===t?y(e):y(e,t);var n,r,i=[],u=a(e);for(r=0;r<u;r++)r in e&&_(i,e[r]);for(h(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=a(i),r=0;r<n;)e[r]=i[r++];for(;r<u;)l(e,r++);return e}})},561:(t,e,n)=>{"use strict";var r=n(2109),i=n(7908),o=n(1400),s=n(9303),a=n(6244),l=n(3658),c=n(7207),u=n(5417),h=n(6135),p=n(5117),f=n(1194)("splice"),d=Math.max,g=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,f,v,m,y,_=i(this),b=a(_),w=o(t,b),x=arguments.length;for(0===x?n=r=0:1===x?(n=0,r=b-w):(n=x-2,r=g(d(s(e),0),b-w)),c(b+n-r),f=u(_,r),v=0;v<r;v++)(m=w+v)in _&&h(f,v,_[m]);if(f.length=r,n<r){for(v=w;v<b-r;v++)y=v+n,(m=v+r)in _?_[y]=_[m]:p(_,y);for(v=b;v>b-r+n;v--)p(_,v-1)}else if(n>r)for(v=b-r;v>w;v--)y=v+n-1,(m=v+r-1)in _?_[y]=_[m]:p(_,y);for(v=0;v<n;v++)_[v+w]=arguments[v+2];return l(_,b-r+n),f}})},6078:(t,e,n)=>{var r=n(2597),i=n(8052),o=n(8709),s=n(5112)("toPrimitive"),a=Date.prototype;r(a,s)||i(a,s,o)},8309:(t,e,n)=>{var r=n(9781),i=n(6530).EXISTS,o=n(1702),s=n(3070).f,a=Function.prototype,l=o(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=o(c.exec);r&&!i&&s(a,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},8862:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(2104),s=n(6916),a=n(1702),l=n(7293),c=n(3157),u=n(614),h=n(111),p=n(2190),f=n(206),d=n(6293),g=i("JSON","stringify"),v=a(/./.exec),m=a("".charAt),y=a("".charCodeAt),_=a("".replace),b=a(1..toString),w=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,E=!d||l((function(){var t=i("Symbol")();return"[null]"!=g([t])||"{}"!=g({a:t})||"{}"!=g(Object(t))})),C=l((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),T=function(t,e){var n=f(arguments),r=e;if((h(e)||void 0!==t)&&!p(t))return c(e)||(e=function(t,e){if(u(r)&&(e=s(r,this,t,e)),!p(e))return e}),n[1]=e,o(g,null,n)},O=function(t,e,n){var r=m(n,e-1),i=m(n,e+1);return v(x,t)&&!v(S,i)||v(S,t)&&!v(x,r)?"\\u"+b(y(t,0),16):t};g&&r({target:"JSON",stat:!0,arity:3,forced:E||C},{stringify:function(t,e,n){var r=f(arguments),i=o(E?T:g,null,r);return C&&"string"==typeof i?_(i,w,O):i}})},3706:(t,e,n)=>{var r=n(7854);n(8003)(r.JSON,"JSON",!0)},2703:(t,e,n)=>{n(8003)(Math,"Math",!0)},9653:(t,e,n)=>{"use strict";var r=n(9781),i=n(7854),o=n(1702),s=n(4705),a=n(8052),l=n(2597),c=n(9587),u=n(7976),h=n(2190),p=n(7593),f=n(7293),d=n(8006).f,g=n(1236).f,v=n(3070).f,m=n(863),y=n(3111).trim,_="Number",b=i[_],w=b.prototype,x=i.TypeError,S=o("".slice),E=o("".charCodeAt),C=function(t){var e,n,r,i,o,s,a,l,c=p(t,"number");if(h(c))throw x("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),43===(e=E(c,0))||45===e){if(88===(n=E(c,2))||120===n)return NaN}else if(48===e){switch(E(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(s=(o=S(c,2)).length,a=0;a<s;a++)if((l=E(o,a))<48||l>i)return NaN;return parseInt(o,r)}return+c};if(s(_,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var T,O=function(t){var e=arguments.length<1?0:b(function(t){var e=p(t,"number");return"bigint"==typeof e?e:C(e)}(t)),n=this;return u(w,n)&&f((function(){m(n)}))?c(Object(e),n,O):e},k=r?d(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),M=0;k.length>M;M++)l(b,T=k[M])&&!l(O,T)&&v(O,T,g(b,T));O.prototype=w,w.constructor=O,a(i,_,O,{constructor:!0})}},6977:(t,e,n)=>{"use strict";var r=n(2109),i=n(1702),o=n(9303),s=n(863),a=n(8415),l=n(7293),c=RangeError,u=String,h=Math.floor,p=i(a),f=i("".slice),d=i(1..toFixed),g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)},v=function(t,e,n){for(var r=-1,i=n;++r<6;)i+=e*t[r],t[r]=i%1e7,i=h(i/1e7)},m=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=h(r/e),r=r%e*1e7},y=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=u(t[e]);n=""===n?r:n+p("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:l((function(){return"0.000"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!l((function(){d({})}))},{toFixed:function(t){var e,n,r,i,a=s(this),l=o(t),h=[0,0,0,0,0,0],d="",_="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return u(a);if(a<0&&(d="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*g(2,69,1))-69)<0?a*g(2,-e,1):a/g(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(h,0,n),r=l;r>=7;)v(h,1e7,0),r-=7;for(v(h,g(10,r,1),0),r=e-1;r>=23;)m(h,1<<23),r-=23;m(h,1<<r),v(h,1,1),m(h,2),_=y(h)}else v(h,0,n),v(h,1<<-e,0),_=y(h)+p("0",l);return _=l>0?d+((i=_.length)<=l?"0."+p("0",l-i)+_:f(_,0,i-l)+"."+f(_,i-l)):d+_}})},5003:(t,e,n)=>{var r=n(2109),i=n(7293),o=n(5656),s=n(1236).f,a=n(9781),l=i((function(){s(1)}));r({target:"Object",stat:!0,forced:!a||l,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},9660:(t,e,n)=>{var r=n(2109),i=n(6293),o=n(7293),s=n(5181),a=n(7908);r({target:"Object",stat:!0,forced:!i||o((function(){s.f(1)}))},{getOwnPropertySymbols:function(t){var e=s.f;return e?e(a(t)):[]}})},489:(t,e,n)=>{var r=n(2109),i=n(7293),o=n(7908),s=n(9518),a=n(8544);r({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},7941:(t,e,n)=>{var r=n(2109),i=n(7908),o=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,n)=>{var r=n(1694),i=n(8052),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},821:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),s=n(8523),a=n(2534),l=n(408);r({target:"Promise",stat:!0,forced:n(612)},{all:function(t){var e=this,n=s.f(e),r=n.resolve,c=n.reject,u=a((function(){var n=o(e.resolve),s=[],a=0,u=1;l(t,(function(t){var o=a++,l=!1;u++,i(n,e,t).then((function(t){l||(l=!0,s[o]=t,--u||r(s))}),c)})),--u||r(s)}));return u.error&&c(u.value),n.promise}})},4164:(t,e,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(3702).CONSTRUCTOR,s=n(2492),a=n(5005),l=n(614),c=n(8052),u=s&&s.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&l(s)){var h=a("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},3401:(t,e,n)=>{"use strict";var r,i,o,s=n(2109),a=n(1913),l=n(5268),c=n(7854),u=n(6916),h=n(8052),p=n(7674),f=n(8003),d=n(6340),g=n(9662),v=n(614),m=n(111),y=n(5787),_=n(6707),b=n(261).set,w=n(5948),x=n(842),S=n(2534),E=n(8572),C=n(9909),T=n(2492),O=n(3702),k=n(8523),M="Promise",P=O.CONSTRUCTOR,L=O.REJECTION_EVENT,I=O.SUBCLASSING,A=C.getterFor(M),R=C.set,D=T&&T.prototype,j=T,F=D,N=c.TypeError,B=c.document,z=c.process,G=k.f,X=G,U=!!(B&&B.createEvent&&c.dispatchEvent),H="unhandledrejection",q=function(t){var e;return!(!m(t)||!v(e=t.then))&&e},Z=function(t,e){var n,r,i,o=e.value,s=1==e.state,a=s?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&$(e),e.rejection=1),!0===a?n=o:(h&&h.enter(),n=a(o),h&&(h.exit(),i=!0)),n===t.promise?c(N("Promise-chain cycle")):(r=q(n))?u(r,n,l,c):l(n)):c(o)}catch(t){h&&!i&&h.exit(),c(t)}},W=function(t,e){t.notified||(t.notified=!0,w((function(){for(var n,r=t.reactions;n=r.get();)Z(n,t);t.notified=!1,e&&!t.rejection&&Y(t)})))},V=function(t,e,n){var r,i;U?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!L&&(i=c["on"+t])?i(r):t===H&&x("Unhandled promise rejection",n)},Y=function(t){u(b,c,(function(){var e,n=t.facade,r=t.value;if(K(t)&&(e=S((function(){l?z.emit("unhandledRejection",r,n):V(H,n,r)})),t.rejection=l||K(t)?2:1,e.error))throw e.value}))},K=function(t){return 1!==t.rejection&&!t.parent},$=function(t){u(b,c,(function(){var e=t.facade;l?z.emit("rejectionHandled",e):V("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,W(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw N("Promise can't be resolved itself");var r=q(e);r?w((function(){var n={done:!1};try{u(r,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,W(t,!1))}catch(e){Q({done:!1},e,t)}}};if(P&&(F=(j=function(t){y(this,F),g(t),u(r,this);var e=A(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(r=function(t){R(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=h(F,"then",(function(t,e){var n=A(this),r=G(_(this,j));return n.parent=!0,r.ok=!v(t)||t,r.fail=v(e)&&e,r.domain=l?z.domain:void 0,0==n.state?n.reactions.add(r):w((function(){Z(r,n)})),r.promise})),i=function(){var t=new r,e=A(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},k.f=G=function(t){return t===j||undefined===t?new i(t):X(t)},!a&&v(T)&&D!==Object.prototype)){o=D.then,I||h(D,"then",(function(t,e){var n=this;return new j((function(t,e){u(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}p&&p(D,F)}s({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:j}),f(j,M,!1,!0),d(M)},8674:(t,e,n)=>{n(3401),n(821),n(4164),n(6027),n(683),n(6294)},6027:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(9662),s=n(8523),a=n(2534),l=n(408);r({target:"Promise",stat:!0,forced:n(612)},{race:function(t){var e=this,n=s.f(e),r=n.reject,c=a((function(){var s=o(e.resolve);l(t,(function(t){i(s,e,t).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},683:(t,e,n)=>{"use strict";var r=n(2109),i=n(6916),o=n(8523);r({target:"Promise",stat:!0,forced:n(3702).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},6294:(t,e,n)=>{"use strict";var r=n(2109),i=n(5005),o=n(1913),s=n(2492),a=n(3702).CONSTRUCTOR,l=n(9478),c=i("Promise"),u=o&&!a;r({target:"Promise",stat:!0,forced:o||a},{resolve:function(t){return l(u&&this===c?s:this,t)}})},2419:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(2104),s=n(7065),a=n(9483),l=n(9670),c=n(111),u=n(30),h=n(7293),p=i("Reflect","construct"),f=Object.prototype,d=[].push,g=h((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!h((function(){p((function(){}))})),m=g||v;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){a(t),l(e);var n=arguments.length<3?t:a(arguments[2]);if(v&&!g)return p(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return o(d,r,e),new(o(s,t,r))}var i=n.prototype,h=u(c(i)?i:f),m=o(t,h,e);return c(m)?m:h}})},4819:(t,e,n)=>{var r=n(2109),i=n(6916),o=n(111),s=n(9670),a=n(5032),l=n(1236),c=n(9518);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,u,h=arguments.length<3?e:arguments[2];return s(e)===h?e[n]:(r=l.f(e,n))?a(r)?r.value:void 0===r.get?void 0:i(r.get,h):o(u=c(e))?t(u,n,h):void 0}})},4603:(t,e,n)=>{var r=n(9781),i=n(7854),o=n(1702),s=n(4705),a=n(9587),l=n(8880),c=n(8006).f,u=n(7976),h=n(7850),p=n(1340),f=n(4706),d=n(2999),g=n(2626),v=n(8052),m=n(7293),y=n(2597),_=n(9909).enforce,b=n(6340),w=n(5112),x=n(9441),S=n(7168),E=w("match"),C=i.RegExp,T=C.prototype,O=i.SyntaxError,k=o(T.exec),M=o("".charAt),P=o("".replace),L=o("".indexOf),I=o("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,D=/a/g,j=new C(R)!==R,F=d.MISSED_STICKY,N=d.UNSUPPORTED_Y,B=r&&(!j||F||x||S||m((function(){return D[E]=!1,C(R)!=R||C(D)==D||"/a/i"!=C(R,"i")})));if(s("RegExp",B)){for(var z=function(t,e){var n,r,i,o,s,c,d=u(T,this),g=h(t),v=void 0===e,m=[],b=t;if(!d&&g&&v&&t.constructor===z)return t;if((g||u(T,t))&&(t=t.source,v&&(e=f(b))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),b=t,x&&"dotAll"in R&&(r=!!e&&L(e,"s")>-1)&&(e=P(e,/s/g,"")),n=e,F&&"sticky"in R&&(i=!!e&&L(e,"y")>-1)&&N&&(e=P(e,/y/g,"")),S&&(o=function(t){for(var e,n=t.length,r=0,i="",o=[],s={},a=!1,l=!1,c=0,u="";r<=n;r++){if("\\"===(e=M(t,r)))e+=M(t,++r);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:k(A,I(t,r+1))&&(r+=2,l=!0),i+=e,c++;continue;case">"===e&&l:if(""===u||y(s,u))throw new O("Invalid capture group name");s[u]=!0,o[o.length]=[u,c],l=!1,u="";continue}l?u+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),s=a(C(t,e),d?this:T,z),(r||i||m.length)&&(c=_(s),r&&(c.dotAll=!0,c.raw=z(function(t){for(var e,n=t.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(e=M(t,r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+M(t,++r);return i}(t),n)),i&&(c.sticky=!0),m.length&&(c.groups=m)),t!==b)try{l(s,"source",""===b?"(?:)":b)}catch(t){}return s},G=c(C),X=0;G.length>X;)g(z,C,G[X++]);T.constructor=z,z.prototype=T,v(i,"RegExp",z,{constructor:!0})}b("RegExp")},4916:(t,e,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(t,e,n)=>{"use strict";var r=n(6530).PROPER,i=n(8052),o=n(9670),s=n(1340),a=n(7293),l=n(4706),c="toString",u=RegExp.prototype[c],h=a((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),p=r&&u.name!=c;(h||p)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+s(t.source)+"/"+s(l(t))}),{unsafe:!0})},8783:(t,e,n)=>{"use strict";var r=n(8710).charAt,i=n(1340),o=n(9909),s=n(1656),a=n(6178),l="String Iterator",c=o.set,u=o.getterFor(l);s(String,"String",(function(t){c(this,{type:l,string:i(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?a(void 0,!0):(t=r(n,i),e.index+=t.length,a(t,!1))}))},4723:(t,e,n)=>{"use strict";var r=n(6916),i=n(7007),o=n(9670),s=n(8554),a=n(7466),l=n(1340),c=n(4488),u=n(8173),h=n(1530),p=n(7651);i("match",(function(t,e,n){return[function(e){var n=c(this),i=s(e)?void 0:u(e,t);return i?r(i,e,n):new RegExp(e)[t](l(n))},function(t){var r=o(this),i=l(t),s=n(e,r,i);if(s.done)return s.value;if(!r.global)return p(r,i);var c=r.unicode;r.lastIndex=0;for(var u,f=[],d=0;null!==(u=p(r,i));){var g=l(u[0]);f[d]=g,""===g&&(r.lastIndex=h(i,a(r.lastIndex),c)),d++}return 0===d?null:f}]}))},2481:(t,e,n)=>{n(2109)({target:"String",proto:!0},{repeat:n(8415)})},5306:(t,e,n)=>{"use strict";var r=n(2104),i=n(6916),o=n(1702),s=n(7007),a=n(7293),l=n(9670),c=n(614),u=n(8554),h=n(9303),p=n(7466),f=n(1340),d=n(4488),g=n(1530),v=n(8173),m=n(647),y=n(7651),_=n(5112)("replace"),b=Math.max,w=Math.min,x=o([].concat),S=o([].push),E=o("".indexOf),C=o("".slice),T="$0"==="a".replace(/./,"$0"),O=!!/./[_]&&""===/./[_]("a","$0");s("replace",(function(t,e,n){var o=O?"$":"$0";return[function(t,n){var r=d(this),o=u(t)?void 0:v(t,_);return o?i(o,t,r,n):i(e,f(r),t,n)},function(t,i){var s=l(this),a=f(t);if("string"==typeof i&&-1===E(i,o)&&-1===E(i,"$<")){var u=n(e,s,a,i);if(u.done)return u.value}var d=c(i);d||(i=f(i));var v=s.global;if(v){var _=s.unicode;s.lastIndex=0}for(var T=[];;){var O=y(s,a);if(null===O)break;if(S(T,O),!v)break;""===f(O[0])&&(s.lastIndex=g(a,p(s.lastIndex),_))}for(var k,M="",P=0,L=0;L<T.length;L++){for(var I=f((O=T[L])[0]),A=b(w(h(O.index),a.length),0),R=[],D=1;D<O.length;D++)S(R,void 0===(k=O[D])?k:String(k));var j=O.groups;if(d){var F=x([I],R,A,a);void 0!==j&&S(F,j);var N=f(r(i,void 0,F))}else N=m(I,a,A,R,j,i);A>=P&&(M+=C(a,P,A)+N,P=A+I.length)}return M+C(a,P)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!T||O)},4765:(t,e,n)=>{"use strict";var r=n(6916),i=n(7007),o=n(9670),s=n(8554),a=n(4488),l=n(1150),c=n(1340),u=n(8173),h=n(7651);i("search",(function(t,e,n){return[function(e){var n=a(this),i=s(e)?void 0:u(e,t);return i?r(i,e,n):new RegExp(e)[t](c(n))},function(t){var r=o(this),i=c(t),s=n(e,r,i);if(s.done)return s.value;var a=r.lastIndex;l(a,0)||(r.lastIndex=0);var u=h(r,i);return l(r.lastIndex,a)||(r.lastIndex=a),null===u?-1:u.index}]}))},3210:(t,e,n)=>{"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},2443:(t,e,n)=>{n(6800)("asyncIterator")},4032:(t,e,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(6916),s=n(1702),a=n(1913),l=n(9781),c=n(6293),u=n(7293),h=n(2597),p=n(7976),f=n(9670),d=n(5656),g=n(4948),v=n(1340),m=n(9114),y=n(30),_=n(1956),b=n(8006),w=n(1156),x=n(5181),S=n(1236),E=n(3070),C=n(6048),T=n(5296),O=n(8052),k=n(2309),M=n(6200),P=n(3501),L=n(9711),I=n(5112),A=n(6061),R=n(6800),D=n(6532),j=n(8003),F=n(9909),N=n(2092).forEach,B=M("hidden"),z="Symbol",G="prototype",X=F.set,U=F.getterFor(z),H=Object[G],q=i.Symbol,Z=q&&q[G],W=i.TypeError,V=i.QObject,Y=S.f,K=E.f,$=w.f,J=T.f,Q=s([].push),tt=k("symbols"),et=k("op-symbols"),nt=k("wks"),rt=!V||!V[G]||!V[G].findChild,it=l&&u((function(){return 7!=y(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Y(H,e);r&&delete H[e],K(t,e,n),r&&t!==H&&K(H,e,r)}:K,ot=function(t,e){var n=tt[t]=y(Z);return X(n,{type:z,tag:t,description:e}),l||(n.description=e),n},st=function(t,e,n){t===H&&st(et,e,n),f(t);var r=g(e);return f(n),h(tt,r)?(n.enumerable?(h(t,B)&&t[B][r]&&(t[B][r]=!1),n=y(n,{enumerable:m(0,!1)})):(h(t,B)||K(t,B,m(1,{})),t[B][r]=!0),it(t,r,n)):K(t,r,n)},at=function(t,e){f(t);var n=d(e),r=_(n).concat(ht(n));return N(r,(function(e){l&&!o(lt,n,e)||st(t,e,n[e])})),t},lt=function(t){var e=g(t),n=o(J,this,e);return!(this===H&&h(tt,e)&&!h(et,e))&&(!(n||!h(this,e)||!h(tt,e)||h(this,B)&&this[B][e])||n)},ct=function(t,e){var n=d(t),r=g(e);if(n!==H||!h(tt,r)||h(et,r)){var i=Y(n,r);return!i||!h(tt,r)||h(n,B)&&n[B][r]||(i.enumerable=!0),i}},ut=function(t){var e=$(d(t)),n=[];return N(e,(function(t){h(tt,t)||h(P,t)||Q(n,t)})),n},ht=function(t){var e=t===H,n=$(e?et:d(t)),r=[];return N(n,(function(t){!h(tt,t)||e&&!h(H,t)||Q(r,tt[t])})),r};c||(O(Z=(q=function(){if(p(Z,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=L(t),n=function(t){this===H&&o(n,et,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),it(this,e,m(1,t))};return l&&rt&&it(H,e,{configurable:!0,set:n}),ot(e,t)})[G],"toString",(function(){return U(this).tag})),O(q,"withoutSetter",(function(t){return ot(L(t),t)})),T.f=lt,E.f=st,C.f=at,S.f=ct,b.f=w.f=ut,x.f=ht,A.f=function(t){return ot(I(t),t)},l&&(K(Z,"description",{configurable:!0,get:function(){return U(this).description}}),a||O(H,"propertyIsEnumerable",lt,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:q}),N(_(nt),(function(t){R(t)})),r({target:z,stat:!0,forced:!c},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?y(t):at(y(t),e)},defineProperty:st,defineProperties:at,getOwnPropertyDescriptor:ct}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ut}),D(),j(q,z),P[B]=!0},1817:(t,e,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),s=n(1702),a=n(2597),l=n(614),c=n(7976),u=n(1340),h=n(3070).f,p=n(9920),f=o.Symbol,d=f&&f.prototype;if(i&&l(f)&&(!("description"in d)||void 0!==f().description)){var g={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(d,this)?new f(t):void 0===t?f():f(t);return""===t&&(g[e]=!0),e};p(v,f),v.prototype=d,d.constructor=v;var m="Symbol(test)"==String(f("test")),y=s(d.valueOf),_=s(d.toString),b=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),x=s("".slice);h(d,"description",{configurable:!0,get:function(){var t=y(this);if(a(g,t))return"";var e=_(t),n=m?x(e,7,-1):w(e,b,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:v})}},763:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(2597),s=n(1340),a=n(2309),l=n(2015),c=a("string-to-symbol-registry"),u=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=s(t);if(o(c,e))return c[e];var n=i("Symbol")(e);return c[e]=n,u[n]=e,n}})},2165:(t,e,n)=>{n(6800)("iterator")},2526:(t,e,n)=>{n(4032),n(763),n(6620),n(8862),n(9660)},6620:(t,e,n)=>{var r=n(2109),i=n(2597),o=n(2190),s=n(6330),a=n(2309),l=n(2015),c=a("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!o(t))throw TypeError(s(t)+" is not a symbol");if(i(c,t))return c[t]}})},6649:(t,e,n)=>{var r=n(6800),i=n(6532);r("toPrimitive"),i()},3680:(t,e,n)=>{var r=n(5005),i=n(6800),o=n(8003);i("toStringTag"),o(r("Symbol"),"Symbol")},4747:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),s=n(8533),a=n(8880),l=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in i)i[c]&&l(r[c]&&r[c].prototype);l(o)},3948:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),s=n(6992),a=n(8880),l=n(5112),c=l("iterator"),u=l("toStringTag"),h=s.values,p=function(t,e){if(t){if(t[c]!==h)try{a(t,c,h)}catch(e){t[c]=h}if(t[u]||a(t,u,e),i[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var f in i)p(r[f]&&r[f].prototype,f);p(o,"DOMTokenList")},5556:(t,e,n)=>{"use strict";n(6992);var r=n(2109),i=n(7854),o=n(6916),s=n(1702),a=n(9781),l=n(5143),c=n(8052),u=n(9190),h=n(8003),p=n(3061),f=n(9909),d=n(5787),g=n(614),v=n(2597),m=n(9974),y=n(648),_=n(9670),b=n(111),w=n(1340),x=n(30),S=n(9114),E=n(4121),C=n(1246),T=n(8053),O=n(5112),k=n(4362),M=O("iterator"),P="URLSearchParams",L=P+"Iterator",I=f.set,A=f.getterFor(P),R=f.getterFor(L),D=Object.getOwnPropertyDescriptor,j=function(t){if(!a)return i[t];var e=D(i,t);return e&&e.value},F=j("fetch"),N=j("Request"),B=j("Headers"),z=N&&N.prototype,G=B&&B.prototype,X=i.RegExp,U=i.TypeError,H=i.decodeURIComponent,q=i.encodeURIComponent,Z=s("".charAt),W=s([].join),V=s([].push),Y=s("".replace),K=s([].shift),$=s([].splice),J=s("".split),Q=s("".slice),tt=/\+/g,et=Array(4),nt=function(t){return et[t-1]||(et[t-1]=X("((?:%[\\da-f]{2}){"+t+"})","gi"))},rt=function(t){try{return H(t)}catch(e){return t}},it=function(t){var e=Y(t,tt," "),n=4;try{return H(e)}catch(t){for(;n;)e=Y(e,nt(n--),rt);return e}},ot=/[!'()~]|%20/g,st={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},at=function(t){return st[t]},lt=function(t){return Y(q(t),ot,at)},ct=p((function(t,e){I(this,{type:L,iterator:E(A(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),ut=function(t){this.entries=[],this.url=null,void 0!==t&&(b(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Z(t,0)?Q(t,1):t:w(t)))};ut.prototype={type:P,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,s,a,l,c=C(t);if(c)for(n=(e=E(t,c)).next;!(r=o(n,e)).done;){if(s=(i=E(_(r.value))).next,(a=o(s,i)).done||(l=o(s,i)).done||!o(s,i).done)throw U("Expected sequence with length 2");V(this.entries,{key:w(a.value),value:w(l.value)})}else for(var u in t)v(t,u)&&V(this.entries,{key:u,value:w(t[u])})},parseQuery:function(t){if(t)for(var e,n,r=J(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=J(e,"="),V(this.entries,{key:it(K(n)),value:it(W(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],V(n,lt(t.key)+"="+lt(t.value));return W(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ht=function(){d(this,pt),I(this,new ut(arguments.length>0?arguments[0]:void 0))},pt=ht.prototype;if(u(pt,{append:function(t,e){T(arguments.length,2);var n=A(this);V(n.entries,{key:w(t),value:w(e)}),n.updateURL()},delete:function(t){T(arguments.length,1);for(var e=A(this),n=e.entries,r=w(t),i=0;i<n.length;)n[i].key===r?$(n,i,1):i++;e.updateURL()},get:function(t){T(arguments.length,1);for(var e=A(this).entries,n=w(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){T(arguments.length,1);for(var e=A(this).entries,n=w(t),r=[],i=0;i<e.length;i++)e[i].key===n&&V(r,e[i].value);return r},has:function(t){T(arguments.length,1);for(var e=A(this).entries,n=w(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){T(arguments.length,1);for(var n,r=A(this),i=r.entries,o=!1,s=w(t),a=w(e),l=0;l<i.length;l++)(n=i[l]).key===s&&(o?$(i,l--,1):(o=!0,n.value=a));o||V(i,{key:s,value:a}),r.updateURL()},sort:function(){var t=A(this);k(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=A(this).entries,r=m(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new ct(this,"keys")},values:function(){return new ct(this,"values")},entries:function(){return new ct(this,"entries")}},{enumerable:!0}),c(pt,M,pt.entries,{name:"entries"}),c(pt,"toString",(function(){return A(this).serialize()}),{enumerable:!0}),h(ht,P),r({global:!0,constructor:!0,forced:!l},{URLSearchParams:ht}),!l&&g(B)){var ft=s(G.has),dt=s(G.set),gt=function(t){if(b(t)){var e,n=t.body;if(y(n)===P)return e=t.headers?new B(t.headers):new B,ft(e,"content-type")||dt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),x(t,{body:S(0,w(n)),headers:S(0,e)})}return t};if(g(F)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?gt(arguments[1]):{})}}),g(N)){var vt=function(t){return d(this,z),new N(t,arguments.length>1?gt(arguments[1]):{})};z.constructor=vt,vt.prototype=z,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vt})}}t.exports={URLSearchParams:ht,getState:A}},1637:(t,e,n)=>{n(5556)},8789:(t,e,n)=>{"use strict";n(8783);var r,i=n(2109),o=n(9781),s=n(5143),a=n(7854),l=n(9974),c=n(1702),u=n(8052),h=n(7045),p=n(5787),f=n(2597),d=n(1574),g=n(8457),v=n(1589),m=n(8710).codeAt,y=n(3197),_=n(1340),b=n(8003),w=n(8053),x=n(5556),S=n(9909),E=S.set,C=S.getterFor("URL"),T=x.URLSearchParams,O=x.getState,k=a.URL,M=a.TypeError,P=a.parseInt,L=Math.floor,I=Math.pow,A=c("".charAt),R=c(/./.exec),D=c([].join),j=c(1..toString),F=c([].pop),N=c([].push),B=c("".replace),z=c([].shift),G=c("".split),X=c("".slice),U=c("".toLowerCase),H=c([].unshift),q="Invalid scheme",Z="Invalid host",W="Invalid port",V=/[a-z]/i,Y=/[\d+-.a-z]/i,K=/\d/,$=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,it=/[\t\n\r]/g,ot=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)H(e,t%256),t=L(t/256);return D(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=j(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},st={},at=d({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),lt=d({},at,{"#":1,"?":1,"{":1,"}":1}),ct=d({},lt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(t,e){var n=m(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},ht={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pt=function(t,e){var n;return 2==t.length&&R(V,A(t,0))&&(":"==(n=A(t,1))||!e&&"|"==n)},ft=function(t){var e;return t.length>1&&pt(X(t,0,2))&&(2==t.length||"/"===(e=A(t,2))||"\\"===e||"?"===e||"#"===e)},dt=function(t){return"."===t||"%2e"===U(t)},gt={},vt={},mt={},yt={},_t={},bt={},wt={},xt={},St={},Et={},Ct={},Tt={},Ot={},kt={},Mt={},Pt={},Lt={},It={},At={},Rt={},Dt={},jt=function(t,e,n){var r,i,o,s=_(t);if(e){if(i=this.parse(s))throw M(i);this.searchParams=null}else{if(void 0!==n&&(r=new jt(n,!0)),i=this.parse(s,null,r))throw M(i);(o=O(new T)).bindURL(this),this.searchParams=o}};jt.prototype={type:"URL",parse:function(t,e,n){var i,o,s,a,l,c=this,u=e||gt,h=0,p="",d=!1,m=!1,y=!1;for(t=_(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=B(t,rt,"")),t=B(t,it,""),i=g(t);h<=i.length;){switch(o=i[h],u){case gt:if(!o||!R(V,o)){if(e)return q;u=mt;continue}p+=U(o),u=vt;break;case vt:if(o&&(R(Y,o)||"+"==o||"-"==o||"."==o))p+=U(o);else{if(":"!=o){if(e)return q;p="",u=mt,h=0;continue}if(e&&(c.isSpecial()!=f(ht,p)||"file"==p&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=p,e)return void(c.isSpecial()&&ht[c.scheme]==c.port&&(c.port=null));p="","file"==c.scheme?u=kt:c.isSpecial()&&n&&n.scheme==c.scheme?u=yt:c.isSpecial()?u=xt:"/"==i[h+1]?(u=_t,h++):(c.cannotBeABaseURL=!0,N(c.path,""),u=At)}break;case mt:if(!n||n.cannotBeABaseURL&&"#"!=o)return q;if(n.cannotBeABaseURL&&"#"==o){c.scheme=n.scheme,c.path=v(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Dt;break}u="file"==n.scheme?kt:bt;continue;case yt:if("/"!=o||"/"!=i[h+1]){u=bt;continue}u=St,h++;break;case _t:if("/"==o){u=Et;break}u=It;continue;case bt:if(c.scheme=n.scheme,o==r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query;else if("/"==o||"\\"==o&&c.isSpecial())u=wt;else if("?"==o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query="",u=Rt;else{if("#"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.path.length--,u=It;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query,c.fragment="",u=Dt}break;case wt:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=It;continue}u=Et}else u=St;break;case xt:if(u=St,"/"!=o||"/"!=A(p,h+1))continue;h++;break;case St:if("/"!=o&&"\\"!=o){u=Et;continue}break;case Et:if("@"==o){d&&(p="%40"+p),d=!0,s=g(p);for(var b=0;b<s.length;b++){var w=s[b];if(":"!=w||y){var x=ut(w,ct);y?c.password+=x:c.username+=x}else y=!0}p=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(d&&""==p)return"Invalid authority";h-=g(p).length+1,p="",u=Ct}else p+=o;break;case Ct:case Tt:if(e&&"file"==c.scheme){u=Pt;continue}if(":"!=o||m){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==p)return Z;if(e&&""==p&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(p))return a;if(p="",u=Lt,e)return;continue}"["==o?m=!0:"]"==o&&(m=!1),p+=o}else{if(""==p)return Z;if(a=c.parseHost(p))return a;if(p="",u=Ot,e==Tt)return}break;case Ot:if(!R(K,o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||e){if(""!=p){var S=P(p,10);if(S>65535)return W;c.port=c.isSpecial()&&S===ht[c.scheme]?null:S,p=""}if(e)return;u=Lt;continue}return W}p+=o;break;case kt:if(c.scheme="file","/"==o||"\\"==o)u=Mt;else{if(!n||"file"!=n.scheme){u=It;continue}if(o==r)c.host=n.host,c.path=v(n.path),c.query=n.query;else if("?"==o)c.host=n.host,c.path=v(n.path),c.query="",u=Rt;else{if("#"!=o){ft(D(v(i,h),""))||(c.host=n.host,c.path=v(n.path),c.shortenPath()),u=It;continue}c.host=n.host,c.path=v(n.path),c.query=n.query,c.fragment="",u=Dt}}break;case Mt:if("/"==o||"\\"==o){u=Pt;break}n&&"file"==n.scheme&&!ft(D(v(i,h),""))&&(pt(n.path[0],!0)?N(c.path,n.path[0]):c.host=n.host),u=It;continue;case Pt:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!e&&pt(p))u=It;else if(""==p){if(c.host="",e)return;u=Lt}else{if(a=c.parseHost(p))return a;if("localhost"==c.host&&(c.host=""),e)return;p="",u=Lt}continue}p+=o;break;case Lt:if(c.isSpecial()){if(u=It,"/"!=o&&"\\"!=o)continue}else if(e||"?"!=o)if(e||"#"!=o){if(o!=r&&(u=It,"/"!=o))continue}else c.fragment="",u=Dt;else c.query="",u=Rt;break;case It:if(o==r||"/"==o||"\\"==o&&c.isSpecial()||!e&&("?"==o||"#"==o)){if(".."===(l=U(l=p))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||N(c.path,"")):dt(p)?"/"==o||"\\"==o&&c.isSpecial()||N(c.path,""):("file"==c.scheme&&!c.path.length&&pt(p)&&(c.host&&(c.host=""),p=A(p,0)+":"),N(c.path,p)),p="","file"==c.scheme&&(o==r||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)z(c.path);"?"==o?(c.query="",u=Rt):"#"==o&&(c.fragment="",u=Dt)}else p+=ut(o,lt);break;case At:"?"==o?(c.query="",u=Rt):"#"==o?(c.fragment="",u=Dt):o!=r&&(c.path[0]+=ut(o,st));break;case Rt:e||"#"!=o?o!=r&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":ut(o,st)):(c.fragment="",u=Dt);break;case Dt:o!=r&&(c.fragment+=ut(o,at))}h++}},parseHost:function(t){var e,n,r;if("["==A(t,0)){if("]"!=A(t,t.length-1))return Z;if(e=function(t){var e,n,r,i,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,p=function(){return A(t,h)};if(":"==p()){if(":"!=A(t,1))return;h+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(e=n=0;n<4&&R(tt,p());)e=16*e+P(p(),16),h++,n++;if("."==p()){if(0==n)return;if(h-=n,c>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;h++}if(!R(K,p()))return;for(;R(K,p());){if(o=P(p(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}l[c]=256*l[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==p()){if(h++,!p())return}else if(p())return;l[c++]=e}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(s=c-u,c=7;0!=c&&s>0;)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a;else if(8!=c)return;return l}(X(t,1,-1)),!e)return Z;this.host=e}else if(this.isSpecial()){if(t=y(t),R(et,t))return Z;if(e=function(t){var e,n,r,i,o,s,a,l=G(t,".");if(l.length&&""==l[l.length-1]&&l.length--,(e=l.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=l[r]))return t;if(o=10,i.length>1&&"0"==A(i,0)&&(o=R($,i)?16:8,i=X(i,8==o?1:2)),""===i)s=0;else{if(!R(10==o?Q:8==o?J:tt,i))return t;s=P(i,o)}N(n,s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=I(256,5-e))return null}else if(s>255)return null;for(a=F(n),r=0;r<n.length;r++)a+=n[r]*I(256,3-r);return a}(t),null===e)return Z;this.host=e}else{if(R(nt,t))return Z;for(e="",n=g(t),r=0;r<n.length;r++)e+=ut(n[r],st);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(ht,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&pt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==i?(c+="//",t.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=ot(i),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+D(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(t){var e=this.parse(t);if(e)throw M(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Ft(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ot(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(_(t)+":",gt)},getUsername:function(){return this.username},setUsername:function(t){var e=g(_(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=ut(e[n],ct)}},getPassword:function(){return this.password},setPassword:function(t){var e=g(_(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=ut(e[n],ct)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ot(t):ot(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Ct)},getHostname:function(){var t=this.host;return null===t?"":ot(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Tt)},getPort:function(){var t=this.port;return null===t?"":_(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=_(t))?this.port=null:this.parse(t,Ot))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+D(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Lt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=_(t))?this.query=null:("?"==A(t,0)&&(t=X(t,1)),this.query="",this.parse(t,Rt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=_(t))?("#"==A(t,0)&&(t=X(t,1)),this.fragment="",this.parse(t,Dt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ft=function(t){var e=p(this,Nt),n=w(arguments.length,1)>1?arguments[1]:void 0,r=E(e,new jt(t,!1,n));o||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Nt=Ft.prototype,Bt=function(t,e){return{get:function(){return C(this)[t]()},set:e&&function(t){return C(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(Nt,"href",Bt("serialize","setHref")),h(Nt,"origin",Bt("getOrigin")),h(Nt,"protocol",Bt("getProtocol","setProtocol")),h(Nt,"username",Bt("getUsername","setUsername")),h(Nt,"password",Bt("getPassword","setPassword")),h(Nt,"host",Bt("getHost","setHost")),h(Nt,"hostname",Bt("getHostname","setHostname")),h(Nt,"port",Bt("getPort","setPort")),h(Nt,"pathname",Bt("getPathname","setPathname")),h(Nt,"search",Bt("getSearch","setSearch")),h(Nt,"searchParams",Bt("getSearchParams")),h(Nt,"hash",Bt("getHash","setHash"))),u(Nt,"toJSON",(function(){return C(this).serialize()}),{enumerable:!0}),u(Nt,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),k){var zt=k.createObjectURL,Gt=k.revokeObjectURL;zt&&u(Ft,"createObjectURL",l(zt,k)),Gt&&u(Ft,"revokeObjectURL",l(Gt,k))}b(Ft,"URL"),i({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ft})},285:(t,e,n)=>{n(8789)},1787:(t,e,n)=>{var r=n(4056),i=n(9500),o=n(9181),s=n(5432).Z,a=o.featureEach,l=(o.coordEach,i.polygon,i.featureCollection);function c(t){var e=new r(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),r.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})),r.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),r.prototype.remove.call(this,t,e)},e.clear=function(){return r.prototype.clear.call(this)},e.search=function(t){var e=r.prototype.search.call(this,this.toBBox(t));return l(e)},e.collides=function(t){return r.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=r.prototype.all.call(this);return l(t)},e.toJSON=function(){return r.prototype.toJSON.call(this)},e.fromJSON=function(t){return r.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=c,t.exports.default=c},9500:(t,e)=>{"use strict";function n(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function r(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function i(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:t},e,r)}function o(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:t},e,r)}function s(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function a(t,e,r){return void 0===r&&(r={}),n({type:"MultiLineString",coordinates:t},e,r)}function l(t,e,r){return void 0===r&&(r={}),n({type:"MultiPoint",coordinates:t},e,r)}function c(t,e,r){return void 0===r&&(r={}),n({type:"MultiPolygon",coordinates:t},e,r)}function u(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function h(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function p(t){return 180*(t%(2*Math.PI))/Math.PI}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=n,e.geometry=function(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return r(e).geometry;case"LineString":return o(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return l(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return c(e).geometry;default:throw new Error(t+" is invalid")}},e.point=r,e.points=function(t,e,n){return void 0===n&&(n={}),s(t.map((function(t){return r(t,e)})),n)},e.polygon=i,e.polygons=function(t,e,n){return void 0===n&&(n={}),s(t.map((function(t){return i(t,e)})),n)},e.lineString=o,e.lineStrings=function(t,e,n){return void 0===n&&(n={}),s(t.map((function(t){return o(t,e)})),n)},e.featureCollection=s,e.multiLineString=a,e.multiPoint=l,e.multiPolygon=c,e.geometryCollection=function(t,e,r){return void 0===r&&(r={}),n({type:"GeometryCollection",geometries:t},e,r)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=u,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return p(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=p,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return u(h(t,e),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=f,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!f(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},9181:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9500);function i(t,e,n){if(null!==t)for(var r,o,s,a,l,c,u,h,p=0,f=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,m=g?t.features.length:1,y=0;y<m;y++){l=(h=!!(u=g?t.features[y].geometry:v?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var _=0;_<l;_++){var b=0,w=0;if(null!==(a=h?u.geometries[_]:u)){c=a.coordinates;var x=a.type;switch(p=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(c,f,y,b,w))return!1;f++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===e(c[r],f,y,b,w))return!1;f++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-p;o++){if(!1===e(c[r][o],f,y,b,w))return!1;f++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(w=0,o=0;o<c[r].length;o++){for(s=0;s<c[r][o].length-p;s++){if(!1===e(c[r][o][s],f,y,b,w))return!1;f++}w++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===i(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function a(t,e){var n,r,i,o,s,a,l,c,u,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,c=f?t.features[n].properties:d?t.properties:{},u=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,c,u,h))return!1;p++}}function l(t,e){a(t,(function(t,n,i,o,s){var a,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(r.feature(t,i,{bbox:o,id:s}),n,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var c=0;c<t.coordinates.length;c++){var u={type:a,coordinates:t.coordinates[c]};if(!1===e(r.feature(u,i),n,c))return!1}}))}function c(t,e){l(t,(function(t,n,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,c=0,u=0,h=0;return!1!==i(t,(function(i,a,p,f,d){if(void 0===l||n>c||f>u||d>h)return l=i,c=n,u=f,h=d,void(s=0);var g=r.lineString([l,i],t.properties);if(!1===e(g,n,o,d,s))return!1;s++,l=i}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(r.lineString(s[a],t.properties),n,i,a))return!1}}}))}e.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},e.coordEach=i,e.coordReduce=function(t,e,n,r){var o=n;return i(t,(function(t,r,i,s,a){o=0===r&&void 0===n?t:e(o,t,r,i,s,a)}),r),o},e.featureEach=s,e.featureReduce=function(t,e,n){var r=n;return s(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r},e.findPoint=function(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":l=l||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":return r.point(c,l,e);case"MultiPoint":return o<0&&(o=c.length+o),r.point(c[o],l,e);case"LineString":return a<0&&(a=c.length+a),r.point(c[a],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a),r.point(c[s][a],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),r.point(c[o][a],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a),r.point(c[o][s][a],l,e)}throw new Error("geojson is invalid")},e.findSegment=function(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":l=l||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=c.length+a-1),r.lineString([c[a],c[a+1]],l,e);case"Polygon":return s<0&&(s=c.length+s),a<0&&(a=c[s].length+a-1),r.lineString([c[s][a],c[s][a+1]],l,e);case"MultiLineString":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a-1),r.lineString([c[o][a],c[o][a+1]],l,e);case"MultiPolygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),a<0&&(a=c[o][s].length-a-1),r.lineString([c[o][s][a],c[o][s][a+1]],l,e)}throw new Error("geojson is invalid")},e.flattenEach=l,e.flattenReduce=function(t,e,n){var r=n;return l(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r},e.geomEach=a,e.geomReduce=function(t,e,n){var r=n;return a(t,(function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)})),r},e.lineEach=u,e.lineReduce=function(t,e,n){var r=n;return u(t,(function(t,i,o,s){r=0===i&&void 0===n?t:e(r,t,i,o,s)})),r},e.propEach=o,e.propReduce=function(t,e,n){var r=n;return o(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r},e.segmentEach=c,e.segmentReduce=function(t,e,n){var r=n,i=!1;return c(t,(function(t,o,s,a,l){r=!1===i&&void 0===n?t:e(r,t,o,s,a,l),i=!0})),r}},4056:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(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 i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(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 c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=i(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.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 n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<o?(o=h,i=c<i?c:i,s=l):h===o&&c<i&&(i=c,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,c,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),v=s(t,d,n,this.toBBox),m=(i=g,o=v,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),y=u(g)+u(v);m<p?(p=m,r=d,f=y<f?y:f):m===p&&y<f&&(f=y,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),c=h(o)+h(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?i(p):p),c+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},2846:t=>{t.exports=/<%=([\s\S]+?)%>/g},6816:(t,e,n)=>{t=n.nmd(t);var r=n(2846),i=n(8502),o=1/0,s=9007199254740991,a="[object Arguments]",l="[object AsyncFunction]",c="[object DOMException]",u="[object Error]",h="[object Function]",p="[object GeneratorFunction]",f="[object Null]",d="[object Object]",g="[object Proxy]",v="[object Symbol]",m="[object Undefined]",y=/\b__p \+= '';/g,_=/\b(__p \+=) '' \+/g,b=/(__e\(.*?\)|\b__t\)) \+\n'';/g,w=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,x=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,E=/($^)/,C=/['\n\r\u2028\u2029\\]/g,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object Boolean]"]=T["[object DataView]"]=T["[object Date]"]=T[u]=T[h]=T["[object Map]"]=T["[object Number]"]=T[d]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object WeakMap]"]=!1;var O={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},k="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,M="object"==typeof self&&self&&self.Object===Object&&self,P=k||M||Function("return this")(),L=e&&!e.nodeType&&e,I=L&&t&&!t.nodeType&&t,A=I&&I.exports===L,R=A&&k.process,D=function(){try{var t=I&&I.require&&I.require("util").types;return t||R&&R.binding&&R.binding("util")}catch(t){}}(),j=D&&D.isTypedArray;function F(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function N(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function B(t){return"\\"+O[t]}function z(t,e){return function(n){return t(e(n))}}var G,X=Function.prototype,U=Object.prototype,H=P["__core-js_shared__"],q=X.toString,Z=U.hasOwnProperty,W=(G=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",V=U.toString,Y=q.call(Object),K=RegExp("^"+q.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=A?P.Buffer:void 0,J=P.Symbol,Q=z(Object.getPrototypeOf,Object),tt=U.propertyIsEnumerable,et=J?J.toStringTag:void 0,nt=function(){try{var t=function(t){if(!Rt(t)||function(t){return!!W&&W in t}(t))return!1;var e=It(t)?K:x;return e.test(function(t){if(null!=t){try{return q.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}(e=function(t,e){return null==t?void 0:t[e]}(Object,"defineProperty"))?e:void 0;return t({},"",{}),t}catch(t){}var e}(),rt=$?$.isBuffer:void 0,it=z(Object.keys,Object),ot=Math.max,st=Date.now,at=J?J.prototype:void 0,lt=at?at.toString:void 0;function ct(t,e){var n=kt(t),r=!n&&Ot(t),i=!n&&!r&&Pt(t),o=!n&&!r&&!i&&jt(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=a.length;for(var c in t)!e&&!Z.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_t(c,l))||a.push(c);return a}function ut(t,e,n){var r=t[e];Z.call(t,e)&&Tt(r,n)&&(void 0!==n||e in t)||ht(t,e,n)}function ht(t,e,n){"__proto__"==e&&nt?nt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function pt(t){return null==t?void 0===t?m:f:et&&et in Object(t)?function(t){var e=Z.call(t,et),n=t[et];try{t[et]=void 0;var r=!0}catch(t){}var i=V.call(t);r&&(e?t[et]=n:delete t[et]);return i}(t):function(t){return V.call(t)}(t)}function ft(t){return Dt(t)&&pt(t)==a}function dt(t){if(!Rt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=wt(t),n=[];for(var r in t)("constructor"!=r||!e&&Z.call(t,r))&&n.push(r);return n}function gt(t,e){return Ct(function(t,e,n){return e=ot(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=ot(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),F(t,this,a)}}(t,e,Gt),t+"")}var vt=nt?function(t,e){return nt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Gt;function mt(t){if("string"==typeof t)return t;if(kt(t))return N(t,mt)+"";if(function(t){return"symbol"==typeof t||Dt(t)&&pt(t)==v}(t))return lt?lt.call(t):"";var e=t+"";return"0"==e&&1/t==-o?"-0":e}function yt(t,e,n,r){return void 0===t||Tt(t,U[n])&&!Z.call(r,n)?e:t}function _t(t,e){var n=typeof t;return!!(e=null==e?s:e)&&("number"==n||"symbol"!=n&&S.test(t))&&t>-1&&t%1==0&&t<e}function bt(t,e,n){if(!Rt(n))return!1;var r=typeof e;return!!("number"==r?Mt(n)&&_t(e,n.length):"string"==r&&e in n)&&Tt(n[e],t)}function wt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||U)}var xt,St,Et,Ct=(xt=vt,St=0,Et=0,function(){var t=st(),e=16-(t-Et);if(Et=t,e>0){if(++St>=800)return arguments[0]}else St=0;return xt.apply(void 0,arguments)});function Tt(t,e){return t===e||t!=t&&e!=e}var Ot=ft(function(){return arguments}())?ft:function(t){return Dt(t)&&Z.call(t,"callee")&&!tt.call(t,"callee")},kt=Array.isArray;function Mt(t){return null!=t&&At(t.length)&&!It(t)}var Pt=rt||function(){return!1};function Lt(t){if(!Dt(t))return!1;var e=pt(t);return e==u||e==c||"string"==typeof t.message&&"string"==typeof t.name&&!function(t){if(!Dt(t)||pt(t)!=d)return!1;var e=Q(t);if(null===e)return!0;var n=Z.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&q.call(n)==Y}(t)}function It(t){if(!Rt(t))return!1;var e=pt(t);return e==h||e==p||e==l||e==g}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}function Rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Dt(t){return null!=t&&"object"==typeof t}var jt=j?function(t){return function(e){return t(e)}}(j):function(t){return Dt(t)&&At(t.length)&&!!T[pt(t)]};var Ft,Nt=(Ft=function(t,e,n,r){!function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?ht(n,a,l):ut(n,a,l)}}(e,function(t){return Mt(t)?ct(t,!0):dt(t)}(e),t,r)},gt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Ft.length>3&&"function"==typeof i?(r--,i):void 0,o&&bt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Ft(t,s,n,i)}return t})));function Bt(t){return Mt(t)?ct(t):function(t){if(!wt(t))return it(t);var e=[];for(var n in Object(t))Z.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var zt=gt((function(t,e){try{return F(t,void 0,e)}catch(t){return Lt(t)?t:new Error(t)}}));function Gt(t){return t}t.exports=function(t,e,n){var o,s=i.imports._.templateSettings||i;n&&bt(t,e,n)&&(e=void 0),t=null==(o=t)?"":mt(o),e=Nt({},e,s,yt);var a,l,c,u=Nt({},e.imports,s.imports,yt),h=Bt(u),p=(a=u,N(h,(function(t){return a[t]}))),f=0,d=e.interpolate||E,g="__p += '",v=RegExp((e.escape||E).source+"|"+d.source+"|"+(d===r?w:E).source+"|"+(e.evaluate||E).source+"|$","g"),m=Z.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";t.replace(v,(function(e,n,r,i,o,s){return r||(r=i),g+=t.slice(f,s).replace(C,B),n&&(l=!0,g+="' +\n__e("+n+") +\n'"),o&&(c=!0,g+="';\n"+o+";\n__p += '"),r&&(g+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=s+e.length,e})),g+="';\n";var x=Z.call(e,"variable")&&e.variable;x||(g="with (obj) {\n"+g+"\n}\n"),g=(c?g.replace(y,""):g).replace(_,"$1").replace(b,"$1;"),g="function("+(x||"obj")+") {\n"+(x?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+g+"return __p\n}";var S=zt((function(){return Function(h,m+"return "+g).apply(void 0,p)}));if(S.source=g,Lt(S))throw S;return S}},8502:(t,e,n)=>{var r=n(2846),i=1/0,o="[object Null]",s="[object Symbol]",a="[object Undefined]",l=/[&<>"']/g,c=RegExp(l.source),u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=u||h||Function("return this")();var f,d=(f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},function(t){return null==f?void 0:f[t]}),g=Object.prototype,v=g.hasOwnProperty,m=g.toString,y=p.Symbol,_=y?y.toStringTag:void 0,b=y?y.prototype:void 0,w=b?b.toString:void 0,x={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:r,variable:"",imports:{_:{escape:function(t){return(t=T(t))&&c.test(t)?t.replace(l,d):t}}}};function S(t){return null==t?void 0===t?a:o:_&&_ in Object(t)?function(t){var e=v.call(t,_),n=t[_];try{t[_]=void 0;var r=!0}catch(t){}var i=m.call(t);r&&(e?t[_]=n:delete t[_]);return i}(t):function(t){return m.call(t)}(t)}function E(t){if("string"==typeof t)return t;if(C(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,E)+"";if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&S(t)==s}(t))return w?w.call(t):"";var e=t+"";return"0"==e&&1/t==-i?"-0":e}var C=Array.isArray;function T(t){return null==t?"":E(t)}t.exports=x},5025:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r="ol-ctx-menu",i={namespace:r,container:r+"-container",separator:r+"-separator",submenu:r+"-submenu",hidden:r+"-hidden",icon:r+"-icon",zoomIn:r+"-zoom-in",zoomOut:r+"-zoom-out",unselectable:"ol-unselectable"},o=i,s="beforeopen",a="open",l="close",c="contextmenu",u={width:150,scrollAt:4,eventType:c,defaultItems:!0},h=[{text:"Zoom In",classname:i.zoomIn+" "+i.icon,callback:function(t,e){var n=e.getView();n.animate({zoom:+n.getZoom()+1,duration:700,center:t.coordinate})}},{text:"Zoom Out",classname:i.zoomOut+" "+i.icon,callback:function(t,e){var n=e.getView();n.animate({zoom:+n.getZoom()-1,duration:700,center:t.coordinate})}}];function p(t,e){if(void 0===e&&(e="Assertion failed"),!t){if("undefined"!=typeof Error)throw new Error(e);throw e}}function f(t){return/^\d+$/.test(t)}function d(t,e){return t.classList?t.classList.contains(e):y(e).test(t.className)}function g(t,e,n){void 0===e&&(e=window.document);var r=Array.prototype.slice,i=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(t))switch(t[0]){case"#":i=[v(t.substr(1))];break;case".":i=r.call(e.getElementsByClassName(t.substr(1).replace(/\./g," ")));break;default:i=r.call(e.getElementsByTagName(t))}else i=r.call(e.querySelectorAll(t));return n?i:i[0]}function v(t){return t="#"===t[0]?t.substr(1,t.length):t,document.getElementById(t)}function m(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e}function y(t){return new RegExp("(^|\\s+) "+t+" (\\s+|$)")}function _(t,e,n){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim(),n&&f(n)&&window.setTimeout((function(){return b(t,e)}),n)}function b(t,e,n){t.classList?t.classList.remove(e):t.className=t.className.replace(y(e)," ").trim(),n&&f(n)&&window.setTimeout((function(){return _(t,e)}),n)}var w=function(t){return this.Base=t,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:t.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};w.prototype.init=function(t){this.map=t,this.viewport=t.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},w.prototype.getItemsLength=function(){var t=this,e=0;return Object.keys(this.items).forEach((function(n){t.items[n].submenu||t.items[n].separator||e++})),e},w.prototype.getPixelClicked=function(){return this.pixelClicked},w.prototype.getCoordinateClicked=function(){return this.coordinateClicked},w.prototype.positionContainer=function(t){var e=this,n=this.Base.container,r=this.map.getSize(),i=r[1]-t[1],s=r[0]-t[0],a=n.offsetWidth,l=Math.round(this.lineHeight*this.getItemsLength()),c=g("li."+o.submenu+">div",n,!0);s>=a?(n.style.right="auto",n.style.left=t[0]+5+"px"):(n.style.left="auto",n.style.right="15px"),i>=l?(n.style.bottom="auto",n.style.top=t[1]-10+"px"):(n.style.top="auto",n.style.bottom=0),function t(e,n,r){if(Array.isArray(e))e.forEach((function(e){return t(e,n,r)}));else for(var i=Array.isArray(n)?n:n.split(/\s+/),o=i.length;o--;)d(e,i[o])&&b(e,i[o],r)}(n,o.hidden),c.length&&(this.submenu.lastLeft=s<2*a?"-"+a+"px":this.submenu.left,c.forEach((function(t){var n,r,o,s={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},a=(r=(n=t).getBoundingClientRect(),o=document.documentElement,{left:r.left+window.pageXOffset-o.clientLeft,top:r.top+window.pageYOffset-o.clientTop,width:n.offsetWidth,height:n.offsetHeight}),l=a.height,c=i-l;c<0&&(c=l-(s.h-a.top),t.style.top="-"+c+"px"),t.style.left=e.submenu.lastLeft})))},w.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:a,pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},w.prototype.closeMenu=function(){this.opened=!1,function t(e,n,r){if(Array.isArray(e))e.forEach((function(e){return t(e,n)}));else for(var i=Array.isArray(n)?n:n.split(/\s+/),o=i.length;o--;)d(e,i[o])||_(e,i[o],r)}(this.Base.container,o.hidden),this.Base.dispatchEvent({type:l})},w.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},w.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},w.prototype.handleEvent=function(t){var e=this;this.coordinateClicked=this.map.getEventCoordinate(t),this.pixelClicked=this.map.getEventPixel(t),this.Base.dispatchEvent({type:s,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(t.stopPropagation(),t.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),t.target.addEventListener("pointerdown",{handleEvent:function(n){e.opened&&(e.closeMenu(),n.stopPropagation(),t.target.removeEventListener(n.type,this,!1))}},!1))},w.prototype.handleMapMoveEvent=function(t){this.closeMenu()},w.prototype.setItemListener=function(t,e){var n,r=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("click",(function(t){t.preventDefault();var i={coordinate:r.getCoordinateClicked(),data:r.items[e].data||null};r.closeMenu(),n(i,r.map)}),!1))};var x=function(t){return this.Base=t,this.Base.container=this.container=this.createContainer(!0),this};return x.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),r=[o.container,o.unselectable];return t&&r.push(o.hidden),e.className=r.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},x.prototype.createMenu=function(){var t=[];if("items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(h):this.Base.options.items:this.Base.options.defaultItems&&(t=h),0===t.length)return!1;t.forEach(this.addMenuEntry,this)},x.prototype.addMenuEntry=function(t){var e,n=this;if(t.items&&Array.isArray(t.items)){t.classname=t.classname||"",e=o.submenu,~t.classname.indexOf(e)||(t.classname=t.classname.length?" "+o.submenu:o.submenu);var r=this.generateHtmlAndPublish(this.container,t),i=this.createContainer();i.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,r.appendChild(i),t.items.forEach((function(t){n.generateHtmlAndPublish(i,t,!0)}))}else this.generateHtmlAndPublish(this.container,t)},x.prototype.generateHtmlAndPublish=function(t,e,n){var r,i,s="_"+Math.random().toString(36).substr(2,9),a=!1;return"string"==typeof e&&"-"===e.trim()?(r=m('<li id="'+s+'" class="'+o.separator+'"><hr></li>'),i=[].slice.call(r.childNodes,0)[0],t.firstChild.appendChild(r),a=!0):(e.classname=e.classname||"",r=m("<span>"+e.text+"</span>"),i=document.createElement("li"),e.icon&&(""===e.classname?e.classname=o.icon:-1===e.classname.indexOf(o.icon)&&(e.classname+=" "+o.icon),i.setAttribute("style","background-image:url("+e.icon+")")),i.id=s,i.className=e.classname,i.appendChild(r),t.firstChild.appendChild(i)),this.Base.Internal.items[s]={id:s,submenu:n||0,separator:a,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(i,s),i},x.prototype.removeMenuEntry=function(t){var e=g("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},x.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=m("<span>Foo</span>"),n=m("<span>Foo</span>"),r=document.createElement("li"),i=document.createElement("li");r.appendChild(e),i.appendChild(n),t.appendChild(r),t.appendChild(i),this.container.parentNode.appendChild(t);var o=t.offsetHeight/2;return this.container.parentNode.removeChild(t),o},function(t){function e(e){void 0===e&&(e={}),p("object"==typeof e,"@param `opt_options` should be object type!"),this.options=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var i in e)n[i]=e[i];return n}(u,e),this.disabled=!1,this.Internal=new w(this),this.Html=new x(this),t.call(this,{element:this.container})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},e.prototype.close=function(){this.Internal.closeMenu()},e.prototype.enable=function(){this.disabled=!1},e.prototype.disable=function(){this.disabled=!0},e.prototype.getDefaultItems=function(){return h},e.prototype.countItems=function(){return Object.keys(this.Internal.items).length},e.prototype.extend=function(t){p(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},e.prototype.isOpen=function(){return this.Internal.opened},e.prototype.updatePosition=function(t){p(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},e.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},e.prototype.push=function(t){p(null!=t,"@param `item` must be informed."),this.Html.addMenuEntry(t)},e.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e?this.Internal.init(e,this):this.Internal.removeListeners()},e}(n.default)}(n(8775))},4331:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(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 i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(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 c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.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 n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),o=!0),s.leaf){var u=i(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.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 n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),c=l*Math.ceil(Math.sqrt(a));g(t,e,n,c,this.compareMinX);for(var u=e;u<=n;u+=c){var h=Math.min(u+c-1,n);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=u(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c);h<o?(o=h,i=c<i?c:i,s=l):h===o&&c<i&&(i=c,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,c,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),v=s(t,d,n,this.toBBox),m=(i=g,o=v,a=void 0,l=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-l)),y=u(g)+u(v);m<p?(p=m,r=d,f=y<f?y:f):m===p&&y<f&&(f=y,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),c=h(o)+h(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?i(p):p),c+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),c+=h(l)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},1895:t=>{t.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var a=(r-n)/2,l=0,c=a-1;l<a;c=l++){var u=e[n+2*l+0],h=e[n+2*l+1],p=e[n+2*c+0],f=e[n+2*c+1];h>o!=f>o&&i<(p-u)*(o-h)/(f-h)+u&&(s=!s)}return s}},6960:(t,e,n)=>{var r=n(1895),i=n(8139);t.exports=function(t,e,n,o){return e.length>0&&Array.isArray(e[0])?i(t,e,n,o):r(t,e,n,o)},t.exports.nested=i,t.exports.flat=r},8139:t=>{t.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var a=r-n,l=0,c=a-1;l<a;c=l++){var u=e[l+n][0],h=e[l+n][1],p=e[c+n][0],f=e[c+n][1];h>o!=f>o&&i<(p-u)*(o-h)/(f-h)+u&&(s=!s)}return s}},2676:function(t){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}var r=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function i(t,e){return t>e?1:t<e?-1:0}function o(t,e,n){for(var i=new r(null,null),o=i,s=i;;){var a=n(t,e.key);if(a<0){if(null===e.left)break;if(n(t,e.left.key)<0){var l=e.left;if(e.left=l.right,l.right=e,null===(e=l).left)break}s.left=e,s=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(l=e.right,e.right=l.left,l.left=e,null===(e=l).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=i.right,e.right=i.left,e}function s(t,e,n,i){var s=new r(t,e);if(null===n)return s.left=s.right=null,s;var a=i(t,(n=o(t,n,i)).key);return a<0?(s.left=n.left,s.right=n,n.left=null):a>=0&&(s.right=n.right,s.left=n,n.right=null),s}function a(t,e,n){var r=null,i=null;if(e){var s=n((e=o(t,e,n)).key,t);0===s?(r=e.left,i=e.right):s<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function l(t,e,n){return null===e?t:(null===t||((e=o(t.key,e,n)).left=t),e)}function c(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&c(t.left,o,!1,r,i),t.right&&c(t.right,o,!0,r,i)}}var u=function(){function t(t){void 0===t&&(t=i),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new r(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=o(t,this._root,i),a=i(t,s.key);return 0===a?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=o(t,e,n)).key)?(null===e.left?r=e.right:(r=o(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,s=this._root;0!==i.length||s;)if(s)i.push(s),s=s.left;else{if(o((s=i.pop()).key,e)>0)break;if(o(s.key,t)>=0&&n.call(r,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return f(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&v(t,e,0,r-1,i),null===this._root)this._root=h(t,e,0,r),this._size=r;else{var o=g(this.toList(),p(t,e),i);r=this._size+r,this._root=d({head:o},0,r)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return c(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var r=this._comparator,i=a(t,this._root,r),o=i.left,c=i.right;r(t,e)<0?c=s(e,n,c,r):o=s(e,n,o,r),this._root=l(o,c,r)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function h(t,e,n,i){var o=i-n;if(o>0){var s=n+Math.floor(o/2),a=t[s],l=e[s],c=new r(a,l);return c.left=h(t,e,n,s),c.right=h(t,e,s+1,i),c}return null}function p(t,e){for(var n=new r(null,null),i=n,o=0;o<t.length;o++)i=i.next=new r(t[o],e[o]);return i.next=null,n.next}function f(t){for(var e=t,n=[],i=!1,o=new r(null,null),s=o;!i;)e?(n.push(e),e=e.left):n.length>0?e=(e=s=s.next=n.pop()).right:i=!0;return s.next=null,o.next}function d(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=d(t,e,i),s=t.head;return s.left=o,t.head=t.head.next,s.right=d(t,i+1,n),s}return null}function g(t,e,n){for(var i=new r(null,null),o=i,s=t,a=e;null!==s&&null!==a;)n(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),i.next}function v(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],s=n-1,a=r+1;;){do{s++}while(i(t[s],o)<0);do{a--}while(i(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}v(t,e,n,a,i),v(t,e,a+1,r,i)}}var m=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},y=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},_=Number.EPSILON;void 0===_&&(_=Math.pow(2,-52));var b=_*_,w=function(t,e){if(-_<t&&t<_&&-_<e&&e<_)return 0;var n=t-e;return n*n<b*t*e?0:t<e?-1:1},x=function(){function e(){t(this,e),this.reset()}return n(e,[{key:"reset",value:function(){this.xRounder=new S,this.yRounder=new S}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),e}(),S=function(){function e(){t(this,e),this.tree=new u,this.round(0)}return n(e,[{key:"round",value:function(t){var e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===w(e.key,n.key))return this.tree.remove(t),n.key;var r=this.tree.next(e);return null!==r&&0===w(e.key,r.key)?(this.tree.remove(t),r.key):t}}]),e}(),E=new x,C=function(t,e){return t.x*e.y-t.y*e.x},T=function(t,e){return t.x*e.x+t.y*e.y},O=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y},o=C(r,i);return w(o,0)},k=function(t){return Math.sqrt(T(t,t))},M=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return C(i,r)/k(i)/k(r)},P=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return T(i,r)/k(i)/k(r)},L=function(t,e,n){return 0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},I=function(t,e,n){return 0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},A=function(t,e,n,r){if(0===e.x)return I(n,r,t.x);if(0===r.x)return I(t,e,n.x);if(0===e.y)return L(n,r,t.y);if(0===r.y)return L(t,e,n.y);var i=C(e,r);if(0==i)return null;var o={x:n.x-t.x,y:n.y-t.y},s=C(o,e)/i,a=C(o,r)/i;return{x:(t.x+a*e.x+(n.x+s*r.x))/2,y:(t.y+a*e.y+(n.y+s*r.y))/2}},R=function(){function e(n,r){t(this,e),void 0===n.events?n.events=[this]:n.events.push(this),this.point=n,this.isLeft=r}return n(e,null,[{key:"compare",value:function(t,n){var r=e.comparePoints(t.point,n.point);return 0!==r?r:(t.point!==n.point&&t.link(n),t.isLeft!==n.isLeft?t.isLeft?1:-1:j.compare(t.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n<r;n++){var i=e[n];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var r=e+1;r<t;r++){var i=this.point.events[r];void 0===i.consumedBy&&n.otherSE.point.events===i.otherSE.point.events&&n.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var r=this.point.events[e];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&t.push(r)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,r=function(r){var i=r.otherSE;n.set(r,{sine:M(e.point,t.point,i.point),cosine:P(e.point,t.point,i.point)})};return function(t,e){n.has(t)||r(t),n.has(e)||r(e);var i=n.get(t),o=i.sine,s=i.cosine,a=n.get(e),l=a.sine,c=a.cosine;return o>=0&&l>=0?s<c?1:s>c?-1:0:o<0&&l<0?s<c?-1:s>c?1:0:l<o?-1:l>o?1:0}}}]),e}(),D=0,j=function(){function e(n,r,i,o){t(this,e),this.id=++D,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=i,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(n<r){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;var u=t.comparePoint(e.leftSE.point);if(u<0)return 1;if(u>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>r){if(s<a&&s<c)return-1;if(s>a&&s>c)return 1;var p=e.comparePoint(t.leftSE.point);if(0!==p)return p;var f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(i<o){var d=e.comparePoint(t.rightSE.point);if(0!==d)return d}if(i>o){var g=t.comparePoint(e.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==o){var v=l-s,m=i-n,y=c-a,_=o-r;if(v>m&&y<_)return 1;if(v<m&&y>_)return-1}return i>o?1:i<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;var i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;var s=(t.x-e.x)/r.x,a=e.y+s*r.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),r=y(e,n);if(null===r)return null;var i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=m(e,s)&&0===this.comparePoint(s),c=m(n,i)&&0===t.comparePoint(i),u=m(e,a)&&0===this.comparePoint(a),h=m(n,o)&&0===t.comparePoint(o);if(c&&l)return h&&!u?o:!h&&u?a:null;if(c)return u&&i.x===a.x&&i.y===a.y?null:i;if(l)return h&&o.x===s.x&&o.y===s.y?null:s;if(h&&u)return null;if(h)return o;if(u)return a;var p=A(i,this.vector(),s,t.vector());return null===p?null:m(r,p)?E.round(p.x,p.y):null}},{key:"split",value:function(t){var n=[],r=void 0!==t.events,i=new R(t,!0),o=new R(t,!1),s=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);var a=new e(i,s,this.rings.slice(),this.windings.slice());return R.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(t){for(var n=this,r=t;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var i=e.compare(n,r);if(0!==i){if(i>0){var o=n;n=r,r=o}if(n.prev===r){var s=n;n=r,r=s}for(var a=0,l=r.rings.length;a<l;a++){var c=r.rings[a],u=r.windings[a],h=n.rings.indexOf(c);-1===h?(n.rings.push(c),n.windings.push(u)):n.windings[h]+=u}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return 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(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var s=this.rings[i],a=this.windings[i],l=e.indexOf(s);-1===l?(e.push(s),n.push(a)):n[l]+=a}for(var c=[],u=[],h=0,p=e.length;h<p;h++)if(0!==n[h]){var f=e[h],d=f.poly;if(-1===u.indexOf(d))if(f.isExterior)c.push(d);else{-1===u.indexOf(d)&&u.push(d);var g=c.indexOf(f.poly);-1!==g&&c.splice(g,1)}}for(var v=0,m=c.length;v<m;v++){var y=c[v].multiPoly;-1===r.indexOf(y)&&r.push(y)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(Z.type){case"union":var n=0===t.length,r=0===e.length;this._isInResult=n!==r;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===Z.numMultiPolys&&i<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2==1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat(Z.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,n,r){var i,o,s,a=R.comparePoints(t,n);if(a<0)i=t,o=n,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=n,o=t,s=-1}return new e(new R(i,!0),new R(o,!1),[r],[s])}}]),e}(),F=function(){function e(n,r,i){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],"number"!=typeof n[0][0]||"number"!=typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=E.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,l=n.length;a<l;a++){if("number"!=typeof n[a][0]||"number"!=typeof n[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var c=E.round(n[a][0],n[a][1]);c.x===s.x&&c.y===s.y||(this.segments.push(j.fromRing(s,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),s=c)}o.x===s.x&&o.y===s.y||this.segments.push(j.fromRing(s,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var r=this.segments[e];t.push(r.leftSE),t.push(r.rightSE)}return t}}]),e}(),N=function(){function e(n,r){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new F(n[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 i=1,o=n.length;i<o;i++){var s=new F(n[i],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=r}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var r=this.interiorRings[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),e}(),B=function(){function e(n,r){if(t(this,e),!Array.isArray(n))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof n[0][0][0]&&(n=[n])}catch(t){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,o=n.length;i<o;i++){var s=new N(n[i],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=r}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var r=this.polys[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}]),e}(),z=function(){function e(n){t(this,e),this.events=n;for(var r=0,i=n.length;r<i;r++)n[r].segment.ringOut=this;this.poly=null}return n(e,null,[{key:"factory",value:function(t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,l=o.rightSE,c=[a],u=a.point,h=[];s=a,a=l,c.push(a),a.point!==u;)for(;;){var p=a.getAvailableLinkedEvents();if(0===p.length){var f=c[0].point,d=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(f.x,",")+" ".concat(f.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===p.length){l=p[0].otherSE;break}for(var g=null,v=0,m=h.length;v<m;v++)if(h[v].point===a.point){g=v;break}if(null===g){h.push({index:c.length,point:a.point});var y=a.getLeftmostComparator(s);l=p.sort(y)[0].otherSE;break}var _=h.splice(g)[0],b=c.splice(_.index);b.unshift(b[0].otherSE),n.push(new e(b.reverse()))}n.push(new e(c))}}return n}}]),n(e,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,r=this.events.length-1;n<r;n++){var i=this.events[n].point,o=this.events[n+1].point;0!==O(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var s=e[0],a=e[1];0===O(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,c=this.isExteriorRing()?0:e.length-1,u=this.isExteriorRing()?e.length:-1,h=[],p=c;p!=u;p+=l)h.push([e[p].x,e[p].y]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var r=this.events[e];R.compare(t,r)>0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),G=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e<n;e++){var r=this.interiorRings[e].getGeom();null!==r&&t.push(r)}return t}}]),e}(),X=function(){function e(n){t(this,e),this.rings=n,this.polys=this._composePolys(n)}return n(e,[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var r=this.polys[e].getGeom();null!==r&&t.push(r)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new G(i));else{var o=i.enclosingRing();o.poly||e.push(new G(o)),o.poly.addInterior(i)}}return e}}]),e}(),U=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j.compare;t(this,e),this.queue=n,this.tree=new u(r),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,s=void 0,a=void 0;void 0===s;)null===(i=this.tree.prev(i))?s=null:void 0===i.key.consumedBy&&(s=i.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var l=null;if(s){var c=s.getIntersection(e);if(null!==c&&(e.isAnEndpoint(c)||(l=c),!s.isAnEndpoint(c)))for(var u=this._splitSafely(s,c),h=0,p=u.length;h<p;h++)n.push(u[h])}var f=null;if(a){var d=a.getIntersection(e);if(null!==d&&(e.isAnEndpoint(d)||(f=d),!a.isAnEndpoint(d)))for(var g=this._splitSafely(a,d),v=0,m=g.length;v<m;v++)n.push(g[v])}if(null!==l||null!==f){var y=null;y=null===l?f:null===f||R.comparePoints(l,f)<=0?l:f,this.queue.remove(e.rightSE),n.push(e.rightSE);for(var _=e.split(y),b=0,w=_.length;b<w;b++)n.push(_[b])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var x=s.getIntersection(a);if(null!==x){if(!s.isAnEndpoint(x))for(var S=this._splitSafely(s,x),E=0,C=S.length;E<C;E++)n.push(S[E]);if(!a.isAnEndpoint(x))for(var T=this._splitSafely(a,x),O=0,k=T.length;O<k;O++)n.push(T[O])}}this.tree.remove(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.insert(t),r}}]),e}(),H="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,q="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Z=new(function(){function e(){t(this,e)}return n(e,[{key:"run",value:function(t,e,n){Z.type=t,E.reset();for(var r=[new B(e,!0)],i=0,o=n.length;i<o;i++)r.push(new B(n[i],!1));if(Z.numMultiPolys=r.length,"difference"===Z.type)for(var s=r[0],a=1;a<r.length;)null!==y(r[a].bbox,s.bbox)?a++:r.splice(a,1);if("intersection"===Z.type)for(var l=0,c=r.length;l<c;l++)for(var h=r[l],p=l+1,f=r.length;p<f;p++)if(null===y(h.bbox,r[p].bbox))return[];for(var d=new u(R.compare),g=0,v=r.length;g<v;g++)for(var m=r[g].getSweepEvents(),_=0,b=m.length;_<b;_++)if(d.insert(m[_]),d.size>H)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var w=new U(d),x=d.size,S=d.pop();S;){var C=S.key;if(d.size===x){var T=C.segment;throw new Error("Unable to pop() ".concat(C.isLeft?"left":"right"," SweepEvent ")+"[".concat(C.point.x,", ").concat(C.point.y,"] from segment #").concat(T.id," ")+"[".concat(T.leftSE.point.x,", ").concat(T.leftSE.point.y,"] -> ")+"[".concat(T.rightSE.point.x,", ").concat(T.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>H)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(w.segments.length>q)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var O=w.process(C),k=0,M=O.length;k<M;k++){var P=O[k];void 0===P.consumedBy&&d.insert(P)}x=d.size,S=d.pop()}E.reset();var L=z.factory(w.segments);return new X(L).getGeom()}}]),e}()),W=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Z.run("union",t,n)},V=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Z.run("intersection",t,n)},Y=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Z.run("xor",t,n)},K=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Z.run("difference",t,n)};return{union:W,intersection:V,xor:Y,difference:K}}()},8639:function(t,e){!function(t){"use strict";const e=134217729,n=33306690738754706e-32;function r(t,e,n,r,i){let o,s,a,l,c=e[0],u=r[0],h=0,p=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=r[++p]);let f=0;if(h<t&&p<n)for(u>c==u>-c?(a=o-((s=c+o)-c),c=e[++h]):(a=o-((s=u+o)-u),u=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)u>c==u>-c?(a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h]):(a=o-((s=o+u)-(l=s-o))+(u-l),u=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)a=o-((s=o+c)-(l=s-o))+(c-l),c=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)a=o-((s=o+u)-(l=s-o))+(u-l),u=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function i(t){return new Float64Array(t)}const o=33306690738754716e-32,s=22204460492503146e-32,a=11093356479670487e-47,l=i(4),c=i(8),u=i(12),h=i(16),p=i(4);t.orient2d=function(t,i,f,d,g,v){const m=(i-v)*(f-g),y=(t-g)*(d-v),_=m-y;if(0===m||0===y||m>0!=y>0)return _;const b=Math.abs(m+y);return Math.abs(_)>=o*b?_:-function(t,i,o,f,d,g,v){let m,y,_,b,w,x,S,E,C,T,O,k,M,P,L,I,A,R;const D=t-d,j=o-d,F=i-g,N=f-g;w=(L=(E=D-(S=(x=e*D)-(x-D)))*(T=N-(C=(x=e*N)-(x-N)))-((P=D*N)-S*C-E*C-S*T))-(O=L-(A=(E=F-(S=(x=e*F)-(x-F)))*(T=j-(C=(x=e*j)-(x-j)))-((I=F*j)-S*C-E*C-S*T))),l[0]=L-(O+w)+(w-A),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-I),l[1]=M-(O+w)+(w-I),w=(R=k+O)-k,l[2]=k-(R-w)+(O-w),l[3]=R;let B=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,l),z=s*v;if(B>=z||-B>=z)return B;if(m=t-(D+(w=t-D))+(w-d),_=o-(j+(w=o-j))+(w-d),y=i-(F+(w=i-F))+(w-g),b=f-(N+(w=f-N))+(w-g),0===m&&0===y&&0===_&&0===b)return B;if(z=a*v+n*Math.abs(B),(B+=D*b+N*m-(F*_+j*y))>=z||-B>=z)return B;w=(L=(E=m-(S=(x=e*m)-(x-m)))*(T=N-(C=(x=e*N)-(x-N)))-((P=m*N)-S*C-E*C-S*T))-(O=L-(A=(E=y-(S=(x=e*y)-(x-y)))*(T=j-(C=(x=e*j)-(x-j)))-((I=y*j)-S*C-E*C-S*T))),p[0]=L-(O+w)+(w-A),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-I),p[1]=M-(O+w)+(w-I),w=(R=k+O)-k,p[2]=k-(R-w)+(O-w),p[3]=R;const G=r(4,l,4,p,c);w=(L=(E=D-(S=(x=e*D)-(x-D)))*(T=b-(C=(x=e*b)-(x-b)))-((P=D*b)-S*C-E*C-S*T))-(O=L-(A=(E=F-(S=(x=e*F)-(x-F)))*(T=_-(C=(x=e*_)-(x-_)))-((I=F*_)-S*C-E*C-S*T))),p[0]=L-(O+w)+(w-A),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-I),p[1]=M-(O+w)+(w-I),w=(R=k+O)-k,p[2]=k-(R-w)+(O-w),p[3]=R;const X=r(G,c,4,p,u);w=(L=(E=m-(S=(x=e*m)-(x-m)))*(T=b-(C=(x=e*b)-(x-b)))-((P=m*b)-S*C-E*C-S*T))-(O=L-(A=(E=y-(S=(x=e*y)-(x-y)))*(T=_-(C=(x=e*_)-(x-_)))-((I=y*_)-S*C-E*C-S*T))),p[0]=L-(O+w)+(w-A),w=(M=P-((k=P+O)-(w=k-P))+(O-w))-(O=M-I),p[1]=M-(O+w)+(w-I),w=(R=k+O)-k,p[2]=k-(R-w)+(O-w),p[3]=R;const U=r(X,u,4,p,h);return h[U-1]}(t,i,f,d,g,v,b)},t.orient2dfast=function(t,e,n,r,i,o){return(e-o)*(n-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})}(e)},6901:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});n(4916),n(5306),n(3210),n(7042),n(2222),n(2526),n(1817),n(1539),n(2165),n(6992),n(8783),n(3948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){return function(e,i){if("function"==typeof define&&n.amdO)define([],i);else if("object"===r(t)&&t.exports)t.exports=i();else{var o=i();e.Affix=o.Affix,e.Alert=o.Alert,e.Button=o.Button,e.Carousel=o.Carousel,e.Collapse=o.Collapse,e.Dropdown=o.Dropdown,e.Modal=o.Modal,e.Popover=o.Popover,e.ScrollSpy=o.ScrollSpy,e.Tab=o.Tab,e.Tooltip=o.Tooltip}}(this,(function(){var t=void 0!==o?o:this||window,e=document,n=e.documentElement,i="body",s=t.BSN={},a=s.supports=[],l="data-toggle",c="data-dismiss",u="data-spy",h="Affix",p="Alert",f="Button",d="Carousel",g="Collapse",v="Dropdown",m="Modal",y="Popover",_="ScrollSpy",b="Tab",w="Tooltip",x="data-backdrop",S="data-keyboard",E="data-target",C="data-title",T="data-original-title",O="data-original-text",k="data-animation",M="data-container",P="data-placement",L="data-delay",I="backdrop",A="keyboard",R="delay",D="content",j="target",F="interval",N="pause",B="animation",z="placement",G="container",X="root",U="offsetTop",H="offsetBottom",q="scrollTop",Z="scrollLeft",W="clientWidth",V="clientHeight",Y="offsetWidth",K="offsetHeight",$="scrollHeight",J="height",Q="aria-expanded",tt="aria-hidden",et="click",nt="hover",rt="keydown",it="keyup",ot="resize",st="scroll",at="show",lt="shown",ct="hide",ut="hidden",ht="slid",pt="change",ft="getAttribute",dt="setAttribute",gt="hasAttribute",vt="createElement",mt="appendChild",yt="innerHTML",_t="getElementsByTagName",bt="preventDefault",wt="getBoundingClientRect",xt="querySelectorAll",St="indexOf",Et="parentNode",Ct="length",Tt="toLowerCase",Ot="Transition",kt="Webkit",Mt="style",Pt="push",Lt="tabindex",It="contains",At="active",Rt="in",Dt="collapsing",jt="disabled",Ft="left",Nt="right",Bt="top",zt="bottom",Gt=!("opacity"in n[Mt]),Xt="onmouseleave"in e?["mouseenter","mouseleave"]:["mouseover","mouseout"],Ut=/\b(top|bottom|left|right)+/,Ht=0,qt="navbar-fixed-top",Zt="navbar-fixed-bottom",Wt=kt+Ot in n[Mt]||Ot[Tt]()in n[Mt],Vt=kt+Ot in n[Mt]?kt[Tt]()+Ot+"End":Ot[Tt]()+"end",Yt=function(t){t.focus?t.focus():t.setActive()},Kt=function(t,e){t.classList.add(e)},$t=function(t,e){t.classList.remove(e)},Jt=function(t,e){return t.classList[It](e)},Qt=function(t,e){return function(t){for(var e=[],n=0,r=t[Ct];n<r;n++)e[Pt](t[n]);return e}(t[Gt?xt:"getElementsByClassName"](Gt?"."+e.replace(/\s(?=[a-z])/g,"."):e))},te=function(t,n){var i=n||e;return"object"===r(t)?t:i.querySelector(t)},ee=function(t,n){var r=n.charAt(0),i=n.substr(1);if("."===r){for(;t&&t!==e;t=t[Et])if(null!==te(n,t[Et])&&Jt(t,i))return t}else if("#"===r)for(;t&&t!==e;t=t[Et])if(t.id===i)return t;return!1},ne=function(t,e,n){t.addEventListener(e,n,!1)},re=function(t,e,n){t.removeEventListener(e,n,!1)},ie=function(t,e,n){ne(t,e,(function r(i){n(i),re(t,e,r)}))},oe=function(t,e){Wt?ie(t,Vt,(function(t){e(t)})):e()},se=function(t,e,n){var r=new CustomEvent(t+".bs."+e);r.relatedTarget=n,this.dispatchEvent(r)},ae=function(){return{y:t.pageYOffset||n[q],x:t.pageXOffset||n[Z]}},le=function(t,r,o,s){var a,l,c,u,h=r[Y],p=r[K],f=n[W]||e[i][W],d=n[V]||e[i][V],g=t[wt](),v=s===e[i]?ae():{x:s.offsetLeft+s[Z],y:s[U]+s[q]},m=g[Nt]-g[Ft],y=g[zt]-g[Bt],_=te('[class*="arrow"]',r),b=g[Bt]+y/2-p/2<0,w=g[Ft]+m/2-h/2<0,x=g[Ft]+h/2+m/2>=f,S=g[Bt]+p/2+y/2>=d,E=g[Bt]-p<0,C=g[Ft]-h<0,T=g[Bt]+p+y>=d,O=g[Ft]+h+m>=f;(o=(o=(o=(o=(o=(o===Ft||o===Nt)&&C&&O?Bt:o)===Bt&&E?zt:o)===zt&&T?Bt:o)===Ft&&C?Nt:o)===Nt&&O?Ft:o)===Ft||o===Nt?(l=o===Ft?g[Ft]+v.x-h:g[Ft]+v.x+m,b?(a=g[Bt]+v.y,c=y/2):S?(a=g[Bt]+v.y-p+y,c=p-y/2):a=g[Bt]+v.y-p/2+y/2):o!==Bt&&o!==zt||(a=o===Bt?g[Bt]+v.y-p:g[Bt]+v.y+y,w?(l=0,u=g[Ft]+m/2):x?(l=f-1.01*h,u=h-(f-g[Ft])+m/2):l=g[Ft]+v.x-h/2+m/2),r[Mt][Bt]=a+"px",r[Mt][Ft]=l+"px",c&&(_[Mt][Bt]=c+"px"),u&&(_[Mt][Ft]=u+"px"),-1===r.className[St](o)&&(r.className=r.className.replace(Ut,o))};s.version="2.0.23";var ce=function(o,s){s=s||{};var a=(o=te(o))[ft](E),l=o[ft]("data-offset-top"),c=o[ft]("data-offset-bottom"),u="affix",p="affixed",f="function",d="update",g="affix-bottom";if(this[j]=s[j]?te(s[j]):te(a)||null,this[U]=s[U]?s[U]:parseInt(l)||0,this[H]=s[H]?s[H]:parseInt(c)||0,this[j]||this[U]||this[H]){var v,m,y,_,b,w,x=this,S=!1,C=!1,T=function(){y=Math.max(e[i][$],e[i][K],n[V],n[$],n[K]),_=parseInt(ae().y,0),v=null!==x[j]?x[j][wt]()[Bt]+_:x[U]?parseInt(r(x[U])===f?x[U]():x[U]||0):void 0,m=function(){if(x[H])return y-o[K]-parseInt(r(x[H])===f?x[H]():x[H]||0)}(),b=parseInt(v)-_<0&&_>parseInt(v),w=parseInt(m)-_<0&&_>parseInt(m)},O=function(){S&&Jt(o,u)&&($t(o,u),S=!1)},k=function(){w?(b&&O(),C||Jt(o,g)||(se.call(o,u,u),se.call(o,g,u),Kt(o,g),C=!0,se.call(o,p,u),se.call(o,"affixed-bottom",u))):(C&&Jt(o,g)&&($t(o,g),C=!1),b?S||Jt(o,u)||(se.call(o,u,u),se.call(o,"affix-top",u),Kt(o,u),S=!0,se.call(o,p,u),se.call(o,"affixed-top",u)):O())};this[d]=function(){T(),k()},h in o||(ne(t,st,x[d]),!Gt&&ne(t,ot,x[d])),o[h]=x,x[d]()}};a[Pt]([h,ce,"["+u+'="affix"]']);var ue=function(t){t=te(t);var e=this,n="alert",r=ee(t,"."+n),i=function(i){r=ee(i[j],"."+n),(t=te("["+c+'="'+n+'"]',r))&&r&&(t===i[j]||t[It](i[j]))&&e.close()},o=function(){se.call(r,"closed",n),re(t,et,i),r[Et].removeChild(r)};this.close=function(){r&&t&&Jt(r,Rt)&&(se.call(r,"close",n),$t(r,Rt),r&&(Jt(r,"fade")?oe(r,o):o()))},p in t||ne(t,et,i),t[p]=e};a[Pt]([p,ue,"["+c+'="alert"]']);var he=function(t,n){t=te(t),n=n||null;var r=!1,i="button",o="checked",s="reset",a="LABEL",l="INPUT",c=function(e){var n=e[j].tagName===a?e[j]:e[j][Et].tagName===a?e[j][Et]:null;if(n){var s=e[j],c=Qt(s[Et],"btn"),u=n[_t](l)[0];if(u){if("checkbox"===u.type&&(u[o]?($t(n,At),u[ft](o),u.removeAttribute(o),u[o]=!1):(Kt(n,At),u[ft](o),u[dt](o,o),u[o]=!0),r||(r=!0,se.call(u,pt,i),se.call(t,pt,i))),"radio"===u.type&&!r&&!u[o]){Kt(n,At),u[dt](o,o),u[o]=!0,se.call(u,pt,i),se.call(t,pt,i),r=!0;for(var h=0,p=c[Ct];h<p;h++){var f=c[h],d=f[_t](l)[0];f!==n&&Jt(f,At)&&($t(f,At),d.removeAttribute(o),d[o]=!1,se.call(d,pt,i))}}setTimeout((function(){r=!1}),50)}}};if(Jt(t,"btn"))null!==n&&(n!==s?n&&n!==s&&("loading"===n&&(Kt(t,jt),t[dt](jt,jt),t[dt](O,t[yt].trim())),t[yt]=t[ft]("data-"+n+"-text")):t[ft](O)&&((Jt(t,jt)||t[ft](jt)===jt)&&($t(t,jt),t.removeAttribute(jt)),t[yt]=t[ft](O)));else{f in t||(ne(t,et,c),te("["+Lt+"]",t)&&ne(t,it,(function(t){32===(t.which||t.keyCode)&&t[j]===e.activeElement&&c(t)})),ne(t,rt,(function(t){32===(t.which||t.keyCode)&&t[bt]()})));for(var u=Qt(t,"btn"),h=u[Ct],p=0;p<h;p++)!Jt(u[p],At)&&te("input",u[p])[ft](o)&&Kt(u[p],At);t[f]=this}};a[Pt]([f,he,"["+l+'="buttons"]']);var pe=function(e,r){r=r||{};var i=(e=te(e))[ft]("data-interval"),o=r[F],s="false"===i?0:parseInt(i),a=e[ft]("data-pause")===nt||!1,l="true"===e[ft](S)||!1,c="carousel",u="paused",h="direction",p="data-slide-to";this[A]=!0===r[A]||l,this[N]=!(r[N]!==nt&&!a)&&nt,this[F]="number"==typeof o?o:0===s||!1===s?0:5e3;var f=this,g=e.index=0,v=e.timer=0,m=!1,y=Qt(e,"item"),_=y[Ct],b=this[h]=Ft,w=Qt(e,c+"-control"),x=w[0],E=w[1],C=te("."+c+"-indicators",e),T=C&&C[_t]("LI")||[],O=function(){!1===f[F]||Jt(e,u)||(Kt(e,u),!m&&clearInterval(v))},k=function(){!1!==f[F]&&Jt(e,u)&&($t(e,u),!m&&clearInterval(v),!m&&f.cycle())},M=function(t){if(t[bt](),!m){var e=t.currentTarget||t.srcElement;e===E?g++:e===x&&g--,f.slideTo(g)}},P=function(t){for(var e=0,n=T[Ct];e<n;e++)$t(T[e],At);T[t]&&Kt(T[t],At)};this.cycle=function(){v=setInterval((function(){var r,i;r=e[wt](),i=t.innerHeight||n[V],r[Bt]<=i&&r[zt]>=0&&(g++,f.slideTo(g))}),this[F])},this.slideTo=function(t){if(!m){var n,r=this.getActiveIndex();r<t||0===r&&t===_-1?b=f[h]=Ft:(r>t||r===_-1&&0===t)&&(b=f[h]=Nt),t<0?t=_-1:t===_&&(t=0),g=t,n=b===Ft?"next":"prev",se.call(e,"slide",c,y[t]),m=!0,clearInterval(v),P(t),Wt&&Jt(e,"slide")?(Kt(y[t],n),y[t][Y],Kt(y[t],b),Kt(y[r],b),ie(y[r],Vt,(function(i){var o=i[j]!==y[r]?1e3*i.elapsedTime:0;setTimeout((function(){m=!1,Kt(y[t],At),$t(y[r],At),$t(y[t],n),$t(y[t],b),$t(y[r],b),se.call(e,ht,c,y[t]),f[F]&&!Jt(e,u)&&f.cycle()}),o+100)}))):(Kt(y[t],At),y[t][Y],$t(y[r],At),setTimeout((function(){m=!1,f[F]&&!Jt(e,u)&&f.cycle(),se.call(e,ht,c,y[t])}),100))}},this.getActiveIndex=function(){return y[St](Qt(e,"item active")[0])||0},d in e||(f[N]&&f[F]&&(ne(e,Xt[0],O),ne(e,Xt[1],k),ne(e,"touchstart",O),ne(e,"touchend",k)),E&&ne(E,et,M),x&&ne(x,et,M),C&&ne(C,et,(function(t){if(t[bt](),!m){var e=t[j];if(!e||Jt(e,At)||!e[ft](p))return!1;g=parseInt(e[ft](p),10),f.slideTo(g)}})),f[A]&&ne(t,rt,(function(t){if(!m){switch(t.which){case 39:g++;break;case 37:g--;break;default:return}f.slideTo(g)}}))),f.getActiveIndex()<0&&(y[Ct]&&Kt(y[0],At),T[Ct]&&P(0)),f[F]&&f.cycle(),e[d]=f};a[Pt]([d,pe,'[data-ride="carousel"]']);var fe=function(t,e){t=te(t),e=e||{};var n,r,i,o=null,s=null,a=this,c=!1,u=t[ft]("data-parent"),h="collapse",p="collapsed",f=function(t,e){se.call(t,ct,h),c=!0,t[Mt][J]=t[$]+"px",$t(t,h),$t(t,Rt),Kt(t,Dt),t[Y],t[Mt][J]="0px",oe(t,(function(){c=!1,t[dt](Q,"false"),e[dt](Q,"false"),$t(t,Dt),Kt(t,h),t[Mt][J]="",se.call(t,ut,h)}))};this.toggle=function(t){t[bt](),c||(Jt(s,Rt)?a.hide():a.show())},this.hide=function(){f(s,t),Kt(t,p)},this.show=function(){if(o){var e=te("."+h+"."+Rt,o),n=e&&(te("["+l+'="'+h+'"]['+E+'="#'+e.id+'"]',o)||te("["+l+'="'+h+'"][href="#'+e.id+'"]',o)),r=n&&(n[ft](E)||n.href);e&&n&&e!==s&&(f(e,n),r.split("#")[1]!==s.id?Kt(n,p):$t(n,p))}!function(t,e){se.call(t,at,h),c=!0,Kt(t,Dt),$t(t,h),t[Mt][J]=t[$]+"px",oe(t,(function(){c=!1,t[dt](Q,"true"),e[dt](Q,"true"),$t(t,Dt),Kt(t,h),Kt(t,Rt),t[Mt][J]="",se.call(t,lt,h)}))}(s,t),$t(t,p)},g in t||ne(t,et,a.toggle),n=t.href&&t[ft]("href"),r=t[ft](E),i=n||r&&"#"===r.charAt(0)&&r,s=i&&te(i),o=te(e.parent)||u&&ee(t,u),t[g]=a};a[Pt]([g,fe,"["+l+'="collapse"]']);var de=function(t,n){t=te(t),this.persist=!0===n||"true"===t[ft]("data-persist")||!1;var r=this,i="children",o=t[Et],s="dropdown",a="open",l=null,c=te(".dropdown-menu",o),u=function(){for(var t=c[i],e=[],n=0;n<t[Ct];n++)t[n][i][Ct]&&"A"===t[n][i][0].tagName&&e[Pt](t[n]);return e}(),h=function(t){(t.href&&"#"===t.href.slice(-1)||t[Et]&&t[Et].href&&"#"===t[Et].href.slice(-1))&&this[bt]()},p=function(){var n=t[a]?ne:re;n(e,et,f),n(e,rt,g),n(e,it,m)},f=function(e){var n=e[j],i=n&&(v in n||v in n[Et]);(n!==c&&!c[It](n)||!r.persist&&!i)&&(l=n===t||t[It](n)?t:null,_(),h.call(e,n))},d=function(e){l=t,y(),h.call(e,e[j])},g=function(t){var e=t.which||t.keyCode;38!==e&&40!==e||t[bt]()},m=function(n){var o=n.which||n.keyCode,s=e.activeElement,h=u[St](s[Et]),p=s===t,f=c[It](s),d=s[Et][Et]===c;(d||p)&&(h=p?0:38===o?h>1?h-1:0:40===o&&h<u[Ct]-1?h+1:h,u[h]&&Yt(u[h][i][0])),(u[Ct]&&d||!u[Ct]&&(f||p)||!f)&&t[a]&&27===o&&(r.toggle(),l=null)},y=function(){se.call(o,at,s,l),Kt(o,a),c[dt](Q,!0),se.call(o,lt,s,l),t[a]=!0,re(t,et,d),setTimeout((function(){Yt(c[_t]("INPUT")[0]||t),p()}),1)},_=function(){se.call(o,ct,s,l),$t(o,a),c[dt](Q,!1),se.call(o,ut,s,l),t[a]=!1,p(),Yt(t),setTimeout((function(){ne(t,et,d)}),1)};t[a]=!1,this.toggle=function(){Jt(o,a)&&t[a]?_():y()},v in t||(!1 in c&&c[dt](Lt,"0"),ne(t,et,d)),t[v]=r};a[Pt]([v,de,"["+l+'="dropdown"]']);var ge=function(o,s){var a=(o=te(o))[ft](E)||o[ft]("href"),l=te(a),u=Jt(o,"modal")?o:l,h="modal",p="static",f="paddingLeft",d="paddingRight",g="modal-backdrop";if(Jt(o,"modal")&&(o=null),u){s=s||{},this[A]=!1!==s[A]&&"false"!==u[ft](S),this[I]=s[I]!==p&&u[ft](x)!==p||p,this[I]=!1!==s[I]&&"false"!==u[ft](x)&&this[I],this[D]=s[D],this[X]=s[X]||e[i];var v,y,_,b,w=this,C=null,T=Qt(n,qt).concat(Qt(n,Zt)),O=function(){var e,n=w[X].currentStyle||t.getComputedStyle(w[X]),r=parseInt(n[d],10);if(v&&(w[X][Mt][d]=r+_+"px",T[Ct]))for(var i=0;i<T[Ct];i++)e=(T[i].currentStyle||t.getComputedStyle(T[i]))[d],T[i][Mt][d]=parseInt(e)+_+"px"},k=function(){var r,i,o;v=w[X][W]<(r=n[wt](),t.innerWidth||r[Nt]-Math.abs(r[Ft])),y=u[$]>n[V],(o=e[vt]("div")).className=h+"-scrollbar-measure",w[X][mt](o),i=o[Y]-o[W],w[X].removeChild(o),_=i},M=function(){u[Mt][f]=!v&&y?_+"px":"",u[Mt][d]=v&&!y?_+"px":""},P=function(){(b=te("."+g))&&null!==b&&"object"===r(b)&&(Ht=0,w[X].removeChild(b),b=null),se.call(u,ut,h)},L=function(){Jt(u,Rt)?ne(e,rt,z):re(e,rt,z)},R=function(){Jt(u,Rt)?ne(t,ot,w.update):re(t,ot,w.update)},F=function(){Jt(u,Rt)?ne(u,et,G):re(u,et,G)},N=function(){Yt(u),se.call(u,lt,h,C)},B=function(){u[Mt].display="",o&&Yt(o),Qt(e,h+" "+Rt)[0]||(u[Mt][f]="",u[Mt][d]="",function(){if(w[X][Mt][d]="",T[Ct])for(var t=0;t<T[Ct];t++)T[t][Mt][d]=""}(),$t(w[X],h+"-open"),b&&Jt(b,"fade")?($t(b,Rt),oe(b,P)):P(),R(),F(),L())},z=function(t){var e=t.which||t.keyCode;w[A]&&27==e&&Jt(u,Rt)&&w.hide()},G=function(t){var e=t[j];Jt(u,Rt)&&(e[Et][ft](c)===h||e[ft](c)===h||e===u&&w[I]!==p)&&(w.hide(),C=null,t[bt]())};this.toggle=function(){Jt(u,Rt)?this.hide():this.show()},this.show=function(){se.call(u,at,h,C);var t=Qt(e,h+" in")[0];t&&t!==u&&t.modalTrigger[m].hide(),this[I]&&!Ht&&function(){Ht=1;var t=e[vt]("div");null===(b=te("."+g))&&(t[dt]("class",g+" fade"),b=t,w[X][mt](b))}(),b&&Ht&&!Jt(b,Rt)&&(b[Y],Kt(b,Rt)),u[Mt].display="block",k(),O(),M(),Kt(w[X],h+"-open"),Kt(u,Rt),u[dt](tt,!1),R(),F(),L(),Jt(u,"fade")?oe(u,N):N()},this.hide=function(){se.call(u,ct,h),b=te("."+g),$t(u,Rt),u[dt](tt,!0),setTimeout((function(){Jt(u,"fade")?oe(u,B):B()}),Wt?150:0)},this.setContent=function(t){te(".modal-content",u)[yt]=t},this.update=function(){Jt(u,Rt)&&(k(),O(),M())},o&&!(m in o)&&ne(o,et,(function(t){var e=t[j];(e=e[gt](E)||e[gt]("href")?e:e[Et])!==o||Jt(u,Rt)||(u.modalTrigger=o,C=o,w.show(),t[bt]())})),w[D]&&w.setContent(w[D]),o&&(o[m]=w)}};a[Pt]([m,ge,"["+l+'="modal"]']);var ve=function(n,r){r=r||{};var o=(n=te(n))[ft]("data-trigger"),s=n[ft](k),a=n[ft](P),l=n[ft]("data-dismissible"),c=n[ft](L),u=n[ft](M),h="popover",p="template",f="trigger",d="class",g="div",v="fade",m="data-content",_="dismissible",b='<button type="button" class="close">×</button>',w=te(r[G]),x=te(u),S=ee(n,".modal"),E=ee(n,"."+qt),T=ee(n,"."+Zt);this[p]=r[p]?r[p]:null,this[f]=r[f]?r[f]:o||nt,this[B]=r[B]&&r[B]!==v?r[B]:s||v,this[z]=r[z]?r[z]:a||Bt,this[R]=parseInt(r[R]||c)||200,this[_]=!(!r[_]&&"true"!==l),this[G]=w||(x||(E||(T||(S||e[i]))));var O=this,I=n[ft](C)||null,A=n[ft](m)||null;if(A||this[p]){var D=null,F=0,N=this[z],X=function(t){null!==D&&t[j]===te(".close",D)&&O.hide()},U=function(r){et!=O[f]&&"focus"!=O[f]||!O[_]&&r(n,"blur",O.hide),O[_]&&r(e,et,X),!Gt&&r(t,ot,O.hide)},H=function(){U(ne),se.call(n,lt,h)},q=function(){U(re),O[G].removeChild(D),F=null,D=null,se.call(n,ut,h)};this.toggle=function(){null===D?O.show():O.hide()},this.show=function(){clearTimeout(F),F=setTimeout((function(){null===D&&(N=O[z],function(){if(I=n[ft](C),A=n[ft](m),D=e[vt](g),null!==A&&null===O[p]){if(D[dt]("role","tooltip"),null!==I){var t=e[vt]("h3");t[dt](d,h+"-title"),t[yt]=O[_]?I+b:I,D[mt](t)}var r=e[vt](g),i=e[vt](g);r[dt](d,"arrow"),i[dt](d,h+"-content"),D[mt](r),D[mt](i),i[yt]=O[_]&&null===I?A+b:A}else{var o=e[vt](g);o[yt]=O[p],D[yt]=o.firstChild[yt]}O[G][mt](D),D[Mt].display="block",D[dt](d,h+" "+N+" "+O[B])}(),le(n,D,N,O[G]),!Jt(D,Rt)&&Kt(D,Rt),se.call(n,at,h),O[B]?oe(D,H):H())}),20)},this.hide=function(){clearTimeout(F),F=setTimeout((function(){D&&null!==D&&Jt(D,Rt)&&(se.call(n,ct,h),$t(D,Rt),O[B]?oe(D,q):q())}),O[R])},y in n||(O[f]===nt?(ne(n,Xt[0],O.show),O[_]||ne(n,Xt[1],O.hide)):et!=O[f]&&"focus"!=O[f]||ne(n,O[f],O.toggle)),n[y]=O}};a[Pt]([y,ve,"["+l+'="popover"]']);var me=function(e,n){e=te(e);var r=te(e[ft](E)),i=e[ft]("data-offset");if((n=n||{})[j]||r){for(var o,s=this,a=n[j]&&te(n[j])||r,l=a&&a[_t]("A"),c=parseInt(i||n.offset)||10,u=[],h=[],p=e[K]<e[$]?e:t,f=p===t,d=0,g=l[Ct];d<g;d++){var v=l[d][ft]("href"),m=v&&"#"===v.charAt(0)&&"#"!==v.slice(-1)&&te(v);m&&(u[Pt](l[d]),h[Pt](m))}var y=function(t){var n=u[t][Et],r=h[t],i=ee(n,".dropdown"),s=f&&r[wt](),a=Jt(n,At)||!1,l=(f?s[Bt]+o:r[U])-c,p=f?s[zt]+o-c:h[t+1]?h[t+1][U]-c:e[$],d=o>=l&&p>o;if(!a&&d)"LI"!==n.tagName||Jt(n,At)||(Kt(n,At),i&&!Jt(i,At)&&Kt(i,At),se.call(e,"activate","scrollspy",u[t]));else if(d){if(!d&&!a||a&&d)return}else"LI"===n.tagName&&Jt(n,At)&&($t(n,At),i&&Jt(i,At)&&!Qt(n[Et],At).length&&$t(i,At))};this.refresh=function(){!function(){o=f?ae().y:e[q];for(var t=0,n=u[Ct];t<n;t++)y(t)}()},_ in e||(ne(p,st,s.refresh),!Gt&&ne(t,ot,s.refresh)),s.refresh(),e[_]=s}};a[Pt]([_,me,"["+u+'="scroll"]']);var ye=function(t,e){var n=(t=te(t))[ft]("data-height"),r="tab",i="height",o="float",s="isAnimating";e=e||{},this[i]=!!Wt&&(e[i]||"true"===n);var a,c,u,h,p,f,d,g=this,v=ee(t,".nav"),m=!1,y=v&&te(".dropdown",v),_=function(){m[Mt][i]="",$t(m,Dt),v[s]=!1},w=function(){m?f?_():setTimeout((function(){m[Mt][i]=d+"px",m[Y],oe(m,_)}),1):v[s]=!1,se.call(a,lt,r,c)},x=function(){m&&(u[Mt][o]=Ft,h[Mt][o]=Ft,p=u[$]),Kt(h,At),se.call(a,at,r,c),$t(u,At),se.call(c,ut,r,a),m&&(d=h[$],f=d===p,Kt(m,Dt),m[Mt][i]=p+"px",m[K],u[Mt][o]="",h[Mt][o]=""),Jt(h,"fade")?setTimeout((function(){Kt(h,Rt),oe(h,w)}),20):w()};if(v){v[s]=!1;var S=function(){var t,e=Qt(v,At);return 1!==e[Ct]||Jt(e[0],"dropdown")?e[Ct]>1&&(t=e[e[Ct]-1]):t=e[0],t[_t]("A")[0]},E=function(){return te(S()[ft]("href"))};this.show=function(){h=te((a=a||t)[ft]("href")),c=S(),u=E(),v[s]=!0,$t(c[Et],At),Kt(a[Et],At),y&&(Jt(t[Et][Et],"dropdown-menu")?Jt(y,At)||Kt(y,At):Jt(y,At)&&$t(y,At)),se.call(c,ct,r,a),Jt(u,"fade")?($t(u,Rt),oe(u,x)):x()},b in t||ne(t,et,(function(t){var e=t[j][ft]("href");t[bt](),a=t[j][ft](l)===r||e&&"#"===e.charAt(0)?t[j]:t[j][Et],!v[s]&&!Jt(a[Et],At)&&g.show()})),g[i]&&(m=E()[Et]),t[b]=g}};a[Pt]([b,ye,"["+l+'="tab"]']);var _e=function(n,r){r=r||{};var o=(n=te(n))[ft](k),s=n[ft](P),a=n[ft](L),l=n[ft](M),c="tooltip",u="class",h="title",p="fade",f="div",d=te(r[G]),g=te(l),v=ee(n,".modal"),m=ee(n,"."+qt),y=ee(n,"."+Zt);this[B]=r[B]&&r[B]!==p?r[B]:o||p,this[z]=r[z]?r[z]:s||Bt,this[R]=parseInt(r[R]||a)||200,this[G]=d||(g||(m||(y||(v||e[i]))));var _=this,b=0,x=this[z],S=null,E=n[ft](h)||n[ft](C)||n[ft](T);if(E&&""!=E){var O=function(){se.call(n,lt,c),!Gt&&ne(t,ot,_.hide)},I=function(){!Gt&&re(t,ot,_.hide),_[G].removeChild(S),S=null,b=null,se.call(n,ut,c)};this.show=function(){clearTimeout(b),b=setTimeout((function(){if(null===S){if(x=_[z],0==function(){if(!(E=n[ft](h)||n[ft](C)||n[ft](T))||""==E)return!1;(S=e[vt](f))[dt]("role",c);var t=e[vt](f),r=e[vt](f);t[dt](u,c+"-arrow"),r[dt](u,c+"-inner"),S[mt](t),S[mt](r),r[yt]=E,_[G][mt](S),S[dt](u,c+" "+x+" "+_[B])}())return;le(n,S,x,_[G]),!Jt(S,Rt)&&Kt(S,Rt),se.call(n,at,c),_[B]?oe(S,O):O()}}),20)},this.hide=function(){clearTimeout(b),b=setTimeout((function(){S&&Jt(S,Rt)&&(se.call(n,ct,c),$t(S,Rt),_[B]?oe(S,I):I())}),_[R])},this.toggle=function(){S?_.hide():_.show()},w in n||(n[dt](T,E),n.removeAttribute(h),ne(n,Xt[0],_.show),ne(n,Xt[1],_.hide)),n[w]=_}};a[Pt]([w,_e,"["+l+'="tooltip"]']);var be=function(t,e){for(var n=0,r=e[Ct];n<r;n++)new t(e[n])},we=s.initCallback=function(t){t=t||e;for(var n=0,r=a[Ct];n<r;n++)be(a[n][1],t[xt](a[n][2]))};return e[i]?we():ne(e,"DOMContentLoaded",(function(){we()})),{Affix:ce,Alert:ue,Button:he,Carousel:pe,Collapse:fe,Dropdown:de,Modal:ge,Popover:ve,ScrollSpy:me,Tab:ye,Tooltip:_e}})),this};var o=(new i).dispatch();const s=o},953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});n(4916),n(1539),n(9714),n(5306),n(561),n(9600),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){var e,i;return e=this,i=function(t){var e={},n="iziToast",i=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),o=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),s="undefined"!=typeof InstallTrigger,a="ontouchstart"in document.documentElement,l=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],c=568,u={};e.children={};var h={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",iconUrl:null,image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,closeOnClick:!1,displayMode:0,position:"bottomRight",target:"",targetFirst:!0,timeout:5e3,rtl:!1,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent){var p=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n};p.prototype=window.Event.prototype,window.CustomEvent=p}var f=function(t,e,n){if("[object Object]"===Object.prototype.toString.call(t))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(n,t[r],r,t);else if(t)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t)},d=function(t,e){var n={};return f(t,(function(e,r){n[r]=t[r]})),f(e,(function(t,r){n[r]=e[r]})),n},g=function(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e},v={move:function(t,e,r,i){var a,l=.3,c=180;0!==i&&(t.classList.add(n+"-dragged"),t.style.transform="translateX("+i+"px)",i>0?(a=(c-i)/c)<l&&e.hide(d(r,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag"):(a=(c+i)/c)<l&&e.hide(d(r,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag"),t.style.opacity=a,a<l&&((o||s)&&(t.style.left=i+"px"),t.parentNode.style.opacity=l,this.stopMoving(t,null)))},startMoving:function(t,e,n,r){r=r||window.event;var i=a?r.touches[0].clientX:r.clientX,o=t.style.transform.replace("px)",""),s=i-(o=o.replace("translateX(",""));n.transitionIn&&t.classList.remove(n.transitionIn),n.transitionInMobile&&t.classList.remove(n.transitionInMobile),t.style.transition="",a?document.ontouchmove=function(r){r.preventDefault();var i=(r=r||window.event).touches[0].clientX-s;v.move(t,e,n,i)}:document.onmousemove=function(r){r.preventDefault();var i=(r=r||window.event).clientX-s;v.move(t,e,n,i)}},stopMoving:function(t,e){a?document.ontouchmove=function(){}:document.onmousemove=function(){},t.style.opacity="",t.style.transform="",t.classList.contains(n+"-dragged")&&(t.classList.remove(n+"-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout((function(){t.style.transition=""}),400))}};return e.setSetting=function(t,n,r){e.children[t][n]=r},e.getSetting=function(t,n){return e.children[t][n]},e.destroy=function(){f(document.querySelectorAll("."+n+"-overlay"),(function(t,e){t.remove()})),f(document.querySelectorAll("."+n+"-wrapper"),(function(t,e){t.remove()})),f(document.querySelectorAll("."+n),(function(t,e){t.remove()})),this.children={},document.removeEventListener(n+"-opened",{},!1),document.removeEventListener(n+"-opening",{},!1),document.removeEventListener(n+"-closing",{},!1),document.removeEventListener(n+"-closed",{},!1),document.removeEventListener("keyup",{},!1),u={}},e.settings=function(t){e.destroy(),u=t,h=d(h,t||{})},f({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},(function(t,n){e[n]=function(e){var n=d(u,e||{});n=d(t,n||{}),this.show(n)}})),e.progress=function(t,e,r){var i=this,o=e.getAttribute("data-iziToast-ref"),s=d(this.children[o],t||{}),a=e.querySelector("."+n+"-progressbar div");return{start:function(){void 0===s.time.REMAINING&&(e.classList.remove(n+"-reseted"),null!==a&&(a.style.transition="width "+s.timeout+"ms "+s.progressBarEasing,a.style.width="0%"),s.time.START=(new Date).getTime(),s.time.END=s.time.START+s.timeout,s.time.TIMER=setTimeout((function(){clearTimeout(s.time.TIMER),e.classList.contains(n+"-closing")||(i.hide(s,e,"timeout"),"function"==typeof r&&r.apply(i))}),s.timeout),i.setSetting(o,"time",s.time))},pause:function(){if(void 0!==s.time.START&&!e.classList.contains(n+"-paused")&&!e.classList.contains(n+"-reseted")){if(e.classList.add(n+"-paused"),s.time.REMAINING=s.time.END-(new Date).getTime(),clearTimeout(s.time.TIMER),i.setSetting(o,"time",s.time),null!==a){var t=window.getComputedStyle(a).getPropertyValue("width");a.style.transition="none",a.style.width=t}"function"==typeof r&&setTimeout((function(){r.apply(i)}),10)}},resume:function(){void 0!==s.time.REMAINING?(e.classList.remove(n+"-paused"),null!==a&&(a.style.transition="width "+s.time.REMAINING+"ms "+s.progressBarEasing,a.style.width="0%"),s.time.END=(new Date).getTime()+s.time.REMAINING,s.time.TIMER=setTimeout((function(){clearTimeout(s.time.TIMER),e.classList.contains(n+"-closing")||(i.hide(s,e,"timeout"),"function"==typeof r&&r.apply(i))}),s.time.REMAINING),i.setSetting(o,"time",s.time)):this.start()},reset:function(){clearTimeout(s.time.TIMER),delete s.time.REMAINING,i.setSetting(o,"time",s.time),e.classList.add(n+"-reseted"),e.classList.remove(n+"-paused"),null!==a&&(a.style.transition="none",a.style.width="100%"),"function"==typeof r&&setTimeout((function(){r.apply(i)}),10)}}},e.hide=function(t,e,o){"object"!=r(e)&&(e=document.querySelector(e));var s=this,a=d(this.children[e.getAttribute("data-iziToast-ref")],t||{});a.closedBy=o||null,delete a.time.REMAINING,e.classList.add(n+"-closing"),function(){var t=document.querySelector("."+n+"-overlay");if(null!==t){var e=t.getAttribute("data-iziToast-ref"),r=(e=e.split(",")).indexOf(String(a.ref));-1!==r&&e.splice(r,1),t.setAttribute("data-iziToast-ref",e.join()),0===e.length&&(t.classList.remove("fadeIn"),t.classList.add("fadeOut"),setTimeout((function(){t.remove()}),700))}}(),a.transitionIn&&e.classList.remove(a.transitionIn),a.transitionInMobile&&e.classList.remove(a.transitionInMobile),i||window.innerWidth<=c?a.transitionOutMobile&&e.classList.add(a.transitionOutMobile):a.transitionOut&&e.classList.add(a.transitionOut);var l=e.parentNode.offsetHeight;e.parentNode.style.height=l+"px",e.style.pointerEvents="none",(!i||window.innerWidth>c)&&(e.parentNode.style.transitionDelay="0.2s");try{var u=new CustomEvent(n+"-closing",{detail:a,bubbles:!0,cancelable:!0});document.dispatchEvent(u)}catch(t){console.warn(t)}setTimeout((function(){e.parentNode.style.height="0px",e.parentNode.style.overflow="",setTimeout((function(){delete s.children[a.ref],e.parentNode.remove();try{var t=new CustomEvent(n+"-closed",{detail:a,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}void 0!==a.onClosed&&a.onClosed.apply(null,[a,e,o])}),1e3)}),200),void 0!==a.onClosing&&a.onClosing.apply(null,[a,e,o])},e.show=function(t){var r,o=this,s=d(u,t||{});if((s=d(h,s)).time={},null===s.id&&(s.id=(r=s.title+s.message+s.color,btoa(encodeURIComponent(r)).replace(/=/g,""))),1===s.displayMode||"once"==s.displayMode)try{if(document.querySelectorAll("."+n+"#"+s.id).length>0)return!1}catch(t){console.warn("["+n+"] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}if(2===s.displayMode||"replace"==s.displayMode)try{f(document.querySelectorAll("."+n+"#"+s.id),(function(t,e){o.hide(s,t,"replaced")}))}catch(t){console.warn("["+n+"] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}s.ref=(new Date).getTime()+Math.floor(1e7*Math.random()+1),e.children[s.ref]=s;var p,m={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),icon:s.iconUrl?document.createElement("img"):document.createElement("i"),wrapper:null};m.toast.setAttribute("data-iziToast-ref",s.ref),m.toast.appendChild(m.toastBody),m.toastCapsule.appendChild(m.toast),function(){if(m.toast.classList.add(n),m.toast.classList.add(n+"-opening"),m.toastCapsule.classList.add(n+"-capsule"),m.toastBody.classList.add(n+"-body"),m.toastTexts.classList.add(n+"-texts"),i||window.innerWidth<=c?s.transitionInMobile&&m.toast.classList.add(s.transitionInMobile):s.transitionIn&&m.toast.classList.add(s.transitionIn),s.class){var t=s.class.split(" ");f(t,(function(t,e){m.toast.classList.add(t)}))}var e;s.id&&(m.toast.id=s.id),s.rtl&&(m.toast.classList.add(n+"-rtl"),m.toast.setAttribute("dir","rtl")),s.layout>1&&m.toast.classList.add(n+"-layout"+s.layout),s.balloon&&m.toast.classList.add(n+"-balloon"),s.maxWidth&&(isNaN(s.maxWidth)?m.toast.style.maxWidth=s.maxWidth:m.toast.style.maxWidth=s.maxWidth+"px"),""===s.theme&&"light"===s.theme||m.toast.classList.add(n+"-theme-"+s.theme),s.color&&("#"==(e=s.color).substring(0,1)||"rgb"==e.substring(0,3)||"hsl"==e.substring(0,3)?m.toast.style.background=s.color:m.toast.classList.add(n+"-color-"+s.color)),s.backgroundColor&&(m.toast.style.background=s.backgroundColor,s.balloon&&(m.toast.style.borderColor=s.backgroundColor))}(),s.image&&(m.cover.classList.add(n+"-cover"),m.cover.style.width=s.imageWidth+"px",function(t){try{return btoa(atob(t))==t}catch(t){return!1}}(s.image.replace(/ /g,""))?m.cover.style.backgroundImage="url(data:image/png;base64,"+s.image.replace(/ /g,"")+")":m.cover.style.backgroundImage="url("+s.image+")",s.rtl?m.toastBody.style.marginRight=s.imageWidth+10+"px":m.toastBody.style.marginLeft=s.imageWidth+10+"px",m.toast.appendChild(m.cover)),s.close?(m.buttonClose=document.createElement("button"),m.buttonClose.type="button",m.buttonClose.classList.add(n+"-close"),m.buttonClose.addEventListener("click",(function(t){t.target,o.hide(s,m.toast,"button")})),m.toast.appendChild(m.buttonClose)):s.rtl?m.toast.style.paddingLeft="18px":m.toast.style.paddingRight="18px",s.progressBar&&(m.progressBar=document.createElement("div"),m.progressBarDiv=document.createElement("div"),m.progressBar.classList.add(n+"-progressbar"),m.progressBarDiv.style.background=s.progressBarColor,m.progressBar.appendChild(m.progressBarDiv),m.toast.appendChild(m.progressBar)),s.timeout&&(s.pauseOnHover&&!s.resetOnHover&&(m.toast.addEventListener("mouseenter",(function(t){o.progress(s,m.toast).pause()})),m.toast.addEventListener("mouseleave",(function(t){o.progress(s,m.toast).resume()}))),s.resetOnHover&&(m.toast.addEventListener("mouseenter",(function(t){o.progress(s,m.toast).reset()})),m.toast.addEventListener("mouseleave",(function(t){o.progress(s,m.toast).start()})))),s.iconUrl?(m.icon.setAttribute("class",n+"-icon"),m.icon.setAttribute("src",s.iconUrl)):s.icon&&(m.icon.setAttribute("class",n+"-icon "+s.icon),s.iconText&&m.icon.appendChild(document.createTextNode(s.iconText)),s.iconColor&&(m.icon.style.color=s.iconColor)),(s.icon||s.iconUrl)&&(s.rtl?m.toastBody.style.paddingRight="33px":m.toastBody.style.paddingLeft="33px",m.toastBody.appendChild(m.icon)),s.title.length>0&&(m.strong=document.createElement("strong"),m.strong.classList.add(n+"-title"),m.strong.appendChild(g(s.title)),m.toastTexts.appendChild(m.strong),s.titleColor&&(m.strong.style.color=s.titleColor),s.titleSize&&(isNaN(s.titleSize)?m.strong.style.fontSize=s.titleSize:m.strong.style.fontSize=s.titleSize+"px"),s.titleLineHeight&&(isNaN(s.titleSize)?m.strong.style.lineHeight=s.titleLineHeight:m.strong.style.lineHeight=s.titleLineHeight+"px")),s.message.length>0&&(m.p=document.createElement("p"),m.p.classList.add(n+"-message"),m.p.appendChild(g(s.message)),m.toastTexts.appendChild(m.p),s.messageColor&&(m.p.style.color=s.messageColor),s.messageSize&&(isNaN(s.titleSize)?m.p.style.fontSize=s.messageSize:m.p.style.fontSize=s.messageSize+"px"),s.messageLineHeight&&(isNaN(s.titleSize)?m.p.style.lineHeight=s.messageLineHeight:m.p.style.lineHeight=s.messageLineHeight+"px")),s.title.length>0&&s.message.length>0&&(s.rtl?m.strong.style.marginLeft="10px":2===s.layout||s.rtl||(m.strong.style.marginRight="10px")),m.toastBody.appendChild(m.toastTexts),s.inputs.length>0&&(m.inputs.classList.add(n+"-inputs"),f(s.inputs,(function(t,e){m.inputs.appendChild(g(t[0])),(p=m.inputs.childNodes)[e].classList.add(n+"-inputs-child"),t[3]&&setTimeout((function(){p[e].focus()}),300),p[e].addEventListener(t[1],(function(e){return(0,t[2])(o,m.toast,this,e)}))})),m.toastBody.appendChild(m.inputs)),s.buttons.length>0&&(m.buttons.classList.add(n+"-buttons"),f(s.buttons,(function(t,e){m.buttons.appendChild(g(t[0]));var r=m.buttons.childNodes;r[e].classList.add(n+"-buttons-child"),t[2]&&setTimeout((function(){r[e].focus()}),300),r[e].addEventListener("click",(function(e){return e.preventDefault(),(0,t[1])(o,m.toast,this,e,p)}))}))),m.toastBody.appendChild(m.buttons),s.message.length>0&&(s.inputs.length>0||s.buttons.length>0)&&(m.p.style.marginBottom="0"),(s.inputs.length>0||s.buttons.length>0)&&(s.rtl?m.toastTexts.style.marginLeft="10px":m.toastTexts.style.marginRight="10px",s.inputs.length>0&&s.buttons.length>0&&(s.rtl?m.inputs.style.marginLeft="8px":m.inputs.style.marginRight="8px")),m.toastCapsule.style.visibility="hidden",setTimeout((function(){var t=m.toast.offsetHeight,e=m.toast.currentStyle||window.getComputedStyle(m.toast),n=e.marginTop;n=n.split("px"),n=parseInt(n[0]);var r=e.marginBottom;r=r.split("px"),r=parseInt(r[0]),m.toastCapsule.style.visibility="",m.toastCapsule.style.height=t+r+n+"px",setTimeout((function(){m.toastCapsule.style.height="auto",s.target&&(m.toastCapsule.style.overflow="visible")}),500),s.timeout&&o.progress(s,m.toast).start()}),100),function(){var t=s.position;if(s.target)m.wrapper=document.querySelector(s.target),m.wrapper.classList.add(n+"-target"),s.targetFirst?m.wrapper.insertBefore(m.toastCapsule,m.wrapper.firstChild):m.wrapper.appendChild(m.toastCapsule);else{if(-1==l.indexOf(s.position))return void console.warn("["+n+"] Incorrect position. It can be › "+l);t=i||window.innerWidth<=c?"bottomLeft"==s.position||"bottomRight"==s.position||"bottomCenter"==s.position?n+"-wrapper-bottomCenter":"topLeft"==s.position||"topRight"==s.position||"topCenter"==s.position?n+"-wrapper-topCenter":n+"-wrapper-center":n+"-wrapper-"+t,m.wrapper=document.querySelector("."+n+"-wrapper."+t),m.wrapper||(m.wrapper=document.createElement("div"),m.wrapper.classList.add(n+"-wrapper"),m.wrapper.classList.add(t),document.body.appendChild(m.wrapper)),"topLeft"==s.position||"topCenter"==s.position||"topRight"==s.position?m.wrapper.insertBefore(m.toastCapsule,m.wrapper.firstChild):m.wrapper.appendChild(m.toastCapsule)}isNaN(s.zindex)?console.warn("["+n+"] Invalid zIndex."):m.wrapper.style.zIndex=s.zindex}(),s.overlay&&(null!==document.querySelector("."+n+"-overlay.fadeIn")?(m.overlay=document.querySelector("."+n+"-overlay"),m.overlay.setAttribute("data-iziToast-ref",m.overlay.getAttribute("data-iziToast-ref")+","+s.ref),isNaN(s.zindex)||null===s.zindex||(m.overlay.style.zIndex=s.zindex-1)):(m.overlay.classList.add(n+"-overlay"),m.overlay.classList.add("fadeIn"),m.overlay.style.background=s.overlayColor,m.overlay.setAttribute("data-iziToast-ref",s.ref),isNaN(s.zindex)||null===s.zindex||(m.overlay.style.zIndex=s.zindex-1),document.querySelector("body").appendChild(m.overlay)),s.overlayClose?(m.overlay.removeEventListener("click",{}),m.overlay.addEventListener("click",(function(t){o.hide(s,m.toast,"overlay")}))):m.overlay.removeEventListener("click",{})),function(){if(s.animateInside){m.toast.classList.add(n+"-animateInside");var t=[200,100,300];"bounceInLeft"!=s.transitionIn&&"bounceInRight"!=s.transitionIn||(t=[400,200,400]),s.title.length>0&&setTimeout((function(){m.strong.classList.add("slideIn")}),t[0]),s.message.length>0&&setTimeout((function(){m.p.classList.add("slideIn")}),t[1]),(s.icon||s.iconUrl)&&setTimeout((function(){m.icon.classList.add("revealIn")}),t[2]);var e=150;s.buttons.length>0&&m.buttons&&setTimeout((function(){f(m.buttons.childNodes,(function(t,n){setTimeout((function(){t.classList.add("revealIn")}),e),e+=150}))}),s.inputs.length>0?150:0),s.inputs.length>0&&m.inputs&&(e=150,f(m.inputs.childNodes,(function(t,n){setTimeout((function(){t.classList.add("revealIn")}),e),e+=150})))}}(),s.onOpening.apply(null,[s,m.toast]);try{var y=new CustomEvent(n+"-opening",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(y)}catch(t){console.warn(t)}setTimeout((function(){m.toast.classList.remove(n+"-opening"),m.toast.classList.add(n+"-opened");try{var t=new CustomEvent(n+"-opened",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}s.onOpened.apply(null,[s,m.toast])}),1e3),s.drag&&(a?(m.toast.addEventListener("touchstart",(function(t){v.startMoving(this,o,s,t)}),!1),m.toast.addEventListener("touchend",(function(t){v.stopMoving(this,t)}),!1)):(m.toast.addEventListener("mousedown",(function(t){t.preventDefault(),v.startMoving(this,o,s,t)}),!1),m.toast.addEventListener("mouseup",(function(t){t.preventDefault(),v.stopMoving(this,t)}),!1))),s.closeOnEscape&&document.addEventListener("keyup",(function(t){27==(t=t||window.event).keyCode&&o.hide(s,m.toast,"esc")})),s.closeOnClick&&m.toast.addEventListener("click",(function(t){o.hide(s,m.toast,"toast")})),o.toast=m.toast},e},"function"==typeof define&&n.amdO?define([],i()):"object"===("undefined"==typeof exports?"undefined":r(exports))?t.exports=i():e.iziToast=i(),this};const o=(new i).dispatch().iziToast},7863:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});n(1539),n(9714),n(4603),n(4916),n(9600),n(7042),n(8309),n(2481),n(5306),n(6992),n(3948),n(4723),n(4765),n(8783),n(285),n(1637),n(2526),n(1817),n(2165);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){return function(e,i){"object"===("undefined"==typeof exports?"undefined":r(exports))?t.exports=i():"function"==typeof define&&n.amdO?define(i):e.page=i()}(this,(function(){var t=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},e=g,n=l,i=function(t){return c(l(t))},o=c,s=d,a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function l(t){for(var e,n=[],r=0,i=0,o="";null!=(e=a.exec(t));){var s=e[0],l=e[1],c=e.index;if(o+=t.slice(i,c),i=c+s.length,l)o+=l[1];else{o&&(n.push(o),o="");var u=e[2],p=e[3],f=e[4],d=e[5],g=e[6],v=e[7],m="+"===g||"*"===g,y="?"===g||"*"===g,_=u||"/",b=f||d||(v?".*":"[^"+_+"]+?");n.push({name:p||r++,prefix:u||"",delimiter:_,optional:y,repeat:m,pattern:h(b)})}}return i<t.length&&(o+=t.substr(i)),o&&n.push(o),n}function c(e){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"===r(e[i])&&(n[i]=new RegExp("^"+e[i].pattern+"$"));return function(r){for(var i="",o=r||{},s=0;s<e.length;s++){var a=e[s];if("string"!=typeof a){var l,c=o[a.name];if(null==c){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to be defined')}if(t(c)){if(!a.repeat)throw new TypeError('Expected "'+a.name+'" to not repeat, but received "'+c+'"');if(0===c.length){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(var u=0;u<c.length;u++){if(l=encodeURIComponent(c[u]),!n[s].test(l))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but received "'+l+'"');i+=(0===u?a.prefix:a.delimiter)+l}}else{if(l=encodeURIComponent(c),!n[s].test(l))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but received "'+l+'"');i+=a.prefix+l}}else i+=a}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/])/g,"\\$1")}function h(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function p(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function d(t,e){for(var n=(e=e||{}).strict,r=!1!==e.end,i="",o=t[t.length-1],s="string"==typeof o&&/\/$/.test(o),a=0;a<t.length;a++){var l=t[a];if("string"==typeof l)i+=u(l);else{var c=u(l.prefix),h=l.pattern;l.repeat&&(h+="(?:"+c+h+")*"),i+=h=l.optional?c?"(?:"+c+"("+h+"))?":"("+h+")?":c+"("+h+")"}}return n||(i=(s?i.slice(0,-2):i)+"(?:\\/(?=$))?"),i+=r?"$":n&&s?"":"(?=\\/|$)",new RegExp("^"+i,f(e))}function g(e,n,r){return t(n=n||[])?r||(r={}):(r=n,n=[]),e instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return p(t,e)}(e,n):t(e)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(g(t[i],e,n).source);return p(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(e,n,r):function(t,e,n){for(var r=l(t),i=d(r,n),o=0;o<r.length;o++)"string"!=typeof r[o]&&e.push(r[o]);return p(i,e)}(e,n,r)}e.parse=n,e.compile=i,e.tokensToFunction=o,e.tokensToRegExp=s;var v=L;L.default=L,L.Context=A,L.Route=R,L.sameOrigin=F;var m,y,_,b="undefined"!=typeof document,w="undefined"!=typeof window,x="undefined"!=typeof history,S="undefined"!=typeof process,E=b&&document.ontouchstart?"touchstart":"click",C=w&&!(!window.history.location&&!window.location),T=!0,O=!0,k="",M=!1,P=!1;function L(t,e){if("function"==typeof t)return L("*",t);if("function"==typeof e)for(var n=new R(t),r=1;r<arguments.length;++r)L.callbacks.push(n.middleware(arguments[r]));else"string"==typeof t?L["string"==typeof e?"redirect":"show"](t,e):L.start(t)}function I(t){return"string"!=typeof t?t:O?decodeURIComponent(t.replace(/\+/g," ")):t}function A(t,e){var n=N();"/"===t[0]&&0!==t.indexOf(n)&&(t=n+(P?"#!":"")+t);var r=t.indexOf("?");if(this.canonicalPath=t,this.path=t.replace(n,"")||"/",P&&(this.path=this.path.replace("#!","")||"/"),this.title=b&&_.document.title,this.state=e||{},this.state.path=t,this.querystring=~r?I(t.slice(r+1)):"",this.pathname=I(~r?t.slice(0,r):t),this.params={},this.hash="",!P){if(!~this.path.indexOf("#"))return;var i=this.path.split("#");this.path=this.pathname=i[0],this.hash=I(i[1])||"",this.querystring=this.querystring.split("#")[0]}}function R(t,n){(n=n||{}).strict=n.strict||M,this.path="*"===t?"(.*)":t,this.method="GET",this.regexp=e(this.path,this.keys=[],n)}L.callbacks=[],L.exits=[],L.current="",L.len=0,L.base=function(t){if(0===arguments.length)return k;k=t},L.strict=function(t){if(0===arguments.length)return M;M=t},L.start=function(t){if(t=t||{},!m&&(m=!0,_=t.window||w&&window,!1===t.dispatch&&(T=!1),!1===t.decodeURLComponents&&(O=!1),!1!==t.popstate&&w&&_.addEventListener("popstate",D,!1),!1!==t.click&&b&&_.document.addEventListener(E,j,!1),(P=!!t.hashbang)&&w&&!x&&_.addEventListener("hashchange",D,!1),T)){var e;if(C){var n=_.location;e=P&&~n.hash.indexOf("#!")?n.hash.substr(2)+n.search:P?n.search+n.hash:n.pathname+n.search+n.hash}L.replace(e,null,!0,T)}},L.stop=function(){m&&(L.current="",L.len=0,m=!1,b&&_.document.removeEventListener(E,j,!1),w&&_.removeEventListener("popstate",D,!1),w&&_.removeEventListener("hashchange",D,!1))},L.show=function(t,e,n,r){var i=new A(t,e),o=y;return y=i,L.current=i.path,!1!==n&&L.dispatch(i,o),!1!==i.handled&&!1!==r&&i.pushState(),i},L.back=function(t,e){L.len>0?(x&&_.history.back(),L.len--):t?setTimeout((function(){L.show(t,e)})):setTimeout((function(){L.show(N(),e)}))},L.redirect=function(t,e){"string"==typeof t&&"string"==typeof e&&L(t,(function(t){setTimeout((function(){L.replace(e)}),0)})),"string"==typeof t&&void 0===e&&setTimeout((function(){L.replace(t)}),0)},L.replace=function(t,e,n,r){var i=new A(t,e),o=y;return y=i,L.current=i.path,i.init=n,i.save(),!1!==r&&L.dispatch(i,o),i},L.dispatch=function(t,e){var n=0,r=0;function i(){var e=L.callbacks[n++];if(t.path===L.current)return e?void e(t,i):function(t){if(t.handled)return;var e;e=P?C&&N()+_.location.hash.replace("#!",""):C&&_.location.pathname+_.location.search;if(e===t.canonicalPath)return;L.stop(),t.handled=!1,C&&(_.location.href=t.canonicalPath)}(t);t.handled=!1}e?function t(){var n=L.exits[r++];if(!n)return i();n(e,t)}():i()},L.exit=function(t,e){if("function"==typeof t)return L.exit("*",t);for(var n=new R(t),r=1;r<arguments.length;++r)L.exits.push(n.middleware(arguments[r]))},L.Context=A,A.prototype.pushState=function(){L.len++,x&&_.history.pushState(this.state,this.title,P&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},A.prototype.save=function(){x&&"file:"!==_.location.protocol&&_.history.replaceState(this.state,this.title,P&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},L.Route=R,R.prototype.middleware=function(t){var e=this;return function(n,r){if(e.match(n.path,n.params))return t(n,r);r()}},R.prototype.match=function(t,e){var n=this.keys,r=t.indexOf("?"),i=~r?t.slice(0,r):t,o=this.regexp.exec(decodeURIComponent(i));if(!o)return!1;for(var s=1,a=o.length;s<a;++s){var l=n[s-1],c=I(o[s]);void 0===c&&hasOwnProperty.call(e,l.name)||(e[l.name]=c)}return!0};var D=function(){var t=!1;if(w)return b&&"complete"===document.readyState?t=!0:window.addEventListener("load",(function(){setTimeout((function(){t=!0}),0)})),function(e){if(t)if(e.state){var n=e.state.path;L.replace(n,e.state)}else if(C){var r=_.location;L.show(r.pathname+r.hash,void 0,void 0,!1)}}}();function j(t){if(1===function(t){return t=t||w&&window.event,null==t.which?t.button:t.which}(t)&&!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented)){var e=t.target,n=t.path||(t.composedPath?t.composedPath():null);if(n)for(var i=0;i<n.length;i++)if(n[i].nodeName&&"A"===n[i].nodeName.toUpperCase()&&n[i].href){e=n[i];break}for(;e&&"A"!==e.nodeName.toUpperCase();)e=e.parentNode;if(e&&"A"===e.nodeName.toUpperCase()){var o="object"===r(e.href)&&"SVGAnimatedString"===e.href.constructor.name;if(!e.hasAttribute("download")&&"external"!==e.getAttribute("rel")){var s=e.getAttribute("href");if((P||!function(t){if(!C)return!1;var e=_.location;return t.pathname===e.pathname&&t.search===e.search}(e)||!e.hash&&"#"!==s)&&!(s&&s.indexOf("mailto:")>-1)&&!(o?e.target.baseVal:e.target)&&(o||F(e.href))){var a=o?e.href.baseVal:e.pathname+e.search+(e.hash||"");a="/"!==a[0]?"/"+a:a,S&&a.match(/^\/[a-zA-Z]:\//)&&(a=a.replace(/^\/[a-zA-Z]:\//,"/"));var l=a,c=N();0===a.indexOf(c)&&(a=a.substr(k.length)),P&&(a=a.replace("#!","")),c&&l===a||(t.preventDefault(),L.show(l))}}}}}function F(t){if(!t||!C)return!1;var e=function(t){if("function"==typeof URL&&C)return new URL(t,location.toString());if(b){var e=document.createElement("a");return e.href=t,e}}(t),n=_.location;return n.protocol===e.protocol&&n.hostname===e.hostname&&n.port===e.port}function N(){if(k)return k;var t=w&&_&&_.location;return w&&P&&t&&"file:"===t.protocol?t.pathname:k}return L.sameOrigin=F,v})),this};const o=(new i).dispatch().page},686:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});n(4916),n(1539),n(9714),n(6977),n(5306),n(9600),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t=n.hmd(t);var i=function(){};i.prototype.dispatch=function(){var e,n,i;return e=this,n="sprintf",i=function(){var t=function(){if(!arguments||arguments.length<1)throw new Error("sprintf: ERROR: not enough arguments");for(var t,e=0,n="",i=arguments[e++];t=/^([^%]*)%(?:(\d+)\$|\((.*?)\))?([#0 +'-]+)?(\*|\d+)?(\.\*|\.\d+)?([%diouxXfFeEcs])((?:.|[\r\n])*)$/.exec(i);){var o,s=t[1],a=t[2],l=t[3],c=t[4],u=t[5],h=t[6],p=t[7],f=t[8];if("%"===p)o="%";else{var d,g=" ",v=!0;c?(c.indexOf("0")>=0&&(g="0"),c.indexOf("-")>=0&&(g=" ",v=!1)):c="";var m=-1;if(u)if("*"===u){if((d=e++)>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");m=arguments[d]}else m=parseInt(u,10);var y=-1;if(h)if(".*"===h){if((d=e++)>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");y=arguments[d]}else y=parseInt(h.substring(1),10);if(d=e++,a){if((d=parseInt(a,10))>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");o=arguments[d]}else if(l){if("object"!==r(arguments[1]))throw new Error("sprintf: ERROR: invalid non-object arguments for named argument");if(void 0===(o=arguments[1][l]))throw new Error("sprintf: ERROR: invalid undefined value for named argument")}else{if(d>=arguments.length)throw new Error("sprintf: ERROR: not enough arguments");o=arguments[d]}var _="";switch(p){case"d":case"i":"number"!=typeof o&&(o=0),o=o.toString(10),c.indexOf("#")>=0&&o>=0&&(o="+"+o),c.indexOf(" ")>=0&&o>=0&&(o=" "+o);break;case"b":"number"!=typeof o&&(o=0),o=o.toString(2);break;case"o":"number"!=typeof o&&(o=0),o=o.toString(8);break;case"u":"number"!=typeof o&&(o=0),o=(o=Math.abs(o)).toString(10);break;case"x":"number"!=typeof o&&(o=0),o=o.toString(16).toLowerCase(),c.indexOf("#")>=0&&(_="0x");break;case"X":"number"!=typeof o&&(o=0),o=o.toString(16).toUpperCase(),c.indexOf("#")>=0&&(_="0X");break;case"f":case"F":if("number"!=typeof o&&(o=0),o=0+o,y>-1&&(o.toFixed?o=o.toFixed(y):(o=Math.round(o*Math.pow(10,y))/Math.pow(10,y),o=(o+="0000000000").substr(0,o.indexOf(".")+y+1))),o=""+o,c.indexOf("'")>=0)for(var b=0,w=o.length-1-3;w>=0;w-=3)o=o.substring(0,w)+(0===b?".":",")+o.substring(w),b=(b+1)%2;break;case"e":case"E":if("number"!=typeof o&&(o=0),o=0+o,y>-1){if(!o.toExponential)throw new Error("sprintf: ERROR: toExponential() method not supported");o=o.toExponential(y)}o=""+o,"E"===p&&(o=o.replace(/e\+/,"E+"));break;case"c":"number"!=typeof o&&(o=0),o=String.fromCharCode(o);break;case"s":"string"!=typeof o&&(o=String(o)),y>-1&&(o=o.substr(0,y));break;default:throw new Error('sprintf: ERROR: invalid conversion character "'+p+'"')}var x=m-o.toString().length-_.toString().length;if(x>0){var S=new Array(x+1);v?o=S.join(g)+o:o+=S.join(g)}o=_+o}n=n+s+o,i=f}return n+i};return t.version={text:"1.2.3",major:1,minor:2,micro:3},t},"function"==typeof define?define(n,(function(){return i()})):"object"===r(t)&&"object"===r(t.exports)?t.exports=i():e[n]=i(),this};const o=(new i).dispatch().sprintf},3842:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});class r{constructor(t=[],e=i){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,r=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];for(;t<r;){let r=1+(t<<1),o=e[r];const s=r+1;if(s<this.length&&n(e[s],o)<0&&(r=s,o=e[s]),n(o,i)>=0)break;e[t]=o,t=r}e[t]=i}}function i(t,e){return t<e?-1:t>e?1:0}},5431:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}()},2126:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},2971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r,i=n(291),o=n(5990),s=n(2706),a=n(9374),l=n(4187),c=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.key=n,i.oldValue=r,i}return c(e,t),e}(i.ZP);const h=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,(0,l.sq)(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return c(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&(0,a.f0)({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:".concat(t),this.hasListener(n)&&this.dispatchEvent(new u(n,t,e)),n=o.Z.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new u(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,n){var r=this.values_||(this.values_={});if(n)r[t]=e;else{var i=r[t];r[t]=e,i!==e&&this.notify(t,i)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&(0,a.f0)(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],(0,a.xb)(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(s.Z)},5990:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={PROPERTYCHANGE:"propertychange"}},2706:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(208),o=n(5487),s=n(5818),a=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return a(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.Z.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=(0,s.oL)(this,t[i],e);return r}return(0,s.oL)(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var r=t.length;n=new Array(r);for(var i=0;i<r;++i)n[i]=(0,s.Vx)(this,t[i],e)}else n=(0,s.Vx)(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)!function(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)(0,s.bN)(t[e]);else(0,s.bN)(t)}(n);else if(Array.isArray(t))for(var r=0,i=t.length;r<i;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)},e}(i.Z);l.prototype.on,l.prototype.once,l.prototype.un;const c=l},5537:(t,e,n)=>{"use strict";function r(t,e,n){for(var r,o,s=n||i,a=0,l=t.length,c=!1;a<l;)(o=+s(t[r=a+(l-a>>1)],e))<0?a=r+1:(l=r,c=!o);return c?a:~a}function i(t,e){return t>e?1:t<e?-1:0}function o(t,e,n){var r=t.length;if(t[0]<=e)return 0;if(e<=t[r-1])return r-1;var i=void 0;if(n>0){for(i=1;i<r;++i)if(t[i]<e)return i-1}else if(n<0){for(i=1;i<r;++i)if(t[i]<=e)return i}else for(i=1;i<r;++i){if(t[i]==e)return i;if(t[i]<e)return"function"==typeof n?n(e,t[i-1],t[i])>0?i-1:i:t[i-1]-e<e-t[i]?i-1:i}return r-1}function s(t,e,n){for(;e<n;){var r=t[e];t[e]=t[n],t[n]=r,++e,--n}}function a(t,e){for(var n=Array.isArray(e)?e:[e],r=n.length,i=0;i<r;i++)t[t.length]=n[i]}function l(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function c(t,e,n){var r=e||i;return t.every((function(e,i){if(0===i)return!0;var o=r(t[i-1],e);return!(o>0||n&&0===o)}))}n.d(e,{FZ:()=>s,fS:()=>l,h7:()=>o,kK:()=>i,l7:()=>a,pT:()=>c,ry:()=>r})},8775:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>u});var r,i=n(2971),o=n(2126),s=n(6885),a=n(5818),l=n(8326),c=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const u=function(t){function e(e){var n=t.call(this)||this,r=e.element;return!r||e.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),n.element=r||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return c(e,t),e.prototype.disposeInternal=function(){(0,l.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,l.ZF)(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)(0,a.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,a.oL)(t,o.Z.POSTRENDER,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}(i.Z)},8326:(t,e,n)=>{"use strict";n.d(e,{$H:()=>s,E4:()=>i,ZF:()=>a,ep:()=>l,hF:()=>c,jy:()=>o});var r=n(177);function i(t,e,n,i){var o;return o=n&&n.length?n.shift():r.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",i)}function o(t){var e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function s(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function a(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function l(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function c(t,e){for(var n=t.childNodes,r=0;;++r){var i=n[r],o=e[r];if(!i&&!o)break;i!==o&&(i?o?t.insertBefore(o,i):(t.removeChild(i),--r):t.appendChild(o))}}},5818:(t,e,n)=>{"use strict";n.d(e,{Vx:()=>o,bN:()=>s,oL:()=>i});var r=n(9374);function i(t,e,n,r,i){if(r&&r!==t&&(n=n.bind(r)),i){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function o(t,e,n,r){return i(t,e,n,r,!0)}function s(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,r.ZH)(t))}},291:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>r});const r=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}()},5487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},208:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r,i=n(5431),o=n(291),s=n(6885),a=n(9374),l=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const c=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return l(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);-1===r.indexOf(e)&&r.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t,n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(r){var i=e?new o.ZP(t):t;i.target||(i.target=this.eventTarget_||this);var a,l=this.dispatching_||(this.dispatching_={}),c=this.pendingRemovals_||(this.pendingRemovals_={});n in l||(l[n]=0,c[n]=0),++l[n];for(var u=0,h=r.length;u<h;++u)if(!1===(a="handleEvent"in r[u]?r[u].handleEvent(i):r[u].call(this,i))||i.propagationStopped){a=!1;break}if(0==--l[n]){var p=c[n];for(delete c[n];p--;)this.removeEventListener(n,s.Zn);delete l[n]}return a}},e.prototype.disposeInternal=function(){this.listeners_&&(0,a.ZH)(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var r=n.indexOf(e);-1!==r&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=s.Zn,++this.pendingRemovals_[t]):(n.splice(r,1),0===n.length&&delete this.listeners_[t]))}},e}(i.Z)},6885:(t,e,n)=>{"use strict";n.d(e,{Dv:()=>o,Zn:()=>s,qe:()=>a,uX:()=>i});var r=n(5537);function i(){return!0}function o(){return!1}function s(){}function a(t){var e,n,i,o=!1;return function(){var s=Array.prototype.slice.call(arguments);return o&&this===i&&(0,r.fS)(s,n)||(o=!0,i=this,n=s,e=t.apply(this,arguments)),e}}},177:(t,e,n)=>{"use strict";n.d(e,{G$:()=>o,Id:()=>l,MP:()=>a,Tp:()=>c,V:()=>i,bM:()=>u,tK:()=>s});var r="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",i=-1!==r.indexOf("firefox"),o=(-1!==r.indexOf("safari")&&-1==r.indexOf("chrom")&&(r.indexOf("version/15.4")>=0||r.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==r.indexOf("webkit")&&-1==r.indexOf("edge")),s=-1!==r.indexOf("macintosh"),a="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,u=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},9374:(t,e,n)=>{"use strict";n.d(e,{KX:()=>o,ZH:()=>i,f0:()=>r,xb:()=>s});var r="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,i=arguments.length;r<i;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s])}return n};function i(t){for(var e in t)delete t[e]}var o="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function s(t){var e;for(e in t)return!1;return!e}},4187:(t,e,n)=>{"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}n.d(e,{O3:()=>r,q4:()=>s,sq:()=>o});var i=0;function o(t){return t.ol_uid||(t.ol_uid=String(++i))}var s="6.15.1"}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";n(1539),n(8674),n(1249),n(2222),n(9600),n(7327),n(4916),n(7941),n(5306),n(4747),n(8309),n(6992),n(8783),n(3948),n(561),n(7042),n(2707),n(4723),n(489),n(2419),n(6649),n(6078),n(2526),n(1817),n(9653),n(2165),n(2443),n(3680),n(3706),n(2703),n(1038),n(9714);function t(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var i=0;i<r.length;i++)"."!=r[i]&&(".."==r[i]?n.pop():n.push(r[i]));return n.join("/")}function e(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function r(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Object.keys(n).forEach((function(i){void 0===t[i]?t[i]=n[i]:e(n[i])&&e(t[i])&&Object.keys(n[i]).length>0&&r(t[i],n[i])}))}var i={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function o(){var t="undefined"!=typeof document?document:{};return r(t,i),t}var s={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function a(){var t="undefined"!=typeof window?window:{};return r(t,s),t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function u(t,e,n){return u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&c(i,n.prototype),i},u.apply(null,arguments)}function h(t){var e="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return u(t,arguments,l(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)},h(t)}var p=function(t){var e,n;function r(e){var n;return function(t){var e=t.__proto__;Object.defineProperty(t,"__proto__",{get:function(){return e},set:function(t){e.__proto__=t}})}(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n=t.call.apply(t,[this].concat(e))||this)),n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r}(h(Array));function f(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,f(t)):e.push(t)})),e}function d(t,e){return Array.prototype.filter.call(t,e)}function g(t,e){var n=a(),r=o(),i=[];if(!e&&t instanceof p)return t;if(!t)return new p(i);if("string"==typeof t){var s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var l="div";0===s.indexOf("<li")&&(l="ul"),0===s.indexOf("<tr")&&(l="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(l="tr"),0===s.indexOf("<tbody")&&(l="table"),0===s.indexOf("<option")&&(l="select");var c=r.createElement(l);c.innerHTML=s;for(var u=0;u<c.childNodes.length;u+=1)i.push(c.childNodes[u])}else i=function(t,e){if("string"!=typeof t)return[t];for(var n=[],r=e.querySelectorAll(t),i=0;i<r.length;i+=1)n.push(r[i]);return n}(t.trim(),e||r)}else if(t.nodeType||t===n||t===r)i.push(t);else if(Array.isArray(t)){if(t instanceof p)return t;i=t}return new p(function(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(i))}g.fn=p.prototype;var v="resize scroll".split(" ");function m(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(void 0===n[0]){for(var i=0;i<this.length;i+=1)v.indexOf(t)<0&&(t in this[i]?this[i][t]():g(this[i]).trigger(t));return this}return this.on.apply(this,[t].concat(n))}}m("click"),m("blur"),m("focus"),m("focusin"),m("focusout"),m("keyup"),m("keydown"),m("keypress"),m("submit"),m("change"),m("mousedown"),m("mousemove"),m("mouseup"),m("mouseenter"),m("mouseleave"),m("mouseout"),m("mouseover"),m("touchstart"),m("touchend"),m("touchmove"),m("resize"),m("scroll");var y={addClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=f(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).add.apply(e,r)})),this},removeClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=f(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).remove.apply(e,r)})),this},hasClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=f(e.map((function(t){return t.split(" ")})));return d(this,(function(t){return r.filter((function(e){return t.classList.contains(e)})).length>0})).length>0},toggleClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=f(e.map((function(t){return t.split(" ")})));this.forEach((function(t){r.forEach((function(e){t.classList.toggle(e)}))}))},attr:function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(var r in t)this[n][r]=t[r],this[n].setAttribute(r,t[r]);return this},removeAttr:function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},transform:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transform=t;return this},transition:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?t+"ms":t;return this},on:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];function a(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.indexOf(t)<0&&n.unshift(t),g(e).is(i))o.apply(e,n);else for(var r=g(e).parents(),s=0;s<r.length;s+=1)g(r[s]).is(i)&&o.apply(r[s],n)}}function l(t){var e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),o.apply(this,e)}"function"==typeof e[1]&&(r=e[0],o=e[1],s=e[2],i=void 0),s||(s=!1);for(var c,u=r.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(i)for(c=0;c<u.length;c+=1){var f=u[c];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[f]||(p.dom7LiveListeners[f]=[]),p.dom7LiveListeners[f].push({listener:o,proxyListener:a}),p.addEventListener(f,a,s)}else for(c=0;c<u.length;c+=1){var d=u[c];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[d]||(p.dom7Listeners[d]=[]),p.dom7Listeners[d].push({listener:o,proxyListener:l}),p.addEventListener(d,l,s)}}return this},off:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];"function"==typeof e[1]&&(r=e[0],o=e[1],s=e[2],i=void 0),s||(s=!1);for(var a=r.split(" "),l=0;l<a.length;l+=1)for(var c=a[l],u=0;u<this.length;u+=1){var h=this[u],p=void 0;if(!i&&h.dom7Listeners?p=h.dom7Listeners[c]:i&&h.dom7LiveListeners&&(p=h.dom7LiveListeners[c]),p&&p.length)for(var f=p.length-1;f>=0;f-=1){var d=p[f];o&&d.listener===o||o&&d.listener&&d.listener.dom7proxy&&d.listener.dom7proxy===o?(h.removeEventListener(c,d.proxyListener,s),p.splice(f,1)):o||(h.removeEventListener(c,d.proxyListener,s),p.splice(f,1))}}return this},trigger:function(){for(var t=a(),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n[0].split(" "),o=n[1],s=0;s<i.length;s+=1)for(var l=i[s],c=0;c<this.length;c+=1){var u=this[c];if(t.CustomEvent){var h=new t.CustomEvent(l,{detail:o,bubbles:!0,cancelable:!0});u.dom7EventData=n.filter((function(t,e){return e>0})),u.dispatchEvent(h),u.dom7EventData=[],delete u.dom7EventData}}return this},transitionEnd:function(t){var e=this;return t&&e.on("transitionend",(function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))})),this},outerWidth:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var t=a();return this[0]?t.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var t=a(),e=o(),n=this[0],r=n.getBoundingClientRect(),i=e.body,s=n.clientTop||i.clientTop||0,l=n.clientLeft||i.clientLeft||0,c=n===t?t.scrollY:n.scrollTop,u=n===t?t.scrollX:n.scrollLeft;return{top:r.top+c-s,left:r.left+u-l}}return null},css:function(t,e){var n,r=a();if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(var i in t)this[n].style[i]=t[i];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)this[n].style[t]=e;return this}return this},each:function(t){return t?(this.forEach((function(e,n){t.apply(e,[e,n])})),this):this},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(var e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},text:function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var e=0;e<this.length;e+=1)this[e].textContent=t;return this},is:function(t){var e,n,r=a(),i=o(),s=this[0];if(!s||void 0===t)return!1;if("string"==typeof t){if(s.matches)return s.matches(t);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(t);if(s.msMatchesSelector)return s.msMatchesSelector(t);for(e=g(t),n=0;n<e.length;n+=1)if(e[n]===s)return!0;return!1}if(t===i)return s===i;if(t===r)return s===r;if(t.nodeType||t instanceof p){for(e=t.nodeType?[t]:t,n=0;n<e.length;n+=1)if(e[n]===s)return!0;return!1}return!1},index:function(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},eq:function(t){if(void 0===t)return this;var e=this.length;if(t>e-1)return g([]);if(t<0){var n=e+t;return g(n<0?[]:[this[n]])}return g([this[t]])},append:function(){for(var t,e=o(),n=0;n<arguments.length;n+=1){t=n<0||arguments.length<=n?void 0:arguments[n];for(var r=0;r<this.length;r+=1)if("string"==typeof t){var i=e.createElement("div");for(i.innerHTML=t;i.firstChild;)this[r].appendChild(i.firstChild)}else if(t instanceof p)for(var s=0;s<t.length;s+=1)this[r].appendChild(t[s]);else this[r].appendChild(t)}return this},prepend:function(t){var e,n,r=o();for(e=0;e<this.length;e+=1)if("string"==typeof t){var i=r.createElement("div");for(i.innerHTML=t,n=i.childNodes.length-1;n>=0;n-=1)this[e].insertBefore(i.childNodes[n],this[e].childNodes[0])}else if(t instanceof p)for(n=0;n<t.length;n+=1)this[e].insertBefore(t[n],this[e].childNodes[0]);else this[e].insertBefore(t,this[e].childNodes[0]);return this},next:function(t){return this.length>0?t?this[0].nextElementSibling&&g(this[0].nextElementSibling).is(t)?g([this[0].nextElementSibling]):g([]):this[0].nextElementSibling?g([this[0].nextElementSibling]):g([]):g([])},nextAll:function(t){var e=[],n=this[0];if(!n)return g([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;t?g(r).is(t)&&e.push(r):e.push(r),n=r}return g(e)},prev:function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&g(e.previousElementSibling).is(t)?g([e.previousElementSibling]):g([]):e.previousElementSibling?g([e.previousElementSibling]):g([])}return g([])},prevAll:function(t){var e=[],n=this[0];if(!n)return g([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;t?g(r).is(t)&&e.push(r):e.push(r),n=r}return g(e)},parent:function(t){for(var e=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?g(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return g(e)},parents:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)t?g(r).is(t)&&e.push(r):e.push(r),r=r.parentNode;return g(e)},closest:function(t){var e=this;return void 0===t?g([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(t),i=0;i<r.length;i+=1)e.push(r[i]);return g(e)},children:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)t&&!g(r[i]).is(t)||e.push(r[i]);return g(e)},filter:function(t){return g(d(this,t))},remove:function(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}};Object.keys(y).forEach((function(t){Object.defineProperty(g.fn,t,{value:y[t],writable:!0})}));const _=g;function b(t,e){return void 0===e&&(e=0),setTimeout(t,e)}function w(){return Date.now()}function x(t,e){void 0===e&&(e="x");var n,r,i,o=a(),s=function(t){var e,n=a();return n.getComputedStyle&&(e=n.getComputedStyle(t,null)),!e&&t.currentStyle&&(e=t.currentStyle),e||(e=t.style),e}(t);return o.WebKitCSSMatrix?((r=s.transform||s.webkitTransform).split(",").length>6&&(r=r.split(", ").map((function(t){return t.replace(",",".")})).join(", ")),i=new o.WebKitCSSMatrix("none"===r?"":r)):n=(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===e&&(r=o.WebKitCSSMatrix?i.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===e&&(r=o.WebKitCSSMatrix?i.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),r||0}function S(t){return"object"==typeof t&&null!==t&&t.constructor&&"Object"===Object.prototype.toString.call(t).slice(8,-1)}function E(){for(var t=Object(arguments.length<=0?void 0:arguments[0]),e=["__proto__","constructor","prototype"],n="undefined"!=typeof window?window.HTMLElement:void 0,r=1;r<arguments.length;r+=1){var i=r<0||arguments.length<=r?void 0:arguments[r];if(null!=i&&!(n&&i instanceof n))for(var o=Object.keys(Object(i)).filter((function(t){return e.indexOf(t)<0})),s=0,a=o.length;s<a;s+=1){var l=o[s],c=Object.getOwnPropertyDescriptor(i,l);void 0!==c&&c.enumerable&&(S(t[l])&&S(i[l])?i[l].__swiper__?t[l]=i[l]:E(t[l],i[l]):!S(t[l])&&S(i[l])?(t[l]={},i[l].__swiper__?t[l]=i[l]:E(t[l],i[l])):t[l]=i[l])}}return t}function C(t,e){Object.keys(e).forEach((function(n){S(e[n])&&Object.keys(e[n]).forEach((function(r){"function"==typeof e[n][r]&&(e[n][r]=e[n][r].bind(t))})),t[n]=e[n]}))}function T(t){return void 0===t&&(t=""),"."+t.trim().replace(/([\.:\/])/g,"\\$1").replace(/ /g,".")}function O(t,e,n,r){var i=o();return n&&Object.keys(r).forEach((function(n){if(!e[n]&&!0===e.auto){var o=i.createElement("div");o.className=r[n],t.append(o),e[n]=o}})),e}var k,M,P;function L(){return k||(k=function(){var t=a(),e=o();return{touch:!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!!t.PointerEvent&&"maxTouchPoints"in t.navigator&&t.navigator.maxTouchPoints>=0,observer:"MutationObserver"in t||"WebkitMutationObserver"in t,passiveListener:function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,n)}catch(t){}return e}(),gestures:"ongesturestart"in t}}()),k}function I(t){return void 0===t&&(t={}),M||(M=function(t){var e=(void 0===t?{}:t).userAgent,n=L(),r=a(),i=r.navigator.platform,o=e||r.navigator.userAgent,s={ios:!1,android:!1},l=r.screen.width,c=r.screen.height,u=o.match(/(Android);?[\s\/]+([\d.]+)?/),h=o.match(/(iPad).*OS\s([\d_]+)/),p=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!h&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),d="Win32"===i,g="MacIntel"===i;return!h&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(l+"x"+c)>=0&&((h=o.match(/(Version)\/([\d.]+)/))||(h=[0,1,"13_0_0"]),g=!1),u&&!d&&(s.os="android",s.android=!0),(h||f||p)&&(s.os="ios",s.ios=!0),s}(t)),M}function A(){return P||(P=function(){var t,e=a();return{isEdge:!!e.navigator.userAgent.match(/Edge/g),isSafari:(t=e.navigator.userAgent.toLowerCase(),t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),P}const R={name:"resize",create:function(){var t=this;E(t,{resize:{observer:null,createObserver:function(){t&&!t.destroyed&&t.initialized&&(t.resize.observer=new ResizeObserver((function(e){var n=t.width,r=t.height,i=n,o=r;e.forEach((function(e){var n=e.contentBoxSize,r=e.contentRect,s=e.target;s&&s!==t.el||(i=r?r.width:(n[0]||n).inlineSize,o=r?r.height:(n[0]||n).blockSize)})),i===n&&o===r||t.resize.resizeHandler()})),t.resize.observer.observe(t.el))},removeObserver:function(){t.resize.observer&&t.resize.observer.unobserve&&t.el&&(t.resize.observer.unobserve(t.el),t.resize.observer=null)},resizeHandler:function(){t&&!t.destroyed&&t.initialized&&(t.emit("beforeResize"),t.emit("resize"))},orientationChangeHandler:function(){t&&!t.destroyed&&t.initialized&&t.emit("orientationchange")}}})},on:{init:function(t){var e=a();t.params.resizeObserver&&void 0!==a().ResizeObserver?t.resize.createObserver():(e.addEventListener("resize",t.resize.resizeHandler),e.addEventListener("orientationchange",t.resize.orientationChangeHandler))},destroy:function(t){var e=a();t.resize.removeObserver(),e.removeEventListener("resize",t.resize.resizeHandler),e.removeEventListener("orientationchange",t.resize.orientationChangeHandler)}}};function D(){return D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},D.apply(this,arguments)}var j={attach:function(t,e){void 0===e&&(e={});var n=a(),r=this,i=new(n.MutationObserver||n.WebkitMutationObserver)((function(t){if(1!==t.length){var e=function(){r.emit("observerUpdate",t[0])};n.requestAnimationFrame?n.requestAnimationFrame(e):n.setTimeout(e,0)}else r.emit("observerUpdate",t[0])}));i.observe(t,{attributes:void 0===e.attributes||e.attributes,childList:void 0===e.childList||e.childList,characterData:void 0===e.characterData||e.characterData}),r.observer.observers.push(i)},init:function(){var t=this;if(t.support.observer&&t.params.observer){if(t.params.observeParents)for(var e=t.$el.parents(),n=0;n<e.length;n+=1)t.observer.attach(e[n]);t.observer.attach(t.$el[0],{childList:t.params.observeSlideChildren}),t.observer.attach(t.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach((function(t){t.disconnect()})),this.observer.observers=[]}};const F={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){C(this,{observer:D({},j,{observers:[]})})},on:{init:function(t){t.observer.init()},destroy:function(t){t.observer.destroy()}}},N={useParams:function(t){var e=this;e.modules&&Object.keys(e.modules).forEach((function(n){var r=e.modules[n];r.params&&E(t,r.params)}))},useModules:function(t){void 0===t&&(t={});var e=this;e.modules&&Object.keys(e.modules).forEach((function(n){var r=e.modules[n],i=t[n]||{};r.on&&e.on&&Object.keys(r.on).forEach((function(t){e.on(t,r.on[t])})),r.create&&r.create.bind(e)(i)}))}},B={on:function(t,e,n){var r=this;if("function"!=typeof e)return r;var i=n?"unshift":"push";return t.split(" ").forEach((function(t){r.eventsListeners[t]||(r.eventsListeners[t]=[]),r.eventsListeners[t][i](e)})),r},once:function(t,e,n){var r=this;if("function"!=typeof e)return r;function i(){r.off(t,i),i.__emitterProxy&&delete i.__emitterProxy;for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];e.apply(r,o)}return i.__emitterProxy=e,r.on(t,i,n)},onAny:function(t,e){var n=this;if("function"!=typeof t)return n;var r=e?"unshift":"push";return n.eventsAnyListeners.indexOf(t)<0&&n.eventsAnyListeners[r](t),n},offAny:function(t){var e=this;if(!e.eventsAnyListeners)return e;var n=e.eventsAnyListeners.indexOf(t);return n>=0&&e.eventsAnyListeners.splice(n,1),e},off:function(t,e){var n=this;return n.eventsListeners?(t.split(" ").forEach((function(t){void 0===e?n.eventsListeners[t]=[]:n.eventsListeners[t]&&n.eventsListeners[t].forEach((function(r,i){(r===e||r.__emitterProxy&&r.__emitterProxy===e)&&n.eventsListeners[t].splice(i,1)}))})),n):n},emit:function(){var t,e,n,r=this;if(!r.eventsListeners)return r;for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return"string"==typeof o[0]||Array.isArray(o[0])?(t=o[0],e=o.slice(1,o.length),n=r):(t=o[0].events,e=o[0].data,n=o[0].context||r),e.unshift(n),(Array.isArray(t)?t:t.split(" ")).forEach((function(t){r.eventsAnyListeners&&r.eventsAnyListeners.length&&r.eventsAnyListeners.forEach((function(r){r.apply(n,[t].concat(e))})),r.eventsListeners&&r.eventsListeners[t]&&r.eventsListeners[t].forEach((function(t){t.apply(n,e)}))})),r}};const z={updateSize:function(){var t,e,n=this,r=n.$el;t=void 0!==n.params.width&&null!==n.params.width?n.params.width:r[0].clientWidth,e=void 0!==n.params.height&&null!==n.params.height?n.params.height:r[0].clientHeight,0===t&&n.isHorizontal()||0===e&&n.isVertical()||(t=t-parseInt(r.css("padding-left")||0,10)-parseInt(r.css("padding-right")||0,10),e=e-parseInt(r.css("padding-top")||0,10)-parseInt(r.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(e)&&(e=0),E(n,{width:t,height:e,size:n.isHorizontal()?t:e}))},updateSlides:function(){var t=this;function e(e){return t.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}function n(t,n){return parseFloat(t.getPropertyValue(e(n))||0)}var r=t.params,i=t.$wrapperEl,o=t.size,s=t.rtlTranslate,a=t.wrongRTL,l=t.virtual&&r.virtual.enabled,c=l?t.virtual.slides.length:t.slides.length,u=i.children("."+t.params.slideClass),h=l?t.virtual.slides.length:u.length,p=[],f=[],d=[],g=r.slidesOffsetBefore;"function"==typeof g&&(g=r.slidesOffsetBefore.call(t));var v=r.slidesOffsetAfter;"function"==typeof v&&(v=r.slidesOffsetAfter.call(t));var m=t.snapGrid.length,y=t.slidesGrid.length,_=r.spaceBetween,b=-g,w=0,x=0;if(void 0!==o){var S,C;"string"==typeof _&&_.indexOf("%")>=0&&(_=parseFloat(_.replace("%",""))/100*o),t.virtualSize=-_,s?u.css({marginLeft:"",marginTop:""}):u.css({marginRight:"",marginBottom:""}),r.slidesPerColumn>1&&(S=Math.floor(h/r.slidesPerColumn)===h/t.params.slidesPerColumn?h:Math.ceil(h/r.slidesPerColumn)*r.slidesPerColumn,"auto"!==r.slidesPerView&&"row"===r.slidesPerColumnFill&&(S=Math.max(S,r.slidesPerView*r.slidesPerColumn)));for(var T,O,k,M=r.slidesPerColumn,P=S/M,L=Math.floor(h/r.slidesPerColumn),I=0;I<h;I+=1){C=0;var A=u.eq(I);if(r.slidesPerColumn>1){var R=void 0,D=void 0,j=void 0;if("row"===r.slidesPerColumnFill&&r.slidesPerGroup>1){var F=Math.floor(I/(r.slidesPerGroup*r.slidesPerColumn)),N=I-r.slidesPerColumn*r.slidesPerGroup*F,B=0===F?r.slidesPerGroup:Math.min(Math.ceil((h-F*M*r.slidesPerGroup)/M),r.slidesPerGroup);R=(D=N-(j=Math.floor(N/B))*B+F*r.slidesPerGroup)+j*S/M,A.css({"-webkit-box-ordinal-group":R,"-moz-box-ordinal-group":R,"-ms-flex-order":R,"-webkit-order":R,order:R})}else"column"===r.slidesPerColumnFill?(j=I-(D=Math.floor(I/M))*M,(D>L||D===L&&j===M-1)&&(j+=1)>=M&&(j=0,D+=1)):D=I-(j=Math.floor(I/P))*P;A.css(e("margin-top"),0!==j?r.spaceBetween&&r.spaceBetween+"px":"")}if("none"!==A.css("display")){if("auto"===r.slidesPerView){var z=getComputedStyle(A[0]),G=A[0].style.transform,X=A[0].style.webkitTransform;if(G&&(A[0].style.transform="none"),X&&(A[0].style.webkitTransform="none"),r.roundLengths)C=t.isHorizontal()?A.outerWidth(!0):A.outerHeight(!0);else{var U=n(z,"width"),H=n(z,"padding-left"),q=n(z,"padding-right"),Z=n(z,"margin-left"),W=n(z,"margin-right"),V=z.getPropertyValue("box-sizing");if(V&&"border-box"===V)C=U+Z+W;else{var Y=A[0],K=Y.clientWidth;C=U+H+q+Z+W+(Y.offsetWidth-K)}}G&&(A[0].style.transform=G),X&&(A[0].style.webkitTransform=X),r.roundLengths&&(C=Math.floor(C))}else C=(o-(r.slidesPerView-1)*_)/r.slidesPerView,r.roundLengths&&(C=Math.floor(C)),u[I]&&(u[I].style[e("width")]=C+"px");u[I]&&(u[I].swiperSlideSize=C),d.push(C),r.centeredSlides?(b=b+C/2+w/2+_,0===w&&0!==I&&(b=b-o/2-_),0===I&&(b=b-o/2-_),Math.abs(b)<.001&&(b=0),r.roundLengths&&(b=Math.floor(b)),x%r.slidesPerGroup==0&&p.push(b),f.push(b)):(r.roundLengths&&(b=Math.floor(b)),(x-Math.min(t.params.slidesPerGroupSkip,x))%t.params.slidesPerGroup==0&&p.push(b),f.push(b),b=b+C+_),t.virtualSize+=C+_,w=C,x+=1}}if(t.virtualSize=Math.max(t.virtualSize,o)+v,s&&a&&("slide"===r.effect||"coverflow"===r.effect)&&i.css({width:t.virtualSize+r.spaceBetween+"px"}),r.setWrapperSize)i.css(((O={})[e("width")]=t.virtualSize+r.spaceBetween+"px",O));if(r.slidesPerColumn>1)if(t.virtualSize=(C+r.spaceBetween)*S,t.virtualSize=Math.ceil(t.virtualSize/r.slidesPerColumn)-r.spaceBetween,i.css(((k={})[e("width")]=t.virtualSize+r.spaceBetween+"px",k)),r.centeredSlides){T=[];for(var $=0;$<p.length;$+=1){var J=p[$];r.roundLengths&&(J=Math.floor(J)),p[$]<t.virtualSize+p[0]&&T.push(J)}p=T}if(!r.centeredSlides){T=[];for(var Q=0;Q<p.length;Q+=1){var tt=p[Q];r.roundLengths&&(tt=Math.floor(tt)),p[Q]<=t.virtualSize-o&&T.push(tt)}p=T,Math.floor(t.virtualSize-o)-Math.floor(p[p.length-1])>1&&p.push(t.virtualSize-o)}if(0===p.length&&(p=[0]),0!==r.spaceBetween){var et,nt=t.isHorizontal()&&s?"marginLeft":e("marginRight");u.filter((function(t,e){return!r.cssMode||e!==u.length-1})).css(((et={})[nt]=_+"px",et))}if(r.centeredSlides&&r.centeredSlidesBounds){var rt=0;d.forEach((function(t){rt+=t+(r.spaceBetween?r.spaceBetween:0)}));var it=(rt-=r.spaceBetween)-o;p=p.map((function(t){return t<0?-g:t>it?it+v:t}))}if(r.centerInsufficientSlides){var ot=0;if(d.forEach((function(t){ot+=t+(r.spaceBetween?r.spaceBetween:0)})),(ot-=r.spaceBetween)<o){var st=(o-ot)/2;p.forEach((function(t,e){p[e]=t-st})),f.forEach((function(t,e){f[e]=t+st}))}}E(t,{slides:u,snapGrid:p,slidesGrid:f,slidesSizesGrid:d}),h!==c&&t.emit("slidesLengthChange"),p.length!==m&&(t.params.watchOverflow&&t.checkOverflow(),t.emit("snapGridLengthChange")),f.length!==y&&t.emit("slidesGridLengthChange"),(r.watchSlidesProgress||r.watchSlidesVisibility)&&t.updateSlidesOffset()}},updateAutoHeight:function(t){var e,n=this,r=[],i=n.virtual&&n.params.virtual.enabled,o=0;"number"==typeof t?n.setTransition(t):!0===t&&n.setTransition(n.params.speed);var s=function(t){return i?n.slides.filter((function(e){return parseInt(e.getAttribute("data-swiper-slide-index"),10)===t}))[0]:n.slides.eq(t)[0]};if("auto"!==n.params.slidesPerView&&n.params.slidesPerView>1)if(n.params.centeredSlides)n.visibleSlides.each((function(t){r.push(t)}));else for(e=0;e<Math.ceil(n.params.slidesPerView);e+=1){var a=n.activeIndex+e;if(a>n.slides.length&&!i)break;r.push(s(a))}else r.push(s(n.activeIndex));for(e=0;e<r.length;e+=1)if(void 0!==r[e]){var l=r[e].offsetHeight;o=l>o?l:o}o&&n.$wrapperEl.css("height",o+"px")},updateSlidesOffset:function(){for(var t=this.slides,e=0;e<t.length;e+=1)t[e].swiperSlideOffset=this.isHorizontal()?t[e].offsetLeft:t[e].offsetTop},updateSlidesProgress:function(t){void 0===t&&(t=this&&this.translate||0);var e=this,n=e.params,r=e.slides,i=e.rtlTranslate;if(0!==r.length){void 0===r[0].swiperSlideOffset&&e.updateSlidesOffset();var o=-t;i&&(o=t),r.removeClass(n.slideVisibleClass),e.visibleSlidesIndexes=[],e.visibleSlides=[];for(var s=0;s<r.length;s+=1){var a=r[s],l=(o+(n.centeredSlides?e.minTranslate():0)-a.swiperSlideOffset)/(a.swiperSlideSize+n.spaceBetween);if(n.watchSlidesVisibility||n.centeredSlides&&n.autoHeight){var c=-(o-a.swiperSlideOffset),u=c+e.slidesSizesGrid[s];(c>=0&&c<e.size-1||u>1&&u<=e.size||c<=0&&u>=e.size)&&(e.visibleSlides.push(a),e.visibleSlidesIndexes.push(s),r.eq(s).addClass(n.slideVisibleClass))}a.progress=i?-l:l}e.visibleSlides=_(e.visibleSlides)}},updateProgress:function(t){var e=this;if(void 0===t){var n=e.rtlTranslate?-1:1;t=e&&e.translate&&e.translate*n||0}var r=e.params,i=e.maxTranslate()-e.minTranslate(),o=e.progress,s=e.isBeginning,a=e.isEnd,l=s,c=a;0===i?(o=0,s=!0,a=!0):(s=(o=(t-e.minTranslate())/i)<=0,a=o>=1),E(e,{progress:o,isBeginning:s,isEnd:a}),(r.watchSlidesProgress||r.watchSlidesVisibility||r.centeredSlides&&r.autoHeight)&&e.updateSlidesProgress(t),s&&!l&&e.emit("reachBeginning toEdge"),a&&!c&&e.emit("reachEnd toEdge"),(l&&!s||c&&!a)&&e.emit("fromEdge"),e.emit("progress",o)},updateSlidesClasses:function(){var t,e=this,n=e.slides,r=e.params,i=e.$wrapperEl,o=e.activeIndex,s=e.realIndex,a=e.virtual&&r.virtual.enabled;n.removeClass(r.slideActiveClass+" "+r.slideNextClass+" "+r.slidePrevClass+" "+r.slideDuplicateActiveClass+" "+r.slideDuplicateNextClass+" "+r.slideDuplicatePrevClass),(t=a?e.$wrapperEl.find("."+r.slideClass+'[data-swiper-slide-index="'+o+'"]'):n.eq(o)).addClass(r.slideActiveClass),r.loop&&(t.hasClass(r.slideDuplicateClass)?i.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+s+'"]').addClass(r.slideDuplicateActiveClass):i.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+s+'"]').addClass(r.slideDuplicateActiveClass));var l=t.nextAll("."+r.slideClass).eq(0).addClass(r.slideNextClass);r.loop&&0===l.length&&(l=n.eq(0)).addClass(r.slideNextClass);var c=t.prevAll("."+r.slideClass).eq(0).addClass(r.slidePrevClass);r.loop&&0===c.length&&(c=n.eq(-1)).addClass(r.slidePrevClass),r.loop&&(l.hasClass(r.slideDuplicateClass)?i.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass):i.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass),c.hasClass(r.slideDuplicateClass)?i.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass):i.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+c.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(t){var e,n=this,r=n.rtlTranslate?n.translate:-n.translate,i=n.slidesGrid,o=n.snapGrid,s=n.params,a=n.activeIndex,l=n.realIndex,c=n.snapIndex,u=t;if(void 0===u){for(var h=0;h<i.length;h+=1)void 0!==i[h+1]?r>=i[h]&&r<i[h+1]-(i[h+1]-i[h])/2?u=h:r>=i[h]&&r<i[h+1]&&(u=h+1):r>=i[h]&&(u=h);s.normalizeSlideIndex&&(u<0||void 0===u)&&(u=0)}if(o.indexOf(r)>=0)e=o.indexOf(r);else{var p=Math.min(s.slidesPerGroupSkip,u);e=p+Math.floor((u-p)/s.slidesPerGroup)}if(e>=o.length&&(e=o.length-1),u!==a){var f=parseInt(n.slides.eq(u).attr("data-swiper-slide-index")||u,10);E(n,{snapIndex:e,realIndex:f,previousIndex:a,activeIndex:u}),n.emit("activeIndexChange"),n.emit("snapIndexChange"),l!==f&&n.emit("realIndexChange"),(n.initialized||n.params.runCallbacksOnInit)&&n.emit("slideChange")}else e!==c&&(n.snapIndex=e,n.emit("snapIndexChange"))},updateClickedSlide:function(t){var e,n=this,r=n.params,i=_(t.target).closest("."+r.slideClass)[0],o=!1;if(i)for(var s=0;s<n.slides.length;s+=1)if(n.slides[s]===i){o=!0,e=s;break}if(!i||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(_(i).attr("data-swiper-slide-index"),10):n.clickedIndex=e,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};const G={getTranslate:function(t){void 0===t&&(t=this.isHorizontal()?"x":"y");var e=this,n=e.params,r=e.rtlTranslate,i=e.translate,o=e.$wrapperEl;if(n.virtualTranslate)return r?-i:i;if(n.cssMode)return i;var s=x(o[0],t);return r&&(s=-s),s||0},setTranslate:function(t,e){var n=this,r=n.rtlTranslate,i=n.params,o=n.$wrapperEl,s=n.wrapperEl,a=n.progress,l=0,c=0;n.isHorizontal()?l=r?-t:t:c=t,i.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),i.cssMode?s[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:i.virtualTranslate||o.transform("translate3d("+l+"px, "+c+"px, 0px)"),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c;var u=n.maxTranslate()-n.minTranslate();(0===u?0:(t-n.minTranslate())/u)!==a&&n.updateProgress(t),n.emit("setTranslate",n.translate,e)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(t,e,n,r,i){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);var o=this,s=o.params,a=o.wrapperEl;if(o.animating&&s.preventInteractionOnTransition)return!1;var l,c=o.minTranslate(),u=o.maxTranslate();if(l=r&&t>c?c:r&&t<u?u:t,o.updateProgress(l),s.cssMode){var h,p=o.isHorizontal();if(0===e)a[p?"scrollLeft":"scrollTop"]=-l;else if(a.scrollTo)a.scrollTo(((h={})[p?"left":"top"]=-l,h.behavior="smooth",h));else a[p?"scrollLeft":"scrollTop"]=-l;return!0}return 0===e?(o.setTransition(0),o.setTranslate(l),n&&(o.emit("beforeTransitionStart",e,i),o.emit("transitionEnd"))):(o.setTransition(e),o.setTranslate(l),n&&(o.emit("beforeTransitionStart",e,i),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(t){o&&!o.destroyed&&t.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd))),!0}};const X={slideTo:function(t,e,n,r,i){if(void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0),"number"!=typeof t&&"string"!=typeof t)throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. ["+typeof t+"] given.");if("string"==typeof t){var o=parseInt(t,10);if(!isFinite(o))throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. ["+t+"] given.");t=o}var s=this,a=t;a<0&&(a=0);var l=s.params,c=s.snapGrid,u=s.slidesGrid,h=s.previousIndex,p=s.activeIndex,f=s.rtlTranslate,d=s.wrapperEl,g=s.enabled;if(s.animating&&l.preventInteractionOnTransition||!g&&!r&&!i)return!1;var v=Math.min(s.params.slidesPerGroupSkip,a),m=v+Math.floor((a-v)/s.params.slidesPerGroup);m>=c.length&&(m=c.length-1),(p||l.initialSlide||0)===(h||0)&&n&&s.emit("beforeSlideChangeStart");var y,_=-c[m];if(s.updateProgress(_),l.normalizeSlideIndex)for(var b=0;b<u.length;b+=1){var w=-Math.floor(100*_),x=Math.floor(100*u[b]),S=Math.floor(100*u[b+1]);void 0!==u[b+1]?w>=x&&w<S-(S-x)/2?a=b:w>=x&&w<S&&(a=b+1):w>=x&&(a=b)}if(s.initialized&&a!==p){if(!s.allowSlideNext&&_<s.translate&&_<s.minTranslate())return!1;if(!s.allowSlidePrev&&_>s.translate&&_>s.maxTranslate()&&(p||0)!==a)return!1}if(y=a>p?"next":a<p?"prev":"reset",f&&-_===s.translate||!f&&_===s.translate)return s.updateActiveIndex(a),l.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==l.effect&&s.setTranslate(_),"reset"!==y&&(s.transitionStart(n,y),s.transitionEnd(n,y)),!1;if(l.cssMode){var E,C=s.isHorizontal(),T=-_;if(f&&(T=d.scrollWidth-d.offsetWidth-T),0===e)d[C?"scrollLeft":"scrollTop"]=T;else if(d.scrollTo)d.scrollTo(((E={})[C?"left":"top"]=T,E.behavior="smooth",E));else d[C?"scrollLeft":"scrollTop"]=T;return!0}return 0===e?(s.setTransition(0),s.setTranslate(_),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",e,r),s.transitionStart(n,y),s.transitionEnd(n,y)):(s.setTransition(e),s.setTranslate(_),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",e,r),s.transitionStart(n,y),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(t){s&&!s.destroyed&&t.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(n,y))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0);var i=this,o=t;return i.params.loop&&(o+=i.loopedSlides),i.slideTo(o,e,n,r)},slideNext:function(t,e,n){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0);var r=this,i=r.params,o=r.animating;if(!r.enabled)return r;var s=r.activeIndex<i.slidesPerGroupSkip?1:i.slidesPerGroup;if(i.loop){if(o&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return r.slideTo(r.activeIndex+s,t,e,n)},slidePrev:function(t,e,n){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0);var r=this,i=r.params,o=r.animating,s=r.snapGrid,a=r.slidesGrid,l=r.rtlTranslate;if(!r.enabled)return r;if(i.loop){if(o&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}function c(t){return t<0?-Math.floor(Math.abs(t)):Math.floor(t)}var u,h=c(l?r.translate:-r.translate),p=s.map((function(t){return c(t)})),f=s[p.indexOf(h)-1];return void 0===f&&i.cssMode&&s.forEach((function(t){!f&&h>=t&&(f=t)})),void 0!==f&&(u=a.indexOf(f))<0&&(u=r.activeIndex-1),r.slideTo(u,t,e,n)},slideReset:function(t,e,n){return void 0===t&&(t=this.params.speed),void 0===e&&(e=!0),this.slideTo(this.activeIndex,t,e,n)},slideToClosest:function(t,e,n,r){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0),void 0===r&&(r=.5);var i=this,o=i.activeIndex,s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){var c=i.snapGrid[a];l-c>(i.snapGrid[a+1]-c)*r&&(o+=i.params.slidesPerGroup)}else{var u=i.snapGrid[a-1];l-u<=(i.snapGrid[a]-u)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,t,e,n)},slideToClickedSlide:function(){var t,e=this,n=e.params,r=e.$wrapperEl,i="auto"===n.slidesPerView?e.slidesPerViewDynamic():n.slidesPerView,o=e.clickedIndex;if(n.loop){if(e.animating)return;t=parseInt(_(e.clickedSlide).attr("data-swiper-slide-index"),10),n.centeredSlides?o<e.loopedSlides-i/2||o>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),o=r.children("."+n.slideClass+'[data-swiper-slide-index="'+t+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),b((function(){e.slideTo(o)}))):e.slideTo(o):o>e.slides.length-i?(e.loopFix(),o=r.children("."+n.slideClass+'[data-swiper-slide-index="'+t+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),b((function(){e.slideTo(o)}))):e.slideTo(o)}else e.slideTo(o)}};const U={loopCreate:function(){var t=this,e=o(),n=t.params,r=t.$wrapperEl;r.children("."+n.slideClass+"."+n.slideDuplicateClass).remove();var i=r.children("."+n.slideClass);if(n.loopFillGroupWithBlank){var s=n.slidesPerGroup-i.length%n.slidesPerGroup;if(s!==n.slidesPerGroup){for(var a=0;a<s;a+=1){var l=_(e.createElement("div")).addClass(n.slideClass+" "+n.slideBlankClass);r.append(l)}i=r.children("."+n.slideClass)}}"auto"!==n.slidesPerView||n.loopedSlides||(n.loopedSlides=i.length),t.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),t.loopedSlides+=n.loopAdditionalSlides,t.loopedSlides>i.length&&(t.loopedSlides=i.length);var c=[],u=[];i.each((function(e,n){var r=_(e);n<t.loopedSlides&&u.push(e),n<i.length&&n>=i.length-t.loopedSlides&&c.push(e),r.attr("data-swiper-slide-index",n)}));for(var h=0;h<u.length;h+=1)r.append(_(u[h].cloneNode(!0)).addClass(n.slideDuplicateClass));for(var p=c.length-1;p>=0;p-=1)r.prepend(_(c[p].cloneNode(!0)).addClass(n.slideDuplicateClass))},loopFix:function(){var t=this;t.emit("beforeLoopFix");var e,n=t.activeIndex,r=t.slides,i=t.loopedSlides,o=t.allowSlidePrev,s=t.allowSlideNext,a=t.snapGrid,l=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var c=-a[n]-t.getTranslate();if(n<i)e=r.length-3*i+n,e+=i,t.slideTo(e,0,!1,!0)&&0!==c&&t.setTranslate((l?-t.translate:t.translate)-c);else if(n>=r.length-i){e=-r.length+n+i,e+=i,t.slideTo(e,0,!1,!0)&&0!==c&&t.setTranslate((l?-t.translate:t.translate)-c)}t.allowSlidePrev=o,t.allowSlideNext=s,t.emit("loopFix")},loopDestroy:function(){var t=this,e=t.$wrapperEl,n=t.params,r=t.slides;e.children("."+n.slideClass+"."+n.slideDuplicateClass+",."+n.slideClass+"."+n.slideBlankClass).remove(),r.removeAttr("data-swiper-slide-index")}};const H={appendSlide:function(t){var e=this,n=e.$wrapperEl,r=e.params;if(r.loop&&e.loopDestroy(),"object"==typeof t&&"length"in t)for(var i=0;i<t.length;i+=1)t[i]&&n.append(t[i]);else n.append(t);r.loop&&e.loopCreate(),r.observer&&e.support.observer||e.update()},prependSlide:function(t){var e=this,n=e.params,r=e.$wrapperEl,i=e.activeIndex;n.loop&&e.loopDestroy();var o=i+1;if("object"==typeof t&&"length"in t){for(var s=0;s<t.length;s+=1)t[s]&&r.prepend(t[s]);o=i+t.length}else r.prepend(t);n.loop&&e.loopCreate(),n.observer&&e.support.observer||e.update(),e.slideTo(o,0,!1)},addSlide:function(t,e){var n=this,r=n.$wrapperEl,i=n.params,o=n.activeIndex;i.loop&&(o-=n.loopedSlides,n.loopDestroy(),n.slides=r.children("."+i.slideClass));var s=n.slides.length;if(t<=0)n.prependSlide(e);else if(t>=s)n.appendSlide(e);else{for(var a=o>t?o+1:o,l=[],c=s-1;c>=t;c-=1){var u=n.slides.eq(c);u.remove(),l.unshift(u)}if("object"==typeof e&&"length"in e){for(var h=0;h<e.length;h+=1)e[h]&&r.append(e[h]);a=o>t?o+e.length:o}else r.append(e);for(var p=0;p<l.length;p+=1)r.append(l[p]);i.loop&&n.loopCreate(),i.observer&&n.support.observer||n.update(),i.loop?n.slideTo(a+n.loopedSlides,0,!1):n.slideTo(a,0,!1)}},removeSlide:function(t){var e=this,n=e.params,r=e.$wrapperEl,i=e.activeIndex;n.loop&&(i-=e.loopedSlides,e.loopDestroy(),e.slides=r.children("."+n.slideClass));var o,s=i;if("object"==typeof t&&"length"in t){for(var a=0;a<t.length;a+=1)o=t[a],e.slides[o]&&e.slides.eq(o).remove(),o<s&&(s-=1);s=Math.max(s,0)}else o=t,e.slides[o]&&e.slides.eq(o).remove(),o<s&&(s-=1),s=Math.max(s,0);n.loop&&e.loopCreate(),n.observer&&e.support.observer||e.update(),n.loop?e.slideTo(s+e.loopedSlides,0,!1):e.slideTo(s,0,!1)},removeAllSlides:function(){for(var t=[],e=0;e<this.slides.length;e+=1)t.push(e);this.removeSlide(t)}};function q(t){var e=this,n=o(),r=a(),i=e.touchEventsData,s=e.params,l=e.touches;if(e.enabled&&(!e.animating||!s.preventInteractionOnTransition)){var c=t;c.originalEvent&&(c=c.originalEvent);var u=_(c.target);if("wrapper"!==s.touchEventsTarget||u.closest(e.wrapperEl).length)if(i.isTouchEvent="touchstart"===c.type,i.isTouchEvent||!("which"in c)||3!==c.which)if(!(!i.isTouchEvent&&"button"in c&&c.button>0))if(!i.isTouched||!i.isMoved)if(!!s.noSwipingClass&&""!==s.noSwipingClass&&c.target&&c.target.shadowRoot&&t.path&&t.path[0]&&(u=_(t.path[0])),s.noSwiping&&u.closest(s.noSwipingSelector?s.noSwipingSelector:"."+s.noSwipingClass)[0])e.allowClick=!0;else if(!s.swipeHandler||u.closest(s.swipeHandler)[0]){l.currentX="touchstart"===c.type?c.targetTouches[0].pageX:c.pageX,l.currentY="touchstart"===c.type?c.targetTouches[0].pageY:c.pageY;var h=l.currentX,p=l.currentY,f=s.edgeSwipeDetection||s.iOSEdgeSwipeDetection,d=s.edgeSwipeThreshold||s.iOSEdgeSwipeThreshold;if(f&&(h<=d||h>=r.innerWidth-d)){if("prevent"!==f)return;t.preventDefault()}if(E(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=h,l.startY=p,i.touchStartTime=w(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,s.threshold>0&&(i.allowThresholdMove=!1),"touchstart"!==c.type){var g=!0;u.is(i.focusableElements)&&(g=!1),n.activeElement&&_(n.activeElement).is(i.focusableElements)&&n.activeElement!==u[0]&&n.activeElement.blur();var v=g&&e.allowTouchMove&&s.touchStartPreventDefault;!s.touchStartForcePreventDefault&&!v||u[0].isContentEditable||c.preventDefault()}e.emit("touchStart",c)}}}function Z(t){var e=o(),n=this,r=n.touchEventsData,i=n.params,s=n.touches,a=n.rtlTranslate;if(n.enabled){var l=t;if(l.originalEvent&&(l=l.originalEvent),r.isTouched){if(!r.isTouchEvent||"touchmove"===l.type){var c="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),u="touchmove"===l.type?c.pageX:l.pageX,h="touchmove"===l.type?c.pageY:l.pageY;if(l.preventedByNestedSwiper)return s.startX=u,void(s.startY=h);if(!n.allowTouchMove)return n.allowClick=!1,void(r.isTouched&&(E(s,{startX:u,startY:h,currentX:u,currentY:h}),r.touchStartTime=w()));if(r.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(h<s.startY&&n.translate<=n.maxTranslate()||h>s.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(u<s.startX&&n.translate<=n.maxTranslate()||u>s.startX&&n.translate>=n.minTranslate())return;if(r.isTouchEvent&&e.activeElement&&l.target===e.activeElement&&_(l.target).is(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);if(r.allowTouchCallbacks&&n.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){s.currentX=u,s.currentY=h;var p=s.currentX-s.startX,f=s.currentY-s.startY;if(!(n.params.threshold&&Math.sqrt(Math.pow(p,2)+Math.pow(f,2))<n.params.threshold)){var d;if(void 0===r.isScrolling)n.isHorizontal()&&s.currentY===s.startY||n.isVertical()&&s.currentX===s.startX?r.isScrolling=!1:p*p+f*f>=25&&(d=180*Math.atan2(Math.abs(f),Math.abs(p))/Math.PI,r.isScrolling=n.isHorizontal()?d>i.touchAngle:90-d>i.touchAngle);if(r.isScrolling&&n.emit("touchMoveOpposite",l),void 0===r.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(r.startMoving=!0)),r.isScrolling)r.isTouched=!1;else if(r.startMoving){n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation(),r.isMoved||(i.loop&&n.loopFix(),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),r.allowMomentumBounce=!1,!i.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",l)),n.emit("sliderMove",l),r.isMoved=!0;var g=n.isHorizontal()?p:f;s.diff=g,g*=i.touchRatio,a&&(g=-g),n.swipeDirection=g>0?"prev":"next",r.currentTranslate=g+r.startTranslate;var v=!0,m=i.resistanceRatio;if(i.touchReleaseOnEdges&&(m=0),g>0&&r.currentTranslate>n.minTranslate()?(v=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+Math.pow(-n.minTranslate()+r.startTranslate+g,m))):g<0&&r.currentTranslate<n.maxTranslate()&&(v=!1,i.resistance&&(r.currentTranslate=n.maxTranslate()+1-Math.pow(n.maxTranslate()-r.startTranslate-g,m))),v&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),i.threshold>0){if(!(Math.abs(g)>i.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,r.currentTranslate=r.startTranslate,void(s.diff=n.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&!i.cssMode&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&(0===r.velocities.length&&r.velocities.push({position:s[n.isHorizontal()?"startX":"startY"],time:r.touchStartTime}),r.velocities.push({position:s[n.isHorizontal()?"currentX":"currentY"],time:w()})),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}}}}}else r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l)}}function W(t){var e=this,n=e.touchEventsData,r=e.params,i=e.touches,o=e.rtlTranslate,s=e.$wrapperEl,a=e.slidesGrid,l=e.snapGrid;if(e.enabled){var c=t;if(c.originalEvent&&(c=c.originalEvent),n.allowTouchCallbacks&&e.emit("touchEnd",c),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&e.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===e.allowSlideNext||!0===e.allowSlidePrev)&&e.setGrabCursor(!1);var u,h=w(),p=h-n.touchStartTime;if(e.allowClick&&(e.updateClickedSlide(c),e.emit("tap click",c),p<300&&h-n.lastClickTime<300&&e.emit("doubleTap doubleClick",c)),n.lastClickTime=w(),b((function(){e.destroyed||(e.allowClick=!0)})),!n.isTouched||!n.isMoved||!e.swipeDirection||0===i.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,u=r.followFinger?o?e.translate:-e.translate:-n.currentTranslate,!r.cssMode)if(r.freeMode){if(u<-e.minTranslate())return void e.slideTo(e.activeIndex);if(u>-e.maxTranslate())return void(e.slides.length<l.length?e.slideTo(l.length-1):e.slideTo(e.slides.length-1));if(r.freeModeMomentum){if(n.velocities.length>1){var f=n.velocities.pop(),d=n.velocities.pop(),g=f.position-d.position,v=f.time-d.time;e.velocity=g/v,e.velocity/=2,Math.abs(e.velocity)<r.freeModeMinimumVelocity&&(e.velocity=0),(v>150||w()-f.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=r.freeModeMomentumVelocityRatio,n.velocities.length=0;var m=1e3*r.freeModeMomentumRatio,y=e.velocity*m,_=e.translate+y;o&&(_=-_);var x,S,E=!1,C=20*Math.abs(e.velocity)*r.freeModeMomentumBounceRatio;if(_<e.maxTranslate())r.freeModeMomentumBounce?(_+e.maxTranslate()<-C&&(_=e.maxTranslate()-C),x=e.maxTranslate(),E=!0,n.allowMomentumBounce=!0):_=e.maxTranslate(),r.loop&&r.centeredSlides&&(S=!0);else if(_>e.minTranslate())r.freeModeMomentumBounce?(_-e.minTranslate()>C&&(_=e.minTranslate()+C),x=e.minTranslate(),E=!0,n.allowMomentumBounce=!0):_=e.minTranslate(),r.loop&&r.centeredSlides&&(S=!0);else if(r.freeModeSticky){for(var T,O=0;O<l.length;O+=1)if(l[O]>-_){T=O;break}_=-(_=Math.abs(l[T]-_)<Math.abs(l[T-1]-_)||"next"===e.swipeDirection?l[T]:l[T-1])}if(S&&e.once("transitionEnd",(function(){e.loopFix()})),0!==e.velocity){if(m=o?Math.abs((-_-e.translate)/e.velocity):Math.abs((_-e.translate)/e.velocity),r.freeModeSticky){var k=Math.abs((o?-_:_)-e.translate),M=e.slidesSizesGrid[e.activeIndex];m=k<M?r.speed:k<2*M?1.5*r.speed:2.5*r.speed}}else if(r.freeModeSticky)return void e.slideToClosest();r.freeModeMomentumBounce&&E?(e.updateProgress(x),e.setTransition(m),e.setTranslate(_),e.transitionStart(!0,e.swipeDirection),e.animating=!0,s.transitionEnd((function(){e&&!e.destroyed&&n.allowMomentumBounce&&(e.emit("momentumBounce"),e.setTransition(r.speed),setTimeout((function(){e.setTranslate(x),s.transitionEnd((function(){e&&!e.destroyed&&e.transitionEnd()}))}),0))}))):e.velocity?(e.updateProgress(_),e.setTransition(m),e.setTranslate(_),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,s.transitionEnd((function(){e&&!e.destroyed&&e.transitionEnd()})))):(e.emit("_freeModeNoMomentumRelease"),e.updateProgress(_)),e.updateActiveIndex(),e.updateSlidesClasses()}else{if(r.freeModeSticky)return void e.slideToClosest();r.freeMode&&e.emit("_freeModeNoMomentumRelease")}(!r.freeModeMomentum||p>=r.longSwipesMs)&&(e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}else{for(var P=0,L=e.slidesSizesGrid[0],I=0;I<a.length;I+=I<r.slidesPerGroupSkip?1:r.slidesPerGroup){var A=I<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==a[I+A]?u>=a[I]&&u<a[I+A]&&(P=I,L=a[I+A]-a[I]):u>=a[I]&&(P=I,L=a[a.length-1]-a[a.length-2])}var R=(u-a[P])/L,D=P<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(p>r.longSwipesMs){if(!r.longSwipes)return void e.slideTo(e.activeIndex);"next"===e.swipeDirection&&(R>=r.longSwipesRatio?e.slideTo(P+D):e.slideTo(P)),"prev"===e.swipeDirection&&(R>1-r.longSwipesRatio?e.slideTo(P+D):e.slideTo(P))}else{if(!r.shortSwipes)return void e.slideTo(e.activeIndex);e.navigation&&(c.target===e.navigation.nextEl||c.target===e.navigation.prevEl)?c.target===e.navigation.nextEl?e.slideTo(P+D):e.slideTo(P):("next"===e.swipeDirection&&e.slideTo(P+D),"prev"===e.swipeDirection&&e.slideTo(P))}}}}function V(){var t=this,e=t.params,n=t.el;if(!n||0!==n.offsetWidth){e.breakpoints&&t.setBreakpoint();var r=t.allowSlideNext,i=t.allowSlidePrev,o=t.snapGrid;t.allowSlideNext=!0,t.allowSlidePrev=!0,t.updateSize(),t.updateSlides(),t.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&t.isEnd&&!t.isBeginning&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0),t.autoplay&&t.autoplay.running&&t.autoplay.paused&&t.autoplay.run(),t.allowSlidePrev=i,t.allowSlideNext=r,t.params.watchOverflow&&o!==t.snapGrid&&t.checkOverflow()}}function Y(t){var e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&t.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(t.stopPropagation(),t.stopImmediatePropagation())))}function K(){var t=this,e=t.wrapperEl,n=t.rtlTranslate;if(t.enabled){t.previousTranslate=t.translate,t.isHorizontal()?t.translate=n?e.scrollWidth-e.offsetWidth-e.scrollLeft:-e.scrollLeft:t.translate=-e.scrollTop,-0===t.translate&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();var r=t.maxTranslate()-t.minTranslate();(0===r?0:(t.translate-t.minTranslate())/r)!==t.progress&&t.updateProgress(n?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}}var $=!1;function J(){}const Q={attachEvents:function(){var t=this,e=o(),n=t.params,r=t.touchEvents,i=t.el,s=t.wrapperEl,a=t.device,l=t.support;t.onTouchStart=q.bind(t),t.onTouchMove=Z.bind(t),t.onTouchEnd=W.bind(t),n.cssMode&&(t.onScroll=K.bind(t)),t.onClick=Y.bind(t);var c=!!n.nested;if(!l.touch&&l.pointerEvents)i.addEventListener(r.start,t.onTouchStart,!1),e.addEventListener(r.move,t.onTouchMove,c),e.addEventListener(r.end,t.onTouchEnd,!1);else{if(l.touch){var u=!("touchstart"!==r.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};i.addEventListener(r.start,t.onTouchStart,u),i.addEventListener(r.move,t.onTouchMove,l.passiveListener?{passive:!1,capture:c}:c),i.addEventListener(r.end,t.onTouchEnd,u),r.cancel&&i.addEventListener(r.cancel,t.onTouchEnd,u),$||(e.addEventListener("touchstart",J),$=!0)}(n.simulateTouch&&!a.ios&&!a.android||n.simulateTouch&&!l.touch&&a.ios)&&(i.addEventListener("mousedown",t.onTouchStart,!1),e.addEventListener("mousemove",t.onTouchMove,c),e.addEventListener("mouseup",t.onTouchEnd,!1))}(n.preventClicks||n.preventClicksPropagation)&&i.addEventListener("click",t.onClick,!0),n.cssMode&&s.addEventListener("scroll",t.onScroll),n.updateOnWindowResize?t.on(a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",V,!0):t.on("observerUpdate",V,!0)},detachEvents:function(){var t=this,e=o(),n=t.params,r=t.touchEvents,i=t.el,s=t.wrapperEl,a=t.device,l=t.support,c=!!n.nested;if(!l.touch&&l.pointerEvents)i.removeEventListener(r.start,t.onTouchStart,!1),e.removeEventListener(r.move,t.onTouchMove,c),e.removeEventListener(r.end,t.onTouchEnd,!1);else{if(l.touch){var u=!("onTouchStart"!==r.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};i.removeEventListener(r.start,t.onTouchStart,u),i.removeEventListener(r.move,t.onTouchMove,c),i.removeEventListener(r.end,t.onTouchEnd,u),r.cancel&&i.removeEventListener(r.cancel,t.onTouchEnd,u)}(n.simulateTouch&&!a.ios&&!a.android||n.simulateTouch&&!l.touch&&a.ios)&&(i.removeEventListener("mousedown",t.onTouchStart,!1),e.removeEventListener("mousemove",t.onTouchMove,c),e.removeEventListener("mouseup",t.onTouchEnd,!1))}(n.preventClicks||n.preventClicksPropagation)&&i.removeEventListener("click",t.onClick,!0),n.cssMode&&s.removeEventListener("scroll",t.onScroll),t.off(a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",V)}};const tt={setBreakpoint:function(){var t=this,e=t.activeIndex,n=t.initialized,r=t.loopedSlides,i=void 0===r?0:r,o=t.params,s=t.$el,a=o.breakpoints;if(a&&(!a||0!==Object.keys(a).length)){var l=t.getBreakpoint(a,t.params.breakpointsBase,t.el);if(l&&t.currentBreakpoint!==l){var c=l in a?a[l]:void 0;c&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(t){var e=c[t];void 0!==e&&(c[t]="slidesPerView"!==t||"AUTO"!==e&&"auto"!==e?"slidesPerView"===t?parseFloat(e):parseInt(e,10):"auto")}));var u=c||t.originalParams,h=o.slidesPerColumn>1,p=u.slidesPerColumn>1,f=o.enabled;h&&!p?(s.removeClass(o.containerModifierClass+"multirow "+o.containerModifierClass+"multirow-column"),t.emitContainerClasses()):!h&&p&&(s.addClass(o.containerModifierClass+"multirow"),"column"===u.slidesPerColumnFill&&s.addClass(o.containerModifierClass+"multirow-column"),t.emitContainerClasses());var d=u.direction&&u.direction!==o.direction,g=o.loop&&(u.slidesPerView!==o.slidesPerView||d);d&&n&&t.changeDirection(),E(t.params,u);var v=t.params.enabled;E(t,{allowTouchMove:t.params.allowTouchMove,allowSlideNext:t.params.allowSlideNext,allowSlidePrev:t.params.allowSlidePrev}),f&&!v?t.disable():!f&&v&&t.enable(),t.currentBreakpoint=l,t.emit("_beforeBreakpoint",u),g&&n&&(t.loopDestroy(),t.loopCreate(),t.updateSlides(),t.slideTo(e-i+t.loopedSlides,0,!1)),t.emit("breakpoint",u)}}},getBreakpoint:function(t,e,n){if(void 0===e&&(e="window"),t&&("container"!==e||n)){var r=!1,i=a(),o="window"===e?i.innerHeight:n.clientHeight,s=Object.keys(t).map((function(t){if("string"==typeof t&&0===t.indexOf("@")){var e=parseFloat(t.substr(1));return{value:o*e,point:t}}return{value:t,point:t}}));s.sort((function(t,e){return parseInt(t.value,10)-parseInt(e.value,10)}));for(var l=0;l<s.length;l+=1){var c=s[l],u=c.point,h=c.value;"window"===e?i.matchMedia("(min-width: "+h+"px)").matches&&(r=u):h<=n.clientWidth&&(r=u)}return r||"max"}}};const et={addClasses:function(){var t,e,n,r=this,i=r.classNames,o=r.params,s=r.rtl,a=r.$el,l=r.device,c=r.support,u=(t=["initialized",o.direction,{"pointer-events":c.pointerEvents&&!c.touch},{"free-mode":o.freeMode},{autoheight:o.autoHeight},{rtl:s},{multirow:o.slidesPerColumn>1},{"multirow-column":o.slidesPerColumn>1&&"column"===o.slidesPerColumnFill},{android:l.android},{ios:l.ios},{"css-mode":o.cssMode}],e=o.containerModifierClass,n=[],t.forEach((function(t){"object"==typeof t?Object.keys(t).forEach((function(r){t[r]&&n.push(e+r)})):"string"==typeof t&&n.push(e+t)})),n);i.push.apply(i,u),a.addClass([].concat(i).join(" ")),r.emitContainerClasses()},removeClasses:function(){var t=this,e=t.$el,n=t.classNames;e.removeClass(n.join(" ")),t.emitContainerClasses()}};const nt={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!1,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var it={modular:N,eventsEmitter:B,update:z,translate:G,transition:{setTransition:function(t,e){var n=this;n.params.cssMode||n.$wrapperEl.transition(t),n.emit("setTransition",t,e)},transitionStart:function(t,e){void 0===t&&(t=!0);var n=this,r=n.activeIndex,i=n.params,o=n.previousIndex;if(!i.cssMode){i.autoHeight&&n.updateAutoHeight();var s=e;if(s||(s=r>o?"next":r<o?"prev":"reset"),n.emit("transitionStart"),t&&r!==o){if("reset"===s)return void n.emit("slideResetTransitionStart");n.emit("slideChangeTransitionStart"),"next"===s?n.emit("slideNextTransitionStart"):n.emit("slidePrevTransitionStart")}}},transitionEnd:function(t,e){void 0===t&&(t=!0);var n=this,r=n.activeIndex,i=n.previousIndex,o=n.params;if(n.animating=!1,!o.cssMode){n.setTransition(0);var s=e;if(s||(s=r>i?"next":r<i?"prev":"reset"),n.emit("transitionEnd"),t&&r!==i){if("reset"===s)return void n.emit("slideResetTransitionEnd");n.emit("slideChangeTransitionEnd"),"next"===s?n.emit("slideNextTransitionEnd"):n.emit("slidePrevTransitionEnd")}}}},slide:X,loop:U,grabCursor:{setGrabCursor:function(t){var e=this;if(!(e.support.touch||!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)){var n=e.el;n.style.cursor="move",n.style.cursor=t?"-webkit-grabbing":"-webkit-grab",n.style.cursor=t?"-moz-grabbin":"-moz-grab",n.style.cursor=t?"grabbing":"grab"}},unsetGrabCursor:function(){var t=this;t.support.touch||t.params.watchOverflow&&t.isLocked||t.params.cssMode||(t.el.style.cursor="")}},manipulation:H,events:Q,breakpoints:tt,checkOverflow:{checkOverflow:function(){var t=this,e=t.params,n=t.isLocked,r=t.slides.length>0&&e.slidesOffsetBefore+e.spaceBetween*(t.slides.length-1)+t.slides[0].offsetWidth*t.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&r?t.isLocked=r<=t.size:t.isLocked=1===t.snapGrid.length,t.allowSlideNext=!t.isLocked,t.allowSlidePrev=!t.isLocked,n!==t.isLocked&&t.emit(t.isLocked?"lock":"unlock"),n&&n!==t.isLocked&&(t.isEnd=!1,t.navigation&&t.navigation.update())}},classes:et,images:{loadImage:function(t,e,n,r,i,o){var s,l=a();function c(){o&&o()}_(t).parent("picture")[0]||t.complete&&i?c():e?((s=new l.Image).onload=c,s.onerror=c,r&&(s.sizes=r),n&&(s.srcset=n),e&&(s.src=e)):c()},preloadImages:function(){var t=this;function e(){null!=t&&t&&!t.destroyed&&(void 0!==t.imagesLoaded&&(t.imagesLoaded+=1),t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("imagesReady")))}t.imagesToLoad=t.$el.find("img");for(var n=0;n<t.imagesToLoad.length;n+=1){var r=t.imagesToLoad[n];t.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,e)}}}},ot={},st=function(){function t(){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];if(1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?n=i[0]:(e=i[0],n=i[1]),n||(n={}),n=E({},n),e&&!n.el&&(n.el=e),n.el&&_(n.el).length>1){var s=[];return _(n.el).each((function(e){var r=E({},n,{el:e});s.push(new t(r))})),s}var a=this;a.__swiper__=!0,a.support=L(),a.device=I({userAgent:n.userAgent}),a.browser=A(),a.eventsListeners={},a.eventsAnyListeners=[],void 0===a.modules&&(a.modules={}),Object.keys(a.modules).forEach((function(t){var e=a.modules[t];if(e.params){var r=Object.keys(e.params)[0],i=e.params[r];if("object"!=typeof i||null===i)return;if(["navigation","pagination","scrollbar"].indexOf(r)>=0&&!0===n[r]&&(n[r]={auto:!0}),!(r in n)||!("enabled"in i))return;!0===n[r]&&(n[r]={enabled:!0}),"object"!=typeof n[r]||"enabled"in n[r]||(n[r].enabled=!0),n[r]||(n[r]={enabled:!1})}}));var l,c,u=E({},nt);return a.useParams(u),a.params=E({},u,ot,n),a.originalParams=E({},a.params),a.passedParams=E({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach((function(t){a.on(t,a.params.on[t])})),a.params&&a.params.onAny&&a.onAny(a.params.onAny),a.$=_,E(a,{enabled:a.params.enabled,el:e,classNames:[],slides:_(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===a.params.direction},isVertical:function(){return"vertical"===a.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEvents:(l=["touchstart","touchmove","touchend","touchcancel"],c=["mousedown","mousemove","mouseup"],a.support.pointerEvents&&(c=["pointerdown","pointermove","pointerup"]),a.touchEventsTouch={start:l[0],move:l[1],end:l[2],cancel:l[3]},a.touchEventsDesktop={start:c[0],move:c[1],end:c[2]},a.support.touch||!a.params.simulateTouch?a.touchEventsTouch:a.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:w(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.useModules(),a.emit("_swiper"),a.params.init&&a.init(),a}var e,n,r,i=t.prototype;return i.enable=function(){var t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))},i.disable=function(){var t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))},i.setProgress=function(t,e){var n=this;t=Math.min(Math.max(t,0),1);var r=n.minTranslate(),i=(n.maxTranslate()-r)*t+r;n.translateTo(i,void 0===e?0:e),n.updateActiveIndex(),n.updateSlidesClasses()},i.emitContainerClasses=function(){var t=this;if(t.params._emitClasses&&t.el){var e=t.el.className.split(" ").filter((function(e){return 0===e.indexOf("swiper-container")||0===e.indexOf(t.params.containerModifierClass)}));t.emit("_containerClasses",e.join(" "))}},i.getSlideClasses=function(t){var e=this;return t.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)})).join(" ")},i.emitSlidesClasses=function(){var t=this;if(t.params._emitClasses&&t.el){var e=[];t.slides.each((function(n){var r=t.getSlideClasses(n);e.push({slideEl:n,classNames:r}),t.emit("_slideClass",n,r)})),t.emit("_slideClasses",e)}},i.slidesPerViewDynamic=function(){var t=this,e=t.params,n=t.slides,r=t.slidesGrid,i=t.size,o=t.activeIndex,s=1;if(e.centeredSlides){for(var a,l=n[o].swiperSlideSize,c=o+1;c<n.length;c+=1)n[c]&&!a&&(s+=1,(l+=n[c].swiperSlideSize)>i&&(a=!0));for(var u=o-1;u>=0;u-=1)n[u]&&!a&&(s+=1,(l+=n[u].swiperSlideSize)>i&&(a=!0))}else for(var h=o+1;h<n.length;h+=1)r[h]-r[o]<i&&(s+=1);return s},i.update=function(){var t=this;if(t&&!t.destroyed){var e=t.snapGrid,n=t.params;n.breakpoints&&t.setBreakpoint(),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.params.freeMode?(r(),t.params.autoHeight&&t.updateAutoHeight()):(("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0))||r(),n.watchOverflow&&e!==t.snapGrid&&t.checkOverflow(),t.emit("update")}function r(){var e=t.rtlTranslate?-1*t.translate:t.translate,n=Math.min(Math.max(e,t.maxTranslate()),t.minTranslate());t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}},i.changeDirection=function(t,e){void 0===e&&(e=!0);var n=this,r=n.params.direction;return t||(t="horizontal"===r?"vertical":"horizontal"),t===r||"horizontal"!==t&&"vertical"!==t||(n.$el.removeClass(""+n.params.containerModifierClass+r).addClass(""+n.params.containerModifierClass+t),n.emitContainerClasses(),n.params.direction=t,n.slides.each((function(e){"vertical"===t?e.style.width="":e.style.height=""})),n.emit("changeDirection"),e&&n.update()),n},i.mount=function(t){var e=this;if(e.mounted)return!0;var n=_(t||e.params.el);if(!(t=n[0]))return!1;t.swiper=e;var r=function(){return"."+(e.params.wrapperClass||"").trim().split(" ").join(".")},i=function(){if(t&&t.shadowRoot&&t.shadowRoot.querySelector){var e=_(t.shadowRoot.querySelector(r()));return e.children=function(t){return n.children(t)},e}return n.children(r())}();if(0===i.length&&e.params.createElements){var s=o().createElement("div");i=_(s),s.className=e.params.wrapperClass,n.append(s),n.children("."+e.params.slideClass).each((function(t){i.append(t)}))}return E(e,{$el:n,el:t,$wrapperEl:i,wrapperEl:i[0],mounted:!0,rtl:"rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===e.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===i.css("display")}),!0},i.init=function(t){var e=this;return e.initialized||!1===e.mount(t)||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.enabled&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit,!1,!0):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit,!1,!0),e.attachEvents(),e.initialized=!0,e.emit("init"),e.emit("afterInit")),e},i.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0);var n=this,r=n.params,i=n.$el,o=n.$wrapperEl,s=n.slides;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),e&&(n.removeClasses(),i.removeAttr("style"),o.removeAttr("style"),s&&s.length&&s.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((function(t){n.off(t)})),!1!==t&&(n.$el[0].swiper=null,function(t){var e=t;Object.keys(e).forEach((function(t){try{e[t]=null}catch(t){}try{delete e[t]}catch(t){}}))}(n)),n.destroyed=!0),null},t.extendDefaults=function(t){E(ot,t)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+w();t.prototype.modules[n]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},e=t,r=[{key:"extendedDefaults",get:function(){return ot}},{key:"defaults",get:function(){return nt}}],(n=null)&&rt(e.prototype,n),r&&rt(e,r),t}();Object.keys(it).forEach((function(t){Object.keys(it[t]).forEach((function(e){st.prototype[e]=it[t][e]}))})),st.use([R,F]);const at=st;function lt(){return lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lt.apply(this,arguments)}at.prototype.slideToMapID=function(t){if(this.$el[0].querySelector(".swiper-slide-active").getAttribute("data")!=t)for(var e=this.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++){var r=e[n];if(r.getAttribute("data")==t)return this.slideToLoop(parseInt(r.getAttribute("data-swiper-slide-index")))}},at.prototype.slideToIndex=function(t){var e=this.$el[0].querySelector(".swiper-slide-active");parseInt(e.getAttribute("data-swiper-slide-index"))!=t&&this.slideToLoop(t)},at.prototype.setSlideMapID=function(t){this.slideToMapID(t),this.setSlideMapIDAsSelected(t)},at.prototype.setSlideIndex=function(t){this.slideToIndex(t),this.setSlideIndexAsSelected(t)},at.prototype.setSlideIndexAsSelected=function(t){for(var e=this.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++){var r=e[n];r.getAttribute("data-swiper-slide-index")==t?r.classList.add("selected"):r.classList.remove("selected")}},at.prototype.setSlideMapIDAsSelected=function(t){for(var e=this.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++){var r=e[n];r.getAttribute("data")==t?r.classList.add("selected"):r.classList.remove("selected")}};var ct={toggleEl:function(t,e){t[e?"addClass":"removeClass"](this.params.navigation.disabledClass),t[0]&&"BUTTON"===t[0].tagName&&(t[0].disabled=e)},update:function(){var t=this,e=t.params.navigation,n=t.navigation.toggleEl;if(!t.params.loop){var r=t.navigation,i=r.$nextEl,o=r.$prevEl;o&&o.length>0&&(t.isBeginning?n(o,!0):n(o,!1),t.params.watchOverflow&&t.enabled&&o[t.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(t.isEnd?n(i,!0):n(i,!1),t.params.watchOverflow&&t.enabled&&i[t.isLocked?"addClass":"removeClass"](e.lockClass))}},onPrevClick:function(t){var e=this;t.preventDefault(),e.isBeginning&&!e.params.loop||e.slidePrev()},onNextClick:function(t){var e=this;t.preventDefault(),e.isEnd&&!e.params.loop||e.slideNext()},init:function(){var t,e,n=this,r=n.params.navigation;(n.params.navigation=O(n.$el,n.params.navigation,n.params.createElements,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),r.nextEl||r.prevEl)&&(r.nextEl&&(t=_(r.nextEl),n.params.uniqueNavElements&&"string"==typeof r.nextEl&&t.length>1&&1===n.$el.find(r.nextEl).length&&(t=n.$el.find(r.nextEl))),r.prevEl&&(e=_(r.prevEl),n.params.uniqueNavElements&&"string"==typeof r.prevEl&&e.length>1&&1===n.$el.find(r.prevEl).length&&(e=n.$el.find(r.prevEl))),t&&t.length>0&&t.on("click",n.navigation.onNextClick),e&&e.length>0&&e.on("click",n.navigation.onPrevClick),E(n.navigation,{$nextEl:t,nextEl:t&&t[0],$prevEl:e,prevEl:e&&e[0]}),n.enabled||(t&&t.addClass(r.lockClass),e&&e.addClass(r.lockClass)))},destroy:function(){var t=this,e=t.navigation,n=e.$nextEl,r=e.$prevEl;n&&n.length&&(n.off("click",t.navigation.onNextClick),n.removeClass(t.params.navigation.disabledClass)),r&&r.length&&(r.off("click",t.navigation.onPrevClick),r.removeClass(t.params.navigation.disabledClass))}};const ut={name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){C(this,{navigation:lt({},ct)})},on:{init:function(t){t.navigation.init(),t.navigation.update()},toEdge:function(t){t.navigation.update()},fromEdge:function(t){t.navigation.update()},destroy:function(t){t.navigation.destroy()},"enable disable":function(t){var e=t.navigation,n=e.$nextEl,r=e.$prevEl;n&&n[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass),r&&r[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass)},click:function(t,e){var n=t.navigation,r=n.$nextEl,i=n.$prevEl,o=e.target;if(t.params.navigation.hideOnClick&&!_(o).is(i)&&!_(o).is(r)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===o||t.pagination.el.contains(o)))return;var s;r?s=r.hasClass(t.params.navigation.hiddenClass):i&&(s=i.hasClass(t.params.navigation.hiddenClass)),!0===s?t.emit("navigationShow"):t.emit("navigationHide"),r&&r.toggleClass(t.params.navigation.hiddenClass),i&&i.toggleClass(t.params.navigation.hiddenClass)}}}};function ht(){return ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ht.apply(this,arguments)}var pt={update:function(){var t=this,e=t.rtl,n=t.params.pagination;if(n.el&&t.pagination.el&&t.pagination.$el&&0!==t.pagination.$el.length){var r,i=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,o=t.pagination.$el,s=t.params.loop?Math.ceil((i-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?((r=Math.ceil((t.activeIndex-t.loopedSlides)/t.params.slidesPerGroup))>i-1-2*t.loopedSlides&&(r-=i-2*t.loopedSlides),r>s-1&&(r-=s),r<0&&"bullets"!==t.params.paginationType&&(r=s+r)):r=void 0!==t.snapIndex?t.snapIndex:t.activeIndex||0,"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){var a,l,c,u=t.pagination.bullets;if(n.dynamicBullets&&(t.pagination.bulletSize=u.eq(0)[t.isHorizontal()?"outerWidth":"outerHeight"](!0),o.css(t.isHorizontal()?"width":"height",t.pagination.bulletSize*(n.dynamicMainBullets+4)+"px"),n.dynamicMainBullets>1&&void 0!==t.previousIndex&&(t.pagination.dynamicBulletIndex+=r-t.previousIndex,t.pagination.dynamicBulletIndex>n.dynamicMainBullets-1?t.pagination.dynamicBulletIndex=n.dynamicMainBullets-1:t.pagination.dynamicBulletIndex<0&&(t.pagination.dynamicBulletIndex=0)),a=r-t.pagination.dynamicBulletIndex,c=((l=a+(Math.min(u.length,n.dynamicMainBullets)-1))+a)/2),u.removeClass(n.bulletActiveClass+" "+n.bulletActiveClass+"-next "+n.bulletActiveClass+"-next-next "+n.bulletActiveClass+"-prev "+n.bulletActiveClass+"-prev-prev "+n.bulletActiveClass+"-main"),o.length>1)u.each((function(t){var e=_(t),i=e.index();i===r&&e.addClass(n.bulletActiveClass),n.dynamicBullets&&(i>=a&&i<=l&&e.addClass(n.bulletActiveClass+"-main"),i===a&&e.prev().addClass(n.bulletActiveClass+"-prev").prev().addClass(n.bulletActiveClass+"-prev-prev"),i===l&&e.next().addClass(n.bulletActiveClass+"-next").next().addClass(n.bulletActiveClass+"-next-next"))}));else{var h=u.eq(r),p=h.index();if(h.addClass(n.bulletActiveClass),n.dynamicBullets){for(var f=u.eq(a),d=u.eq(l),g=a;g<=l;g+=1)u.eq(g).addClass(n.bulletActiveClass+"-main");if(t.params.loop)if(p>=u.length-n.dynamicMainBullets){for(var v=n.dynamicMainBullets;v>=0;v-=1)u.eq(u.length-v).addClass(n.bulletActiveClass+"-main");u.eq(u.length-n.dynamicMainBullets-1).addClass(n.bulletActiveClass+"-prev")}else f.prev().addClass(n.bulletActiveClass+"-prev").prev().addClass(n.bulletActiveClass+"-prev-prev"),d.next().addClass(n.bulletActiveClass+"-next").next().addClass(n.bulletActiveClass+"-next-next");else f.prev().addClass(n.bulletActiveClass+"-prev").prev().addClass(n.bulletActiveClass+"-prev-prev"),d.next().addClass(n.bulletActiveClass+"-next").next().addClass(n.bulletActiveClass+"-next-next")}}if(n.dynamicBullets){var m=Math.min(u.length,n.dynamicMainBullets+4),y=(t.pagination.bulletSize*m-t.pagination.bulletSize)/2-c*t.pagination.bulletSize,b=e?"right":"left";u.css(t.isHorizontal()?b:"top",y+"px")}}if("fraction"===n.type&&(o.find(T(n.currentClass)).text(n.formatFractionCurrent(r+1)),o.find(T(n.totalClass)).text(n.formatFractionTotal(s))),"progressbar"===n.type){var w;w=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";var x=(r+1)/s,S=1,E=1;"horizontal"===w?S=x:E=x,o.find(T(n.progressbarFillClass)).transform("translate3d(0,0,0) scaleX("+S+") scaleY("+E+")").transition(t.params.speed)}"custom"===n.type&&n.renderCustom?(o.html(n.renderCustom(t,r+1,s)),t.emit("paginationRender",o[0])):t.emit("paginationUpdate",o[0]),t.params.watchOverflow&&t.enabled&&o[t.isLocked?"addClass":"removeClass"](n.lockClass)}},render:function(){var t=this,e=t.params.pagination;if(e.el&&t.pagination.el&&t.pagination.$el&&0!==t.pagination.$el.length){var n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,r=t.pagination.$el,i="";if("bullets"===e.type){var o=t.params.loop?Math.ceil((n-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&!t.params.loop&&o>n&&(o=n);for(var s=0;s<o;s+=1)e.renderBullet?i+=e.renderBullet.call(t,s,e.bulletClass):i+="<"+e.bulletElement+' class="'+e.bulletClass+'"></'+e.bulletElement+">";r.html(i),t.pagination.bullets=r.find(T(e.bulletClass))}"fraction"===e.type&&(i=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):'<span class="'+e.currentClass+'"></span> / <span class="'+e.totalClass+'"></span>',r.html(i)),"progressbar"===e.type&&(i=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):'<span class="'+e.progressbarFillClass+'"></span>',r.html(i)),"custom"!==e.type&&t.emit("paginationRender",t.pagination.$el[0])}},init:function(){var t=this;t.params.pagination=O(t.$el,t.params.pagination,t.params.createElements,{el:"swiper-pagination"});var e=t.params.pagination;if(e.el){var n=_(e.el);0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&n.length>1&&(n=t.$el.find(e.el)),"bullets"===e.type&&e.clickable&&n.addClass(e.clickableClass),n.addClass(e.modifierClass+e.type),"bullets"===e.type&&e.dynamicBullets&&(n.addClass(""+e.modifierClass+e.type+"-dynamic"),t.pagination.dynamicBulletIndex=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.addClass(e.progressbarOppositeClass),e.clickable&&n.on("click",T(e.bulletClass),(function(e){e.preventDefault();var n=_(this).index()*t.params.slidesPerGroup;t.params.loop&&(n+=t.loopedSlides),t.slideTo(n)})),E(t.pagination,{$el:n,el:n[0]}),t.enabled||n.addClass(e.lockClass))}},destroy:function(){var t=this,e=t.params.pagination;if(e.el&&t.pagination.el&&t.pagination.$el&&0!==t.pagination.$el.length){var n=t.pagination.$el;n.removeClass(e.hiddenClass),n.removeClass(e.modifierClass+e.type),t.pagination.bullets&&t.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&n.off("click",T(e.bulletClass))}}};const ft={name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(t){return t},formatFractionTotal:function(t){return t},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){C(this,{pagination:ht({dynamicBulletIndex:0},pt)})},on:{init:function(t){t.pagination.init(),t.pagination.render(),t.pagination.update()},activeIndexChange:function(t){(t.params.loop||void 0===t.snapIndex)&&t.pagination.update()},snapIndexChange:function(t){t.params.loop||t.pagination.update()},slidesLengthChange:function(t){t.params.loop&&(t.pagination.render(),t.pagination.update())},snapGridLengthChange:function(t){t.params.loop||(t.pagination.render(),t.pagination.update())},destroy:function(t){t.pagination.destroy()},"enable disable":function(t){var e=t.pagination.$el;e&&e[t.enabled?"removeClass":"addClass"](t.params.pagination.lockClass)},click:function(t,e){var n=e.target;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&t.pagination.$el.length>0&&!_(n).hasClass(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&n===t.navigation.nextEl||t.navigation.prevEl&&n===t.navigation.prevEl))return;!0===t.pagination.$el.hasClass(t.params.pagination.hiddenClass)?t.emit("paginationShow"):t.emit("paginationHide"),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass)}}}};var dt=n(208),gt=n(7863),vt=n(6901);function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function yt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bt(t,e,n){return e&&_t(t.prototype,e),n&&_t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function wt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xt(t,e)}function St(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}function Et(t,e){if(e&&("object"===mt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return wt(t)}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}function Tt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kt(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ot(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ot(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mt(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Lt={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},It=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yt(this,t),this.init(e,n)}return bt(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||Lt,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,Pt(Pt({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}},{key:"clone",value:function(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new t(this.logger,e)}}]),t}()),At=function(){function t(){yt(this,t),this.observers={}}return bt(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach((function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)})),this}},{key:"off",value:function(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter((function(t){return t!==e})):delete this.observers[t])}},{key:"emit",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.observers[t]&&[].concat(this.observers[t]).forEach((function(t){t.apply(void 0,n)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(e){e.apply(e,[t].concat(n))}))}}]),t}();function Rt(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n}function Dt(t){return null==t?"":""+t}function jt(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function i(){return!t||"string"==typeof t}for(var o="string"!=typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!t[s]&&n&&(t[s]=new n),t=Object.prototype.hasOwnProperty.call(t,s)?t[s]:{}}return i()?{}:{obj:t,k:r(o.shift())}}function Ft(t,e,n){var r=jt(t,e,Object);r.obj[r.k]=n}function Nt(t,e){var n=jt(t,e),r=n.obj,i=n.k;if(r)return r[i]}function Bt(t,e,n){var r=Nt(t,n);return void 0!==r?r:Nt(e,n)}function zt(t,e,n){for(var r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):zt(t[r],e[r],n):t[r]=e[r]);return t}function Gt(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Xt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Ut(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return Xt[t]})):t}var Ht="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,qt=[" ",",","?","!",";"];function Zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ct(t);if(e){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Et(this,n)}}function Yt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[e])return t[e];for(var r=e.split(n),i=t,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(e.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?Yt(l,c,n):void 0}i=i[r[o]]}return i}}var Kt=function(t){St(n,t);var e=Vt(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return yt(this,n),r=e.call(this),Ht&&At.call(wt(r)),r.data=t||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return bt(n,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(s=t.split("."));var a=Nt(this.data,s);return a||!o||"string"!=typeof n?a:Yt(this.data&&this.data[t]&&this.data[t][e],n,i)}},{key:"addResource",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[t,e];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(r=e,e=(s=t.split("."))[1]),this.addNamespaces(e),Ft(this.data,s,r),i.silent||this.emit("added",t,e,n,r)}},{key:"addResources",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(t,e,i,n[i],{silent:!0});r.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(r=n,n=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var a=Nt(this.data,s)||{};r?zt(a,n,i):a=Wt(Wt({},a),n),Ft(this.data,s,a),o.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Wt(Wt({},{}),this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function(t){var e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((function(t){return e[t]&&Object.keys(e[t]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(At),$t={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,i){var o=this;return t.forEach((function(t){o.processors[t]&&(e=o.processors[t].process(e,n,r,i))})),e}};function Jt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Jt(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function te(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ct(t);if(e){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Et(this,n)}}var ee={},ne=function(t){St(n,t);var e=te(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return yt(this,n),r=e.call(this),Ht&&At.call(wt(r)),function(t,e,n){t.forEach((function(t){e[t]&&(n[t]=e[t])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,wt(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=It.create("translator"),r}return bt(n,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;var n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS||[],o=n&&t.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||function(t,e,n){e=e||"",n=n||"";var r=qt.filter((function(t){return e.indexOf(t)<0&&n.indexOf(t)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(t){return"?"===t?"\\?":t})).join("|"),")")),o=!i.test(t);if(!o){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}(t,n,r));if(o&&!s){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:i};var l=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(r)}return"string"==typeof i&&(i=[i]),{key:t,namespaces:i}}},{key:"translate",value:function(t,e,r){var i=this;if("object"!==mt(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var o=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,s=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,a=this.extractFromKey(t[t.length-1],e),l=a.key,c=a.namespaces,u=c[c.length-1],h=e.lng||this.language,p=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(p){var f=e.nsSeparator||this.options.nsSeparator;return o?(d.res="".concat(u).concat(f).concat(l),d):"".concat(u).concat(f).concat(l)}return o?(d.res=l,d):l}var d=this.resolve(t,e),g=d&&d.res,v=d&&d.usedKey||l,m=d&&d.exactUsedKey||l,y=Object.prototype.toString.apply(g),_=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&g&&("string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof _||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,Qt(Qt({},e),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(d.res=w,d):w}if(s){var x="[object Array]"===y,S=x?[]:{},E=x?m:v;for(var C in g)if(Object.prototype.hasOwnProperty.call(g,C)){var T="".concat(E).concat(s).concat(C);S[C]=this.translate(T,Qt(Qt({},e),{joinArrays:!1,ns:c})),S[C]===T&&(S[C]=g[C])}g=S}}else if(b&&"string"==typeof _&&"[object Array]"===y)(g=g.join(_))&&(g=this.extendTranslation(g,t,e,r));else{var O=!1,k=!1,M=void 0!==e.count&&"string"!=typeof e.count,P=n.hasDefaultValue(e),L=M?this.pluralResolver.getSuffix(h,e.count,e):"",I=e["defaultValue".concat(L)]||e.defaultValue;!this.isValidLookup(g)&&P&&(O=!0,g=I),this.isValidLookup(g)||(k=!0,g=l);var A=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:g,R=P&&I!==g&&this.options.updateMissing;if(k||O||R){if(this.logger.log(R?"updateKey":"missingKey",h,u,l,R?I:g),s){var D=this.resolve(l,Qt(Qt({},e),{},{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var j=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var N=0;N<F.length;N++)j.push(F[N]);else"all"===this.options.saveMissingTo?j=this.languageUtils.toResolveHierarchy(e.lng||this.language):j.push(e.lng||this.language);var B=function(t,n,r){var o=P&&r!==g?r:A;i.options.missingKeyHandler?i.options.missingKeyHandler(t,u,n,o,R,e):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(t,u,n,o,R,e),i.emit("missingKey",t,u,n,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?j.forEach((function(t){i.pluralResolver.getSuffixes(t,e).forEach((function(n){B([t],l+n,e["defaultValue".concat(n)]||I)}))})):B(j,l,I))}g=this.extendTranslation(g,t,e,d,r),k&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(u,":").concat(l)),(k||O)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,O?g:void 0):this.options.parseMissingKeyHandler(g))}return o?(d.res=g,d):g}},{key:"extendTranslation",value:function(t,e,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,Qt(Qt({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Qt(Qt({},n),{interpolation:Qt(Qt({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=t.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=Qt(Qt({},this.options.interpolation.defaultVariables),c)),t=this.interpolator.interpolate(t,c,n.lng||this.language,n),a){var u=t.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):o.translate.apply(o,r.concat([e]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=t&&p&&p.length&&!1!==n.applyPostProcessor&&(t=$t.handle(p,t,e,this.options&&this.options.postProcessPassResolved?Qt({i18nResolved:r},n):n,this)),t}},{key:"resolve",value:function(t){var e,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!s.isValidLookup(e)){var l=s.extractFromKey(t,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var h=void 0!==a.count&&"string"!=typeof a.count,p=h&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(t){s.isValidLookup(e)||(o=t,!ee["".concat(d[0],"-").concat(t)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(ee["".concat(d[0],"-").concat(t)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!s.isValidLookup(e)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,t,a);else{var u;h&&(u=s.pluralResolver.getSuffix(n,a.count,a));var d="".concat(s.options.pluralSeparator,"zero");if(h&&(l.push(c+u),p&&l.push(c+d)),f){var g="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(g),h&&(l.push(g+u),p&&l.push(g+d))}}for(;o=l.pop();)s.isValidLookup(e)||(r=o,e=s.getResource(n,t,o,a))}})))}))}})),{res:e,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}}],[{key:"hasDefaultValue",value:function(t){var e="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,12)&&void 0!==t[n])return!0;return!1}}]),n}(At);function re(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ie=function(){function t(e){yt(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=It.create("languageUtils")}return bt(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map((function(t){return t.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=re(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=re(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=re(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,n=this;return t?(t.forEach((function(t){if(!e){var r=n.formatLanguageCode(t);n.options.supportedLngs&&!n.isSupportedCode(r)||(e=r)}})),!e&&this.options.supportedLngs&&t.forEach((function(t){if(!e){var r=n.getLanguagePartFromCode(t);if(n.isSupportedCode(r))return e=r;e=n.options.supportedLngs.find((function(t){if(0===t.indexOf(r))return t}))}})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(n.isSupportedCode(t)?i.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),r.forEach((function(t){i.indexOf(t)<0&&o(n.formatLanguageCode(t))})),i}}]),t}(),oe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],se={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}},ae=["v1","v2","v3"],le={zero:0,one:1,two:2,few:3,many:4,other:5};var ce=function(){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yt(this,t),this.languageUtils=e,this.options=r,this.logger=It.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},oe.forEach((function(t){t.lngs.forEach((function(e){n[e]={numbers:t.nr,plurals:se[t.fc]}}))})),n)}return bt(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map((function(t){return"".concat(e).concat(t)}))}},{key:"getSuffixes",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(t,e){return le[t]-le[e]})).map((function(t){return"".concat(e.options.prepend).concat(t)})):r.numbers.map((function(r){return e.getSuffix(t,r,n)})):[]}},{key:"getSuffix",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(e)):this.getSuffixRetroCompatible(r,e):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,e){var n=this,r=t.noAbs?t.plurals(e):t.plurals(Math.abs(e)),i=t.numbers[r];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!ae.includes(this.options.compatibilityJSON)}}]),t}();function ue(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function he(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ue(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var pe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yt(this,t),this.logger=It.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return bt(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:Ut,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?Gt(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?Gt(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?Gt(e.nestingPrefix):e.nestingPrefixEscaped||Gt("$t("),this.nestingSuffix=e.nestingSuffix?Gt(e.nestingSuffix):e.nestingSuffixEscaped||Gt(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}var u=function(t){if(t.indexOf(a.formatSeparator)<0){var i=Bt(e,l,t);return a.alwaysFormat?a.format(i,void 0,n,he(he(he({},r),e),{},{interpolationkey:t})):i}var o=t.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(Bt(e,l,s),c,n,he(he(he({},r),e),{},{interpolationkey:s}))};this.resetRegExp();var h=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,f=[{regex:this.regexpUnescape,safeValue:function(t){return c(t)}},{regex:this.regexp,safeValue:function(t){return a.escapeValue?c(a.escape(t)):c(t)}}];return f.forEach((function(e){for(s=0;i=e.regex.exec(t);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof h){var l=h(t,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(p){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(t)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=Dt(o));var c=e.safeValue(o);if(t=t.replace(i[0],c),p?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=i[0].length):e.regex.lastIndex=0,++s>=a.maxReplaces)break}})),t}},{key:"nest",value:function(t,e){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=he({},o);function a(t,e){var n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;var r=t.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);t=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),e&&(s=he(he({},e),s))}catch(e){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),e),"".concat(t).concat(n).concat(i)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(t){return t.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=e(a.call(this,n[1].trim(),s),s))&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Dt(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),r=""),c&&(r=l.reduce((function(t,e){return i.format(t,e,o.lng,he(he({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}]),t}();function fe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function de(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fe(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ge(t){var e={};return function(n,r,i){var o=r+JSON.stringify(i),s=e[o];return s||(s=t(r,i),e[o]=s),s(n)}}var ve=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yt(this,t),this.logger=It.create("formatter"),this.options=e,this.formats={number:ge((function(t,e){var n=new Intl.NumberFormat(t,e);return function(t){return n.format(t)}})),currency:ge((function(t,e){var n=new Intl.NumberFormat(t,de(de({},e),{},{style:"currency"}));return function(t){return n.format(t)}})),datetime:ge((function(t,e){var n=new Intl.DateTimeFormat(t,de({},e));return function(t){return n.format(t)}})),relativetime:ge((function(t,e){var n=new Intl.RelativeTimeFormat(t,de({},e));return function(t){return n.format(t,e.range||"day")}})),list:ge((function(t,e){var n=new Intl.ListFormat(t,de({},e));return function(t){return n.format(t)}}))},this.init(e)}return bt(t,[{key:"init",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}},{key:"add",value:function(t,e){this.formats[t.toLowerCase().trim()]=e}},{key:"addCached",value:function(t,e){this.formats[t.toLowerCase().trim()]=ge(e)}},{key:"format",value:function(t,e,n,r){var i=this,o=e.split(this.formatSeparator).reduce((function(t,e){var o=function(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===e&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===e&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(t){if(t){var e=kt(t.split(":")),r=e[0],i=e.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}return{formatName:e,formatOptions:n}}(e),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=t;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[s](t,u,de(de(de({},a),r),c))}catch(t){i.logger.warn(t)}return l}return i.logger.warn("there was no format function for ".concat(s)),t}),t);return o}}]),t}();function me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ye(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?me(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _e(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ct(t);if(e){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Et(this,n)}}var be=function(t){St(n,t);var e=_e(n);function n(t,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return yt(this,n),o=e.call(this),Ht&&At.call(wt(o)),o.backend=t,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=It.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return bt(n,[{key:"queueLoad",value:function(t,e,n,r){var i=this,o={},s={},a={},l={};return t.forEach((function(t){var r=!0;e.forEach((function(e){var a="".concat(t,"|").concat(e);!n.reload&&i.store.hasResourceBundle(t,e)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[e]&&(l[e]=!0)))})),r||(a[t]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(t,e,n){var r=t.split("|"),i=r[0],o=r[1];e&&this.emit("failedLoading",i,o,e),n&&this.store.addResourceBundle(i,o,n),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(n){!function(t,e,n,r){var i=jt(t,e,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}(n.loaded,[i],o),function(t,e){void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)}(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(t){s[t]||(s[t]={});var e=n.loaded[t];e.length&&e.forEach((function(e){void 0===s[t][e]&&(s[t][e]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return t.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](t,e,(function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,t,e,n,i+1,2*o,s)}),o):s(a,l)}))):s(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var o=this.queueLoad(t,e,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(t){n.loadOne(t)}))}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&e.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&e.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),e.loaded(t,r,s)}))}},{key:"saveMissing",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(e,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,ye(ye({},o),{},{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,n,r))}}]),n}(At);function we(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function xe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Se(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xe(Object(n),!0).forEach((function(e){Tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ee(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ct(t);if(e){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Et(this,n)}}function Ce(){}var Te=function(t){St(n,t);var e=Ee(n);function n(){var t,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(yt(this,n),t=e.call(this),Ht&&At.call(wt(t)),t.options=we(i),t.services={},t.logger=It,t.modules={external:[]},r=wt(t),Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((function(t){"function"==typeof r[t]&&(r[t]=r[t].bind(r))})),o&&!t.isInitialized&&!i.isClone){if(!t.options.initImmediate)return t.init(i,o),Et(t,wt(t));setTimeout((function(){t.init(i,o)}),0)}return t}return bt(n,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));var r={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===mt(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===mt(t[2])||"object"===mt(t[3])){var n=t[3]||t[2];Object.keys(n).forEach((function(t){e[t]=n[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function i(t){return t?"function"==typeof t?new t:t:null}if(this.options=Se(Se(Se({},r),this.options),we(e)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=Se(Se({},r.interpolation),this.options.interpolation)),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){var o;this.modules.logger?It.init(i(this.modules.logger),this.options):It.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=ve);var s=new ie(this.options);this.store=new Kt(this.options.resources,this.options);var a=this.services;a.logger=It,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new ce(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new pe(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new be(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new ne(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.format=this.options.interpolation.format,n||(n=Ce),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var c=Rt(),u=function(){var e=function(e,r){t.isInitialized&&!t.initializedStoreOnce&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(r),n(e,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}},{key:"loadResources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce,r="string"==typeof t?t:this.language;if("function"==typeof t&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var i=[],o=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(t){i.indexOf(t)<0&&i.push(t)}))};if(r)o(r);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(t){return o(t)}));this.options.preload&&this.options.preload.forEach((function(t){return o(t)})),this.services.backendConnector.load(i,this.options.ns,(function(t){t||e.resolvedLanguage||!e.language||e.setResolvedLanguage(e.language),n(t)}))}else n(null)}},{key:"reloadResources",value:function(t,e,n){var r=Rt();return t||(t=this.languages),e||(e=this.options.ns),n||(n=Ce),this.services.backendConnector.reload(t,e,(function(t){r.resolve(),n(t)})),r}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&$t.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"setResolvedLanguage",value:function(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(var e=0;e<this.languages.length;e++){var n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(t,e){var n=this;this.isLanguageChangingTo=t;var r=Rt();this.emit("languageChanging",t);var i=function(t){n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.resolvedLanguage=void 0,n.setResolvedLanguage(t)},o=function(o){t||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(t){!function(t,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),e&&e(t,(function(){return n.t.apply(n,arguments)}))}(t,s)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e,n){var r=this,i=function t(e,i){var o;if("object"!==mt(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([e,i].concat(a))}else o=Se({},i);o.lng=o.lng||t.lng,o.lngs=o.lngs||t.lngs,o.ns=o.ns||t.ns,o.keyPrefix=o.keyPrefix||n||t.keyPrefix;var c=r.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(e):e;return r.t(u,o)};return"string"==typeof t?i.lng=t:i.lngs=t,i.ns=e,i.keyPrefix=n,i}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(t,n){var r=e.services.backendConnector.state["".concat(t,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,t)||i&&!s(o,t)))}},{key:"loadNamespaces",value:function(t,e){var n=this,r=Rt();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){n.options.ns.indexOf(t)<0&&n.options.ns.push(t)})),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=Rt();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],i=t.filter((function(t){return r.indexOf(t)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce,i=Se(Se(Se({},this.options),e),{isClone:!0}),o=new n(i);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((function(e){o[e]=t[e]})),o.services=Se({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new ne(o.services,o.options),o.translator.on("*",(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit.apply(o,[t].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(At);Tt(Te,"createInstance",(function(){return new Te(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var Oe=Te.createInstance();Oe.createInstance=Te.createInstance;Oe.createInstance,Oe.init,Oe.loadResources,Oe.reloadResources,Oe.use,Oe.changeLanguage,Oe.getFixedT,Oe.t,Oe.exists,Oe.setDefaultNamespace,Oe.hasLoadedNamespace,Oe.loadNamespaces,Oe.loadLanguages;const ke=Oe;var Me=[],Pe=Me.forEach,Le=Me.slice;function Ie(t,e){if(e&&"object"===mt(e)){var n="",r=encodeURIComponent;for(var i in e)n+="&"+r(i)+"="+r(e[i]);if(!n)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+n.slice(1)}return t}function Ae(t,e,n,r,i){r&&"object"===mt(r)&&(i||(r._t=new Date),r=Ie("",r).slice(1)),e.queryStringParams&&(t=Ie(t,e.queryStringParams));try{var o;(o=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0")).open(r?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,r&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var s=e.customHeaders;if(s="function"==typeof s?s():s)for(var a in s)o.setRequestHeader(a,s[a]);o.onreadystatechange=function(){o.readyState>3&&n&&n(o.responseText,o)},o.send(r)}catch(t){console&&console.log(t)}}var Re=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yt(this,t),this.init(e,n),this.type="backend"}return bt(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=t,this.options=function(t){return Pe.call(Le.call(arguments,1),(function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])})),t}(e,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,parsePayload:function(t,e,n){return Tt({},e,n||"")},crossDomain:!1,ajax:Ae})}},{key:"readMulti",value:function(t,e,n){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath(t,e));var i=this.services.interpolator.interpolate(r,{lng:t.join("+"),ns:e.join("+")});this.loadUrl(i,n)}},{key:"read",value:function(t,e,n){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath([t],[e]));var i=this.services.interpolator.interpolate(r,{lng:t,ns:e});this.loadUrl(i,n)}},{key:"loadUrl",value:function(t,e){var n=this;this.options.ajax(t,this.options,(function(r,i){if(i.status>=500&&i.status<600)return e("failed loading "+t,!0);if(i.status>=400&&i.status<500)return e("failed loading "+t,!1);var o,s;try{o=n.options.parse(r,t)}catch(e){s="failed parsing "+t+" to json"}if(s)return e(s,!1);e(null,o)}))}},{key:"create",value:function(t,e,n,r){var i=this;"string"==typeof t&&(t=[t]);var o=this.options.parsePayload(e,n,r);t.forEach((function(t){var n=i.services.interpolator.interpolate(i.options.addPath,{lng:t,ns:e});i.options.ajax(n,i.options,(function(t,e){}),o)}))}}]),t}();Re.type="backend";const De=Re;var je=n(291);class Fe extends je.ZP{constructor(t,e){super(t),this.detail=e}}const Ne=()=>{const t=window.navigator.userAgent.toLowerCase();try{let e;return-1!=t.indexOf("chrome")?(e=(navigator.languages[0]||navigator.browserLanguage||navigator.language||navigator.userLanguage).split(";"),e[0]):(e=(navigator.browserLanguage||navigator.language||navigator.userLanguage).split(";"),e[0])}catch(t){return""}},Be=["ALL","OFF"],ze={ALL:-99,DEBUG:-1,INFO:0,WARN:1,ERROR:2,OFF:99};class Ge{constructor(t=ze.INFO){this.level=t,this.make()}make(){const t=Object.keys(ze).filter((t=>!Be.includes(t)));for(const e of t){const t=ze[e];this[e.toLowerCase()]=this.level<=t?console.log:()=>{}}}}var Xe={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};var Ue={};Ue[Xe.RADIANS]=6370997/(2*Math.PI),Ue[Xe.DEGREES]=2*Math.PI*6370997/360,Ue[Xe.FEET]=.3048,Ue[Xe.METERS]=1,Ue[Xe.USFEET]=1200/3937;const He=Xe;const qe=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Ue[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function Ze(t,e,n){return Math.min(Math.max(t,e),n)}var We="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Ve="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ye(t,e,n,r,i,o){var s=i-n,a=o-r;if(0!==s||0!==a){var l=((t-n)*s+(e-r)*a)/(s*s+a*a);l>1?(n=i,r=o):l>0&&(n+=s*l,r+=a*l)}return Ke(t,e,n,r)}function Ke(t,e,n,r){var i=n-t,o=r-e;return i*i+o*o}function $e(t){return 180*t/Math.PI}function Je(t){return t*Math.PI/180}function Qe(t,e){var n=t%e;return n*e<0?n+e:n}function tn(t,e,n){return t+n*(e-t)}function en(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function nn(t,e){return Math.floor(en(t,e))}function rn(t,e){return Math.ceil(en(t,e))}var on,sn=(on=function(t,e){return on=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},on(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}on(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),an=6378137,ln=Math.PI*an,cn=[-ln,-ln,ln,ln],un=[-180,-85,180,85],hn=an*Math.log(Math.tan(Math.PI/2)),pn=function(t){function e(e){return t.call(this,{code:e,units:He.METERS,extent:cn,global:!0,worldExtent:un,getPointResolution:function(t,e){return t/We(e[1]/an)}})||this}return sn(e,t),e}(qe),fn=[new pn("EPSG:3857"),new pn("EPSG:102100"),new pn("EPSG:102113"),new pn("EPSG:900913"),new pn("http://www.opengis.net/def/crs/EPSG/0/3857"),new pn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function dn(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i){o[s]=ln*t[s]/180;var a=an*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>hn?a=hn:a<-hn&&(a=-hn),o[s+1]=a}return o}function gn(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i)o[s]=180*t[s]/ln,o[s+1]=360*Math.atan(Math.exp(t[s+1]/an))/Math.PI-90;return o}var vn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=[-180,-90,180,90],yn=6378137*Math.PI/180,_n=function(t){function e(e,n){return t.call(this,{code:e,units:He.DEGREES,extent:mn,axisOrientation:n,global:!0,metersPerUnit:yn,worldExtent:mn})||this}return vn(e,t),e}(qe),bn=[new _n("CRS:84"),new _n("EPSG:4326","neu"),new _n("urn:ogc:def:crs:OGC:1.3:CRS84"),new _n("urn:ogc:def:crs:OGC:2:84"),new _n("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new _n("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new _n("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],wn={};var xn={};function Sn(t,e,n){var r=t.getCode(),i=e.getCode();r in xn||(xn[r]={}),xn[r][i]=n}const En={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};var Cn=n(4187),Tn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const On=function(t){function e(e){var n=this,r="Assertion failed. See https://openlayers.org/en/"+("latest"===Cn.q4?Cn.q4:"v"+Cn.q4.split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,r)||this).code=e,n.name="AssertionError",n.message=r,n}return Tn(e,t),e}(Error);function kn(t,e){if(!t)throw new On(e)}function Mn(t){for(var e=Fn(),n=0,r=t.length;n<r;++n)Gn(e,t[n]);return e}function Pn(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Ln(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function In(t,e,n){var r,i;return(r=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*r+(i=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*i}function An(t,e){return Dn(t,e[0],e[1])}function Rn(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Dn(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function jn(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],s=e[0],a=e[1],l=En.UNKNOWN;return s<n?l|=En.LEFT:s>i&&(l|=En.RIGHT),a<r?l|=En.BELOW:a>o&&(l|=En.ABOVE),l===En.UNKNOWN&&(l=En.INTERSECTING),l}function Fn(){return[1/0,1/0,-1/0,-1/0]}function Nn(t,e,n,r,i){return i?(i[0]=t,i[1]=e,i[2]=n,i[3]=r,i):[t,e,n,r]}function Bn(t){return Nn(1/0,1/0,-1/0,-1/0,t)}function zn(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Gn(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Xn(t,e,n,r,i){for(;n<r;n+=i)Un(t,e[n],e[n+1]);return t}function Un(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function Hn(t,e){var n;return(n=e(Zn(t)))||(n=e(Wn(t)))||(n=e(er(t)))?n:(n=e(tr(t)))||!1}function qn(t){var e=0;return ir(t)||(e=nr(t)*Jn(t)),e}function Zn(t){return[t[0],t[1]]}function Wn(t){return[t[2],t[1]]}function Vn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Yn(t,e){var n;return"bottom-left"===e?n=Zn(t):"bottom-right"===e?n=Wn(t):"top-left"===e?n=tr(t):"top-right"===e?n=er(t):kn(!1,13),n}function Kn(t,e,n,r,i){var o=$n(t,e,n,r),s=o[0],a=o[1],l=o[2],c=o[3],u=o[4],h=o[5],p=o[6],f=o[7];return Nn(Math.min(s,l,u,p),Math.min(a,c,h,f),Math.max(s,l,u,p),Math.max(a,c,h,f),i)}function $n(t,e,n,r){var i=e*r[0]/2,o=e*r[1]/2,s=Math.cos(n),a=Math.sin(n),l=i*s,c=i*a,u=o*s,h=o*a,p=t[0],f=t[1];return[p-l+h,f-c-u,p-l-h,f-c+u,p+l-h,f+c+u,p+l+h,f+c-u,p-l+h,f-c-u]}function Jn(t){return t[3]-t[1]}function Qn(t,e,n){var r=n||[1/0,1/0,-1/0,-1/0];return rr(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):Bn(r),r}function tr(t){return[t[0],t[3]]}function er(t){return[t[2],t[3]]}function nr(t){return t[2]-t[0]}function rr(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function ir(t){return t[2]<t[0]||t[3]<t[1]}function or(t,e,n,r){var i=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<r;++a)i.push(t[0]+o*a/r,t[1],t[2],t[1]+s*a/r,t[2]-o*a/r,t[3],t[0],t[3]-s*a/r);else i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(i,i,2);for(var l=[],c=[],u=(a=0,i.length);a<u;a+=2)l.push(i[a]),c.push(i[a+1]);return function(t,e,n){return Nn(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,c,n)}function sr(t,e){var n=e.getExtent(),r=Vn(t);if(e.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){var i=nr(n),o=Math.floor((r[0]-n[0])/i)*i;t[0]-=o,t[2]-=o}return t}function ar(t,e){for(var n=!0,r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function lr(t,e){var n=Math.cos(e),r=Math.sin(e),i=t[0]*n-t[1]*r,o=t[1]*n+t[0]*r;return t[0]=i,t[1]=o,t}function cr(t,e){if(e.canWrapX()){var n=nr(e.getExtent()),r=function(t,e,n){var r=e.getExtent(),i=0;if(e.canWrapX()&&(t[0]<r[0]||t[0]>r[2])){var o=n||nr(r);i=Math.floor((t[0]-r[0])/o)}return i}(t,e,n);r&&(t[0]-=r*n)}return t}var ur=6371008.8;function hr(t,e,n){var r=n||ur,i=Je(t[1]),o=Je(e[1]),s=(o-i)/2,a=Je(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function pr(t,e,n,r){var i=r||ur,o=Je(t[1]),s=Je(t[0]),a=e/i,l=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(n));return[$e(s+Math.atan2(Math.sin(n)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(l))),$e(l)]}var fr=!0;function dr(t){fr=!(void 0===t||t)}function gr(t,e,n){var r;if(void 0!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];r=e}else r=t.slice();return r}function vr(t,e,n){if(void 0!==e&&t!==e){for(var r=0,i=t.length;r<i;++r)e[r]=t[r];t=e}return t}function mr(t){!function(t,e){wn[t]=e}(t.getCode(),t),Sn(t,t,gr)}function yr(t){return"string"==typeof t?wn[e=t]||wn[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function _r(t,e,n,r){var i,o=(t=yr(t)).getPointResolutionFunc();if(o){if(i=o(e,n),r&&r!==t.getUnits())(a=t.getMetersPerUnit())&&(i=i*a/Ue[r])}else{var s=t.getUnits();if(s==He.DEGREES&&!r||r==He.DEGREES)i=e;else{var a,l=Tr(t,yr("EPSG:4326"));if(l===vr&&s!==He.DEGREES)i=e*t.getMetersPerUnit();else{var c=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];i=(hr((c=l(c,c,2)).slice(0,2),c.slice(2,4))+hr(c.slice(4,6),c.slice(6,8)))/2}void 0!==(a=r?Ue[r]:t.getMetersPerUnit())&&(i/=a)}}return i}function br(t){!function(t){t.forEach(mr)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Sn(e,t,gr)}))}))}function wr(t,e){return t?"string"==typeof t?yr(t):t:yr(e)}function xr(t){return function(e,n,r){for(var i=e.length,o=void 0!==r?r:2,s=void 0!==n?n:new Array(i),a=0;a<i;a+=o)for(var l=t(e.slice(a,a+o)),c=l.length,u=0,h=o;u<h;++u)s[a+u]=u>=c?e[a+u]:l[u];return s}}function Sr(t,e,n,r){var i=yr(t),o=yr(e);Sn(i,o,xr(n)),Sn(o,i,xr(r))}function Er(t,e){var n=kr(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=Qe(r+180,360)-180),n}function Cr(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Tr(t,e)===gr)&&n}function Tr(t,e){var n=function(t,e){var n;return t in xn&&e in xn[t]&&(n=xn[t][e]),n}(t.getCode(),e.getCode());return n||(n=vr),n}function Or(t,e){return Tr(yr(t),yr(e))}function kr(t,e,n){return Or(e,n)(t,void 0,t.length)}function Mr(t,e,n,r){return or(t,Or(e,n),void 0,r)}var Pr,Lr,Ir,Ar=null;function Rr(){return Ar}function Dr(t,e){return Ar?kr(t,e,Ar):t}function jr(t,e){return Ar?kr(t,Ar,e):(fr&&!ar(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(fr=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Fr(t,e){return Ar?Mr(t,e,Ar):t}function Nr(t,e){return Ar?Mr(t,Ar,e):t}function Br(t,e){if(!Ar)return t;var n=yr(e).getUnits(),r=Ar.getUnits();return n&&r?t*Ue[n]/Ue[r]:t}br(fn),br(bn),Pr=fn,Lr=dn,Ir=gn,bn.forEach((function(t){Pr.forEach((function(e){Sn(t,e,Lr),Sn(e,t,Ir)}))}));const zr=20037508.342789244,Gr=[[0,0],[0,1],[1,0],[0,-1],[-1,0]],Xr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAB3RJTUUH3QgIBToaSbAjlwAAABd0RVh0U29mdHdhcmUAR0xEUE5HIHZlciAzLjRxhaThAAAACHRwTkdHTEQzAAAAAEqAKR8AAAAEZ0FNQQAAsY8L/GEFAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAFRJREFUeNrtwQEBAAAAgJD+r+4ICgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgBDwABHHIJwwAAAABJRU5ErkJggg==",Ur=256,Hr=`<canvas width="256" height="256" src="${Xr}"></canvas>`;async function qr(t){return"string"==typeof t?new Promise(((e,n)=>{const r=t.match(/\//)?t:`pois/${t}`,i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="json",i.onload=function(t){if(200==this.status||0==this.status)try{let t=this.response;"string"==typeof t&&(t=JSON.parse(t)),e(t)}catch(t){n(t)}else n("Fail to load poi json")},i.send()})):t}async function Zr(t,e){if(t=await qr(t),Array.isArray(t))t=(t=await Promise.all(t.map((async t=>await qr(t))))).length>0&&"FeatureCollection"===t[0].type?t.reduce(((t,n,r)=>{let i=n.id||n.properties&&n.properties.id;if(!i){if(0!==r)throw"POI layers include bad key setting";i="main"}return t[i]=Wr(n,i,e),t}),{}):{main:Wr(t,"main",e)};else if("FeatureCollection"===t.type){const n=t.id||t.properties&&t.properties.id||"main";t={[n]:Wr(t,n,e)}}else Object.keys(t).map((n=>{t[n]=Wr(t[n],n,e)}));return t.main||(t.main=Wr([],"main",e)),Object.keys(t).map((n=>{Yr(t,n,e)})),t}function Wr(t,e,n){if(Array.isArray(t))t={pois:t.map((t=>Vr(t)))};else if("FeatureCollection"===t.type){const e=Object.assign({},t.properties||{});t.name&&(e.name=t.name),e.pois=t.features.map((t=>Vr(t))),t=e}if(void 0===t.id)t.id=e;else if(t.id!==e)throw"POI layers include bad key setting";return t.namespaceID||(t.namespaceID=`${n.namespace?`${n.namespace}#`:""}${e}`),t.name||(t.name="main"===e?n.name:e),t.pois||(t.pois=[]),t}function Vr(t){if("Feature"===t.type){const e=Object.assign({},t.properties||{});e.lnglat=t.geometry.coordinates,e.id||(e.id=t.id),e.name||(e.name=t.name),t=e}return t.lnglat||(t.lnglat=[t.lng||t.longitude,t.lat||t.latitude]),delete t.lng,delete t.lat,delete t.longitude,delete t.latitude,t}function Yr(t,e,n){if(!t[e])return;const r=t[e],i=r.pois;r.__nextId||(r.__nextId=0),i.map((t=>{t.id||(t.id=`${e}_${r.__nextId}`,r.__nextId++),t.namespaceID||(t.namespaceID=`${n.namespace?`${n.namespace}#`:""}${t.id}`)}))}var Kr=n(9346);function $r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Jr(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qr(t[0])||!Qr(t[1]))throw new Error("coordinates must contain numbers");return $r({type:"Point",coordinates:t},e,n)}function Qr(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ti(t,e,n){if(null!==t)for(var r,i,o,s,a,l,c,u,h=0,p=0,f=t.type,d="FeatureCollection"===f,g="Feature"===f,v=d?t.features.length:1,m=0;m<v;m++){a=(u=!!(c=d?t.features[m].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var y=0;y<a;y++){var _=0,b=0;if(null!==(s=u?c.geometries[y]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,m,_,b))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,m,_,b))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,m,_,b))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,m,_,b))return!1;p++}b++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===ti(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}const ei=function(t,e){void 0===e&&(e={});var n=0,r=0,i=0;return ti(t,(function(t){n+=t[0],r+=t[1],i++}),!0),Jr([n/i,r/i],e.properties)};function ni(t){return class extends t{constructor(){super(...arguments),this.officialTitle="",this.title="",this.mapID="",this.label="",this.homeMarginPixels=0}getCacheEnable(){return!!this.weiwudi}async getTileCacheStatsAsync(){if(!this.weiwudi)return{};try{return await this.weiwudi.stats()}catch(t){return{}}}async getTileCacheSizeAsync(){return(await this.getTileCacheStatsAsync()).size||0}async fetchAllTileCacheAsync(t){if(this.weiwudi)try{const e=e=>{t(e.type,e.detail)},n=t=>{this.weiwudi.removeEventListener("proceed",e),this.weiwudi.removeEventListener("finish",n),this.weiwudi.removeEventListener("stop",n),this.weiwudi.removeEventListener("canceled",n),e(t)};this.weiwudi.addEventListener("proceed",e),this.weiwudi.addEventListener("finish",n),this.weiwudi.addEventListener("stop",n),this.weiwudi.addEventListener("canceled",n),await this.weiwudi.fetchAll()}catch(t){}}async cancelTileCacheAsync(){if(this.weiwudi)try{await this.weiwudi.cancel()}catch(t){}}async clearTileCacheAsync(){if(this.weiwudi)try{await this.weiwudi.clean()}catch(t){}}getMap(){return this._map}setMap(t){this._map=t}setViewpointRadian(t){let e,n;const r=t.mercZoom,i=t.zoom,o=t.direction,s=t.rotation,a=this.getMap(),l=null==a?void 0:a.getView();void 0!==t.latitude&&void 0!==t.longitude&&(e=kr([t.longitude,t.latitude],"EPSG:4326","EPSG:3857")),void 0!==t.x&&null!=t.y&&(n=[t.x,t.y]),this.viewpoint2MercsAsync().then((t=>this.mercs2MercViewpoint(t))).then((t=>{const a=this.mercViewpoint2Mercs([e||t[0],r||t[1]||17,null!==o?o:t[2]]);this.mercs2ViewpointAsync(a).then((t=>{null!=e?null==l||l.setCenter(t[0]):null!=n&&(null==l||l.setCenter(n)),null!=r?null==l||l.setZoom(t[1]):null!=i&&(null==l||l.setZoom(i)),null!=o?null==l||l.setRotation(t[2]):null!=s&&(null==l||l.setRotation(s))}))}))}setViewpoint(t){t.rotation&&(t.rotation=t.rotation*Math.PI/180),t.direction&&(t.direction=t.direction*Math.PI/180),this.setViewpointRadian(t)}goHome(){const t=this.getMap();let e=t.getTarget();"string"==typeof e&&(e=document.getElementById(e));const n=t.homeMarginPixels,r=[1*(e.clientWidth-n-10),1*(e.clientHeight-n-10)],i={longitude:this.homePosition[0],latitude:this.homePosition[1],zoom:this.defZoom(r)};this.getMap().northUp?i.direction=0:i.rotation=0,this.setViewpointRadian(i)}resetRotation(){this.setViewpointRadian({rotation:0})}resetDirection(){this.setViewpointRadian({direction:0})}resetCirculation(){this.getMap().northUp?this.resetDirection():this.resetRotation()}setGPSMarkerAsync(t,e=!1){const n=this.getMap(),r=null==n?void 0:n.getView();if(!t)return new Promise(((t,e)=>{null==n||n.setGPSPosition(null),t(!0)}));const i=this.mercsFromGPSValue(t.lnglat,t.acc);return this.mercs2SysCoordsAsync_multiLayer([i]).then((t=>{const i=!t[0],o=i?t[1]:t[0],s=i?null:t[1],a={xy:o[0][0]};if(!this.insideCheckSysCoord(o[0][0]))return null==n||n.handleGPS(!1,!0),!1;const l=o[0].slice(1);return a.rad=l.reduce(((t,e,n)=>{const r=t+Math.sqrt(Math.pow(e[0]-a.xy[0],2)+Math.pow(e[1]-a.xy[1],2));return 3===n?r/4:r}),0),e||null==r||r.setCenter(a.xy),null==n||n.setGPSPosition(a,i?"hide":null),s&&(null==n||n.setGPSPosition({xy:s[0][0]},"sub")),!0})).catch((t=>{throw t}))}setGPSMarker(t,e=!1){this.setGPSMarkerAsync(t,e).then((()=>{}))}mercsFromGPSValue(t,e){const n=kr(t,"EPSG:4326","EPSG:3857"),r=t[1]*Math.PI/180,i=e/Math.cos(r);return Gr.map((t=>[t[0]*i+n[0],t[1]*i+n[1]]))}rotateMatrix(t,e){void 0===e&&(e=this.getMap().getView().getRotation());const n=[];for(let r=0;r<t.length;r++){const i=t[r],o=i[0]*Math.cos(e)-i[1]*Math.sin(e),s=i[0]*Math.sin(e)+i[1]*Math.cos(e);n.push([o,s])}return n}async resolvePois(t){this.pois=await Zr(t||[],{name:this.officialTitle||this.title,namespace:this.mapID})}getPoi(t){let e;return Object.keys(this.pois).map((n=>{this.pois[n].pois.map(((r,i)=>{r.id===t&&(e=this.pois[n].pois[i])}))})),e}addPoi(t,e){if(e||(e="main"),this.pois[e])return t=Vr(t),this.pois[e].pois.push(t),Yr(this.pois,e,{name:this.officialTitle||this.title,namespace:this.mapID}),t.namespaceID}removePoi(t){Object.keys(this.pois).map((e=>{this.pois[e].pois.map(((n,r)=>{n.id===t&&delete this.pois[e].pois[r]}))}))}clearPoi(t){t||(t="main"),"all"===t?Object.keys(this.pois).map((t=>{this.pois[t].pois=[]})):this.pois[t]&&(this.pois[t].pois=[])}listPoiLayers(t=!1,e=!1){return Object.keys(this.pois).sort(((t,e)=>"main"===t?-1:"main"===e?1:t<e?-1:t>e?1:0)).map((t=>this.pois[t])).filter((n=>e?t?n.pois.length&&n.hide:n.pois.length:!t||n.hide))}getPoiLayer(t){return this.pois[t]}addPoiLayer(t,e){"main"!==t&&(this.pois[t]||(this.pois[t]=Wr(e||[],t,{name:this.officialTitle||this.title,namespace:this.mapID})))}removePoiLayer(t){"main"!==t&&this.pois[t]&&delete this.pois[t]}merc2SysCoordAsync_ignoreBackground(t){return this.merc2XyAsync_ignoreBackground(t).then((t=>t?this.xy2SysCoord(t):void 0))}merc2SysCoordAsync(t){return this.merc2XyAsync(t).then((t=>t?this.xy2SysCoord(t):t))}sysCoord2MercAsync(t){const e=this.sysCoord2Xy(t);return this.xy2MercAsync(e)}zoom2Radius(t,e){const n=Math.floor(Math.min(t[0],t[1])/4);return void 0===e&&(e=this.getMap().getView().getDecimalZoom()),n*zr/128/Math.pow(2,e)}viewpoint2SysCoords(t,e){return this.mercViewpoint2Mercs(t,e)}mercViewpoint2Mercs(t,e){let n=t?t[0]:void 0;const r=t?t[1]:void 0,i=t?t[2]:void 0;void 0===n&&(n=this.getMap().getView().getCenter()),void 0===e&&(e=this.getMap().getSize());const o=this.zoom2Radius(e,r);return[this.rotateMatrix(Gr,i).map((t=>[t[0]*o+n[0],t[1]*o+n[1]])),e]}sysCoords2Viewpoint(t){return this.mercs2MercViewpoint(t)}mercs2MercViewpoint(t){const e=t[0][0];let n=t[1];const r=t[0].slice(1,5).map((t=>[t[0]-e[0],t[1]-e[1]])),i=[[0,1],[1,0],[0,-1],[-1,0]];let o=0,s=0,a=0;for(let t=0;t<4;t++){const e=r[t],n=i[t],l=Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2));o+=l;const c=e[0]*n[1]-e[1]*n[0],u=Math.acos((e[0]*n[0]+e[1]*n[1])/l),h=c>0?-1*u:u;s+=Math.cos(h),a+=Math.sin(h)}const l=o/4,c=Math.atan2(a,s);n||(n=this.getMap().getSize());const u=Math.floor(Math.min(n[0],n[1])/4),h=Math.log(u*zr/128/l)/Math.log(2);return[e,h,c]}sysCoords2Xys(t){return[t[0].map((t=>this.sysCoord2Xy(t))),t[1]]}xys2SysCoords(t){return[t[0].map((t=>this.xy2SysCoord(t))),t[1]]}mercs2XysAsync(t){return Promise.all(t[0].map((t=>this.merc2XyAsync(t)))).then((e=>[e,t[1]]))}xys2MercsAsync(t){return Promise.all(t[0].map((t=>this.xy2MercAsync(t)))).then((e=>[e,t[1]]))}}}const ri=["title","officialTitle","author","createdAt","era","contributor","mapper","license","dataLicense","attr","dataAttr","reference","description"],ii=["title","official_title","author","created_at","era","contributor","mapper","license","data_license","attr","data_attr","reference","description"];function oi(t,e){var n;if(e=ui(e),t.mapID=e.mapID,t.homePosition=e.homePosition,t.mercZoom=e.mercZoom,t.label=e.label,t.maxZoom=e.maxZoom,t.minZoom=e.minZoom,t.poiTemplate=e.poiTemplate,t.poiStyle=e.poiStyle,t.iconTemplate=e.iconTemplate,t.icon=e.icon,t.selectedIcon=e.selectedIcon,t.mercatorXShift=e.mercatorXShift,t.mercatorYShift=e.mercatorYShift,t.weiwudi=e.weiwudi,e.envelopeLngLats){const r=e.envelopeLngLats.map((t=>kr(t,"EPSG:4326","EPSG:3857")));r.push(r[0]),t.envelope=(0,Kr.yu)([r]),t.centroid=null===(n=ei(t.envelope).geometry)||void 0===n?void 0:n.coordinates}for(let n=0;n<ri.length;n++){const r=ri[n],i=ii[n];t[r]=e[i]||e[r]}const r=e.thumbnail?new Promise((n=>{t.thumbnail=e.thumbnail,n(void 0)})):new Promise((n=>{t.thumbnail=`./tmbs/${e.mapID}.jpg`,fetch(t.thumbnail).then((r=>{r.ok||(t.thumbnail=`./tmbs/${e.mapID}_menu.jpg`),n(void 0)})).catch((r=>{t.thumbnail=`./tmbs/${e.mapID}_menu.jpg`,n(void 0)}))})).catch((n=>{t.thumbnail=`./tmbs/${e.mapID||e.sourceID}_menu.jpg`})),i=t.resolvePois(e.pois);t.initialWait=Promise.all([i,r])}function si(t){const e=t;t.setTileLoadFunction(function(){const t=e.getTileLoadFunction();return function(n,r){const i=n.tileCoord[0];let o=n.tileCoord[1],s=n.tileCoord[2],a=Math.round(128*(e.mercatorXShift||0)*Math.pow(2,i)/zr),l=Math.round(-128*(e.mercatorYShift||0)*Math.pow(2,i)/zr);for(;a<0||a>=256;)a<0?(a+=256,o++):(a-=256,o--);for(;l<0||l>=256;)l<0?(l+=256,s++):(l-=256,s--);const c=document.createElement("div");c.innerHTML=Hr;const u=c.childNodes[0],h=[[[i,o,s],0,0,256-a,256-l]];0!==a&&h.push([[i,o-1,s],256-a,0,a,256-l]),0!==l&&(h.push([[i,o,s-1],0,256-l,256-a,l]),0!==a&&h.push([[i,o-1,s-1],256-a,256-l,a,l])),Promise.all(h.map((t=>{const n=e.tileUrlFunction(t[0],e.tilePixelRatio_,e.projection_);return function(t,e,n,r,i,o,s){return new Promise(((t,a)=>{const l=function(e,a=void 0){0;const c=document.createElement("img");c.crossOrigin="Anonymous",c.onload=c.onerror=function(){if(c.width&&c.height){const e=n.getContext("2d"),a=0===r?256-o:0,l=0===i?256-s:0;o=r+o>c.width?c.width-r:o,s=i+s>c.height?c.height-i:s,e.drawImage(c,r,i,o,s,a,l,o,s),t(void 0)}else a?l(a):t("tileLoadError");0},c.src=e};l(e)}))}(t[0],n,u,t[1],t[2],t[3],t[4])}))).then((e=>{const r=e.reduce(((t,e)=>t&&e),!0);if(r)n.handleImageError_();else{const e=u.toDataURL();n.getImage().crossOrigin=null,t(n,e)}})).catch((t=>{n.handleImageError_()}))}}())}function ai(t){const e=document,n=e.createDocumentFragment(),r=[];t=t.replace(/(<\/?)d([ >])/g,"$1div$2").replace(/(<\/?)s([ >])/g,"$1span$2").replace(/ din="/g,' data-i18n="').replace(/ dinh="/g,' data-i18n-html="').replace(/ c="/g,' class="');const i=n.appendChild(e.createElement("div"));i.innerHTML=t;for(let t=0;t<i.childNodes.length;t++){const n=i.childNodes[t];if(n.nodeName&&"script"===n.nodeName.toLowerCase()){const i=e.createElement("script");n.type&&(i.type=n.type),n.src?i.src=n.src:i.text=n.text,r[t]=i}else r[t]=n}return r}function li(t){for(;!(t<=180&&t>-180);){t+=360*(t>0?-1:1)}return t}function ci(t){if(!t)return;const e={mapID:t.mapID};for(let n=0;n<ri.length;n++){const r=ri[n];t[r]&&(e[r]=t[r])}return e}function ui(t){const e={max_zoom:"maxZoom",min_zoom:"minZoom",envelope_lnglats:"envelopeLngLats",envelopLngLats:"envelopeLngLats",image_extention:"imageExtension",image_extension:"imageExtension",imageExtention:"imageExtension",map_id:"mapID",sourceID:"mapID",source_id:"mapID",merc_max_zoom:"mercMaxZoom",merc_min_zoom:"mercMinZoom",zoom_restriction:"zoomRestriction",enable_cache:"enableCache",default_zoom:"defaultZoom",start_from:"startFrom",home_position:"homePosition",fake_radius:"fakeRadius",fake_center:"fakeCenter",fake_gps:"fakeGps",app_name:"appName",setting_file:"settingFile",merc_zoom:"mercZoom",mapbox_token:"mapboxToken",translate_ui:"translateUI",restore_session:"restoreSession",no_rotate:"noRotate",poi_template:"poiTemplate",poi_style:"poiStyle",icon_template:"iconTemplate",default_center:"defaultCenter",default_rotation:"defaultRotation",selected_icon:"selectedIcon",namespace_id:"namespaceID",mercator_x_shift:"mercatorXShift",mercator_y_shift:"mercatorYShift"};return Object.keys(e).reduce(((t,n)=>(t[n]&&(t[e[n]]=t[n],delete t[n]),t)),t)}var hi,pi=n(5431),fi=n(6885),di=n(177);new Array(6);function gi(t,e,n,r,i,o,s){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t}function vi(t,e){var n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function mi(t,e,n,r,i,o,s,a){var l=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=i*l,t[2]=-r*l,t[3]=i*c,t[4]=s*r*c-a*r*l+e,t[5]=s*i*l+a*i*c+n,t}function yi(t,e){var n,r=(n=e)[0]*n[3]-n[1]*n[2];kn(0!==r,32);var i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],c=e[5];return t[0]=a/r,t[1]=-o/r,t[2]=-s/r,t[3]=i/r,t[4]=(s*c-a*l)/r,t[5]=-(i*c-o*l)/r,t}function _i(t){var e="matrix("+t.join(", ")+")";if(di.Id)return e;var n=hi||(hi=document.createElement("div"));return n.style.transform=e,n.style.transform}var bi=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,wi=/^([a-z]*)$|^hsla?\(.*\)$/i;function xi(t){return"string"==typeof t?t:Oi(t)}function Si(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}var Ei=function(){var t={},e=0;return function(n){var r;if(t.hasOwnProperty(n))r=t[n];else{if(e>=1024){var i=0;for(var o in t)0==(3&i++)&&(delete t[o],--e)}r=function(t){var e,n,r,i,o;wi.exec(t)&&(t=Si(t));if(bi.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),n=parseInt(t.substr(1+1*a,a),16),r=parseInt(t.substr(1+2*a,a),16),i=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,n=(n<<4)+n,r=(r<<4)+r,l&&(i=(i<<4)+i)),o=[e,n,r,i/255]}else 0==t.indexOf("rgba(")?Ti(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Ti(o)):kn(!1,14);return o}(n),t[n]=r,++e}return r}}();function Ci(t){return Array.isArray(t)?t:Ei(t)}function Ti(t){return t[0]=Ze(t[0]+.5|0,0,255),t[1]=Ze(t[1]+.5|0,0,255),t[2]=Ze(t[2]+.5|0,0,255),t[3]=Ze(t[3],0,1),t}function Oi(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+e+","+n+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}var ki=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var r=Mi(t,e,n);return r in this.cache_?this.cache_[r]:null},t.prototype.set=function(t,e,n,r){var i=Mi(t,e,n);this.cache_[i]=r,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Mi(t,e,n){return e+":"+t+":"+(n?xi(n):"null")}var Pi=new ki,Li=n(2971);const Ii="opacity",Ai="visible",Ri="extent",Di="zIndex",ji="maxResolution",Fi="minResolution",Ni="maxZoom",Bi="minZoom",zi="source",Gi="map";var Xi=n(9374),Ui=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Hi=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var r=(0,Xi.f0)({},e);return"object"==typeof e.properties&&(delete r.properties,(0,Xi.f0)(r,e.properties)),r[Ii]=void 0!==e.opacity?e.opacity:1,kn("number"==typeof r[Ii],64),r[Ai]=void 0===e.visible||e.visible,r[Di]=e.zIndex,r[ji]=void 0!==e.maxResolution?e.maxResolution:1/0,r[Fi]=void 0!==e.minResolution?e.minResolution:0,r[Bi]=void 0!==e.minZoom?e.minZoom:-1/0,r[Ni]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==r.className?r.className:"ol-layer",delete r.className,n.setProperties(r),n.state_=null,n}return Ui(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=Ze(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return(0,Cn.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,Cn.O3)()},e.prototype.getExtent=function(){return this.get(Ri)},e.prototype.getMaxResolution=function(){return this.get(ji)},e.prototype.getMinResolution=function(){return this.get(Fi)},e.prototype.getMinZoom=function(){return this.get(Bi)},e.prototype.getMaxZoom=function(){return this.get(Ni)},e.prototype.getOpacity=function(){return this.get(Ii)},e.prototype.getSourceState=function(){return(0,Cn.O3)()},e.prototype.getVisible=function(){return this.get(Ai)},e.prototype.getZIndex=function(){return this.get(Di)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Ri,t)},e.prototype.setMaxResolution=function(t){this.set(ji,t)},e.prototype.setMinResolution=function(t){this.set(Fi,t)},e.prototype.setMaxZoom=function(t){this.set(Ni,t)},e.prototype.setMinZoom=function(t){this.set(Bi,t)},e.prototype.setOpacity=function(t){kn("number"==typeof t,64),this.set(Ii,t)},e.prototype.setVisible=function(t){this.set(Ai,t)},e.prototype.setZIndex=function(t){this.set(Di,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(Li.Z);var qi=n(5487);const Zi="prerender",Wi="postrender",Vi="precompose",Yi="postcompose",Ki="rendercomplete";var $i=n(5818),Ji=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qi=function(t){function e(e){var n=this,r=(0,Xi.f0)({},e);delete r.source,(n=t.call(this,r)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(zi,n.handleSourcePropertyChange_);var i=e.source?e.source:null;return n.setSource(i),n}return Ji(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(zi)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,$i.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,$i.oL)(t,qi.Z.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(Gi,t)},e.prototype.getMapInternal=function(){return this.get(Gi)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,$i.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,$i.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,$i.oL)(t,Vi,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);kn(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=(0,$i.oL)(this,qi.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(zi,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(Hi);function to(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var r=e.zoom;return r>t.minZoom&&r<=t.maxZoom}const eo=Qi;var no=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return no(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,Cn.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;mi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),yi(r,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i,o,s,a){var l,c=e.viewState;function u(t,e,n,r){return i.call(o,e,t?n:null,r)}var h=c.projection,p=cr(t.slice(),h),f=[[0,0]];if(h.canWrapX()&&r){var d=nr(h.getExtent());f.push([-d,0],[d,0])}for(var g=e.layerStatesArray,v=g.length,m=[],y=[],_=0;_<f.length;_++)for(var b=v-1;b>=0;--b){var w=g[b],x=w.layer;if(x.hasRenderer()&&to(w,c)&&s.call(a,x)){var S=x.getRenderer(),E=x.getSource();if(S&&E){var C=E.getWrapX()?p:t,T=u.bind(null,w.managed);y[0]=C[0]+f[_][0],y[1]=C[1]+f[_][1],l=S.forEachFeatureAtCoordinate(y,e,n,T,m)}if(l)return l}}if(0!==m.length){var O=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*O})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,r,i){return(0,Cn.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,r,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,r,fi.uX,this,i,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,Cn.O3)()},e.prototype.scheduleExpireIconCache=function(t){Pi.canExpireCache()&&t.postRenderFunctions.push(io)},e}(pi.Z);function io(t,e){Pi.expire()}const oo=ro;var so=n(5990),ao=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const lo=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=r,o.context=i,o}return ao(e,t),e}(je.ZP);var co="ol-hidden",uo="ol-unselectable",ho="ol-control",po="ol-collapsed",fo=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),go=["style","variant","weight","size","lineHeight","family"],vo=function(t){var e=t.match(fo);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=go.length;r<i;++r){var o=e[r+1];void 0!==o&&(n[go[r]]=o)}return n.families=n.family.split(/,\s?/),n},mo=n(8326),yo="10px sans-serif",_o="#000",bo="round",wo=[],xo="round",So="#000",Eo="center",Co="middle",To=[0,0,0,0],Oo=new Li.Z;(new dt.Z).setSize=function(){console.warn("labelCache is deprecated.")};var ko,Mo,Po=null,Lo={},Io=function(){var t,e,n="32px ",r=["monospace","serif"],i=r.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,c=0;c<i;++c){var u=r[c];if(e=Do(t+" "+s+" "+n+u,o),a!=u){var h=Do(t+" "+s+" "+n+a+","+u,o);l=l&&h!=e}}return!!l}function a(){for(var e=!0,n=Oo.getKeys(),r=0,i=n.length;r<i;++r){var o=n[r];Oo.get(o)<100&&(s.apply(this,o.split("\n"))?((0,Xi.ZH)(Lo),Po=null,ko=void 0,Oo.set(o,100)):(Oo.set(o,Oo.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=vo(e);if(n)for(var r=n.families,i=0,o=r.length;i<o;++i){var l=r[i],c=n.style+"\n"+n.weight+"\n"+l;void 0===Oo.get(c)&&(Oo.set(c,100,!0),s(n.style,n.weight,l)||(Oo.set(c,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),Ao=function(t){var e=Lo[t];if(null==e){if(di.Id){var n=vo(t),r=Ro(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else Mo||((Mo=document.createElement("div")).innerHTML="M",Mo.style.minHeight="0",Mo.style.maxHeight="none",Mo.style.height="auto",Mo.style.padding="0",Mo.style.border="none",Mo.style.position="absolute",Mo.style.display="block",Mo.style.left="-99999px"),Mo.style.font=t,document.body.appendChild(Mo),e=Mo.offsetHeight,document.body.removeChild(Mo);Lo[t]=e}return e};function Ro(t,e){return Po||(Po=(0,mo.E4)(1,1)),t!=ko&&(Po.font=t,ko=Po.font),Po.measureText(e)}function Do(t,e){return Ro(t,e).width}function jo(t,e,n){if(e in n)return n[e];var r=e.split("\n").reduce((function(e,n){return Math.max(e,Do(t,n))}),0);return n[e]=r,r}function Fo(t,e,n,r,i,o,s,a,l,c,u){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),r.contextInstructions?(t.translate(l,c),t.scale(u[0],u[1]),function(t,e){for(var n=t.contextInstructions,r=0,i=n.length;r<i;r+=2)Array.isArray(n[r+1])?e[n[r]].apply(e,n[r+1]):e[n[r]]=n[r+1]}(r,t)):u[0]<0||u[1]<0?(t.translate(l,c),t.scale(u[0],u[1]),t.drawImage(r,i,o,s,a,0,0,s,a)):t.drawImage(r,i,o,s,a,l,c,s*u[0],a*u[1]),t.restore()}var No=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=(0,$i.oL)(Oo,so.Z.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var r=n.element_.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",n.element_.className=uo+" ol-layers";var i=e.getViewport();return i.insertBefore(n.element_,i.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return No(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var r=new lo(t,void 0,e);n.dispatchEvent(r)}},e.prototype.disposeInternal=function(){(0,$i.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(Vi,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var r=[],i=null,o=0,s=e.length;o<s;++o){var a=e[o];t.layerIndex=o;var l=a.layer,c=l.getSourceState();if(!to(a,n)||"ready"!=c&&"undefined"!=c)l.unrender();else{var u=l.render(t,i);u&&(u!==i&&(this.children_.push(u),i=u),"getDeclutter"in l&&r.push(l))}}for(o=r.length-1;o>=0;--o)r[o].renderDeclutter(t);(0,mo.hF)(this.element_,this.children_),this.dispatchRenderEvent(Yi,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.prototype.forEachLayerAtPixel=function(t,e,n,r,i){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],c=l.layer;if(c.hasRenderer()&&to(l,o)&&i(c)){var u=c.getRenderer().getDataAtPixel(t,e,n);if(u){var h=r(c,u);if(h)return h}}}},e}(oo);const zo=Bo,Go="add",Xo="remove";var Uo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ho="length",qo=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.element=n,i.index=r,i}return Uo(e,t),e}(je.ZP),Zo=function(t){function e(e,n){var r=t.call(this)||this;r.on,r.once,r.un;var i=n||{};if(r.unique_=!!i.unique,r.array_=e||[],r.unique_)for(var o=0,s=r.array_.length;o<s;++o)r.assertUnique_(r.array_[o],o);return r.updateLength_(),r}return Uo(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,r=e.length;n<r;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(Ho)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new qo(Go,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_,n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new qo(Xo,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new qo(Xo,r,t)),this.dispatchEvent(new qo(Go,e,t))}else{for(var i=n;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(Ho,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new On(58)},e}(Li.Z);const Wo=Zo;var Vo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yo=function(t){function e(e,n){var r=t.call(this,e)||this;return r.layer=n,r}return Vo(e,t),e}(je.ZP),Ko="layers",$o=function(t){function e(e){var n=this,r=e||{},i=(0,Xi.f0)({},r);delete i.layers;var o=r.layers;return(n=t.call(this,i)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(Ko,n.handleLayersChanged_),o?Array.isArray(o)?o=new Wo(o.slice(),{unique:!0}):kn("function"==typeof o.getArray,43):o=new Wo(void 0,{unique:!0}),n.setLayers(o),n}return Vo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach($i.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,$i.oL)(t,Go,this.handleLayersAdd_,this),(0,$i.oL)(t,Xo,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach($i.bN);(0,Xi.ZH)(this.listenerKeys_);for(var n=t.getArray(),r=0,i=n.length;r<i;r++){var o=n[r];this.registerLayerListeners_(o),this.dispatchEvent(new Yo("addlayer",o))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[(0,$i.oL)(t,so.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,$i.oL)(t,qi.Z.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push((0,$i.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,$i.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,Cn.sq)(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new Yo("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new Yo("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Yo("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=(0,Cn.sq)(e);this.listenerKeys_[n].forEach($i.bN),delete this.listenerKeys_[n],this.dispatchEvent(new Yo("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(Ko)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var n=e.getArray(),r=0,i=n.length;r<i;++r)this.dispatchEvent(new Yo("removelayer",n[r]));this.set(Ko,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var r=this.getLayerState(),i=r.zIndex;t||void 0!==r.zIndex||(i=0);for(var o=n,s=e.length;o<s;o++){var a=e[o];a.opacity*=r.opacity,a.visible=a.visible&&r.visible,a.maxResolution=Math.min(a.maxResolution,r.maxResolution),a.minResolution=Math.max(a.minResolution,r.minResolution),a.minZoom=Math.max(a.minZoom,r.minZoom),a.maxZoom=Math.min(a.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==a.extent?a.extent=Qn(a.extent,r.extent):a.extent=r.extent),void 0===a.zIndex&&(a.zIndex=i)}return e},e.prototype.getSourceState=function(){return"ready"},e}(Hi);const Jo=$o;var Qo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ts=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.map=n,i.frameState=void 0!==r?r:null,i}return Qo(e,t),e}(je.ZP);var es=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ns=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,o)||this;return a.originalEvent=r,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==i&&i,a.activePointers=s,a}return es(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),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()},e}(ts),rs={SINGLECLICK:"singleclick",CLICK:qi.Z.CLICK,DBLCLICK:qi.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},is="pointermove",os="pointerdown";var ss=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),as=function(t){function e(e,n){var r=t.call(this,e)||this;r.map_=e,r.clickTimeoutId_,r.emulateClicks_=!1,r.dragging_=!1,r.dragListenerKeys_=[],r.moveTolerance_=void 0===n?1:n,r.down_=null;var i=r.map_.getViewport();return r.activePointers_=[],r.trackedTouches_={},r.element_=i,r.pointerdownListenerKey_=(0,$i.oL)(i,os,r.handlePointerDown_,r),r.originalPointerMoveEvent_,r.relayedListenerKey_=(0,$i.oL)(i,is,r.relayMoveEvent_,r),r.boundHandleTouchMove_=r.handleTouchMove_.bind(r),r.element_.addEventListener(qi.Z.TOUCHMOVE,r.boundHandleTouchMove_,!!di.bM&&{passive:!1}),r}return ss(e,t),e.prototype.emulateClick_=function(t){var e=new ns(rs.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new ns(rs.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new ns(rs.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t,n=e.pointerId;if(e.type==rs.POINTERUP||e.type==rs.POINTERCANCEL){for(var r in delete this.trackedTouches_[n],this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else e.type!=rs.POINTERDOWN&&e.type!=rs.POINTERMOVE||(this.trackedTouches_[n]=e);this.activePointers_=(0,Xi.KX)(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new ns(rs.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($i.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 ns(rs.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);for(var n in this.dispatchEvent(e),this.down_={},t){var r=t[n];this.down_[n]="function"==typeof r?fi.Zn:r}if(0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,$i.oL)(i,rs.POINTERMOVE,this.handlePointerMove_,this),(0,$i.oL)(i,rs.POINTERUP,this.handlePointerUp_,this),(0,$i.oL)(this.element_,rs.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push((0,$i.oL)(this.element_.getRootNode(),rs.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var e=new ns(rs.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 ns(rs.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,$i.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(qi.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,$i.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach($i.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(dt.Z);const ls=as;var cs=n(2126);const us="layergroup",hs="size",ps="target",fs="view";var ds=1/0,gs=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,Xi.ZH)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var r=this.keyFunction_(n);return delete this.queuedElements_[r],n},t.prototype.enqueue=function(t){kn(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=ds&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,r=e.length,i=e[t],o=n[t],s=t;t<r>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=l<r&&n[l]<n[a]?l:a;e[t]=e[c],n[t]=n[c],t=c}e[t]=i,n[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,r=this.priorities_,i=n[e],o=r[e];e>t;){var s=this.getParentIndex_(e);if(!(r[s]>o))break;n[e]=n[s],r[e]=r[s],e=s}n[e]=i,r[e]=o},t.prototype.reprioritize=function(){var t,e,n,r=this.priorityFunction_,i=this.elements_,o=this.priorities_,s=0,a=i.length;for(e=0;e<a;++e)(n=r(t=i[e]))==ds?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=n,i[s++]=t);i.length=s,o.length=s,this.heapify_()},t}();const vs=gs,ms=0,ys=1,_s=2,bs=3,ws=4;var xs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ss=function(t){function e(e,n){var r=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return r.boundHandleTileChange_=r.handleTileChange.bind(r),r.tileChangeCallback_=n,r.tilesLoading_=0,r.tilesLoadingKeys_={},r}return xs(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);n&&e[0].addEventListener(qi.Z.CHANGE,this.boundHandleTileChange_);return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(n===_s||n===bs||n===ws){e.removeEventListener(qi.Z.CHANGE,this.boundHandleTileChange_);var r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var n,r,i=0;this.tilesLoading_<t&&i<e&&this.getCount()>0;)r=(n=this.dequeue()[0]).getKey(),n.getState()!==ms||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,n.load())},e}(vs);const Es=Ss;const Cs=0,Ts=1,Os={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var ks=42,Ms=256;function Ps(t,e,n){return function(r,i,o,s,a){if(r){if(!i&&!e)return r;var l=e?0:o[0]*i,c=e?0:o[1]*i,u=a?a[0]:0,h=a?a[1]:0,p=t[0]+l/2+u,f=t[2]-l/2+u,d=t[1]+c/2+h,g=t[3]-c/2+h;p>f&&(f=p=(f+p)/2),d>g&&(g=d=(g+d)/2);var v=Ze(r[0],p,f),m=Ze(r[1],d,g);if(s&&n&&i){var y=30*i;v+=-y*Math.log(1+Math.max(0,p-r[0])/y)+y*Math.log(1+Math.max(0,r[0]-f)/y),m+=-y*Math.log(1+Math.max(0,d-r[1])/y)+y*Math.log(1+Math.max(0,r[1]-g)/y)}return[v,m]}}}function Ls(t){return t}var Is=n(5537);function As(t,e,n,r){var i=nr(e)/n[0],o=Jn(e)/n[1];return r?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function Rs(t,e,n){var r=Math.min(t,e);return r*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(r=Math.max(r,n),r/=Math.log(1+50*Math.max(0,n/t-1))/50+1),Ze(r,n/2,2*e)}function Ds(t,e,n,r,i){return function(o,s,a,l){if(void 0!==o){var c=r?As(t,r,a,i):t;return(void 0===n||n)&&l?Rs(o,c,e):Ze(o,e,c)}}}function js(t){return void 0!==t?0:void 0}function Fs(t){return void 0!==t?t:void 0}function Ns(t){return Math.pow(t,3)}function Bs(t){return 1-Ns(1-t)}function zs(t){return 3*t*t-2*t*t*t}function Gs(t){return t}const Xs="XY",Us="XYZ",Hs="XYM",qs="XYZM";function Zs(t,e,n,r,i,o){for(var s=o||[],a=0,l=e;l<n;l+=r){var c=t[l],u=t[l+1];s[a++]=i[0]*c+i[2]*u+i[4],s[a++]=i[1]*c+i[3]*u+i[5]}return o&&s.length!=a&&(s.length=a),s}function Ws(t,e,n,r,i,o,s){for(var a=s||[],l=Math.cos(i),c=Math.sin(i),u=o[0],h=o[1],p=0,f=e;f<n;f+=r){var d=t[f]-u,g=t[f+1]-h;a[p++]=u+d*l-g*c,a[p++]=h+d*c+g*l;for(var v=f+2;v<f+r;++v)a[p++]=t[v]}return s&&a.length!=p&&(a.length=p),a}function Vs(t,e,n,r,i,o,s){for(var a=s||[],l=0,c=e;c<n;c+=r){a[l++]=t[c]+i,a[l++]=t[c+1]+o;for(var u=c+2;u<c+r;++u)a[l++]=t[u]}return s&&a.length!=l&&(a.length=l),a}var Ys=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ks=[1,0,0,1,0,0],$s=function(t){function e(){var e=t.call(this)||this;return e.extent_=[1/0,1/0,-1/0,-1/0],e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,fi.qe)((function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})),e}return Ys(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,Cn.O3)()},e.prototype.closestPointXY=function(t,e,n,r){return(0,Cn.O3)()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return(0,Cn.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Bn(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){(0,Cn.O3)()},e.prototype.scale=function(t,e,n){(0,Cn.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,Cn.O3)()},e.prototype.getType=function(){return(0,Cn.O3)()},e.prototype.applyTransform=function(t){(0,Cn.O3)()},e.prototype.intersectsExtent=function(t){return(0,Cn.O3)()},e.prototype.translate=function(t,e){(0,Cn.O3)()},e.prototype.transform=function(t,e){var n=yr(t),r=n.getUnits()==He.TILE_PIXELS?function(t,r,i){var o=n.getExtent(),s=n.getWorldExtent(),a=Jn(s)/Jn(o);return mi(Ks,s[0],s[3],a,-a,0,0,0),Zs(t,0,t.length,i,Ks,r),Or(n,e)(t,r,i)}:Or(n,e);return this.applyTransform(r),this},e}(Li.Z);const Js=$s;var Qs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ta=function(t){function e(){var e=t.call(this)||this;return e.layout=Xs,e.stride=2,e.flatCoordinates=null,e}return Qs(e,t),e.prototype.computeExtent=function(t){return function(t,e,n,r,i){return Xn(Bn(i),t,e,n,r)}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,Cn.O3)()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=ea(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){(0,Cn.O3)()},e.prototype.setLayout=function(t,e,n){var r;if(t)r=ea(t);else{for(var i=0;i<n;++i){if(0===e.length)return this.layout=Xs,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=Xs:3==t?e=Us:4==t&&(e=qs);return e}(r=e.length)}this.layout=t,this.stride=r},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var r=this.getStride();Ws(n,0,n.length,r,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var r=e;void 0===r&&(r=t);var i=n;i||(i=Vn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,n,r,i,o,s,a){for(var l=a||[],c=s[0],u=s[1],h=0,p=e;p<n;p+=r){var f=t[p]-c,d=t[p+1]-u;l[h++]=c+i*f,l[h++]=u+o*d;for(var g=p+2;g<p+r;++g)l[h++]=t[g]}a&&l.length!=h&&(l.length=h)}(o,0,o.length,s,t,r,i,o),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var r=this.getStride();Vs(n,0,n.length,r,t,e,n),this.changed()}},e}(Js);function ea(t){var e;return t==Xs?e=2:t==Us||t==Hs?e=3:t==qs&&(e=4),e}const na=ta;function ra(t,e,n,r,i,o,s){var a,l=t[e],c=t[e+1],u=t[n]-l,h=t[n+1]-c;if(0===u&&0===h)a=e;else{var p=((i-l)*u+(o-c)*h)/(u*u+h*h);if(p>1)a=n;else{if(p>0){for(var f=0;f<r;++f)s[f]=tn(t[e+f],t[n+f],p);return void(s.length=r)}a=e}}for(f=0;f<r;++f)s[f]=t[a+f];s.length=r}function ia(t,e,n,r,i){var o=t[e],s=t[e+1];for(e+=r;e<n;e+=r){var a=t[e],l=t[e+1],c=Ke(o,s,a,l);c>i&&(i=c),o=a,s=l}return i}function oa(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o){var a=n[o];i=ia(t,e,a,r,i),e=a}return i}function sa(t,e,n,r,i,o,s,a,l,c,u){if(e==n)return c;var h,p;if(0===i){if((p=Ke(s,a,t[e],t[e+1]))<c){for(h=0;h<r;++h)l[h]=t[e+h];return l.length=r,p}return c}for(var f=u||[NaN,NaN],d=e+r;d<n;)if(ra(t,d-r,d,r,s,a,f),(p=Ke(s,a,f[0],f[1]))<c){for(c=p,h=0;h<r;++h)l[h]=f[h];l.length=r,d+=r}else d+=r*Math.max((Math.sqrt(p)-Math.sqrt(c))/i|0,1);if(o&&(ra(t,n-r,e,r,s,a,f),(p=Ke(s,a,f[0],f[1]))<c)){for(c=p,h=0;h<r;++h)l[h]=f[h];l.length=r}return c}function aa(t,e,n,r,i,o,s,a,l,c,u){for(var h=u||[NaN,NaN],p=0,f=n.length;p<f;++p){var d=n[p];c=sa(t,e,d,r,i,o,s,a,l,c,h),e=d}return c}function la(t,e,n,r){for(var i=0,o=n.length;i<o;++i)t[e++]=n[i];return e}function ca(t,e,n,r){for(var i=0,o=n.length;i<o;++i)for(var s=n[i],a=0;a<r;++a)t[e++]=s[a];return e}function ua(t,e,n,r,i){for(var o=i||[],s=0,a=0,l=n.length;a<l;++a){var c=ca(t,e,n[a],r);o[s++]=c,e=c}return o.length=s,o}function ha(t,e,n,r,i,o,s){var a=(n-e)/r;if(a<3){for(;e<n;e+=r)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var c=[e,n-r],u=0;c.length>0;){for(var h=c.pop(),p=c.pop(),f=0,d=t[p],g=t[p+1],v=t[h],m=t[h+1],y=p+r;y<h;y+=r){var _=Ye(t[y],t[y+1],d,g,v,m);_>f&&(u=y,f=_)}f>i&&(l[(u-e)/r]=1,p+r<u&&c.push(p,u),u+r<h&&c.push(u,h))}for(y=0;y<a;++y)l[y]&&(o[s++]=t[e+y*r],o[s++]=t[e+y*r+1]);return s}function pa(t,e){return e*Math.round(t/e)}function fa(t,e,n,r,i,o,s){if(e==n)return s;var a,l,c=pa(t[e],i),u=pa(t[e+1],i);e+=r,o[s++]=c,o[s++]=u;do{if(a=pa(t[e],i),l=pa(t[e+1],i),(e+=r)==n)return o[s++]=a,o[s++]=l,s}while(a==c&&l==u);for(;e<n;){var h=pa(t[e],i),p=pa(t[e+1],i);if(e+=r,h!=a||p!=l){var f=a-c,d=l-u,g=h-c,v=p-u;f*v==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&v<d||d==v||d>0&&v>d)?(a=h,l=p):(o[s++]=a,o[s++]=l,c=a,u=l,a=h,l=p)}}return o[s++]=a,o[s++]=l,s}function da(t,e,n,r,i,o,s,a){for(var l=0,c=n.length;l<c;++l){var u=n[l];s=fa(t,e,u,r,i,o,s),a.push(s),e=u}return s}function ga(t,e,n,r,i){for(var o=void 0!==i?i:[],s=0,a=e;a<n;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function va(t,e,n,r,i){for(var o=void 0!==i?i:[],s=0,a=0,l=n.length;a<l;++a){var c=n[a];o[s++]=ga(t,e,c,r,o[s]),e=c}return o.length=s,o}function ma(t,e,n,r,i){for(var o=void 0!==i?i:[],s=0,a=0,l=n.length;a<l;++a){var c=n[a];o[s++]=va(t,e,c,r,o[s]),e=c[c.length-1]}return o.length=s,o}function ya(t,e,n,r){for(var i=0,o=t[n-r],s=t[n-r+1];e<n;e+=r){var a=t[e],l=t[e+1];i+=s*a-o*l,o=a,s=l}return i/2}function _a(t,e,n,r){for(var i=0,o=0,s=n.length;o<s;++o){var a=n[o];i+=ya(t,e,a,r),e=a}return i}var ba=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wa=function(t){function e(e,n){var r=t.call(this)||this;return r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return ba(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,r){return r<In(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ia(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.getArea=function(){return ya(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return ga(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Xs)},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ca(this.flatCoordinates,0,t,this.stride),this.changed()},e}(na);const xa=wa;var Sa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ea=function(t){function e(e,n){var r=t.call(this)||this;return r.setCoordinates(e,n),r}return Sa(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){var i=this.flatCoordinates,o=Ke(t,e,i[0],i[1]);if(o<r){for(var s=this.stride,a=0;a<s;++a)n[a]=i[a];return n.length=s,o}return r},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return e=this.flatCoordinates,n=t,r=e[0],i=e[1],Nn(r,i,r,i,n);var e,n,r,i},e.prototype.getType=function(){return"Point"},e.prototype.intersectsExtent=function(t){return Dn(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=la(this.flatCoordinates,0,t,this.stride),this.changed()},e}(na);const Ca=Ea;function Ta(t,e,n,r,i){return!Hn(i,(function(i){return!Oa(t,e,n,r,i[0],i[1])}))}function Oa(t,e,n,r,i,o){for(var s=0,a=t[n-r],l=t[n-r+1];e<n;e+=r){var c=t[e],u=t[e+1];l<=o?u>o&&(c-a)*(o-l)-(i-a)*(u-l)>0&&s++:u<=o&&(c-a)*(o-l)-(i-a)*(u-l)<0&&s--,a=c,l=u}return 0!==s}function ka(t,e,n,r,i,o){if(0===n.length)return!1;if(!Oa(t,e,n[0],r,i,o))return!1;for(var s=1,a=n.length;s<a;++s)if(Oa(t,n[s-1],n[s],r,i,o))return!1;return!0}function Ma(t,e,n,r,i,o,s){for(var a,l,c,u,h,p,f,d=i[o+1],g=[],v=0,m=n.length;v<m;++v){var y=n[v];for(u=t[y-r],p=t[y-r+1],a=e;a<y;a+=r)h=t[a],f=t[a+1],(d<=p&&f<=d||p<=d&&d<=f)&&(c=(d-p)/(f-p)*(h-u)+u,g.push(c)),u=h,p=f}var _=NaN,b=-1/0;for(g.sort(Is.kK),u=g[0],a=1,l=g.length;a<l;++a){h=g[a];var w=Math.abs(h-u);w>b&&ka(t,e,n,r,c=(u+h)/2,d)&&(_=c,b=w),u=h}return isNaN(_)&&(_=i[o]),s?(s.push(_,d,b),s):[_,d,b]}function Pa(t,e,n,r,i){var o;for(e+=r;e<n;e+=r)if(o=i(t.slice(e-r,e),t.slice(e,e+r)))return o;return!1}function La(t,e,n,r,i){var o=Xn([1/0,1/0,-1/0,-1/0],t,e,n,r);return!!rr(i,o)&&(!!Rn(i,o)||(o[0]>=i[0]&&o[2]<=i[2]||(o[1]>=i[1]&&o[3]<=i[3]||Pa(t,e,n,r,(function(t,e){return function(t,e,n){var r=!1,i=jn(t,e),o=jn(t,n);if(i===En.INTERSECTING||o===En.INTERSECTING)r=!0;else{var s=t[0],a=t[1],l=t[2],c=t[3],u=e[0],h=e[1],p=n[0],f=n[1],d=(f-h)/(p-u),g=void 0,v=void 0;o&En.ABOVE&&!(i&En.ABOVE)&&(r=(g=p-(f-c)/d)>=s&&g<=l),r||!(o&En.RIGHT)||i&En.RIGHT||(r=(v=f-(p-l)*d)>=a&&v<=c),r||!(o&En.BELOW)||i&En.BELOW||(r=(g=p-(f-a)/d)>=s&&g<=l),r||!(o&En.LEFT)||i&En.LEFT||(r=(v=f-(p-s)*d)>=a&&v<=c)}return r}(i,t,e)})))))}function Ia(t,e,n,r,i){return!!La(t,e,n,r,i)||(!!Oa(t,e,n,r,i[0],i[1])||(!!Oa(t,e,n,r,i[0],i[3])||(!!Oa(t,e,n,r,i[2],i[1])||!!Oa(t,e,n,r,i[2],i[3]))))}function Aa(t,e,n,r,i){if(!Ia(t,e,n[0],r,i))return!1;if(1===n.length)return!0;for(var o=1,s=n.length;o<s;++o)if(Ta(t,n[o-1],n[o],r,i)&&!La(t,n[o-1],n[o],r,i))return!1;return!0}function Ra(t,e,n,r){for(;e<n-r;){for(var i=0;i<r;++i){var o=t[e+i];t[e+i]=t[n-r+i],t[n-r+i]=o}e+=r,n-=r}}function Da(t,e,n,r){for(var i=0,o=t[n-r],s=t[n-r+1];e<n;e+=r){var a=t[e],l=t[e+1];i+=(a-o)*(l+s),o=a,s=l}return 0===i?void 0:i>0}function ja(t,e,n,r,i){for(var o=void 0!==i&&i,s=0,a=n.length;s<a;++s){var l=n[s],c=Da(t,e,l,r);if(0===s){if(o&&c||!o&&!c)return!1}else if(o&&!c||!o&&c)return!1;e=l}return!0}function Fa(t,e,n,r,i){for(var o=void 0!==i&&i,s=0,a=n.length;s<a;++s){var l=n[s],c=Da(t,e,l,r);(0===s?o&&c||!o&&!c:o&&!c||!o&&c)&&Ra(t,e,l,r),e=l}return e}var Na=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ba=function(t){function e(e,n,r){var i=t.call(this)||this;return i.ends_=[],i.flatInteriorPointRevision_=-1,i.flatInteriorPoint_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,void 0!==n&&r?(i.setFlatCoordinates(n,e),i.ends_=r):i.setCoordinates(e,n),i}return Na(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,Is.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<In(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oa(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),aa(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))},e.prototype.containsXY=function(t,e){return ka(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return _a(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Fa(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,va(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Vn(this.getExtent());this.flatInteriorPoint_=Ma(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Ca(this.getFlatInteriorPoint(),Hs)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new xa(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[],i=0,o=0,s=n.length;o<s;++o){var a=n[o],l=new xa(e.slice(i,a),t);r.push(l),i=a}return r},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;ja(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Fa(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],r=[];return n.length=da(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,r),new e(n,Xs,r)},e.prototype.getType=function(){return"Polygon"},e.prototype.intersectsExtent=function(t){return Aa(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=ua(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(na);const za=Ba;function Ga(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=[e,n,e,i,r,i,r,n,e,n];return new Ba(o,Xs,[o.length])}var Xa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ua=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=(0,Xi.f0)({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=wr(r.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,r.projection&&dr(),r.center&&(r.center=jr(r.center,n.projection_)),r.extent&&(r.extent=Nr(r.extent,n.projection_)),n.applyOptions_(r),n}return Xa(e,t),e.prototype.applyOptions_=function(t){var e=(0,Xi.f0)({},t);for(var n in Os)delete e[n];this.setProperties(e,!0);var r=function(t){var e,n,r,i=28,o=2,s=void 0!==t.minZoom?t.minZoom:0,a=void 0!==t.maxZoom?t.maxZoom:i,l=void 0!==t.zoomFactor?t.zoomFactor:o,c=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,h=void 0!==t.showFullExtent&&t.showFullExtent,p=wr(t.projection,"EPSG:3857"),f=p.getExtent(),d=t.constrainOnlyCenter,g=t.extent;c||g||!p.isGlobal()||(d=!1,g=f);if(void 0!==t.resolutions){var v=t.resolutions;n=v[s],r=void 0!==v[a]?v[a]:v[v.length-1],e=t.constrainResolution?function(t,e,n,r){return function(i,o,s,a){if(void 0!==i){var l=t[0],c=t[t.length-1],u=n?As(l,n,s,r):l;if(a)return void 0===e||e?Rs(i,u,c):Ze(i,c,u);var h=Math.min(u,i),p=Math.floor((0,Is.h7)(t,h,o));return t[p]>u&&p<t.length-1?t[p+1]:t[p]}}}(v,u,!d&&g,h):Ds(n,r,u,!d&&g,h)}else{var m=(f?Math.max(nr(f),Jn(f)):360*Ue[He.DEGREES]/p.getMetersPerUnit())/Ms/Math.pow(o,0),y=m/Math.pow(o,i-0);void 0!==(n=t.maxResolution)?s=0:n=m/Math.pow(l,s),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(l,a):m/Math.pow(l,a):y),a=s+Math.floor(Math.log(n/r)/Math.log(l)),r=n/Math.pow(l,a-s),e=t.constrainResolution?function(t,e,n,r,i,o){return function(s,a,l,c){if(void 0!==s){var u=i?As(e,i,l,o):e,h=void 0!==n?n:0;if(c)return void 0===r||r?Rs(s,u,h):Ze(s,h,u);var p=Math.ceil(Math.log(e/u)/Math.log(t)-1e-9),f=-a*(.5-1e-9)+.5,d=Math.min(u,s),g=Math.floor(Math.log(e/d)/Math.log(t)+f),v=Math.max(p,g);return Ze(e/Math.pow(t,v),h,u)}}}(l,n,r,u,!d&&g,h):Ds(n,r,u,!d&&g,h)}return{constraint:e,maxResolution:n,minResolution:r,minZoom:s,zoomFactor:l}}(t);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=r.minZoom;var i=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Ps(t.extent,t.constrainOnlyCenter,e)}var n=wr(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var r=n.getExtent().slice();return r[0]=-1/0,r[2]=1/0,Ps(r,!1,!1)}return Ls}(t),o=r.constraint,s=function(t){var e=void 0===t.enableRotation||t.enableRotation;if(e){var n=t.constrainRotation;return void 0===n||!0===n?(s=o||Je(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=s?0:t:void 0}):!1===n?Fs:"number"==typeof n?(r=n,i=2*Math.PI/r,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):Fs}return js;var r,i;var o,s}(t);this.constraints_={center:i,resolution:o,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var r=t||[0,0,0,0];e=e||[0,0,0,0];var i=this.getResolution(),o=i/2*(r[3]-e[3]+e[1]-r[1]),s=i/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+o,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,Xi.f0)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var r=arguments[n];r.center&&((r=(0,Xi.f0)({},r)).center=jr(r.center,this.getProjection())),r.anchor&&((r=(0,Xi.f0)({},r)).anchor=jr(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var r=0;r<n&&!this.isDef();++r){var i=arguments[r];i.center&&this.setCenterInternal(i.center),void 0!==i.zoom?this.setZoom(i.zoom):i.resolution&&this.setResolution(i.resolution),void 0!==i.rotation&&this.setRotation(i.rotation)}if(r!==n){for(var o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,c=[];r<n;++r){var u=arguments[r],h={start:o,complete:!1,anchor:u.anchor,duration:void 0!==u.duration?u.duration:1e3,easing:u.easing||zs,callback:e};if(u.center&&(h.sourceCenter=s,h.targetCenter=u.center.slice(),s=h.targetCenter),void 0!==u.zoom?(h.sourceResolution=a,h.targetResolution=this.getResolutionForZoom(u.zoom),a=h.targetResolution):u.resolution&&(h.sourceResolution=a,h.targetResolution=u.resolution,a=h.targetResolution),void 0!==u.rotation){h.sourceRotation=l;var p=Qe(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;h.targetRotation=l+p,l=h.targetRotation}qa(h)?h.complete=!0:o+=h.duration,c.push(h)}this.animations_.push(c),this.setHint(Cs,1),this.updateAnimations_()}else e&&Ha(e,!0)},e.prototype.getAnimating=function(){return this.hints_[Cs]>0},e.prototype.getInteracting=function(){return this.hints_[Ts]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Cs,-this.hints_[Cs]);for(var e=0,n=this.animations_.length;e<n;++e){var r=this.animations_[e];if(r[0].callback&&Ha(r[0].callback,!1),!t)for(var i=0,o=r.length;i<o;++i){var s=r[i];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var r=this.animations_[n],i=!0,o=0,s=r.length;o<s;++o){var a=r[o];if(!a.complete){var l=t-a.start,c=a.duration>0?l/a.duration:1;c>=1?(a.complete=!0,c=1):i=!1;var u=a.easing(c);if(a.sourceCenter){var h=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var g=h+u*(f-h),v=p+u*(d-p);this.targetCenter_=[g,v]}if(a.sourceResolution&&a.targetResolution){var m=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var y=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(m,0,y,!0);this.targetCenter_=this.calculateCenterZoom(_,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var b=1===u?Qe(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var w=this.constraints_.rotation(b,!0);this.targetCenter_=this.calculateCenterRotate(w,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=b}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(i){this.animations_[n]=null,this.setHint(Cs,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var x=r[0].callback;x&&Ha(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,r,i,o=this.getCenterInternal();return void 0!==o&&(lr(n=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),i=e,(r=n)[0]+=+i[0],r[1]+=+i[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,r=this.getCenterInternal(),i=this.getResolution();void 0!==r&&void 0!==i&&(n=[e[0]-t*(e[0]-r[0])/i,e[1]-t*(e[1]-r[1])/i]);return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Dr(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Os.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return Fr(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();kn(n,1);var r=this.getResolution();kn(void 0!==r,2);var i=this.getRotation();return kn(void 0!==i,3),Kn(n,r,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Os.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Nr(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),r=nr(t)/n[0],i=Jn(t)/n[1];return Math.max(r,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(t){return n/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(Os.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/e;return function(t){return Math.log(n/t)/e/i}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),r=this.getCenterInternal(),i=this.padding_;if(i){var o=this.getViewportSizeMinusPadding_();r=Za(r,this.getViewportSize_(),[o[0]/2+i[3],o[1]/2+i[0]],e,n)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,r=this.minZoom_||0;if(this.resolutions_){var i=(0,Is.h7)(this.resolutions_,t,1);r=i,e=this.resolutions_[i],n=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Ze(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Ze(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(kn(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))kn(!ir(t),25),n=Ga(r=Nr(t,this.getProjection()));else if("Circle"===t.getType()){var r;(n=Ga(r=Nr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Vn(r))}else{var i=Rr();n=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),i=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,c=-1/0,u=0,h=i.length;u<h;u+=o){var p=i[u]*n-i[u+1]*r,f=i[u]*r+i[u+1]*n;s=Math.min(s,p),a=Math.min(a,f),l=Math.max(l,p),c=Math.max(c,f)}return[s,a,l,c]},e.prototype.fitInternal=function(t,e){var n=e||{},r=n.size;r||(r=this.getViewportSizeMinusPadding_());var i,o=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;i=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var a=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(a,[r[0]-o[1]-o[3],r[1]-o[0]-o[2]]);l=isNaN(l)?i:Math.max(l,i),l=this.getConstrainedResolution(l,s?0:1);var c=this.getRotation(),u=Math.sin(c),h=Math.cos(c),p=Vn(a);p[0]+=(o[1]-o[3])/2*l,p[1]+=(o[0]-o[2])/2*l;var f=p[0]*h-p[1]*u,d=p[1]*h+p[0]*u,g=this.getConstrainedCenter([f,d],l),v=n.callback?n.callback:fi.Zn;void 0!==n.duration?this.animateInternal({resolution:l,center:g,duration:n.duration,easing:n.easing},v):(this.targetResolution_=l,this.targetCenter_=g,this.applyTargetState_(!1,!0),Ha(v,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(jr(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(Za(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,r){var i,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-n),a=Za(t,r,[s[0]/2+o[3],s[1]/2+o[0]],e,n);i=[t[0]-a[0],t[1]-a[1]]}return i},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Dr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&jr(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,r,n);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=jr(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?jr(t,this.getProjection()):t)},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),i=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,i,n),s=this.constraints_.center(this.targetCenter_,o,i,n,this.calculateCenterShift(this.targetCenter_,o,r,i));this.get(Os.ROTATION)!==r&&this.set(Os.ROTATION,r),this.get(Os.RESOLUTION)!==o&&(this.set(Os.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(Os.CENTER)&&ar(this.get(Os.CENTER),s)||this.set(Os.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var r=void 0!==t?t:200,i=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,i,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===r&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var c=n||(0===r?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&ar(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:r,easing:Bs,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Ts,1)},e.prototype.endInteraction=function(t,e,n){var r=n&&jr(n,this.getProjection());this.endInteractionInternal(t,e,r)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(Ts,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,r=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,r)},e}(Li.Z);function Ha(t,e){setTimeout((function(){t(e)}),0)}function qa(t){return!(t.sourceCenter&&t.targetCenter&&!ar(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Za(t,e,n,r,i){var o=Math.cos(-i),s=Math.sin(-i),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-n[0])*r)*o-(l+=(n[1]-e[1]/2)*r)*(s=-s),l*o+a*s]}const Wa=Ua;function Va(t){return t[0]>0&&t[1]>0}function Ya(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Ka=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function $a(t){t instanceof eo?t.setMapInternal(null):t instanceof Jo&&t.getLayers().forEach($a)}function Ja(t,e){if(t instanceof eo)t.setMapInternal(e);else if(t instanceof Jo)for(var n=t.getLayers().getArray(),r=0,i=n.length;r<i;++r)Ja(n[r],e)}var Qa=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,r,i,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Jo({layers:t.layers});o[us]=s,o[ps]=t.target,o[fs]=t.view instanceof Wa?t.view:new Wa,void 0!==t.controls&&(Array.isArray(t.controls)?n=new Wo(t.controls.slice()):(kn("function"==typeof t.controls.getArray,47),n=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new Wo(t.interactions.slice()):(kn("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new Wo(t.overlays.slice()):(kn("function"==typeof t.overlays.getArray,49),i=t.overlays):i=new Wo;return{controls:n,interactions:r,keyboardEventTarget:e,overlays:i,values:o}}(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:di.MP,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=[1,0,0,1,0,0],n.pixelToCoordinateTransform_=[1,0,0,1,0,0],n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=r.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=r.controls||new Wo,n.interactions=r.interactions||new Wo,n.overlays_=r.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new Es(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(us,n.handleLayerGroupChanged_),n.addChangeListener(fs,n.handleViewChanged_),n.addChangeListener(hs,n.handleSizeChanged_),n.addChangeListener(ps,n.handleTargetChanged_),n.setProperties(r.values);var i=n;return!e.view||e.view instanceof Wa||e.view.then((function(t){i.setView(new Wa(t))})),n.controls.addEventListener(Go,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(Xo,function(t){t.element.setMap(null)}.bind(n)),n.interactions.addEventListener(Go,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(Xo,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(Go,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(Xo,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return Ka(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.handleLayerAdd_=function(t){Ja(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:fi.uX,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,i,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.getAllLayers=function(){var t=[];return function e(n){n.forEach((function(n){n instanceof Jo?e(n.getLayers()):t.push(n)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var r=n||{},i=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||fi.uX;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:fi.uX,i=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,i,o,r,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(ps)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Dr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?vi(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(us)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof Wo)e.setLayers(t);else{var n=e.getLayers();n.clear(),n.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var r=t[e];if(r.visible){var i=r.layer.getRenderer();if(i&&!i.ready)return!0;var o=r.layer.getSource();if(o&&o.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=jr(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?vi(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(hs)},e.prototype.getView=function(){return this.get(fs)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,r){return function(t,e,n,r,i){if(!t||!(n in t.wantedTiles))return ds;if(!t.wantedTiles[n][e.getKey()])return ds;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}(this.frameState_,t,e,n,r)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,r=new ns(n,this,t);this.handleMapBrowserEvent(r)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===os||n===qi.Z.WHEEL||n===qi.Z.KEYDOWN){var r=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():r,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(i===r?r.documentElement:i).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,r=n;if(t){var i=t.viewHints;if(i[Cs]||i[Ts]){var o=Date.now()-t.time>8;n=o?0:8,r=o?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,r))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(Ki)&&this.renderer_.dispatchRenderEvent(Ki,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new ts(cs.Z.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new ts(cs.Z.LOADSTART,this,t))));for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,$i.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(qi.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(qi.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,mo.ZF)(this.viewport_)}var n=this.getTargetElement();if(n){for(var r in n.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new ls(this,this.moveTolerance_),rs)this.mapBrowserEventHandler_.addEventListener(rs[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(qi.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(qi.Z.WHEEL,this.boundHandleBrowserEvent_,!!di.bM&&{passive:!1});var i=this.getOwnerDocument().defaultView,o=this.keyboardEventTarget_?this.keyboardEventTarget_:n;this.targetChangeHandlerKeys_=[(0,$i.oL)(o,qi.Z.KEYDOWN,this.handleBrowserEvent,this),(0,$i.oL)(o,qi.Z.KEYPRESS,this.handleBrowserEvent,this),(0,$i.oL)(i,qi.Z.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,$i.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,$i.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,$i.oL)(t,so.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,$i.oL)(t,qi.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach($i.bN),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Yo("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,$i.oL)(t,so.Z.PROPERTYCHANGE,this.render,this),(0,$i.oL)(t,qi.Z.CHANGE,this.render,this),(0,$i.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,$i.oL)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.handleLayerRemove_=function(t){$a(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),r=this.getView(),i=this.frameState_,o=null;if(void 0!==n&&Va(n)&&r&&r.isDef()){var s=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=r.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Kn(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:(0,Cn.sq)(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=Kn(a.nextCenter,a.nextResolution,l,n)}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),i)(!this.previousExtent_||!ir(this.previousExtent_)&&!zn(o.extent,this.previousExtent_))&&(this.dispatchEvent(new ts(cs.Z.MOVESTART,this,i)),this.previousExtent_=Bn(this.previousExtent_));this.previousExtent_&&!o.viewHints[Cs]&&!o.viewHints[Ts]&&!zn(o.extent,this.previousExtent_)&&(this.dispatchEvent(new ts(cs.Z.MOVEEND,this,o)),Ln(o.extent,this.previousExtent_))}this.dispatchEvent(new ts(cs.Z.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(cs.Z.LOADSTART)||this.hasListener(cs.Z.LOADEND)||this.hasListener(Ki)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new Yo("removelayer",e)),this.set(us,t)},e.prototype.setSize=function(t){this.set(hs,t)},e.prototype.setTarget=function(t){this.set(ps,t)},e.prototype.setView=function(t){if(!t||t instanceof Wa)this.set(fs,t);else{this.set(fs,new Wa);var e=this;t.then((function(t){e.setView(new Wa(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),i=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(r)||isNaN(i)||!Va(e=[r,i])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(Li.Z);const tl=Qa;var el=n(8775),nl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const rl=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).ulElement_=document.createElement("ul"),n.collapsed_=void 0===r.collapsed||r.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==r.collapsible,n.collapsible_=void 0===r.collapsible||r.collapsible,n.collapsible_||(n.collapsed_=!1);var i=void 0!==r.className?r.className:"ol-attribution",o=void 0!==r.tipLabel?r.tipLabel:"Attributions",s=void 0!==r.expandClassName?r.expandClassName:i+"-expand",a=void 0!==r.collapseLabel?r.collapseLabel:"›",l=void 0!==r.collapseClassName?r.collapseClassName:i+"-collapse";"string"==typeof a?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=a,n.collapseLabel_.className=l):n.collapseLabel_=a;var c=void 0!==r.label?r.label:"i";"string"==typeof c?(n.label_=document.createElement("span"),n.label_.textContent=c,n.label_.className=s):n.label_=c;var u=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=o,n.toggleButton_.appendChild(u),n.toggleButton_.addEventListener(qi.Z.CLICK,n.handleClick_.bind(n),!1);var h=i+" "+uo+" "+ho+(n.collapsed_&&n.collapsible_?" "+po:"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;return p.className=h,p.appendChild(n.toggleButton_),p.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return nl(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],r=!0,i=t.layerStatesArray,o=0,s=i.length;o<s;++o){var a=i[o];if(to(a,t.viewState)){var l=a.layer.getSource();if(l){var c=l.getAttributions();if(c){var u=c(t);if(u)if(r=r&&!1!==l.getAttributionsCollapsible(),Array.isArray(u))for(var h=0,p=u.length;h<p;++h)u[h]in e||(n.push(u[h]),e[u[h]]=!0);else u in e||(n.push(u),e[u]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(r),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!(0,Is.fS)(e,this.renderedAttributions_)){(0,mo.ep)(this.ulElement_);for(var r=0,i=e.length;r<i;++r){var o=document.createElement("li");o.innerHTML=e[r],this.ulElement_.appendChild(o)}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(po),this.collapsed_?(0,mo.$H)(this.collapseLabel_,this.label_):(0,mo.$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}(el.default);var il=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ol=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this;var i=void 0!==r.className?r.className:"ol-rotate",o=void 0!==r.label?r.label:"⇧",s=void 0!==r.compassClassName?r.compassClassName:"ol-compass";n.label_=null,"string"==typeof o?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var a=r.tipLabel?r.tipLabel:"Reset rotation",l=document.createElement("button");l.className=i+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(qi.Z.CLICK,n.handleClick_.bind(n),!1);var c=i+" "+uo+" "+ho,u=n.element;return u.className=c,u.appendChild(l),n.callResetNorth_=r.resetNorth?r.resetNorth:void 0,n.duration_=void 0!==r.duration?r.duration:250,n.autoHide_=void 0===r.autoHide||r.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(co),n}return il(e,t),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:Bs}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var r="rotate("+n+"rad)";if(this.autoHide_){var i=this.element.classList.contains(co);i||0!==n?i&&0!==n&&this.element.classList.remove(co):this.element.classList.add(co)}this.label_.style.transform=r}this.rotation_=n}},e}(el.default);const sl=ol;var al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ll=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),target:r.target})||this;var i=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:i+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:i+"-out",l=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"–",u=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",h=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(qi.Z.CLICK,n.handleClick_.bind(n,o),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=h,f.appendChild("string"==typeof c?document.createTextNode(c):c),f.addEventListener(qi.Z.CLICK,n.handleClick_.bind(n,-o),!1);var d=i+" "+uo+" "+ho,g=n.element;return g.className=d,g.appendChild(p),g.appendChild(f),n.duration_=void 0!==r.duration?r.duration:250,n}return al(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var r=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:r,duration:this.duration_,easing:Bs})):e.setZoom(r)}}},e}(el.default);const cl="active";var ul=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function hl(t,e,n,r){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==r?r:250,easing:Bs})}}const pl=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return ul(e,t),e.prototype.getActive=function(){return this.get(cl)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(cl,t)},e.prototype.setMap=function(t){this.map_=t},e}(Li.Z);var fl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const dl=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:250,n}return fl(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==rs.DBLCLICK){var n=t.originalEvent,r=t.map,i=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_;hl(r.getView(),o,i,this.duration_),n.preventDefault(),e=!0}return!e},e}(pl);var gl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function vl(t){for(var e=t.length,n=0,r=0,i=0;i<e;i++)n+=t[i].clientX,r+=t[i].clientY;return[n/e,r/e]}const ml=function(t){function e(e){var n=this,r=e||{};return n=t.call(this,r)||this,r.handleDownEvent&&(n.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(n.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(n.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(n.handleUpEvent=r.handleUpEvent),r.stopDown&&(n.stopDown=r.stopDown),n.handlingDownUpSequence=!1,n.targetPointers=[],n}return gl(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==rs.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==rs.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==rs.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==rs.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},e}(pl);function yl(t){var e=arguments;return function(t){for(var n=!0,r=0,i=e.length;r<i&&(n=n&&e[r](t));++r);return n}}var _l=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},bl=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},wl=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),n=t.map.getOwnerDocument().activeElement;return e.contains(n)}(t)},xl=fi.uX,Sl=function(t){var e=t.originalEvent;return 0==e.button&&!(di.G$&&di.tK&&e.ctrlKey)},El=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Cl=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Tl=function(t){var e=t.originalEvent,n=e.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n&&!e.target.isContentEditable},Ol=function(t){var e=t.originalEvent;return kn(void 0!==e,56),"mouse"==e.pointerType},kl=function(t){var e=t.originalEvent;return kn(void 0!==e,56),e.isPrimary&&0===e.button},Ml=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pl=function(t){function e(e){var n=t.call(this,{stopDown:fi.Dv})||this,r=e||{};n.kinetic_=r.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var i=r.condition?r.condition:yl(El,kl);return n.condition_=r.onFocusOnly?yl(wl,i):i,n.noKinetic_=!1,n}return Ml(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=vl(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map.getView();!function(t,e){t[0]*=e,t[1]*=e}(r,i.getResolution()),lr(r,i.getRotation()),i.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),i=this.kinetic_.getAngle(),o=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-r*Math.cos(i),s[1]-r*Math.sin(i)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:Bs})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(ml);const Ll=Pl;var Il=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Al=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,{stopDown:fi.Dv})||this).condition_=r.condition?r.condition:bl,n.lastAngle_=void 0,n.duration_=void 0!==r.duration?r.duration:250,n}return Il(e,t),e.prototype.handleDragEvent=function(t){if(Ol(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==js){var r=e.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!Ol(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!Ol(t)&&(!(!Sl(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(ml);const Rl=Al;var Dl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jl=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Dl(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.height=Math.abs(e[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new za([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(pi.Z);const Fl=jl;var Nl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bl="boxstart",zl="boxdrag",Gl="boxend",Xl="boxcancel",Ul=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.coordinate=n,i.mapBrowserEvent=r,i}return Nl(e,t),e}(je.ZP),Hl=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.box_=new Fl(r.className||"ol-dragbox"),n.minArea_=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(n.onBoxEnd=r.onBoxEnd),n.startPixel_=null,n.condition_=r.condition?r.condition:Sl,n.boxEndCondition_=r.boxEndCondition?r.boxEndCondition:n.defaultBoxEndCondition,n}return Nl(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var r=n[0]-e[0],i=n[1]-e[1];return r*r+i*i>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ul(zl,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Ul(e?Gl:Xl,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ul(Bl,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(ml);const ql=Hl;var Zl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wl=function(t){function e(e){var n=this,r=e||{},i=r.condition?r.condition:Cl;return(n=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).duration_=void 0!==r.duration?r.duration:200,n.out_=void 0!==r.out&&r.out,n}return Zl(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var r=e.rotatedExtentForGeometry(n),i=e.getResolutionForExtentInternal(r),o=e.getResolution()/i;(n=n.clone()).scale(o*o)}e.fitInternal(n,{duration:this.duration_,easing:Bs})},e}(ql);const Vl=Wl,Yl=37,Kl=38,$l=39,Jl=40;var Ql=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const tc=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.defaultCondition_=function(t){return El(t)&&Tl(t)},n.condition_=void 0!==r.condition?r.condition:n.defaultCondition_,n.duration_=void 0!==r.duration?r.duration:100,n.pixelDelta_=void 0!==r.pixelDelta?r.pixelDelta:128,n}return Ql(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==qi.Z.KEYDOWN){var n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==Jl||r==Yl||r==$l||r==Kl)){var i=t.map.getView(),o=i.getResolution()*this.pixelDelta_,s=0,a=0;r==Jl?a=-o:r==Yl?s=-o:r==$l?s=o:a=o;var l=[s,a];lr(l,i.getRotation()),function(t,e,n){var r=t.getCenterInternal();if(r){var i=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:Gs,center:t.getConstrainedCenter(i)})}}(i,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(pl);var ec=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const nc=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.condition_=r.condition?r.condition:Tl,n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:100,n}return ec(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==qi.Z.KEYDOWN||t.type==qi.Z.KEYPRESS){var n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var i=t.map,o=r=="+".charCodeAt(0)?this.delta_:-this.delta_;hl(i.getView(),o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(pl);const rc=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;var i=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/r,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var ic=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oc="trackpad",sc="wheel",ac=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,r)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==r.maxDelta?r.maxDelta:1,n.duration_=void 0!==r.duration?r.duration:250,n.timeout_=void 0!==r.timeout?r.timeout:80,n.useAnchor_=void 0===r.useAnchor||r.useAnchor,n.constrainResolution_=void 0!==r.constrainResolution&&r.constrainResolution;var i=r.condition?r.condition:xl;return n.condition_=r.onFocusOnly?yl(wl,i):i,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return ic(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==qi.Z.WHEEL)return!0;var e,n=t.map,r=t.originalEvent;if(r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==qi.Z.WHEEL&&(e=r.deltaY,di.V&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=di.MP),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var i=Date.now();void 0===this.startTime_&&(this.startTime_=i),(!this.mode_||i-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?oc:sc);var o=n.getView();if(this.mode_===oc&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=i,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(i-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-Ze(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),hl(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(pl);const lc=ac;var cc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uc=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=fi.Dv),(n=t.call(this,i)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==r.threshold?r.threshold:.3,n.duration_=void 0!==r.duration?r.duration:250,n}return cc(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==js){var l=s.getViewport().getBoundingClientRect(),c=vl(this.targetPointers);c[0]-=l.left,c[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(c),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(ml);const hc=uc;var pc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fc=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=fi.Dv),(n=t.call(this,i)||this).anchor_=null,n.duration_=void 0!==r.duration?r.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return pc(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],r=this.targetPointers[1],i=n.clientX-r.clientX,o=n.clientY-r.clientY,s=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var c=a.getViewport().getBoundingClientRect(),u=vl(this.targetPointers);u[0]-=c.left,u[1]-=c.top,this.anchor_=a.getCoordinateFromPixelInternal(u),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(ml);const dc=fc;function gc(t){var e=t||{},n=new Wo,r=new rc(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Rl),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new dl({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Ll({onFocusOnly:e.onFocusOnly,kinetic:r})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new hc),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new dc({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new tc),n.push(new nc({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new lc({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new Vl({duration:e.zoomDuration})),n}var vc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const mc=function(t){function e(e){return(e=(0,Xi.f0)({},e)).controls||(e.controls=function(t){var e=t||{},n=new Wo;return(void 0===e.zoom||e.zoom)&&n.push(new ll(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new sl(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new rl(e.attributionOptions)),n}()),e.interactions||(e.interactions=gc({onFocusOnly:!0})),t.call(this,e)||this}return vc(e,t),e.prototype.createRenderer=function(){return new zo(this)},e}(tl);var yc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_c=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var r=e;n.setGeometry(r)}else{var i=e;n.setProperties(i)}return n}return yc(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var r=this.getStyle();return r&&t.setStyle(r),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,$i.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,$i.oL)(t,qi.Z.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(kn("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(Li.Z);const bc=_c;var wc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xc="accuracy",Sc="accuracyGeometry",Ec="altitude",Cc="altitudeAccuracy",Tc="heading",Oc="position",kc="projection",Mc="speed",Pc="tracking",Lc="trackingOptions",Ic=function(t){function e(e){var n=t.call(this,qi.Z.ERROR)||this;return n.code=e.code,n.message=e.message,n}return wc(e,t),e}(je.ZP),Ac=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.position_=null,n.transform_=vr,n.watchId_=void 0,n.addChangeListener(kc,n.handleProjectionChanged_),n.addChangeListener(Pc,n.handleTrackingChanged_),void 0!==r.projection&&n.setProjection(r.projection),void 0!==r.trackingOptions&&n.setTrackingOptions(r.trackingOptions),n.setTracking(void 0!==r.tracking&&r.tracking),n}return wc(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=Tr(yr("EPSG:4326"),t),this.position_&&this.set(Oc,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(xc,e.accuracy),this.set(Ec,null===e.altitude?void 0:e.altitude),this.set(Cc,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Tc,null===e.heading?void 0:Je(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var n=this.transform_(this.position_);this.set(Oc,n),this.set(Mc,null===e.speed?void 0:e.speed);var r=function(t,e,n,r){for(var i=n||32,o=[],s=0;s<i;++s)(0,Is.l7)(o,pr(t,e,2*Math.PI*s/i,r));return o.push(o[0],o[1]),new Ba(o,Xs,[o.length])}(this.position_,e.accuracy);r.applyTransform(this.transform_),this.set(Sc,r),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Ic(t))},e.prototype.getAccuracy=function(){return this.get(xc)},e.prototype.getAccuracyGeometry=function(){return this.get(Sc)||null},e.prototype.getAltitude=function(){return this.get(Ec)},e.prototype.getAltitudeAccuracy=function(){return this.get(Cc)},e.prototype.getHeading=function(){return this.get(Tc)},e.prototype.getPosition=function(){return this.get(Oc)},e.prototype.getProjection=function(){return this.get(kc)},e.prototype.getSpeed=function(){return this.get(Mc)},e.prototype.getTracking=function(){return this.get(Pc)},e.prototype.getTrackingOptions=function(){return this.get(Lc)},e.prototype.setProjection=function(t){this.set(kc,yr(t))},e.prototype.setTracking=function(t){this.set(Pc,t)},e.prototype.setTrackingOptions=function(t){this.set(Lc,t)},e}(Li.Z);const Rc=Ac;Wa.prototype.getDecimalZoom=function(){const t=this.getResolution(),e=Math.log(this.maxResolution_/t)/Math.log(2);return void 0!==e?this.minZoom_+e:e};var Dc=n(4331);const jc=0,Fc=1,Nc=2,Bc=3;const zc=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ya(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getDeclutterMode=function(){return this.declutterMode_},t.prototype.getAnchor=function(){return(0,Cn.O3)()},t.prototype.getImage=function(t){return(0,Cn.O3)()},t.prototype.getHitDetectionImage=function(){return(0,Cn.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,Cn.O3)()},t.prototype.getImageSize=function(){return(0,Cn.O3)()},t.prototype.getOrigin=function(){return(0,Cn.O3)()},t.prototype.getSize=function(){return(0,Cn.O3)()},t.prototype.setDisplacement=function(t){this.displacement_=t},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Ya(t)},t.prototype.listenImageChange=function(t){(0,Cn.O3)()},t.prototype.load=function(){(0,Cn.O3)()},t.prototype.unlistenImageChange=function(t){(0,Cn.O3)()},t}();function Gc(t){return Array.isArray(t)?Oi(t):t}var Xc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uc=function(t){function e(e){var n=this,r=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode})||this).canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return Xc(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.setFill=function(t){this.fill_=t,this.render()},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,r=(0,mo.E4)(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return Nc},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.setStroke=function(t){this.stroke_=t,this.render()},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var r=this.radius_,i=void 0===this.radius2_?r:this.radius2_;if(r<i){var o=r;r=i,i=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=i*Math.sin(a),c=r-Math.sqrt(i*i-l*l),u=Math.sqrt(l*l+c*c),h=u/l;if("miter"===t&&h<=n)return h*e;var p=e/2/h,f=e/2*(c/u),d=Math.sqrt((r+p)*(r+p)+f*f)-r;if(void 0===this.radius2_||"bevel"===t)return 2*d;var g=r*Math.sin(a),v=i-Math.sqrt(r*r-g*g),m=Math.sqrt(g*g+v*v)/g;if(m<=n){var y=m*e/2-i-r;return 2*Math.max(d,y)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=xo,n=0,r=null,i=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=So),t=Gc(t),void 0===(o=this.stroke_.getWidth())&&(o=1),r=this.stroke_.getLineDash(),i=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=xo),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var s=this.calculateLineJoinSize_(e,o,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:r,lineDashOffset:i,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var r=this.fill_.getColor();null===r&&(r=_o),e.fillStyle=Gc(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),n=0;if("string"==typeof e&&(e=Ci(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var r=(0,mo.E4)(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{var r=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var i=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=i+s*o,l=s%2==0?n:r;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=_o,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(zc);const Hc=Uc;var qc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Zc=function(t){function e(e){var n=e||{};return t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:void 0!==n.scale?n.scale:1,rotation:void 0!==n.rotation?n.rotation:0,rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView,displacement:void 0!==n.displacement?n.displacement:[0,0],declutterMode:n.declutterMode})||this}return qc(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Hc);const Wc=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();var Vc=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();const Yc=Vc;var Kc=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=Qc,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Qc,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var $c=null;function Jc(t,e){if(!$c){var n=new Wc({color:"rgba(255,255,255,0.4)"}),r=new Yc({color:"#3399CC",width:1.25});$c=[new Kc({image:new Zc({fill:n,stroke:r,radius:5}),fill:n,stroke:r})]}return $c}function Qc(t){return t.getGeometry()}const tu=Kc;var eu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nu="renderOrder",ru=function(t){function e(e){var n=this,r=e||{},i=(0,Xi.f0)({},r);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(n=t.call(this,i)||this).declutter_=void 0!==r.declutter&&r.declutter,n.renderBuffer_=void 0!==r.renderBuffer?r.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(r.style),n.updateWhileAnimating_=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,n.updateWhileInteracting_=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,n}return eu(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(nu)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Dc(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(nu,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:Jc,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var n;Array.isArray(t)?n=t:(kn("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n}}return e}(this.style_),this.changed()},e}(eo);const iu=ru;var ou={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},su=[ou.FILL],au=[ou.STROKE],lu=[ou.BEGIN_PATH],cu=[ou.CLOSE_PATH];const uu=ou;const hu=function(){function t(){}return t.prototype.drawCustom=function(t,e,n,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();var pu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fu=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=r,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return pu(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,i=this.coordinates,o=i.length,s=0,a=t.length;s<a;s+=e)r[0]=t[s],r[1]=t[s+1],An(n,r)&&(i[o++]=r[0],i[o++]=r[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,n,r,i,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(e+=r);var c,u,h,p=t[e],f=t[e+1],d=this.tmpCoordinate_,g=!0;for(c=e+r;c<n;c+=r)d[0]=t[c],d[1]=t[c+1],(h=jn(l,d))!==u?(g&&(s[a++]=p,s[a++]=f,g=!1),s[a++]=d[0],s[a++]=d[1]):h===En.INTERSECTING?(s[a++]=d[0],s[a++]=d[1],g=!1):g=!0,p=d[0],f=d[1],u=h;return(i&&g||c===e+r)&&(s[a++]=p,s[a++]=f),a},e.prototype.drawCustomCoordinates_=function(t,e,n,r,i){for(var o=0,s=n.length;o<s;++o){var a=n[o],l=this.appendFlatLineCoordinates(t,e,a,r,!1,!1);i.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,n,r){this.beginGeometry(t,e);var i,o,s,a,l,c=t.getType(),u=t.getStride(),h=this.coordinates.length;switch(c){case"MultiPolygon":i=t.getOrientedFlatCoordinates(),a=[];var p=t.getEndss();l=0;for(var f=0,d=p.length;f<d;++f){var g=[];l=this.drawCustomCoordinates_(i,l,p[f],u,g),a.push(g)}this.instructions.push([uu.CUSTOM,h,a,t,n,ma]),this.hitDetectionInstructions.push([uu.CUSTOM,h,a,t,r||n,ma]);break;case"Polygon":case"MultiLineString":s=[],i="Polygon"==c?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(i,0,t.getEnds(),u,s),this.instructions.push([uu.CUSTOM,h,s,t,n,va]),this.hitDetectionInstructions.push([uu.CUSTOM,h,s,t,r||n,va]);break;case"LineString":case"Circle":i=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(i,0,i.length,u,!1,!1),this.instructions.push([uu.CUSTOM,h,o,t,n,ga]),this.hitDetectionInstructions.push([uu.CUSTOM,h,o,t,r||n,ga]);break;case"MultiPoint":i=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(i,u))>h&&(this.instructions.push([uu.CUSTOM,h,o,t,n,ga]),this.hitDetectionInstructions.push([uu.CUSTOM,h,o,t,r||n,ga]));break;case"Point":i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([uu.CUSTOM,h,o,t,n]),this.hitDetectionInstructions.push([uu.CUSTOM,h,o,t,r||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[uu.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[uu.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,r,i=e.length,o=-1;for(t=0;t<i;++t)(r=(n=e[t])[0])==uu.END_GEOMETRY?o=t:r==uu.BEGIN_GEOMETRY&&(n[2]=t,(0,Is.FZ)(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var r=t.getColor();n.fillStyle=Gc(r||_o)}else n.fillStyle=void 0;if(e){var i=e.getColor();n.strokeStyle=Gc(i||So);var o=e.getLineCap();n.lineCap=void 0!==o?o:bo;var s=e.getLineDash();n.lineDash=s?s.slice():wo;var a=e.getLineDashOffset();n.lineDashOffset=a||0;var l=e.getLineJoin();n.lineJoin=void 0!==l?l:xo;var c=e.getWidth();n.lineWidth=void 0!==c?c:1;var u=e.getMiterLimit();n.miterLimit=void 0!==u?u:10,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[uu.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[uu.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||i!=t.currentLineDash&&!(0,Is.fS)(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[uu.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Ln(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Pn(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(hu);const du=fu;var gu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const vu=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterMode_=void 0,o.declutterImageWithText_=void 0,o}return gu(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([uu.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([uu.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([uu.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([uu.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),r=t.getSize(),i=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=i[0],this.originY_=i[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e},e}(du);var mu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yu=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return mu(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,r){var i=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),s=[uu.MOVE_TO_LINE_TO,i,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([uu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,wo,0],lu);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(au),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([uu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],lu);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,c=0,u=o.length;c<u;++c)l=this.drawFlatCoordinates_(s,l,o[c],a);this.hitDetectionInstructions.push(au),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(au),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(au),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(lu)},e}(du);const _u=yu;var bu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wu=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return bu(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,r){var i=this.state,o=void 0!==i.fillStyle,s=void 0!==i.strokeStyle,a=n.length;this.instructions.push(lu),this.hitDetectionInstructions.push(lu);for(var l=0;l<a;++l){var c=n[l],u=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,c,r,!0,!s),p=[uu.MOVE_TO_LINE_TO,u,h];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(cu),this.hitDetectionInstructions.push(cu)),e=c}return o&&(this.instructions.push(su),this.hitDetectionInstructions.push(su)),s&&(this.instructions.push(au),this.hitDetectionInstructions.push(au)),e},e.prototype.drawCircle=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([uu.SET_FILL_STYLE,_o]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([uu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[uu.CIRCLE,a];this.instructions.push(lu,l),this.hitDetectionInstructions.push(lu,l),void 0!==n.fillStyle&&(this.instructions.push(su),this.hitDetectionInstructions.push(su)),void 0!==n.strokeStyle&&(this.instructions.push(au),this.hitDetectionInstructions.push(au)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([uu.SET_FILL_STYLE,_o]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([uu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0!==r||void 0!==i){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([uu.SET_FILL_STYLE,_o]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([uu.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,c=0,u=o.length;c<u;++c)l=this.drawFlatCoordinatess_(s,l,o[c],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var n=this.coordinates,r=0,i=n.length;r<i;++r)n[r]=pa(n[r],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(du);const xu=wu,Su="line";function Eu(t,e,n,r,i){var o,s,a,l,c,u,h,p,f,d=n,g=n,v=0,m=0,y=n;for(o=n;o<r;o+=i){var _=e[o],b=e[o+1];void 0!==l&&(p=_-l,f=b-c,a=Math.sqrt(p*p+f*f),void 0!==u&&(m+=s,Math.acos((u*p+h*f)/(s*a))>t&&(m>v&&(v=m,d=y,g=o),m=0,y=o-i)),s=a,u=p,h=f),l=_,c=b}return(m+=a)>v?[y,o]:[d,g]}var Cu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tu={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Ou=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return Cu(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,r=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(n||r)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,c=t.getStride();if(i.placement!==Su||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){var u=i.overflow?null:[];switch(a){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),c=2;break;case"Polygon":l=t.getFlatInteriorPoint(),i.overflow||u.push(l[2]/this.resolution),c=3;break;case"MultiPolygon":var h=t.getFlatInteriorPoints();l=[];for(x=0,S=h.length;x<S;x+=3)i.overflow||u.push(h[x+2]/this.resolution),l.push(h[x],h[x+1]);if(0===l.length)return;c=2}if((P=this.appendFlatPointCoordinates(l,c))===s)return;if(u&&(P-s)/2!=l.length/c){var p=s/2;u=u.filter((function(t,e){var n=o[2*(p+e)]===l[e*c]&&o[2*(p+e)+1]===l[e*c+1];return n||--p,n}))}this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var f=i.padding;if(f!=To&&(i.scale[0]<0||i.scale[1]<0)){var d=i.padding[0],g=i.padding[1],v=i.padding[2],m=i.padding[3];i.scale[0]<0&&(g=-g,m=-m),i.scale[1]<0&&(d=-d,v=-v),f=[d,g,v,m]}var y=this.pixelRatio;this.instructions.push([uu.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==To?To:f.map((function(t){return t*y})),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);var _=1/y;this.hitDetectionInstructions.push([uu.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[_,_],NaN,void 0,this.declutterImageWithText_,f,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}else{if(!rr(this.getBufferedMaxExtent(),t.getExtent()))return;var b=void 0;if(l=t.getFlatCoordinates(),"LineString"==a)b=[l.length];else if("MultiLineString"==a)b=t.getEnds();else if("Polygon"==a)b=t.getEnds().slice(0,1);else if("MultiPolygon"==a){var w=t.getEndss();b=[];for(var x=0,S=w.length;x<S;++x)b.push(w[x][0])}this.beginGeometry(t,e);for(var E=i.textAlign,C=0,T=void 0,O=0,k=b.length;O<k;++O){if(null==E){var M=Eu(i.maxAngle,l,C,b[O],c);C=M[0],T=M[1]}else T=b[O];for(var x=C;x<T;x+=c)o.push(l[x],l[x+1]);var P=o.length;C=b[O],this.drawChars_(s,P),s=P}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var i=this.textKey_;i in this.textStates||(this.textStates[i]={font:e.font,textAlign:e.textAlign||Eo,justify:e.justify,textBaseline:e.textBaseline||Co,scale:e.scale});var o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,r=this.textState_,i=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=Tu[r.textBaseline],c=this.textOffsetY_*a,u=this.text_,h=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([uu.DRAW_CHARS,t,e,l,r.overflow,s,r.maxAngle,a,c,i,h*a,u,o,1]),this.hitDetectionInstructions.push([uu.DRAW_CHARS,t,e,l,r.overflow,s,r.maxAngle,1,c,i,h,u,o,1/a])},e.prototype.setTextStyle=function(t,e){var n,r,i;if(t){var o=t.getFill();o?((r=this.textFillState_)||(r={},this.textFillState_=r),r.fillStyle=Gc(o.getColor()||_o)):(r=null,this.textFillState_=r);var s=t.getStroke();if(s){(i=this.textStrokeState_)||(i={},this.textStrokeState_=i);var a=s.getLineDash(),l=s.getLineDashOffset(),c=s.getWidth(),u=s.getMiterLimit();i.lineCap=s.getLineCap()||bo,i.lineDash=a?a.slice():wo,i.lineDashOffset=void 0===l?0:l,i.lineJoin=s.getLineJoin()||xo,i.lineWidth=void 0===c?1:c,i.miterLimit=void 0===u?10:u,i.strokeStyle=Gc(s.getColor()||So)}else i=null,this.textStrokeState_=i;n=this.textState_;var h=t.getFont()||yo;Io(h);var p=t.getScaleArray();n.overflow=t.getOverflow(),n.font=h,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Co,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||To,n.scale=void 0===p?[1,1]:p;var f=t.getOffsetX(),d=t.getOffsetY(),g=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===d?0:d,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===v?0:v,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:(0,Cn.sq)(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+(0,Cn.sq)(r.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(du);var ku={Circle:xu,Default:du,Image:vu,LineString:_u,Polygon:xu,Text:Ou};const Mu=function(){function t(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var r in n){var i=n[r].finish();t[e][r]=i}}return t},t.prototype.getBuilder=function(t,e){var n=void 0!==t?t.toString():"0",r=this.buildersByZIndex_[n];void 0===r&&(r={},this.buildersByZIndex_[n]=r);var i=r[e];void 0===i&&(i=new(0,ku[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=i);return i},t}();var Pu=n(2706),Lu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iu=function(t){function e(e){var n=t.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return Lu(e,t),e.prototype.getFeatures=function(t){return(0,Cn.O3)()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return(0,Cn.O3)()},e.prototype.renderFrame=function(t,e){return(0,Cn.O3)()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(r,i){var o=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,i,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){},e.prototype.getDataAtPixel=function(t,e,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Nc&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Nc&&e!=Bc&&t.addEventListener(qi.Z.CHANGE,this.boundHandleImageChange_),e==jc&&(t.load(),e=t.getState()),e==Nc},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(Pu.Z);const Au=Iu;var Ru=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Du=[],ju=null;var Fu=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=[1,0,0,1,0,0],n.pixelTransform=[1,0,0,1,0,0],n.inversePixelTransform=[1,0,0,1,0,0],n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return Ru(e,t),e.prototype.getImageData=function(t,e,n){var r,i;ju||((r=document.createElement("canvas")).width=1,r.height=1,ju=r.getContext("2d")),ju.clearRect(0,0,1,1);try{ju.drawImage(t,e,n,1,1,0,0,1,1),i=ju.getImageData(0,0,1,1).data}catch(t){return ju=null,null}return i},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,n){var r,i,o=this.getLayer().getClassName();t&&t.className===o&&(!n||t&&t.style.backgroundColor&&(0,Is.fS)(Ci(t.style.backgroundColor),Ci(n)))&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(i=a.getContext("2d")));if(i&&i.canvas.style.transform===e?(this.container=t,this.context=i,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=o;var s=r.style;s.position="absolute",s.width="100%",s.height="100%";var a=(i=(0,mo.E4)()).canvas;r.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=r,this.context=i}this.containerReused||!n||this.container.style.backgroundColor||(this.container.style.backgroundColor=n)},e.prototype.clipUnrotated=function(t,e,n){var r=tr(n),i=er(n),o=Wn(n),s=Zn(n);vi(e.coordinateToPixelTransform,r),vi(e.coordinateToPixelTransform,i),vi(e.coordinateToPixelTransform,o),vi(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;vi(a,r),vi(a,i),vi(a,o),vi(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var r=this.getLayer();if(r.hasListener(t)){var i=new lo(t,this.inversePixelTransform,n,e);r.dispatchEvent(i)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(Zi,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Wi,t,e)},e.prototype.getRenderTransform=function(t,e,n,r,i,o,s){var a=i/2,l=o/2,c=r/e,u=-c,h=-t[0]+s,p=-t[1];return mi(this.tempTransform,a,l,c,u,-n,h,p)},e.prototype.getDataAtPixel=function(t,e,n){var r=vi(this.inversePixelTransform,t.slice()),i=this.context,o=this.getLayer().getExtent();if(o&&!An(o,vi(e.pixelToCoordinateTransform,t.slice())))return null;var s,a=Math.round(r[0]),l=Math.round(r[1]),c=this.pixelContext_;if(!c){var u=document.createElement("canvas");u.width=1,u.height=1,c=u.getContext("2d"),this.pixelContext_=c}c.clearRect(0,0,1,1);try{c.drawImage(i.canvas,a,l,1,1,0,0,1,1),s=c.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):s}return 0===s[3]?null:s},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(Au);const Nu=Fu;function Bu(t,e,n,r,i,o,s,a,l,c,u,h){var p=t[e],f=t[e+1],d=0,g=0,v=0,m=0;function y(){d=p,g=f,p=t[e+=r],f=t[e+1],m+=v,v=Math.sqrt((p-d)*(p-d)+(f-g)*(f-g))}do{y()}while(e<n-r&&m+v<o);for(var _=0===v?0:(o-m)/v,b=tn(d,p,_),w=tn(g,f,_),x=e-r,S=m,E=o+a*l(c,i,u);e<n-r&&m+v<E;)y();var C,T=tn(d,p,_=0===v?0:(E-m)/v),O=tn(g,f,_);if(h){var k=[b,w,T,O];Ws(k,0,4,2,h,k,k),C=k[0]>k[2]}else C=b>T;var M,P=Math.PI,L=[],I=x+r===e;if(v=0,m=S,p=t[e=x],f=t[e+1],I){y(),M=Math.atan2(f-g,p-d),C&&(M+=M>0?-P:P);var A=(T+b)/2,R=(O+w)/2;return L[0]=[A,R,(E-o)/2,M,i],L}for(var D=0,j=(i=i.replace(/\n/g," ")).length;D<j;){y();var F=Math.atan2(f-g,p-d);if(C&&(F+=F>0?-P:P),void 0!==M){var N=F-M;if(N+=N>P?-2*P:N<-P?2*P:0,Math.abs(N)>s)return null}M=F;for(var B=D,z=0;D<j;++D){var G=a*l(c,i[C?j-D-1:D],u);if(e+r<n&&m+v<o+z+G/2)break;z+=G}if(D!==B){var X=C?i.substring(j-B,j-D):i.substring(B,D);A=tn(d,p,_=0===v?0:(o+z/2-m)/v),R=tn(g,f,_);L.push([A,R,z/2,F,X]),o+=z}}return L}function zu(t,e,n,r){for(var i=t[e],o=t[e+1],s=0,a=e+r;a<n;a+=r){var l=t[a],c=t[a+1];s+=Math.sqrt((l-i)*(l-i)+(c-o)*(c-o)),i=l,o=c}return s}var Gu=[1/0,1/0,-1/0,-1/0],Xu=[],Uu=[],Hu=[],qu=[];function Zu(t){return t[3].declutterBox}var Wu=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Vu(t,e){return"start"!==e&&"end"!==e||Wu.test(t)||(e="start"===e?"left":"right"),Tu[e]}function Yu(t,e,n){return n>0&&t.push("\n",""),t.push(e,""),t}var Ku=function(){function t(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,r){var i=t+e+n+r;if(this.labels_[i])return this.labels_[i];var o=r?this.strokeStates[r]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,c=[a.scale[0]*l,a.scale[1]*l],u=Array.isArray(t),h=a.justify?Tu[a.justify]:Vu(Array.isArray(t)?t[0]:t,a.textAlign||Eo),p=r&&o.lineWidth?o.lineWidth:0,f=u?t:t.split("\n").reduce(Yu,[]),d=function(t,e){for(var n=[],r=[],i=[],o=0,s=0,a=0,l=0,c=0,u=e.length;c<=u;c+=2){var h=e[c];if("\n"!==h&&c!==u){var p=e[c+1]||t.font,f=Do(p,h);n.push(f),s+=f;var d=Ao(p);r.push(d),l=Math.max(l,d)}else o=Math.max(o,s),i.push(s),s=0,a+=l}return{width:o,height:a,widths:n,heights:r,lineWidths:i}}(a,f),g=d.width,v=d.height,m=d.widths,y=d.heights,_=d.lineWidths,b=g+p,w=[],x=(b+2)*c[0],S=(v+p)*c[1],E={width:x<0?Math.floor(x):Math.ceil(x),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:w};(1==c[0]&&1==c[1]||w.push("scale",c),r)&&(w.push("strokeStyle",o.strokeStyle),w.push("lineWidth",p),w.push("lineCap",o.lineCap),w.push("lineJoin",o.lineJoin),w.push("miterLimit",o.miterLimit),(di.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(w.push("setLineDash",[o.lineDash]),w.push("lineDashOffset",o.lineDashOffset)));n&&w.push("fillStyle",s.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");for(var C,T=.5-h,O=h*b+T*p,k=[],M=[],P=0,L=0,I=0,A=0,R=0,D=f.length;R<D;R+=2){var j=f[R];if("\n"!==j){var F=f[R+1]||a.font;F!==C&&(r&&k.push("font",F),n&&M.push("font",F),C=F),P=Math.max(P,y[I]);var N=[j,O+T*m[I]+h*(m[I]-_[A]),.5*(p+P)+L];O+=m[I],r&&k.push("strokeText",N),n&&M.push("fillText",N),++I}else L+=P,P=0,O=h*b+T*p,++A}return Array.prototype.push.apply(w,k),Array.prototype.push.apply(w,M),this.labels_[i]=E,E},t.prototype.replayTextBackground_=function(t,e,n,r,i,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,r,i,o,s,a,l,c,u,h,p,f,d,g){var v,m=n-(s*=h[0]),y=r-(a*=h[1]),_=i+l>t?t-l:i,b=o+c>e?e-c:o,w=f[3]+_*h[0]+f[1],x=f[0]+b*h[1]+f[2],S=m-f[3],E=y-f[0];return(d||0!==u)&&(Xu[0]=S,qu[0]=S,Xu[1]=E,Uu[1]=E,Uu[0]=S+w,Hu[0]=Uu[0],Hu[1]=E+x,qu[1]=Hu[1]),0!==u?(vi(v=mi([1,0,0,1,0,0],n,r,1,1,u,-n,-r),Xu),vi(v,Uu),vi(v,Hu),vi(v,qu),Nn(Math.min(Xu[0],Uu[0],Hu[0],qu[0]),Math.min(Xu[1],Uu[1],Hu[1],qu[1]),Math.max(Xu[0],Uu[0],Hu[0],qu[0]),Math.max(Xu[1],Uu[1],Hu[1],qu[1]),Gu)):Nn(Math.min(S,S+w),Math.min(E,E+x),Math.max(S,S+w),Math.max(E,E+x),Gu),p&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:_,drawImageH:b,originX:l,originY:c,declutterBox:{minX:Gu[0],minY:Gu[1],maxX:Gu[2],maxY:Gu[3],value:g},canvasTransform:v,scale:h}},t.prototype.replayImageOrLabel_=function(t,e,n,r,i,o,s){var a=!(!o&&!s),l=r.declutterBox,c=t.canvas,u=s?s[2]*r.scale[0]/2:0;return l.minX-u<=c.width/e&&l.maxX+u>=0&&l.minY-u<=c.height/e&&l.maxY+u>=0&&(a&&this.replayTextBackground_(t,Xu,Uu,Hu,qu,o,s),Fo(t,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=vi(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,n,r){var i=this.textStates[e],o=this.createLabel(t,e,r,n),s=this.strokeStates[n],a=this.pixelRatio,l=Vu(Array.isArray(t)?t[0]:t,i.textAlign||Eo),c=Tu[i.textBaseline||Co],u=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*i.scale[0])+2*(.5-l)*u,anchorY:c*o.height/a+2*(.5-c)*u}},t.prototype.execute_=function(t,e,n,r,i,o,s,a){var l,c,u;this.pixelCoordinates_&&(0,Is.fS)(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Zs(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),c=this.renderedTransform_,u=n,c[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5]);for(var h,p,f,d,g,v,m,y,_,b,w,x,S,E,C,T,O=0,k=r.length,M=0,P=0,L=0,I=null,A=null,R=this.coordinateCache_,D=this.viewRotation_,j=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,F={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},N=this.instructions!=r||this.overlaps?0:200;O<k;){var B=r[O];switch(B[0]){case uu.BEGIN_GEOMETRY:S=B[1],T=B[3],S.getGeometry()?void 0===s||rr(s,T.getExtent())?++O:O=B[2]+1:O=B[2];break;case uu.BEGIN_PATH:P>N&&(this.fill_(t),P=0),L>N&&(t.stroke(),L=0),P||L||(t.beginPath(),d=NaN,g=NaN),++O;break;case uu.CIRCLE:var z=l[M=B[1]],G=l[M+1],X=l[M+2]-z,U=l[M+3]-G,H=Math.sqrt(X*X+U*U);t.moveTo(z+H,G),t.arc(z,G,H,0,2*Math.PI,!0),++O;break;case uu.CLOSE_PATH:t.closePath(),++O;break;case uu.CUSTOM:M=B[1],h=B[2];var q=B[3],Z=B[4],W=6==B.length?B[5]:void 0;F.geometry=q,F.feature=S,O in R||(R[O]=[]);var V=R[O];W?W(l,M,h,2,V):(V[0]=l[M],V[1]=l[M+1],V.length=2),Z(V,F),++O;break;case uu.DRAW_IMAGE:M=B[1],h=B[2],y=B[3],p=B[4],f=B[5];var Y=B[6],K=B[7],$=B[8],J=B[9],Q=B[10],tt=B[11],et=B[12],nt=B[13],rt=B[14],it=B[15];if(!y&&B.length>=20){_=B[19],b=B[20],w=B[21],x=B[22];var ot=this.drawLabelWithPointPlacement_(_,b,w,x);y=ot.label,B[3]=y;var st=B[23];p=(ot.anchorX-st)*this.pixelRatio,B[4]=p;var at=B[24];f=(ot.anchorY-at)*this.pixelRatio,B[5]=f,Y=y.height,B[6]=Y,nt=y.width,B[13]=nt}var lt=void 0;B.length>25&&(lt=B[25]);var ct=void 0,ut=void 0,ht=void 0;B.length>17?(ct=B[16],ut=B[17],ht=B[18]):(ct=To,ut=!1,ht=!1),Q&&j?tt+=D:Q||j||(tt-=D);for(var pt=0;M<h;M+=2)if(!(lt&&lt[pt++]<nt/this.pixelRatio)){var ft=[t,e,y,zt=this.calculateImageOrLabelDimensions_(y.width,y.height,l[M],l[M+1],nt,Y,p,f,$,J,tt,et,i,ct,ut||ht,S),K,ut?I:null,ht?A:null];if(a){if("none"===rt)continue;if("obstacle"===rt){a.insert(zt.declutterBox);continue}var dt=void 0,gt=void 0;if(it){var vt=h-M;if(!it[vt]){it[vt]=ft;continue}if(dt=it[vt],delete it[vt],gt=Zu(dt),a.collides(gt))continue}if(a.collides(zt.declutterBox))continue;dt&&(a.insert(gt),this.replayImageOrLabel_.apply(this,dt)),a.insert(zt.declutterBox)}this.replayImageOrLabel_.apply(this,ft)}++O;break;case uu.DRAW_CHARS:var mt=B[1],yt=B[2],_t=B[3],bt=B[4];x=B[5];var wt=B[6],xt=B[7],St=B[8];w=B[9];var Et=B[10];_=B[11],b=B[12];var Ct=[B[13],B[13]],Tt=this.textStates[b],Ot=Tt.font,kt=[Tt.scale[0]*xt,Tt.scale[1]*xt],Mt=void 0;Ot in this.widths_?Mt=this.widths_[Ot]:(Mt={},this.widths_[Ot]=Mt);var Pt=zu(l,mt,yt,2),Lt=Math.abs(kt[0])*jo(Ot,_,Mt);if(bt||Lt<=Pt){var It=this.textStates[b].textAlign,At=Bu(l,mt,yt,2,_,(Pt-Lt)*Tu[It],wt,Math.abs(kt[0]),jo,Ot,Mt,j?0:this.viewRotation_);t:if(At){var Rt=[],Dt=void 0,jt=void 0,Ft=void 0,Nt=void 0,Bt=void 0;if(w)for(Dt=0,jt=At.length;Dt<jt;++Dt){Ft=(Bt=At[Dt])[4],Nt=this.createLabel(Ft,b,"",w),p=Bt[2]+(kt[0]<0?-Et:Et),f=_t*Nt.height+2*(.5-_t)*Et*kt[1]/kt[0]-St;var zt=this.calculateImageOrLabelDimensions_(Nt.width,Nt.height,Bt[0],Bt[1],Nt.width,Nt.height,p,f,0,0,Bt[3],Ct,!1,To,!1,S);if(a&&a.collides(zt.declutterBox))break t;Rt.push([t,e,Nt,zt,1,null,null])}if(x)for(Dt=0,jt=At.length;Dt<jt;++Dt){Ft=(Bt=At[Dt])[4],Nt=this.createLabel(Ft,b,x,""),p=Bt[2],f=_t*Nt.height-St;zt=this.calculateImageOrLabelDimensions_(Nt.width,Nt.height,Bt[0],Bt[1],Nt.width,Nt.height,p,f,0,0,Bt[3],Ct,!1,To,!1,S);if(a&&a.collides(zt.declutterBox))break t;Rt.push([t,e,Nt,zt,1,null,null])}a&&a.load(Rt.map(Zu));for(var Gt=0,Xt=Rt.length;Gt<Xt;++Gt)this.replayImageOrLabel_.apply(this,Rt[Gt])}}++O;break;case uu.END_GEOMETRY:if(void 0!==o){var Ut=o(S=B[1],T);if(Ut)return Ut}++O;break;case uu.FILL:N?P++:this.fill_(t),++O;break;case uu.MOVE_TO_LINE_TO:for(M=B[1],h=B[2],E=l[M],m=(C=l[M+1])+.5|0,(v=E+.5|0)===d&&m===g||(t.moveTo(E,C),d=v,g=m),M+=2;M<h;M+=2)v=(E=l[M])+.5|0,m=(C=l[M+1])+.5|0,M!=h-2&&v===d&&m===g||(t.lineTo(E,C),d=v,g=m);++O;break;case uu.SET_FILL_STYLE:I=B,this.alignFill_=B[2],P&&(this.fill_(t),P=0,L&&(t.stroke(),L=0)),t.fillStyle=B[1],++O;break;case uu.SET_STROKE_STYLE:A=B,L&&(t.stroke(),L=0),this.setStrokeStyle_(t,B),++O;break;case uu.STROKE:N?L++:t.stroke(),++O;break;default:++O}}P&&this.fill_(t),L&&t.stroke()},t.prototype.execute=function(t,e,n,r,i,o){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,i,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,n,r,i){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,i)},t}();const $u=Ku;var Ju=["Polygon","Circle","LineString","Image","Text","Default"],Qu=function(){function t(t,e,n,r,i,o){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(i)}return t.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];void 0===n&&(n={},this.executorsByZIndex_[e]=n);var r=t[e];for(var i in r){var o=r[i];n[i]=new $u(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],r=0,i=t.length;r<i;++r)if(t[r]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i,o){var s=2*(r=Math.round(r))+1,a=mi(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=(0,mo.E4)(s,s));var c,u=this.hitDetectionContext_;u.canvas.width!==s||u.canvas.height!==s?(u.canvas.width=s,u.canvas.height=s):l||u.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(Gn(c=[1/0,1/0,-1/0,-1/0],t),Pn(c,e*(this.renderBuffer_+r),c));var h,p=function(t){if(void 0!==th[t])return th[t];for(var e=2*t+1,n=t*t,r=new Array(n+1),i=0;i<=t;++i)for(var o=0;o<=t;++o){var s=i*i+o*o;if(s>n)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+i)*e+(t+o))+3),i>0&&a.push(4*((t-i)*e+(t+o))+3),o>0&&(a.push(4*((t+i)*e+(t-o))+3),i>0&&a.push(4*((t-i)*e+(t-o))+3))}for(var l=[],c=(i=0,r.length);i<c;++i)r[i]&&l.push.apply(l,r[i]);return th[t]=l,l}(r);function f(t,e){for(var n=u.getImageData(0,0,s,s).data,a=0,l=p.length;a<l;a++)if(n[p[a]]>0){if(!o||"Image"!==h&&"Text"!==h||-1!==o.indexOf(t)){var c=(p[a]-3)/4,f=r-c%s,d=r-(c/s|0),g=i(t,e,f*f+d*d);if(g)return g}u.clearRect(0,0,s,s);break}}var d,g,v,m,y,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(Is.kK),d=_.length-1;d>=0;--d){var b=_[d].toString();for(v=this.executorsByZIndex_[b],g=Ju.length-1;g>=0;--g)if(void 0!==(m=v[h=Ju[g]])&&(y=m.executeHitDetection(u,a,n,f,c)))return y}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],r=e[1],i=e[2],o=e[3],s=[n,r,n,o,i,o,i,r];return Zs(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return(0,Xi.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,r,i,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(Is.kK),this.maxExtent_&&(t.save(),this.clip(t,n));var l,c,u,h,p,f,d=o||Ju;for(s&&a.reverse(),l=0,c=a.length;l<c;++l){var g=a[l].toString();for(p=this.executorsByZIndex_[g],u=0,h=d.length;u<h;++u){void 0!==(f=p[d[u]])&&f.execute(t,e,n,r,i,s)}}this.maxExtent_&&t.restore()},t}(),th={};const eh=Qu;var nh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rh=function(t){function e(e,n,r,i,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=n,l.extent_=r,l.transform_=i,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return nh(e,t),e.prototype.drawImages_=function(t,e,n,r){if(this.image_){var i=Zs(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var c=0,u=i.length;c<u;c+=2){var h=i[c]-this.imageAnchorX_,p=i[c+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var f=h+this.imageAnchorX_,d=p+this.imageAnchorY_;mi(s,f,d,1,1,l,-f,-d),o.setTransform.apply(o,s),o.translate(f,d),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,h,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,n,r){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var i=Zs(t,e,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<n;e+=r){var a=i[e]+this.textOffsetX_,l=i[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=mi(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,c),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,n,r,i){var o=this.context_,s=Zs(t,e,n,r,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;i&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return i&&o.closePath(),n},e.prototype.drawRings_=function(t,e,n,r){for(var i=0,o=n.length;i<o;++i)e=this.moveToLineTo_(t,e,n[i],r,!0);return e},e.prototype.drawCircle=function(t){if(rr(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,n){var r=t.getFlatCoordinates();if(r){var i=t.getStride();return Zs(r,0,r.length,i,e,n)}return null}(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],i=Math.sqrt(n*n+r*r),o=this.context_;o.beginPath(),o.arc(e[0],e[1],i,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&rr(this.extent_,n.getExtent())&&(this.setStyle(e),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),rr(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var r=t.getFlatMidpoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(rr(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,r=t.getFlatCoordinates(),i=0,o=t.getEnds(),s=t.getStride();n.beginPath();for(var a=0,l=o.length;a<l;++a)i=this.moveToLineTo_(r,i,o[a],s,!1);n.stroke()}if(""!==this.text_){var c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),rr(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),rr(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getOrientedFlatCoordinates(),r=0,i=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=i.length;s<a;++s){var l=i[s];r=this.drawRings_(n,r,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var c=t.getFlatInteriorPoints();this.drawText_(c,0,c.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,Is.fS)(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:Eo;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var n=this;if(t){var r=t.getColor();this.fillState_={fillStyle:Gc(r||_o)}}else this.fillState_=null;if(e){var i=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),c=e.getWidth(),u=e.getMiterLimit(),h=s||wo;this.strokeState_={lineCap:void 0!==o?o:bo,lineDash:1===this.pixelRatio_?h:h.map((function(t){return t*n.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:xo,lineWidth:(void 0!==c?c:1)*this.pixelRatio_,miterLimit:void 0!==u?u:10,strokeStyle:Gc(i||So)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var n=e.getColor();this.textFillState_={fillStyle:Gc(n||_o)}}else this.textFillState_=null;var r=t.getStroke();if(r){var i=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),a=r.getLineDashOffset(),l=r.getLineJoin(),c=r.getWidth(),u=r.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:bo,lineDash:s||wo,lineDashOffset:a||0,lineJoin:void 0!==l?l:xo,lineWidth:void 0!==c?c:1,miterLimit:void 0!==u?u:10,strokeStyle:Gc(i||So)}}else this.textStrokeState_=null;var h=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),v=t.getScaleArray(),m=t.getText(),y=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:void 0!==h?h:yo,textAlign:void 0!==y?y:Eo,textBaseline:void 0!==_?_:Co},this.text_=void 0!==m?Array.isArray(m)?m.reduce((function(t,e,n){return t+(n%2?" ":e)}),""):m:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*v[0],this.pixelRatio_*v[1]]}else this.text_=""},e}(hu);const ih=rh,oh="fraction",sh="pixels",ah="bottom-left",lh="bottom-right",ch="top-left",uh="top-right";var hh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ph=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=r,o.resolution=n,o.state=i,o}return hh(e,t),e.prototype.changed=function(){this.dispatchEvent(qi.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,Cn.O3)()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){(0,Cn.O3)()},e}(dt.Z);var fh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,r,jc)||this;return a.src_=i,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=jc,a.imageLoadFunction_=s,a}fh(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Bc,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=Jn(this.extent)/this.image_.height),this.state=Nc,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=jc&&this.state!=Bc||(this.state=Fc,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=dh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Jn(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(ph);function dh(t,e,n){var r=t,i=!0,o=!1,s=!1,a=[(0,$i.Vx)(r,qi.Z.LOAD,(function(){s=!0,o||e()}))];return r.src&&di.Tp?(o=!0,r.decode().then((function(){i&&e()})).catch((function(t){i&&(s?e():n())}))):a.push((0,$i.Vx)(r,qi.Z.ERROR,n)),function(){i=!1,a.forEach($i.bN)}}var gh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vh=null,mh=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==i&&(a.image_.crossOrigin=i),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=r,a.src_=n,a.tainted_,a}return gh(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Nc){vh||(vh=(0,mo.E4)(1,1)),vh.drawImage(this.image_,0,0);try{vh.getImageData(0,0,1,1),this.tainted_=!1}catch(t){vh=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(qi.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=Bc,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Nc,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=(0,mo.E4)(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==jc){this.imageState_=Fc;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=dh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===Nc){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=xi(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var r=n.getImageData(0,0,e.width,e.height),i=r.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],c=0,u=i.length;c<u;c+=4)i[c]*=o,i[c+1]*=s,i[c+2]*=a,i[c+3]*=l;n.putImageData(r,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(dt.Z);var yh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_h=function(t){function e(e){var n=this,r=e||{},i=void 0!==r.opacity?r.opacity:1,o=void 0!==r.rotation?r.rotation:0,s=void 0!==r.scale?r.scale:1,a=void 0!==r.rotateWithView&&r.rotateWithView;(n=t.call(this,{opacity:i,rotation:o,scale:s,displacement:void 0!==r.displacement?r.displacement:[0,0],rotateWithView:a,declutterMode:r.declutterMode})||this).anchor_=void 0!==r.anchor?r.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==r.anchorOrigin?r.anchorOrigin:ch,n.anchorXUnits_=void 0!==r.anchorXUnits?r.anchorXUnits:oh,n.anchorYUnits_=void 0!==r.anchorYUnits?r.anchorYUnits:oh,n.crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null;var l=void 0!==r.img?r.img:null;n.imgSize_=r.imgSize;var c=r.src;kn(!(void 0!==c&&l),4),kn(!l||l&&n.imgSize_,5),void 0!==c&&0!==c.length||!l||(c=l.src||(0,Cn.sq)(l)),kn(void 0!==c&&c.length>0,6);var u=void 0!==r.src?jc:Nc;return n.color_=void 0!==r.color?Ci(r.color):null,n.iconImage_=function(t,e,n,r,i,o){var s=Pi.get(e,r,o);return s||(s=new mh(t,e,n,r,i,o),Pi.set(e,r,o,s)),s}(l,c,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,u,n.color_),n.offset_=void 0!==r.offset?r.offset:[0,0],n.offsetOrigin_=void 0!==r.offsetOrigin?r.offsetOrigin:ch,n.origin_=null,n.size_=void 0!==r.size?r.size:null,n}return yh(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==oh||this.anchorYUnits_==oh){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==oh&&(t[0]*=e[0]),this.anchorYUnits_==oh&&(t[1]*=e[1])}if(this.anchorOrigin_!=ch){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=uh&&this.anchorOrigin_!=lh||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=ah&&this.anchorOrigin_!=lh||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=ch){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=uh&&this.offsetOrigin_!=lh||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=ah&&this.offsetOrigin_!=lh||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(qi.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(qi.Z.CHANGE,t)},e}(zc);const bh=_h;var wh=.5;var xh=.5,Sh={Point:function(t,e,n,r,i){var o,s=n.getImage(),a=n.getText();if(s){if(s.getImageState()!=Nc)return;var l=t;if(i){var c=s.getDeclutterMode();if("none"!==c)if(l=i,"obstacle"===c){var u=t.getBuilder(n.getZIndex(),"Image");u.setImageStyle(s,o),u.drawPoint(e,r)}else a&&a.getText()&&(o={})}var h=l.getBuilder(n.getZIndex(),"Image");h.setImageStyle(s,o),h.drawPoint(e,r)}if(a&&a.getText()){var p=t;i&&(p=i);var f=p.getBuilder(n.getZIndex(),"Text");f.setTextStyle(a,o),f.drawText(e,r)}},LineString:function(t,e,n,r,i){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(e,r)}var a=n.getText();if(a&&a.getText()){var l=(i||t).getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r)}},Polygon:function(t,e,n,r,i){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawPolygon(e,r)}var l=n.getText();if(l&&l.getText()){var c=(i||t).getBuilder(n.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,r)}},MultiPoint:function(t,e,n,r,i){var o,s=n.getImage(),a=n.getText();if(s){if(s.getImageState()!=Nc)return;var l=t;if(i){var c=s.getDeclutterMode();if("none"!==c)if(l=i,"obstacle"===c){var u=t.getBuilder(n.getZIndex(),"Image");u.setImageStyle(s,o),u.drawMultiPoint(e,r)}else a&&a.getText()&&(o={})}var h=l.getBuilder(n.getZIndex(),"Image");h.setImageStyle(s,o),h.drawMultiPoint(e,r)}if(a&&a.getText()){var p=t;i&&(p=i);var f=p.getBuilder(n.getZIndex(),"Text");f.setTextStyle(a,o),f.drawText(e,r)}},MultiLineString:function(t,e,n,r,i){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,r)}var a=n.getText();if(a&&a.getText()){var l=(i||t).getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r)}},MultiPolygon:function(t,e,n,r,i){var o=n.getFill(),s=n.getStroke();if(s||o){var a=t.getBuilder(n.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,r)}var l=n.getText();if(l&&l.getText()){var c=(i||t).getBuilder(n.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,r)}},GeometryCollection:function(t,e,n,r,i){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o){(0,Sh[a[o].getType()])(t,a[o],n,r,i)}},Circle:function(t,e,n,r,i){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),"Circle");a.setFillStrokeStyle(o,s),a.drawCircle(e,r)}var l=n.getText();if(l&&l.getText()){var c=(i||t).getBuilder(n.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,r)}}};function Eh(t,e){return parseInt((0,Cn.sq)(t),10)-parseInt((0,Cn.sq)(e),10)}function Ch(t,e){return xh*t/e}function Th(t,e,n,r,i,o,s){var a=!1,l=n.getImage();if(l){var c=l.getImageState();c==Nc||c==Bc?l.unlistenImageChange(i):(c==jc&&l.load(),l.listenImageChange(i),a=!0)}return function(t,e,n,r,i,o){var s=n.getGeometryFunction()(e);if(!s)return;var a=s.simplifyTransformed(r,i),l=n.getRenderer();if(l)Oh(t,a,n,e);else{(0,Sh[a.getType()])(t,a,n,e,o)}}(t,e,n,r,o,s),a}function Oh(t,e,n,r){if("GeometryCollection"!=e.getType())t.getBuilder(n.getZIndex(),"Default").drawCustom(e,r,n.getRenderer(),n.getHitDetectionRenderer());else for(var i=e.getGeometries(),o=0,s=i.length;o<s;++o)Oh(t,i[o],n,r)}var kh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mh=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=[1/0,1/0,-1/0,-1/0],n.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n.compositionContext_=null,n.opacity_=1,n}return kh(e,t),e.prototype.renderWorlds=function(t,e,n){var r=e.extent,i=e.viewState,o=i.center,s=i.resolution,a=i.projection,l=i.rotation,c=a.getExtent(),u=this.getLayer().getSource(),h=e.pixelRatio,p=e.viewHints,f=!(p[Cs]||p[Ts]),d=this.compositionContext_,g=Math.round(e.size[0]*h),v=Math.round(e.size[1]*h),m=u.getWrapX()&&a.canWrapX(),y=m?nr(c):null,_=m?Math.ceil((r[2]-c[2])/y)+1:1,b=m?Math.floor((r[0]-c[0])/y):0;do{var w=this.getRenderTransform(o,s,l,h,g,v,b*y);t.execute(d,1,w,l,f,void 0,n)}while(++b<_)},e.prototype.setupCompositionContext_=function(){if(1!==this.opacity_){var t=(0,mo.E4)(this.context.canvas.width,this.context.canvas.height,Du);this.compositionContext_=t}else this.compositionContext_=this.context},e.prototype.releaseCompositionContext_=function(){if(1!==this.opacity_){var t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,(0,mo.jy)(this.compositionContext_),Du.push(this.compositionContext_.canvas),this.compositionContext_=null}},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())},e.prototype.renderFrame=function(t,e){var n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];!function(t,e,n){gi(t,e,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),yi(this.inversePixelTransform,this.pixelTransform);var i=_i(this.pixelTransform);this.useContainer(e,i,this.getBackground(t));var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;var c=Math.round(t.size[0]*n),u=Math.round(t.size[1]*n);s.width!=c||s.height!=u?(s.width=c,s.height=u,s.style.transform!==i&&(s.style.transform=i)):this.containerReused||o.clearRect(0,0,c,u),this.preRender(o,t);var h=t.viewState,p=h.projection;this.opacity_=r.opacity,this.setupCompositionContext_();var f=!1,d=!0;if(r.extent&&this.clipping){var g=Nr(r.extent,p);(f=(d=rr(g,t.extent))&&!Rn(g,t.extent))&&this.clipUnrotated(this.compositionContext_,t,g)}return d&&this.renderWorlds(a,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==h.rotation&&(this.renderedRotation_=h.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];vi(this.pixelTransform,n);var r=this.renderedCenter_,i=this.renderedResolution_,o=this.renderedRotation_,s=this.renderedProjection_,a=this.wrappedRenderedExtent_,l=this.getLayer(),c=[],u=n[0]*wh,h=n[1]*wh;c.push(this.getRenderTransform(r,i,o,wh,u,h,0).slice());var p=l.getSource(),f=s.getExtent();if(p.getWrapX()&&s.canWrapX()&&!Rn(f,a)){for(var d=a[0],g=nr(f),v=0,m=void 0;d<f[0];)m=g*--v,c.push(this.getRenderTransform(r,i,o,wh,u,h,m).slice()),d+=g;for(v=0,d=a[2];d>f[2];)m=g*++v,c.push(this.getRenderTransform(r,i,o,wh,u,h,m).slice()),d-=g}this.hitDetectionImageData_=function(t,e,n,r,i,o,s){var a=t[0]*wh,l=t[1]*wh,c=(0,mo.E4)(a,l);c.imageSmoothingEnabled=!1;for(var u=c.canvas,h=new ih(c,wh,i,null,s),p=n.length,f=Math.floor(16777215/p),d={},g=1;g<=p;++g){var v=n[g-1],m=v.getStyleFunction()||r;if(r){var y=m(v,o);if(y){Array.isArray(y)||(y=[y]);for(var _="#"+("000000"+(g*f).toString(16)).slice(-6),b=0,w=y.length;b<w;++b){var x=y[b],S=x.getGeometryFunction()(v);if(S&&rr(i,S.getExtent())){var E=x.clone(),C=E.getFill();C&&C.setColor(_);var T=E.getStroke();T&&(T.setColor(_),T.setLineDash(null)),E.setText(void 0);var O=x.getImage();if(O&&0!==O.getOpacity()){var k=O.getImageSize();if(!k)continue;var M=(0,mo.E4)(k[0],k[1],void 0,{alpha:!1}),P=M.canvas;M.fillStyle=_,M.fillRect(0,0,P.width,P.height),E.setImage(new bh({img:P,imgSize:k,anchor:O.getAnchor(),anchorXUnits:sh,anchorYUnits:sh,offset:O.getOrigin(),opacity:1,size:O.getSize(),scale:O.getScale(),rotation:O.getRotation(),rotateWithView:O.getRotateWithView()}))}var L=E.getZIndex()||0;(R=d[L])||(R={},d[L]=R,R.Polygon=[],R.Circle=[],R.LineString=[],R.Point=[]),R[S.getType().replace("Multi","")].push(S,E)}}}}}for(var I=Object.keys(d).map(Number).sort(Is.kK),A=(g=0,I.length);g<A;++g){var R=d[I[g]];for(var D in R){var j=R[D];for(b=0,w=j.length;b<w;b+=2){h.setStyle(j[b+1]);for(var F=0,N=e.length;F<N;++F)h.setTransform(e[F]),h.drawGeometry(j[b])}}}return c.getImageData(0,0,u.width,u.height)}(n,c,this.renderedFeatures_,l.getStyleFunction(),a,i,o)}e(function(t,e,n){var r=[];if(n){var i=Math.floor(Math.round(t[0])*wh),o=Math.floor(Math.round(t[1])*wh),s=4*(Ze(i,0,n.width-1)+Ze(o,0,n.height-1)*n.width),a=n.data[s],l=n.data[s+1],c=n.data[s+2]+256*(l+256*a),u=Math.floor(16777215/e.length);c&&c%u==0&&r.push(e[c/u-1])}return r}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,l=e.viewState.rotation,c=this.getLayer(),u={},h=function(t,e,n){var o=(0,Cn.sq)(t),s=u[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return u[o]=!0,i.splice(i.lastIndexOf(s),1),r(t,c,e);s.geometry=e,s.distanceSq=n}}else{if(0===n)return u[o]=!0,r(t,c,e);i.push(u[o]={feature:t,layer:c,geometry:e,distanceSq:n,callback:r})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some((function(r){return s=r.forEachFeatureAtCoordinate(t,a,l,n,h,r===o.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var r=t.viewHints[Cs],i=t.viewHints[Ts],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(this.ready&&!o&&r||!s&&i)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,c=l.projection,u=l.resolution,h=t.pixelRatio,p=e.getRevision(),f=e.getRenderBuffer(),d=e.getRenderOrder();void 0===d&&(d=Eh);var g=l.center.slice(),v=Pn(a,f*u),m=v.slice(),y=[v.slice()],_=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!Rn(_,t.extent)){var b=nr(_),w=Math.max(nr(v)/2,b);v[0]=_[0]-w,v[2]=_[2]+w,cr(g,c);var x=sr(y[0],c);x[0]<_[0]&&x[2]<_[2]?y.push([x[0]+b,x[1],x[2]+b,x[3]]):x[0]>_[0]&&x[2]>_[2]&&y.push([x[0]-b,x[1],x[2]-b,x[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&Rn(this.wrappedRenderedExtent_,v))return(0,Is.fS)(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var S,E=new Mu(Ch(u,h),v,u,h);this.getLayer().getDeclutter()&&(S=new Mu(Ch(u,h),v,u,h));var C,T=Rr();if(T){for(var O=0,k=y.length;O<k;++O){var M=Fr(y[O],c);n.loadFeatures(M,Br(u,c),T)}C=Tr(T,c)}else for(O=0,k=y.length;O<k;++O)n.loadFeatures(y[O],u,c);var P=function(t,e){var n=Ch(t,e);return n*n}(u,h),L=!0,I=function(t){var n,r=t.getStyleFunction()||e.getStyleFunction();if(r&&(n=r(t,u)),n){var i=this.renderFeature(t,P,n,E,C,S);L=L&&!i}}.bind(this),A=Fr(v,c),R=n.getFeaturesInExtent(A);d&&R.sort(d);for(O=0,k=R.length;O<k;++O)I(R[O]);this.renderedFeatures_=R,this.ready=L;var D=E.finish(),j=new eh(v,u,h,n.getOverlaps(),D,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new eh(v,u,h,n.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=p,this.renderedRenderOrder_=d,this.renderedExtent_=m,this.wrappedRenderedExtent_=v,this.renderedCenter_=g,this.renderedProjection_=c,this.replayGroup_=j,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,n,r,i,o){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var a=0,l=n.length;a<l;++a)s=Th(r,t,n[a],e,this.boundHandleStyleImageChange_,i,o)||s;else s=Th(r,t,n,e,this.boundHandleStyleImageChange_,i,o);return s},e}(Nu);const Ph=Mh;var Lh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Ih=function(t){function e(e){return t.call(this,e)||this}return Lh(e,t),e.prototype.createRenderer=function(){return new Ph(this)},e}(iu),Ah="preload",Rh="useInterimTilesOnError";var Dh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const jh=function(t){function e(e){var n=this,r=e||{},i=(0,Xi.f0)({},r);return delete i.preload,delete i.useInterimTilesOnError,(n=t.call(this,i)||this).on,n.once,n.un,n.setPreload(void 0!==r.preload?r.preload:0),n.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),n}return Dh(e,t),e.prototype.getPreload=function(){return this.get(Ah)},e.prototype.setPreload=function(t){this.set(Ah,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Rh)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Rh,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(eo);var Fh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nh=function(t){function e(e,n,r){var i=t.call(this)||this,o=r||{};return i.tileCoord=e,i.state=n,i.interimTile=null,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i.interpolate=!!o.interpolate,i}return Fh(e,t),e.prototype.changed=function(){this.dispatchEvent(qi.Z.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==_s)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==_s){t.interimTile=null;break}t.getState()==ys?e=t:t.getState()==ms?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==bs&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,Cn.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var r=e-n+1e3/60;return r>=this.transition_?1:Ns(r/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(dt.Z);const Bh=Nh;var zh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Gh=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=i,a.src_=r,a.key=r,a.image_=new Image,null!==i&&(a.image_.crossOrigin=i),a.unlisten_=null,a.tileLoadFunction_=o,a}return zh(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=_s,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=bs,this.unlistenImage_(),this.image_=((t=(0,mo.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=_s:this.state=ws,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==bs&&(this.state=ms,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ms&&(this.state=ys,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=dh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Bh);var Xh=function(){function t(t,e,n,r,i,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=Or(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&nr(r)==nr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?nr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?nr(this.targetProj_.getExtent()):null;var l=tr(n),c=er(n),u=Wn(n),h=Zn(n),p=this.transformInv_(l),f=this.transformInv_(c),d=this.transformInv_(u),g=this.transformInv_(h),v=10+(o?Math.max(0,Math.ceil(Ve(qn(n)/(o*o*256*256)))):0);if(this.addQuad_(l,c,u,h,p,f,d,g,v),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,n){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,n,r,i,o){this.triangles_.push({source:[r,i,o],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,r,i,o,s,a,l){var c=Mn([i,o,s,a]),u=this.sourceWorldWidth_?nr(c)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=nr(Mn([t,e,n,r]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||rr(c,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(l>0){if(!f){var g=[(t[0]+n[0])/2,(t[1]+n[1])/2],v=this.transformInv_(g),m=void 0;if(p)m=(Qe(i[0],h)+Qe(s[0],h))/2-Qe(v[0],h);else m=(i[0]+s[0])/2-v[0];var y=(i[1]+s[1])/2-v[1];f=m*m+y*y>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var _=[(e[0]+n[0])/2,(e[1]+n[1])/2],b=this.transformInv_(_),w=[(r[0]+t[0])/2,(r[1]+t[1])/2],x=this.transformInv_(w);this.addQuad_(t,e,_,w,i,o,b,x,l-1),this.addQuad_(w,_,n,r,x,b,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(S),C=[(n[0]+r[0])/2,(n[1]+r[1])/2],T=this.transformInv_(C);this.addQuad_(t,S,C,r,i,E,T,a,l-1),this.addQuad_(S,e,n,C,E,o,s,T,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,n,r,i,s,a),0==(14&d)&&this.addTriangle_(t,n,e,i,s,o),d&&(0==(13&d)&&this.addTriangle_(e,r,t,o,a,i),0==(7&d)&&this.addTriangle_(e,r,n,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,n,r){var i=e.source;Gn(t,i[0]),Gn(t,i[1]),Gn(t,i[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();const Uh=Xh;var Hh,qh={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Zh={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},Wh=[];function Vh(t,e,n,r,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(r,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,r)+1,Math.max(n,i)),t.restore()}function Yh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Kh(t,e,n,r){var i=kr(n,e,t),o=_r(e,r,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||An(l,i)){var c=_r(t,o,i)/o;isFinite(c)&&c>0&&(o/=c)}return o}function $h(t,e,n,r,i,o,s,a,l,c,u,h){var p=(0,mo.E4)(Math.round(n*t),Math.round(n*e),Wh);if(h||(0,Xi.f0)(p,qh),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,n){var r,i;r=d,(i=t.extent)[0]<r[0]&&(r[0]=i[0]),i[2]>r[2]&&(r[2]=i[2]),i[1]<r[1]&&(r[1]=i[1]),i[3]>r[3]&&(r[3]=i[3])}));var g=nr(d),v=Jn(d),m=(0,mo.E4)(Math.round(n*g/r),Math.round(n*v/r));h||(0,Xi.f0)(m,qh);var y=n/r;l.forEach((function(t,e,n){var r=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=nr(t.extent),s=Jn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,r*y,i*y,o*y,s*y)}));var _=tr(s);return a.getTriangles().forEach((function(t,e,i){var s=t.source,a=t.target,l=s[0][0],c=s[0][1],u=s[1][0],g=s[1][1],v=s[2][0],y=s[2][1],b=f((a[0][0]-_[0])/o),w=f(-(a[0][1]-_[1])/o),x=f((a[1][0]-_[0])/o),S=f(-(a[1][1]-_[1])/o),E=f((a[2][0]-_[0])/o),C=f(-(a[2][1]-_[1])/o),T=l,O=c;l=0,c=0;var k=function(t){for(var e=t.length,n=0;n<e;n++){for(var r=n,i=Math.abs(t[n][n]),o=n+1;o<e;o++){var s=Math.abs(t[o][n]);s>i&&(i=s,r=o)}if(0===i)return null;var a=t[r];t[r]=t[n],t[n]=a;for(var l=n+1;l<e;l++)for(var c=-t[l][n]/t[n][n],u=n;u<e+1;u++)n==u?t[l][u]=0:t[l][u]+=c*t[n][u]}for(var h=new Array(e),p=e-1;p>=0;p--){h[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*h[p]}return h}([[u-=T,g-=O,0,0,x-b],[v-=T,y-=O,0,0,E-b],[0,0,u,g,S-w],[0,0,v,y,C-w]]);if(k){if(p.save(),p.beginPath(),function(){if(void 0===Hh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Vh(t,4,5,4,0),Vh(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;Hh=Yh(e,0)||Yh(e,4)||Yh(e,8)}return Hh}()||!h){p.moveTo(x,S);for(var M=b-x,P=w-S,L=0;L<4;L++)p.lineTo(x+f((L+1)*M/4),S+f(L*P/3)),3!=L&&p.lineTo(x+f((L+1)*M/4),S+f((L+1)*P/3));p.lineTo(E,C)}else p.moveTo(x,S),p.lineTo(b,w),p.lineTo(E,C);p.clip(),p.transform(k[0],k[2],k[1],k[3],b,w),p.translate(d[0]-T,d[3]-O),p.scale(r/n,-r/n),p.drawImage(m.canvas,0,0),p.restore()}})),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var r=t.target,i=(r[0][0]-_[0])/o,s=-(r[0][1]-_[1])/o,a=(r[1][0]-_[0])/o,l=-(r[1][1]-_[1])/o,c=(r[2][0]-_[0])/o,u=-(r[2][1]-_[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(i,s),p.lineTo(c,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}var Jh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qh=function(t){function e(e,n,r,i,o,s,a,l,c,u,h,p){var f=t.call(this,o,ms,{interpolate:!!p})||this;f.renderEdges_=void 0!==h&&h,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=i,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=i.getTileCoordExtent(f.wrappedTileCoord_),g=f.targetTileGrid_.getExtent(),v=f.sourceTileGrid_.getExtent(),m=g?Qn(d,g):d;if(0===qn(m))return f.state=ws,f;var y=e.getExtent();y&&(v=v?Qn(v,y):y);var _=i.getResolution(f.wrappedTileCoord_[0]),b=function(t,e,n,r){var i=Vn(n),o=Kh(t,e,i,r);return(!isFinite(o)||o<=0)&&Hn(n,(function(n){return o=Kh(t,e,n,r),isFinite(o)&&o>0})),o}(e,r,m,_);if(!isFinite(b)||b<=0)return f.state=ws,f;var w=void 0!==u?u:.5;if(f.triangulation_=new Uh(e,r,m,v,b*w,_),0===f.triangulation_.getTriangles().length)return f.state=ws,f;f.sourceZ_=n.getZForResolution(b);var x=f.triangulation_.calculateSourceExtent();if(v&&(e.canWrapX()?(x[1]=Ze(x[1],v[1],v[3]),x[3]=Ze(x[3],v[1],v[3])):x=Qn(x,v)),qn(x)){for(var S=n.getTileRangeForExtentAndZ(x,f.sourceZ_),E=S.minX;E<=S.maxX;E++)for(var C=S.minY;C<=S.maxY;C++){var T=c(f.sourceZ_,E,C,a);T&&f.sourceTiles_.push(T)}0===f.sourceTiles_.length&&(f.state=ws)}else f.state=ws;return f}return Jh(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==_s&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=bs;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r="number"==typeof n?n:n[0],i="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=$h(r,i,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=_s}this.changed()},e.prototype.load=function(){if(this.state==ms){this.state=ys,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){var i=e.getState();if(i==ms||i==ys){t++;var o=(0,$i.oL)(e,qi.Z.CHANGE,(function(n){var r=e.getState();r!=_s&&r!=bs&&r!=ws||((0,$i.bN)(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){t.getState()==ms&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach($i.bN),this.sourcesListenerKeys_=null},e.prototype.release=function(){this.canvas_&&((0,mo.jy)(this.canvas_.getContext("2d")),Wh.push(this.canvas_),this.canvas_=null),t.prototype.release.call(this)},e}(Bh);const tp=Qh;var ep=function(){function t(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function np(t,e,n,r,i){return void 0!==i?(i.minX=t,i.maxX=e,i.minY=n,i.maxY=r,i):new ep(t,e,n,r)}const rp=ep;var ip=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),op=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=[1/0,1/0,-1/0,-1/0],n.tmpTileRange_=new rp(0,0,0,0),n}return ip(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==_s||n==ws||n==bs&&!r},e.prototype.getTile=function(t,e,n,r){var i=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,i,o);return a.getState()==bs&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(_s)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),r=vi(e.pixelToCoordinateTransform,t.slice()),i=n.getExtent();if(i&&!An(i,r))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),c=l.getTileGridForProjection(a.projection),u=l.getTilePixelRatio(e.pixelRatio),h=c.getZForResolution(a.resolution);h>=c.getMinZoom();--h){var p=c.getTileCoordForCoordAndZ(r,h),f=l.getTile(h,p[1],p[2],o,s);if(!(f instanceof Gh||f instanceof tp))return null;if(f.getState()===_s){var d=c.getOrigin(h),g=Ya(c.getTileSize(h)),v=c.getResolution(h),m=Math.floor(u*((r[0]-d[0])/v-p[1]*g[0])),y=Math.floor(u*((d[1]-r[1])/v-p[2]*g[1])),_=Math.round(u*l.getGutterForProjection(a.projection));return this.getImageData(f.getImage(),m+_,y+_)}}return null},e.prototype.loadedTileCallback=function(e,n,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,e,n,r)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],r=t.viewState,i=r.projection,o=r.resolution,s=r.center,a=r.rotation,l=t.pixelRatio,c=this.getLayer(),u=c.getSource(),h=u.getRevision(),p=u.getTileGridForProjection(i),f=p.getZForResolution(o,u.zDirection),d=p.getResolution(f),g=t.extent,v=t.viewState.resolution,m=u.getTilePixelRatio(l),y=Math.round(nr(g)/v*l),_=Math.round(Jn(g)/v*l),b=n.extent&&Nr(n.extent,i);b&&(g=Qn(g,Nr(n.extent,i)));var w=d*y/2/m,x=d*_/2/m,S=[s[0]-w,s[1]-x,s[0]+w,s[1]+x],E=p.getTileRangeForExtentAndZ(g,f),C={};C[f]={};var T=this.createLoadedTileFinder(u,i,C),O=this.tmpExtent,k=this.tmpTileRange_;this.newTiles_=!1;for(var M=a?$n(r.center,v,a,t.size):void 0,P=E.minX;P<=E.maxX;++P)for(var L=E.minY;L<=E.maxY;++L)if(!a||p.tileCoordIntersectsViewport([f,P,L],M)){var I=this.getTile(f,P,L,t);if(this.isDrawableTile(I)){var A=(0,Cn.sq)(this);if(I.getState()==_s)C[f][I.tileCoord.toString()]=I,(nt=I.inTransition(A))&&1!==n.opacity&&(I.endTransition(A),nt=!1),this.newTiles_||!nt&&-1!==this.renderedTiles.indexOf(I)||(this.newTiles_=!0);if(1===I.getAlpha(A,t.time))continue}var R=p.getTileCoordChildTileRange(I.tileCoord,k,O),D=!1;R&&(D=T(f+1,R)),D||p.forEachTileCoordParentTileRange(I.tileCoord,T,k,O)}var j=d/o*l/m;mi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,a,-y/2,-_/2);var F=_i(this.pixelTransform);this.useContainer(e,F,this.getBackground(t));var N=this.context,B=N.canvas;yi(this.inversePixelTransform,this.pixelTransform),mi(this.tempTransform,y/2,_/2,j,j,0,-y/2,-_/2),B.width!=y||B.height!=_?(B.width=y,B.height=_):this.containerReused||N.clearRect(0,0,y,_),b&&this.clipUnrotated(N,t,b),u.getInterpolate()||(0,Xi.f0)(N,qh),this.preRender(N,t),this.renderedTiles.length=0;var z,G,X,U=Object.keys(C).map(Number);U.sort(Is.kK),1!==n.opacity||this.containerReused&&!u.getOpaque(t.viewState.projection)?(z=[],G=[]):U=U.reverse();for(var H=U.length-1;H>=0;--H){var q=U[H],Z=u.getTilePixelSize(q,l,i),W=p.getResolution(q)/d,V=Z[0]*W*j,Y=Z[1]*W*j,K=p.getTileCoordForCoordAndZ(tr(S),q),$=p.getTileCoordExtent(K),J=vi(this.tempTransform,[m*($[0]-S[0])/d,m*(S[3]-$[3])/d]),Q=m*u.getGutterForProjection(i),tt=C[q];for(var et in tt){var nt,rt=(I=tt[et]).tileCoord,it=K[1]-rt[1],ot=Math.round(J[0]-(it-1)*V),st=K[2]-rt[2],at=Math.round(J[1]-(st-1)*Y),lt=ot-(P=Math.round(J[0]-it*V)),ct=at-(L=Math.round(J[1]-st*Y)),ut=f===q,ht=!1;if(!(nt=ut&&1!==I.getAlpha((0,Cn.sq)(this),t.time)))if(z){X=[P,L,P+lt,L,P+lt,L+ct,P,L+ct];for(var pt=0,ft=z.length;pt<ft;++pt)if(f!==q&&q<G[pt]){var dt=z[pt];rr([P,L,P+lt,L+ct],[dt[0],dt[3],dt[4],dt[7]])&&(ht||(N.save(),ht=!0),N.beginPath(),N.moveTo(X[0],X[1]),N.lineTo(X[2],X[3]),N.lineTo(X[4],X[5]),N.lineTo(X[6],X[7]),N.moveTo(dt[6],dt[7]),N.lineTo(dt[4],dt[5]),N.lineTo(dt[2],dt[3]),N.lineTo(dt[0],dt[1]),N.clip())}z.push(X),G.push(q)}else N.clearRect(P,L,lt,ct);this.drawTileImage(I,t,P,L,lt,ct,Q,ut),z&&!nt?(ht&&N.restore(),this.renderedTiles.unshift(I)):this.renderedTiles.push(I),this.updateUsedTiles(t.usedTiles,u,I)}}return this.renderedRevision=h,this.renderedResolution=d,this.extentChanged=!this.renderedExtent_||!zn(this.renderedExtent_,S),this.renderedExtent_=S,this.renderedPixelRatio=l,this.renderedProjection=i,this.manageTilePyramid(t,u,p,l,i,g,f,c.getPreload()),this.scheduleExpireCache(t,u),this.postRender(N,t),n.extent&&N.restore(),(0,Xi.f0)(N,Zh),F!==B.style.transform&&(B.style.transform=F),this.container},e.prototype.drawTileImage=function(t,e,n,r,i,o,s,a){var l=this.getTileImage(t);if(l){var c=(0,Cn.sq)(this),u=e.layerStatesArray[e.layerIndex],h=u.opacity*(a?t.getAlpha(c,e.time):1),p=h!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(l,s,s,l.width-2*s,l.height-2*s,n,r,i,o),p&&this.context.restore(),h!==u.opacity?e.animate=!0:a&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var r=(0,Cn.sq)(t);r in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[r])}.bind(null,e);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,e,n){var r=(0,Cn.sq)(e);r in t||(t[r]={}),t[r][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,n,r,i,o,s,a,l){var c=(0,Cn.sq)(e);c in t.wantedTiles||(t.wantedTiles[c]={});var u,h,p,f,d,g,v=t.wantedTiles[c],m=t.tileQueue,y=n.getMinZoom(),_=t.viewState.rotation,b=_?$n(t.viewState.center,t.viewState.resolution,_,t.size):void 0,w=0;for(g=y;g<=s;++g)for(h=n.getTileRangeForExtentAndZ(o,g,h),p=n.getResolution(g),f=h.minX;f<=h.maxX;++f)for(d=h.minY;d<=h.maxY;++d)_&&!n.tileCoordIntersectsViewport([g,f,d],b)||(s-g<=a?(++w,(u=e.getTile(g,f,d,r,i)).getState()==ms&&(v[u.getKey()]=!0,m.isKeyQueued(u.getKey())||m.enqueue([u,c,n.getTileCoordCenter(u.tileCoord),p])),void 0!==l&&l(u)):e.useTile(g,f,d,i));e.updateCacheSize(w,i)},e}(Nu);const sp=op;var ap=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const lp=function(t){function e(e){return t.call(this,e)||this}return ap(e,t),e.prototype.createRenderer=function(){return new sp(this)},e}(jh);var cp=function(){function t(t){this.rbush_=new Dc(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[(0,Cn.sq)(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),r=0,i=e.length;r<i;r++){var o=t[r],s=e[r],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[r]=a,this.items_[(0,Cn.sq)(s)]=a}this.rbush_.load(n)},t.prototype.remove=function(t){var e=(0,Cn.sq)(t),n=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(n)},t.prototype.update=function(t,e){var n=this.items_[(0,Cn.sq)(e)];zn([n.minX,n.minY,n.maxX,n.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var n,r=0,i=t.length;r<i;r++)if(n=e(t[r]))return n;return n},t.prototype.isEmpty=function(){return(0,Xi.xb)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Nn(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}();const up=cp;var hp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function pp(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const fp=function(t){function e(e){var n=t.call(this)||this;n.projection=yr(e.projection),n.attributions_=pp(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:"ready",n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var r=n;return n.viewPromise_=new Promise((function(t,e){r.viewResolver=t,r.viewRejector=e})),n}return hp(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return(0,Cn.O3)()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=pp(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Li.Z),dp="addfeature",gp="changefeature",vp="clear",mp="removefeature",yp="featuresloadstart",_p="featuresloadend",bp="featuresloaderror";function wp(t,e){return[[-1/0,-1/0,1/0,1/0]]}var xp=!1;function Sp(t,e){return function(n,r,i,o,s){var a=this;!function(t,e,n,r,i,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,r,i):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=xp,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=e.getType(),l=void 0;"json"==r||"text"==r?l=a.responseText:"xml"==r?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):"arraybuffer"==r&&(l=a.response),l?o(e.readFeatures(l,{extent:n,featureProjection:i}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,r,i,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||fi.Zn)}}var Ep=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cp=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.feature=n,i.features=r,i}return Ep(e,t),e}(je.ZP),Tp=function(t){function e(e){var n=this,r=e||{};(n=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===r.wrapX||r.wrapX})||this).on,n.once,n.un,n.loader_=fi.Zn,n.format_=r.format,n.overlaps_=void 0===r.overlaps||r.overlaps,n.url_=r.url,void 0!==r.loader?n.loader_=r.loader:void 0!==n.url_&&(kn(n.format_,7),n.loader_=Sp(n.url_,n.format_)),n.strategy_=void 0!==r.strategy?r.strategy:wp;var i,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return n.featuresRtree_=s?new up:null,n.loadedExtentsRtree_=new up,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(i=r.features).getArray()),s||void 0!==i||(i=new Wo(o)),void 0!==o&&n.addFeaturesInternal(o),void 0!==i&&n.bindFeaturesCollection_(i),n}return Ep(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,Cn.sq)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Cp(dp,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,$i.oL)(e,qi.Z.CHANGE,this.handleFeatureChange_,this),(0,$i.oL)(e,so.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,r=e.getId();return void 0!==r&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(kn(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],r=[],i=0,o=t.length;i<o;i++){var s=t[i],a=(0,Cn.sq)(s);this.addToIndex_(a,s)&&n.push(s)}i=0;for(var l=n.length;i<l;i++){s=n[i],a=(0,Cn.sq)(s);this.setupChangeEvents_(a,s);var c=s.getGeometry();if(c){var u=c.getExtent();e.push(u),r.push(s)}else this.nullGeometryFeatures_[a]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(dp)){i=0;for(var h=n.length;i<h;i++)this.dispatchEvent(new Cp(dp,n[i]))}},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(dp,(function(n){e||(e=!0,t.push(n.feature),e=!1)})),this.addEventListener(mp,(function(n){e||(e=!0,t.remove(n.feature),e=!1)})),t.addEventListener(Go,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(Xo,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach($i.bN)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var n=function(t){this.removeFeatureInternal(t)}.bind(this);for(var r in this.featuresRtree_.forEach(n),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var i=new Cp(vp);this.dispatchEvent(i),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,(function(n){return n.getGeometry().intersectsCoordinate(t)?e(n):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(n){if(n.getGeometry().intersectsExtent(t)){var r=e(n);if(r)return r}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,Xi.xb)(this.nullGeometryFeatures_)||(0,Is.l7)(t,(0,Xi.KX)(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t,e){var n=this;if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);var r=function(t,e){if(e.canWrapX()){var n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];sr(t,e);var r=nr(n);if(nr(t)>r)return[[n[0],t[1],n[2],t[3]]];if(t[0]<n[0])return[[t[0]+r,t[1],n[2],t[3]],[n[0],t[1],t[2],t[3]]];if(t[2]>n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-r,t[3]]]}return[t]}(t,e);return[].concat.apply([],r.map((function(t){return n.featuresRtree_.getInExtent(t)})))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],r=t[1],i=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||fi.uX;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),c=s;if((s=e.closestPointXY(n,r,o,s))<c){i=t;var u=Math.sqrt(s);a[0]=n-u,a[1]=r-u,a[2]=n+u,a[3]=r+u}}})),i},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,n=(0,Cn.sq)(e),r=e.getGeometry();if(r){var i=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(i,e)):this.featuresRtree_&&this.featuresRtree_.update(i,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new Cp(gp,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:(0,Cn.sq)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,Xi.xb)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},e.prototype.loadFeatures=function(t,e,n){for(var r=this.loadedExtentsRtree_,i=this.strategy_(t,e,n),o=function(t,o){var a=i[t];r.forEachInExtent(a,(function(t){return Rn(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new Cp(yp)),s.loader_.call(s,a,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new Cp(_p,void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Cp(bp))}.bind(s)),r.insert(a,{extent:a.slice()}))},s=this,a=0,l=i.length;a<l;++a)o(a);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if(zn(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,Cn.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=(0,Cn.sq)(t),n=this.featureChangeKeys_[e];if(n){n.forEach($i.bN),delete this.featureChangeKeys_[e];var r=t.getId();return void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Cp(mp,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){kn(this.format_,7),this.url_=t,this.setLoader(Sp(t,this.format_))},e}(fp);const Op=Tp;var kp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mp=function(t){function e(e,n,r){var i=t.call(this)||this;if(void 0!==r&&void 0===n)i.setFlatCoordinates(r,e);else{var o=n||0;i.setCenterAndRadius(e,o,r)}return i}return kp(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){var i=this.flatCoordinates,o=t-i[0],s=e-i[1],a=o*o+s*s;if(a<r){if(0===a)for(var l=0;l<this.stride;++l)n[l]=i[l];else{var c=this.getRadius()/Math.sqrt(a);n[0]=i[0]+c*o,n[1]=i[1]+c*s;for(l=2;l<this.stride;++l)n[l]=i[l]}return n.length=this.stride,a}return r},e.prototype.containsXY=function(t,e){var n=this.flatCoordinates,r=t-n[0],i=e-n[1];return r*r+i*i<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,n=e[this.stride]-e[0];return Nn(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return"Circle"},e.prototype.intersectsExtent=function(t){if(rr(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||Hn(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(var i=1;i<e;++i)r[e+i]=t[i];this.setFlatCoordinates(this.layout,r),this.changed()},e.prototype.setCenterAndRadius=function(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,i=la(r,0,t,this.stride);r[i++]=r[0]+e;for(var o=1,s=this.stride;o<s;++o)r[i++]=r[o];r.length=i,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var n=this.getCenter(),r=this.getStride();this.setCenter(Ws(n,0,n.length,r,t,e,n)),this.changed()},e.prototype.translate=function(t,e){var n=this.getCenter(),r=this.getStride();this.setCenter(Vs(n,0,n.length,r,t,e,n)),this.changed()},e}(na);Mp.prototype.transform;const Pp=Mp;function Lp(t,e,n,r,i,o){if(n==e)return null;var s;if(i<t[e+r-1])return o?((s=t.slice(e,e+r))[r-1]=i,s):null;if(t[n-1]<i)return o?((s=t.slice(n-r,n))[r-1]=i,s):null;if(i==t[e+r-1])return t.slice(e,e+r);for(var a=e/r,l=n/r;a<l;){var c=a+l>>1;i<t[(c+1)*r-1]?l=c:a=c+1}var u=t[a*r-1];if(i==u)return t.slice((a-1)*r,(a-1)*r+r);var h=(i-u)/(t[(a+1)*r-1]-u);s=[];for(var p=0;p<r-1;++p)s.push(tn(t[(a-1)*r+p],t[a*r+p],h));return s.push(i),s}var Ip=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ap=function(t){function e(e,n){var r=t.call(this)||this;return r.flatMidpoint_=null,r.flatMidpointRevision_=-1,r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return Ip(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,Is.l7)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,r){return r<In(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ia(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))},e.prototype.forEachSegment=function(t){return Pa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=Hs&&this.layout!=qs)return null;var n=void 0!==e&&e;return Lp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n)},e.prototype.getCoordinates=function(){return ga(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return function(t,e,n,r,i,o,s){var a,l,c=(n-e)/r;if(1===c)a=e;else if(2===c)a=e,l=i;else if(0!==c){for(var u=t[e],h=t[e+1],p=0,f=[0],d=e+r;d<n;d+=r){var g=t[d],v=t[d+1];p+=Math.sqrt((g-u)*(g-u)+(v-h)*(v-h)),f.push(p),u=g,h=v}var m=i*p,y=(0,Is.ry)(f,m);y<0?(l=(m-f[-y-2])/(f[-y-1]-f[-y-2]),a=e+(-y-2)*r):a=e+y*r}var _=s>1?s:2,b=o||new Array(_);for(d=0;d<_;++d)b[d]=void 0===a?NaN:void 0===l?t[a+d]:tn(t[a+d],t[a+r+d],l);return b}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return zu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Xs)},e.prototype.getType=function(){return"LineString"},e.prototype.intersectsExtent=function(t){return La(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ca(this.flatCoordinates,0,t,this.stride),this.changed()},e}(na);const Rp=Ap;var Dp=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return kn(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return kn(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){kn(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();const jp=Dp;function Fp(t,e,n,r){return void 0!==r?(r[0]=t,r[1]=e,r[2]=n,r):[t,e,n]}function Np(t,e,n){return t+"/"+e+"/"+n}function Bp(t){return Np(t[0],t[1],t[2])}var zp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zp(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey()),e=t[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(Bp(t.tileCoord)),t.release())}.bind(this))}},e}(jp);const Xp=Gp,Up="tileloadstart",Hp="tileloadend",qp="tileloaderror";var Zp=[0,0,0],Wp=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,kn((0,Is.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var n=0,r=this.resolutions_.length-1;n<r;++n)if(e){if(this.resolutions_[n]/this.resolutions_[n+1]!==e){e=void 0;break}}else e=this.resolutions_[n]/this.resolutions_[n+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,kn(this.origins_.length==this.resolutions_.length,20));var i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=tr(i)),kn(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,kn(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:Ms,kn(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==i?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var n=new rp(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){var r=this.getTileRangeForExtentAndZ(i,e);n.minX=Math.max(r.minX,n.minX),n.maxX=Math.min(r.maxX,n.maxX),n.minY=Math.max(r.minY,n.minY),n.maxY=Math.min(r.maxY,n.maxY)}return n}),this):i&&this.calculateTileRanges_(i)}return t.prototype.forEachTileCoord=function(t,e,n){for(var r=this.getTileRangeForExtentAndZ(t,e),i=r.minX,o=r.maxX;i<=o;++i)for(var s=r.minY,a=r.maxY;s<=a;++s)n([e,i,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,r){var i,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(i=t[1],o=t[2]):s=this.getTileCoordExtent(t,r);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?np(i=Math.floor(i/2),i,o=Math.floor(o/2),o,n):this.getTileRangeForExtentAndZ(s,a,n)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var r=2*t[1],i=2*t[2];return np(r,r+1,i,i+1,e)}var o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var r=t[0],i=t[1],o=t[2];if(e===r)return np(i,o,i,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-r),a=Math.floor(i*s),l=Math.floor(o*s);return e<r?np(a,a,l,l,n):np(a,Math.floor(s*(i+1))-1,l,Math.floor(s*(o+1))-1,n)}var c=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(c,e,n)},t.prototype.getTileRangeExtent=function(t,e,n){var r=this.getOrigin(t),i=this.getResolution(t),o=Ya(this.getTileSize(t),this.tmpSize_),s=r[0]+e.minX*o[0]*i,a=r[0]+(e.maxX+1)*o[0]*i;return Nn(s,r[1]+e.minY*o[1]*i,a,r[1]+(e.maxY+1)*o[1]*i,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var r=Zp;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,r);var i=r[1],o=r[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,r),np(i,r[1],o,r[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=Ya(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]},t.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),r=this.getResolution(t[0]),i=Ya(this.getTileSize(t[0]),this.tmpSize_),o=n[0]+t[1]*i[0]*r,s=n[1]-(t[2]+1)*i[1]*r;return Nn(o,s,o+i[0]*r,s+i[1]*r,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,n,r,i){var o=this.getZForResolution(n),s=n/this.getResolution(o),a=this.getOrigin(o),l=Ya(this.getTileSize(o),this.tmpSize_),c=s*(t-a[0])/n/l[0],u=s*(a[1]-e)/n/l[1];return r?(c=rn(c,5)-1,u=rn(u,5)-1):(c=nn(c,5),u=nn(u,5)),Fp(o,c,u,i)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,r,i){var o=this.getOrigin(n),s=this.getResolution(n),a=Ya(this.getTileSize(n),this.tmpSize_),l=(t-o[0])/s/a[0],c=(o[1]-e)/s/a[1];return r?(l=rn(l,5)-1,c=rn(c,5)-1):(l=nn(l,5),c=nn(c,5)),Fp(n,l,c,i)},t.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return Ze((0,Is.h7)(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.tileCoordIntersectsViewport=function(t,e){return Ia(e,0,e.length,2,this.getTileCoordExtent(t))},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n},t}();const Vp=Wp;function Yp(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,n,r){var i=$p(t);return function(t,e,n,r){var i=void 0!==r?r:"top-left",o=Kp(t,e,n);return new Vp({extent:t,origin:Yn(t,i),resolutions:o,tileSize:n})}(i,e,n,r)}(t),t.setDefaultTileGrid(e)),e}function Kp(t,e,n,r){for(var i=void 0!==e?e:ks,o=Jn(t),s=nr(t),a=Ya(void 0!==n?n:Ms),l=r>0?r:Math.max(s/a[0],o/a[1]),c=i+1,u=new Array(c),h=0;h<c;++h)u[h]=l/Math.pow(2,h);return u}function $p(t){var e=(t=yr(t)).getExtent();if(!e){var n=180*Ue[He.DEGREES]/t.getMetersPerUnit();e=Nn(-n,-n,n,n)}return e}var Jp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qp=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;return n.tileGrid&&Ya(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),[256,256]),n.tileCache=new Xp(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return Jp(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,s,a,l=!0,c=n.minX;c<=n.maxX;++c)for(var u=n.minY;u<=n.maxY;++u)s=Np(e,c,u),a=!1,i.containsKey(s)&&(a=(o=i.get(s)).getState()===_s)&&(a=!1!==r(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,r,i){return(0,Cn.O3)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Yp(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return kn(null===e||Cr(e,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r,i,o,s=this.getTileGridForProjection(n),a=this.getTilePixelRatio(e),l=Ya(s.getTileSize(t),this.tmpSize);return 1==a?l:(r=l,i=a,void 0===(o=this.tmpSize)&&(o=[0,0]),o[0]=r[0]*i+.5|0,o[1]=r[1]*i+.5|0,o)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=function(t,e,n){var r=e[0],i=t.getTileCoordCenter(e),o=$p(n);if(An(o,i))return e;var s=nr(o),a=Math.ceil((o[0]-i[0])/s);return i[0]+=s*a,t.getTileCoordForCoordAndZ(i,r)}(r,t,n)),function(t,e){var n=t[0],r=t[1],i=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(r,i)}(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,r){},e}(fp),tf=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tile=n,r}return Jp(e,t),e}(je.ZP);const ef=Qp;function nf(t,e){var n=/\{z\}/g,r=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(r,s[1].toString()).replace(i,s[2].toString()).replace(o,(function(){var t=s[0],n=e.getFullTileRange(t);return kn(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}function rf(t,e){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=nf(t[i],e);return function(t){if(1===t.length)return t[0];return function(e,n,r){if(e){var i=function(t){return(t[1]<<t[0])+t[2]}(e),o=Qe(i,t.length);return t[o](e,n,r)}}}(r)}function of(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r=n[1].charCodeAt(0),i=n[2].charCodeAt(0),o=void 0;for(o=r;o<=i;++o)e.push(t.replace(n[0],String.fromCharCode(o)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(n[2],10),a=parseInt(n[1],10);a<=s;a++)e.push(t.replace(n[0],a.toString()));return e}return e.push(t),e}var sf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),af=function(t){function e(n){var r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(r.tileUrlFunction=n.tileUrlFunction),r.urls=null,n.urls?r.setUrls(n.urls):n.url&&r.setUrl(n.url),r.tileLoadingKeys_={},r}return sf(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=(0,Cn.sq)(n),i=n.getState();i==ys?(this.tileLoadingKeys_[r]=!0,e=Up):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=i==bs?qp:i==_s?Hp:void 0),null!=e&&this.dispatchEvent(new tf(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=of(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(rf(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var r=Np(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(ef);const lf=af;var cf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uf=function(t){function e(e){var n=this,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),(n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:hf,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:r,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:Gh,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return cf(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[r];i.expireCache(i==n?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Cr(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Cr(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Cr(e,t)){var n=(0,Cn.sq)(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Yp(t)),this.tileGridForProjection[n]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Cr(e,t))return this.tileCache;var n=(0,Cn.sq)(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Xp(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,e,n,r,i,o){var s=[t,e,n],a=this.getTileCoordForTileUrlFunction(s,i),l=a?this.tileUrlFunction(a,r,i):void 0,c=new this.tileClass(s,void 0!==l?ms:ws,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(qi.Z.CHANGE,this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,e,n,r,i){var o=this.getProjection();if(o&&i&&!Cr(o,i)){var s=this.getTileCacheForProjection(i),a=[t,e,n],l=void 0,c=Bp(a);s.containsKey(c)&&(l=s.get(c));var u=this.getKey();if(l&&l.key==u)return l;var h=this.getTileGridForProjection(o),p=this.getTileGridForProjection(i),f=this.getTileCoordForTileUrlFunction(a,i),d=new tp(o,h,i,p,a,f,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return d.key=u,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(c,d)):s.set(c,d),d}return this.getTileInternal(t,e,n,r,o||i)},e.prototype.getTileInternal=function(t,e,n,r,i){var o=null,s=Np(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,n,r,i,a),l.getState()==ms?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,n,r,i,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var n=yr(t);if(n){var r=(0,Cn.sq)(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}},e}(lf);function hf(t,e){t.getImage().src=e}const pf=uf;var ff=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const df=function(t){function e(e){var n=this,r=e||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate);var o=void 0!==r.projection?r.projection:"EPSG:3857",s=void 0!==r.tileGrid?r.tileGrid:function(t){var e=t||{},n=e.extent||yr("EPSG:3857").getExtent(),r={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Kp(n,e.maxZoom,e.tileSize,e.maxResolution)};return new Vp(r)}({extent:$p(o),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return(n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,opaque:r.opaque,projection:o,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:s,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this).gutter_=void 0!==r.gutter?r.gutter:0,n}return ff(e,t),e.prototype.getGutter=function(){return this.gutter_},e}(pf);var gf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const vf=function(t){function e(e){var n,r=e||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate),n=void 0!==r.attributions?r.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var o=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",s=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:r.cacheSize,crossOrigin:o,interpolate:i,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,opaque:void 0===r.opaque||r.opaque,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,transition:r.transition,url:s,wrapX:r.wrapX,zDirection:r.zDirection})||this}return gf(e,t),e}(df);function mf(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function yf(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function _f(t){return"Feature"===t.type?t.geometry:t}function bf(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=mf(t),i=_f(e),o=i.type,s=e.bbox,a=i.coordinates;if(s&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===o&&(a=[a]);for(var l=!1,c=0;c<a.length&&!l;c++)if(wf(r,a[c][0],n.ignoreBoundary)){for(var u=!1,h=1;h<a[c].length&&!u;)wf(r,a[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function wf(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var s=e[i][0],a=e[i][1],l=e[o][0],c=e[o][1];if(t[1]*(s-l)+a*(l-t[0])+c*(t[0]-s)==0&&(s-t[0])*(l-t[0])<=0&&(a-t[1])*(c-t[1])<=0)return!n;a>t[1]!=c>t[1]&&t[0]<(l-s)*(t[1]-a)/(c-a)+s&&(r=!r)}return r}function xf(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Sf(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Cf(t[0])||!Cf(t[1]))throw new Error("coordinates must contain numbers");return xf({type:"Point",coordinates:t},e,n)}function Ef(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function Cf(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Tf(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Of(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return Tf({type:"LineString",coordinates:t},e,n)}function kf(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function Mf(t,e){var n,r,i,o,s,a,l,c,u,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,c=f?t.features[n].properties:d?t.properties:{},u=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,c,u,h))return!1;p++}}function Pf(t,e){Mf(t,(function(t,n,r,i,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Tf(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<t.coordinates.length;l++){var c=t.coordinates[l];if(!1===e(Tf({type:s,coordinates:c},r),n,l))return!1}}))}const Lf=function(t){if(!t)throw new Error("geojson is required");var e=[];return Pf(t,(function(t){!function(t,e){var n=[],r=t.geometry;if(null!==r){switch(r.type){case"Polygon":n=yf(r);break;case"LineString":n=[yf(r)]}n.forEach((function(n){var r=function(t,e){var n=[];return t.reduce((function(t,r){var i,o,s,a,l,c,u=Of([t,r],e);return u.bbox=(o=r,s=(i=t)[0],a=i[1],l=o[0],c=o[1],[s<l?s:l,a<c?a:c,s>l?s:l,a>c?a:c]),n.push(u),r})),n}(n,t.properties);r.forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),kf(e)};function If(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}var Af=n(1787);function Rf(t,e){var n=yf(t),r=yf(e);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=r[0][0],c=r[0][1],u=r[1][0],h=r[1][1],p=(h-c)*(s-i)-(u-l)*(a-o),f=(u-l)*(o-c)-(h-c)*(i-l),d=(s-i)*(o-c)-(a-o)*(i-l);if(0===p)return null;var g=f/p,v=d/p;return g>=0&&g<=1&&v>=0&&v<=1?Sf([i+g*(s-i),o+g*(a-o)]):null}const Df=function(t,e){var n={},r=[];if("LineString"===t.type&&(t=xf(t)),"LineString"===e.type&&(e=xf(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var i=Rf(t,e);return i&&r.push(i),Ef(r)}var o=Af();return o.load(Lf(e)),If(Lf(t),(function(t){If(o.search(t),(function(e){var i=Rf(t,e);if(i){var o=yf(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Ef(r)};class jf extends(ni(vf)){constructor(t={}){super(((t=ui(t)).imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=t.tms?`tiles/${t.mapID}/{z}/{x}/{-y}.${t.imageExtension}`:`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t)),t.mapID&&(this.mapID=t.mapID),oi(this,t),si(this)}static async createAsync(t){return new jf(t)}insideCheckXy(t){return!this.envelope||bf(t,this.envelope)}insideCheckSysCoord(t){return this.insideCheckXy(t)}modulateXyInside(t){if(!this.centroid)return t;const e=(0,Kr.Tu)([t,this.centroid]),n=Df(this.envelope,e);return n.features.length>0&&n.features[0].geometry?n.features[0].geometry.coordinates:t}modulateSysCoordInside(t){return this.modulateXyInside(t)}merc2XyAsync(t){return Promise.resolve(t)}merc2XyAsync_ignoreBackground(t){return this.merc2XyAsync(t)}xy2MercAsync(t){return Promise.resolve(t)}xy2SysCoord(t){return t}sysCoord2Xy(t){return t}viewpoint2MercsAsync(t,e){const n=this.viewpoint2SysCoords(t,e),r=this.sysCoords2Xys(n);return this.xys2MercsAsync(r)}mercs2ViewpointAsync(t){return this.mercs2XysAsync(t).then((t=>{const e=this.xys2SysCoords(t);return this.sysCoords2Viewpoint(e)}))}mercs2SysCoordsAsync_multiLayer(t){return Promise.all(t[0].map((t=>this.merc2SysCoordAsync(t)))).then((e=>[[e,t[1]]]))}defZoom(){return this.mercZoom}}class Ff extends jf{constructor(t={}){super(t),this.style="",this.accessToken="",this.style=t.style,this.mapboxMap=t.mapboxMap}static async createAsync(t){return new Ff(t)}}function Nf(t,e){return t+(Math.random()-.5)*e}function Bf(t,e){if(t instanceof Array)return t.map((t=>Bf(t,e)));const n=Math.pow(10,e);return Math.round(t*n)/n}function zf(t){return t*Math.PI/180}class Gf extends eo{constructor(t){super({render:function(t){const e=this.getSource(),n=e.mapboxMap;n.setStyle(e.style);const r=n.getCanvas(),i=t.viewState,o=this.getVisible();r.style.display=o?"block":"none";const s=this.getOpacity();r.style.opacity=s;const a=-180*i.rotation/Math.PI,l=Er(i.center),c=i.zoom-1,u=n.getBearing(),h=n.getCenter().toArray(),p=n.getZoom();return a==u&&l[0]==h[0]&&l[1]==h[1]&&c==p||(a!=u&&n.rotateTo(a,{animate:!1}),l[0]==h[0]&&l[1]==h[1]&&c==p||n.jumpTo({center:l,zoom:c,animate:!1}),n._frame&&(n._frame.cancel(),n._frame=null),n._render()),r},source:t.source})}}const Xf="assets/images/9ac6d81f417d6a5626b7c8d5a087c32b.png",Uf=new tu({image:new bh({anchor:[.5,.5],anchorXUnits:oh,anchorYUnits:oh,src:"assets/images/6e1f2f2f6fed3c5cddeb925e7ae75aba.png"})}),Hf=new tu({image:new bh({anchor:[.5,.5],anchorXUnits:oh,anchorYUnits:oh,src:"assets/images/6c5dba7f7d76e74c3a8c7c5b1c3fc544.png"})}),qf=new tu({image:new bh({anchor:[.5,.5],anchorXUnits:oh,anchorYUnits:oh,src:"assets/images/0beac2cb41dfab43ddfd9df80b32b85d.png"})}),Zf=new tu({fill:new Wc({color:[128,128,256,.2]}),stroke:new Yc({color:[128,128,256,1],width:3})}),Wf=new tu({image:new bh({anchor:[.5,1],anchorXUnits:oh,anchorYUnits:oh,src:Xf})});class Vf extends mc{constructor(t){t=ui(t||{});const e=new Ih({source:new Op({wrapX:!1})});e.set("name","gps");const n=new Ih({source:new Op({wrapX:!1})});n.set("name","marker");const r=new Ih({source:new Op({wrapX:!1})});r.set("name","feature");const i=new Ih({source:new Op({wrapX:!1})});i.set("name","envelope");const o=Vf.spawnLayer(null,t.source,t.target),s=new Jo;s.set("name","overlay");const a={controls:t.controls?t.controls:[],layers:[o,s,i,r,e,n],target:t.div,view:new Wa({center:t.defaultCenter||[0,0],zoom:t.defaultZoom||2,rotation:t.defaultRotation||0,multiWorld:!0})};t.interactions&&(a.interactions=t.interactions),super(a),this._overlay_group=s,this.fakeGps=t.fakeGps,this.fakeRadius=t.fakeRadius,this.homePosition=t.homePosition,this.northUp=t.northUp,this.tapDuration=t.tapDuration,this.homeMarginPixels=t.homeMarginPixels,this.tapUIVanish=t.tapUIVanish;const l=this.getView();this.__AvoidFirstMoveStart=!0;const c=()=>{this.__AvoidFirstMoveStart||this.dispatchEvent("movestart"),this.__AvoidFirstMoveStart=!1,l.un("propertychange",c)};l.on("propertychange",c),this.on("moveend",(()=>{l.on("propertychange",c)}))}static spawnLayer(t,e,n){return e instanceof Ff||!(t instanceof lp)?(t=e instanceof Ff?new Gf({style:e.style,accessToken:e.accessToken,container:n,source:e}):new lp({source:e})).set("name","base"):t.setSource(e),t}getLayer(t="base"){const e=n=>{const r=n.getArray().map((n=>n.get("name")==t?n:n.getLayers?e(n.getLayers()):void 0)).filter((t=>t));if(0!=r.length)return r[0]};return e(this.getLayers())}getSource(t="base"){const e=this.getLayer(t);if(e)return e.getSource()}setFeature(t,e,n){const r=this.getSource(n),i=new bc(t);return e&&i.setStyle(e),r.addFeature(i),i}removeFeature(t,e){this.getSource(e).removeFeature(t)}resetFeature(t){this.getSource(t).clear()}setGPSPosition(t,e=void 0){const n="sub"==e?qf:"hide"==e?Hf:Uf;"sub"!=e&&this.resetFeature("gps"),t&&(this.setFeature({geometry:new Ca(t.xy)},n,"gps"),e||this.setFeature({geometry:new Pp(t.xy,t.rad)},Zf,"gps"))}setMarker(t,e,n,r){return r||(r="marker"),e.geometry=new Ca(t),n?"string"==typeof n?n=new tu({image:new bh({anchor:[.5,1],anchorXUnits:oh,anchorYUnits:oh,src:n})}):n instanceof tu||(n=new tu({image:new bh(n)})):n=Wf,this.setFeature(e,n,r)}resetMarker(t){t||(t="marker"),this.resetFeature(t)}setLine(t,e,n){return this.setVector(t,"Line",e?{stroke:e}:null,n)}setVector(t,e="Line",n,r){r||(r="feature");const i={};null!=n.stroke&&(i.stroke=new Yc(n.stroke)),null!=n.fill&&(i.fill=new Wc(n.fill));const o=new tu(i),s="Line"===e?new Rp(t):new za(t);return this.setFeature({geometry:s,name:e},o,r)}resetLine(t){this.resetVector(t)}resetVector(t){t||(t="feature"),this.resetFeature(t)}setEnvelope(t,e,n){return n||(n="envelope"),this.setLine(t,e,n)}removeEnvelope(t,e){e||(e="envelope"),this.removeFeature(t,e)}resetEnvelope(t){t||(t="envelope"),this.resetFeature(t)}setFillEnvelope(t,e,n,r){r||(r="envelope");let i=null;if(null!=e||null!=n){const t={};null!=e&&(t.stroke=new Yc(e)),null!=n&&(t.fill=new Wc(n)),i=new tu(t)}return this.setFeature({geometry:new za([t])},i,r)}exchangeSource(t=void 0){const e=this.getLayers(),n=e.item(0),r=Vf.spawnLayer(n,t,this.getTarget());r!=n&&e.setAt(0,r),t&&t.setMap(this)}setLayer(t=void 0){const e=this.getLayer("overlay").getLayers();if(e.clear(),t){const n=new lp({source:t});e.push(n)}}setTransparency(t){const e=(100-t)/100;this.getSource()instanceof jf?(this.getLayers().item(0).setOpacity(1),this.getLayers().item(1).setOpacity(e)):this.getLayers().item(0).setOpacity(e)}setGPSMarker(t,e){this.getLayers().item(0).getSource().setGPSMarker(t,e)}handleGPS(t,e){if(t)if(this.dispatchEvent("gps_request"),this._first_gps_request=!0,this.geolocation)this.geolocation.setTracking(!0);else{const t=this.geolocation=new Rc({tracking:!0});t.on("change",(e=>{const n=this.getLayer("overlay").getLayers().item(0),r=n?n.getSource():this.getLayers().item(0).getSource();let i=t.getPosition(),o=t.getAccuracy();var s,a;this.fakeGps&&(s=this.homePosition,a=i,6378.14*Math.acos(Math.cos(zf(s[1]))*Math.cos(zf(a[1]))*Math.cos(zf(a[0])-zf(s[0]))+Math.sin(zf(s[1]))*Math.sin(zf(a[1])))>this.fakeGps)&&(i=[Nf(this.homePosition[0],.001),Nf(this.homePosition[1],.001)],o=Nf(15,10));let l={lnglat:i,acc:o};r.setGPSMarkerAsync(l,!this._first_gps_request).then((t=>{t||(l={error:"gps_out"}),this._first_gps_request=!1,this.dispatchEvent(new ts("gps_result",this,l))}))})),t.on("error",(t=>{const e=this.getLayers().item(0).getSource();let n=null;if(this.fakeGps){const t=[Nf(this.homePosition[0],.001),Nf(this.homePosition[1],.001)],e=Nf(15,10);n={lnglat:t,acc:e}}e.setGPSMarkerAsync(n,!this._first_gps_request).then((t=>{t||(n={error:"gps_out"}),this._first_gps_request=!1,this.dispatchEvent(new ts("gps_result",this,n))}))}))}else{this.geolocation&&this.geolocation.setTracking(!1);this.getLayers().item(0).getSource().setGPSMarker(),e||this.dispatchEvent(new ts("gps_result",this,{error:"gps_off"}))}}}var Yf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kf=function(t){function e(e){var n=this,r=e||{};return(n=t.call(this,r)||this).condition_=r.condition?r.condition:Cl,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=void 0!==r.duration?r.duration:400,n}return Yf(e,t),e.prototype.handleDragEvent=function(t){if(Ol(t)){var e=t.map,n=e.getSize(),r=t.pixel,i=r[0]-n[0]/2,o=n[1]/2-r[1],s=Math.atan2(o,i),a=Math.sqrt(i*i+o*o),l=e.getView();if(void 0!==this.lastAngle_){var c=this.lastAngle_-s;l.adjustRotationInternal(c)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&l.adjustResolutionInternal(this.lastMagnitude_/a),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/a),this.lastMagnitude_=a}},e.prototype.handleUpEvent=function(t){if(!Ol(t))return!0;var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!Ol(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(ml);const $f=Kf;for(let t=0;t<9;t++){!function(t,e){const n=new qe({code:t,extent:[0,0,e,e],units:"m"});mr(n),Sr("EPSG:3857",n,(t=>[(t[0]+zr)*e/(2*zr),(-t[1]+zr)*e/(2*zr)]),(t=>[t[0]*(2*zr)/e-zr,-1*(t[1]*(2*zr)/e-zr)]))}(`ZOOM:${t}`,256*Math.pow(2,t))}class Jf extends(ni(df)){constructor(t={}){super(t=(()=>{(t=ui(t)).wrapX=!1,t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`);const e=Math.log2(t.width/Ur),n=Math.log2(t.height/Ur);return t.maxZoom=Math.ceil(Math.max(e,n)),t.tileUrlFunction=t.tileUrlFunction||function(t){const e=t[0],n=t[1],r=t[2];return n*Ur*Math.pow(2,this.maxZoom-e)>=this.width||r*Ur*Math.pow(2,this.maxZoom-e)>=this.height||n<0||r<0?Xr:this._tileUrlFunction(t)},t})()),t.mapID&&(this.mapID=t.mapID),t.urls?this._tileUrlFunction=rf(t.urls):t.url&&(this._tileUrlFunction=rf(of(t.url))),this.width=t.width,this.height=t.height,this.maxZoom=t.maxZoom,this._maxxy=Math.pow(2,this.maxZoom)*Ur,oi(this,t),si(this)}insideCheckXy(t){return!(t[0]<0||t[0]>this.width||t[1]<0||t[1]>this.height)}insideCheckSysCoord(t){return this.insideCheckXy(this.sysCoord2Xy(t))}modulateXyInside(t){const e=t[0]/(this.width/2)-1,n=t[1]/(this.height/2)-1,r=Math.max(Math.abs(e),Math.abs(n));return[(e/r+1)*this.width/2,(n/r+1)*this.height/2]}modulateSysCoordInside(t){const e=this.sysCoord2Xy(t),n=this.modulateXyInside(e);return this.xy2SysCoord(n)}xy2SysCoord(t){return[t[0]*(2*zr)/this._maxxy-zr,-1*(t[1]*(2*zr)/this._maxxy-zr)]}sysCoord2Xy(t){return[(t[0]+zr)*this._maxxy/(2*zr),(-t[1]+zr)*this._maxxy/(2*zr)]}defZoom(t){const e=t[0],n=t[1],r=Math.log2((e-10)/this.width),i=Math.log2((n-10)/this.height);let o;return o=i>r?i:r,this.maxZoom+o}}class Qf extends jf{constructor(t={}){super(Object.assign(t,{opaque:!1}))}static async createAsync(t){return new Qf(t)}}const td="https://weiwudi.example.com/api/";let ed,nd;!function(){if("function"==typeof window.CustomEvent)return!1;function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.Event.prototype,window.CustomEvent=t}();class rd{constructor(){this.listeners={}}addEventListener(t,e){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(e)}removeEventListener(t,e){if(!(t in this.listeners))return;const n=this.listeners[t];for(let t=0,r=n.length;t<r;t++)if(n[t]===e)return void n.splice(t,1)}dispatchEvent(t){if(!(t.type in this.listeners))return!0;const e=this.listeners[t.type].slice();for(let n=0,r=e.length;n<r;n++)e[n].call(this,t);return!t.defaultPrevented}}class id extends rd{static async registerSW(t,e){if(!("serviceWorker"in navigator))throw"Error: Service worker is not supported";try{const n=await navigator.serviceWorker.register(t,e),r=n.installing,i=n.waiting;return r&&("activated"!==r.state||i||window.location.reload(),r.addEventListener("statechange",(t=>{"activated"!==r.state||i||window.location.reload()}))),n.onupdatefound=()=>{n.update()},await id.swCheck(),n}catch(t){throw`Error: Service worker registration failed with ${t}`}}static async swCheck(){return void 0!==nd?nd:(void 0===ed&&(ed=new Promise((async(t,e)=>{try{nd=await fetch(`${td}ping`),nd=!!nd}catch(t){nd=!1}t(nd)}))),ed)}static async registerMap(t,e){if(!await id.swCheck())throw"Weiwudi service worker is not implemented.";let n;try{const r=["type","url","width","height","tileSize","minZoom","maxZoom","maxLng","maxLat","minLng","minLat"].reduce(((t,n)=>(void 0!==e[n]&&(e[n]instanceof Array?e[n].map((e=>{t.append(n,e)})):t.append(n,e[n])),t)),new URLSearchParams);r.append("mapID",t);const i=new URL(`${td}add`);i.search=r;const o=await fetch(i.href);n=await o.text()}catch(t){throw t}if(n.match(/^Error: /))throw n;return new id(t,JSON.parse(n))}static async retrieveMap(t){if(!await id.swCheck())throw"Weiwudi service worker is not implemented.";let e;try{const n=await fetch(`${td}info?mapID=${t}`);e=await n.text()}catch(t){throw t}if(e.match(/^Error: /))throw e;return console.log(e),new id(t,JSON.parse(e))}static async removeMap(t){if(!await id.swCheck())throw"Weiwudi service worker is not implemented.";let e;try{const n=await fetch(`${td}delete?mapID=${t}`);e=await n.text()}catch(t){throw t}if(e.match(/^Error: /))throw e}constructor(t,e){if(super(),!t)throw"MapID is necessary.";this.mapID=t,e&&Object.assign(this,e),this.url=`${td}cache/${t}/{z}/{x}/{y}`,this.listener=e=>{e.data.mapID===t&&this.dispatchEvent(new CustomEvent(e.data.type,{detail:e.data}))},navigator.serviceWorker.addEventListener("message",this.listener)}release(){navigator.serviceWorker.removeEventListener("message",this.listener),delete this.mapID}checkAspect(){if(!this.mapID)throw"This instance is already released."}async stats(){let t;this.checkAspect();try{const e=await fetch(`${td}stats?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if("string"==typeof t&&t.match(/^Error: /))throw t;return JSON.parse(t)}async clean(){let t;this.checkAspect();try{const e=await fetch(`${td}clean?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if(t.match(/^Error: /))throw t}async fetchAll(){let t;this.checkAspect();try{const e=await fetch(`${td}fetchAll?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if(t.match(/^Error: /))throw t}async remove(){this.checkAspect(),await id.removeMap(this.mapID),this.release()}async cancel(){let t;this.checkAspect();try{const e=await fetch(`${td}cancel?mapID=${this.mapID}`);t=await e.text()}catch(t){throw t}if(t.match(/^Error: /))throw t}}function od(t,e,n){const r="string"==typeof t?t:t.getCode(),i="string"==typeof e?e:e.getCode();let o=Or(t,e);if(o==vr&&r!=i){const n=Or(t,"EPSG:3857"),s=Or("EPSG:3857",e);if(n==vr&&"EPSG:3857"!=r)throw"Transform of Source projection is not defined.";if(s==vr&&"EPSG:3857"!=i)throw"Transform of Distination projection is not defined.";o=function(n){return kr(kr(n,t,"EPSG:3857"),"EPSG:3857",e)};const a=function(n){return kr(kr(n,e,"EPSG:3857"),"EPSG:3857",t)};Sr(t,e,o,a)}if(n)return o(n)}function sd(t,e,n={}){if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");const r=mf(t),i=_f(e),o=i.type,s=e.bbox;let a=i.coordinates;if(s&&!function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===o&&(a=[a]);let l=!1;for(let t=0;t<a.length&&!l;t++){const e=ad(r,a[t]);(0===e&&!n.ignoreBoundary||e)&&(l=!0)}return l}function ad(t,e){let n=0,r=0,i=0,o=0,s=0,a=0,l=0,c=0,u=null,h=null;const p=t[0],f=t[1],d=e.length;for(;n<d;n++){r=0;const d=e[n].length-1,g=e[n];for(u=g[0],s=u[0]-p,a=u[1]-f;r<d;r++)if(h=g[r+1],c=h[1]-f,a<0&&c<0||a>0&&c>0)u=h,a=c,s=u[0]-p;else{if(l=h[0]-t[0],c>0&&a<=0){if(o=s*c-l*a,o>0)i+=1;else if(0===o)return 0}else if(a>0&&c<=0){if(o=s*c-l*a,o<0)i+=1;else if(0===o)return 0}else if(0===c&&a<0){if(o=s*c-l*a,0===o)return 0}else if(0===a&&c<0){if(o=s*c-l*a,0===o)return 0}else if(0===a&&0===c){if(l<=0&&s>=0)return 0;if(s<=0&&l>=0)return 0}u=h,a=c,s=l}}return i%2!=0}function ld(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function cd(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return ld({type:"Polygon",coordinates:t},e,n)}function ud(t,e,n){if(null!==t)for(var r,i,o,s,a,l,c,u,h=0,p=0,f=t.type,d="FeatureCollection"===f,g="Feature"===f,v=d?t.features.length:1,m=0;m<v;m++){a=(u=!!(c=d?t.features[m].geometry:g?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var y=0;y<a;y++){var _=0,b=0;if(null!==(s=u?c.geometries[y]:c)){l=s.coordinates;var w=s.type;switch(h=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,p,m,_,b))return!1;p++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,m,_,b))return!1;p++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,m,_,b))return!1;p++}"MultiLineString"===w&&_++,"Polygon"===w&&b++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,m,_,b))return!1;p++}b++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===ud(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var hd=n(2273);function pd(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(ud(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var r=hd(n,e.concavity);return r.length>3?cd([r]):null}var fd=n(2676);function dd(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function gd(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return dd({type:"Polygon",coordinates:t},e,n)}function vd(t,e,n){return void 0===n&&(n={}),dd({type:"MultiPolygon",coordinates:t},e,n)}const md=function(t,e){var n=_f(t),r=_f(e),i=t.properties||{},o=fd.difference(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?gd(o[0],i):vd(o,i)};function yd(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function _d(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return yd({type:"Polygon",coordinates:t},e,n)}function bd(t,e,n){return void 0===n&&(n={}),yd({type:"MultiPolygon",coordinates:t},e,n)}function wd(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function xd(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return wd({type:"Polygon",coordinates:t},e,n)}function Sd(t,e,n){return void 0===n&&(n={}),wd({type:"MultiPolygon",coordinates:t},e,n)}const Ed=function(t,e,n){void 0===n&&(n={});var r=_f(t),i=_f(e),o=fd.union(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?xd(o[0],n.properties):Sd(o,n.properties)};class Cd{constructor(t){this._zlimit=0,this.initArcs(t)}initArcs(t){const e=[],n=[],r=t.map((t=>{const r=t?t.length:0;for(let i=0;i<r;i++)e.push(t[i][0]),n.push(t[i][1]);return r}));this.initXYData(r,e,n)}initXYData(t,e,n){const r=t.length;this._xx=new Float64Array(e),this._yy=new Float64Array(n),this._nn=new Uint32Array(t),this._zz=null,this._zlimit=0,this._filteredArcIter=null,this._ii=new Uint32Array(r);let i=0;for(let e=0;e<r;e++)this._ii[e]=i,i+=t[e];i==this._xx.length&&this._xx.length==this._yy.length||Td("ArcCollection#initXYData() Counting error"),this.initBounds(),this._arcIter=new Ud(this._xx,this._yy)}initBounds(){const t=this.calcArcBounds_(this._xx,this._yy,this._nn);this._bb=t.bb,this._allBounds=t.bounds}calcArcBounds_(t,e,n){const r=n.length,i=new Float64Array(4*r),o=new qd;let s,a,l,c=0;for(let u=0;u<r;u++)s=n[u],s>0&&(a=4*u,l=Hd(t,e,c,s),i[a++]=l[0],i[a++]=l[1],i[a++]=l[2],i[a]=l[3],c+=s,o.mergeBounds(l));return{bb:i,bounds:o}}getBounds(){return this._allBounds.clone()}forEachSegment(t){let e=0;for(let n=0,r=this.size();n<r;n++)e+=this.forEachArcSegment(n,t);return e}size(){return this._ii&&this._ii.length||0}forEachArcSegment(t,e){const n=t>=0,r=n?t:~t,i=this.getRetainedInterval(),o=this._nn[r],s=n?1:-1;let a=n?this._ii[r]:this._ii[r]+o-1,l=a,c=0;for(let t=1;t<o;t++)l+=s,(0===i||this._zz[l]>=i)&&(e(a,l,this._xx,this._yy),a=l,c++);return c}getRetainedInterval(){return this._zlimit}getVertexData(){return{xx:this._xx,yy:this._yy,zz:this._zz,bb:this._bb,nn:this._nn,ii:this._ii}}getUint32Array(t){const e=4*t;return(!this.buf||this.buf.byteLength<e)&&(this.buf=new ArrayBuffer(e)),new Uint32Array(this.buf,0,t)}getAvgSegment2(){let t=0,e=0;const n=this.forEachSegment(((n,r,i,o)=>{t+=Math.abs(i[n]-i[r]),e+=Math.abs(o[n]-o[r])}));return[t/n||0,e/n||0]}calcSegmentIntersectionStripeCount(){const t=this.getBounds().height(),e=this.getAvgSegment2()[1];let n=1;return e>0&&t>0&&(n=Math.ceil(t/e/20)),n||1}findSegmentIntersections(){const t=this.getBounds(),e=t.ymin,n=t.ymax-e,r=this.calcSegmentIntersectionStripeCount(),i=new Uint32Array(r),o=r>1?t=>Math.floor((r-1)*(t-e)/n):()=>0;let s,a;this.forEachSegment(((t,e,n,r)=>{let s=o(r[t]);const a=o(r[e]);for(;i[s]=i[s]+2,s!=a;)s+=a>s?1:-1}));const l=this.getUint32Array(function(t,e){Od(t)||Td("utils.sum() expects an array, received:",t);let n,r=0,i=0;for(let e=0,o=t.length;e<o;e++)n=t[e],n?r+=n:isNaN(n)&&i++;e&&(e.nan=i);return r}(i));let c=0;const u=[];!function(t,e,n){if(!Od(t))throw new Error(`#forEach() takes an array-like argument. ${t}`);for(let r=0,i=t.length;r<i;r++)e.call(n,t[r],r)}(i,(t=>{const e=c;c+=t,u.push(l.subarray(e,c))})),function(t,e){for(let n=0,r=t.length;n<r;n++)t[n]=e}(i,0),this.forEachSegment(((t,e,n,r)=>{let s=o(r[t]);const a=o(r[e]);let l,c;for(;l=i[s],i[s]=l+2,c=u[s],c[l]=t,c[l+1]=e,s!=a;)s+=a>s?1:-1}));const h=this.getVertexData(),p=[];let f;for(s=0;s<r;s++)for(f=kd(u[s],h.xx,h.yy),a=0;a<f.length;a++)p.push(f[a]);return Xd(p)}}function Td(...t){const e=t.join(" ");throw new Error(e)}function Od(t){return!!t&&(!!function(t){return Array.isArray(t)}(t)||!function(t){return null!=t&&t.toString===String.prototype.toString}(t)&&(0===t.length||t.length>0))}function kd(t,e,n){const r=t.length-2,i=[];let o,s,a,l,c,u,h,p,f,d,g,v,m,y,_,b,w;for(!function(t,e){(function(t,e){for(let n=0,r=e.length;n<r;n+=2)t[e[n]]>t[e[n+1]]&&Fd(e,n,n+1)})(t,e),Nd(t,e,0,e.length-2)}(e,t),b=0;b<r;){for(o=t[b],s=t[b+1],c=e[o],u=e[s],f=n[o],d=n[s],w=b;w<r&&(w+=2,a=t[w],h=e[a],!(u<h));){if(g=n[a],l=t[w+1],p=e[l],v=n[l],f>=g){if(f>v&&d>g&&d>v)continue}else if(f<v&&d<g&&d<v)continue;o!=a&&o!=l&&s!=a&&s!=l&&(m=Md(c,f,u,d,h,g,p,v),m&&(y=[o,s],_=[a,l],i.push(zd(m,y,_,e,n)),4==m.length&&i.push(zd(m.slice(2),y,_,e,n))))}b+=2}return i}function Md(t,e,n,r,i,o,s,a){const l=function(t,e,n,r,i,o,s,a){return Pd(t,e,n,r,i,o)*Pd(t,e,n,r,s,a)<=0&&Pd(i,o,s,a,t,e)*Pd(i,o,s,a,n,r)<=0}(t,e,n,r,i,o,s,a);let c=null;return l&&(c=function(t,e,n,r,i,o,s,a){let l,c=Id(t,e,n,r,i,o,s,a);c&&(l=function(t,e,...n){let r,i=-1,o=1/0;for(let s=0,a=0,l=n.length;a<l;s++,a+=2)r=Rd(t,e,n[a],n[a+1]),r<o&&(o=r,i=s);return i}(c[0],c[1],t,e,n,r,i,o,s,a),1==l?c=Id(n,r,t,e,i,o,s,a):2==l?c=Id(i,o,s,a,t,e,n,r):3==l&&(c=Id(s,a,i,o,t,e,n,r)));c&&function(t,e,n,r,i,o,s,a,l){let c=t[0],u=t[1];c=Dd(c,e,r),c=Dd(c,o,a),u=Dd(u,n,i),u=Dd(u,s,l),t[0]=c,t[1]=u}(c,t,e,n,r,i,o,s,a);return c}(t,e,n,r,i,o,s,a),c?function(t,e,n,r,i,o,s,a){return t==i&&e==o||t==s&&e==a||n==i&&r==o||n==s&&r==a}(t,e,n,r,i,o,s,a)&&(c=null):c=function(t,e,n,r,i,o,s,a){const l=Math.min(t,n,i,s),c=Math.max(t,n,i,s),u=Math.min(e,r,o,a),h=Math.max(e,r,o,a),p=h-u>c-l;let f=[];(p?jd(e,u,h):jd(t,l,c))&&f.push(t,e);(p?jd(r,u,h):jd(n,l,c))&&f.push(n,r);(p?jd(o,u,h):jd(i,l,c))&&f.push(i,o);(p?jd(a,u,h):jd(s,l,c))&&f.push(s,a);(2!=f.length&&4!=f.length||4==f.length&&f[0]==f[2]&&f[1]==f[3])&&(f=null);return f}(t,e,n,r,i,o,s,a)),c}function Pd(t,e,n,r,i,o){return Ld(t-i,e-o,n-i,r-o)}function Ld(t,e,n,r){return t*r-e*n}function Id(t,e,n,r,i,o,s,a){const l=Ld(n-t,r-e,s-i,a-o);let c;if(0===l)return null;const u=Pd(i,o,s,a,t,e)/l;return c=l<=1e-18&&l>=-1e-18?function(t,e,n,r,i,o,s,a){let l=null;Ad(t,i,s)||Ad(e,o,a)?Ad(n,i,s)||Ad(r,o,a)?Ad(i,t,n)||Ad(o,e,r)?Ad(s,t,n)||Ad(a,e,r)||(l=[s,a]):l=[i,o]:l=[n,r]:l=[t,e];return l}(t,e,n,r,i,o,s,a):[t+u*(n-t),e+u*(r-e)],c}function Ad(t,e,n){let r;return r=e<n?t<e||t>n:e>n?t>e||t<n:t!=e,r}function Rd(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function Dd(t,e,n){let r;return Ad(t,e,n)&&(r=Math.abs(t-e)<Math.abs(t-n)?e:n,Math.abs(t-r),t=r),t}function jd(t,e,n){return t>e&&t<n}function Fd(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Nd(t,e,n,r){let i,o,s=n,a=r;for(;s<r;){for(i=t[e[n+r>>2<<1]];s<=a;){for(;t[e[s]]<i;)s+=2;for(;t[e[a]]>i;)a-=2;s<=a&&(o=e[s],e[s]=e[a],e[a]=o,o=e[s+1],e[s+1]=e[a+1],e[a+1]=o,s+=2,a-=2)}if(a-n<40?Bd(t,e,n,a):Nd(t,e,n,a),r-s<40)return void Bd(t,e,s,r);n=s,a=r}}function Bd(t,e,n,r){let i,o;for(let s=n+2;s<=r;s+=2){let r;for(i=e[s],o=e[s+1],r=s-2;r>=n&&t[i]<t[e[r]];r-=2)e[r+2]=e[r],e[r+3]=e[r+1];e[r+2]=i,e[r+3]=o}}function zd(t,e,n,r,i){const o=t[0],s=t[1];e=Gd(o,s,e[0],e[1],r,i),n=Gd(o,s,n[0],n[1],r,i);const a=e[0]<n[0]?e:n;return{x:o,y:s,a,b:a==e?n:e}}function Gd(t,e,n,r,i,o){let s=n<r?n:r,a=s===n?r:n;return i[s]==t&&o[s]==e?a=s:i[a]==t&&o[a]==e&&(s=a),[s,a]}function Xd(t){const e={};return t.filter((t=>{const n=function(t){return`${t.a.join(",")};${t.b.join(",")}`}(t);return!(n in e)&&(e[n]=!0,!0)}))}class Ud{constructor(t,e){this._i=0,this._n=0,this._inc=1,this.i=0,this.x=0,this.y=0,this._xx=t,this._yy=e}}function Hd(t,e,n,r){let i=0|n;const o=isNaN(r)?t.length-i:r+i;let s,a,l,c,u,h;if(!(o>0))return[void 0,void 0,void 0,void 0];for(l=u=t[i],c=h=e[i],i++;i<o;i++)s=t[i],a=e[i],s<l&&(l=s),s>u&&(u=s),a<c&&(c=a),a>h&&(h=a);return[l,c,u,h]}class qd{constructor(...t){t.length>0&&this.setBounds(t)}cloneBounds(){return this.clone()}clone(){return new qd(this.xmin,this.ymin,this.xmax,this.ymax)}width(){return this.xmax-this.xmin||0}height(){return this.ymax-this.ymin||0}setBounds(t,e,n,r){return 1==arguments.length&&(Od(t)?(e=t[1],n=t[2],r=t[3],t=t[0]):(e=t.ymin,n=t.xmax,r=t.ymax,t=t.xmin)),this.xmin=t,this.ymin=e,this.xmax=n,this.ymax=r,(t>n||e>r)&&this.update(),this}update(){let t;this.xmin>this.xmax&&(t=this.xmin,this.xmin=this.xmax,this.xmax=t),this.ymin>this.ymax&&(t=this.ymin,this.ymin=this.ymax,this.ymax=t)}mergeBounds(t,...e){let n,r,i,o;return t instanceof qd?(n=t.xmin,r=t.ymin,i=t.xmax,o=t.ymax):3==e.length?(n=t,r=e[0],i=e[1],o=e[2]):4==t.length?(n=t[0],r=t[1],i=t[2],o=t[3]):Td("Bounds#mergeBounds() invalid argument:",t),void 0===this.xmin?this.setBounds(n,r,i,o):(n<this.xmin&&(this.xmin=n),r<this.ymin&&(this.ymin=r),i>this.xmax&&(this.xmax=i),o>this.ymax&&(this.ymax=o)),this}}const Zd=11102230246251565e-32,Wd=134217729,Vd=(3+8*Zd)*Zd;function Yd(t,e,n,r,i){let o,s,a,l,c=e[0],u=r[0],h=0,p=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=r[++p]);let f=0;if(h<t&&p<n)for(u>c==u>-c?(s=c+o,a=o-(s-c),c=e[++h]):(s=u+o,a=o-(s-u),u=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)u>c==u>-c?(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h]):(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function Kd(t){return new Float64Array(t)}const $d=22204460492503146e-32,Jd=11093356479670487e-47,Qd=Kd(4),tg=Kd(8),eg=Kd(12),ng=Kd(16),rg=Kd(4);function ig(t,e,n,r,i,o){const s=(e-o)*(n-i),a=(t-i)*(r-o),l=s-a;if(0===s||0===a||s>0!=a>0)return l;const c=Math.abs(s+a);return Math.abs(l)>=33306690738754716e-32*c?l:-function(t,e,n,r,i,o,s){let a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E;const C=t-i,T=n-i,O=e-o,k=r-o;b=C*k,p=Wd*C,f=p-(p-C),d=C-f,p=Wd*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=O*T,p=Wd*O,f=p-(p-O),d=O-f,p=Wd*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Qd[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Qd[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Qd[2]=y-(E-h)+(m-h),Qd[3]=E;let M=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,Qd),P=$d*s;if(M>=P||-M>=P)return M;if(h=t-C,a=t-(C+h)+(h-i),h=n-T,c=n-(T+h)+(h-i),h=e-O,l=e-(O+h)+(h-o),h=r-k,u=r-(k+h)+(h-o),0===a&&0===l&&0===c&&0===u)return M;if(P=Jd*s+Vd*Math.abs(M),M+=C*u+k*a-(O*c+T*l),M>=P||-M>=P)return M;b=a*k,p=Wd*a,f=p-(p-a),d=a-f,p=Wd*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=l*T,p=Wd*l,f=p-(p-l),d=l-f,p=Wd*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,rg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,rg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,rg[2]=y-(E-h)+(m-h),rg[3]=E;const L=Yd(4,Qd,4,rg,tg);b=C*u,p=Wd*C,f=p-(p-C),d=C-f,p=Wd*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=O*c,p=Wd*O,f=p-(p-O),d=O-f,p=Wd*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,rg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,rg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,rg[2]=y-(E-h)+(m-h),rg[3]=E;const I=Yd(L,tg,4,rg,eg);b=a*u,p=Wd*a,f=p-(p-a),d=a-f,p=Wd*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=l*c,p=Wd*l,f=p-(p-l),d=l-f,p=Wd*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,rg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,rg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,rg[2]=y-(E-h)+(m-h),rg[3]=E;const A=Yd(I,eg,4,rg,ng);return ng[A-1]}(t,e,n,r,i,o,c)}Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(8),Kd(8),Kd(8),Kd(4),Kd(8),Kd(8),Kd(8),Kd(12);Kd(192),Kd(192);Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(8),Kd(4),Kd(4),Kd(4),Kd(8),Kd(16),Kd(16),Kd(16),Kd(32),Kd(32),Kd(48),Kd(64);Kd(1152),Kd(1152);Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(4),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(24),Kd(1152),Kd(1152),Kd(1152),Kd(1152),Kd(1152),Kd(2304),Kd(2304),Kd(3456),Kd(5760),Kd(8),Kd(8),Kd(8),Kd(16),Kd(24),Kd(48),Kd(48),Kd(96),Kd(192),Kd(384),Kd(384),Kd(384),Kd(768);Kd(96),Kd(96),Kd(96),Kd(1152);const og=Math.pow(2,-52),sg=new Uint32Array(512);class ag{static from(t,e=fg,n=dg){const r=t.length,i=new Float64Array(2*r);for(let o=0;o<r;o++){const r=t[o];i[2*o]=e(r),i[2*o+1]=n(r)}return new ag(i)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let s=1/0,a=1/0,l=-1/0,c=-1/0;for(let e=0;e<o;e++){const n=t[2*e],r=t[2*e+1];n<s&&(s=n),r<a&&(a=r),n>l&&(l=n),r>c&&(c=r),this._ids[e]=e}const u=(s+l)/2,h=(a+c)/2;let p,f,d,g=1/0;for(let e=0;e<o;e++){const n=lg(u,h,t[2*e],t[2*e+1]);n<g&&(p=e,g=n)}const v=t[2*p],m=t[2*p+1];g=1/0;for(let e=0;e<o;e++){if(e===p)continue;const n=lg(v,m,t[2*e],t[2*e+1]);n<g&&n>0&&(f=e,g=n)}let y=t[2*f],_=t[2*f+1],b=1/0;for(let e=0;e<o;e++){if(e===p||e===f)continue;const n=ug(v,m,y,_,t[2*e],t[2*e+1]);n<b&&(d=e,b=n)}let w=t[2*d],x=t[2*d+1];if(b===1/0){for(let e=0;e<o;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];hg(this._ids,this._dists,0,o-1);const e=new Uint32Array(o);let n=0;for(let t=0,r=-1/0;t<o;t++){const i=this._ids[t];this._dists[i]>r&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ig(v,m,y,_,w,x)<0){const t=f,e=y,n=_;f=d,y=w,_=x,d=t,w=e,x=n}const S=function(t,e,n,r,i,o){const s=n-t,a=r-e,l=i-t,c=o-e,u=s*s+a*a,h=l*l+c*c,p=.5/(s*c-a*l);return{x:t+(c*u-a*h)*p,y:e+(s*h-l*u)*p}}(v,m,y,_,w,x);this._cx=S.x,this._cy=S.y;for(let e=0;e<o;e++)this._dists[e]=lg(t[2*e],t[2*e+1],S.x,S.y);hg(this._ids,this._dists,0,o-1),this._hullStart=p;let E=3;n[p]=e[d]=f,n[f]=e[p]=d,n[d]=e[f]=p,r[p]=0,r[f]=1,r[d]=2,i.fill(-1),i[this._hashKey(v,m)]=p,i[this._hashKey(y,_)]=f,i[this._hashKey(w,x)]=d,this.trianglesLen=0,this._addTriangle(p,f,d,-1,-1,-1);for(let o,s,a=0;a<this._ids.length;a++){const l=this._ids[a],c=t[2*l],u=t[2*l+1];if(a>0&&Math.abs(c-o)<=og&&Math.abs(u-s)<=og)continue;if(o=c,s=u,l===p||l===f||l===d)continue;let h=0;for(let t=0,e=this._hashKey(c,u);t<this._hashSize&&(h=i[(e+t)%this._hashSize],-1===h||h===n[h]);t++);h=e[h];let g,v=h;for(;g=n[v],ig(c,u,t[2*v],t[2*v+1],t[2*g],t[2*g+1])>=0;)if(v=g,v===h){v=-1;break}if(-1===v)continue;let m=this._addTriangle(v,l,n[v],-1,-1,r[v]);r[l]=this._legalize(m+2),r[v]=m,E++;let y=n[v];for(;g=n[y],ig(c,u,t[2*y],t[2*y+1],t[2*g],t[2*g+1])<0;)m=this._addTriangle(y,l,g,r[l],-1,r[y]),r[l]=this._legalize(m+2),n[y]=y,E--,y=g;if(v===h)for(;g=e[v],ig(c,u,t[2*g],t[2*g+1],t[2*v],t[2*v+1])<0;)m=this._addTriangle(g,l,v,-1,r[v],r[g]),this._legalize(m+2),r[g]=m,n[v]=v,E--,v=g;this._hullStart=e[l]=v,n[v]=e[y]=l,n[l]=y,i[this._hashKey(c,u)]=l,i[this._hashKey(t[2*v],t[2*v+1])]=v}this.hull=new Uint32Array(E);for(let t=0,e=this._hullStart;t<E;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===i)break;t=sg[--i];continue}const l=s-s%3,c=a+(t+1)%3,u=l+(s+2)%3,h=e[o],p=e[t],f=e[c],d=e[u];if(cg(r[2*h],r[2*h+1],r[2*p],r[2*p+1],r[2*f],r[2*f+1],r[2*d],r[2*d+1])){e[t]=d,e[s]=h;const r=n[u];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===u){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(s,n[o]),this._link(o,u);const a=l+(s+1)%3;i<sg.length&&(sg[i++]=a)}else{if(0===i)break;t=sg[--i]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,r),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function lg(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function cg(t,e,n,r,i,o,s,a){const l=t-s,c=e-a,u=n-s,h=r-a,p=i-s,f=o-a,d=u*u+h*h,g=p*p+f*f;return l*(h*g-d*f)-c*(u*g-d*p)+(l*l+c*c)*(u*f-h*p)<0}function ug(t,e,n,r,i,o){const s=n-t,a=r-e,l=i-t,c=o-e,u=s*s+a*a,h=l*l+c*c,p=.5/(s*c-a*l),f=(c*u-a*h)*p,d=(s*h-l*u)*p;return f*f+d*d}function hg(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],o=e[r];let s=i-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;pg(t,n+r>>1,i),e[t[n]]>e[t[r]]&&pg(t,n,r),e[t[i]]>e[t[r]]&&pg(t,i,r),e[t[n]]>e[t[i]]&&pg(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]<a);do{o--}while(e[t[o]]>a);if(o<i)break;pg(t,i,o)}t[n+1]=t[o],t[o]=s,r-i+1>=o-n?(hg(t,e,i,r),hg(t,e,n,o-1)):(hg(t,e,n,o-1),hg(t,e,i,r))}}function pg(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function fg(t){return t[0]}function dg(t){return t[1]}const gg=134217729,vg=33306690738754706e-32;function mg(t,e,n,r,i){let o,s,a,l,c=e[0],u=r[0],h=0,p=0;u>c==u>-c?(o=c,c=e[++h]):(o=u,u=r[++p]);let f=0;if(h<t&&p<n)for(u>c==u>-c?(s=c+o,a=o-(s-c),c=e[++h]):(s=u+o,a=o-(s-u),u=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)u>c==u>-c?(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h]):(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)s=o+c,l=s-o,a=o-(s-l)+(c-l),c=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function yg(t,e,n,r,i,o,s,a){return mg(mg(t,e,n,r,s),s,i,o,a)}function _g(t,e,n,r){let i,o,s,a,l,c,u,h,p,f,d;u=gg*n,f=u-(u-n),d=n-f;let g=e[0];i=g*n,u=gg*g,h=u-(u-g),p=g-h,s=p*d-(i-h*f-p*f-h*d);let v=0;0!==s&&(r[v++]=s);for(let m=1;m<t;m++)g=e[m],a=g*n,u=gg*g,h=u-(u-g),p=g-h,l=p*d-(a-h*f-p*f-h*d),o=i+l,c=o-i,s=i-(o-c)+(l-c),0!==s&&(r[v++]=s),i=a+o,s=o-(i-a),0!==s&&(r[v++]=s);return 0===i&&0!==v||(r[v++]=i),v}function bg(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function wg(t){return new Float64Array(t)}const xg=33306690738754716e-32,Sg=22204460492503146e-32,Eg=11093356479670487e-47,Cg=wg(4),Tg=wg(8),Og=wg(12),kg=wg(16),Mg=wg(4);function Pg(t,e,n,r,i,o){const s=(e-o)*(n-i),a=(t-i)*(r-o),l=s-a;if(0===s||0===a||s>0!=a>0)return l;const c=Math.abs(s+a);return Math.abs(l)>=xg*c?l:-function(t,e,n,r,i,o,s){let a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E;const C=t-i,T=n-i,O=e-o,k=r-o;b=C*k,p=gg*C,f=p-(p-C),d=C-f,p=gg*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=O*T,p=gg*O,f=p-(p-O),d=O-f,p=gg*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Cg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Cg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Cg[2]=y-(E-h)+(m-h),Cg[3]=E;let M=bg(4,Cg),P=Sg*s;if(M>=P||-M>=P)return M;if(h=t-C,a=t-(C+h)+(h-i),h=n-T,c=n-(T+h)+(h-i),h=e-O,l=e-(O+h)+(h-o),h=r-k,u=r-(k+h)+(h-o),0===a&&0===l&&0===c&&0===u)return M;if(P=Eg*s+vg*Math.abs(M),M+=C*u+k*a-(O*c+T*l),M>=P||-M>=P)return M;b=a*k,p=gg*a,f=p-(p-a),d=a-f,p=gg*k,g=p-(p-k),v=k-g,w=d*v-(b-f*g-d*g-f*v),x=l*T,p=gg*l,f=p-(p-l),d=l-f,p=gg*T,g=p-(p-T),v=T-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Mg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Mg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Mg[2]=y-(E-h)+(m-h),Mg[3]=E;const L=mg(4,Cg,4,Mg,Tg);b=C*u,p=gg*C,f=p-(p-C),d=C-f,p=gg*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=O*c,p=gg*O,f=p-(p-O),d=O-f,p=gg*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Mg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Mg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Mg[2]=y-(E-h)+(m-h),Mg[3]=E;const I=mg(L,Tg,4,Mg,Og);b=a*u,p=gg*a,f=p-(p-a),d=a-f,p=gg*u,g=p-(p-u),v=u-g,w=d*v-(b-f*g-d*g-f*v),x=l*c,p=gg*l,f=p-(p-l),d=l-f,p=gg*c,g=p-(p-c),v=c-g,S=d*v-(x-f*g-d*g-f*v),m=w-S,h=w-m,Mg[0]=w-(m+h)+(h-S),y=b+m,h=y-b,_=b-(y-h)+(m-h),m=_-x,h=_-m,Mg[1]=_-(m+h)+(h-x),E=y+m,h=E-y,Mg[2]=y-(E-h)+(m-h),Mg[3]=E;const A=mg(I,Og,4,Mg,kg);return kg[A-1]}(t,e,n,r,i,o,c)}wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(8),wg(8),wg(8),wg(4),wg(8),wg(8),wg(8),wg(12);wg(192),wg(192);const Lg=4440892098500632e-31,Ig=5423418723394464e-46,Ag=wg(4),Rg=wg(4),Dg=wg(4),jg=wg(4),Fg=wg(4),Ng=wg(4),Bg=wg(4),zg=wg(4),Gg=wg(8),Xg=wg(8),Ug=wg(8),Hg=wg(8),qg=wg(8),Zg=wg(8),Wg=wg(8),Vg=wg(8),Yg=wg(8),Kg=wg(4),$g=wg(4),Jg=wg(4),Qg=wg(8),tv=wg(16),ev=wg(16),nv=wg(16),rv=wg(32),iv=wg(32),ov=wg(48),sv=wg(64);let av=wg(1152),lv=wg(1152);function cv(t,e,n){t=mg(t,av,e,n,lv);const r=av;return av=lv,lv=r,t}function uv(t,e,n,r,i,o,s,a){const l=t-s,c=n-s,u=i-s,h=e-a,p=r-a,f=o-a,d=c*f,g=u*p,v=l*l+h*h,m=u*h,y=l*f,_=c*c+p*p,b=l*p,w=c*h,x=u*u+f*f,S=v*(d-g)+_*(m-y)+x*(b-w),E=(Math.abs(d)+Math.abs(g))*v+(Math.abs(m)+Math.abs(y))*_+(Math.abs(b)+Math.abs(w))*x,C=11102230246251577e-31*E;return S>C||-S>C?S:function(t,e,n,r,i,o,s,a,l){let c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E,C,T,O,k,M,P,L,I,A,R,D,j,F,N,B,z,G,X,U;const H=t-s,q=n-s,Z=i-s,W=e-a,V=r-a,Y=o-a;B=q*Y,L=gg*q,I=L-(L-q),A=q-I,L=gg*Y,R=L-(L-Y),D=Y-R,z=A*D-(B-I*R-A*R-I*D),G=Z*V,L=gg*Z,I=L-(L-Z),A=Z-I,L=gg*V,R=L-(L-V),D=V-R,X=A*D-(G-I*R-A*R-I*D),j=z-X,P=z-j,Ag[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Ag[1]=N-(j+P)+(P-G),U=F+j,P=U-F,Ag[2]=F-(U-P)+(j-P),Ag[3]=U,B=Z*W,L=gg*Z,I=L-(L-Z),A=Z-I,L=gg*W,R=L-(L-W),D=W-R,z=A*D-(B-I*R-A*R-I*D),G=H*Y,L=gg*H,I=L-(L-H),A=H-I,L=gg*Y,R=L-(L-Y),D=Y-R,X=A*D-(G-I*R-A*R-I*D),j=z-X,P=z-j,Rg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Rg[1]=N-(j+P)+(P-G),U=F+j,P=U-F,Rg[2]=F-(U-P)+(j-P),Rg[3]=U,B=H*V,L=gg*H,I=L-(L-H),A=H-I,L=gg*V,R=L-(L-V),D=V-R,z=A*D-(B-I*R-A*R-I*D),G=q*W,L=gg*q,I=L-(L-q),A=q-I,L=gg*W,R=L-(L-W),D=W-R,X=A*D-(G-I*R-A*R-I*D),j=z-X,P=z-j,Dg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Dg[1]=N-(j+P)+(P-G),U=F+j,P=U-F,Dg[2]=F-(U-P)+(j-P),Dg[3]=U,c=mg(mg(mg(_g(_g(4,Ag,H,Qg),Qg,H,tv),tv,_g(_g(4,Ag,W,Qg),Qg,W,ev),ev,rv),rv,mg(_g(_g(4,Rg,q,Qg),Qg,q,tv),tv,_g(_g(4,Rg,V,Qg),Qg,V,ev),ev,iv),iv,sv),sv,mg(_g(_g(4,Dg,Z,Qg),Qg,Z,tv),tv,_g(_g(4,Dg,Y,Qg),Qg,Y,ev),ev,rv),rv,av);let K=bg(c,av),$=Lg*l;if(K>=$||-K>=$)return K;if(P=t-H,u=t-(H+P)+(P-s),P=e-W,f=e-(W+P)+(P-a),P=n-q,h=n-(q+P)+(P-s),P=r-V,d=r-(V+P)+(P-a),P=i-Z,p=i-(Z+P)+(P-s),P=o-Y,g=o-(Y+P)+(P-a),0===u&&0===h&&0===p&&0===f&&0===d&&0===g)return K;if($=Ig*l+vg*Math.abs(K),K+=(H*H+W*W)*(q*g+Y*h-(V*p+Z*d))+2*(H*u+W*f)*(q*Y-V*Z)+((q*q+V*V)*(Z*f+W*p-(Y*u+H*g))+2*(q*h+V*d)*(Z*W-Y*H))+((Z*Z+Y*Y)*(H*d+V*u-(W*h+q*f))+2*(Z*p+Y*g)*(H*V-W*q)),K>=$||-K>=$)return K;if(0===h&&0===d&&0===p&&0===g||(B=H*H,L=gg*H,I=L-(L-H),A=H-I,z=A*A-(B-I*I-(I+I)*A),G=W*W,L=gg*W,I=L-(L-W),A=W-I,X=A*A-(G-I*I-(I+I)*A),j=z+X,P=j-z,jg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,jg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,jg[2]=F-(U-P)+(j-P),jg[3]=U),0===p&&0===g&&0===u&&0===f||(B=q*q,L=gg*q,I=L-(L-q),A=q-I,z=A*A-(B-I*I-(I+I)*A),G=V*V,L=gg*V,I=L-(L-V),A=V-I,X=A*A-(G-I*I-(I+I)*A),j=z+X,P=j-z,Fg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Fg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,Fg[2]=F-(U-P)+(j-P),Fg[3]=U),0===u&&0===f&&0===h&&0===d||(B=Z*Z,L=gg*Z,I=L-(L-Z),A=Z-I,z=A*A-(B-I*I-(I+I)*A),G=Y*Y,L=gg*Y,I=L-(L-Y),A=Y-I,X=A*A-(G-I*I-(I+I)*A),j=z+X,P=j-z,Ng[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Ng[1]=N-(j-P)+(G-P),U=F+j,P=U-F,Ng[2]=F-(U-P)+(j-P),Ng[3]=U),0!==u&&(v=_g(4,Ag,u,Gg),c=cv(c,yg(_g(v,Gg,2*H,tv),tv,_g(_g(4,Ng,u,Qg),Qg,V,ev),ev,_g(_g(4,Fg,u,Qg),Qg,-Y,nv),nv,rv,ov),ov)),0!==f&&(m=_g(4,Ag,f,Xg),c=cv(c,yg(_g(m,Xg,2*W,tv),tv,_g(_g(4,Fg,f,Qg),Qg,Z,ev),ev,_g(_g(4,Ng,f,Qg),Qg,-q,nv),nv,rv,ov),ov)),0!==h&&(y=_g(4,Rg,h,Ug),c=cv(c,yg(_g(y,Ug,2*q,tv),tv,_g(_g(4,jg,h,Qg),Qg,Y,ev),ev,_g(_g(4,Ng,h,Qg),Qg,-W,nv),nv,rv,ov),ov)),0!==d&&(_=_g(4,Rg,d,Hg),c=cv(c,yg(_g(_,Hg,2*V,tv),tv,_g(_g(4,Ng,d,Qg),Qg,H,ev),ev,_g(_g(4,jg,d,Qg),Qg,-Z,nv),nv,rv,ov),ov)),0!==p&&(b=_g(4,Dg,p,qg),c=cv(c,yg(_g(b,qg,2*Z,tv),tv,_g(_g(4,Fg,p,Qg),Qg,W,ev),ev,_g(_g(4,jg,p,Qg),Qg,-V,nv),nv,rv,ov),ov)),0!==g&&(w=_g(4,Dg,g,Zg),c=cv(c,yg(_g(w,Zg,2*Y,tv),tv,_g(_g(4,jg,g,Qg),Qg,q,ev),ev,_g(_g(4,Fg,g,Qg),Qg,-H,nv),nv,rv,ov),ov)),0!==u||0!==f){if(0!==h||0!==d||0!==p||0!==g?(B=h*Y,L=gg*h,I=L-(L-h),A=h-I,L=gg*Y,R=L-(L-Y),D=Y-R,z=A*D-(B-I*R-A*R-I*D),G=q*g,L=gg*q,I=L-(L-q),A=q-I,L=gg*g,R=L-(L-g),D=g-R,X=A*D-(G-I*R-A*R-I*D),j=z+X,P=j-z,Bg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Bg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,Bg[2]=F-(U-P)+(j-P),Bg[3]=U,B=p*-V,L=gg*p,I=L-(L-p),A=p-I,L=gg*-V,R=L-(L- -V),D=-V-R,z=A*D-(B-I*R-A*R-I*D),G=Z*-d,L=gg*Z,I=L-(L-Z),A=Z-I,L=gg*-d,R=L-(L- -d),D=-d-R,X=A*D-(G-I*R-A*R-I*D),j=z+X,P=j-z,zg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,zg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,zg[2]=F-(U-P)+(j-P),zg[3]=U,S=mg(4,Bg,4,zg,Vg),B=h*g,L=gg*h,I=L-(L-h),A=h-I,L=gg*g,R=L-(L-g),D=g-R,z=A*D-(B-I*R-A*R-I*D),G=p*d,L=gg*p,I=L-(L-p),A=p-I,L=gg*d,R=L-(L-d),D=d-R,X=A*D-(G-I*R-A*R-I*D),j=z-X,P=z-j,$g[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,$g[1]=N-(j+P)+(P-G),U=F+j,P=U-F,$g[2]=F-(U-P)+(j-P),$g[3]=U,T=4):(Vg[0]=0,S=1,$g[0]=0,T=1),0!==u){const t=_g(S,Vg,u,nv);c=cv(c,mg(_g(v,Gg,u,tv),tv,_g(t,nv,2*H,rv),rv,ov),ov);const e=_g(T,$g,u,Qg);c=cv(c,yg(_g(e,Qg,2*H,tv),tv,_g(e,Qg,u,ev),ev,_g(t,nv,u,rv),rv,iv,sv),sv),0!==d&&(c=cv(c,_g(_g(4,Ng,u,Qg),Qg,d,tv),tv)),0!==g&&(c=cv(c,_g(_g(4,Fg,-u,Qg),Qg,g,tv),tv))}if(0!==f){const t=_g(S,Vg,f,nv);c=cv(c,mg(_g(m,Xg,f,tv),tv,_g(t,nv,2*W,rv),rv,ov),ov);const e=_g(T,$g,f,Qg);c=cv(c,yg(_g(e,Qg,2*W,tv),tv,_g(e,Qg,f,ev),ev,_g(t,nv,f,rv),rv,iv,sv),sv)}}if(0!==h||0!==d){if(0!==p||0!==g||0!==u||0!==f?(B=p*W,L=gg*p,I=L-(L-p),A=p-I,L=gg*W,R=L-(L-W),D=W-R,z=A*D-(B-I*R-A*R-I*D),G=Z*f,L=gg*Z,I=L-(L-Z),A=Z-I,L=gg*f,R=L-(L-f),D=f-R,X=A*D-(G-I*R-A*R-I*D),j=z+X,P=j-z,Bg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Bg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,Bg[2]=F-(U-P)+(j-P),Bg[3]=U,k=-Y,M=-g,B=u*k,L=gg*u,I=L-(L-u),A=u-I,L=gg*k,R=L-(L-k),D=k-R,z=A*D-(B-I*R-A*R-I*D),G=H*M,L=gg*H,I=L-(L-H),A=H-I,L=gg*M,R=L-(L-M),D=M-R,X=A*D-(G-I*R-A*R-I*D),j=z+X,P=j-z,zg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,zg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,zg[2]=F-(U-P)+(j-P),zg[3]=U,E=mg(4,Bg,4,zg,Yg),B=p*f,L=gg*p,I=L-(L-p),A=p-I,L=gg*f,R=L-(L-f),D=f-R,z=A*D-(B-I*R-A*R-I*D),G=u*g,L=gg*u,I=L-(L-u),A=u-I,L=gg*g,R=L-(L-g),D=g-R,X=A*D-(G-I*R-A*R-I*D),j=z-X,P=z-j,Jg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Jg[1]=N-(j+P)+(P-G),U=F+j,P=U-F,Jg[2]=F-(U-P)+(j-P),Jg[3]=U,O=4):(Yg[0]=0,E=1,Jg[0]=0,O=1),0!==h){const t=_g(E,Yg,h,nv);c=cv(c,mg(_g(y,Ug,h,tv),tv,_g(t,nv,2*q,rv),rv,ov),ov);const e=_g(O,Jg,h,Qg);c=cv(c,yg(_g(e,Qg,2*q,tv),tv,_g(e,Qg,h,ev),ev,_g(t,nv,h,rv),rv,iv,sv),sv),0!==g&&(c=cv(c,_g(_g(4,jg,h,Qg),Qg,g,tv),tv)),0!==f&&(c=cv(c,_g(_g(4,Ng,-h,Qg),Qg,f,tv),tv))}if(0!==d){const t=_g(E,Yg,d,nv);c=cv(c,mg(_g(_,Hg,d,tv),tv,_g(t,nv,2*V,rv),rv,ov),ov);const e=_g(O,Jg,d,Qg);c=cv(c,yg(_g(e,Qg,2*V,tv),tv,_g(e,Qg,d,ev),ev,_g(t,nv,d,rv),rv,iv,sv),sv)}}if(0!==p||0!==g){if(0!==u||0!==f||0!==h||0!==d?(B=u*V,L=gg*u,I=L-(L-u),A=u-I,L=gg*V,R=L-(L-V),D=V-R,z=A*D-(B-I*R-A*R-I*D),G=H*d,L=gg*H,I=L-(L-H),A=H-I,L=gg*d,R=L-(L-d),D=d-R,X=A*D-(G-I*R-A*R-I*D),j=z+X,P=j-z,Bg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,Bg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,Bg[2]=F-(U-P)+(j-P),Bg[3]=U,k=-W,M=-f,B=h*k,L=gg*h,I=L-(L-h),A=h-I,L=gg*k,R=L-(L-k),D=k-R,z=A*D-(B-I*R-A*R-I*D),G=q*M,L=gg*q,I=L-(L-q),A=q-I,L=gg*M,R=L-(L-M),D=M-R,X=A*D-(G-I*R-A*R-I*D),j=z+X,P=j-z,zg[0]=z-(j-P)+(X-P),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N+G,P=j-N,zg[1]=N-(j-P)+(G-P),U=F+j,P=U-F,zg[2]=F-(U-P)+(j-P),zg[3]=U,x=mg(4,Bg,4,zg,Wg),B=u*d,L=gg*u,I=L-(L-u),A=u-I,L=gg*d,R=L-(L-d),D=d-R,z=A*D-(B-I*R-A*R-I*D),G=h*f,L=gg*h,I=L-(L-h),A=h-I,L=gg*f,R=L-(L-f),D=f-R,X=A*D-(G-I*R-A*R-I*D),j=z-X,P=z-j,Kg[0]=z-(j+P)+(P-X),F=B+j,P=F-B,N=B-(F-P)+(j-P),j=N-G,P=N-j,Kg[1]=N-(j+P)+(P-G),U=F+j,P=U-F,Kg[2]=F-(U-P)+(j-P),Kg[3]=U,C=4):(Wg[0]=0,x=1,Kg[0]=0,C=1),0!==p){const t=_g(x,Wg,p,nv);c=cv(c,mg(_g(b,qg,p,tv),tv,_g(t,nv,2*Z,rv),rv,ov),ov);const e=_g(C,Kg,p,Qg);c=cv(c,yg(_g(e,Qg,2*Z,tv),tv,_g(e,Qg,p,ev),ev,_g(t,nv,p,rv),rv,iv,sv),sv),0!==f&&(c=cv(c,_g(_g(4,Fg,p,Qg),Qg,f,tv),tv)),0!==d&&(c=cv(c,_g(_g(4,jg,-p,Qg),Qg,d,tv),tv))}if(0!==g){const t=_g(x,Wg,g,nv);c=cv(c,mg(_g(w,Zg,g,tv),tv,_g(t,nv,2*Y,rv),rv,ov),ov);const e=_g(C,Kg,g,Qg);c=cv(c,yg(_g(e,Qg,2*Y,tv),tv,_g(e,Qg,g,ev),ev,_g(t,nv,g,rv),rv,iv,sv),sv)}}return av[c-1]}(t,e,n,r,i,o,s,a,E)}wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(4),wg(24),wg(24),wg(24),wg(24),wg(24),wg(24),wg(24),wg(24),wg(24),wg(24),wg(1152),wg(1152),wg(1152),wg(1152),wg(1152),wg(2304),wg(2304),wg(3456),wg(5760),wg(8),wg(8),wg(8),wg(16),wg(24),wg(48),wg(48),wg(96),wg(192),wg(384),wg(384),wg(384),wg(768);wg(96),wg(96),wg(96),wg(1152);class hv{constructor(t,e){this.W=t,this.bs=e}add(t){const e=this.W,n=t/e|0,r=t%e;return this.bs[n]|=1<<r,this}delete(t){const e=this.W,n=t/e|0,r=t%e;return this.bs[n]&=~(1<<r),this}set(t,e){const n=this.W,r=t/n|0,i=1<<t%n;return this.bs[r]^=(-e^this.bs[r])&i,e}has(t){const e=this.W,n=t/e|0,r=t%e;return!!(this.bs[n]&1<<r)}forEach(t){const e=this.W,n=this.bs,r=n.length;for(let i=0;i<r;i++){let r=0;for(;n[i]&&r<e;)n[i]&1<<r&&t(i*e+r),r++}return this}}class pv extends hv{constructor(t){super(8,new Uint8Array(Math.ceil(t/8)).fill(0))}}function fv(t){return t%3==2?t-2:t+1}function dv(t){return t%3==0?t+2:t-1}class gv{constructor(t,e){if(!(t&&"object"==typeof t&&t.triangles&&t.halfedges&&t.coords))throw new Error("Expected an object with Delaunator output");if(t.triangles.length%3||t.halfedges.length!==t.triangles.length||t.coords.length%2)throw new Error("Delaunator output appears inconsistent");if(t.triangles.length<3)throw new Error("No edges in triangulation");this.del=t;const n=2**32-1,r=t.coords.length>>1,i=t.triangles.length;this.vertMap=new Uint32Array(r).fill(n),this.flips=new pv(i),this.consd=new pv(i);for(let e=0;e<i;e++){const r=t.triangles[e];this.vertMap[r]===n&&this.updateVert(e)}e&&this.constrainAll(e)}constrainOne(t,e){const{triangles:n,halfedges:r}=this.del,i=this.vertMap,o=this.consd,s=i[t];let a=s;do{const i=n[a],o=fv(a);if(i===e)return this.protect(a);const s=dv(a),l=n[s];if(l===e)return this.protect(o),o;if(this.intersectSegments(t,e,l,i)){a=s;break}a=r[o]}while(-1!==a&&a!==s);let l=a,c=-1;for(;-1!==a;){const i=r[a],s=dv(a),u=dv(i),h=fv(i);if(-1===i)throw new Error("Constraining edge exited the hull");if(o.has(a))throw new Error("Edge intersects already constrained edge");if(this.isCollinear(t,e,n[a])||this.isCollinear(t,e,n[i]))throw new Error("Constraining edge intersects point");if(this.intersectSegments(n[a],n[i],n[s],n[u])){if(this.flipDiagonal(a),this.intersectSegments(t,e,n[s],n[u])&&(-1===c&&(c=s),c===s))throw new Error("Infinite loop: flipped diagonal still intersects");n[u]===e?(l=u,a=c,c=-1):this.intersectSegments(t,e,n[h],n[u])&&(a=h)}else{if(-1===c&&(c=a),n[u]===e){if(a===c)throw new Error("Infinite loop: non-convex quadrilateral");a=c,c=-1;continue}if(this.intersectSegments(t,e,n[u],n[i]))a=u;else if(this.intersectSegments(t,e,n[h],n[u]))a=h;else if(c===a)throw new Error("Infinite loop: no further intersect after non-convex")}}const u=this.flips;this.protect(l);do{var h=0;u.forEach((t=>{u.delete(t);const e=r[t];-1!==e&&(u.delete(e),this.isDelaunay(t)||(this.flipDiagonal(t),h++))}))}while(h>0);return this.findEdge(t,e)}delaunify(t=!1){const e=this.del.halfedges,n=this.flips,r=this.consd,i=e.length;do{var o=0;for(let t=0;t<i;t++){if(r.has(t))continue;n.delete(t);const i=e[t];-1!==i&&(n.delete(i),this.isDelaunay(t)||(this.flipDiagonal(t),o++))}}while(t&&o>0);return this}constrainAll(t){const e=t.length;for(let n=0;n<e;n++){const e=t[n];this.constrainOne(e[0],e[1])}return this}isConstrained(t){return this.consd.has(t)}findEdge(t,e){const n=this.vertMap[e],{triangles:r,halfedges:i}=this.del;let o=n,s=-1;do{if(r[o]===t)return o;s=fv(o),o=i[s]}while(-1!==o&&o!==n);return r[fv(s)]===t?-s:1/0}protect(t){const e=this.del.halfedges[t],n=this.flips,r=this.consd;return n.delete(t),r.add(t),-1!==e?(n.delete(e),r.add(e),e):-t}markFlip(t){const e=this.del.halfedges,n=this.flips;if(this.consd.has(t))return!1;const r=e[t];return-1!==r&&(n.add(t),n.add(r)),!0}flipDiagonal(t){const{triangles:e,halfedges:n}=this.del,r=this.flips,i=this.consd,o=n[t],s=dv(t),a=fv(t),l=dv(o),c=fv(o),u=n[s],h=n[l];if(i.has(t))throw new Error("Trying to flip a constrained edge");return e[t]=e[l],n[t]=h,r.set(t,r.has(l))||i.set(t,i.has(l)),-1!==h&&(n[h]=t),n[s]=l,e[o]=e[s],n[o]=u,r.set(o,r.has(s))||i.set(o,i.has(s)),-1!==u&&(n[u]=o),n[l]=s,this.markFlip(t),this.markFlip(a),this.markFlip(o),this.markFlip(c),r.add(s),i.delete(s),r.add(l),i.delete(l),this.updateVert(t),this.updateVert(a),this.updateVert(o),this.updateVert(c),s}isDelaunay(t){const{triangles:e,halfedges:n}=this.del,r=n[t];if(-1===r)return!0;const i=e[dv(t)],o=e[t],s=e[fv(t)],a=e[dv(r)];return!this.inCircle(i,o,s,a)}updateVert(t){const{triangles:e,halfedges:n}=this.del,r=this.vertMap,i=e[t];let o=dv(t),s=n[o];for(;-1!==s&&s!==t;)o=dv(s),s=n[o];return r[i]=o,o}intersectSegments(t,e,n,r){const i=this.del.coords;return t!==n&&t!==r&&e!==n&&e!==r&&vv(i[2*t],i[2*t+1],i[2*e],i[2*e+1],i[2*n],i[2*n+1],i[2*r],i[2*r+1])}inCircle(t,e,n,r){const i=this.del.coords;return uv(i[2*t],i[2*t+1],i[2*e],i[2*e+1],i[2*n],i[2*n+1],i[2*r],i[2*r+1])<0}isCollinear(t,e,n){const r=this.del.coords;return 0===Pg(r[2*t],r[2*t+1],r[2*e],r[2*e+1],r[2*n],r[2*n+1])}}function vv(t,e,n,r,i,o,s,a){const l=Pg(t,e,i,o,s,a),c=Pg(n,r,i,o,s,a);if(l>0&&c>0||l<0&&c<0)return!1;const u=Pg(i,o,t,e,n,r),h=Pg(s,a,t,e,n,r);return!(u>0&&h>0||u<0&&h<0)&&(0!==l||0!==c||0!==u||0!==h||!(Math.max(i,s)<Math.min(t,n)||Math.max(t,n)<Math.min(i,s)||Math.max(o,a)<Math.min(e,r)||Math.max(e,r)<Math.min(o,a)))}function mv(t,e,n){if(e||(e=[]),"object"!=typeof t||"FeatureCollection"!==t.type)throw"Argument points must be FeatureCollection";if(!Array.isArray(e))throw"Argument points must be Array of Array";const r=t.features.map((t=>t.geometry.coordinates)),i=ag.from(r);let o;const s=[];0!==i.triangles.length&&0!==e.length&&(o=new gv(i),o.constrainAll(e));for(let t=0;t<i.triangles.length;t+=3)s.push([i.triangles[t],i.triangles[t+1],i.triangles[t+2]]);const a=["a","b","c"];return(0,Kr.uf)(s.map((e=>{const r={},i=e.map(((e,i)=>{const o=t.features[e],s=o.geometry.coordinates,l=[s[0],s[1]];return 3===s.length?l[2]=s[2]:r[a[i]]=o.properties[n],l}));return i[3]=i[0],(0,Kr.yu)([i],r)})))}gv.intersectSegments=vv;const yv=2.00703;class _v{constructor(t={}){this.points=[],t.bounds?this.setBounds(t.bounds):(this.setWh(t.wh),this.vertexMode=t.vertexMode||_v.VERTEX_PLAIN),this.strictMode=t.strictMode||_v.MODE_AUTO,this.yaxisMode=t.yaxisMode||_v.YAXIS_INVERT,this.importance=t.importance||0,this.priority=t.priority||0,this.stateFull=t.stateFull||!1,t.points&&this.setPoints(t.points),t.edges&&this.setEdges(t.edges)}getFormatVersion(){return yv}setPoints(t){this.yaxisMode==_v.YAXIS_FOLLOW&&(t=t.map((t=>[t[0],[t[1][0],-1*t[1][1]]]))),this.points=t,this.tins=void 0,this.indexedTins=void 0}setEdges(t=[]){this.edges=Av(t),this.edgeNodes=void 0,this.tins=void 0,this.indexedTins=void 0}setBounds(t){this.bounds=t;let e=t[0][0],n=e,r=t[0][1],i=r;const o=[t[0]];for(let s=1;s<t.length;s++){const a=t[s];a[0]<e&&(e=a[0]),a[0]>n&&(n=a[0]),a[1]<r&&(r=a[1]),a[1]>i&&(i=a[1]),o.push(a)}o.push(t[0]),this.boundsPolygon=(0,Kr.yu)([o]),this.xy=[e,r],this.wh=[n-e,i-r],this.vertexMode=_v.VERTEX_PLAIN,this.tins=void 0,this.indexedTins=void 0}setCompiled(t){if(t.version||!t.tins&&t.points&&t.tins_points){this.points=t.points,this.pointsWeightBuffer=!t.version||t.version<2.00703?["forw","bakw"].reduce(((e,n)=>{const r=t.weight_buffer[n];return r&&(e[n]=Object.keys(r).reduce(((t,e)=>(t[Iv(e)]=r[e],t)),{})),e}),{}):t.weight_buffer,t.strict_status?this.strict_status=t.strict_status:t.kinks_points?this.strict_status=_v.STATUS_ERROR:2==t.tins_points.length?this.strict_status=_v.STATUS_LOOSE:this.strict_status=_v.STATUS_STRICT,this.vertices_params={forw:[t.vertices_params[0]],bakw:[t.vertices_params[1]]},this.vertices_params.forw[1]=[0,1,2,3].map((e=>{const n=Lv(["c",`b${e}`,`b${(e+1)%4}`],t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!1,yv);return(0,Kr.uf)([n])})),this.vertices_params.bakw[1]=[0,1,2,3].map((e=>{const n=Lv(["c",`b${e}`,`b${(e+1)%4}`],t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!0,yv);return(0,Kr.uf)([n])})),this.centroid={forw:(0,Kr.xm)(t.centroid_point[0],{target:{geom:t.centroid_point[1],index:"c"}}),bakw:(0,Kr.xm)(t.centroid_point[1],{target:{geom:t.centroid_point[0],index:"c"}})},this.edges=Av(t.edges||[]),this.edgeNodes=t.edgeNodes||[];const e=1==t.tins_points.length?0:1;this.tins={forw:(0,Kr.uf)(t.tins_points[0].map((e=>Lv(e,t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!1,t.version)))),bakw:(0,Kr.uf)(t.tins_points[e].map((e=>Lv(e,t.points,t.edgeNodes||[],t.centroid_point,t.vertices_points,!0,t.version))))},this.addIndexedTin(),t.kinks_points&&(this.kinks={bakw:(0,Kr.uf)(t.kinks_points.map((t=>(0,Kr.xm)(t))))}),t.yaxisMode?this.yaxisMode=t.yaxisMode:this.yaxisMode=_v.YAXIS_INVERT,t.vertexMode&&(this.vertexMode=t.vertexMode),t.strictMode&&(this.strictMode=t.strictMode),t.bounds?(this.bounds=t.bounds,this.boundsPolygon=t.boundsPolygon,this.xy=t.xy,this.wh=t.wh):(this.xy=[0,0],t.wh&&(this.wh=t.wh),this.bounds=void 0,this.boundsPolygon=void 0)}else{t=JSON.parse(JSON.stringify(t).replace('"cent"','"c"').replace(/"bbox(\d+)"/g,'"b$1"')),this.tins=t.tins,this.addIndexedTin(),this.strict_status=t.strict_status,this.pointsWeightBuffer=t.weight_buffer,this.vertices_params=t.vertices_params,this.centroid=t.centroid,this.kinks=t.kinks;const e=[];for(let t=0;t<this.tins.forw.features.length;t++){const n=this.tins.forw.features[t];["a","b","c"].map(((t,r)=>{const i=n.geometry.coordinates[0][r],o=n.properties[t].geom,s=n.properties[t].index;e[s]=[i,o]}))}this.points=e}return{tins:this.tins,strict_status:this.strict_status,weight_buffer:this.pointsWeightBuffer,vertices_params:this.vertices_params,centroid:this.centroid,kinks:this.kinks}}getCompiled(){const t={};t.version=yv,t.points=this.points,t.weight_buffer=this.pointsWeightBuffer,t.centroid_point=[this.centroid.forw.geometry.coordinates,this.centroid.forw.properties.target.geom],t.vertices_params=[this.vertices_params.forw[0],this.vertices_params.bakw[0]],t.vertices_points=[];const e=this.vertices_params.forw[1];return[0,1,2,3].map((n=>{const r=e[n].features[0],i=r.geometry.coordinates[0][1],o=r.properties.b.geom;t.vertices_points[n]=[i,o]})),t.strict_status=this.strict_status,t.tins_points=[[]],this.tins.forw.features.map((e=>{t.tins_points[0].push(["a","b","c"].map((t=>e.properties[t].index)))})),this.strict_status==_v.STATUS_LOOSE?(t.tins_points[1]=[],this.tins.bakw.features.map((e=>{t.tins_points[1].push(["a","b","c"].map((t=>e.properties[t].index)))}))):this.strict_status==_v.STATUS_ERROR&&(t.kinks_points=this.kinks.bakw.features.map((t=>t.geometry.coordinates))),t.yaxisMode=this.yaxisMode,t.vertexMode=this.vertexMode,t.strictMode=this.strictMode,this.bounds?(t.bounds=this.bounds,t.boundsPolygon=this.boundsPolygon,t.xy=this.xy,t.wh=this.wh):t.wh=this.wh,t.edges=this.edges,t.edgeNodes=this.edgeNodes,t}addIndexedTin(){const t=this.tins,e=t.forw,n=t.bakw,r=Math.ceil(Math.sqrt(e.features.length));if(r<3)return void(this.indexedTins=void 0);let i=[],o=[];const s=e.features.map((t=>{let e=[];return yf(t)[0].map((t=>{0===i.length?i=[Array.from(t),Array.from(t)]:(t[0]<i[0][0]&&(i[0][0]=t[0]),t[0]>i[1][0]&&(i[1][0]=t[0]),t[1]<i[0][1]&&(i[0][1]=t[1]),t[1]>i[1][1]&&(i[1][1]=t[1])),0===e.length?e=[Array.from(t),Array.from(t)]:(t[0]<e[0][0]&&(e[0][0]=t[0]),t[0]>e[1][0]&&(e[1][0]=t[0]),t[1]<e[0][1]&&(e[0][1]=t[1]),t[1]>e[1][1]&&(e[1][1]=t[1]))})),e})),a=(i[1][0]-i[0][0])/r,l=(i[1][1]-i[0][1])/r,c=s.reduce(((t,e,n)=>{const o=kv(e[0][0],i[0][0],a,r),s=kv(e[1][0],i[0][0],a,r),c=kv(e[0][1],i[0][1],l,r),u=kv(e[1][1],i[0][1],l,r);for(let e=o;e<=s;e++){t[e]||(t[e]=[]);for(let r=c;r<=u;r++)t[e][r]||(t[e][r]=[]),t[e][r].push(n)}return t}),[]),u=n.features.map((t=>{let e=[];return yf(t)[0].map((t=>{0===o.length?o=[Array.from(t),Array.from(t)]:(t[0]<o[0][0]&&(o[0][0]=t[0]),t[0]>o[1][0]&&(o[1][0]=t[0]),t[1]<o[0][1]&&(o[0][1]=t[1]),t[1]>o[1][1]&&(o[1][1]=t[1])),0===e.length?e=[Array.from(t),Array.from(t)]:(t[0]<e[0][0]&&(e[0][0]=t[0]),t[0]>e[1][0]&&(e[1][0]=t[0]),t[1]<e[0][1]&&(e[0][1]=t[1]),t[1]>e[1][1]&&(e[1][1]=t[1]))})),e})),h=(o[1][0]-o[0][0])/r,p=(o[1][1]-o[0][1])/r,f=u.reduce(((t,e,n)=>{const i=kv(e[0][0],o[0][0],h,r),s=kv(e[1][0],o[0][0],h,r),a=kv(e[0][1],o[0][1],p,r),l=kv(e[1][1],o[0][1],p,r);for(let e=i;e<=s;e++){t[e]||(t[e]=[]);for(let r=a;r<=l;r++)t[e][r]||(t[e][r]=[]),t[e][r].push(n)}return t}),[]);this.indexedTins={forw:{gridNum:r,xOrigin:i[0][0],yOrigin:i[0][1],xUnit:a,yUnit:l,gridCache:c},bakw:{gridNum:r,xOrigin:o[0][0],yOrigin:o[0][1],xUnit:h,yUnit:p,gridCache:f}}}setWh(t){this.wh=t,this.xy=[0,0],this.bounds=void 0,this.boundsPolygon=void 0,this.tins=void 0,this.indexedTins=void 0}setVertexMode(t){this.vertexMode=t,this.tins=void 0,this.indexedTins=void 0}setStrictMode(t){this.strictMode=t,this.tins=void 0,this.indexedTins=void 0}calcurateStrictTinAsync(){const t=this.pointsSet.edges;return Promise.all(this.tins.forw.features.map((t=>Promise.resolve(Pv(t))))).then((t=>{this.tins.bakw=(0,Kr.uf)(t)})).then((()=>{const t={};return Promise.all(this.tins.forw.features.map(((e,n)=>{const r=this.tins.bakw.features[n];return Promise.resolve(Dv(t,{forw:e,bakw:r}))}))).then((()=>Promise.all([Rv(t),Promise.resolve(t)]))).catch((t=>{throw t}))})).then((e=>{const n=e[0],r=e[1];return n.bakw&&Object.keys(n.bakw).map((e=>{if("Not include case"==n.bakw[e])return;const i=r[e],o=Ed(i[0].forw,i[1].forw),s=pd((0,Kr.uf)([i[0].forw,i[1].forw]));if(md(s,o))return;const a=e.split("-");if(a[0].match(/^[0-9]+$/)&&a[1].match(/^[0-9]+$/)){const e=a.map((t=>parseInt(t))).sort(((t,e)=>t<e?-1:1));for(let n=0;n<t.length-1;n++)if(e[0]==t[n][0]&&e[1]==t[n][1])return}const l=a.map((t=>["a","b","c"].map(((t,e)=>{const n=i[0].bakw.properties[t];return{geom:i[0].bakw.geometry.coordinates[0][e],prop:n}})).filter((e=>e.prop.index==t))[0])),c=i.map((t=>["a","b","c"].map(((e,n)=>{const r=t.bakw.properties[e];return{geom:t.bakw.geometry.coordinates[0][n],prop:r}})).filter((t=>t.prop.index!=l[0].prop.index&&t.prop.index!=l[1].prop.index))[0]));jv(r,i[0],this.tins),jv(r,i[1],this.tins),l.map((t=>{const e=[t.geom,c[0].geom,c[1].geom,t.geom],n={a:t.prop,b:c[0].prop,c:c[1].prop},i=(0,Kr.yu)([e],n),o=Pv(i);Dv(r,{forw:o,bakw:i},this.tins)}))})),Promise.all(["forw","bakw"].map((t=>new Promise((e=>{e(function(t){return Xd(new Cd(t).findSegmentIntersections()).reduce(((t,e,n,r)=>(t||(t={}),t[`${e.x}:${e.y}`]=e,n!=r.length-1?t:Object.keys(t).map((e=>(0,Kr.xm)([t[e].x,t[e].y]))))),[])}(this.tins[t].features.map((t=>t.geometry.coordinates[0]))))})).catch((t=>{throw t}))))).then((t=>{0==t[0].length&&0==t[1].length?(this.strict_status=_v.STATUS_STRICT,delete this.kinks):(this.strict_status=_v.STATUS_ERROR,this.kinks={},t[0].length>0&&(this.kinks.forw=(0,Kr.uf)(t[0])),t[1].length>0&&(this.kinks.bakw=(0,Kr.uf)(t[1])))})).catch((t=>{throw t}))})).catch((t=>{throw t}))}generatePointsSet(){const t={forw:[],bakw:[]};for(let e=0;e<this.points.length;e++){const n=Sv(this.points[e][0],this.points[e][1],e);t.forw.push(n),t.bakw.push(Ev(n))}const e=[];let n=0;this.edgeNodes=[],this.edges||(this.edges=[]);for(let r=0;r<this.edges.length;r++){const i=this.edges[r][2],o=Object.assign([],this.edges[r][0]),s=Object.assign([],this.edges[r][1]);if(0===o.length&&0===s.length){e.push(i);continue}o.unshift(this.points[i[0]][0]),o.push(this.points[i[1]][0]),s.unshift(this.points[i[0]][1]),s.push(this.points[i[1]][1]);const a=[o,s].map((t=>{const e=t.map(((t,e,n)=>{if(0===e)return 0;const r=n[e-1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))})),n=e.reduce(((t,e,n)=>0===n?[0]:(t.push(t[n-1]+e),t)),[]);return n.map(((r,i,o)=>{const s=r/o[o.length-1];return[t[i],e[i],n[i],s]}))}));a.map(((t,e)=>{const n=a[e?0:1];return t.filter(((e,n)=>!(0===n||n===t.length-1||"handled"===e[4]))).map((t=>{const r=t[0],i=t[3],o=n.reduce(((t,e,n,r)=>{if(t)return t;const o=r[n+1];return e[3]===i?(e[4]="handled",[e]):e[3]<i&&o[3]>i?[e,o]:void 0}),void 0);if(1===o.length)return 0===e?[r,o[0][0],i]:[o[0][0],r,i];{const t=o[0],n=o[1],s=(i-t[3])/(n[3]-t[3]),a=[(n[0][0]-t[0][0])*s+t[0][0],(n[0][1]-t[0][1])*s+t[0][1]];return 0===e?[r,a,i]:[a,r,i]}}))})).reduce(((t,e)=>t.concat(e)),[]).sort(((t,e)=>t[2]<e[2]?-1:1)).map(((r,o,s)=>{this.edgeNodes[n]=[r[0],r[1]];const a=Sv(r[0],r[1],`e${n}`);n++,t.forw.push(a),t.bakw.push(Ev(a)),0===o?e.push([i[0],t.forw.length-1]):e.push([t.forw.length-2,t.forw.length-1]),o===s.length-1&&e.push([t.forw.length-1,i[1]])}))}return{forw:(0,Kr.uf)(t.forw),bakw:(0,Kr.uf)(t.bakw),edges:e}}updateTinAsync(){let t=this.strictMode;const e=this.xy[0]-.05*this.wh[0],n=this.xy[0]+1.05*this.wh[0],r=this.xy[1]-.05*this.wh[1],i=this.xy[1]+1.05*this.wh[1],o=this.bounds?t=>sd(t,this.boundsPolygon):t=>t[0]>=this.xy[0]&&t[0]<=this.xy[0]+this.wh[0]&&t[1]>=this.xy[1]&&t[1]<=this.xy[1]+this.wh[1],s=this.points.reduce(((t,e)=>t&&o(e[0])),!0);return s?new Promise((o=>{t!=_v.MODE_STRICT&&t!=_v.MODE_LOOSE&&(t=_v.MODE_AUTO);let s=[];this.wh&&(s=[[e,r],[n,r],[e,i],[n,i]]);o([this.generatePointsSet(),s])})).then((t=>{const e=t[0];return Promise.all([new Promise((t=>{t(mv(e.forw,e.edges,"target"))})),new Promise((t=>{t(mv(e.bakw,e.edges,"target"))})),new Promise((t=>{t(ei(e.forw))})),Promise.resolve(t)]).catch((t=>{throw t}))})).then((t=>{const e=t[0],n=t[1],r=t[2],i=t[3],o=i[0];if(0==e.features.length||0==n.features.length)throw"TOO LINEAR1";const s={forw:r.geometry.coordinates,bakw:Mv(r,e)},a=Sv(s.forw,s.bakw,"c");this.centroid={forw:a,bakw:Ev(a)};const l={};return Promise.all([new Promise((t=>{const n=pd(o.forw).geometry.coordinates[0];let r;try{r=n.map((t=>({forw:t,bakw:Mv((0,Kr.xm)(t),e)})))}catch(t){throw"TOO LINEAR2"}r.map((t=>{l[`${t.forw[0]}:${t.forw[1]}`]=t})),t(void 0)})),new Promise((t=>{const e=pd(o.bakw).geometry.coordinates[0];let r;try{r=e.map((t=>({bakw:t,forw:Mv((0,Kr.xm)(t),n)})))}catch(t){throw"TOO LINEAR2"}r.map((t=>{l[`${t.forw[0]}:${t.forw[1]}`]=t})),t(void 0)}))]).then((()=>[s,l,i])).catch((t=>{throw t}))})).then((t=>{const o=t[0],s=t[1],a=t[2],l=Object.keys(s).reduce(((t,a,l,c)=>{const u=s[a].forw,h=s[a].bakw,p={forw:[u[0]-o.forw[0],u[1]-o.forw[1]]};p.bakw=[h[0]-o.bakw[0],h[1]-o.bakw[1]];const f=0==p.forw[0]?1/0:((p.forw[0]<0?e:n)-o.forw[0])/p.forw[0],d=0==p.forw[1]?1/0:((p.forw[1]<0?r:i)-o.forw[1])/p.forw[1];if(Math.abs(f)/Math.abs(d)<1.1){const e={forw:[p.forw[0]*f+o.forw[0],p.forw[1]*f+o.forw[1]],bakw:[p.bakw[0]*f+o.bakw[0],p.bakw[1]*f+o.bakw[1]]};p.forw[0]<0?t[3].push(e):t[1].push(e)}if(Math.abs(d)/Math.abs(f)<1.1){const e={forw:[p.forw[0]*d+o.forw[0],p.forw[1]*d+o.forw[1]],bakw:[p.bakw[0]*d+o.bakw[0],p.bakw[1]*d+o.bakw[1]]};p.forw[1]<0?t[0].push(e):t[2].push(e)}return t}),[[],[],[],[]]);let c=Object.keys(s).reduce(((t,e,n,r)=>{const i=s[e].forw,a=s[e].bakw,l={forw:[i[0]-o.forw[0],i[1]-o.forw[1]]};if(l.bakw=[a[0]-o.bakw[0],o.bakw[1]-a[1]],0==l.forw[0]||0==l.forw[1])return t;let c=0;return l.forw[0]>0&&(c+=1),l.forw[1]>0&&(c+=2),t[c].push([l.forw,l.bakw]),n==r.length-1?t.length==t.filter((t=>t.length>0)).length&&this.vertexMode==_v.VERTEX_BIRDEYE?t:t.reduce(((t,e)=>[t[0].concat(e)]),[[]]):t}),[[],[],[],[]]).map((t=>t.reduce(((t,e,n,r)=>{t||(t=[1/0,0,0]);let i=Math.sqrt(Math.pow(e[0][0],2)+Math.pow(e[0][1],2))/Math.sqrt(Math.pow(e[1][0],2)+Math.pow(e[1][1],2));i=i<t[0]?i:t[0];const o=Math.atan2(e[0][0],e[0][1])-Math.atan2(e[1][0],e[1][1]),s=t[1]+Math.cos(o),a=t[2]+Math.sin(o);return n==r.length-1?[i,Math.atan2(a,s)]:[i,s,a]}),null)));return 1==c.length&&(c=[c[0],c[0],c[0],c[0]]),[c,o,l,a]})).then((t=>{const e=t[0],n=t[1],r=t[2],i=t[3][0],o=t[3][1];let s=e.map(((t,e)=>{const r=o[e],i=[r[0]-n.forw[0],r[1]-n.forw[1]],s=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2))/t[0],a=Math.atan2(i[0],i[1])-t[1];return{forw:r,bakw:[n.bakw[0]+s*Math.sin(a),n.bakw[1]-s*Math.cos(a)]}}));const a=s[2];s[2]=s[3],s[3]=a;const l=[1,1,1,1];for(let t=0;t<4;t++){const e=(t+1)%4,i=(0,Kr.Tu)([s[t].bakw,s[e].bakw]);r[t].map((r=>{const o=(0,Kr.Tu)([n.bakw,r.bakw]),s=Df(i,o);if(s.features.length>0&&s.features[0].geometry){const i=s.features[0],o=Math.sqrt(Math.pow(r.bakw[0]-n.bakw[0],2)+Math.pow(r.bakw[1]-n.bakw[1],2))/Math.sqrt(Math.pow(i.geometry.coordinates[0]-n.bakw[0],2)+Math.pow(i.geometry.coordinates[1]-n.bakw[1],2));o>l[t]&&(l[t]=o),o>l[e]&&(l[e]=o)}}))}return s=s.map(((t,e)=>{const r=l[e],i=[(t.bakw[0]-n.bakw[0])*r+n.bakw[0],(t.bakw[1]-n.bakw[1])*r+n.bakw[1]];return{forw:t.forw,bakw:i}})),[s,i]})).then((e=>{const n=e[0],r=e[1],i={forw:[],bakw:[]};for(let t=0;t<n.length;t++){const e=Sv(n[t].forw,n[t].bakw,`b${t}`),o=Ev(e);r.forw.features.push(e),r.bakw.features.push(o),i.forw.push(e),i.bakw.push(o)}let o;return this.pointsSet=r,this.tins={forw:bv(mv(r.forw,r.edges,"target"))},o=t==_v.MODE_STRICT||t==_v.MODE_AUTO?this.calcurateStrictTinAsync():Promise.resolve(),o.then((()=>((t==_v.MODE_LOOSE||t==_v.MODE_AUTO&&this.strict_status==_v.STATUS_ERROR)&&(this.tins.bakw=bv(mv(r.bakw,r.edges,"target")),delete this.kinks,this.strict_status=_v.STATUS_LOOSE),this.vertices_params={forw:wv(i.forw,this.centroid.forw),bakw:wv(i.bakw,this.centroid.bakw)},this.addIndexedTin(),this.calculatePointsWeightAsync()))).catch((t=>{throw t}))})).catch((t=>{throw t})):new Promise(((t,e)=>{e("SOME POINTS OUTSIDE")}))}transform(t,e,n){if(e&&this.strict_status==_v.STATUS_ERROR)throw'Backward transform is not allowed if strict_status == "strict_error"';this.yaxisMode==_v.YAXIS_FOLLOW&&e&&(t=[t[0],-1*t[1]]);const r=(0,Kr.xm)(t);if(this.bounds&&!e&&!n&&!sd(r,this.boundsPolygon))return!1;const i=e?this.tins.bakw:this.tins.forw,o=e?this.indexedTins.bakw:this.indexedTins.forw,s=e?this.vertices_params.bakw:this.vertices_params.forw,a=e?this.centroid.bakw:this.centroid.forw,l=e?this.pointsWeightBuffer.bakw:this.pointsWeightBuffer.forw;let c,u;this.stateFull&&(this.stateBackward==e?c=this.stateTriangle:(this.stateBackward=e,this.stateTriangle=void 0),u=t=>{this.stateTriangle=t});let h=Mv(r,i,o,s,a,l,c,u);if(this.bounds&&e&&!n){if(!sd((0,Kr.xm)(h),this.boundsPolygon))return!1}else this.yaxisMode!=_v.YAXIS_FOLLOW||e||(h=[h[0],-1*h[1]]);return h}calculatePointsWeightAsync(){const t=["forw"];this.strict_status==_v.STATUS_LOOSE&&t.push("bakw");const e={};return Promise.all(t.map((t=>{e[t]={};const n={},r=this.tins[t];return Promise.all(r.features.map((r=>{const i=["a","b","c"];return new Promise((o=>{for(let o=0;o<3;o++){const s=(o+1)%3,a=i[o],l=i[s],c=r.properties[a].index,u=r.properties[l].index,h=[c,u].sort().join("-");if(!n[h]){const i=r.geometry.coordinates[0][o],p=r.geometry.coordinates[0][s],f=r.properties[a].geom,d=r.properties[l].geom;n[h]=1;const g=Math.sqrt(Math.pow(f[0]-d[0],2)+Math.pow(f[1]-d[1],2))/Math.sqrt(Math.pow(i[0]-p[0],2)+Math.pow(i[1]-p[1],2));e[t][c]||(e[t][c]={}),e[t][u]||(e[t][u]={}),e[t][c][h]=g,e[t][u][h]=g}}o(void 0)}))}))).catch((t=>{throw t}))}))).then((()=>{const n={};t.map((t=>{n[t]={},this.strict_status==_v.STATUS_STRICT&&(n.bakw={}),Object.keys(e[t]).map((r=>{n[t][r]=Object.keys(e[t][r]).reduce(((n,i,o,s)=>(n+=e[t][r][i],o==s.length-1?n/s.length:n)),0),this.strict_status==_v.STATUS_STRICT&&(n.bakw[r]=1/n[t][r])})),n[t].c=[0,1,2,3].reduce(((e,r)=>{const i=`b${r}`;return e+=n[t][i],3==r?e/4:e}),0),this.strict_status==_v.STATUS_STRICT&&(n.bakw.c=1/n[t].c)})),this.pointsWeightBuffer=n})).catch((t=>{throw t}))}}function bv(t){const e=t.features;for(let t=0;t<e.length;t++){const n=e[t];"b"===`${n.properties.a.index}`.substring(0,1)&&"b"===`${n.properties.b.index}`.substring(0,1)?e[t]={geometry:{type:"Polygon",coordinates:[[n.geometry.coordinates[0][2],n.geometry.coordinates[0][0],n.geometry.coordinates[0][1],n.geometry.coordinates[0][2]]]},properties:{a:{geom:n.properties.c.geom,index:n.properties.c.index},b:{geom:n.properties.a.geom,index:n.properties.a.index},c:{geom:n.properties.b.geom,index:n.properties.b.index}},type:"Feature"}:"b"===`${n.properties.c.index}`.substring(0,1)&&"b"===`${n.properties.a.index}`.substring(0,1)&&(e[t]={geometry:{type:"Polygon",coordinates:[[n.geometry.coordinates[0][1],n.geometry.coordinates[0][2],n.geometry.coordinates[0][0],n.geometry.coordinates[0][1]]]},properties:{a:{geom:n.properties.b.geom,index:n.properties.b.index},b:{geom:n.properties.c.geom,index:n.properties.c.index},c:{geom:n.properties.a.geom,index:n.properties.a.index}},type:"Feature"})}return t}function wv(t,e){const n=e.geometry.coordinates;return[0,1,2,3].map((r=>{const i=(r+1)%4,o=t[r],s=t[i],a=o.geometry.coordinates,l=Math.atan2(a[0]-n[0],a[1]-n[1]),c=[e,o,s,e].map((t=>t.geometry.coordinates)),u={a:{geom:e.properties.target.geom,index:e.properties.target.index},b:{geom:o.properties.target.geom,index:o.properties.target.index},c:{geom:s.properties.target.geom,index:s.properties.target.index}};return[l,(0,Kr.uf)([(0,Kr.yu)([c],u)])]})).reduce(((t,e)=>(t[0].push(e[0]),t[1].push(e[1]),t)),[[],[]])}function xv(t,e=!1){const n=e?function(t){return!(t>=0&&t<2*Math.PI)}:function(t){return!(t>-1*Math.PI&&t<=Math.PI)};for(;n(t);)t+=2*Math.PI*(t>0?-1:1);return t}function Sv(t,e,n){return(0,Kr.xm)(t,{target:{geom:e,index:n}})}function Ev(t){return(0,Kr.xm)(t.properties.target.geom,{target:{geom:t.geometry.coordinates,index:t.properties.target.index}})}function Cv(t,e,n){const r=e.geometry.coordinates[0][0],i=e.geometry.coordinates[0][1],o=e.geometry.coordinates[0][2],s=t.geometry.coordinates,a=e.properties.a.geom,l=e.properties.b.geom,c=e.properties.c.geom,u=[i[0]-r[0],i[1]-r[1]],h=[o[0]-r[0],o[1]-r[1]],p=[s[0]-r[0],s[1]-r[1]],f=[l[0]-a[0],l[1]-a[1]],d=[c[0]-a[0],c[1]-a[1]];let g=(h[1]*p[0]-h[0]*p[1])/(u[0]*h[1]-u[1]*h[0]),v=(u[0]*p[1]-u[1]*p[0])/(u[0]*h[1]-u[1]*h[0]);if(n){const t=n[e.properties.a.index],r=n[e.properties.b.index],i=n[e.properties.c.index];let o;if(g<0||v<0||1-g-v<0){const t=g/(g+v),e=v/(g+v);o=g/r/(t/r+e/i),v=v/i/(t/r+e/i)}else o=g/r/(g/r+v/i+(1-g-v)/t),v=v/i/(g/r+v/i+(1-g-v)/t);g=o}return[g*f[0]+v*d[0]+a[0],g*f[1]+v*d[1]+a[1]]}function Tv(t,e,n,r){const i=t.geometry.coordinates,o=n.geometry.coordinates,s=function(t,e){let n,r=xv(t-e[0]),i=2*Math.PI;for(let o=0;o<e.length;o++){const s=xv(t-e[(o+1)%e.length]),a=Math.min(Math.abs(r),Math.abs(s));r*s<=0&&a<i&&(i=a,n=o),r=s}return n}(Math.atan2(i[0]-o[0],i[1]-o[1]),e[0]);return Cv(t,e[1][s].features[0],r)}function Ov(t,e){for(let n=0;n<e.features.length;n++){if(sd(t,e.features[n]))return e.features[n]}}function kv(t,e,n,r){let i=Math.floor((t-e)/n);return i>=r&&(i=r-1),i}function Mv(t,e,n,r,i,o,s,a){let l;if(s&&(l=Ov(t,(0,Kr.uf)([s]))),!l){if(n){const r=t.geometry.coordinates,i=n.gridNum,o=n.xOrigin,s=n.yOrigin,a=n.xUnit,l=n.yUnit,c=n.gridCache,u=kv(r[0],o,a,i),h=kv(r[1],s,l,i),p=c[u]&&c[u][h]?c[u][h]:[];e=(0,Kr.uf)(p.map((t=>e.features[t])))}l=Ov(t,e)}return a&&a(l),l?Cv(t,l,o):Tv(t,r,i,o)}function Pv(t){const e=["a","b","c","a"].map((e=>t.properties[e].geom)),n=t.geometry.coordinates[0],r=t.properties,i={a:{geom:n[0],index:r.a.index},b:{geom:n[1],index:r.b.index},c:{geom:n[2],index:r.c.index}};return(0,Kr.yu)([e],i)}function Lv(t,e,n,r,i,o=!1,s){const a=t.map((t=>{(!s||s<2.00703)&&(t=Iv(t));const a=isFinite(t)?e[t]:"c"===t?r:"b0"===t?i[0]:"b1"===t?i[1]:"b2"===t?i[2]:"b3"===t?i[3]:function(){const e=t.match(/e(\d+)/);if(e){const t=parseInt(e[1]);return n[t]}throw"Bad index value for indexesToTri"}();return o?[[a[1],a[0]],t]:[[a[0],a[1]],t]}));return function(t){const e=[0,1,2,0].map((e=>t[e][0][0])),n={a:{geom:t[0][0][1],index:t[0][1]},b:{geom:t[1][0][1],index:t[1][1]},c:{geom:t[2][0][1],index:t[2][1]}};return(0,Kr.yu)([e],n)}(a)}function Iv(t){return"number"==typeof t?t:t.replace(/^(c|e|b)(?:ent|dgeNode|box)(\d+)?$/,"$1$2")}function Av(t,e){return e&&e>=2.00703||Array.isArray(t[0])?t:t.map((t=>[t.illstNodes,t.mercNodes,t.startEnd]))}function Rv(t){const e={forw:{},bakw:{}};return Promise.all(Object.keys(t).map((e=>new Promise((n=>{const r=t[e];if(r.length<2)return n(void 0);["forw","bakw"].map((t=>{const e=function(t,e,n){void 0===n&&(n={});var r=_f(t),i=_f(e),o=fd.intersection(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?_d(o[0],n.properties):bd(o,n.properties)}(r[0][t],r[1][t]);if(!e||"Point"==e.geometry.type||"LineString"==e.geometry.type)return n(void 0);n(void 0)}))}))))).then((()=>(0==Object.keys(e.forw).length&&delete e.forw,0==Object.keys(e.bakw).length&&delete e.bakw,e))).catch((t=>{throw t}))}function Dv(t,e,n){const r=Fv(e.forw),i=Fv(e.bakw);if(JSON.stringify(r)!=JSON.stringify(i))throw`${JSON.stringify(e,null,2)}\n${JSON.stringify(r)}\n${JSON.stringify(i)}`;for(let n=0;n<r.length;n++){const i=r[n];t[i]||(t[i]=[]),t[i].push(e)}n&&(n.forw.features.push(e.forw),n.bakw.features.push(e.bakw))}function jv(t,e,n){const r=Fv(e.forw),i=Fv(e.bakw);if(JSON.stringify(r)!=JSON.stringify(i))throw`${JSON.stringify(e,null,2)}\n${JSON.stringify(r)}\n${JSON.stringify(i)}`;for(let n=0;n<r.length;n++){const i=r[n],o=t[i].filter((t=>t.forw!=e.forw));0==o.length?delete t[i]:t[i]=o}if(n){let t=n.forw.features.filter((t=>t!=e.forw));n.forw.features=t,t=n.bakw.features.filter((t=>t!=e.bakw)),n.bakw.features=t}}function Fv(t){const e=["a","b","c"].map((e=>t.properties[e].index));return[[0,1],[0,2],[1,2],[0,1,2]].map((t=>t.map((t=>e[t])).sort().join("-"))).sort()}_v.VERTEX_PLAIN="plain",_v.VERTEX_BIRDEYE="birdeye",_v.MODE_STRICT="strict",_v.MODE_AUTO="auto",_v.MODE_LOOSE="loose",_v.STATUS_STRICT="strict",_v.STATUS_ERROR="strict_error",_v.STATUS_LOOSE="loose",_v.YAXIS_FOLLOW="follow",_v.YAXIS_INVERT="invert",n.g.Tin=_v;const Nv=["title","attr","officialTitle","dataAttr","author","createdAt","era","license","dataLicense","contributor","mapper","reference","description","url","lang","imageExtension","homePosition","mercZoom"];async function Bv(t,e,n){const r=n?t:{},i=[];if(Nv.forEach((e=>{r[e]=t[e]})),t.imageExtention&&(r.imageExtension=t.imageExtention),t.compiled){const n={};t.compiled.wh||(n.wh=[t.width,t.height]),t.compiled.strictMode||(n.strictMode=t.strictMode),t.compiled.vertexMode||(n.vertexMode=t.vertexMode),t.compiled.yaxisMode||(n.yaxisMode=t.yaxisMode);let o=new _v(n);o.setCompiled(t.compiled),e&&(o=o.getCompiled()),r.strictMode=o.strictMode,r.vertexMode=o.vertexMode,r.yaxisMode=o.yaxisMode,r.width=o.wh[0],r.height=o.wh[1],r.gcps=o.points,r.edges=o.edges,i.push(o)}else{r.strictMode=t.strictMode,r.vertexMode=t.vertexMode,r.yaxisMode=t.yaxisMode,r.width=t.width,r.height=t.height,r.gcps=t.gcps,r.edges=t.edges;let n=await zv(t.strictMode,t.vertexMode,t.yaxisMode,t.gcps,t.edges,[t.width,t.height]);e&&"string"!=typeof n&&(n=n.getCompiled()),i.push(n)}if(t.sub_maps){const n=[];for(let r=0;r<t.sub_maps.length;r++){const o=t.sub_maps[r],s={};if(s.importance=o.importance,s.priority=o.priority,o.compiled){const n={};o.compiled.strictMode||(n.strictMode=t.strictMode),o.compiled.vertexMode||(n.vertexMode=t.vertexMode),o.compiled.yaxisMode||(n.yaxisMode=t.yaxisMode);let r=new _v(n);r.setCompiled(o.compiled),e&&(r=r.getCompiled()),s.bounds=r.bounds,s.gcps=r.points,s.edges=r.edges,i.push(r)}else{s.bounds=o.bounds,s.gcps=o.gcps,s.edges=o.edges;let n=await zv(t.strictMode,t.vertexMode,t.yaxisMode,o.gcps,o.edges,void 0,o.bounds);e&&"string"!=typeof n&&(n=n.getCompiled()),i.push(n)}n.push(s)}r.sub_maps=n}return[r,i]}async function zv(t,e,n,r=[],i=[],o,s){if(r.length<3)return"tooLessGcps";const a=new _v({yaxisMode:n});if(o)a.setWh(o);else{if(!s)throw"Both wh and bounds are missing";a.setBounds(s)}a.setStrictMode(t),a.setVertexMode(e),a.setPoints(r),a.setEdges(i);try{return await a.updateTinAsync(),a}catch(t){if(console.log(t),"SOME POINTS OUTSIDE"==t)return"pointsOutside";if(0==t.indexOf("TOO LINEAR"))return"tooLinear";if(t.indexOf("Vertex indices of edge")>-1||t.indexOf("is degenerate!")>-1||t.indexOf("already exists or intersects with an existing edge!")>-1)return"edgeError";throw t}}class Gv extends Jf{constructor(t={}){super(t),this.tins=[]}static async createAsync(t){const e=await async function(t){return Bv(t,!1,!0)}(t);t=e[0];const n=new Gv(t);n.tins=e[1];const r=new qe({code:`Illst:${n.mapID}`,extent:[0,0,n.width,n.height],units:"m"});return mr(r),Sr(r,"EPSG:3857",(t=>n.tins[0].transform(t,!1)),(t=>n.tins[0].transform(t,!0))),od("EPSG:4326",r),t.sub_maps&&t.sub_maps.map(((t,e)=>{const r=e+1,i=`Illst:${n.mapID}#${r}`,o=n.tins[r],s=new qe({code:i,extent:[o.xy[0],o.xy[1],o.wh[0],o.wh[1]],units:"m"});mr(s),Sr(s,"EPSG:3857",(t=>o.transform(t,!1,!0)),(t=>o.transform(t,!0,!0))),od("EPSG:4326",s);const a=Object.assign([],t.bounds);a.push(t.bounds[0]);const l=a.map((t=>o.transform(t,!1))),c=(0,Kr.yu)([a]),u=(0,Kr.yu)([l]);o.xyBounds=c,o.mercBounds=u})),n}xy2MercAsync_specifyLayer(t,e){const n=`Illst:${this.mapID}${e?`#${e}`:""}`;return new Promise(((e,r)=>{e(od(n,"EPSG:3857",t))}))}merc2XyAsync_specifyLayer(t,e){const n=`Illst:${this.mapID}${e?`#${e}`:""}`;return new Promise(((e,r)=>{e(od("EPSG:3857",n,t))}))}xy2MercAsync_returnLayer(t){return new Promise(((e,n)=>{const r=this.tins.map(((t,e)=>[e,t])).sort(((t,e)=>t[1].priority<e[1].priority?1:-1));for(let i=0;i<r.length;i++){const o=r[i][0],s=r[i][1];if(0==o||bf(t,s.xyBounds)){this.xy2MercAsync_specifyLayer(t,o).then((t=>{e([o,t])})).catch((t=>{n(t)}));break}}}))}merc2XyAsync_returnLayer(t){return Promise.all(this.tins.map(((e,n)=>new Promise(((r,i)=>{this.merc2XyAsync_specifyLayer(t,n).then((t=>{0===n||bf(t,e.xyBounds)?r([e,n,t]):r([e,n])})).catch((t=>{i(t)}))}))))).then((t=>t.sort(((t,e)=>t[0].priority<e[0].priority?1:-1)).reduce(((t,e,n,r)=>{const i=e[0],o=e[1],s=e[2];if(!s)return t;for(let e=0;e<n;e++){const n=r[e][0];if(0===r[e][1]||bf(s,n.xyBounds)){if(t.length){const e=!t[0],n=e?t[1][2]:t[0][2];return!e||i.importance<n.importance?t:[void 0,[o,s,i]]}return[void 0,[o,s,i]]}}return t.length&&t[0]?(t.push([o,s,i]),t.sort(((t,e)=>t[2].importance<e[2].importance?1:-1)).filter(((t,e)=>e<2))):[[o,s,i]]}),[]).map((t=>{if(t)return[t[0],t[1]]}))))}setupMapParameter(t){const e=[this.width/2,this.height/2];this.xy2MercAsync_returnLayer(e).then((n=>{const r=n[0],i=n[1],o=[[e[0]-150,e[1]],[e[0]+150,e[1]],[e[0],e[1]-150],[e[0],e[1]+150]],s=[[0,0],[this.width,0],[this.width,this.height],[0,this.height]],a=[];for(let t=0;t<9;t++){const e=t<4?this.xy2MercAsync_specifyLayer(o[t],r):4==t?Promise.resolve(i):this.xy2MercAsync_specifyLayer(s[t-5],0);a.push(e)}Promise.all(a).then((e=>{const n=(Math.sqrt(Math.pow(e[0][0]-e[1][0],2)+Math.pow(e[0][1]-e[1][1],2))+Math.sqrt(Math.pow(e[2][0]-e[3][0],2)+Math.pow(e[2][1]-e[3][1],2)))/2;this.mercZoom||(this.mercZoom=Math.log(46962910.17841229/n)/Math.log(2)-3),this.homePosition||(this.homePosition=Er(e[4])),this.envelope=(0,Kr.yu)([[e[5],e[6],e[7],e[8],e[5]]]),t(this)})).catch((t=>{throw t}))})).catch((t=>{throw t}))}mercs2SysCoordsAsync_multiLayer(t){const e=this.merc2XyAsync_returnLayer(t[0][0]).then((e=>{let n=!1;return Promise.all(e.map(((e,r)=>{if(!e)return void(n=!0);const i=e[0],o=e[1];return 0===r||n?Promise.all(t[0].map(((t,e)=>0===e?Promise.resolve(o):this.merc2XyAsync_specifyLayer(t,i)))):Promise.resolve([o])})))}));return e.then((e=>e.map((e=>{if(e)return[e.map((t=>this.xy2SysCoord(t))),t[1]]}))))}merc2XyAsync_base(t,e){return this.merc2XyAsync_returnLayer(t).then((t=>{if(!e||t[0])return t[0]?t[0][1]:t[1][1]}))}merc2XyAsync_ignoreBackground(t){return this.merc2XyAsync_base(t,!0)}merc2XyAsync(t){return this.merc2XyAsync_base(t,!1)}xy2MercAsync(t){return this.xy2MercAsync_returnLayer(t).then((t=>t[1]))}viewpoint2MercsAsync(t,e){const n=this.viewpoint2SysCoords(t,e),r=this.sysCoords2Xys(n);return this.xy2MercAsync_returnLayer(r[0][0]).then((t=>{const n=t[0],i=t[1],o=r[0].map(((t,e)=>0===e?Promise.resolve(i):this.xy2MercAsync_specifyLayer(t,n)));return Promise.all(o).then((t=>[t,e]))}))}mercs2ViewpointAsync(t){const e=this.merc2XyAsync_returnLayer(t[0][0]).then((e=>{const n=e[0]||e[1],r=n[0],i=n[1];return Promise.all(t[0].map(((t,e)=>0===e?i:this.merc2XyAsync_specifyLayer(t,r))))}));return e.then((e=>{const n=this.xys2SysCoords([e,t[1]]);return this.sysCoords2Viewpoint(n)}))}}var Xv="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n.g&&n.g||{},Uv="URLSearchParams"in Xv,Hv="Symbol"in Xv&&"iterator"in Symbol,qv="FileReader"in Xv&&"Blob"in Xv&&function(){try{return new Blob,!0}catch(t){return!1}}(),Zv="FormData"in Xv,Wv="ArrayBuffer"in Xv;if(Wv)var Vv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Yv=ArrayBuffer.isView||function(t){return t&&Vv.indexOf(Object.prototype.toString.call(t))>-1};function Kv(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function $v(t){return"string"!=typeof t&&(t=String(t)),t}function Jv(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return Hv&&(e[Symbol.iterator]=function(){return e}),e}function Qv(t){this.map={},t instanceof Qv?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function tm(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function em(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function nm(t){var e=new FileReader,n=em(e);return e.readAsArrayBuffer(t),n}function rm(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function im(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:qv&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Zv&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:Uv&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():Wv&&qv&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=rm(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Wv&&(ArrayBuffer.prototype.isPrototypeOf(t)||Yv(t))?this._bodyArrayBuffer=rm(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Uv&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},qv&&(this.blob=function(){var t=tm(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=tm(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(qv)return this.blob().then(nm);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,n,r,i,o=tm(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=em(e),r=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=r?r[1]:"utf-8",e.readAsText(t,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Zv&&(this.formData=function(){return this.text().then(am)}),this.json=function(){return this.text().then(JSON.parse)},this}Qv.prototype.append=function(t,e){t=Kv(t),e=$v(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},Qv.prototype.delete=function(t){delete this.map[Kv(t)]},Qv.prototype.get=function(t){return t=Kv(t),this.has(t)?this.map[t]:null},Qv.prototype.has=function(t){return this.map.hasOwnProperty(Kv(t))},Qv.prototype.set=function(t,e){this.map[Kv(t)]=$v(e)},Qv.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},Qv.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),Jv(t)},Qv.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),Jv(t)},Qv.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),Jv(t)},Hv&&(Qv.prototype[Symbol.iterator]=Qv.prototype.entries);var om=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function sm(t,e){if(!(this instanceof sm))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof sm){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Qv(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new Qv(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),om.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in Xv)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function am(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function lm(t,e){if(!(this instanceof lm))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new Qv(e.headers),this.url=e.url||"",this._initBody(t)}sm.prototype.clone=function(){return new sm(this,{body:this._bodyInit})},im.call(sm.prototype),im.call(lm.prototype),lm.prototype.clone=function(){return new lm(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Qv(this.headers),url:this.url})},lm.error=function(){var t=new lm(null,{status:200,statusText:""});return t.status=0,t.type="error",t};var cm=[301,302,303,307,308];lm.redirect=function(t,e){if(-1===cm.indexOf(e))throw new RangeError("Invalid status code");return new lm(null,{status:e,headers:{location:t}})};var um=Xv.DOMException;try{new um}catch(t){um=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},um.prototype=Object.create(Error.prototype),um.prototype.constructor=um}function hm(t,e){return new Promise((function(n,r){var i=new sm(t,e);if(i.signal&&i.signal.aborted)return r(new um("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}if(o.onload=function(){var t,e,r={statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new Qv,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{e.append(r,i)}catch(t){console.warn("Response "+t.message)}}})),e)};i.url.startsWith("file://")&&(o.status<200||o.status>599)?r.status=200:r.status=o.status,r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var s="response"in o?o.response:o.responseText;setTimeout((function(){n(new lm(s,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new um("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&Xv.location.href?Xv.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(qv?o.responseType="blob":Wv&&(o.responseType="arraybuffer")),e&&"object"==typeof e.headers&&!(e.headers instanceof Qv||Xv.Headers&&e.headers instanceof Xv.Headers)){var a=[];Object.getOwnPropertyNames(e.headers).forEach((function(t){a.push(Kv(t)),o.setRequestHeader(t,$v(e.headers[t]))})),i.headers.forEach((function(t,e){-1===a.indexOf(e)&&o.setRequestHeader(e,t)}))}else i.headers.forEach((function(t,e){o.setRequestHeader(e,t)}));i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}hm.polyfill=!0,Xv.fetch||(Xv.fetch=hm,Xv.Headers=Qv,Xv.Request=sm,Xv.Response=lm);const pm={osm:{mapID:"osm",title:{ja:"オープンストリートマップ",en:"OpenStreetMap"},label:{ja:"OSM(現在)",en:"OSM(Now)"},attr:"©︎ OpenStreetMap contributors",maptype:"base",thumbnail:"assets/images/6345ee67d554fbfbf484ba4035ad19d9.jpg",urls:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png","https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"]},gsi:{mapID:"gsi",title:{ja:"地理院地図",en:"Geospatial Information Authority of Japan Map"},label:{ja:"地理院地図",en:"GSI Map"},attr:{ja:"国土地理院",en:"The Geospatial Information Authority of Japan"},maptype:"base",url:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",maxZoom:18,thumbnail:"assets/images/b9ae27f0a01228380dff76a33b605707.jpg"},gsi_ortho:{mapID:"gsi_ortho",title:{ja:"地理院地図オルソ航空写真",en:"Geospatial Information Authority of Japan Ortho aerial photo"},label:{ja:"地理院オルソ",en:"GSI Ortho"},attr:{ja:"国土地理院",en:"The Geospatial Information Authority of Japan"},maptype:"base",url:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg",maxZoom:18,thumbnail:"assets/images/41b2cf0fa604d3f196ca52337d238219.jpg"}};async function fm(t,e){if("string"==typeof t&&(t=pm[t]),(t=ui(Object.assign(t,e))).label=t.label||t.year,"base"===t.maptype||"overlay"===t.maptype||"mapbox"===t.maptype){const e="base"===t.maptype?jf:"overlay"===t.maptype?Qf:Ff;e instanceof Qf?(t.homePosition||(t.homePosition=t.homePos),t.mercZoom||(t.mercZoom=t.defZoom)):(t.homePosition=t.homePos,t.mercZoom=t.defZoom),delete t.homePos,delete t.defZoom,t.zoomRestriction&&(t.maxZoom=t.maxZoom||t.mercMaxZoom,t.minZoom=t.minZoom||t.mercMinZoom),t.zoomRestriction=t.mercMaxZoom=t.mercMinZoom=void 0,t.translator&&(t.url=t.translator(t.url)),t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=t.tms?`tiles/${t.mapID}/{z}/{x}/{-y}.${t.imageExtension}`:`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t.weiwudi=await dm(t),t.weiwudi&&(t.url=t.weiwudi.url,delete t.urls);const n=await e.createAsync(t);return await n.initialWait,n}return t.noload?(t.mercMaxZoom=t.mercMinZoom=void 0,new Gv(t)):new Promise(((e,n)=>{const r=t.settingFile||`maps/${t.mapID}.json`,i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="json",i.onload=async function(r){if(200===this.status||0===this.status)try{let r=this.response;if("object"!=typeof r&&(r=JSON.parse(r)),(t=ui(Object.assign(r,t))).label=t.label||r.year,t.translator&&(t.url=t.translator(t.url)),t.maptype||(t.maptype="maplat"),"base"===t.maptype||"overlay"===t.maptype||"mapbox"===t.maptype){const r="base"===t.maptype?jf:"overlay"===t.maptype?Qf:Ff;r instanceof Qf?(t.homePosition||(t.homePosition=t.homePos),t.mercZoom||(t.mercZoom=t.defZoom)):(t.homePosition=t.homePos,t.mercZoom=t.defZoom),delete t.homePos,delete t.defZoom,t.zoomRestriction&&(t.maxZoom=t.maxZoom||t.mercMaxZoom,t.minZoom=t.minZoom||t.mercMinZoom),t.zoomRestriction=t.mercMaxZoom=t.mercMinZoom=void 0;try{t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=t.tms?`tiles/${t.mapID}/{z}/{x}/{-y}.${t.imageExtension}`:`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t.weiwudi=await dm(t),t.weiwudi&&(t.url=t.weiwudi.url,delete t.urls);const n=await r.createAsync(t);try{await n.initialWait,e(n)}catch(t){e(n)}}catch(t){n(t)}return}try{delete t.homePos,delete t.defZoom,t.imageExtension||(t.imageExtension="jpg"),!t.mapID||t.url||t.urls||(t.url=`tiles/${t.mapID}/{z}/{x}/{y}.${t.imageExtension}`),t.width=t.width||t.compiled.wh[0],t.height=t.height||t.compiled.wh[1],t.weiwudi=await dm(t),t.weiwudi&&(t.url=t.weiwudi.url,delete t.urls);const n=await Gv.createAsync(t);try{await n.initialWait,n.setupMapParameter(e)}catch(t){n.setupMapParameter(e)}}catch(t){n(t)}}catch(t){n(t)}else n("Fail to load map json")},i.send()}))}async function dm(t){const e={};if("mapbox"===t.maptype||!t.enableCache)return;"base"===t.maptype||"overlay"===t.maptype?e.type="wmts":e.type="xyz",e.url=t.urls?t.urls:t.url,e.width=t.width,e.height=t.height,e.maxZoom=t.maxZoom,e.minZoom=t.minZoom;const n=t.envelopeLngLats;if(n){const t=n.reduce(((t,e)=>(t[0]=t[0]>e[0]?e[0]:t[0],t[1]=t[1]<e[0]?e[0]:t[1],t[2]=t[2]>e[1]?e[1]:t[2],t[3]=t[3]<e[1]?e[1]:t[3],t)),[1/0,-1/0,1/0,-1/0]);["minLng","maxLng","minLat","maxLat"].map(((n,r)=>{e[n]=t[r]}))}let r;try{r=await id.registerMap(t.mapID,e)}catch(t){}return r}const gm={};var vm=n(6816),mm=n.n(vm);function ym(t,...e){const n=ui(Object.assign({},t));if(n.icon)return n;const r=e.reduce(((t,e)=>{if(t)return t;const r=e.iconTemplate||e.iconTemplate;return r?JSON.parse(mm()(r)(n)):e.icon?{icon:e.icon,selectedIcon:e.selectedIcon||e.selectedIcon}:void 0}),void 0);return r&&(n.icon=r.icon,n.selectedIcon=r.selectedIcon),n}function _m(t,...e){return(t=ui(t)).html?t:e.reduce(((e,n)=>{if(e)return e;const r=n.poiTemplate;return r?(t.html=mm()(r)(t),t.poiStyle=t.poiStyle||n.poiStyle,t):void 0}),void 0)||t}class bm extends dt.Z{constructor(t){super(),this.translateUI=!1,this.noRotate=!1,this.initialRestore={},this.mapDiv="map_div",this.restoreSession=!1,this.stateBuffer={},this.overlay=!0,this.appLang="ja",this.timer=void 0,this.startFrom="",this.vectors=[],this.__backMapMoving=!1,this.__init=!0,this.__redrawMarkerBlock=!1,this.__redrawMarkerThrottle=[],t=ui(t),this.appid=t.appid||"sample",t.mapboxgl&&(this.mapboxgl=t.mapboxgl,t.mapboxToken&&(this.mapboxgl.accessToken=t.mapboxToken)),this.mapDiv=t.div||"map_div",this.mapDivDocument=document.querySelector(`#${this.mapDiv}`),this.mapDivDocument.classList.add("maplat"),this.logger=new Ge(t.debug?ze.ALL:ze.INFO),this.enableCache=t.enableCache||!1,this.icon=t.icon,this.selectedIcon=t.selectedIcon,this.translateUI=t.translateUI;const e=t.setting;if(this.lang=t.lang,this.lang||(this.lang=Ne()),"zh-hk"!=this.lang.toLowerCase()&&"zh-hant"!=this.lang.toLowerCase()||(this.lang="zh-TW"),t.restore)t.restoreSession&&(this.restoreSession=!0),this.initialRestore=t.restore;else if(t.restoreSession){this.restoreSession=!0;const t=parseInt(localStorage.getItem("epoch")||"0"),e=Math.floor((new Date).getTime()/1e3);t&&e-t<3600&&(this.initialRestore.mapID=localStorage.getItem("mapID")||localStorage.getItem("sourceID")||void 0,this.initialRestore.backgroundID=localStorage.getItem("backgroundID")||localStorage.getItem("backID")||void 0,this.initialRestore.position={x:parseFloat(localStorage.getItem("x")||"0"),y:parseFloat(localStorage.getItem("y")||"0"),zoom:parseFloat(localStorage.getItem("zoom")||"0"),rotation:parseFloat(localStorage.getItem("rotation")||"0")},this.initialRestore.transparency=parseFloat(localStorage.getItem("transparency")||"0"),this.initialRestore.hideMarker=parseInt(localStorage.getItem("hideMarker")||"0"),this.initialRestore.hideLayer=localStorage.getItem("hideLayer")||void 0)}const n=ai('<img id="center_circle" class="prevent-default" alt=""\n style="position:absolute;top:50%;left:50%;margin-top:-10px;\n margin-left:-10px;" src="assets/images/7df82bae917b68159f84998182f2fdc6.png">');for(let t=n.length-1;t>=0;t--)this.mapDivDocument.insertBefore(n[t],this.mapDivDocument.firstChild);const r=this.mapDivDocument.querySelectorAll(".prevent-default");for(let t=0;t<r.length;t++){r[t].addEventListener("touchstart",(t=>{t.preventDefault()}))}this.overlay=!("overlay"in t)||t.overlay,this.overlay&&this.mapDivDocument.classList.add("with-opacity"),this.waitReady=this.settingLoader(e).then((e=>this.handleSetting(e,t)))}async settingLoader(t){return t||new Promise(((t,e)=>{const n=new XMLHttpRequest;n.open("GET",`apps/${this.appid}.json`,!0),n.responseType="json",n.onload=function(e){let n=this.response;"object"!=typeof n&&(n=JSON.parse(n)),t(n)},n.send()}))}async i18nLoader(){return new Promise(((t,e)=>{const n=0!=Object.keys(gm).length;(this.translateUI&&!n?ke.use(De):ke).init({lng:this.lang,fallbackLng:["en"],backend:{loadPath:"assets/locales/{{lng}}/{{ns}}.json"},resources:n?gm:void 0},((e,n)=>{t([n,ke])}))}))}async sourcesLoader(t){const e=this.appData.sources,n=[],r={homePos:t.homePos,defZoom:t.defZoom,zoomRestriction:t.zoomRestriction,mercMinZoom:t.mercMinZoom,mercMaxZoom:t.mercMaxZoom,enableCache:this.enableCache,translator:t=>this.translate(t)};for(let t=0;t<e.length;t++){const i=e[t];n.push(fm(i,r))}return Promise.all(n)}handleSetting(t,e){return this.appData=ui(t),!this.lang&&this.appData.lang&&(this.lang=this.appData.lang),this.i18nLoader().then((t=>this.handleI18n(t,e)))}handleI18n(t,e){this.i18n=t[1],this.t=t[0];const n=this.prepareMap(e);return Zr(this.appData.pois||[],this).then((t=>this.handlePois(t,n)))}prepareMap(t){t=ui(t),this.mercBuffer=null;const e=this.appData.homePosition,n=this.appData.defaultZoom,r=this.appData.zoomRestriction,i=this.appData.minZoom,o=this.appData.maxZoom;this.appName=this.appData.appName;const s=!!t.fake&&this.appData.fakeGps,a=!!t.fake&&this.appData.fakeRadius;this.appLang=this.appData.lang||"ja",this.noRotate=t.noRotate||this.appData.noRotate||!1,this.poiTemplate=t.poiTemplate||this.appData.poiTemplate||!1,this.poiStyle=t.poiStyle||this.appData.poiStyle||!1,this.iconTemplate=t.iconTemplate||this.appData.iconTemplate||!1,this.currentPosition=null,this.__init=!0,this.dispatchEvent(new Fe("uiPrepare"));const l=`${this.mapDiv}_front`;let c=ai(`<div id="${l}" class="map" style="top:0; left:0; right:0; bottom:0; position:absolute;"></div>`)[0];this.mapDivDocument.insertBefore(c,this.mapDivDocument.firstChild),this.mapObject=new Vf({div:l,controls:this.appData.controls||[],interactions:this.noRotate?gc({altShiftDragRotate:!1,pinchRotate:!1}):gc().extend([new $f({condition:_l})]),fakeGps:s,fakeRadius:a,homePosition:e,northUp:t.northUp||this.appData.northUp||!1,tapDuration:t.tapDuration||this.appData.tapDuration||3e3,homeMarginPixels:t.homeMarginPixels||this.appData.homeMarginPixels||50,tapUIVanish:t.tapUIVanish||this.appData.tapUIVanish||!1});let u=null;if(this.overlay&&(u=`${this.mapDiv}_back`,c=ai(`<div id="${u}" class="map" style="top:0; left:0; right:0; bottom:0; position:absolute;"></div>`)[0],this.mapDivDocument.insertBefore(c,this.mapDivDocument.firstChild),this.backMap=new Vf({off_control:!0,div:u})),this.mapboxgl){const t=this.mapboxgl;delete this.mapboxgl;const e=`${this.mapDiv}_mapbox`;c=ai(`<div id="${e}" class="map" style="top:0; left:0; right:0; bottom:0; position:absolute;visibility:hidden;"></div>`)[0],this.mapDivDocument.insertBefore(c,this.mapDivDocument.firstChild),this.mapboxMap=new t.Map({attributionControl:!1,boxZoom:!1,container:e,doubleClickZoom:!1,dragPan:!1,dragRotate:!1,interactive:!1,keyboard:!1,pitchWithRotate:!1,scrollZoom:!1,touchZoomRotate:!1})}return this.startFrom=this.appData.startFrom,{homePos:e,defZoom:n,zoomRestriction:r,mercMinZoom:i,mercMaxZoom:o}}handlePois(t,e){return this.pois=t,this.sourcesLoader(e).then((t=>this.handleSources(t)))}handleSources(t){this.mercSrc=t.reduce(((t,e)=>t||(e instanceof jf&&!(e instanceof Qf)?e:void 0)),null);const e=[];this.cacheHash={};for(let n=0;n<t.length;n++){const r=t[n];if(r.setMap(this.mapObject),r instanceof Ff){if(!this.mapboxMap)throw"To use mapbox gl based base map, you have to make Maplat object with specifying 'mapboxgl' option.";r.mapboxMap=this.mapboxMap}e.push(r),this.cacheHash[r.mapID]=r}this.dispatchEvent(new Fe("sourceLoaded",t)),this.setInitialMap(e),this.setMapClick(),this.setPointerEvents(),this.setMapOnOff(),this.setMouseCursor(),this.setBackMapBehavior(),this.raiseChangeViewpoint()}async setInitialMap(t){const e=this.initialRestore.mapID||this.startFrom||t[t.length-1].mapID;this.from=t.reduce(((t,n)=>t?t instanceof Jf||n.mapID==e?t:n:n.mapID!=e?n:t),void 0),await this.changeMap(e,this.initialRestore)}setMapClick(){this.mapObject.on("click",(t=>{this.logger.debug(t.pixel),this.lastClickEvent=t;const e=[];if(t.target.forEachFeatureAtPixel(t.pixel,(n=>{this.logger.debug(t.pixel),n.get("datum")&&e.push(n.get("datum"))})),e.length>0)this.dispatchEvent(new Fe("clickMarker",e[0])),this.dispatchEvent(new Fe("clickMarkers",e));else{const e=t.coordinate;this.dispatchEvent(new Fe("clickMapXy",e)),this.from.sysCoord2MercAsync(e).then((t=>{this.dispatchEvent(new Fe("clickMapMerc",t));const e=kr(t,"EPSG:3857","EPSG:4326");this.dispatchEvent(new Fe("clickMap",{longitude:e[0],latitude:e[1]}))}))}}))}setPointerEvents(){let t,e=!1,n=!1;const r={},i=n=>{this.dispatchEvent(new Fe("pointerMoveOnMapXy",n)),this.from.sysCoord2MercAsync(n).then((n=>{if(this.dispatchEvent(new Fe("pointerMoveOnMapMerc",n)),t){const e=t;t=!1,i(e)}else e=!1}))};this.mapObject.on("pointermove",(r=>{n||(e?t=r.coordinate:(e=!0,i(r.coordinate)))})),this.mapObject.on("pointerdown",(t=>{t.originalEvent&&null!=t.originalEvent.pointerId&&(r[t.originalEvent.pointerId]=!0),n=!0})),this.mapObject.on("pointerdrag",(t=>{t.originalEvent&&null!=t.originalEvent.pointerId&&(r[t.originalEvent.pointerId]=!0),n=!0})),this.mapObject.on("pointerup",(t=>{t.originalEvent&&null!=t.originalEvent.pointerId?(delete r[t.originalEvent.pointerId],0==Object.keys(r).length&&(n=!1)):t.originalEvent&&t.originalEvent.touches?0==t.originalEvent.touches.length&&(n=!1):n=!1}))}setMapOnOff(){let t;this.mapObject.on("click",(()=>{t&&(clearTimeout(t),t=void 0);const e=this.mapDivDocument.querySelectorAll(".ol-control");if(!this.mapObject.tapUIVanish||e.length&&e[0].classList.contains("fade"))for(let t=0;t<e.length;t++)e[t].classList.remove("fade");else{for(let t=0;t<e.length;t++)e[t].classList.add("fade");t=setTimeout((()=>{t=void 0;const e=this.mapDivDocument.querySelectorAll(".ol-control");for(let t=0;t<e.length;t++)e[t].classList.remove("fade")}),this.mapObject.tapDuration)}})),this.mapObject.on("pointerdrag",(()=>{t&&(clearTimeout(t),t=void 0);const e=this.mapDivDocument.querySelectorAll(".ol-control");for(let t=0;t<e.length;t++)e[t].classList.add("fade")})),this.mapObject.on("moveend",(()=>{t&&(clearTimeout(t),t=void 0),t=setTimeout((()=>{t=void 0;const e=this.mapDivDocument.querySelectorAll(".ol-control");for(let t=0;t<e.length;t++)e[t].classList.remove("fade")}),this.mapObject.tapDuration)}))}setMouseCursor(){this.mapObject.on("pointermove",(t=>{const e=t.target.getEventPixel(t.originalEvent),n=t.target.hasFeatureAtPixel(e),r=t.target.getTarget();if(n){const e=t.target.forEachFeatureAtPixel(t.pixel,(t=>{if(t.get("datum"))return t}));this.mapDivDocument.querySelector(`#${r}`).style.cursor=e?"pointer":""}else this.mapDivDocument.querySelector(`#${r}`).style.cursor=""}));this.mapObject.on("moveend",(t=>{let e=t.frameState.viewState.center;const n=this.from;n.insideCheckSysCoord(e)||(e=n.modulateSysCoordInside(e),t.target.getView().setCenter(e))}))}setBackMapBehavior(){this.mapObject.on("postrender",(t=>{if(!this.backMap)return;if(this.__backMapMoving)return void this.logger.debug("Backmap moving skipped");const e=this.backMap.getSource();e&&(this.__backMapMoving=!0,this.logger.debug("Backmap moving started"),this.convertParametersFromCurrent(e,(t=>{const e=this.backMap.getView();e.setCenter(t[0]),e.setZoom(t[1]),e.setRotation(this.noRotate?0:t[2]),this.logger.debug("Backmap moving ended"),this.__backMapMoving=!1})))}))}raiseChangeViewpoint(){this.mapObject.on("postrender",(t=>{const e=this.mapObject.getView(),n=e.getCenter(),r=e.getDecimalZoom(),i=li(180*e.getRotation()/Math.PI);this.from.viewpoint2MercsAsync().then((t=>this.mercSrc.mercs2ViewpointAsync(t))).then((t=>{if(this.mobileMapMoveBuffer&&this.mobileMapMoveBuffer[0][0]==t[0][0]&&this.mobileMapMoveBuffer[0][1]==t[0][1]&&this.mobileMapMoveBuffer[1]==t[1]&&this.mobileMapMoveBuffer[2]==t[2])return;this.mobileMapMoveBuffer=t;const e=kr(t[0],"EPSG:3857","EPSG:4326"),o=li(180*t[2]/Math.PI);this.dispatchEvent(new Fe("changeViewpoint",{x:n[0],y:n[1],longitude:e[0],latitude:e[1],mercator_x:t[0][0],mercator_y:t[0][1],zoom:r,mercZoom:t[1],direction:o,rotation:i})),this.requestUpdateState({position:{x:n[0],y:n[1],zoom:r,rotation:i}})}))}))}currentMapInfo(){return ci(this.from)}mapInfo(t){return ci(this.cacheHash[t])}setMarker(t){this.logger.debug(t);const e=t.lnglat||[t.lng||t.longitude,t.lat||t.latitude],n=t.x,r=t.y,i=t.coordinates,o=this.from,s=t.icon?this.__selectedMarker==t.namespaceID&&t.selectedIcon?t.selectedIcon:t.icon:this.__selectedMarker==t.namespaceID?"assets/images/f115726e6249018905cca51653e1262c.png":Xf;return(i?o.merc2SysCoordAsync_ignoreBackground(i):n&&r?new Promise((t=>{t(o.xy2SysCoord([n,r]))})):function(){const t=kr(e,"EPSG:4326","EPSG:3857");return o.merc2SysCoordAsync_ignoreBackground(t)}()).then((e=>{e&&o.insideCheckSysCoord(e)&&this.mapObject.setMarker(e,{datum:t},s)}))}resetMarker(){this.mapObject.resetMarker()}setLine(t){t.type="Line",!t.style&&t.stroke&&(t.style={stroke:t.stroke}),this.setVector(t)}setVector(t){let e;this.logger.debug(t);const n=(t,e=!1)=>Promise.all(t.map((t=>Array.isArray(t[0])?n(t,e):(e&&(t=kr(t,"EPSG:4326","EPSG:3857")),this.from.merc2SysCoordAsync(t)))));e=t.coordinates?n(t.coordinates):n(t.lnglats,!0),e.then((e=>{this.mapObject.setVector(e,t.type,t.style)}))}resetLine(){this.resetVector()}resetVector(){this.mapObject.resetVector()}redrawMarkers(t=void 0){if(t||(t=this.from),this.__redrawMarkerBlock){this.__redrawMarkerThrottle||(this.__redrawMarkerThrottle=[]);const e=this.__redrawMarkerThrottle;if(0==e.length||e[e.length-1]!==t)return void e.push(t)}this.__redrawMarkerBlock=!0;const e=t=>{const n=[];let r;this.resetMarker(),this.stateBuffer.hideMarker||(Object.keys(this.pois).map((t=>{const e=this.pois[t];e.hide||e.pois.map((t=>{const i=ym(t,e,this);_m(i,e,this),this.__selectedMarker==i.namespaceID?r=i:n.push(this.setMarker(i))}))})),t.pois&&Object.keys(t.pois).map((e=>{const i=t.pois[e];i.hide||i.pois.map((e=>{const o=ym(e,i,t,this);_m(o,i,t,this),this.__selectedMarker==o.namespaceID?r=o:n.push(this.setMarker(o))}))})));let i=Promise.all(n);r&&(i=i.then((()=>this.setMarker(r)))),i.then((()=>{this.__redrawMarkerThrottle&&this.__redrawMarkerThrottle.length>0?e(this.__redrawMarkerThrottle.shift()):this.__redrawMarkerBlock=!1}))};e(t)}selectMarker(t){const e=this.getMarker(t);if(!e)return;this.__selectedMarker=t;const n={latitude:e.lnglat?e.lnglat[1]:e.lat?e.lat:e.latitude,longitude:e.lnglat?e.lnglat[0]:e.lng?e.lng:e.longitude};this.setViewpoint(n),this.redrawMarkers()}unselectMarker(){delete this.__selectedMarker,this.redrawMarkers()}getMarker(t){if(t.indexOf("#")<0){let e;return Object.keys(this.pois).map((n=>{this.pois[n].pois.map(((r,i)=>{r.id==t&&(e=this.pois[n].pois[i])}))})),e}{const e=t.split("#"),n=this.cacheHash[e[0]];if(n)return n.getPoi(e[1])}}updateMarker(t,e,n){const r=this.getMarker(t);r&&(e=Vr(e||{}),n?(Object.keys(r).map((t=>{"id"!=t&&"namespaceID"!=t&&delete r[t]})),Object.assign(r,e)):Object.keys(e).map((t=>{"id"!=t&&"namespaceID"!=t&&("____delete____"==e[t]?delete r[t]:r[t]=e[t])})),this.redrawMarkers())}addMarker(t,e){if(e||(e="main"),e.indexOf("#")<0){if(this.pois[e])return this.pois[e].pois.push(Vr(t)),Yr(this.pois,e,{name:this.appName}),this.dispatchPoiNumber(),this.redrawMarkers(),t.namespaceID}else{const n=e.split("#"),r=this.cacheHash[n[0]];if(r){const e=r.addPoi(t,n[1]);return this.dispatchPoiNumber(),this.redrawMarkers(),e}}}removeMarker(t){if(t.indexOf("#")<0)Object.keys(this.pois).map((e=>{this.pois[e].pois.map(((n,r)=>{n.id==t&&(delete this.pois[e].pois[r],this.dispatchPoiNumber(),this.redrawMarkers())}))}));else{const e=t.split("#"),n=this.cacheHash[e[0]];n&&(n.removePoi(e[1]),this.dispatchPoiNumber(),this.redrawMarkers())}}clearMarker(t){if(t||(t="main"),t.indexOf("#")<0){if("all"==t)Object.keys(this.pois).map((t=>{this.pois[t].pois=[]}));else{if(!this.pois[t])return;this.pois[t].pois=[]}this.dispatchPoiNumber(),this.redrawMarkers()}else{const e=t.split("#"),n=this.cacheHash[e[0]];n&&(n.clearPoi(e[1]),this.dispatchPoiNumber(),this.redrawMarkers())}}showAllMarkers(){this.requestUpdateState({hideMarker:0}),this.redrawMarkers()}hideAllMarkers(){this.requestUpdateState({hideMarker:1}),this.redrawMarkers()}dispatchPoiNumber(){this.dispatchEvent(new Fe("poi_number",this.listPoiLayers(!1,!0).reduce(((t,e)=>t+e.pois.length),0)))}listPoiLayers(t=!1,e=!1){const n=Object.keys(this.pois).sort(((t,e)=>"main"==t?-1:"main"==e?1:t<e?-1:t>e?1:0)).map((t=>this.pois[t])).filter((n=>e?t?n.pois.length&&n.hide:n.pois.length:!t||n.hide)),r=this.from.listPoiLayers(t,e);return n.concat(r)}showPoiLayer(t){const e=this.getPoiLayer(t);e&&(delete e.hide,this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.redrawMarkers())}hidePoiLayer(t){const e=this.getPoiLayer(t);e&&(e.hide=!0,this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.redrawMarkers())}getPoiLayer(t){if(t.indexOf("#")<0)return this.pois[t];{const e=t.split("#"),n=this.cacheHash[e[0]];if(n)return n.getPoiLayer(e[1])}}addPoiLayer(t,e){if("main"!=t&&!this.pois[t])if(t.indexOf("#")<0)this.pois[t]=Wr(e||[],t,{name:this.appName}),this.redrawMarkers();else{const n=t.split("#"),r=this.cacheHash[n[0]];r&&(r.addPoiLayer(n[1],e),this.redrawMarkers())}}removePoiLayer(t){if("main"!=t&&this.pois[t])if(t.indexOf("#")<0)delete this.pois[t],this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.dispatchPoiNumber(),this.redrawMarkers();else{const e=t.split("#"),n=this.cacheHash[e[0]];n&&(n.removePoiLayer(e[1]),this.requestUpdateState({hideLayer:this.listPoiLayers(!0).map((t=>t.namespaceID)).join(",")}),this.dispatchPoiNumber(),this.redrawMarkers())}}addLine(t){this.vectors.push(t),this.setLine(t)}addVector(t){this.vectors.push(t),this.setVector(t)}clearLine(){this.vectors=[],this.resetLine()}clearVector(){this.vectors=[],this.resetVector()}setGPSMarker(t){this.currentPosition=t,this.from.setGPSMarker(t,!0)}changeMap(t,e){void 0===e&&(e={});const n=this.mercSrc,r=this.cacheHash[t];return this.changeMapSeq||(this.changeMapSeq=Promise.resolve()),this.changeMapSeq=this.changeMapSeq.then((()=>new Promise(((t,i)=>{this.convertParametersFromCurrent(r,(i=>{let o=null,s=null;const a=e.backgroundID?this.cacheHash[e.backgroundID]:void 0;if(this.backMap&&(o=this.backMap.getSource(),r instanceof jf?this.backMap.exchangeSource():(a?(s=a,this.backMap.exchangeSource(s)):o?s=o:(s=n,this.from instanceof jf&&(s=this.from instanceof Qf?this.mapObject.getSource():this.from),this.backMap.exchangeSource(s)),this.requestUpdateState({backgroundID:s.mapID}))),r instanceof Qf){if(this.mapObject.setLayer(r),a)this.mapObject.exchangeSource(a);else if(!(this.from instanceof jf)){const t=o||n;this.mapObject.exchangeSource(t)}this.requestUpdateState({backgroundID:this.mapObject.getSource().mapID})}else this.mapObject.setLayer(),this.mapObject.exchangeSource(r);const l={mapID:r.mapID};r instanceof jf&&!(r instanceof Qf)&&(l.backgroundID="____delete____"),this.requestUpdateState(l),this.from=r,this.dispatchPoiNumber();const c=this.mapObject.getView();if(this.appData.zoomRestriction&&(c.setMaxZoom(r.maxZoom),c.setMinZoom(r.minZoom||0)),r.insideCheckSysCoord(i[0])?(c.setCenter(i[0]),c.setZoom(i[1]),c.setRotation(this.noRotate?0:i[2])):this.__init||(this.dispatchEvent(new Fe("outOfMap",{})),this.goHome(r)),r.setGPSMarker(this.currentPosition,!0),e.hideLayer){e.hideLayer.split(",").map((t=>{const e=this.getPoiLayer(t);e&&(e.hide=!0)})),this.requestUpdateState({hideLayer:e.hideLayer})}e.hideMarker?this.hideAllMarkers():this.redrawMarkers(),this.resetVector();for(let t=0;t<this.vectors.length;t++)(t=>{this.setVector(t)})(this.vectors[t]);this.dispatchEvent(new Fe("mapChanged",this.getMapMeta(r.mapID))),this.mapObject.updateSize(),this.mapObject.renderSync(),e.position&&(this.__init=!1,r.setViewpoint(e.position)),e.transparency&&this.setTransparency(e.transparency),this.__init?(this.__init=!1,this.goHome(r)):this.backMap&&s&&this.convertParametersFromCurrent(s,(t=>{const e=this.backMap.getView();e.setCenter(t[0]),e.setZoom(t[1]),e.setRotation(this.noRotate?0:t[2]),this.backMap.updateSize(),this.backMap.renderSync()})),t(void 0)}))}))))}requestUpdateState(t){if(this.stateBuffer=Object.assign(this.stateBuffer,t),"____delete____"==this.stateBuffer.backgroundID&&delete this.stateBuffer.backgroundID,this.restoreSession){const e=Math.floor((new Date).getTime()/1e3);localStorage.setItem("epoch",`${e}`);const n=function(t){Object.keys(t).map((e=>{"position"==e?n(t[e]):"backgroundID"==e&&"____delete____"==t[e]?localStorage.removeItem(e):localStorage.setItem(e,t[e])}))};n(t)}this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.timer=void 0,this.dispatchEvent(new Fe("updateState",this.stateBuffer))}),50)}setTransparency(t){this.__transparency=t,this.mapObject.setTransparency(t),this.requestUpdateState({transparency:t})}getTransparency(){return null==this.__transparency?0:this.__transparency}setViewpoint(t){this.from.setViewpoint(t)}goHome(t){(t||this.from).goHome()}resetRotation(){this.from.resetRotation()}resetDirection(){this.from.resetDirection()}resetCirculation(){this.from.resetCirculation()}getMapMeta(t){let e;if(e=t?this.cacheHash[t]:this.from,e)return ri.reduce(((t,n)=>(t[n]=e[n],t)),{mapID:e.mapID,label:e.label})}getMapCacheEnable(t){let e;return e=t?this.cacheHash[t]:this.from,!!e&&e.getCacheEnable()}async getMapTileCacheStatsAsync(t){let e;return e=t?this.cacheHash[t]:this.from,e?await e.getTileCacheStatsAsync():{}}async getMapTileCacheSizeAsync(t){return(await this.getMapTileCacheStatsAsync(t)).size||0}async clearMapTileCacheAsync(t){let e;e=t?this.cacheHash[t]:this.from,e&&await e.clearTileCacheAsync()}async fetchAllMapTileCacheAsync(t,e){let n;n=t?this.cacheHash[t]:this.from,n?await n.fetchAllTileCacheAsync(e):e("stop",{})}async cancelMapTileCacheAsync(t){let e;e=t?this.cacheHash[t]:this.from,e&&await e.cancelTileCacheAsync()}convertParametersFromCurrent(t,e){const n=this.mapObject.getView();let r=this.from.viewpoint2MercsAsync();const i=Bf([n.getCenter(),n.getZoom(),n.getRotation()],10);if(this.mercBuffer&&this.mercBuffer.mercs&&this.mercBuffer.buffer[this.from.mapID]){const t=this.mercBuffer.buffer[this.from.mapID];t[0][0]==i[0][0]&&t[0][1]==i[0][1]&&t[1]==i[1]&&t[2]==i[2]?(this.logger.debug(t),this.logger.debug(i),this.logger.debug("From: Use buffer"),r=new Promise(((t,e)=>{t(this.mercBuffer.mercs)}))):(this.mercBuffer={buffer:{}},this.mercBuffer.buffer[this.from.mapID]=i)}else this.mercBuffer={buffer:{}},this.mercBuffer.buffer[this.from.mapID]=i;this.logger.debug(`From: Center: ${i[0]} Zoom: ${i[1]} Rotation: ${i[2]}`),this.logger.debug(`From: ${this.from.mapID}`),r.then((n=>{this.mercBuffer.mercs=n,this.logger.debug(`Mercs: ${n}`);let r=t.mercs2ViewpointAsync(n);const i=t.mapID;this.mercBuffer.buffer[i]&&(this.logger.debug("To: Use buffer"),r=new Promise(((t,e)=>{t(this.mercBuffer.buffer[i])}))),r.then((n=>{this.logger.debug(`To: Center: ${n[0]} Zoom: ${n[1]} Rotation: ${n[2]}`),this.logger.debug(`To: ${t.mapID}`),this.mercBuffer.buffer[t.mapID]=Bf(n,10),e(n)})).catch((t=>{throw t}))})).catch((t=>{throw t}))}translate(t){if(!t||"string"==typeof t)return t;const e=Object.keys(t);let n=e.reduce(((e,n,r,i)=>(n==this.appLang?e=[t[n],!0]:e&&("en"!=n||e[1])||(e=[t[n],!1]),r==i.length-1?e[0]:e)),void 0);if(n="string"==typeof n?n:`${n}`,this.i18n.exists(n,{ns:"translation",nsSeparator:"__X__yX__X__"}))return this.t(n,{ns:"translation",nsSeparator:"__X__yX__X__"});for(let r=0;r<e.length;r++){const i=e[r];this.i18n.addResource(i,"translation",n,t[i])}return this.t(n,{ns:"translation",nsSeparator:"__X__yX__X__"})}remove(){this.mapboxMap&&this.mapboxMap.remove(),this.mapDivDocument.innerHTML="",this.mapDivDocument.classList.remove("maplat")}}var wm=n(5025);function xm(t){return xm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xm(t)}function Sm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==xm(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==xm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===xm(o)?o:String(o)),r)}var i,o}function Em(t,e){return Em=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Em(t,e)}function Cm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Tm(t);if(e){var i=Tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===xm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function Tm(t){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tm(t)}var Om,km=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Em(t,e)}(o,t);var e,n,r,i=Cm(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).Internal.setItemListener=function(t,e){var n,r=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("pointerdown",(function(t){t.stopPropagation()})),t.addEventListener("click",(function(t){t.preventDefault();var i={coordinate:r.getCoordinateClicked(),data:r.items[e].data||null};n(i,r.map)||r.closeMenu()}),!1))},e}return e=o,n&&Sm(e.prototype,n),r&&Sm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(n.n(wm)()),Mm=n(953);(function(){function t(t){this.mode=n.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var i=[],o=this.data.charCodeAt(e);o>65536?(i[0]=240|(1835008&o)>>>18,i[1]=128|(258048&o)>>>12,i[2]=128|(4032&o)>>>6,i[3]=128|63&o):o>2048?(i[0]=224|(61440&o)>>>12,i[1]=128|(4032&o)>>>6,i[2]=128|63&o):o>128?(i[0]=192|(1984&o)>>>6,i[1]=128|63&o):i[0]=o,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},e.prototype={addData:function(e){var n=new t(e);this.dataList.push(n),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,n){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[r][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,n),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,n)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=p.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},createMovieClip:function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,s=0;s<this.modules[i].length;s++){var a=1*s;this.modules[i][s]&&(r.beginFill(0,100),r.moveTo(a,o),r.lineTo(a+1,o),r.lineTo(a+1,o+1),r.lineTo(a,o+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=p.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},setupTypeNumber:function(t){for(var e=p.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=p.getBCHTypeInfo(n),i=0;i<15;i++){var o=!t&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var a=0;a<2;a++)if(null==this.modules[r][s-a]){var l=!1;o<t.length&&(l=1==(t[o]>>>i&1)),p.getMask(e,r,s-a)&&(l=!l),this.modules[r][s-a]=l,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,n,r){for(var i=v.getRSBlocks(t,n),o=new m,s=0;s<r.length;s++){var a=r[s];o.put(a.mode,4),o.put(a.getLength(),p.getLengthInBits(a.mode,t)),a.write(o)}var l=0;for(s=0;s<i.length;s++)l+=i[s].dataCount;if(o.getLengthInBits()>8*l)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*l+")");for(o.getLengthInBits()+4<=8*l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*l||(o.put(e.PAD0,8),o.getLengthInBits()>=8*l));)o.put(e.PAD1,8);return e.createBytes(o,i)},e.createBytes=function(t,e){for(var n=0,r=0,i=0,o=new Array(e.length),s=new Array(e.length),a=0;a<e.length;a++){var l=e[a].dataCount,c=e[a].totalCount-l;r=Math.max(r,l),i=Math.max(i,c),o[a]=new Array(l);for(var u=0;u<o[a].length;u++)o[a][u]=255&t.buffer[u+n];n+=l;var h=p.getErrorCorrectPolynomial(c),f=new g(o[a],h.getLength()-1).mod(h);s[a]=new Array(h.getLength()-1);for(u=0;u<s[a].length;u++){var d=u+f.getLength()-s[a].length;s[a][u]=d>=0?f.get(d):0}}var v=0;for(u=0;u<e.length;u++)v+=e[u].totalCount;var m=new Array(v),y=0;for(u=0;u<r;u++)for(a=0;a<e.length;a++)u<o[a].length&&(m[y++]=o[a][u]);for(u=0;u<i;u++)for(a=0;a<e.length;a++)u<s[a].length&&(m[y++]=s[a][u]);return m};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},i=0,o=1,s=2,a=3,l=4,c=5,u=6,h=7,p={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;p.getBCHDigit(e)-p.getBCHDigit(p.G15)>=0;)e^=p.G15<<p.getBCHDigit(e)-p.getBCHDigit(p.G15);return(t<<10|e)^p.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;p.getBCHDigit(e)-p.getBCHDigit(p.G18)>=0;)e^=p.G18<<p.getBCHDigit(e)-p.getBCHDigit(p.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return p.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case i:return(e+n)%2==0;case o:return e%2==0;case s:return n%3==0;case a:return(e+n)%3==0;case l:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case c:return e*n%2+e*n%3==0;case u:return(e*n%2+e*n%3)%2==0;case h:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new g([1],0),n=0;n<t;n++)e=e.multiply(new g([1,f.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var o=0,s=t.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||e<=r+a))for(var l=-1;l<=1;l++)i+l<0||e<=i+l||0==a&&0==l||s==t.isDark(r+a,i+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var u=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&u++;return n+=10*(Math.abs(100*u/e/e-50)/5)}},f={glog:function(t){if(t<1)throw new Error("glog("+t+")");return f.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return f.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},d=0;d<8;d++)f.EXP_TABLE[d]=1<<d;for(d=8;d<256;d++)f.EXP_TABLE[d]=f.EXP_TABLE[d-4]^f.EXP_TABLE[d-5]^f.EXP_TABLE[d-6]^f.EXP_TABLE[d-8];for(d=0;d<255;d++)f.LOG_TABLE[f.EXP_TABLE[d]]=d;function g(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function v(t,e){this.totalCount=t,this.dataCount=e}function m(){this.buffer=[],this.length=0}g.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=f.gexp(f.glog(this.get(n))+f.glog(t.get(r)));return new g(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=f.glog(this.get(0))-f.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=f.gexp(f.glog(t.get(r))+e);return new g(n,0).mod(t)}},v.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],v.getRSBlocks=function(t,e){var n=v.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var s=n[3*o+0],a=n[3*o+1],l=n[3*o+2],c=0;c<s;c++)i.push(new v(a,l));return i},v.getRsBlockTable=function(t,e){switch(e){case r.L:return v.RS_BLOCK_TABLE[4*(t-1)+0];case r.M:return v.RS_BLOCK_TABLE[4*(t-1)+1];case r.Q:return v.RS_BLOCK_TABLE[4*(t-1)+2];case r.H:return v.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},m.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var y=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function _(){var t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;var n=e.toString().match(/android ([0-9]\.[0-9])/i);n&&n[1]&&(t=parseFloat(n[1]))}return t}var b=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){var e=this._htOption,n=this._el,r=t.getModuleCount();Math.floor(e.width/r),Math.floor(e.height/r);function i(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg",t);for(var r in e)e.hasOwnProperty(r)&&n.setAttribute(r,e[r]);return n}this.clear();var o=i("svg",{viewBox:"0 0 "+String(r)+" "+String(r),width:"100%",height:"100%",fill:e.colorLight});o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),n.appendChild(o),o.appendChild(i("rect",{fill:e.colorLight,width:"100%",height:"100%"})),o.appendChild(i("rect",{fill:e.colorDark,width:"1",height:"1",id:"template"}));for(var s=0;s<r;s++)for(var a=0;a<r;a++)if(t.isDark(s,a)){var l=i("use",{x:String(a),y:String(s)});l.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),o.appendChild(l)}},t.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},t}.apply(window),w="svg"===document.documentElement.tagName.toLowerCase()?b:"undefined"==typeof CanvasRenderingContext2D?function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){for(var e=this._htOption,n=this._el,r=t.getModuleCount(),i=Math.floor(e.width/r),o=Math.floor(e.height/r),s=['<table style="border:0;border-collapse:collapse;">'],a=0;a<r;a++){s.push("<tr>");for(var l=0;l<r;l++)s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+i+"px;height:"+o+"px;background-color:"+(t.isDark(a,l)?e.colorDark:e.colorLight)+';"></td>');s.push("</tr>")}s.push("</table>"),n.innerHTML=s.join("");var c=n.childNodes[0],u=(e.width-c.offsetWidth)/2,h=(e.height-c.offsetHeight)/2;u>0&&h>0&&(c.style.margin=h+"px "+u+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}.apply(window):function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}if(this._android&&this._android<=2.1){var e=1/window.devicePixelRatio,n=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,r,i,o,s,a,l,c,u){if("nodeName"in t&&/img/i.test(t.nodeName))for(var h=arguments.length-1;h>=1;h--)arguments[h]=arguments[h]*e;else void 0===c&&(arguments[1]*=e,arguments[2]*=e,arguments[3]*=e,arguments[4]*=e);n.apply(this,arguments)}}function r(t,e){var n=this;if(n._fFail=e,n._fSuccess=t,null===n._bSupportDataURI){var r=document.createElement("img"),i=function(){n._bSupportDataURI=!1,n._fFail&&n._fFail.call(n)};return r.onabort=i,r.onerror=i,r.onload=function(){n._bSupportDataURI=!0,n._fSuccess&&n._fSuccess.call(n)},void(r.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===n._bSupportDataURI&&n._fSuccess?n._fSuccess.call(n):!1===n._bSupportDataURI&&n._fFail&&n._fFail.call(n)}var i=function(t,e){this._bIsPainted=!1,this._android=_(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return i.prototype.draw=function(t){var e=this._elImage,n=this._oContext,r=this._htOption,i=t.getModuleCount(),o=r.width/i,s=r.height/i,a=Math.round(o),l=Math.round(s);e.style.display="none",this.clear();for(var c=0;c<i;c++)for(var u=0;u<i;u++){var h=t.isDark(c,u),p=u*o,f=c*s;n.strokeStyle=h?r.colorDark:r.colorLight,n.lineWidth=1,n.fillStyle=h?r.colorDark:r.colorLight,n.fillRect(p,f,o,s),n.strokeRect(Math.floor(p)+.5,Math.floor(f)+.5,a,l),n.strokeRect(Math.ceil(p)-.5,Math.ceil(f)-.5,a,l)}this._bIsPainted=!0},i.prototype.makeImage=function(){this._bIsPainted&&r.call(this,t)},i.prototype.isPainted=function(){return this._bIsPainted},i.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},i.prototype.round=function(t){return t?Math.floor(1e3*t)/1e3:t},i}.apply(window);function x(t,e){for(var n=1,i=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),o=0,s=y.length;o<=s;o++){var a=0;switch(e){case r.L:a=y[o][0];break;case r.M:a=y[o][1];break;case r.Q:a=y[o][2];break;case r.H:a=y[o][3]}if(i<=a)break;n++}if(n>y.length)throw new Error("Too long data");return n}Om=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:r.H},"string"==typeof e&&(e={text:e}),e)for(var n in e)this._htOption[n]=e[n];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(w=b),this._android=_(),this._el=t,this._oQRCode=null,this._oDrawing=new w(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},Om.prototype.makeCode=function(t){this._oQRCode=new e(x(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},Om.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},Om.prototype.clear=function(){this._oDrawing.clear()},Om.CorrectLevel=r}).apply(window);const Pm=Om;var Lm,Im=n(686);n(4603),n(4819),n(5003);!function(){var t,e,n=document.attachEvent,r=!1;if(!n){var i=(e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)},function(t){return e(t)}),o=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),s=function(t){var e=t.__resizeTriggers__,n=e.firstElementChild,r=e.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},a=function(t){var e=this;s(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=i((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(e)&&(e.__resizeLast__.width=e.offsetWidth,e.__resizeLast__.height=e.offsetHeight,e.__resizeListeners__.forEach((function(n){n.call(e,t)})))}))},l=!1,c="",u="animationstart",h="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f="",d=document.createElement("fakeelement");if(void 0!==d.style.animationName&&(l=!0),!1===l)for(var g=0;g<h.length;g++)if(void 0!==d.style[h[g]+"AnimationName"]){(f=h[g])+"Animation",c="-"+f.toLowerCase()+"-",u=p[g],l=!0;break}var v="resizeanim",m="@"+c+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",y=c+"animation: 1ms "+v+"; "}Lm=function(t,e){n?t.attachEvent("onresize",e):(t.__resizeTriggers__||("static"==getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!r){var t=(m||"")+".resize-triggers { "+(y||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; } .contract-trigger:before { width: 200%; height: 200%; }',e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),e.appendChild(n),r=!0}}(),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),s(t),t.addEventListener("scroll",a,!0),u&&t.__resizeTriggers__.addEventListener(u,(function(e){e.animationName==v&&s(t)}))),t.__resizeListeners__.push(e))},function(t,e){n?t.detachEvent("onresize",e):(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||(t.removeEventListener("scroll",a),t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)))}}();const Am={"Maplat.png":"assets/images/558bc7e8b9b6c5f41a7141cddb8cdb5e.png","all_right_reserved.png":"assets/images/f101a0974972eeab41189185a5c5b225.png","attr.png":"assets/images/acc6eab0ba9c470ae20fb4b74135e865.png","basemap.png":"assets/images/7bef6f357e921c43f4f800cfcb757872.png","blue_marker.png":"assets/images/927c34e7b9b2f95c82ba477993117eaf.png","bluedot.png":"assets/images/6e1f2f2f6fed3c5cddeb925e7ae75aba.png","bluedot_small.png":"assets/images/0beac2cb41dfab43ddfd9df80b32b85d.png","bluedot_transparent.png":"assets/images/6c5dba7f7d76e74c3a8c7c5b1c3fc544.png","border.png":"assets/images/90c32e751366be22777f3fe40a53fe06.png","cc0.png":"assets/images/7d9d643a903df6f57b8b7386316021e5.png","cc_by-nc-nd.png":"assets/images/ffea4dd10bf2506aa1e0cd4c61426b42.png","cc_by-nc-sa.png":"assets/images/95e9ca8285131f8ccb6da5052093173c.png","cc_by-nc.png":"assets/images/ca6b77b234b18e7bb9b1ccda774da286.png","cc_by-nd.png":"assets/images/1354b4f40dd58bb0f2a4871cb4ff81d8.png","cc_by-sa.png":"assets/images/649fce122b354de2ac725ba5f2661955.png","cc_by.png":"assets/images/2a61e310e46b50b5f8ddd5e905ba9db9.png","compass.png":"assets/images/cd213169df16398b0017450e31788d73.png","defaultpin.png":"assets/images/9ac6d81f417d6a5626b7c8d5a087c32b.png","defaultpin_selected.png":"assets/images/f115726e6249018905cca51653e1262c.png","favicon.png":"assets/images/3131423d782cd3ea89a81247065e7f9d.png","fullscreen.png":"assets/images/9247459937b9c882303962e42bd8d989.png","gps.png":"assets/images/ba48b220f61a6e1028f1854326f43acd.png","gsi.jpg":"assets/images/b9ae27f0a01228380dff76a33b605707.jpg","gsi_ortho.jpg":"assets/images/41b2cf0fa604d3f196ca52337d238219.jpg","help.png":"assets/images/c49f2344772e33256ba24d64b59b20d1.png","hide_marker.png":"assets/images/9a243e0cb0fc43e2a016d5d3aaa330d5.png","home.png":"assets/images/09c3ce5a86d600e24f8e85de3a019853.png","loading.png":"assets/images/8e5d0335f6598b8d874ba23ea9fb295f.png","loading_image.png":"assets/images/5ba349e3596aca094c41c56966b45dc7.png","minus.png":"assets/images/f7acb820d978ab2dd69e8bf695c574d1.png","no_image.png":"assets/images/56f7003805ed02f8a21199947651db2e.png","osm.jpg":"assets/images/6345ee67d554fbfbf484ba4035ad19d9.jpg","overlay.png":"assets/images/799a0177b0dc540682fa4a2e349a8f4f.png","pd.png":"assets/images/bf67cc860289b85c0402a4d4f890a3bd.png","plus.png":"assets/images/6111b8076a2cf81c73f0e46f41a3af60.png","red_marker.png":"assets/images/6a580287dea82c2fb9b214321a375145.png","redcircle.png":"assets/images/7df82bae917b68159f84998182f2fdc6.png","share.png":"assets/images/9d3a01c866095b8b3e8e63f9cf11dd51.png","slider.png":"assets/images/9df733bcb29a746cb16b47eedea9fc3a.png"};function Rm(t){return Rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rm(t)}function Dm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Rm(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Rm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Rm(o)?o:String(o)),r)}var i,o}function Fm(t,e,n){return e&&jm(t.prototype,e),n&&jm(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nm(){return Nm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Um(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Nm.apply(this,arguments)}function Bm(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zm(t,e)}function zm(t,e){return zm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zm(t,e)}function Gm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Um(t);if(e){var i=Um(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Rm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Xm(t)}(this,n)}}function Xm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Um(t){return Um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Um(t)}var Hm={},qm={compass:"compass.png",border:"border.png",attr:"attr.png",gps:"gps.png",zoom_plus:"plus.png",zoom_minus:"minus.png",help:"help.png",home:"home.png",hide_marker:"hide_marker.png",share:"share.png",slider_in_help:"slider.png",favicon:"favicon.png"};function Zm(t){var e={};return t.match(/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i)?(e.red=parseInt(RegExp.$1,16),e.green=parseInt(RegExp.$2,16),e.blue=parseInt(RegExp.$3,16)):t.match(/^#?([0-9A-F])([0-9A-F])([0-9A-F])$/i)&&(e.red=parseInt("".concat(RegExp.$1).concat(RegExp.$1),16),e.green=parseInt("".concat(RegExp.$2).concat(RegExp.$2),16),e.blue=parseInt("".concat(RegExp.$3).concat(RegExp.$3),16)),e}var Wm=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{},o=document.createElement("div"),s=i.render?i.render:n.render;(r=e.call(this,{element:o,render:s})).direction_=n.Direction_.VERTICAL,r.dragging_=void 0,r.value_=void 0,r.previousX_=void 0,r.previousY_=void 0,r.thumbSize_=null,r.sliderInitialized_=!1,r.duration_=void 0!==i.duration?i.duration:200,r.reverse_=void 0!==i.reverse&&i.reverse,r.initialValue=i.initialValue;var a=void 0!==i.className?i.className:"ol-slidercommon",l=document.createElement("button");if(l.setAttribute("type","button"),l.className="".concat(a,"-thumb").concat(uo),o.title=i.tipLabel,o.className="".concat(a," ").concat(uo," ").concat(ho),o.appendChild(l),o.addEventListener("pointerdown",(function(t){t.stopPropagation(),r.handleDraggerStart_(t)})),o.addEventListener("pointermove",(function(t){t.stopPropagation(),r.handleDraggerDrag_(t)})),o.addEventListener("pointerup",(function(t){t.stopPropagation(),r.handleDraggerEnd_(t)})),l.addEventListener("click",(function(t){t.stopPropagation()})),o.addEventListener("mouseout",(function(t){t.stopPropagation(),r.handleDraggerEnd_(t)})),Hm.slider_color){var c=Zm(Hm.slider_color),u=r.element.querySelector("button");u.addEventListener("mouseover",(function(){u.style.backgroundColor="rgba(".concat(c.red,",").concat(c.green,",").concat(c.blue,",.7)")})),u.addEventListener("mouseout",(function(){var t=r.element.classList.contains("disable");u.style.backgroundColor="rgba(".concat(c.red,",").concat(c.green,",").concat(c.blue,",").concat(t?.2:.5,")")}))}return r}return Fm(n,[{key:"disposeInternal",value:function(){this.dragger_.dispose(),Nm(Um(n.prototype),"disposeInternal",this).call(this)}},{key:"setMap",value:function(t){Nm(Um(n.prototype),"setMap",this).call(this,t),t&&t.render()}},{key:"initSlider_",value:function(){var t=this.element,e=t.offsetWidth,r=t.offsetHeight,i=t.firstElementChild,o=getComputedStyle(i),s=i.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=i.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);this.thumbSize_=[s,a],this.direction_=e>r?n.Direction_.HORIZONTAL:n.Direction_.VERTICAL,this.setValue(this.initialValue||0);var l=this;Lm(t,(function(){l.setValue(l.value_)})),this.sliderInitialized_=!0}},{key:"widthLimit_",value:function(t){return this.element.offsetWidth-this.thumbSize_[0]}},{key:"heightLimit_",value:function(t){return this.element.offsetHeight-this.thumbSize_[1]}},{key:"handleContainerClick_",value:function(t){var e=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2);this.setThumbPosition_(e)}},{key:"handleDraggerStart_",value:function(t){this.dragging_||t.target!==this.element.firstElementChild||this.element.classList.contains("disable")||(this.getMap().getView().setHint(Ts,1),this.previousX_=t.clientX,this.previousY_=t.clientY,this.dragging_=!0)}},{key:"handleDraggerDrag_",value:function(t){if(this.dragging_){var e=this.element.firstElementChild,n=t.clientX-this.previousX_+(parseFloat(e.style.left,10)||0),r=t.clientY-this.previousY_+(parseFloat(e.style.top,10)||0),i=this.getRelativePosition_(n,r);this.setThumbPosition_(i),this.previousX_=t.clientX,this.previousY_=t.clientY}}},{key:"handleDraggerEnd_",value:function(t){this.dragging_&&(this.getMap().getView().setHint(Ts,-1),this.dragging_=!1,this.previousX_=void 0,this.previousY_=void 0)}},{key:"setThumbPosition_",value:function(t){var e=this.element.firstElementChild;this.direction_==n.Direction_.HORIZONTAL?e.style.left="".concat(this.widthLimit_()*t,"px"):e.style.top="".concat(this.heightLimit_()*t,"px"),this.value_=this.reverse_?1-t:t,this.set("slidervalue",this.value_)}},{key:"getRelativePosition_",value:function(t,e){return Ze(this.direction_===n.Direction_.HORIZONTAL?t/this.widthLimit_():e/this.heightLimit_(),0,1)}},{key:"setValue",value:function(t){t=this.reverse_?1-t:t,this.setThumbPosition_(t)}},{key:"setEnable",value:function(t){var e=this.element;if(t?e.classList.remove("disable"):e.classList.add("disable"),Hm.slider_color){var n=Zm(Hm.slider_color);e.querySelector("button").style.backgroundColor="rgba(".concat(n.red,",").concat(n.green,",").concat(n.blue,",").concat(t?.5:.2,")")}}}],[{key:"render",value:function(t){t.frameState&&(this.sliderInitialized_||this.initSlider_())}},{key:"Direction_",get:function(){return{VERTICAL:0,HORIZONTAL:1}}}]),n}(el.default),Vm=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{},o=document.createElement("div");r=e.call(this,{element:o,target:i.target,render:i.render});var s=document.createElement("button");s.setAttribute("type","button"),s.title=i.tipLabel;var a,l,c=document.createElement("span");c.innerHTML=i.character,s.appendChild(c);var u=Xm(r);return s.addEventListener("click",(function(t){t.stopPropagation()})),s.addEventListener("mouseup",(function(t){l||a&&(i.long_callback&&clearTimeout(a),a=null,i.callback.apply(u)),t.stopPropagation()}),!1),s.addEventListener("mousemove",(function(t){t.stopPropagation()}),!1),s.addEventListener("mousedown",(function(t){l||(a=!i.long_callback||setTimeout((function(){a=null,i.long_callback.apply(u)}),1500)),t.stopPropagation()}),!1),s.addEventListener("touchstart",(function(t){l=!0,a=!i.long_callback||setTimeout((function(){a=null,i.long_callback.apply(u)}),1500),t.stopPropagation()}),!1),s.addEventListener("touchend",(function(t){a&&(i.long_callback&&clearTimeout(a),a=null,i.callback.apply(u)),t.stopPropagation()}),!1),s.addEventListener("mouseout",(function(t){i.long_callback&&clearTimeout(a),a=null,t.stopPropagation()}),!1),s.addEventListener("dblclick",(function(t){t.preventDefault()}),!1),o.className="".concat(i.cls," ol-unselectable ol-control"),o.appendChild(s),r}return Fm(n)}(el.default),Ym=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.home?'<img src="'.concat(Hm.home,'">'):'<i class="fa fa-home fa-lg"></i>',i.cls="home",i.callback=function(){this.getMap().getLayers().item(0).getSource().goHome()},r=e.call(this,i),Hm.home)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),Km=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.gps?'<img src="'.concat(Hm.gps,'">'):'<i class="fa fa-crosshairs fa-lg"></i>',i.cls="gps",i.render=function(t){if(t.frameState){var e=this.getMap();if(e.geolocation){var n=e.geolocation.getTracking(),r=this.element.classList.contains("disable");r&&!n?this.element.classList.remove("disable"):!r&&n&&this.element.classList.add("disable")}}},i.callback=function(){var t=this.element.classList.contains("disable");this.getMap().handleGPS(!t),t?this.element.classList.remove("disable"):this.element.classList.add("disable")},r=e.call(this,i),Hm.gps)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),$m=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};i.autoHide=!1;var o=document.createElement("span");(o.innerHTML=Hm.compass?'<img src="'.concat(Hm.compass,'">'):'<i class="fa fa-compass fa-lg ol-compass-fa"></i>',i.label=o,i.render=function(t){var e=this,n=t.frameState;if(n){var r=this.getMap().getView(),i=n.viewState.rotation,o=r.getCenter(),s=r.getDecimalZoom();if(i!=this.rotation_||o[0]!=this.center_[0]||o[1]!=this.center_[1]||s!=this.zoom_){if(!this.getMap().northUp){var a=this.element.classList.contains("disable");a||0!==i?a&&0!==i&&this.element.classList.remove("disable"):this.element.classList.add("disable")}var l=this,c=this.getMap().getLayers().item(0),u=c.getSource?c.getSource():c.getLayers().item(0).getSource();if(!u){var h="rotate(0rad)";return l.label_.style.msTransform=h,l.label_.style.webkitTransform=h,void(l.label_.style.transform=h)}u.viewpoint2MercsAsync().then((function(t){var n=u.mercs2MercViewpoint(t)[2],r="rotate(".concat(n,"rad)");if(l.label_.style.msTransform=r,l.label_.style.webkitTransform=r,l.label_.style.transform=r,e.getMap().northUp){console.log(n);var i=l.element.classList.contains("disable");!i&&Math.abs(n)<.1?l.element.classList.add("disable"):i&&Math.abs(n)>=.1&&l.element.classList.remove("disable")}}))}this.rotation_=i,this.center_=o,this.zoom_=s}},r=e.call(this,i),Hm.compass)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r.center_=[],r.zoom_=void 0,r.callResetNorth_=function(){var t=r.getMap().getLayers().item(0);(t.getSource?t.getSource():t.getLayers().item(0).getSource()).resetCirculation()},r}return Fm(n)}(sl),Jm=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.share?'<img src="'.concat(Hm.share,'">'):'<i class="fa fa-share-alt-square fa-lg"></i>',i.cls="ol-share",i.callback=function(){var t=this.getMap();t.dispatchEvent(new ts("click_control",t,{control:"share"}))},r=e.call(this,i),Hm.share)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),Qm=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.border?'<img src="'.concat(Hm.border,'">'):'<i class="fa fa-clone fa-lg"></i>',i.cls="ol-border",i.callback=function(){var t=this.getMap();t.dispatchEvent(new ts("click_control",t,{control:"border"}))},r=e.call(this,i),Hm.border)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),ty=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.help?'<img src="'.concat(Hm.help,'">'):'<i class="fa fa-question-circle fa-lg"></i>',i.cls="ol-maplat",i.callback=function(){var t=this.getMap();t.dispatchEvent(new ts("click_control",t,{control:"help"}))},r=e.call(this,i),Hm.help)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),ey=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.attr?'<img src="'.concat(Hm.attr,'">'):'<i class="fa fa-info-circle fa-lg"></i>',i.cls="ol-copyright",i.callback=function(){var t=this.getMap();t.dispatchEvent(new ts("click_control",t,{control:"copyright"}))},r=e.call(this,i),Hm.attr)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),ny=function(t){Bm(n,t);var e=Gm(n);function n(t){var r;Dm(this,n);var i=t||{};(i.character=Hm.hide_marker?'<img src="'.concat(Hm.hide_marker,'">'):'<i class="fa fa-map-marker fa-lg"></i>',i.cls="ol-hide-marker",i.callback=function(){var t=this.getMap();t.dispatchEvent(new ts("click_control",t,{control:"hideMarker"}))},i.long_callback=function(){var t=this.getMap();t.dispatchEvent(new ts("click_control",t,{control:"hideLayer"}))},r=e.call(this,i),Hm.hide_marker)&&(r.element.querySelector("button").style.backgroundColor="rgba(0,0,0,0)");return r}return Fm(n)}(Vm),ry=function(t){Bm(n,t);var e=Gm(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(Dm(this,n),Hm.zoom_plus&&(r.zoomInLabel=ai('<img src="'.concat(Hm.zoom_plus,'">'))[0]),Hm.zoom_minus&&(r.zoomOutLabel=ai('<img src="'.concat(Hm.zoom_minus,'">'))[0]),t=e.call(this,r),Hm.compass)&&t.element.querySelectorAll("button").forEach((function(t){t.style.backgroundColor="rgba(0,0,0,0)"}));return t}return Fm(n)}(ll);function iy(t){return function(t){if(Array.isArray(t))return oy(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return oy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oy(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function sy(){sy=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new C(i||[]);return r(s,"_invoke",{value:w(t,n,a)}),s}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function p(){}function f(){}function d(){}var g={};l(g,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(T([])));m&&m!==e&&n.call(m,o)&&(g=m);var y=d.prototype=p.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,s,a){var l=u(t[r],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==ay(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return i("throw",t,s,a)}))}a(l.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===h)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=u(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:f,configurable:!0}),f.displayName=l(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new b(c(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(y),l(y,a,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function ay(t){return ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ay(t)}function ly(t,e,n,r,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,i)}function cy(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){ly(o,r,i,s,a,"next",t)}function a(t){ly(o,r,i,s,a,"throw",t)}s(void 0)}))}}function uy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==ay(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==ay(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===ay(o)?o:String(o)),r)}var i,o}function hy(t,e){return hy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hy(t,e)}function py(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dy(t);if(e){var i=dy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===ay(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fy(t)}(this,n)}}function fy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dy(t){return dy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dy(t)}at.use([ut,ft]);var gy=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hy(t,e)}(l,e);var n,r,i,o,s,a=py(l);function l(t){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),e=a.call(this),r={state_url:"stateUrl",restore_session:"restoreSession",enable_share:"enableShare",mobile_if:"mobileIF",pwa_manifest:"pwaManifest",pwa_worker:"pwaWorker",pwa_scope:"pwaScope"},n=ui(n=t),(t=Object.keys(r).reduce((function(t,e){return t[e]&&(t[r[e]]=t[e],delete t[e]),t}),n)).control&&function(t){Hm=t,Object.keys(Hm).forEach((function(t){qm[t]&&(Am[qm[t]]=Hm[t])}))}(t.control);var i=fy(e);return i.html_id_seed="".concat(Math.floor(9e3*Math.random())+1e3),t.stateUrl?((0,gt.Z)((function(e,n){var r=e.canonicalPath.split("#!"),o=r.length>1?r[1]:r[0];if(r=o.split("?"),(o=r[0])!==i.pathThatSet){var s={transparency:0,position:{rotation:0}};o.split("/").map((function(t){var e=t.split(":");switch(e[0]){case"s":s.mapID=e[1];break;case"b":s.backgroundID=e[1];break;case"t":s.transparency=parseFloat(e[1]);break;case"r":s.position.rotation=parseFloat(e[1]);break;case"z":s.position.zoom=parseFloat(e[1]);break;case"x":case"y":s.position[e[0]]=parseFloat(e[1]);break;case"sb":s.showBorder=!!parseInt(e[1]);break;case"hm":s.hideMarker=!!parseInt(e[1]);break;case"hl":s.hideLayer=e[1];break;case"c":if(i.core){var n=i.core.mapDivDocument.querySelector(".modalBase");new vt.Z.Modal(n,{root:i.core.mapDivDocument}).hide()}}})),i.core?s.mapID&&i.core.waitReady.then((function(){i.core.changeMap(s.mapID,s)})):(s.mapID&&(t.restore=s),i.initializer(t))}else delete i.pathThatSet})),(0,gt.Z)({hashbang:!0}),(0,gt.Z)(),i.waitReady=new Promise((function(t,e){i.waitReadyBridge=t}))):i.initializer(t),e}return n=l,r=[{key:"initializer",value:(s=cy(sy().mark((function e(n){var r,i,o,s,a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x;return sy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x=function(t){r.contextMenu.clear();var e=[];t.forEach((function(t){r.contextMenu.push(t),t.mouseOnTask&&e.push([t.mouseOnTask,t.mouseOutTask])}));var n=r.core.lastClickEvent.coordinate,i=r.core.lastClickEvent.pixel;r.contextMenu.disabled||(r.contextMenu.on("open",(function t(){if(r.contextMenu.removeEventListener("open",t),e.length>0){var n=iy(r.core.mapDivDocument.querySelectorAll(".ol-ctx-menu-container ul li")).map((function(t,n){var r=e[n];return t.addEventListener("mouseover",r[0]),t.addEventListener("mouseout",r[1]),[t,r[0],r[1]]}));r.contextMenu.on("close",(function t(){r.contextMenu.removeEventListener("close",t),n.forEach((function(t){t[0].removeEventListener("mouseover",t[1]),t[0].removeEventListener("mouseout",t[2])}))}))}})),r.contextMenu.Internal.openMenu(i,n),r.core.mapObject.getViewport().addEventListener("pointerdown",{handleEvent:function(t){r.contextMenu.Internal.opened&&(r.contextMenu.Internal.closeMenu(),t.stopPropagation(),r.core.mapObject.getViewport().removeEventListener(t.type,this,!1))}},!1))},r=this,n.translateUI=!0,r.core=new bm(n),n.icon&&(Am["defaultpin.png"]=n.icon),n.restore?(r.setShowBorder(n.restore.showBorder||!1),n.restore.hideMarker&&r.core.mapDivDocument.classList.add("hide-marker")):n.restoreSession?(i=parseInt(localStorage.getItem("epoch")||0),o=Math.floor((new Date).getTime()/1e3),i&&o-i<3600&&r.setShowBorder(!!parseInt(localStorage.getItem("showBorder")||"0")),r.core.initialRestore.hideMarker&&r.core.mapDivDocument.classList.add("hide-marker")):r.setShowBorder(!1),s=!r.core.initialRestore.mapID,a=r.core.initialRestore.transparency,l=!n.presentation_mode,c=n.enablePoiHtmlNoScroll,n.enableShare&&(r.core.mapDivDocument.classList.add("enable_share"),r.enableShare=!0),n.enableHideMarker&&(r.core.mapDivDocument.classList.add("enable_hide_marker"),r.enableHideMarker=!0),n.enableBorder&&(r.core.mapDivDocument.classList.add("enable_border"),r.enableBorder=!0),n.disableNoimage&&(r.disableNoimage=!0),n.stateUrl&&r.core.mapDivDocument.classList.add("state_url"),r.core.enableCache&&r.core.mapDivDocument.classList.add("enable_cache"),"ontouchstart"in window&&(r.core.mapDivDocument.classList.add("ol-touch"),r.isTouch=!0),n.mobileIF&&(n.debug=!0),n.appEnvelope&&(r.appEnvelope=!0),u=n.pwaManifest,h=n.pwaWorker,p=n.pwaScope,f=ai('<d c="ol-control map-title"><s></s></d> <d c="swiper-container ol-control base-swiper prevent-default-ui"> <d c="swiper-wrapper"></d> <d c="swiper-button-next base-next swiper-button-white"></d> <d c="swiper-button-prev base-prev swiper-button-white"></d> </d> <d c="swiper-container ol-control overlay-swiper prevent-default-ui"> <d c="swiper-wrapper"></d> <d c="swiper-button-next overlay-next swiper-button-white"></d> <d c="swiper-button-prev overlay-prev swiper-button-white"></d> </d> ');for(d=f.length-1;d>=0;d--)r.core.mapDivDocument.insertBefore(f[d],r.core.mapDivDocument.firstChild);for(g=r.core.mapDivDocument.querySelectorAll(".prevent-default-ui"),v=0;v<g.length;v++)g[v].addEventListener("touchstart",(function(t){t.preventDefault()}));for(f=ai('<d c="modal modalBase" tabindex="-1" role="dialog" aria-labelledby="staticModalLabel" aria-hidden="true" data-show="true" data-keyboard="false" data-backdrop="static"> <d c="modal-dialog"> <d c="modal-content"> <d c="modal-header"> <button type="button" c="close" data-dismiss="modal"> <s aria-hidden="true">&#215;</s><s c="sr-only" din="html.close"></s> </button> <h4 c="modal-title"> <s c="modal_title"></s> <s c="modal_load_title"></s> <s c="modal_gpsW_title" din="html.acquiring_gps"></s> <s c="modal_help_title" din="html.help_title"></s> <s c="modal_share_title" din="html.share_title"></s> <s c="modal_hide_marker_title" din="html.hide_marker_title"></s> </h4> </d> <d c="modal-body"> <d c="modal_help_content"> <d c="help_content"> <s dinh="html.help_using_maplat"></s> <p c="col-xs-12 help_img"><img src="'.concat(Am["fullscreen.png"],'"></p> <h4 din="html.help_operation_title"></h4> <p dinh="html.help_operation_content" c="recipient"></p> <h4 din="html.help_selection_title"></h4> <p dinh="html.help_selection_content" c="recipient"></p> <h4 din="html.help_gps_title"></h4> <p dinh="html.help_gps_content" c="recipient"></p> <h4 din="html.help_poi_title"></h4> <p dinh="html.help_poi_content" c="recipient"></p> <h4 din="html.help_etc_title"></h4> <ul> <li dinh="html.help_etc_attr" c="recipient"></li> <li dinh="html.help_etc_help" c="recipient"></li> <s c="share_help"><li dinh="html.help_share_help" c="recipient"></li></s> <s c="border_help"><li dinh="html.help_etc_border" c="recipient"></li></s> <s c="hide_marker_help"><li dinh="html.help_etc_hide_marker" c="recipient"></li></s> <li dinh="html.help_etc_slider" c="recipient"></li> </ul> <p><a href="https://github.com/code4history/Maplat/wiki" target="_blank">Maplat</a> © 2015- Kohei Otsuka, Code for History</p> </d> </d> <d c="modal_poi_content"> <d c="poi_web').concat(c?"":" embed-responsive embed-responsive-60vh",'"> <iframe c="poi_iframe iframe_poi" frameborder="0" src=""').concat(c?" onload=\"window.addEventListener('message', (e) =>{if (e.data[0] == 'setHeight') {console.log(this.style.height = e.data[1]);}});\" scrolling=\"no\"":"",'></iframe> </d> <d c="poi_data hide"> <d c="col-xs-12 swiper-container poi_img_swiper"> <d c="swiper-wrapper"></d> <d c="swiper-pagination poi-pagination"></d> <d c="swiper-button-next poi-img-next"></d> <d c="swiper-button-prev poi-img-prev"></d> </d> <p c="recipient poi_address"></p> <p c="recipient poi_desc"></p> </d> </d> <d c="modal_share_content"> <h4 din="html.share_app_title"></h4> <d id="___maplat_app_toast_').concat(r.html_id_seed,'"></d> <d c="recipient row"> <d c="form-group col-xs-4 text-center"><button title="Copy to clipboard" c="share btn btn-light" data="cp_app"><i c="fa fa-clipboard"></i>&nbsp;<small din="html.share_copy"></small></button></d> <d c="form-group col-xs-4 text-center"><button title="Twitter" c="share btn btn-light" data="tw_app"><i c="fa fa-twitter"></i>&nbsp;<small>Twitter</small></button></d> <d c="form-group col-xs-4 text-center"><button title="Facebook" c="share btn btn-light" data="fb_app"><i c="fa fa-facebook"></i>&nbsp;<small>Facebook</small></button></d> </d> <d c="qr_app center-block" style="width:128px;"></d> <d c="modal_share_state"> <h4 din="html.share_state_title"></h4> <d id="___maplat_view_toast_').concat(r.html_id_seed,'"></d> <d c="recipient row"> <d c="form-group col-xs-4 text-center"><button title="Copy to clipboard" c="share btn btn-light" data="cp_view"><i c="fa fa-clipboard"></i>&nbsp;<small din="html.share_copy"></small></button></d> <d c="form-group col-xs-4 text-center"><button title="Twitter" c="share btn btn-light" data="tw_view"><i c="fa fa-twitter"></i>&nbsp;<small>Twitter</small></button></d> <d c="form-group col-xs-4 text-center"><button title="Facebook" c="share btn btn-light" data="fb_view"><i c="fa fa-facebook"></i>&nbsp;<small>Facebook</small></button></d> </d> <d c="qr_view center-block" style="width:128px;"></d> </d> <p><img src="" height="0px" width="0px"></p> </d> <d c="modal_map_content"> ').concat(ri.map((function(t){return"title"==t||"officialTitle"==t?"":'<d c="recipients '.concat(t,'_div"><dl c="dl-horizontal"> <dt din="html.').concat(t,'"></dt> <dd c="').concat(t,'_dd"></dd> </dl></d> ')})).join(""),' <d c="recipients modal_cache_content"><dl c="dl-horizontal"> <dt din="html.cache_handle"></dt> <dd><s c="cache_size"></s></dd> <dt></dt> <dd><s c="pull-right"><button c="cache_fetch btn btn-default" href="#" din="html.cache_fetch"></button> <button c="cache_delete btn btn-default" href="#" din="html.cache_delete"></button></s></dd> </dl></d> </d> <d c="modal_load_content"> <p c="recipient"><img src="').concat(Am["loading.png"],'"><s din="html.app_loading_body"></s></p> <d c="splash_div hide row"><p c="col-xs-12 poi_img"><img c="splash_img" src=""></p></d> <p><img src="" height="0px" width="0px"></p> </d> <d c="modal_hide_marker_content"> <ul c="list-group"></ul> </d> <p c="modal_gpsD_content" c="recipient"></p> <p c="modal_gpsW_content" c="recipient"></p> </d> </d> </d> </d> ')),m=f.length-1;m>=0;m--)r.core.mapDivDocument.insertBefore(f[m],r.core.mapDivDocument.firstChild);for(y=r.core.mapDivDocument.querySelectorAll(".btn.share"),_=0;_<y.length;_++)y[_].addEventListener("click",(function(t){var e=t.target;e.classList.contains("share")||(e=e.parentElement);var n=e.getAttribute("data").split("_"),i=t.target.baseURI;i||(i=window.location.href);var o=i.split("#!"),s=o.length>1?o[1].split("?")[0]:"",a=o[0].split("?"),l=a[0],c=a.length>1?a[1].split("&").filter((function(t){return"pwa"!==t})).join("&"):"";if(c&&(l="".concat(l,"?").concat(c)),"view"===n[1]&&s&&(l="".concat(l,"#!").concat(s)),"cp"===n[0]){var u=document.createElement("textarea");u.textContent=l;var h=document.querySelector("body");if(h.appendChild(u),/iP(hone|[oa]d)/.test(navigator.userAgent)){var p=document.createRange();p.selectNode(u),window.getSelection().addRange(p)}else u.select();document.execCommand("copy"),h.removeChild(u);var f="#___maplat_".concat(n[1],"_toast_").concat(r.html_id_seed);Mm.Z.show({message:r.core.t("app.copy_toast",{ns:"translation"}),close:!1,pauseOnHover:!1,timeout:1e3,progressBar:!1,target:f})}else if("tw"===n[0]){var d="https://twitter.com/share?url=".concat(encodeURIComponent(l),"&hashtags=Maplat");window.open(d,"_blank","width=650,height=450,menubar=no,toolbar=no,scrollbars=yes")}else if("fb"===n[0]){var g="https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(l),"&display=popup&ref=plugin&src=like&kid_directed_site=0");window.open(g,"_blank","width=650,height=450,menubar=no,toolbar=no,scrollbars=yes")}}));if(u){!0===u&&(u="./pwa/".concat(r.core.appid,"_manifest.json")),h||(h="./service-worker.js"),p||(p="./"),(b=document.querySelector("head")).querySelector('link[rel="manifest"]')||b.appendChild(ai('<link rel="manifest" href="'.concat(u,'">'))[0]);try{id.registerSW(h,{scope:p})}catch(t){}b.querySelector('link[rel="apple-touch-icon"]')||((w=new XMLHttpRequest).open("GET",u,!0),w.responseType="json",w.onload=function(e){var n=this.response;if(n&&("object"!=ay(n)&&(n=JSON.parse(n)),n.icons))for(var r=0;r<n.icons.length;r++){var i=t(u,n.icons[r].src),o=n.icons[r].sizes,s='<link rel="apple-touch-icon" sizes="'.concat(o,'" href="').concat(i,'">');b.appendChild(ai(s)[0])}},w.send())}r.core.addEventListener("uiPrepare",(function(t){for(var e=function(t){for(var e,n=/\$\{([a-zA-Z0-9_\.\/\-]+)\}/g,r=t;null!=(e=n.exec(t));)r=r.replace(e[0],Am[e[1]]);return r},n=r.core.mapDivDocument.querySelectorAll("[data-i18n]"),i=0;i<n.length;i++){var o=n[i],l=o.getAttribute("data-i18n");o.innerText=e(r.core.t(l))}n=r.core.mapDivDocument.querySelectorAll("[data-i18n-html]");for(var c=0;c<n.length;c++){var u=n[c],h=u.getAttribute("data-i18n-html");u.innerHTML=e(r.core.t(h))}var p={reverse:!0,tipLabel:r.core.t("control.trans",{ns:"translation"})};if(a&&(p.initialValue=a/100),r.sliderCommon=new Wm(p),r.core.appData.controls=[new ey({tipLabel:r.core.t("control.info",{ns:"translation"})}),new $m({tipLabel:r.core.t("control.compass",{ns:"translation"})}),new ry({tipLabel:r.core.t("control.zoom",{ns:"translation"})}),new Km({tipLabel:r.core.t("control.gps",{ns:"translation"})}),new Ym({tipLabel:r.core.t("control.home",{ns:"translation"})}),r.sliderCommon,new ty({tipLabel:r.core.t("control.help",{ns:"translation"})})],r.enableShare&&r.core.appData.controls.push(new Jm({tipLabel:r.core.t("control.share",{ns:"translation"})})),r.enableBorder&&r.core.appData.controls.push(new Qm({tipLabel:r.core.t("control.border",{ns:"translation"})})),r.enableHideMarker&&r.core.appData.controls.push(new ny({tipLabel:r.core.t("control.hide_marker",{ns:"translation"})})),r.contextMenu=new km({eventType:"__dummy__",width:170,defaultItems:!1,items:[]}),r.core.appData.controls.push(r.contextMenu),r.core.mapObject&&r.core.appData.controls.map((function(t){r.core.mapObject.addControl(t)})),r.sliderCommon.on("propertychange",(function(t){"slidervalue"===t.key&&r.core.setTransparency(100*r.sliderCommon.get(t.key))})),s){var f=!1;r.core.appData.splash&&(f=!0);var d=r.core.mapDivDocument.querySelector(".modalBase"),g=new vt.Z.Modal(d,{root:r.core.mapDivDocument});r.core.mapDivDocument.querySelector(".modal_load_title").innerText=r.core.translate(r.core.appData.appName),f&&(r.core.mapDivDocument.querySelector(".splash_img").setAttribute("src","img/".concat(r.core.appData.splash)),r.core.mapDivDocument.querySelector(".splash_div").classList.remove("hide")),r.modalSetting("load"),g.show();var v=f?1e3:200;r.splashPromise=new Promise((function(t){setTimeout((function(){t()}),v)}))}document.querySelector("title").innerHTML=r.core.translate(r.core.appName)})),r.core.addEventListener("sourceLoaded",(function(t){for(var e=t.detail,n=["maroon","deeppink","indigo","olive","royalblue","red","hotpink","green","yellow","navy","saddlebrown","fuchsia","darkslategray","yellowgreen","blue","mediumvioletred","purple","lime","darkorange","teal","crimson","darkviolet","darkolivegreen","steelblue","aqua"],i=[],o=0,s=0;s<e.length;s++){var a=e[s];if(a.envelope){r.appEnvelope&&a.envelope.geometry.coordinates[0].map((function(t){0===i.length?(i[0]=i[2]=t[0],i[1]=i[3]=t[1]):(t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1]))})),a.envelopeColor=n[o],(o+=1)===n.length&&(o=0);var l=a.envelope.geometry.coordinates[0];a.envelopeAreaIndex=r.areaIndex(l)}}r.appEnvelope&&console.log("This app's envelope is: ".concat(i)),r.splashPromise&&r.splashPromise.then((function(){var t=r.core.mapDivDocument.querySelector(".modalBase"),e=new vt.Z.Modal(t,{root:r.core.mapDivDocument});r.modalSetting("load"),e.hide()}));for(var c=[],u=[],h=0;h<e.length;h++){var p=e[h];p instanceof jf&&!(p instanceof Qf)?c.push(p):u.push(p)}var f=r.baseSwiper=new at(".base-swiper",{slidesPerView:2,spaceBetween:15,breakpoints:{480:{slidesPerView:1.4,spaceBetween:10}},centeredSlides:!0,threshold:2,loop:c.length>=2,navigation:{nextEl:".base-next",prevEl:".base-prev"}});f.on("click",(function(t){if(f.clickedSlide){var e=f.clickedSlide;r.core.changeMap(e.getAttribute("data")),delete r._selectCandidateSources,f.setSlideIndexAsSelected(e.getAttribute("data-swiper-slide-index"))}})),c.length<2&&r.core.mapDivDocument.querySelector(".base-swiper").classList.add("single-map");var d=r.overlaySwiper=new at(".overlay-swiper",{slidesPerView:2,spaceBetween:15,breakpoints:{480:{slidesPerView:1.4,spaceBetween:10}},centeredSlides:!0,threshold:2,loop:u.length>=2,navigation:{nextEl:".overlay-next",prevEl:".overlay-prev"}});d.on("click",(function(t){if(d.clickedSlide){var e=d.clickedSlide;r.core.changeMap(e.getAttribute("data")),delete r._selectCandidateSources,d.setSlideIndexAsSelected(e.getAttribute("data-swiper-slide-index"))}})),u.length<2&&r.core.mapDivDocument.querySelector(".overlay-swiper").classList.add("single-map");for(var g=0;g<c.length;g++){var v=c[g];f.appendSlide('<div class="swiper-slide" data="'.concat(v.mapID,'">')+'<img crossorigin="anonymous" src="'.concat(v.thumbnail,'"><div> ').concat(r.core.translate(v.label),"</div> </div> "))}for(var m=0;m<u.length;m++){var y=u[m],_=y.envelope?" ".concat(y.envelopeColor):"";d.appendSlide('<div class="swiper-slide'.concat(_,'" data="').concat(y.mapID,'">')+'<img crossorigin="anonymous" src="'.concat(y.thumbnail,'"><div> ').concat(r.core.translate(y.label),"</div> </div> "))}f.on,d.on,f.slideToLoop(0),d.slideToLoop(0),r.ellips()})),r.core.addEventListener("mapChanged",(function(t){var e=t.detail;r.baseSwiper.setSlideMapID(e.mapID),r.overlaySwiper.setSlideMapID(e.mapID);var n=e.officialTitle||e.title||e.label;r.core.mapDivDocument.querySelector(".map-title span").innerText=r.core.translate(n),r.checkOverlayID(e.mapID)?r.sliderCommon.setEnable(!0):r.sliderCommon.setEnable(!1);var i=100*r.sliderCommon.get("slidervalue");r.core.mapObject.setTransparency(i),r.updateEnvelope()})),r.core.addEventListener("poi_number",(function(t){t.detail?r.core.mapDivDocument.classList.remove("no_poi"):r.core.mapDivDocument.classList.add("no_poi")})),r.core.addEventListener("outOfMap",(function(t){if(l){r.core.mapDivDocument.querySelector(".modal_title").innerText=r.core.t("app.out_of_map"),r.core.mapDivDocument.querySelector(".modal_gpsD_content").innerText=r.core.t("app.out_of_map_area");var e=r.core.mapDivDocument.querySelector(".modalBase"),n=new vt.Z.Modal(e,{root:r.core.mapDivDocument});r.modalSetting("gpsD"),n.show()}})),r.core.mapDivDocument.addEventListener("mouseout",(function(t){r._selectCandidateSources&&(Object.keys(r._selectCandidateSources).forEach((function(t){return r.core.mapObject.removeEnvelope(r._selectCandidateSources[t])})),delete r._selectCandidateSources)})),r.core.addEventListener("pointerMoveOnMapXy",function(){var t=cy(sy().mark((function t(e){var n;return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.core.stateBuffer.showBorder){t.next=3;break}return r._selectCandidateSources&&(Object.keys(r._selectCandidateSources).forEach((function(t){return r.core.mapObject.removeEnvelope(r._selectCandidateSources[t])})),delete r._selectCandidateSources),t.abrupt("return");case 3:return t.next=5,r.xyToMapIDs(e.detail);case 5:n=t.sent,r.showFillEnvelope(n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),r.core.addEventListener("clickMapXy",function(){var t=cy(sy().mark((function t(e){var n,i;return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.core.stateBuffer.showBorder){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,r.xyToMapIDs(e.detail);case 4:(n=t.sent).length>0&&(x(n.map((function(t){var e=r.core.cacheHash[t],o=e.envelopeColor,s='<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"> <polygon x="0" y="0" points="2,2 2,8 8,8 8,2 2,2" stroke="'.concat(o,'" fill="').concat(o,'" stroke-width="2" style="fill-opacity: .25;"></polygon></svg>');return{icon:s="data:image/svg+xml,".concat(encodeURIComponent(s)),text:r.core.translate(e.title),callback:function(){var e=iy(r.core.mapDivDocument.querySelectorAll(".ol-ctx-menu-container ul li"));if(e.forEach((function(t){return t.classList.remove("selected")})),!i||i!==t){i=t,r.showFillEnvelope([t]),r.overlaySwiper.slideToMapID(t);var o=n.indexOf(t);return o>-1&&e[o].classList.add("selected"),!0}delete r._selectCandidateSources,r.core.changeMap(t)},mouseOnTask:function(e){r.isTouch||(i=t,r.showFillEnvelope([t]),r.overlaySwiper.slideToMapID(t))},mouseOutTask:function(t){r.isTouch||(i=void 0,r.showFillEnvelope([]))}}}))),r.showFillEnvelope(n));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),r.core.addEventListener("clickMarkers",(function(t){var e=t.detail;1===e.length?r.handleMarkerAction(e[0]):x(e.map((function(t){return{icon:t.icon||Am["defaultpin.png"],text:r.core.translate(t.name),callback:function(){r.handleMarkerAction(t)}}})))})),n.stateUrl&&r.core.addEventListener("updateState",(function(t){var e=t.detail;if(e.position&&e.mapID){var n="s:".concat(e.mapID);e.backgroundID&&(n="".concat(n,"/b:").concat(e.backgroundID)),e.transparency&&(n="".concat(n,"/t:").concat(e.transparency)),n="".concat(n,"/x:").concat(e.position.x,"/y:").concat(e.position.y),n="".concat(n,"/z:").concat(e.position.zoom),e.position.rotation&&(n="".concat(n,"/r:").concat(e.position.rotation)),e.showBorder&&(n="".concat(n,"/sb:").concat(e.showBorder)),e.hideMarker&&(n="".concat(n,"/hm:").concat(e.hideMarker)),e.hideLayer&&(n="".concat(n,"/hl:").concat(e.hideLayer)),r.pathThatSet=n,(0,gt.Z)(n)}})),r.waitReady=r.core.waitReady.then((function(){var t,e,i=!!n.fake&&r.core.appData.fake_gps,o=!!n.fake&&r.core.appData.fake_center,s=!!n.fake&&r.core.appData.fake_radius,a=!1,l=null;function c(t){if(t&&t.error){if(r.core.currentPosition=null,"gps_out"===t.error&&a){a=!1;var e=r.core.mapDivDocument.querySelector(".modalBase"),n=new vt.Z.Modal(e,{root:r.core.mapDivDocument});r.core.mapDivDocument.querySelector(".modal_title").innerText=r.core.t("app.out_of_map"),r.core.mapDivDocument.querySelector(".modal_gpsD_content").innerText=r.core.t("app.out_of_map_desc"),r.modalSetting("gpsD"),n.show()}}else r.core.currentPosition=t;if(a){a=!1;var i=r.core.mapDivDocument.querySelector(".modalBase");new vt.Z.Modal(i,{root:r.core.mapDivDocument}).hide()}}if(r.core.mapObject.on("gps_request",(function(){l="gps_request";var t=[new Promise((function(t){"gps_request"!==l?t(l):l=t}))];a=!0;var e=r.core.mapDivDocument.querySelector(".modalBase"),n=new vt.Z.Modal(e,{root:r.core.mapDivDocument});r.modalSetting("gpsW"),n.show(),t.push(new Promise((function(t){setTimeout(t,200)}))),Promise.all(t).then((function(t){c(t[0])}))})),r.core.mapObject.on("gps_result",(function(t){"gps_request"===l?l=t.frameState:l?(l(t.frameState),l=null):a||c(t.frameState)})),r.core.mapObject.on("click_control",function(){var n=cy(sy().mark((function n(i){var o,s,a,l,c,u,h,p,f,d,g,v,m,y,_,b,w,x,S,E,C,T,O,k;return sy().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=i.frameState.control,s=r.core.mapDivDocument.querySelector(".modalBase"),a=new vt.Z.Modal(s,{root:r.core.mapDivDocument}),"copyright"!==o){n.next=34;break}if(l=r.core.getMapMeta(),ri.reduce((function(t,e){return"title"===e?t:l[e]||t}),!1)){n.next=7;break}return n.abrupt("return");case 7:if(r.core.mapDivDocument.querySelector(".modal_title").innerText=r.core.translate(l.officialTitle||l.title),ri.map((function(t){"title"!==t&&"officialTitle"!==t&&(l[t]&&""!==l[t]?(r.core.mapDivDocument.querySelector(".".concat(t,"_div")).classList.remove("hide"),r.core.mapDivDocument.querySelector(".".concat(t,"_dd")).innerHTML="license"===t||"dataLicense"===t?'<img src="'.concat(Am["".concat(l[t].toLowerCase().replace(/ /g,"_"),".png")],'">'):r.core.translate(l[t])):r.core.mapDivDocument.querySelector(".".concat(t,"_div")).classList.add("hide"))})),c=r.core.mapDivDocument.querySelector(".cache_delete"),u=r.core.mapDivDocument.querySelector(".cache_fetch"),h=function(t){var e=t.size||0,n="Bytes";-1!==e&&(e>1024&&(e=Math.round(10*e/1024)/10,n="KBytes"),e>1024&&(e=Math.round(10*e/1024)/10,n="MBytes"),e>1024&&(e=Math.round(10*e/1024)/10,n="GBytes"));var i=-1===e?r.core.t("html.cache_processing"):"".concat(e," ").concat(n);i=t.total?"".concat(i," (").concat(t.count," / ").concat(t.total," tiles [").concat(t.percent,"%])"):"".concat(i," (").concat(t.count," tiles)"),r.core.mapDivDocument.querySelector(".cache_size").innerHTML=i,0!=t.count?c.removeAttribute("disabled"):c.setAttribute("disabled",!0),t.total?(u.classList.remove("hide"),t.total===t.count?u.setAttribute("disabled",!0):u.removeAttribute("disabled")):u.classList.add("hide")},r.modalSetting("map"),p=r.core.mapDivDocument.querySelector(".modal_cache_content"),!r.core.getMapCacheEnable(l.mapID)){n.next=30;break}return p.classList.remove("hide"),f=function(){var t=cy(sy().mark((function t(e){var n;return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.preventDefault(),n=r.core.getMapMeta(),t.next=4,r.core.clearMapTileCacheAsync(n.mapID);case 4:return t.t0=h,t.next=7,r.core.getMapTileCacheStatsAsync(n.mapID);case 7:t.t1=t.sent,(0,t.t0)(t.t1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var t=cy(sy().mark((function t(e){var n;return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&e.preventDefault(),n=r.core.getMapMeta(),t.next=4,r.core.cancelMapTileCacheAsync(n.mapID);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=cy(sy().mark((function t(e){var n,i;return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.core.mapDivDocument.querySelector(".close"),e.preventDefault(),u.innerHTML=r.core.t("html.cache_cancel"),u.removeEventListener("click",g),u.addEventListener("click",d),n.classList.add("temp_no_close"),i=r.core.getMapMeta(),t.next=9,r.core.fetchAllMapTileCacheAsync(i.mapID,function(){var t=cy(sy().mark((function t(e,o){return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="proceed"===t.t0?3:"canceled"===t.t0||"stop"===t.t0||"finish"===t.t0?5:14;break;case 3:return h({count:o.processed,total:o.total,percent:o.percent,size:-1}),t.abrupt("return");case 5:return u.innerHTML=r.core.t("html.cache_fetch"),u.removeEventListener("click",d),u.addEventListener("click",g),n.classList.remove("temp_no_close"),t.t1=h,t.next=12,r.core.getMapTileCacheStatsAsync(i.mapID);case 12:t.t2=t.sent,(0,t.t1)(t.t2);case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}());case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),v=function t(e){c.removeEventListener("click",f,!1),u.removeEventListener("click",g,!1),u.removeEventListener("click",d,!1),s.removeEventListener("hide.bs.modal",t,!1)},s.addEventListener("hide.bs.modal",v,!1),n.t0=h,n.next=25,r.core.getMapTileCacheStatsAsync(l.mapID);case 25:n.t1=n.sent,(0,n.t0)(n.t1),setTimeout((function(){c.addEventListener("click",f,!1),u.addEventListener("click",g,!1),u.innerHTML=r.core.t("html.cache_fetch")}),200),n.next=31;break;case 30:p.classList.add("hide");case 31:a.show(),n.next=35;break;case 34:"help"===o?(r.modalSetting("help"),a.show()):"share"===o?(r.modalSetting("share"),m=location.href,y=m.split("#!"),_=y.length>1?y[1].split("?")[0]:"",b=y[0].split("?"),w=b[0],(x=b.length>1?b[1].split("&").filter((function(t){return"pwa"!==t})).join("&"):"")&&(w="".concat(w,"?").concat(x)),S=w,_&&(S="".concat(S,"#!").concat(_)),t?t.makeCode(w):t=new Pm(r.core.mapDivDocument.querySelector(".qr_app"),{text:w,width:128,height:128,colorDark:"#000000",colorLight:"#ffffff",correctLevel:Pm.CorrectLevel.H}),e?e.makeCode(S):e=new Pm(r.core.mapDivDocument.querySelector(".qr_view"),{text:S,width:128,height:128,colorDark:"#000000",colorLight:"#ffffff",correctLevel:Pm.CorrectLevel.H}),a.show()):"border"===o?(E=!r.core.stateBuffer.showBorder,r.setShowBorder(E)):"hideMarker"===o?(C=!r.core.stateBuffer.hideMarker,r.setHideMarker(C)):"hideLayer"===o&&(r.modalSetting("hide_marker"),T=r.core.listPoiLayers(!1,!0),O=r.core.mapDivDocument.querySelector("ul.list-group"),k=r.core.mapDivDocument.querySelector(".modalBase"),O.innerHTML="",T.map((function(t,e){for(var n=t.icon||Am["defaultpin.png"],i=r.core.translate(t.name),o=!t.hide,s=t.namespaceID,a=ai('<li c="list-group-item"> <d c="row"> <d c="col-sm-1"><img c="markerlist" src="'.concat(n,'"></d> <d c="col-sm-9">').concat(i,'</d> <d c="col-sm-2"> <input type="checkbox" c="markerlist" data="').concat(s,'" id="___maplat_marker_').concat(e,"_").concat(r.html_id_seed,'"').concat(o?" checked":"",'/> <label c="check" for="___maplat_marker_').concat(e,"_").concat(r.html_id_seed,'"><d> </d> </label> </d> </d> </li>')),l=0;l<a.length;l++)O.appendChild(a[l]);var c=r.core.mapDivDocument.querySelector("#___maplat_marker_".concat(e,"_").concat(r.html_id_seed)),u=function(t){var e=t.target.getAttribute("data");t.target.checked?r.core.showPoiLayer(e):r.core.hidePoiLayer(e)};k.addEventListener("hide.bs.modal",(function t(e){k.removeEventListener("hide.bs.modal",t,!1),c.removeEventListener("change",u,!1)}),!1),c.addEventListener("change",u,!1)})),a.show());case 35:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()),i){var u=ai((0,Im.Z)(r.core.t("app.fake_explanation"),r.core.translate(o),s))[0];r.core.mapDivDocument.querySelector(".modal_gpsW_content").appendChild(u)}else{var h=ai(r.core.t("app.acquiring_gps_desc"))[0];r.core.mapDivDocument.querySelector(".modal_gpsW_content").appendChild(h)}r.waitReadyBridge&&(r.waitReadyBridge(),delete r.waitReadyBridge)}));case 42:case"end":return e.stop()}}),e,this)}))),function(t){return s.apply(this,arguments)})},{key:"modalSetting",value:function(t){var e=this.core.mapDivDocument.querySelector(".modalBase");["poi","map","load","gpsW","gpsD","help","share","hide_marker"].map((function(n){var r="modal_".concat(n);t===n?e.classList.add(r):e.classList.remove(r)}))}},{key:"handleMarkerAction",value:function(t){var e=this;if(t.directgo){var n=!1,r="";return"string"==typeof t.directgo?r=t.directgo:(r=t.directgo.href,n=t.directgo.blank||!1),void(n?window.open(r,"_blank"):window.location.href=r)}this.core.mapDivDocument.querySelector(".modal_title").innerText=this.core.translate(t.name);var i=this.core.mapDivDocument.querySelector(".modalBase");if(t.url||t.html){this.core.mapDivDocument.querySelector(".poi_web").classList.remove("hide"),this.core.mapDivDocument.querySelector(".poi_data").classList.add("hide");var o=this.core.mapDivDocument.querySelector(".poi_iframe");t.html?(o.addEventListener("load",(function t(e){e.currentTarget.removeEventListener(e.type,t);var n=ai('<style type="text/css">html, body { height: 100vh; } img { width: 100%; }</style>'),r=ai('<script> const heightGetter = document.querySelector("#heightGetter"); const resizeObserver = new ResizeObserver(entries => { window.parent.postMessage(["setHeight", (entries[0].target.clientHeight + 16) + "px"], "*"); }); resizeObserver.observe(heightGetter); <\/script>');o.contentDocument.head.appendChild(n[0]),o.contentDocument.head.appendChild(r[0])})),o.removeAttribute("src"),o.setAttribute("srcdoc",'<div id="heightGetter">'.concat(this.core.translate(t.html),"</div>"))):(o.removeAttribute("srcdoc"),o.setAttribute("src",this.core.translate(t.url)))}else{this.core.mapDivDocument.querySelector(".poi_data").classList.remove("hide"),this.core.mapDivDocument.querySelector(".poi_web").classList.add("hide");var s=[];t.image&&""!==t.image?(Array.isArray(t.image)?t.image:[t.image]).forEach((function(t){"string"==typeof t&&(t={src:t});var n=e.resolveRelativeLink(t.src,"img"),r='<a target="_blank" href="'.concat(n,'"><img src="').concat(n,'"></a>');t.desc&&(r="".concat(r,"<div>").concat(t.desc,"</div>")),s.push('<div class="swiper-slide">'.concat(r,"</div>"))})):this.disableNoimage||s.push('<div class="swiper-slide"><img src="'.concat(Am["no_image.png"],'"></div>')),i.addEventListener("shown.bs.modal",(function t(n){i.removeEventListener("shown.bs.modal",t,!1);var r=e.core.mapDivDocument.querySelector(".swiper-container.poi_img_swiper");0===s.length?r.classList.add("hide"):(r.classList.remove("hide"),e.poiSwiper||(e.poiSwiper=new at(".swiper-container.poi_img_swiper",{lazy:!0,modules:[ut,ft],pagination:{el:".poi-pagination",clickable:!0},navigation:{nextEl:".poi-img-next",prevEl:".poi-img-prev"}})),s.forEach((function(t){return e.poiSwiper.appendSlide(t)})))}),!1),this.core.mapDivDocument.querySelector(".poi_address").innerText=this.core.translate(t.address),this.core.mapDivDocument.querySelector(".poi_desc").innerHTML=this.core.translate(t.desc).replace(/\n/g,"<br>")}var a=new vt.Z.Modal(i,{root:this.core.mapDivDocument});this.core.selectMarker(t.namespaceID),i.addEventListener("hide.bs.modal",(function t(n){i.removeEventListener("hide.bs.modal",t,!1),e.core.unselectMarker()}),!1),i.addEventListener("hidden.bs.modal",(function t(n){i.removeEventListener("hidden.bs.modal",t,!1),e.poiSwiper&&(e.poiSwiper.removeAllSlides(),e.poiSwiper=void 0)}),!1),this.modalSetting("poi"),a.show()}},{key:"showFillEnvelope",value:function(t){var e=this;t.length>0?(e._selectCandidateSources||(e._selectCandidateSources={}),Object.keys(e._selectCandidateSources).forEach((function(n){var r=t.indexOf(n);r<0?(e.core.mapObject.removeEnvelope(e._selectCandidateSources[n]),delete e._selectCandidateSources[n]):t.splice(r,1)})),t.forEach((function(t){if(t!==e.core.from.mapID){var n=e.core.cacheHash[t],r=n.envelope.geometry.coordinates[0].map((function(t){return e.core.from.merc2SysCoordAsync(t)})),i=Ci(n.envelopeColor);(i=i.slice())[3]=.2,Promise.all(r).then((function(n){e._selectCandidateSources[t]=e.core.mapObject.setFillEnvelope(n,null,{color:i})}))}}))):e._selectCandidateSources&&(Object.keys(e._selectCandidateSources).forEach((function(t){return e.core.mapObject.removeEnvelope(e._selectCandidateSources[t])})),delete e._selectCandidateSources)}},{key:"xyToMapIDs",value:(o=cy(sy().mark((function t(e){var n,r,i,o,s,a,l,c,u,h=arguments;return sy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=h.length>1&&void 0!==h[1]?h[1]:10,r=this,i=(0,Kr.xm)(e),o=r.core.mapObject,s=o.getSize(),a=[[0,0],[s[0],0],s,[0,s[1]],[0,0]],l=a.map((function(t){return o.getCoordinateFromPixel(t)})),t.next=9,r.core.from instanceof jf?Promise.resolve(l):Promise.all(l.map((function(t){return r.core.from.sysCoord2MercAsync(t)})));case 9:return c=t.sent,u=r.areaIndex(c),t.abrupt("return",Promise.all(Object.keys(r.core.cacheHash).filter((function(t){return r.core.cacheHash[t].envelope})).map((function(t){var e=r.core.cacheHash[t];return Promise.all([Promise.resolve(e),Promise.all(e.envelope.geometry.coordinates[0].map((function(t){return r.core.from.merc2SysCoordAsync(t)})))])}))).then((function(t){var e=t.reduce((function(t,e){var n=e[0],o=e[1];if(n.mapID!==r.core.from.mapID){var s=(0,Kr.yu)([o]);bf(i,s)&&t.push(n)}return t}),[]).filter((function(t){return t.envelopeAreaIndex/u<n})).sort((function(t,e){return t.envelopeAreaIndex-e.envelopeAreaIndex})).map((function(t){return t.mapID}));return e})));case 12:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"setShowBorder",value:function(t){if(this.core.requestUpdateState({showBorder:t?1:0}),this.updateEnvelope(),t?this.core.mapDivDocument.classList.add("show-border"):this.core.mapDivDocument.classList.remove("show-border"),this.core.restoreSession){var e=Math.floor((new Date).getTime()/1e3);localStorage.setItem("epoch",e),localStorage.setItem("showBorder",t?1:0)}}},{key:"setHideMarker",value:function(t){t?(this.core.hideAllMarkers(),this.core.mapDivDocument.classList.add("hide-marker")):(this.core.showAllMarkers(),this.core.mapDivDocument.classList.remove("hide-marker"))}},{key:"updateEnvelope",value:function(){var t=this;t.core.mapObject&&(t.core.mapObject.resetEnvelope(),delete t._selectCandidateSources,t.core.stateBuffer.showBorder&&Object.keys(t.core.cacheHash).filter((function(e){return t.core.cacheHash[e].envelope})).map((function(e){var n=t.core.cacheHash[e],r=e===t.core.from.mapID&&n instanceof Jf?[[0,0],[n.width,0],[n.width,n.height],[0,n.height],[0,0]].map((function(t){return Promise.resolve(n.xy2SysCoord(t))})):n.envelope.geometry.coordinates[0].map((function(e){return t.core.from.merc2SysCoordAsync(e)}));Promise.all(r).then((function(e){t.core.mapObject.setEnvelope(e,{color:n.envelopeColor,width:2,lineDash:[6,6]})}))})))}},{key:"resolveRelativeLink",value:function(t,e){return e||(e="."),t.match(/\//)?t:"".concat(e,"/").concat(t)}},{key:"checkOverlayID",value:function(t){for(var e=this.overlaySwiper.$el[0].querySelectorAll(".swiper-slide"),n=0;n<e.length;n++)if(e[n].getAttribute("data")===t)return!0;return!1}},{key:"areaIndex",value:function(t){return.5*Math.abs([0,1,2,3].reduce((function(e,n,r){var i=t[r],o=t[r+1];return e+(i[0]-o[0])*(i[1]+o[1])}),0))}},{key:"ellips",value:function(){for(var t=function(t){for(var e=t.innerText.split(""),n="",r=0;r<e.length;r++)n+="<span>".concat(e[r],"</span>");n+='<span class="omit-mark">'.concat("…","</span>"),t.innerHTML=n},e=function(t){var e,n=t.querySelectorAll("span"),r=t.querySelector(".omit-mark"),i=0;n[0].style.display="";for(var o=1;o<n.length;o++)n[o].style.display="none";r.style.display="";for(var s=t.offsetHeight,a=!1,l=1;l<n.length-1;l++){if(n[l].style.display="",t.offsetHeight>s&&(a?(s=t.offsetHeight,i++):(a=!0,t.classList.add("minimize"))),i>=2){e=l-2;break}if(l>=n.length-2)return void(r.style.display="none")}for(var c=e;c<n.length-1;c++)n[c].style.display="none"},n=this.core.mapDivDocument.querySelectorAll(".swiper-slide div"),r=0;r<n.length;r++){var i=n[r];t(i),e(i)}}},{key:"remove",value:function(){this.core.remove(),delete this.core}}],r&&uy(n.prototype,r),i&&uy(n,i),Object.defineProperty(n,"prototype",{writable:!1}),l}(dt.Z);(window.Maplat={}).createObject=function(t){return new Promise((function(e){var n=new gy(t);n.waitReady.then((function(){e(n)}))}))}})()})();
3
3
  //# sourceMappingURL=maplat.js.map