/*! For license information please see main.d4554773.js.LICENSE.txt */
!function(){var e={950:function(e){e.exports=function(){"use strict";function e(e,i,r,a,o){!function e(n,i,r,a,o){for(;a>r;){if(a-r>600){var s=a-r+1,l=i-r+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(n,i,Math.max(r,Math.floor(i-l*c/s+h)),Math.min(a,Math.floor(i+(s-l)*c/s+h)),o)}var f=n[i],d=r,v=a;for(t(n,r,i),o(n[a],f)>0&&t(n,r,a);d<v;){for(t(n,d,v),d++,v--;o(n[d],f)<0;)d++;for(;o(n[v],f)>0;)v--}0===o(n[r],f)?t(n,r,v):t(n,++v,a),v<=i&&(r=v+1),i<=v&&(a=v-1)}}(e,i,r||0,a||e.length-1,o||n)}function t(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function n(e,t){return e<t?-1:e>t?1:0}var i=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(e,t,n){if(!n)return t.indexOf(e);for(var i=0;i<t.length;i++)if(n(e,t[i]))return i;return-1}function a(e,t){o(e,0,e.children.length,t,e)}function o(e,t,n,i,r){r||(r=v(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var a=t;a<n;a++){var o=e.children[a];s(r,e.leaf?i(o):o)}return r}function s(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function d(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,n,i,r,a){for(var o=[n,i];o.length;)if(!((i=o.pop())-(n=o.pop())<=r)){var s=n+Math.ceil((i-n)/r/2)*r;e(t,s,n,i,a),o.push(n,s,s,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(e){var t=this.data,n=[];if(!d(e,t))return n;for(var i=this.toBBox,r=[];t;){for(var a=0;a<t.children.length;a++){var o=t.children[a],s=t.leaf?i(o):o;d(e,s)&&(t.leaf?n.push(o):f(e,s)?this._all(o,n):r.push(o))}t=r.pop()}return n},i.prototype.collides=function(e){var t=this.data;if(!d(e,t))return!1;for(var n=[];t;){for(var i=0;i<t.children.length;i++){var r=t.children[i],a=t.leaf?this.toBBox(r):r;if(d(e,a)){if(t.leaf||f(e,a))return!0;n.push(r)}}t=n.pop()}return!1},i.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.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 i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},i.prototype.clear=function(){return this.data=v([]),this},i.prototype.remove=function(e,t){if(!e)return this;for(var n,i,a,o=this.data,s=this.toBBox(e),l=[],u=[];o||l.length;){if(o||(o=l.pop(),i=l[l.length-1],n=u.pop(),a=!0),o.leaf){var c=r(e,o.children,t);if(-1!==c)return o.children.splice(c,1),l.push(o),this._condense(l),this}a||o.leaf||!f(o,s)?i?(n++,o=i.children[n],a=!1):o=null:(l.push(o),u.push(n),n=0,i=o,o=o.children[0])}return this},i.prototype.toBBox=function(e){return e},i.prototype.compareMinX=function(e,t){return e.minX-t.minX},i.prototype.compareMinY=function(e,t){return e.minY-t.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(e){return this.data=e,this},i.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},i.prototype._build=function(e,t,n,i){var r,o=n-t+1,s=this._maxEntries;if(o<=s)return a(r=v(e.slice(t,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,i-1))),(r=v([])).leaf=!1,r.height=i;var l=Math.ceil(o/s),u=l*Math.ceil(Math.sqrt(s));g(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);g(e,c,h,l,this.compareMinY);for(var f=c;f<=h;f+=l){var d=Math.min(f+l-1,h);r.children.push(this._build(e,f,d,i-1))}}return a(r,this.toBBox),r},i.prototype._chooseSubtree=function(e,t,n,i){for(;i.push(t),!t.leaf&&i.length-1!==n;){for(var r=1/0,a=1/0,o=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=c(l),h=(f=e,d=l,(Math.max(d.maxX,f.maxX)-Math.min(d.minX,f.minX))*(Math.max(d.maxY,f.maxY)-Math.min(d.minY,f.minY))-u);h<a?(a=h,r=u<r?u:r,o=l):h===a&&u<r&&(r=u,o=l)}t=o||t.children[0]}var f,d;return t},i.prototype._insert=function(e,t,n){var i=n?e:this.toBBox(e),r=[],a=this._chooseSubtree(i,this.data,t,r);for(a.children.push(e),s(a,i);t>=0&&r[t].children.length>this._maxEntries;)this._split(r,t),t--;this._adjustParentBBoxes(i,r,t)},i.prototype._split=function(e,t){var n=e[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),s=v(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},i.prototype._splitRoot=function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(e,t,n){for(var i,r,a,s,l,u,h,f=1/0,d=1/0,v=t;v<=n-t;v++){var g=o(e,0,v,this.toBBox),p=o(e,v,n,this.toBBox),y=(r=g,a=p,s=void 0,l=void 0,u=void 0,h=void 0,s=Math.max(r.minX,a.minX),l=Math.max(r.minY,a.minY),u=Math.min(r.maxX,a.maxX),h=Math.min(r.maxY,a.maxY),Math.max(0,u-s)*Math.max(0,h-l)),m=c(g)+c(p);y<f?(f=y,i=v,d=m<d?m:d):y===f&&m<d&&(d=m,i=v)}return i||n-t},i.prototype._chooseSplitAxis=function(e,t,n){var i=e.leaf?this.compareMinX:l,r=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)},i.prototype._allDistMargin=function(e,t,n,i){e.children.sort(i);for(var r=this.toBBox,a=o(e,0,t,r),l=o(e,n-t,n,r),u=h(a)+h(l),c=t;c<n-t;c++){var f=e.children[c];s(a,e.leaf?r(f):f),u+=h(a)}for(var d=n-t-1;d>=t;d--){var v=e.children[d];s(l,e.leaf?r(v):v),u+=h(l)}return u},i.prototype._adjustParentBBoxes=function(e,t,n){for(var i=n;i>=0;i--)s(t[i],e)},i.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():a(e[t],this.toBBox)},i}()},463:function(e,t,n){"use strict";var i=n(791),r=n(296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},v={};function g(e,t,n,i,r,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){p[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];p[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){p[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){p[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){p[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){p[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){p[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){p[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){p[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function _(e,t,n,i){var r=p.hasOwnProperty(t)?p[t]:null;(null!==r?0!==r.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null===t||"undefined"===typeof t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,i)&&(n=null),i||null===r?function(e){return!!h.call(v,e)||!h.call(d,e)&&(f.test(e)?v[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,m);p[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,m);p[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,m);p[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){p[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),p.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){p[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),M=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function A(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D,N=Object.assign;function z(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var j=!1;function G(e,t){if(!e||j)return"";j=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var i=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){i=u}e.call(t.prototype)}else{try{throw Error()}catch(u){i=u}e()}}catch(u){if(u&&i&&"string"===typeof u.stack){for(var r=u.stack.split("\n"),a=i.stack.split("\n"),o=r.length-1,s=a.length-1;1<=o&&0<=s&&r[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(r[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||r[o]!==a[s]){var l="\n"+r[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{j=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function W(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=G(e.type,!1);case 11:return e=G(e.type.render,!1);case 1:return e=G(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case w:return"Fragment";case b:return"Portal";case C:return"Profiler";case S:return"StrictMode";case P:return"Suspense";case I:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case R:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case F:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function X(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=V(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function H(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function q(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=X(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function $(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function J(e,t){$(e,t);var n=X(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,X(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Q(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&H(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+X(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return N({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:X(n)}}function ae(e,t){var n=X(t.value),i=X(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,he=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var de={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ve=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function pe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=ge(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(de).forEach((function(e){ve.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var ye=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ke=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var be=null,we=null,Se=null;function Ce(e){if(e=_r(e)){if("function"!==typeof be)throw Error(a(280));var t=e.stateNode;t&&(t=xr(t),be(e.stateNode,e.type,t))}}function Ee(e){we?Se?Se.push(e):Se=[e]:we=e}function Te(){if(we){var e=we,t=Se;if(Se=we=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Re(e,t){return e(t)}function Pe(){}var Ie=!1;function Fe(e,t,n){if(Ie)return e(t,n);Ie=!0;try{return Re(e,t,n)}finally{Ie=!1,(null!==we||null!==Se)&&(Pe(),Te())}}function Me(e,t){var n=e.stateNode;if(null===n)return null;var i=xr(n);if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Le=!1;if(c)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(ce){Le=!1}function Ae(e,t,n,i,r,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var De=!1,Ne=null,ze=!1,je=null,Ge={onError:function(e){De=!0,Ne=e}};function We(e,t,n,i,r,a,o,s,l){De=!1,Ne=null,Ae.apply(Ge,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ue(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Be(e)!==e)throw Error(a(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var o=r.alternate;if(null===o){if(null!==(i=r.return)){n=i;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return Xe(r),e;if(o===i)return Xe(r),t;o=o.sibling}throw Error(a(188))}if(n.return!==i.return)n=r,i=o;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,i=o;break}if(l===i){s=!0,i=r,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,i=r;break}if(l===i){s=!0,i=o,n=r;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==i)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Ye(e):null}function Ye(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ye(e);if(null!==t)return t;e=e.sibling}return null}var Ke=r.unstable_scheduleCallback,He=r.unstable_cancelCallback,Ze=r.unstable_shouldYield,qe=r.unstable_requestPaint,$e=r.unstable_now,Je=r.unstable_getCurrentPriorityLevel,Qe=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,nt=r.unstable_LowPriority,it=r.unstable_IdlePriority,rt=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,r=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~r;0!==s?i=ht(s):0!==(a&=o)&&(i=ht(a))}else 0!==(o=n&~r)?i=ht(o):0!==a&&(i=ht(a));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&r)&&((r=i&-i)>=(a=t&-t)||16===r&&0!==(4194240&a)))return t;if(0!==(4&i)&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)r=1<<(n=31-ot(t)),i|=e[n],t&=~r;return i}function dt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function vt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-ot(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var _t=0;function kt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var xt,bt,wt,St,Ct,Et=!1,Tt=[],Rt=null,Pt=null,It=null,Ft=new Map,Mt=new Map,Lt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function At(e,t){switch(e){case"focusin":case"focusout":Rt=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":Ft.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mt.delete(t.pointerId)}}function Dt(e,t,n,i,r,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:a,targetContainers:[r]},null!==t&&(null!==(t=_r(t))&&bt(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Nt(e){var t=mr(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ue(n)))return e.blockedOn=t,void Ct(e.priority,(function(){wt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=_r(n))&&bt(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);ke=i,n.target.dispatchEvent(i),ke=null,t.shift()}return!0}function jt(e,t,n){zt(e)&&n.delete(t)}function Gt(){Et=!1,null!==Rt&&zt(Rt)&&(Rt=null),null!==Pt&&zt(Pt)&&(Pt=null),null!==It&&zt(It)&&(It=null),Ft.forEach(jt),Mt.forEach(jt)}function Wt(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Gt)))}function Bt(e){function t(t){return Wt(t,e)}if(0<Tt.length){Wt(Tt[0],e);for(var n=1;n<Tt.length;n++){var i=Tt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Rt&&Wt(Rt,e),null!==Pt&&Wt(Pt,e),null!==It&&Wt(It,e),Ft.forEach(t),Mt.forEach(t),n=0;n<Lt.length;n++)(i=Lt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)Nt(n),null===n.blockedOn&&Lt.shift()}var Ut=k.ReactCurrentBatchConfig,Xt=!0;function Vt(e,t,n,i){var r=_t,a=Ut.transition;Ut.transition=null;try{_t=1,Kt(e,t,n,i)}finally{_t=r,Ut.transition=a}}function Yt(e,t,n,i){var r=_t,a=Ut.transition;Ut.transition=null;try{_t=4,Kt(e,t,n,i)}finally{_t=r,Ut.transition=a}}function Kt(e,t,n,i){if(Xt){var r=Zt(e,t,n,i);if(null===r)Xi(e,t,i,Ht,n),At(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Rt=Dt(Rt,e,t,n,i,r),!0;case"dragenter":return Pt=Dt(Pt,e,t,n,i,r),!0;case"mouseover":return It=Dt(It,e,t,n,i,r),!0;case"pointerover":var a=r.pointerId;return Ft.set(a,Dt(Ft.get(a)||null,e,t,n,i,r)),!0;case"gotpointercapture":return a=r.pointerId,Mt.set(a,Dt(Mt.get(a)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(At(e,i),4&t&&-1<Ot.indexOf(e)){for(;null!==r;){var a=_r(r);if(null!==a&&xt(a),null===(a=Zt(e,t,n,i))&&Xi(e,t,i,Ht,n),a===r)break;r=a}null!==r&&i.stopPropagation()}else Xi(e,t,i,null,n)}}var Ht=null;function Zt(e,t,n,i){if(Ht=null,null!==(e=mr(e=xe(i))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ue(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ht=e,null}function qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Qe:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var $t=null,Jt=null,Qt=null;function en(){if(Qt)return Qt;var e,t,n=Jt,i=n.length,r="value"in $t?$t.value:$t.textContent,a=r.length;for(e=0;e<i&&n[e]===r[e];e++);var o=i-e;for(t=1;t<=o&&n[i-t]===r[a-t];t++);return Qt=r.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,i,r,a){for(var o in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(r):r[o]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(un),hn=N({},un,{view:0,detail:0}),fn=an(hn),dn=N({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),vn=an(dn),gn=an(N({},dn,{dataTransfer:0})),pn=an(N({},hn,{relatedTarget:0})),yn=an(N({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=N({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_n=an(mn),kn=an(N({},un,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wn[e])&&!!t[e]}function Cn(){return Sn}var En=N({},hn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?bn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(En),Rn=an(N({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=an(N({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),In=an(N({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=N({},dn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Mn=an(Fn),Ln=[9,13,27,32],On=c&&"CompositionEvent"in window,An=null;c&&"documentMode"in document&&(An=document.documentMode);var Dn=c&&"TextEvent"in window&&!An,Nn=c&&(!On||An&&8<An&&11>=An),zn=String.fromCharCode(32),jn=!1;function Gn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Vn(e,t,n,i){Ee(i),0<(t=Yi(t,"onChange")).length&&(n=new cn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Yn=null,Kn=null;function Hn(e){zi(e,0)}function Zn(e){if(K(kr(e)))return e}function qn(e,t){if("change"===e)return t}var $n=!1;if(c){var Jn;if(c){var Qn="oninput"in document;if(!Qn){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Qn="function"===typeof ei.oninput}Jn=Qn}else Jn=!1;$n=Jn&&(!document.documentMode||9<document.documentMode)}function ti(){Yn&&(Yn.detachEvent("onpropertychange",ni),Kn=Yn=null)}function ni(e){if("value"===e.propertyName&&Zn(Kn)){var t=[];Vn(t,Kn,e,xe(e)),Fe(Hn,t)}}function ii(e,t,n){"focusin"===e?(ti(),Kn=n,(Yn=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function ri(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Kn)}function ai(e,t){if("click"===e)return Zn(t)}function oi(e,t){if("input"===e||"change"===e)return Zn(t)}var si="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function li(e,t){if(si(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!h.call(t,r)||!si(e[r],t[r]))return!1}return!0}function ui(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ci(e,t){var n,i=ui(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ui(i)}}function hi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fi(){for(var e=window,t=H();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(i){n=!1}if(!n)break;t=H((e=t.contentWindow).document)}return t}function di(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function vi(e){var t=fi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hi(n.ownerDocument.documentElement,n)){if(null!==i&&di(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=n.textContent.length,a=Math.min(i.start,r);i=void 0===i.end?a:Math.min(i.end,r),!e.extend&&a>i&&(r=i,i=a,a=r),r=ci(n,a);var o=ci(n,i);r&&o&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gi=c&&"documentMode"in document&&11>=document.documentMode,pi=null,yi=null,mi=null,_i=!1;function ki(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_i||null==pi||pi!==H(i)||("selectionStart"in(i=pi)&&di(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},mi&&li(mi,i)||(mi=i,0<(i=Yi(yi,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=pi)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bi={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},wi={},Si={};function Ci(e){if(wi[e])return wi[e];if(!bi[e])return e;var t,n=bi[e];for(t in n)if(n.hasOwnProperty(t)&&t in Si)return wi[e]=n[t];return e}c&&(Si=document.createElement("div").style,"AnimationEvent"in window||(delete bi.animationend.animation,delete bi.animationiteration.animation,delete bi.animationstart.animation),"TransitionEvent"in window||delete bi.transitionend.transition);var Ei=Ci("animationend"),Ti=Ci("animationiteration"),Ri=Ci("animationstart"),Pi=Ci("transitionend"),Ii=new Map,Fi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mi(e,t){Ii.set(e,t),l(t,[e])}for(var Li=0;Li<Fi.length;Li++){var Oi=Fi[Li];Mi(Oi.toLowerCase(),"on"+(Oi[0].toUpperCase()+Oi.slice(1)))}Mi(Ei,"onAnimationEnd"),Mi(Ti,"onAnimationIteration"),Mi(Ri,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(Pi,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ai="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Di=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ai));function Ni(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,r,o,s,l,u){if(We.apply(this,arguments),De){if(!De)throw Error(a(198));var c=Ne;De=!1,Ne=null,ze||(ze=!0,je=c)}}(i,t,void 0,e),e.currentTarget=null}function zi(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var a=void 0;if(t)for(var o=i.length-1;0<=o;o--){var s=i[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&r.isPropagationStopped())break e;Ni(r,s,u),a=l}else for(o=0;o<i.length;o++){if(l=(s=i[o]).instance,u=s.currentTarget,s=s.listener,l!==a&&r.isPropagationStopped())break e;Ni(r,s,u),a=l}}}if(ze)throw e=je,ze=!1,je=null,e}function ji(e,t){var n=t[gr];void 0===n&&(n=t[gr]=new Set);var i=e+"__bubble";n.has(i)||(Ui(t,e,2,!1),n.add(i))}function Gi(e,t,n){var i=0;t&&(i|=4),Ui(n,e,i,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function Bi(e){if(!e[Wi]){e[Wi]=!0,o.forEach((function(t){"selectionchange"!==t&&(Di.has(t)||Gi(t,!1,e),Gi(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wi]||(t[Wi]=!0,Gi("selectionchange",!1,t))}}function Ui(e,t,n,i){switch(qt(t)){case 1:var r=Vt;break;case 4:r=Yt;break;default:r=Kt}n=r.bind(null,t,n,e),r=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Xi(e,t,n,i,r){var a=i;if(0===(1&t)&&0===(2&t)&&null!==i)e:for(;;){if(null===i)return;var o=i.tag;if(3===o||4===o){var s=i.stateNode.containerInfo;if(s===r||8===s.nodeType&&s.parentNode===r)break;if(4===o)for(o=i.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;o=o.return}for(;null!==s;){if(null===(o=mr(s)))return;if(5===(l=o.tag)||6===l){i=a=o;continue e}s=s.parentNode}}i=i.return}Fe((function(){var i=a,r=xe(n),o=[];e:{var s=Ii.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Tn;break;case"focusin":u="focus",l=pn;break;case"focusout":u="blur",l=pn;break;case"beforeblur":case"afterblur":l=pn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Pn;break;case Ei:case Ti:case Ri:l=yn;break;case Pi:l=In;break;case"scroll":l=fn;break;case"wheel":l=Mn;break;case"copy":case"cut":case"paste":l=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Rn}var c=0!==(4&t),h=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var d,v=i;null!==v;){var g=(d=v).stateNode;if(5===d.tag&&null!==g&&(d=g,null!==f&&(null!=(g=Me(v,f))&&c.push(Vi(v,g,d)))),h)break;v=v.return}0<c.length&&(s=new l(s,u,null,n,r),o.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ke||!(u=n.relatedTarget||n.fromElement)||!mr(u)&&!u[vr])&&(l||s)&&(s=r.window===r?r:(s=r.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=i,null!==(u=(u=n.relatedTarget||n.toElement)?mr(u):null)&&(u!==(h=Be(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=i),l!==u)){if(c=vn,g="onMouseLeave",f="onMouseEnter",v="mouse","pointerout"!==e&&"pointerover"!==e||(c=Rn,g="onPointerLeave",f="onPointerEnter",v="pointer"),h=null==l?s:kr(l),d=null==u?s:kr(u),(s=new c(g,v+"leave",l,n,r)).target=h,s.relatedTarget=d,g=null,mr(r)===i&&((c=new c(f,v+"enter",u,n,r)).target=d,c.relatedTarget=h,g=c),h=g,l&&u)e:{for(f=u,v=0,d=c=l;d;d=Ki(d))v++;for(d=0,g=f;g;g=Ki(g))d++;for(;0<v-d;)c=Ki(c),v--;for(;0<d-v;)f=Ki(f),d--;for(;v--;){if(c===f||null!==f&&c===f.alternate)break e;c=Ki(c),f=Ki(f)}c=null}else c=null;null!==l&&Hi(o,s,l,c,!1),null!==u&&null!==h&&Hi(o,h,u,c,!0)}if("select"===(l=(s=i?kr(i):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var p=qn;else if(Xn(s))if($n)p=oi;else{p=ri;var y=ii}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(p=ai);switch(p&&(p=p(e,i))?Vn(o,p,n,r):(y&&y(e,s,i),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=i?kr(i):window,e){case"focusin":(Xn(y)||"true"===y.contentEditable)&&(pi=y,yi=i,mi=null);break;case"focusout":mi=yi=pi=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":case"dragend":_i=!1,ki(o,n,r);break;case"selectionchange":if(gi)break;case"keydown":case"keyup":ki(o,n,r)}var m;if(On)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Bn?Gn(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(Nn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==_?"onCompositionEnd"===_&&Bn&&(m=en()):(Jt="value"in($t=r)?$t.value:$t.textContent,Bn=!0)),0<(y=Yi(i,_)).length&&(_=new kn(_,e,null,n,r),o.push({event:_,listeners:y}),m?_.data=m:null!==(m=Wn(n))&&(_.data=m))),(m=Dn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(jn=!0,zn);case"textInput":return(e=t.data)===zn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!On&&Gn(e,t)?(e=en(),Qt=Jt=$t=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(i=Yi(i,"onBeforeInput")).length&&(r=new kn("onBeforeInput","beforeinput",null,n,r),o.push({event:r,listeners:i}),r.data=m))}zi(o,t)}))}function Vi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yi(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,a=r.stateNode;5===r.tag&&null!==a&&(r=a,null!=(a=Me(e,n))&&i.unshift(Vi(e,a,r)),null!=(a=Me(e,t))&&i.push(Vi(e,a,r))),e=e.return}return i}function Ki(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Hi(e,t,n,i,r){for(var a=t._reactName,o=[];null!==n&&n!==i;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===i)break;5===s.tag&&null!==u&&(s=u,r?null!=(l=Me(n,a))&&o.unshift(Vi(n,l,s)):r||null!=(l=Me(n,a))&&o.push(Vi(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Zi=/\r\n?/g,qi=/\u0000|\uFFFD/g;function $i(e){return("string"===typeof e?e:""+e).replace(Zi,"\n").replace(qi,"")}function Ji(e,t,n){if(t=$i(t),$i(e)!==t&&n)throw Error(a(425))}function Qi(){}var er=null,tr=null;function nr(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ir="function"===typeof setTimeout?setTimeout:void 0,rr="function"===typeof clearTimeout?clearTimeout:void 0,ar="function"===typeof Promise?Promise:void 0,or="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ar?function(e){return ar.resolve(null).then(e).catch(sr)}:ir;function sr(e){setTimeout((function(){throw e}))}function lr(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return e.removeChild(r),void Bt(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);Bt(t)}function ur(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function cr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var hr=Math.random().toString(36).slice(2),fr="__reactFiber$"+hr,dr="__reactProps$"+hr,vr="__reactContainer$"+hr,gr="__reactEvents$"+hr,pr="__reactListeners$"+hr,yr="__reactHandles$"+hr;function mr(e){var t=e[fr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vr]||n[fr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cr(e);null!==e;){if(n=e[fr])return n;e=cr(e)}return t}n=(e=n).parentNode}return null}function _r(e){return!(e=e[fr]||e[vr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function kr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function xr(e){return e[dr]||null}var br=[],wr=-1;function Sr(e){return{current:e}}function Cr(e){0>wr||(e.current=br[wr],br[wr]=null,wr--)}function Er(e,t){wr++,br[wr]=e.current,e.current=t}var Tr={},Rr=Sr(Tr),Pr=Sr(!1),Ir=Tr;function Fr(e,t){var n=e.type.contextTypes;if(!n)return Tr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,a={};for(r in n)a[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Mr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Lr(){Cr(Pr),Cr(Rr)}function Or(e,t,n){if(Rr.current!==Tr)throw Error(a(168));Er(Rr,t),Er(Pr,n)}function Ar(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in t))throw Error(a(108,U(e)||"Unknown",r));return N({},n,i)}function Dr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tr,Ir=Rr.current,Er(Rr,e),Er(Pr,Pr.current),!0}function Nr(e,t,n){var i=e.stateNode;if(!i)throw Error(a(169));n?(e=Ar(e,t,Ir),i.__reactInternalMemoizedMergedChildContext=e,Cr(Pr),Cr(Rr),Er(Rr,e)):Cr(Pr),Er(Pr,n)}var zr=null,jr=!1,Gr=!1;function Wr(e){null===zr?zr=[e]:zr.push(e)}function Br(){if(!Gr&&null!==zr){Gr=!0;var e=0,t=_t;try{var n=zr;for(_t=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}zr=null,jr=!1}catch(r){throw null!==zr&&(zr=zr.slice(e+1)),Ke(Qe,Br),r}finally{_t=t,Gr=!1}}return null}var Ur=[],Xr=0,Vr=null,Yr=0,Kr=[],Hr=0,Zr=null,qr=1,$r="";function Jr(e,t){Ur[Xr++]=Yr,Ur[Xr++]=Vr,Vr=e,Yr=t}function Qr(e,t,n){Kr[Hr++]=qr,Kr[Hr++]=$r,Kr[Hr++]=Zr,Zr=e;var i=qr;e=$r;var r=32-ot(i)-1;i&=~(1<<r),n+=1;var a=32-ot(t)+r;if(30<a){var o=r-r%5;a=(i&(1<<o)-1).toString(32),i>>=o,r-=o,qr=1<<32-ot(t)+r|n<<r|i,$r=a+e}else qr=1<<a|n<<r|i,$r=e}function ea(e){null!==e.return&&(Jr(e,1),Qr(e,1,0))}function ta(e){for(;e===Vr;)Vr=Ur[--Xr],Ur[Xr]=null,Yr=Ur[--Xr],Ur[Xr]=null;for(;e===Zr;)Zr=Kr[--Hr],Kr[Hr]=null,$r=Kr[--Hr],Kr[Hr]=null,qr=Kr[--Hr],Kr[Hr]=null}var na=null,ia=null,ra=!1,aa=null;function oa(e,t){var n=Mu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ia=ur(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ia=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zr?{id:qr,overflow:$r}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Mu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ia=null,!0);default:return!1}}function la(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ua(e){if(ra){var t=ia;if(t){var n=t;if(!sa(e,t)){if(la(e))throw Error(a(418));t=ur(n.nextSibling);var i=na;t&&sa(e,t)?oa(i,n):(e.flags=-4097&e.flags|2,ra=!1,na=e)}}else{if(la(e))throw Error(a(418));e.flags=-4097&e.flags|2,ra=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function ha(e){if(e!==na)return!1;if(!ra)return ca(e),ra=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nr(e.type,e.memoizedProps)),t&&(t=ia)){if(la(e))throw fa(),Error(a(418));for(;t;)oa(e,t),t=ur(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ia=ur(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ia=null}}else ia=na?ur(e.stateNode.nextSibling):null;return!0}function fa(){for(var e=ia;e;)e=ur(e.nextSibling)}function da(){ia=na=null,ra=!1}function va(e){null===aa?aa=[e]:aa.push(e)}var ga=k.ReactCurrentBatchConfig;function pa(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ya=Sr(null),ma=null,_a=null,ka=null;function xa(){ka=_a=ma=null}function ba(e){var t=ya.current;Cr(ya),e._currentValue=t}function wa(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){ma=e,ka=_a=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ks=!0),e.firstContext=null)}function Ca(e){var t=e._currentValue;if(ka!==e)if(e={context:e,memoizedValue:t,next:null},null===_a){if(null===ma)throw Error(a(308));_a=e,ma.dependencies={lanes:0,firstContext:e}}else _a=_a.next=e;return t}var Ea=null;function Ta(e){null===Ea?Ea=[e]:Ea.push(e)}function Ra(e,t,n,i){var r=t.interleaved;return null===r?(n.next=n,Ta(t)):(n.next=r.next,r.next=n),t.interleaved=n,Pa(e,i)}function Pa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ia=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ma(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function La(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oa(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,0!==(2&Pl)){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,Pa(e,n)}return null===(r=i.interleaved)?(t.next=t,Ta(i)):(t.next=r.next,r.next=t),i.interleaved=t,Pa(e,n)}function Aa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Da(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?r=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?r=a=t:a=a.next=t}else r=a=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:a,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Na(e,t,n,i){var r=e.updateQueue;Ia=!1;var a=r.firstBaseUpdate,o=r.lastBaseUpdate,s=r.shared.pending;if(null!==s){r.shared.pending=null;var l=s,u=l.next;l.next=null,null===o?a=u:o.next=u,o=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var h=r.baseState;for(o=0,c=u=l=null,s=a;;){var f=s.lane,d=s.eventTime;if((i&f)===f){null!==c&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,g=s;switch(f=t,d=n,g.tag){case 1:if("function"===typeof(v=g.payload)){h=v.call(d,h,f);break e}h=v;break e;case 3:v.flags=-65537&v.flags|128;case 0:if(null===(f="function"===typeof(v=g.payload)?v.call(d,h,f):v)||void 0===f)break e;h=N({},h,f);break e;case 2:Ia=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=r.effects)?r.effects=[s]:f.push(s))}else d={eventTime:d,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=d,l=h):c=c.next=d,o|=f;if(null===(s=s.next)){if(null===(s=r.shared.pending))break;s=(f=s).next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}if(null===c&&(l=h),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,null!==(t=r.shared.interleaved)){r=t;do{o|=r.lane,r=r.next}while(r!==t)}else null===a&&(r.shared.lanes=0);Nl|=o,e.lanes=o,e.memoizedState=h}}function za(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!==typeof r)throw Error(a(191,r));r.call(i)}}}var ja=(new i.Component).refs;function Ga(e,t,n,i){n=null===(n=n(i,t=e.memoizedState))||void 0===n?t:N({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Wa={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=tu(),r=nu(e),a=La(i,r);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Oa(e,a,r))&&(iu(t,e,r,i),Aa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=tu(),r=nu(e),a=La(i,r);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Oa(e,a,r))&&(iu(t,e,r,i),Aa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),i=nu(e),r=La(n,i);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=Oa(e,r,i))&&(iu(t,e,i,n),Aa(t,e,i))}};function Ba(e,t,n,i,r,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!li(n,i)||!li(r,a))}function Ua(e,t,n){var i=!1,r=Tr,a=t.contextType;return"object"===typeof a&&null!==a?a=Ca(a):(r=Mr(t)?Ir:Rr.current,a=(i=null!==(i=t.contextTypes)&&void 0!==i)?Fr(e,r):Tr),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Wa,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=a),t}function Xa(e,t,n,i){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Wa.enqueueReplaceState(t,t.state,null)}function Va(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs=ja,Fa(e);var a=t.contextType;"object"===typeof a&&null!==a?r.context=Ca(a):(a=Mr(t)?Ir:Rr.current,r.context=Fr(e,a)),r.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(Ga(e,t,a,n),r.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(t=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&Wa.enqueueReplaceState(r,r.state,null),Na(e,n,r,i),r.state=e.memoizedState),"function"===typeof r.componentDidMount&&(e.flags|=4194308)}function Ya(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var i=n.stateNode}if(!i)throw Error(a(147,e));var r=i,o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===ja&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ka(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ha(e){return(0,e._init)(e._payload)}function Za(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=Ou(e,t)).index=0,e.sibling=null,e}function o(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=zu(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function u(e,t,n,i){var a=n.type;return a===w?h(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===M&&Ha(a)===t.type)?((i=r(t,n.props)).ref=Ya(e,t,n),i.return=e,i):((i=Au(n.type,n.key,n.props,null,e.mode,i)).ref=Ya(e,t,n),i.return=e,i)}function c(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ju(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function h(e,t,n,i,a){return null===t||7!==t.tag?((t=Du(n,e.mode,i,a)).return=e,t):((t=r(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=zu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Au(t.type,t.key,t.props,null,e.mode,n)).ref=Ya(e,null,t),n.return=e,n;case b:return(t=ju(t,e.mode,n)).return=e,t;case M:return f(e,(0,t._init)(t._payload),n)}if(te(t)||A(t))return(t=Du(t,e.mode,n,null)).return=e,t;Ka(e,t)}return null}function d(e,t,n,i){var r=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==r?null:l(e,t,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===r?u(e,t,n,i):null;case b:return n.key===r?c(e,t,n,i):null;case M:return d(e,t,(r=n._init)(n._payload),i)}if(te(n)||A(n))return null!==r?null:h(e,t,n,i,null);Ka(e,n)}return null}function v(e,t,n,i,r){if("string"===typeof i&&""!==i||"number"===typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"===typeof i&&null!==i){switch(i.$$typeof){case x:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case b:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case M:return v(e,t,n,(0,i._init)(i._payload),r)}if(te(i)||A(i))return h(t,e=e.get(n)||null,i,r,null);Ka(t,i)}return null}function g(r,a,s,l){for(var u=null,c=null,h=a,g=a=0,p=null;null!==h&&g<s.length;g++){h.index>g?(p=h,h=null):p=h.sibling;var y=d(r,h,s[g],l);if(null===y){null===h&&(h=p);break}e&&h&&null===y.alternate&&t(r,h),a=o(y,a,g),null===c?u=y:c.sibling=y,c=y,h=p}if(g===s.length)return n(r,h),ra&&Jr(r,g),u;if(null===h){for(;g<s.length;g++)null!==(h=f(r,s[g],l))&&(a=o(h,a,g),null===c?u=h:c.sibling=h,c=h);return ra&&Jr(r,g),u}for(h=i(r,h);g<s.length;g++)null!==(p=v(h,r,g,s[g],l))&&(e&&null!==p.alternate&&h.delete(null===p.key?g:p.key),a=o(p,a,g),null===c?u=p:c.sibling=p,c=p);return e&&h.forEach((function(e){return t(r,e)})),ra&&Jr(r,g),u}function p(r,s,l,u){var c=A(l);if("function"!==typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var h=c=null,g=s,p=s=0,y=null,m=l.next();null!==g&&!m.done;p++,m=l.next()){g.index>p?(y=g,g=null):y=g.sibling;var _=d(r,g,m.value,u);if(null===_){null===g&&(g=y);break}e&&g&&null===_.alternate&&t(r,g),s=o(_,s,p),null===h?c=_:h.sibling=_,h=_,g=y}if(m.done)return n(r,g),ra&&Jr(r,p),c;if(null===g){for(;!m.done;p++,m=l.next())null!==(m=f(r,m.value,u))&&(s=o(m,s,p),null===h?c=m:h.sibling=m,h=m);return ra&&Jr(r,p),c}for(g=i(r,g);!m.done;p++,m=l.next())null!==(m=v(g,r,p,m.value,u))&&(e&&null!==m.alternate&&g.delete(null===m.key?p:m.key),s=o(m,s,p),null===h?c=m:h.sibling=m,h=m);return e&&g.forEach((function(e){return t(r,e)})),ra&&Jr(r,p),c}return function e(i,a,o,l){if("object"===typeof o&&null!==o&&o.type===w&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case x:e:{for(var u=o.key,c=a;null!==c;){if(c.key===u){if((u=o.type)===w){if(7===c.tag){n(i,c.sibling),(a=r(c,o.props.children)).return=i,i=a;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===M&&Ha(u)===c.type){n(i,c.sibling),(a=r(c,o.props)).ref=Ya(i,c,o),a.return=i,i=a;break e}n(i,c);break}t(i,c),c=c.sibling}o.type===w?((a=Du(o.props.children,i.mode,l,o.key)).return=i,i=a):((l=Au(o.type,o.key,o.props,null,i.mode,l)).ref=Ya(i,a,o),l.return=i,i=l)}return s(i);case b:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(i,a.sibling),(a=r(a,o.children||[])).return=i,i=a;break e}n(i,a);break}t(i,a),a=a.sibling}(a=ju(o,i.mode,l)).return=i,i=a}return s(i);case M:return e(i,a,(c=o._init)(o._payload),l)}if(te(o))return g(i,a,o,l);if(A(o))return p(i,a,o,l);Ka(i,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(i,a.sibling),(a=r(a,o)).return=i,i=a):(n(i,a),(a=zu(o,i.mode,l)).return=i,i=a),s(i)):n(i,a)}}var qa=Za(!0),$a=Za(!1),Ja={},Qa=Sr(Ja),eo=Sr(Ja),to=Sr(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function io(e,t){switch(Er(to,t),Er(eo,e),Er(Qa,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Cr(Qa),Er(Qa,t)}function ro(){Cr(Qa),Cr(eo),Cr(to)}function ao(e){no(to.current);var t=no(Qa.current),n=le(t,e.type);t!==n&&(Er(eo,e),Er(Qa,n))}function oo(e){eo.current===e&&(Cr(Qa),Cr(eo))}var so=Sr(0);function lo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uo=[];function co(){for(var e=0;e<uo.length;e++)uo[e]._workInProgressVersionPrimary=null;uo.length=0}var ho=k.ReactCurrentDispatcher,fo=k.ReactCurrentBatchConfig,vo=0,go=null,po=null,yo=null,mo=!1,_o=!1,ko=0,xo=0;function bo(){throw Error(a(321))}function wo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!si(e[n],t[n]))return!1;return!0}function So(e,t,n,i,r,o){if(vo=o,go=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ho.current=null===e||null===e.memoizedState?ss:ls,e=n(i,r),_o){o=0;do{if(_o=!1,ko=0,25<=o)throw Error(a(301));o+=1,yo=po=null,t.updateQueue=null,ho.current=us,e=n(i,r)}while(_o)}if(ho.current=os,t=null!==po&&null!==po.next,vo=0,yo=po=go=null,mo=!1,t)throw Error(a(300));return e}function Co(){var e=0!==ko;return ko=0,e}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===yo?go.memoizedState=yo=e:yo=yo.next=e,yo}function To(){if(null===po){var e=go.alternate;e=null!==e?e.memoizedState:null}else e=po.next;var t=null===yo?go.memoizedState:yo.next;if(null!==t)yo=t,po=e;else{if(null===e)throw Error(a(310));e={memoizedState:(po=e).memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},null===yo?go.memoizedState=yo=e:yo=yo.next=e}return yo}function Ro(e,t){return"function"===typeof t?t(e):t}function Po(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var i=po,r=i.baseQueue,o=n.pending;if(null!==o){if(null!==r){var s=r.next;r.next=o.next,o.next=s}i.baseQueue=r=o,n.pending=null}if(null!==r){o=r.next,i=i.baseState;var l=s=null,u=null,c=o;do{var h=c.lane;if((vo&h)===h)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var f={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=i):u=u.next=f,go.lanes|=h,Nl|=h}c=c.next}while(null!==c&&c!==o);null===u?s=i:u.next=l,si(i,t.memoizedState)||(ks=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=u,n.lastRenderedState=i}if(null!==(e=n.interleaved)){r=e;do{o=r.lane,go.lanes|=o,Nl|=o,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Io(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,o=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{o=e(o,s.action),s=s.next}while(s!==r);si(o,t.memoizedState)||(ks=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Fo(){}function Mo(e,t){var n=go,i=To(),r=t(),o=!si(i.memoizedState,r);if(o&&(i.memoizedState=r,ks=!0),i=i.queue,Xo(Ao.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||null!==yo&&1&yo.memoizedState.tag){if(n.flags|=2048,jo(9,Oo.bind(null,n,i,r,t),void 0,null),null===Il)throw Error(a(349));0!==(30&vo)||Lo(n,t,r)}return r}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=go.updateQueue)?(t={lastEffect:null,stores:null},go.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Oo(e,t,n,i){t.value=n,t.getSnapshot=i,Do(t)&&No(e)}function Ao(e,t,n){return n((function(){Do(t)&&No(e)}))}function Do(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!si(e,n)}catch(i){return!0}}function No(e){var t=Pa(e,1);null!==t&&iu(t,e,1,-1)}function zo(e){var t=Eo();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,go,e),[t.memoizedState,e]}function jo(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=go.updateQueue)?(t={lastEffect:null,stores:null},go.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Go(){return To().memoizedState}function Wo(e,t,n,i){var r=Eo();go.flags|=e,r.memoizedState=jo(1|t,n,void 0,void 0===i?null:i)}function Bo(e,t,n,i){var r=To();i=void 0===i?null:i;var a=void 0;if(null!==po){var o=po.memoizedState;if(a=o.destroy,null!==i&&wo(i,o.deps))return void(r.memoizedState=jo(t,n,a,i))}go.flags|=e,r.memoizedState=jo(1|t,n,a,i)}function Uo(e,t){return Wo(8390656,8,e,t)}function Xo(e,t){return Bo(2048,8,e,t)}function Vo(e,t){return Bo(4,2,e,t)}function Yo(e,t){return Bo(4,4,e,t)}function Ko(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ho(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Bo(4,4,Ko.bind(null,t,e),n)}function Zo(){}function qo(e,t){var n=To();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&wo(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function $o(e,t){var n=To();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&wo(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Jo(e,t,n){return 0===(21&vo)?(e.baseState&&(e.baseState=!1,ks=!0),e.memoizedState=n):(si(n,t)||(n=gt(),go.lanes|=n,Nl|=n,e.baseState=!0),t)}function Qo(e,t){var n=_t;_t=0!==n&&4>n?n:4,e(!0);var i=fo.transition;fo.transition={};try{e(!1),t()}finally{_t=n,fo.transition=i}}function es(){return To().memoizedState}function ts(e,t,n){var i=nu(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},is(e))rs(t,n);else if(null!==(n=Ra(e,t,n,i))){iu(n,e,i,tu()),as(n,t,i)}}function ns(e,t,n){var i=nu(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(is(e))rs(t,r);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(r.hasEagerState=!0,r.eagerState=s,si(s,o)){var l=t.interleaved;return null===l?(r.next=r,Ta(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(u){}null!==(n=Ra(e,t,r,i))&&(iu(n,e,i,r=tu()),as(n,t,i))}}function is(e){var t=e.alternate;return e===go||null!==t&&t===go}function rs(e,t){_o=mo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!==(4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,mt(e,n)}}var os={readContext:Ca,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useInsertionEffect:bo,useLayoutEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useMutableSource:bo,useSyncExternalStore:bo,useId:bo,unstable_isNewReconciler:!1},ss={readContext:Ca,useCallback:function(e,t){return Eo().memoizedState=[e,void 0===t?null:t],e},useContext:Ca,useEffect:Uo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Wo(4194308,4,Ko.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wo(4,2,e,t)},useMemo:function(e,t){var n=Eo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Eo();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=ts.bind(null,go,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},Eo().memoizedState=e},useState:zo,useDebugValue:Zo,useDeferredValue:function(e){return Eo().memoizedState=e},useTransition:function(){var e=zo(!1),t=e[0];return e=Qo.bind(null,e[1]),Eo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=go,r=Eo();if(ra){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Il)throw Error(a(349));0!==(30&vo)||Lo(i,t,n)}r.memoizedState=n;var o={value:n,getSnapshot:t};return r.queue=o,Uo(Ao.bind(null,i,o,e),[e]),i.flags|=2048,jo(9,Oo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Eo(),t=Il.identifierPrefix;if(ra){var n=$r;t=":"+t+"R"+(n=(qr&~(1<<32-ot(qr)-1)).toString(32)+n),0<(n=ko++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=xo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ls={readContext:Ca,useCallback:qo,useContext:Ca,useEffect:Xo,useImperativeHandle:Ho,useInsertionEffect:Vo,useLayoutEffect:Yo,useMemo:$o,useReducer:Po,useRef:Go,useState:function(){return Po(Ro)},useDebugValue:Zo,useDeferredValue:function(e){return Jo(To(),po.memoizedState,e)},useTransition:function(){return[Po(Ro)[0],To().memoizedState]},useMutableSource:Fo,useSyncExternalStore:Mo,useId:es,unstable_isNewReconciler:!1},us={readContext:Ca,useCallback:qo,useContext:Ca,useEffect:Xo,useImperativeHandle:Ho,useInsertionEffect:Vo,useLayoutEffect:Yo,useMemo:$o,useReducer:Io,useRef:Go,useState:function(){return Io(Ro)},useDebugValue:Zo,useDeferredValue:function(e){var t=To();return null===po?t.memoizedState=e:Jo(t,po.memoizedState,e)},useTransition:function(){return[Io(Ro)[0],To().memoizedState]},useMutableSource:Fo,useSyncExternalStore:Mo,useId:es,unstable_isNewReconciler:!1};function cs(e,t){try{var n="",i=t;do{n+=W(i),i=i.return}while(i);var r=n}catch(a){r="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:r,digest:null}}function hs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function vs(e,t,n){(n=La(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Vl||(Vl=!0,Yl=i),fs(0,t)},n}function gs(e,t,n){(n=La(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"===typeof i){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){fs(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){fs(0,t),"function"!==typeof i&&(null===Kl?Kl=new Set([this]):Kl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ps(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new ds;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=Eu.bind(null,e,t,n),t.then(e,e))}function ys(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ms(e,t,n,i,r){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=La(-1,1)).tag=2,Oa(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=r,e)}var _s=k.ReactCurrentOwner,ks=!1;function xs(e,t,n,i){t.child=null===e?$a(t,null,n,i):qa(t,e.child,n,i)}function bs(e,t,n,i,r){n=n.render;var a=t.ref;return Sa(t,r),i=So(e,t,n,i,a,r),n=Co(),null===e||ks?(ra&&n&&ea(t),t.flags|=1,xs(e,t,i,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Vs(e,t,r))}function ws(e,t,n,i,r){if(null===e){var a=n.type;return"function"!==typeof a||Lu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Au(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ss(e,t,a,i,r))}if(a=e.child,0===(e.lanes&r)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:li)(o,i)&&e.ref===t.ref)return Vs(e,t,r)}return t.flags|=1,(e=Ou(a,i)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,i,r){if(null!==e){var a=e.memoizedProps;if(li(a,i)&&e.ref===t.ref){if(ks=!1,t.pendingProps=i=a,0===(e.lanes&r))return t.lanes=e.lanes,Vs(e,t,r);0!==(131072&e.flags)&&(ks=!0)}}return Ts(e,t,n,i,r)}function Cs(e,t,n){var i=t.pendingProps,r=i.children,a=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Er(Ol,Ll),Ll|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Er(Ol,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==a?a.baseLanes:n,Er(Ol,Ll),Ll|=i}else null!==a?(i=a.baseLanes|n,t.memoizedState=null):i=n,Er(Ol,Ll),Ll|=i;return xs(e,t,r,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,i,r){var a=Mr(n)?Ir:Rr.current;return a=Fr(t,a),Sa(t,r),n=So(e,t,n,i,a,r),i=Co(),null===e||ks?(ra&&i&&ea(t),t.flags|=1,xs(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Vs(e,t,r))}function Rs(e,t,n,i,r){if(Mr(n)){var a=!0;Dr(t)}else a=!1;if(Sa(t,r),null===t.stateNode)Xs(e,t),Ua(t,n,i),Va(t,n,i,r),i=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=n.contextType;"object"===typeof u&&null!==u?u=Ca(u):u=Fr(t,u=Mr(n)?Ir:Rr.current);var c=n.getDerivedStateFromProps,h="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;h||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==i||l!==u)&&Xa(t,o,i,u),Ia=!1;var f=t.memoizedState;o.state=f,Na(t,i,o,r),l=t.memoizedState,s!==i||f!==l||Pr.current||Ia?("function"===typeof c&&(Ga(t,n,c,i),l=t.memoizedState),(s=Ia||Ba(t,n,s,i,f,l,u))?(h||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),o.props=i,o.state=l,o.context=u,i=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,Ma(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:pa(t.type,s),o.props=u,h=t.pendingProps,f=o.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ca(l):l=Fr(t,l=Mr(n)?Ir:Rr.current);var d=n.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==h||f!==l)&&Xa(t,o,i,l),Ia=!1,f=t.memoizedState,o.state=f,Na(t,i,o,r);var v=t.memoizedState;s!==h||f!==v||Pr.current||Ia?("function"===typeof d&&(Ga(t,n,d,i),v=t.memoizedState),(u=Ia||Ba(t,n,u,i,f,v,l)||!1)?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(i,v,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(i,v,l)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=v),o.props=i,o.state=v,o.context=l,i=u):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),i=!1)}return Ps(e,t,n,i,a,r)}function Ps(e,t,n,i,r,a){Es(e,t);var o=0!==(128&t.flags);if(!i&&!o)return r&&Nr(t,n,!1),Vs(e,t,a);i=t.stateNode,_s.current=t;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&o?(t.child=qa(t,e.child,null,a),t.child=qa(t,null,s,a)):xs(e,t,s,a),t.memoizedState=i.state,r&&Nr(t,n,!0),t.child}function Is(e){var t=e.stateNode;t.pendingContext?Or(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Or(0,t.context,!1),io(e,t.containerInfo)}function Fs(e,t,n,i,r){return da(),va(r),t.flags|=256,xs(e,t,n,i),t.child}var Ms,Ls,Os,As,Ds={dehydrated:null,treeContext:null,retryLane:0};function Ns(e){return{baseLanes:e,cachePool:null,transitions:null}}function zs(e,t,n){var i,r=t.pendingProps,o=so.current,s=!1,l=0!==(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&0!==(2&o)),i?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Er(so,1&o),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&r)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Nu(l,r,0,null),e=Du(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ns(n),t.memoizedState=Ds,e):js(t,l));if(null!==(o=e.memoizedState)&&null!==(i=o.dehydrated))return function(e,t,n,i,r,o,s){if(n)return 256&t.flags?(t.flags&=-257,Gs(e,t,s,i=hs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=i.fallback,r=t.mode,i=Nu({mode:"visible",children:i.children},r,0,null),(o=Du(o,r,s,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,0!==(1&t.mode)&&qa(t,e.child,null,s),t.child.memoizedState=Ns(s),t.memoizedState=Ds,o);if(0===(1&t.mode))return Gs(e,t,s,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,Gs(e,t,s,i=hs(o=Error(a(419)),i,void 0))}if(l=0!==(s&e.childLanes),ks||l){if(null!==(i=Il)){switch(s&-s){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|s))?0:r)&&r!==o.retryLane&&(o.retryLane=r,Pa(e,r),iu(i,e,r,-1))}return pu(),Gs(e,t,s,i=hs(Error(a(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Ru.bind(null,e),r._reactRetry=t,null):(e=o.treeContext,ia=ur(r.nextSibling),na=t,ra=!0,aa=null,null!==e&&(Kr[Hr++]=qr,Kr[Hr++]=$r,Kr[Hr++]=Zr,qr=e.id,$r=e.overflow,Zr=t),t=js(t,i.children),t.flags|=4096,t)}(e,t,l,r,i,o,n);if(s){s=r.fallback,l=t.mode,i=(o=e.child).sibling;var u={mode:"hidden",children:r.children};return 0===(1&l)&&t.child!==o?((r=t.child).childLanes=0,r.pendingProps=u,t.deletions=null):(r=Ou(o,u)).subtreeFlags=14680064&o.subtreeFlags,null!==i?s=Ou(i,s):(s=Du(s,l,n,null)).flags|=2,s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=null===(l=e.child.memoizedState)?Ns(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ds,r}return e=(s=e.child).sibling,r=Ou(s,{mode:"visible",children:r.children}),0===(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function js(e,t){return(t=Nu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Gs(e,t,n,i){return null!==i&&va(i),qa(t,e.child,null,n),(e=js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ws(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),wa(e.return,t,n)}function Bs(e,t,n,i,r){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=i,a.tail=n,a.tailMode=r)}function Us(e,t,n){var i=t.pendingProps,r=i.revealOrder,a=i.tail;if(xs(e,t,i.children,n),0!==(2&(i=so.current)))i=1&i|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ws(e,n,t);else if(19===e.tag)Ws(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Er(so,i),0===(1&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===lo(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Bs(t,!1,r,n,a);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===lo(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Bs(t,!0,n,null,a);break;case"together":Bs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ou(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ou(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ys(e,t){if(!ra)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ks(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Hs(e,t,n){var i=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ks(t),null;case 1:case 17:return Mr(t.type)&&Lr(),Ks(t),null;case 3:return i=t.stateNode,ro(),Cr(Pr),Cr(Rr),co(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ha(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(su(aa),aa=null))),Ls(e,t),Ks(t),null;case 5:oo(t);var r=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Os(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(a(166));return Ks(t),null}if(e=no(Qa.current),ha(t)){i=t.stateNode,n=t.type;var o=t.memoizedProps;switch(i[fr]=t,i[dr]=o,e=0!==(1&t.mode),n){case"dialog":ji("cancel",i),ji("close",i);break;case"iframe":case"object":case"embed":ji("load",i);break;case"video":case"audio":for(r=0;r<Ai.length;r++)ji(Ai[r],i);break;case"source":ji("error",i);break;case"img":case"image":case"link":ji("error",i),ji("load",i);break;case"details":ji("toggle",i);break;case"input":q(i,o),ji("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},ji("invalid",i);break;case"textarea":re(i,o),ji("invalid",i)}for(var l in me(n,o),r=null,o)if(o.hasOwnProperty(l)){var u=o[l];"children"===l?"string"===typeof u?i.textContent!==u&&(!0!==o.suppressHydrationWarning&&Ji(i.textContent,u,e),r=["children",u]):"number"===typeof u&&i.textContent!==""+u&&(!0!==o.suppressHydrationWarning&&Ji(i.textContent,u,e),r=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&ji("scroll",i)}switch(n){case"input":Y(i),Q(i,o,!0);break;case"textarea":Y(i),oe(i);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(i.onclick=Qi)}i=r,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[fr]=t,e[dr]=i,Ms(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(n,i),n){case"dialog":ji("cancel",e),ji("close",e),r=i;break;case"iframe":case"object":case"embed":ji("load",e),r=i;break;case"video":case"audio":for(r=0;r<Ai.length;r++)ji(Ai[r],e);r=i;break;case"source":ji("error",e),r=i;break;case"img":case"image":case"link":ji("error",e),ji("load",e),r=i;break;case"details":ji("toggle",e),r=i;break;case"input":q(e,i),r=Z(e,i),ji("invalid",e);break;case"option":default:r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=N({},i,{value:void 0}),ji("invalid",e);break;case"textarea":re(e,i),r=ie(e,i),ji("invalid",e)}for(o in me(n,r),u=r)if(u.hasOwnProperty(o)){var c=u[o];"style"===o?pe(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&he(e,c):"children"===o?"string"===typeof c?("textarea"!==n||""!==c)&&fe(e,c):"number"===typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=c&&"onScroll"===o&&ji("scroll",e):null!=c&&_(e,o,c,l))}switch(n){case"input":Y(e),Q(e,i,!1);break;case"textarea":Y(e),oe(e);break;case"option":null!=i.value&&e.setAttribute("value",""+X(i.value));break;case"select":e.multiple=!!i.multiple,null!=(o=i.value)?ne(e,!!i.multiple,o,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"===typeof r.onClick&&(e.onclick=Qi)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ks(t),null;case 6:if(e&&null!=t.stateNode)As(e,t,e.memoizedProps,i);else{if("string"!==typeof i&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Qa.current),ha(t)){if(i=t.stateNode,n=t.memoizedProps,i[fr]=t,(o=i.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Ji(i.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ji(i.nodeValue,n,0!==(1&e.mode))}o&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[fr]=t,t.stateNode=i}return Ks(t),null;case 13:if(Cr(so),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ra&&null!==ia&&0!==(1&t.mode)&&0===(128&t.flags))fa(),da(),t.flags|=98560,o=!1;else if(o=ha(t),null!==i&&null!==i.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[fr]=t}else da(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ks(t),o=!1}else null!==aa&&(su(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&so.current)?0===Al&&(Al=3):pu())),null!==t.updateQueue&&(t.flags|=4),Ks(t),null);case 4:return ro(),Ls(e,t),null===e&&Bi(t.stateNode.containerInfo),Ks(t),null;case 10:return ba(t.type._context),Ks(t),null;case 19:if(Cr(so),null===(o=t.memoizedState))return Ks(t),null;if(i=0!==(128&t.flags),null===(l=o.rendering))if(i)Ys(o,!1);else{if(0!==Al||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=lo(e))){for(t.flags|=128,Ys(o,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Er(so,1&so.current|2),t.child}e=e.sibling}null!==o.tail&&$e()>Ul&&(t.flags|=128,i=!0,Ys(o,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=lo(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ys(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ra)return Ks(t),null}else 2*$e()-o.renderingStartTime>Ul&&1073741824!==n&&(t.flags|=128,i=!0,Ys(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=$e(),t.sibling=null,n=so.current,Er(so,i?1&n|2:1&n),t):(Ks(t),null);case 22:case 23:return fu(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&0!==(1&t.mode)?0!==(1073741824&Ll)&&(Ks(t),6&t.subtreeFlags&&(t.flags|=8192)):Ks(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Zs(e,t){switch(ta(t),t.tag){case 1:return Mr(t.type)&&Lr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ro(),Cr(Pr),Cr(Rr),co(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Cr(so),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));da()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Cr(so),null;case 4:return ro(),null;case 10:return ba(t.type._context),null;case 22:case 23:return fu(),null;default:return null}}Ms=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ls=function(){},Os=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,no(Qa.current);var a,o=null;switch(n){case"input":r=Z(e,r),i=Z(e,i),o=[];break;case"select":r=N({},r,{value:void 0}),i=N({},i,{value:void 0}),o=[];break;case"textarea":r=ie(e,r),i=ie(e,i),o=[];break;default:"function"!==typeof r.onClick&&"function"===typeof i.onClick&&(e.onclick=Qi)}for(c in me(n,i),n=null,r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&null!=r[c])if("style"===c){var l=r[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in i){var u=i[c];if(l=null!=r?r[c]:void 0,i.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(o=o||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(o=o||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&ji("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},As=function(e,t,n,i){n!==i&&(t.flags|=4)};var qs=!1,$s=!1,Js="function"===typeof WeakSet?WeakSet:Set,Qs=null;function el(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(i){Cu(e,t,i)}else n.current=null}function tl(e,t,n){try{n()}catch(i){Cu(e,t,i)}}var nl=!1;function il(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&e)===e){var a=r.destroy;r.destroy=void 0,void 0!==a&&tl(t,n,a)}r=r.next}while(r!==i)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function al(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fr],delete t[dr],delete t[gr],delete t[pr],delete t[yr])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ul(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Qi));else if(4!==i&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}function cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var hl=null,fl=!1;function dl(e,t,n){for(n=n.child;null!==n;)vl(e,t,n),n=n.sibling}function vl(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(rt,n)}catch(s){}switch(n.tag){case 5:$s||el(n,t);case 6:var i=hl,r=fl;hl=null,dl(e,t,n),fl=r,null!==(hl=i)&&(fl?(e=hl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hl.removeChild(n.stateNode));break;case 18:null!==hl&&(fl?(e=hl,n=n.stateNode,8===e.nodeType?lr(e.parentNode,n):1===e.nodeType&&lr(e,n),Bt(e)):lr(hl,n.stateNode));break;case 4:i=hl,r=fl,hl=n.stateNode.containerInfo,fl=!0,dl(e,t,n),hl=i,fl=r;break;case 0:case 11:case 14:case 15:if(!$s&&(null!==(i=n.updateQueue)&&null!==(i=i.lastEffect))){r=i=i.next;do{var a=r,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&tl(n,t,o),r=r.next}while(r!==i)}dl(e,t,n);break;case 1:if(!$s&&(el(n,t),"function"===typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(s){Cu(n,t,s)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?($s=(i=$s)||null!==n.memoizedState,dl(e,t,n),$s=i):dl(e,t,n);break;default:dl(e,t,n)}}function gl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Js),t.forEach((function(t){var i=Pu.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))}))}}function pl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:hl=l.stateNode,fl=!1;break e;case 3:case 4:hl=l.stateNode.containerInfo,fl=!0;break e}l=l.return}if(null===hl)throw Error(a(160));vl(o,s,r),hl=null,fl=!1;var u=r.alternate;null!==u&&(u.return=null),r.return=null}catch(c){Cu(r,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)yl(t,e),t=t.sibling}function yl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pl(t,e),ml(e),4&i){try{il(3,e,e.return),rl(3,e)}catch(p){Cu(e,e.return,p)}try{il(5,e,e.return)}catch(p){Cu(e,e.return,p)}}break;case 1:pl(t,e),ml(e),512&i&&null!==n&&el(n,n.return);break;case 5:if(pl(t,e),ml(e),512&i&&null!==n&&el(n,n.return),32&e.flags){var r=e.stateNode;try{fe(r,"")}catch(p){Cu(e,e.return,p)}}if(4&i&&null!=(r=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===o.type&&null!=o.name&&$(r,o),_e(l,s);var c=_e(l,o);for(s=0;s<u.length;s+=2){var h=u[s],f=u[s+1];"style"===h?pe(r,f):"dangerouslySetInnerHTML"===h?he(r,f):"children"===h?fe(r,f):_(r,h,f,c)}switch(l){case"input":J(r,o);break;case"textarea":ae(r,o);break;case"select":var d=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!o.multiple;var v=o.value;null!=v?ne(r,!!o.multiple,v,!1):d!==!!o.multiple&&(null!=o.defaultValue?ne(r,!!o.multiple,o.defaultValue,!0):ne(r,!!o.multiple,o.multiple?[]:"",!1))}r[dr]=o}catch(p){Cu(e,e.return,p)}}break;case 6:if(pl(t,e),ml(e),4&i){if(null===e.stateNode)throw Error(a(162));r=e.stateNode,o=e.memoizedProps;try{r.nodeValue=o}catch(p){Cu(e,e.return,p)}}break;case 3:if(pl(t,e),ml(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(p){Cu(e,e.return,p)}break;case 4:default:pl(t,e),ml(e);break;case 13:pl(t,e),ml(e),8192&(r=e.child).flags&&(o=null!==r.memoizedState,r.stateNode.isHidden=o,!o||null!==r.alternate&&null!==r.alternate.memoizedState||(Bl=$e())),4&i&&gl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?($s=(c=$s)||h,pl(t,e),$s=c):pl(t,e),ml(e),8192&i){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!h&&0!==(1&e.mode))for(Qs=e,h=e.child;null!==h;){for(f=Qs=h;null!==Qs;){switch(v=(d=Qs).child,d.tag){case 0:case 11:case 14:case 15:il(4,d,d.return);break;case 1:el(d,d.return);var g=d.stateNode;if("function"===typeof g.componentWillUnmount){i=d,n=d.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(p){Cu(i,n,p)}}break;case 5:el(d,d.return);break;case 22:if(null!==d.memoizedState){bl(f);continue}}null!==v?(v.return=d,Qs=v):bl(f)}h=h.sibling}e:for(h=null,f=e;;){if(5===f.tag){if(null===h){h=f;try{r=f.stateNode,c?"function"===typeof(o=r.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=f.stateNode,s=void 0!==(u=f.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=ge("display",s))}catch(p){Cu(e,e.return,p)}}}else if(6===f.tag){if(null===h)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(p){Cu(e,e.return,p)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:pl(t,e),ml(e),4&i&&gl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var i=n;break e}n=n.return}throw Error(a(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(fe(r,""),i.flags&=-33),cl(e,ll(e),r);break;case 3:case 4:var o=i.stateNode.containerInfo;ul(e,ll(e),o);break;default:throw Error(a(161))}}catch(s){Cu(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function _l(e,t,n){Qs=e,kl(e,t,n)}function kl(e,t,n){for(var i=0!==(1&e.mode);null!==Qs;){var r=Qs,a=r.child;if(22===r.tag&&i){var o=null!==r.memoizedState||qs;if(!o){var s=r.alternate,l=null!==s&&null!==s.memoizedState||$s;s=qs;var u=$s;if(qs=o,($s=l)&&!u)for(Qs=r;null!==Qs;)l=(o=Qs).child,22===o.tag&&null!==o.memoizedState?wl(r):null!==l?(l.return=o,Qs=l):wl(r);for(;null!==a;)Qs=a,kl(a,t,n),a=a.sibling;Qs=r,qs=s,$s=u}xl(e)}else 0!==(8772&r.subtreeFlags)&&null!==a?(a.return=r,Qs=a):xl(e)}}function xl(e){for(;null!==Qs;){var t=Qs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:$s||rl(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!$s)if(null===n)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:pa(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&za(t,o,i);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}za(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var h=c.memoizedState;if(null!==h){var f=h.dehydrated;null!==f&&Bt(f)}}}break;default:throw Error(a(163))}$s||512&t.flags&&al(t)}catch(d){Cu(t,t.return,d)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function bl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function wl(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Cu(t,n,l)}break;case 1:var i=t.stateNode;if("function"===typeof i.componentDidMount){var r=t.return;try{i.componentDidMount()}catch(l){Cu(t,r,l)}}var a=t.return;try{al(t)}catch(l){Cu(t,a,l)}break;case 5:var o=t.return;try{al(t)}catch(l){Cu(t,o,l)}}}catch(l){Cu(t,t.return,l)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var Sl,Cl=Math.ceil,El=k.ReactCurrentDispatcher,Tl=k.ReactCurrentOwner,Rl=k.ReactCurrentBatchConfig,Pl=0,Il=null,Fl=null,Ml=0,Ll=0,Ol=Sr(0),Al=0,Dl=null,Nl=0,zl=0,jl=0,Gl=null,Wl=null,Bl=0,Ul=1/0,Xl=null,Vl=!1,Yl=null,Kl=null,Hl=!1,Zl=null,ql=0,$l=0,Jl=null,Ql=-1,eu=0;function tu(){return 0!==(6&Pl)?$e():-1!==Ql?Ql:Ql=$e()}function nu(e){return 0===(1&e.mode)?1:0!==(2&Pl)&&0!==Ml?Ml&-Ml:null!==ga.transition?(0===eu&&(eu=gt()),eu):0!==(e=_t)?e:e=void 0===(e=window.event)?16:qt(e.type)}function iu(e,t,n,i){if(50<$l)throw $l=0,Jl=null,Error(a(185));yt(e,n,i),0!==(2&Pl)&&e===Il||(e===Il&&(0===(2&Pl)&&(zl|=n),4===Al&&lu(e,Ml)),ru(e,i),1===n&&0===Pl&&0===(1&t.mode)&&(Ul=$e()+500,jr&&Br()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,l=r[o];-1===l?0!==(s&n)&&0===(s&i)||(r[o]=dt(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var i=ft(e,e===Il?Ml:0);if(0===i)null!==n&&He(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&He(n),1===t)0===e.tag?function(e){jr=!0,Wr(e)}(uu.bind(null,e)):Wr(uu.bind(null,e)),or((function(){0===(6&Pl)&&Br()})),n=null;else{switch(kt(i)){case 1:n=Qe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=Iu(n,au.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function au(e,t){if(Ql=-1,eu=0,0!==(6&Pl))throw Error(a(327));var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var i=ft(e,e===Il?Ml:0);if(0===i)return null;if(0!==(30&i)||0!==(i&e.expiredLanes)||t)t=yu(e,i);else{t=i;var r=Pl;Pl|=2;var o=gu();for(Il===e&&Ml===t||(Xl=null,Ul=$e()+500,du(e,t));;)try{_u();break}catch(l){vu(e,l)}xa(),El.current=o,Pl=r,null!==Fl?t=0:(Il=null,Ml=0,t=Al)}if(0!==t){if(2===t&&(0!==(r=vt(e))&&(i=r,t=ou(e,r))),1===t)throw n=Dl,du(e,0),lu(e,i),ru(e,$e()),n;if(6===t)lu(e,i);else{if(r=e.current.alternate,0===(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],a=r.getSnapshot;r=r.value;try{if(!si(a(),r))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)&&(2===(t=yu(e,i))&&(0!==(o=vt(e))&&(i=o,t=ou(e,o))),1===t))throw n=Dl,du(e,0),lu(e,i),ru(e,$e()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(a(345));case 2:case 5:bu(e,Wl,Xl);break;case 3:if(lu(e,i),(130023424&i)===i&&10<(t=Bl+500-$e())){if(0!==ft(e,0))break;if(((r=e.suspendedLanes)&i)!==i){tu(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=ir(bu.bind(null,e,Wl,Xl),t);break}bu(e,Wl,Xl);break;case 4:if(lu(e,i),(4194240&i)===i)break;for(t=e.eventTimes,r=-1;0<i;){var s=31-ot(i);o=1<<s,(s=t[s])>r&&(r=s),i&=~o}if(i=r,10<(i=(120>(i=$e()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Cl(i/1960))-i)){e.timeoutHandle=ir(bu.bind(null,e,Wl,Xl),i);break}bu(e,Wl,Xl);break;default:throw Error(a(329))}}}return ru(e,$e()),e.callbackNode===n?au.bind(null,e):null}function ou(e,t){var n=Gl;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=yu(e,t))&&(t=Wl,Wl=n,null!==t&&su(t)),e}function su(e){null===Wl?Wl=e:Wl.push.apply(Wl,e)}function lu(e,t){for(t&=~jl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),i=1<<n;e[n]=-1,t&=~i}}function uu(e){if(0!==(6&Pl))throw Error(a(327));wu();var t=ft(e,0);if(0===(1&t))return ru(e,$e()),null;var n=yu(e,t);if(0!==e.tag&&2===n){var i=vt(e);0!==i&&(t=i,n=ou(e,i))}if(1===n)throw n=Dl,du(e,0),lu(e,t),ru(e,$e()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bu(e,Wl,Xl),ru(e,$e()),null}function cu(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&(Ul=$e()+500,jr&&Br())}}function hu(e){null!==Zl&&0===Zl.tag&&0===(6&Pl)&&wu();var t=Pl;Pl|=1;var n=Rl.transition,i=_t;try{if(Rl.transition=null,_t=1,e)return e()}finally{_t=i,Rl.transition=n,0===(6&(Pl=t))&&Br()}}function fu(){Ll=Ol.current,Cr(Ol)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,rr(n)),null!==Fl)for(n=Fl.return;null!==n;){var i=n;switch(ta(i),i.tag){case 1:null!==(i=i.type.childContextTypes)&&void 0!==i&&Lr();break;case 3:ro(),Cr(Pr),Cr(Rr),co();break;case 5:oo(i);break;case 4:ro();break;case 13:case 19:Cr(so);break;case 10:ba(i.type._context);break;case 22:case 23:fu()}n=n.return}if(Il=e,Fl=e=Ou(e.current,null),Ml=Ll=t,Al=0,Dl=null,jl=zl=Nl=0,Wl=Gl=null,null!==Ea){for(t=0;t<Ea.length;t++)if(null!==(i=(n=Ea[t]).interleaved)){n.interleaved=null;var r=i.next,a=n.pending;if(null!==a){var o=a.next;a.next=r,i.next=o}n.pending=i}Ea=null}return e}function vu(e,t){for(;;){var n=Fl;try{if(xa(),ho.current=os,mo){for(var i=go.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}mo=!1}if(vo=0,yo=po=go=null,_o=!1,ko=0,Tl.current=null,null===n||null===n.return){Al=1,Dl=t,Fl=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=Ml,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,h=l,f=h.tag;if(0===(1&h.mode)&&(0===f||11===f||15===f)){var d=h.alternate;d?(h.updateQueue=d.updateQueue,h.memoizedState=d.memoizedState,h.lanes=d.lanes):(h.updateQueue=null,h.memoizedState=null)}var v=ys(s);if(null!==v){v.flags&=-257,ms(v,s,l,0,t),1&v.mode&&ps(o,c,t),u=c;var g=(t=v).updateQueue;if(null===g){var p=new Set;p.add(u),t.updateQueue=p}else g.add(u);break e}if(0===(1&t)){ps(o,c,t),pu();break e}u=Error(a(426))}else if(ra&&1&l.mode){var y=ys(s);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),ms(y,s,l,0,t),va(cs(u,l));break e}}o=u=cs(u,l),4!==Al&&(Al=2),null===Gl?Gl=[o]:Gl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Da(o,vs(0,u,t));break e;case 1:l=u;var m=o.type,_=o.stateNode;if(0===(128&o.flags)&&("function"===typeof m.getDerivedStateFromError||null!==_&&"function"===typeof _.componentDidCatch&&(null===Kl||!Kl.has(_)))){o.flags|=65536,t&=-t,o.lanes|=t,Da(o,gs(o,l,t));break e}}o=o.return}while(null!==o)}xu(n)}catch(k){t=k,Fl===n&&null!==n&&(Fl=n=n.return);continue}break}}function gu(){var e=El.current;return El.current=os,null===e?os:e}function pu(){0!==Al&&3!==Al&&2!==Al||(Al=4),null===Il||0===(268435455&Nl)&&0===(268435455&zl)||lu(Il,Ml)}function yu(e,t){var n=Pl;Pl|=2;var i=gu();for(Il===e&&Ml===t||(Xl=null,du(e,t));;)try{mu();break}catch(r){vu(e,r)}if(xa(),Pl=n,El.current=i,null!==Fl)throw Error(a(261));return Il=null,Ml=0,Al}function mu(){for(;null!==Fl;)ku(Fl)}function _u(){for(;null!==Fl&&!Ze();)ku(Fl)}function ku(e){var t=Sl(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?xu(e):Fl=t,Tl.current=null}function xu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Hs(n,t,Ll)))return void(Fl=n)}else{if(null!==(n=Zs(n,t)))return n.flags&=32767,void(Fl=n);if(null===e)return Al=6,void(Fl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Fl=t);Fl=t=e}while(null!==t);0===Al&&(Al=5)}function bu(e,t,n){var i=_t,r=Rl.transition;try{Rl.transition=null,_t=1,function(e,t,n,i){do{wu()}while(null!==Zl);if(0!==(6&Pl))throw Error(a(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-ot(n),a=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~a}}(e,o),e===Il&&(Fl=Il=null,Ml=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Hl||(Hl=!0,Iu(tt,(function(){return wu(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Rl.transition,Rl.transition=null;var s=_t;_t=1;var l=Pl;Pl|=4,Tl.current=null,function(e,t){if(er=Xt,di(e=fi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(x){n=null;break e}var s=0,l=-1,u=-1,c=0,h=0,f=e,d=null;t:for(;;){for(var v;f!==n||0!==r&&3!==f.nodeType||(l=s+r),f!==o||0!==i&&3!==f.nodeType||(u=s+i),3===f.nodeType&&(s+=f.nodeValue.length),null!==(v=f.firstChild);)d=f,f=v;for(;;){if(f===e)break t;if(d===n&&++c===r&&(l=s),d===o&&++h===i&&(u=s),null!==(v=f.nextSibling))break;d=(f=d).parentNode}f=v}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(tr={focusedElem:e,selectionRange:n},Xt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var p=g.memoizedProps,y=g.memoizedState,m=t.stateNode,_=m.getSnapshotBeforeUpdate(t.elementType===t.type?p:pa(t.type,p),y);m.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var k=t.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(a(163))}}catch(x){Cu(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}g=nl,nl=!1}(e,n),yl(n,e),vi(tr),Xt=!!er,tr=er=null,e.current=n,_l(n,e,r),qe(),Pl=l,_t=s,Rl.transition=o}else e.current=n;if(Hl&&(Hl=!1,Zl=e,ql=r),o=e.pendingLanes,0===o&&(Kl=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(rt,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),ru(e,$e()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Vl)throw Vl=!1,e=Yl,Yl=null,e;0!==(1&ql)&&0!==e.tag&&wu(),o=e.pendingLanes,0!==(1&o)?e===Jl?$l++:($l=0,Jl=e):$l=0,Br()}(e,t,n,i)}finally{Rl.transition=r,_t=i}return null}function wu(){if(null!==Zl){var e=kt(ql),t=Rl.transition,n=_t;try{if(Rl.transition=null,_t=16>e?16:e,null===Zl)var i=!1;else{if(e=Zl,Zl=null,ql=0,0!==(6&Pl))throw Error(a(331));var r=Pl;for(Pl|=4,Qs=e.current;null!==Qs;){var o=Qs,s=o.child;if(0!==(16&Qs.flags)){var l=o.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Qs=c;null!==Qs;){var h=Qs;switch(h.tag){case 0:case 11:case 15:il(8,h,o)}var f=h.child;if(null!==f)f.return=h,Qs=f;else for(;null!==Qs;){var d=(h=Qs).sibling,v=h.return;if(ol(h),h===c){Qs=null;break}if(null!==d){d.return=v,Qs=d;break}Qs=v}}}var g=o.alternate;if(null!==g){var p=g.child;if(null!==p){g.child=null;do{var y=p.sibling;p.sibling=null,p=y}while(null!==p)}}Qs=o}}if(0!==(2064&o.subtreeFlags)&&null!==s)s.return=o,Qs=s;else e:for(;null!==Qs;){if(0!==(2048&(o=Qs).flags))switch(o.tag){case 0:case 11:case 15:il(9,o,o.return)}var m=o.sibling;if(null!==m){m.return=o.return,Qs=m;break e}Qs=o.return}}var _=e.current;for(Qs=_;null!==Qs;){var k=(s=Qs).child;if(0!==(2064&s.subtreeFlags)&&null!==k)k.return=s,Qs=k;else e:for(s=_;null!==Qs;){if(0!==(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(b){Cu(l,l.return,b)}if(l===s){Qs=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Qs=x;break e}Qs=l.return}}if(Pl=r,Br(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(rt,e)}catch(b){}i=!0}return i}finally{_t=n,Rl.transition=t}}return!1}function Su(e,t,n){e=Oa(e,t=vs(0,t=cs(n,t),1),1),t=tu(),null!==e&&(yt(e,1,t),ru(e,t))}function Cu(e,t,n){if(3===e.tag)Su(e,e,n);else for(;null!==t;){if(3===t.tag){Su(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof i.componentDidCatch&&(null===Kl||!Kl.has(i))){t=Oa(t,e=gs(t,e=cs(n,e),1),1),e=tu(),null!==t&&(yt(t,1,e),ru(t,e));break}}t=t.return}}function Eu(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,Il===e&&(Ml&n)===n&&(4===Al||3===Al&&(130023424&Ml)===Ml&&500>$e()-Bl?du(e,0):jl|=n),ru(e,t)}function Tu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=tu();null!==(e=Pa(e,t))&&(yt(e,t,n),ru(e,n))}function Ru(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tu(e,n)}function Pu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(a(314))}null!==i&&i.delete(t),Tu(e,n)}function Iu(e,t){return Ke(e,t)}function Fu(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mu(e,t,n,i){return new Fu(e,t,n,i)}function Lu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ou(e,t){var n=e.alternate;return null===n?((n=Mu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,i,r,o){var s=2;if(i=e,"function"===typeof e)Lu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case w:return Du(n.children,r,o,t);case S:s=8,r|=8;break;case C:return(e=Mu(12,n,t,2|r)).elementType=C,e.lanes=o,e;case P:return(e=Mu(13,n,t,r)).elementType=P,e.lanes=o,e;case I:return(e=Mu(19,n,t,r)).elementType=I,e.lanes=o,e;case L:return Nu(n,r,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case T:s=9;break e;case R:s=11;break e;case F:s=14;break e;case M:s=16,i=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Mu(s,n,t,r)).elementType=e,t.type=i,t.lanes=o,t}function Du(e,t,n,i){return(e=Mu(7,e,i,t)).lanes=n,e}function Nu(e,t,n,i){return(e=Mu(22,e,i,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function zu(e,t,n){return(e=Mu(6,e,null,t)).lanes=n,e}function ju(e,t,n){return(t=Mu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gu(e,t,n,i,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pt(0),this.expirationTimes=pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Wu(e,t,n,i,r,a,o,s,l){return e=new Gu(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Mu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fa(a),e}function Bu(e){if(!e)return Tr;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Mr(n))return Ar(e,n,t)}return t}function Uu(e,t,n,i,r,a,o,s,l){return(e=Wu(n,i,!0,e,0,a,0,s,l)).context=Bu(null),n=e.current,(a=La(i=tu(),r=nu(n))).callback=void 0!==t&&null!==t?t:null,Oa(n,a,r),e.current.lanes=r,yt(e,r,i),ru(e,i),e}function Xu(e,t,n,i){var r=t.current,a=tu(),o=nu(r);return n=Bu(n),null===t.context?t.context=n:t.pendingContext=n,(t=La(a,o)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Oa(r,t,o))&&(iu(e,r,o,a),Aa(e,r,o)),o}function Vu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Yu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ku(e,t){Yu(e,t),(e=e.alternate)&&Yu(e,t)}Sl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Pr.current)ks=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ks=!1,function(e,t,n){switch(t.tag){case 3:Is(t),da();break;case 5:ao(t);break;case 1:Mr(t.type)&&Dr(t);break;case 4:io(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;Er(ya,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Er(so,1&so.current),t.flags|=128,null):0!==(n&t.child.childLanes)?zs(e,t,n):(Er(so,1&so.current),null!==(e=Vs(e,t,n))?e.sibling:null);Er(so,1&so.current);break;case 19:if(i=0!==(n&t.childLanes),0!==(128&e.flags)){if(i)return Us(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Er(so,so.current),i)break;return null;case 22:case 23:return t.lanes=0,Cs(e,t,n)}return Vs(e,t,n)}(e,t,n);ks=0!==(131072&e.flags)}else ks=!1,ra&&0!==(1048576&t.flags)&&Qr(t,Yr,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Xs(e,t),e=t.pendingProps;var r=Fr(t,Rr.current);Sa(t,n),r=So(null,t,i,e,r,n);var o=Co();return t.flags|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mr(i)?(o=!0,Dr(t)):o=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Fa(t),r.updater=Wa,t.stateNode=r,r._reactInternals=t,Va(t,i,e,n),t=Ps(null,t,i,!0,o,n)):(t.tag=0,ra&&o&&ea(t),xs(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Xs(e,t),e=t.pendingProps,i=(r=i._init)(i._payload),t.type=i,r=t.tag=function(e){if("function"===typeof e)return Lu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===R)return 11;if(e===F)return 14}return 2}(i),e=pa(i,e),r){case 0:t=Ts(null,t,i,e,n);break e;case 1:t=Rs(null,t,i,e,n);break e;case 11:t=bs(null,t,i,e,n);break e;case 14:t=ws(null,t,i,pa(i.type,e),n);break e}throw Error(a(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,Ts(e,t,i,r=t.elementType===i?r:pa(i,r),n);case 1:return i=t.type,r=t.pendingProps,Rs(e,t,i,r=t.elementType===i?r:pa(i,r),n);case 3:e:{if(Is(t),null===e)throw Error(a(387));i=t.pendingProps,r=(o=t.memoizedState).element,Ma(e,t),Na(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Fs(e,t,i,n,r=cs(Error(a(423)),t));break e}if(i!==r){t=Fs(e,t,i,n,r=cs(Error(a(424)),t));break e}for(ia=ur(t.stateNode.containerInfo.firstChild),na=t,ra=!0,aa=null,n=$a(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(da(),i===r){t=Vs(e,t,n);break e}xs(e,t,i,n)}t=t.child}return t;case 5:return ao(t),null===e&&ua(t),i=t.type,r=t.pendingProps,o=null!==e?e.memoizedProps:null,s=r.children,nr(i,r)?s=null:null!==o&&nr(i,o)&&(t.flags|=32),Es(e,t),xs(e,t,s,n),t.child;case 6:return null===e&&ua(t),null;case 13:return zs(e,t,n);case 4:return io(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=qa(t,null,i,n):xs(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,bs(e,t,i,r=t.elementType===i?r:pa(i,r),n);case 7:return xs(e,t,t.pendingProps,n),t.child;case 8:case 12:return xs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,o=t.memoizedProps,s=r.value,Er(ya,i._currentValue),i._currentValue=s,null!==o)if(si(o.value,s)){if(o.children===r.children&&!Pr.current){t=Vs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var u=l.firstContext;null!==u;){if(u.context===i){if(1===o.tag){(u=La(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),wa(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),wa(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}xs(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,Sa(t,n),i=i(r=Ca(r)),t.flags|=1,xs(e,t,i,n),t.child;case 14:return r=pa(i=t.type,t.pendingProps),ws(e,t,i,r=pa(i.type,r),n);case 15:return Ss(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:pa(i,r),Xs(e,t),t.tag=1,Mr(i)?(e=!0,Dr(t)):e=!1,Sa(t,n),Ua(t,i,r),Va(t,i,r,n),Ps(null,t,i,!0,e,n);case 19:return Us(e,t,n);case 22:return Cs(e,t,n)}throw Error(a(156,t.tag))};var Hu="function"===typeof reportError?reportError:function(e){console.error(e)};function Zu(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function $u(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function ec(e,t,n,i,r){var a=n._reactRootContainer;if(a){var o=a;if("function"===typeof r){var s=r;r=function(){var e=Vu(o);s.call(e)}}Xu(t,o,e,r)}else o=function(e,t,n,i,r){if(r){if("function"===typeof i){var a=i;i=function(){var e=Vu(o);a.call(e)}}var o=Uu(t,i,e,0,null,!1,0,"",Qu);return e._reactRootContainer=o,e[vr]=o.current,Bi(8===e.nodeType?e.parentNode:e),hu(),o}for(;r=e.lastChild;)e.removeChild(r);if("function"===typeof i){var s=i;i=function(){var e=Vu(l);s.call(e)}}var l=Wu(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=l,e[vr]=l.current,Bi(8===e.nodeType?e.parentNode:e),hu((function(){Xu(t,l,n,i)})),l}(n,t,e,r,i);return Vu(o)}qu.prototype.render=Zu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Xu(e,t,null,null)},qu.prototype.unmount=Zu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hu((function(){Xu(null,e,null,null)})),t[vr]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&Nt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ht(t.pendingLanes);0!==n&&(mt(t,1|n),ru(t,$e()),0===(6&Pl)&&(Ul=$e()+500,Br()))}break;case 13:hu((function(){var t=Pa(e,1);if(null!==t){var n=tu();iu(t,e,1,n)}})),Ku(e,1)}},bt=function(e){if(13===e.tag){var t=Pa(e,134217728);if(null!==t)iu(t,e,134217728,tu());Ku(e,134217728)}},wt=function(e){if(13===e.tag){var t=nu(e),n=Pa(e,t);if(null!==n)iu(n,e,t,tu());Ku(e,t)}},St=function(){return _t},Ct=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},be=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=xr(i);if(!r)throw Error(a(90));K(i),J(i,r)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Re=cu,Pe=hu;var tc={usingClientEntryPoint:!1,Events:[_r,kr,xr,Ee,Te,cu]},nc={findFiberByHostInstance:mr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ic={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{rt=rc.inject(ic),at=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$u(t))throw Error(a(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:b,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!$u(e))throw Error(a(299));var n=!1,i="",r=Hu;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=Wu(e,1,!1,null,0,n,0,i,r),e[vr]=t.current,Bi(8===e.nodeType?e.parentNode:e),new Zu(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return hu(e)},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(a(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!$u(e))throw Error(a(405));var i=null!=n&&n.hydratedSources||null,r=!1,o="",s=Hu;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Uu(t,null,e,1,null!=n?n:null,r,0,o,s),e[vr]=t.current,Bi(e),i)for(e=0;e<i.length;e++)r=(r=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new qu(t)},t.render=function(e,t,n){if(!Ju(t))throw Error(a(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(a(40));return!!e._reactRootContainer&&(hu((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[vr]=null}))})),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Ju(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ec(e,t,n,!1,i)},t.version="18.2.0-next-9e3b772b8-20220608"},250:function(e,t,n){"use strict";var i=n(164);t.createRoot=i.createRoot,t.hydrateRoot=i.hydrateRoot},164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(463)},374:function(e,t,n){"use strict";var i=n(791),r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var i,a={},u=null,c=null;for(i in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,i)&&!l.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===a[i]&&(a[i]=t[i]);return{$$typeof:r,type:e,key:u,ref:c,props:a,_owner:s.current}}t.Fragment=a,t.jsx=u},117:function(e,t){"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator;var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,p={};function y(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||v}function m(){}function _(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||v}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=y.prototype;var k=_.prototype=new m;k.constructor=_,g(k,y.prototype),k.isPureReactComponent=!0;var x=Array.isArray,b=Object.prototype.hasOwnProperty,w={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,i){var r,a={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)b.call(t,r)&&!S.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(1===l)a.children=i;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===a[r]&&(a[r]=l[r]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:w.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function R(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,r,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return o=o(l=e),e=""===a?"."+R(l,0):a,x(o)?(r="",null!=e&&(r=e.replace(T,"$&/")+"/"),P(o,t,r,"",(function(e){return e}))):null!=o&&(E(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,r+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(l=0,a=""===a?".":a+":",x(e))for(var u=0;u<e.length;u++){var c=a+R(s=e[u],u);l+=P(s,t,r,c,o)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=P(s=s.value,t,r,c=a+R(s,u++),o);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function I(e,t,n){if(null==e)return e;var i=[],r=0;return P(e,i,"","",(function(e){return t.call(n,e,r++)})),i}function F(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M={current:null},L={transition:null},O={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:L,ReactCurrentOwner:w};t.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=r,t.Profiler=o,t.PureComponent=_,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,i){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=g({},e.props),a=e.key,o=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)b.call(t,u)&&!S.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=i;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:n,type:e.type,key:a,ref:o,props:r,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:F}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return M.current.useCallback(e,t)},t.useContext=function(e){return M.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return M.current.useDeferredValue(e)},t.useEffect=function(e,t){return M.current.useEffect(e,t)},t.useId=function(){return M.current.useId()},t.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return M.current.useMemo(e,t)},t.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},t.useRef=function(e){return M.current.useRef(e)},t.useState=function(e){return M.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return M.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<a(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,o=r>>>1;i<o;){var s=2*(i+1)-1,l=e[s],u=s+1,c=e[u];if(0>a(l,n))u<r&&0>a(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[s]=n,i=s);else{if(!(u<r&&0>a(c,n)))break e;e[i]=c,e[u]=n,i=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],h=1,f=null,d=3,v=!1,g=!1,p=!1,y="function"===typeof setTimeout?setTimeout:null,m="function"===typeof clearTimeout?clearTimeout:null,_="undefined"!==typeof setImmediate?setImmediate:null;function k(e){for(var t=i(c);null!==t;){if(null===t.callback)r(c);else{if(!(t.startTime<=e))break;r(c),t.sortIndex=t.expirationTime,n(u,t)}t=i(c)}}function x(e){if(p=!1,k(e),!g)if(null!==i(u))g=!0,L(b);else{var t=i(c);null!==t&&O(x,t.startTime-e)}}function b(e,n){g=!1,p&&(p=!1,m(E),E=-1),v=!0;var a=d;try{for(k(n),f=i(u);null!==f&&(!(f.expirationTime>n)||e&&!P());){var o=f.callback;if("function"===typeof o){f.callback=null,d=f.priorityLevel;var s=o(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===i(u)&&r(u),k(n)}else r(u);f=i(u)}if(null!==f)var l=!0;else{var h=i(c);null!==h&&O(x,h.startTime-n),l=!1}return l}finally{f=null,d=a,v=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,S=!1,C=null,E=-1,T=5,R=-1;function P(){return!(t.unstable_now()-R<T)}function I(){if(null!==C){var e=t.unstable_now();R=e;var n=!0;try{n=C(!0,e)}finally{n?w():(S=!1,C=null)}}else S=!1}if("function"===typeof _)w=function(){_(I)};else if("undefined"!==typeof MessageChannel){var F=new MessageChannel,M=F.port2;F.port1.onmessage=I,w=function(){M.postMessage(null)}}else w=function(){y(I,0)};function L(e){C=e,S||(S=!0,w())}function O(e,n){E=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||v||(g=!0,L(b))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return i(u)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,r,a){var o=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?o+a:o:a=o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:h++,callback:r,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===i(u)&&e===i(c)&&(p?(m(E),E=-1):p=!0,O(x,a-o))):(e.sortIndex=s,n(u,e),g||v||(g=!0,L(b))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},296:function(e,t,n){"use strict";e.exports=n(813)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}n.m=e,n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,i){return n.f[i](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".36d19f16.chunk.js"},n.miniCssF=function(e){},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="map-view:";n.l=function(i,r,a,o){if(e[i])e[i].push(r);else{var s,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var h=u[c];if(h.getAttribute("src")==i||h.getAttribute("data-webpack")==t+a){s=h;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+a),s.src=i),e[i]=[r];var f=function(t,n){s.onerror=s.onload=null,clearTimeout(d);var r=e[i];if(delete e[i],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((function(e){return e(n)})),t)return t(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){var e={179:0};n.f.j=function(t,i){var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var a=new Promise((function(n,i){r=e[t]=[n,i]}));i.push(r[2]=a);var o=n.p+n.u(t),s=new Error;n.l(o,(function(i){if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,r[1](s)}}),"chunk-"+t,t)}};var t=function(t,i){var r,a,o=i[0],s=i[1],l=i[2],u=0;if(o.some((function(t){return 0!==e[t]}))){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);if(l)l(n)}for(t&&t(i);u<o.length;u++)a=o[u],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},i=self.webpackChunkmap_view=self.webpackChunkmap_view||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}(),function(){"use strict";var e=n(791),t=n(250);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function r(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw r}}return s}}(e,t)||r(e,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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===s(t)?t:String(t)}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(){return d="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},d.apply(this,arguments)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function p(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function y(e,t){if(t&&("object"===s(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function m(e){var t=p();return function(){var n,i=f(e);if(t){var r=f(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return y(this,n)}}var _=function(){function e(t){o(this,e),this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return c(e,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),e}(),k="propertychange",x=function(){function e(){o(this,e),this.disposed=!1}return c(e,[{key:"dispose",value:function(){this.disposed||(this.disposed=!0,this.disposeInternal())}},{key:"disposeInternal",value:function(){}}]),e}();function b(e,t){return e>t?1:e<t?-1:0}function w(e,t,n){if(e[0]<=t)return 0;var i=e.length;if(t<=e[i-1])return i-1;if("function"===typeof n){for(var r=1;r<i;++r){var a=e[r];if(a===t)return r;if(a<t)return n(t,e[r-1],a)>0?r-1:r}return i-1}if(n>0){for(var o=1;o<i;++o)if(e[o]<t)return o-1;return i-1}if(n<0){for(var s=1;s<i;++s)if(e[s]<=t)return s;return i-1}for(var l=1;l<i;++l){if(e[l]==t)return l;if(e[l]<t)return e[l-1]-t<t-e[l]?l-1:l}return i-1}function S(e,t,n){for(;t<n;){var i=e[t];e[t]=e[n],e[n]=i,++t,--n}}function C(e,t){for(var n=Array.isArray(t)?t:[t],i=n.length,r=0;r<i;r++)e[e.length]=n[r]}function E(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function T(){return!0}function R(){return!1}function P(){}function I(e){for(var t in e)delete e[t]}function F(e){var t;for(t in e)return!1;return!t}var M=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).eventTarget_=e,i.pendingRemovals_=null,i.dispatching_=null,i.listeners_=null,i}return c(n,[{key:"addEventListener",value:function(e,t){if(e&&t){var n=this.listeners_||(this.listeners_={}),i=n[e]||(n[e]=[]);i.includes(t)||i.push(t)}}},{key:"dispatchEvent",value:function(e){var t="string"===typeof e,n=t?e:e.type,i=this.listeners_&&this.listeners_[n];if(i){var r=t?new _(e):e;r.target||(r.target=this.eventTarget_||this);var a,o=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});n in o||(o[n]=0,s[n]=0),++o[n];for(var l=0,u=i.length;l<u;++l)if(!1===(a="handleEvent"in i[l]?i[l].handleEvent(r):i[l].call(this,r))||r.propagationStopped){a=!1;break}if(0===--o[n]){var c=s[n];for(delete s[n];c--;)this.removeEventListener(n,P);delete o[n]}return a}}},{key:"disposeInternal",value:function(){this.listeners_&&I(this.listeners_)}},{key:"getListeners",value:function(e){return this.listeners_&&this.listeners_[e]||void 0}},{key:"hasListener",value:function(e){return!!this.listeners_&&(e?e in this.listeners_:Object.keys(this.listeners_).length>0)}},{key:"removeEventListener",value:function(e,t){var n=this.listeners_&&this.listeners_[e];if(n){var i=n.indexOf(t);-1!==i&&(this.pendingRemovals_&&e in this.pendingRemovals_?(n[i]=P,++this.pendingRemovals_[e]):(n.splice(i,1),0===n.length&&delete this.listeners_[e]))}}}]),n}(x),L=M,O="change",A="error",D="contextmenu",N="click",z="dblclick",j="keydown",G="keypress",W="load",B="touchmove",U="wheel";function X(e,t,n,i,r){if(i&&i!==e&&(n=n.bind(i)),r){var a=n;n=function(){e.removeEventListener(t,n),a.apply(this,arguments)}}var o={target:e,type:t,listener:n};return e.addEventListener(t,n),o}function V(e,t,n,i){return X(e,t,n,i,!0)}function Y(e){e&&e.target&&(e.target.removeEventListener(e.type,e.listener),I(e))}var K=function(e){g(n,e);var t=m(n);function n(){var e;return o(this,n),(e=t.call(this)).on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return c(n,[{key:"changed",value:function(){++this.revision_,this.dispatchEvent(O)}},{key:"getRevision",value:function(){return this.revision_}},{key:"onInternal",value:function(e,t){if(Array.isArray(e)){for(var n=e.length,i=new Array(n),r=0;r<n;++r)i[r]=X(this,e[r],t);return i}return X(this,e,t)}},{key:"onceInternal",value:function(e,t){var n;if(Array.isArray(e)){var i=e.length;n=new Array(i);for(var r=0;r<i;++r)n[r]=V(this,e[r],t)}else n=V(this,e,t);return t.ol_key=n,n}},{key:"unInternal",value:function(e,t){var n=t.ol_key;if(n)!function(e){if(Array.isArray(e))for(var t=0,n=e.length;t<n;++t)Y(e[t]);else Y(e)}(n);else if(Array.isArray(e))for(var i=0,r=e.length;i<r;++i)this.removeEventListener(e[i],t);else this.removeEventListener(e,t)}}]),n}(L);K.prototype.on,K.prototype.once,K.prototype.un;var H=K;function Z(){throw new Error("Unimplemented abstract method.")}var q=0;function $(e){return e.ol_uid||(e.ol_uid=String(++q))}var J=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),(a=t.call(this,e)).key=i,a.oldValue=r,a}return c(n)}(_),Q=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).on,i.once,i.un,$(h(i)),i.values_=null,void 0!==e&&i.setProperties(e),i}return c(n,[{key:"get",value:function(e){var t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}},{key:"getKeys",value:function(){return this.values_&&Object.keys(this.values_)||[]}},{key:"getProperties",value:function(){return this.values_&&Object.assign({},this.values_)||{}}},{key:"hasProperties",value:function(){return!!this.values_}},{key:"notify",value:function(e,t){var n;n="change:".concat(e),this.hasListener(n)&&this.dispatchEvent(new J(n,e,t)),n=k,this.hasListener(n)&&this.dispatchEvent(new J(n,e,t))}},{key:"addChangeListener",value:function(e,t){this.addEventListener("change:".concat(e),t)}},{key:"removeChangeListener",value:function(e,t){this.removeEventListener("change:".concat(e),t)}},{key:"set",value:function(e,t,n){var i=this.values_||(this.values_={});if(n)i[e]=t;else{var r=i[e];i[e]=t,r!==t&&this.notify(e,r)}}},{key:"setProperties",value:function(e,t){for(var n in e)this.set(n,e[n],t)}},{key:"applyProperties",value:function(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}},{key:"unset",value:function(e,t){if(this.values_&&e in this.values_){var n=this.values_[e];delete this.values_[e],F(this.values_)&&(this.values_=null),t||this.notify(e,n)}}}]),n}(H);function ee(e,t,n){return ee=p()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&v(r,n.prototype),r},ee.apply(null,arguments)}function te(e){var t="function"===typeof Map?new Map:void 0;return te=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return ee(e,arguments,f(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),v(i,e)},te(e)}var ne={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"},ie=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=ne[e];return(i=t.call(this,r)).code=e,i.name="AssertionError",i.message=r,i}return c(n)}(te(Error)),re="add",ae="remove",oe="length",se=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),(a=t.call(this,e)).element=i,a.index=r,a}return c(n)}(_),le=function(e){g(n,e);var t=m(n);function n(e,i){var r;if(o(this,n),(r=t.call(this)).on,r.once,r.un,i=i||{},r.unique_=!!i.unique,r.array_=e||[],r.unique_)for(var a=0,s=r.array_.length;a<s;++a)r.assertUnique_(r.array_[a],a);return r.updateLength_(),r}return c(n,[{key:"clear",value:function(){for(;this.getLength()>0;)this.pop()}},{key:"extend",value:function(e){for(var t=0,n=e.length;t<n;++t)this.push(e[t]);return this}},{key:"forEach",value:function(e){for(var t=this.array_,n=0,i=t.length;n<i;++n)e(t[n],n,t)}},{key:"getArray",value:function(){return this.array_}},{key:"item",value:function(e){return this.array_[e]}},{key:"getLength",value:function(){return this.get(oe)}},{key:"insertAt",value:function(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new se(re,t,e))}},{key:"pop",value:function(){return this.removeAt(this.getLength()-1)}},{key:"push",value:function(e){this.unique_&&this.assertUnique_(e);var t=this.getLength();return this.insertAt(t,e),this.getLength()}},{key:"remove",value:function(e){for(var t=this.array_,n=0,i=t.length;n<i;++n)if(t[n]===e)return this.removeAt(n)}},{key:"removeAt",value:function(e){if(!(e<0||e>=this.getLength())){var t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new se(ae,t,e)),t}}},{key:"setAt",value:function(e,t){if(e>=this.getLength())this.insertAt(e,t);else{if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);var n=this.array_[e];this.array_[e]=t,this.dispatchEvent(new se(ae,n,e)),this.dispatchEvent(new se(re,t,e))}}},{key:"updateLength_",value:function(){this.set(oe,this.array_.length)}},{key:"assertUnique_",value:function(e,t){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===e&&n!==t)throw new ie(58)}}]),n}(Q),ue="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",ce=ue.includes("firefox"),he=(ue.includes("safari")&&!ue.includes("chrom")&&(ue.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ue)),ue.includes("webkit")&&!ue.includes("edge")),fe=ue.includes("macintosh"),de="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,ve="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,ge="undefined"!==typeof Image&&Image.prototype.decode,pe=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch(n){}return e}();function ye(e,t){if(!e)throw new ie(t)}var me;new Array(6);function _e(e,t,n,i,r,a,o){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e[4]=a,e[5]=o,e}function ke(e,t){var n=t[0],i=t[1];return t[0]=e[0]*n+e[2]*i+e[4],t[1]=e[1]*n+e[3]*i+e[5],t}function xe(e,t,n,i,r,a,o,s){var l=Math.sin(a),u=Math.cos(a);return e[0]=i*u,e[1]=r*l,e[2]=-i*l,e[3]=r*u,e[4]=o*i*u-s*i*l+t,e[5]=o*r*l+s*r*u+n,e}function be(e,t){var n,i=(n=t)[0]*n[3]-n[1]*n[2];ye(0!==i,32);var r=t[0],a=t[1],o=t[2],s=t[3],l=t[4],u=t[5];return e[0]=s/i,e[1]=-a/i,e[2]=-o/i,e[3]=r/i,e[4]=(o*u-s*l)/i,e[5]=-(r*u-a*l)/i,e}function we(e){var t="matrix("+e.join(", ")+")";if(ve)return t;var n=me||(me=document.createElement("div"));return n.style.transform=t,n.style.transform}var Se={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Ce(e){for(var t=Le(),n=0,i=e.length;n<i;++n)je(t,e[n]);return t}function Ee(e,t,n){return n?(n[0]=e[0]-t,n[1]=e[1]-t,n[2]=e[2]+t,n[3]=e[3]+t,n):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]}function Te(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()}function Re(e,t,n){var i,r;return(i=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0)*i+(r=n<e[1]?e[1]-n:e[3]<n?n-e[3]:0)*r}function Pe(e,t){return Fe(e,t[0],t[1])}function Ie(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]}function Fe(e,t,n){return e[0]<=t&&t<=e[2]&&e[1]<=n&&n<=e[3]}function Me(e,t){var n=e[0],i=e[1],r=e[2],a=e[3],o=t[0],s=t[1],l=Se.UNKNOWN;return o<n?l|=Se.LEFT:o>r&&(l|=Se.RIGHT),s<i?l|=Se.BELOW:s>a&&(l|=Se.ABOVE),l===Se.UNKNOWN&&(l=Se.INTERSECTING),l}function Le(){return[1/0,1/0,-1/0,-1/0]}function Oe(e,t,n,i,r){return r?(r[0]=e,r[1]=t,r[2]=n,r[3]=i,r):[e,t,n,i]}function Ae(e){return Oe(1/0,1/0,-1/0,-1/0,e)}function De(e,t,n,i,r){return Ge(Ae(r),e,t,n,i)}function Ne(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]}function ze(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e}function je(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])}function Ge(e,t,n,i,r){for(;n<i;n+=r)We(e,t[n],t[n+1]);return e}function We(e,t,n){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],n),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],n)}function Be(e,t){var n;return(n=t(Xe(e)))||(n=t(Ve(e)))||(n=t(Qe(e)))?n:(n=t(Je(e)))||!1}function Ue(e){var t=0;return nt(e)||(t=et(e)*qe(e)),t}function Xe(e){return[e[0],e[1]]}function Ve(e){return[e[2],e[1]]}function Ye(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]}function Ke(e,t){var n;return"bottom-left"===t?n=Xe(e):"bottom-right"===t?n=Ve(e):"top-left"===t?n=Je(e):"top-right"===t?n=Qe(e):ye(!1,13),n}function He(e,t,n,i,r){var o=a(Ze(e,t,n,i),8),s=o[0],l=o[1],u=o[2],c=o[3],h=o[4],f=o[5],d=o[6],v=o[7];return Oe(Math.min(s,u,h,d),Math.min(l,c,f,v),Math.max(s,u,h,d),Math.max(l,c,f,v),r)}function Ze(e,t,n,i){var r=t*i[0]/2,a=t*i[1]/2,o=Math.cos(n),s=Math.sin(n),l=r*o,u=r*s,c=a*o,h=a*s,f=e[0],d=e[1];return[f-l+h,d-u-c,f-l-h,d-u+c,f+l-h,d+u+c,f+l+h,d+u-c,f-l+h,d-u-c]}function qe(e){return e[3]-e[1]}function $e(e,t,n){var i=n||[1/0,1/0,-1/0,-1/0];return tt(e,t)?(e[0]>t[0]?i[0]=e[0]:i[0]=t[0],e[1]>t[1]?i[1]=e[1]:i[1]=t[1],e[2]<t[2]?i[2]=e[2]:i[2]=t[2],e[3]<t[3]?i[3]=e[3]:i[3]=t[3]):Ae(i),i}function Je(e){return[e[0],e[3]]}function Qe(e){return[e[2],e[3]]}function et(e){return e[2]-e[0]}function tt(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}function nt(e){return e[2]<e[0]||e[3]<e[1]}function it(e,t,n,i){if(nt(e))return Ae(n);var r=[];if(i>1)for(var a=e[2]-e[0],o=e[3]-e[1],s=0;s<i;++s)r.push(e[0]+a*s/i,e[1],e[2],e[1]+o*s/i,e[2]-a*s/i,e[3],e[0],e[3]-o*s/i);else r=[e[0],e[1],e[2],e[1],e[2],e[3],e[0],e[3]];t(r,r,2);for(var l=[],u=[],c=0,h=r.length;c<h;c+=2)l.push(r[c]),u.push(r[c+1]);return function(e,t,n){return Oe(Math.min.apply(null,e),Math.min.apply(null,t),Math.max.apply(null,e),Math.max.apply(null,t),n)}(l,u,n)}function rt(e,t){var n=t.getExtent(),i=Ye(e);if(t.canWrapX()&&(i[0]<n[0]||i[0]>=n[2])){var r=et(n),a=Math.floor((i[0]-n[0])/r)*r;e[0]-=a,e[2]-=a}return e}function at(e,t,n){return Math.min(Math.max(e,t),n)}function ot(e,t,n,i,r,a){var o=r-n,s=a-i;if(0!==o||0!==s){var l=((e-n)*o+(t-i)*s)/(o*o+s*s);l>1?(n=r,i=a):l>0&&(n+=o*l,i+=s*l)}return st(e,t,n,i)}function st(e,t,n,i){var r=n-e,a=i-t;return r*r+a*a}function lt(e){return e*Math.PI/180}function ut(e,t){var n=e%t;return n*t<0?n+t:n}function ct(e,t,n){return e+n*(t-e)}function ht(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function ft(e,t){return Math.floor(ht(e,t))}function dt(e,t){return Math.ceil(ht(e,t))}var vt=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,gt=/^([a-z]*)$|^hsla?\(.*\)$/i;function pt(e){return"string"===typeof e?e:xt(e)}function yt(e){var t=document.createElement("div");if(t.style.color=e,""!==t.style.color){document.body.appendChild(t);var n=getComputedStyle(t).color;return document.body.removeChild(t),n}return""}var mt=function(){var e={},t=0;return function(n){var i;if(e.hasOwnProperty(n))i=e[n];else{if(t>=1024){var r=0;for(var a in e)0===(3&r++)&&(delete e[a],--t)}i=function(e){var t,n,i,r,a;gt.exec(e)&&(e=yt(e));if(vt.exec(e)){var o,s=e.length-1;o=s<=4?1:2;var l=4===s||8===s;t=parseInt(e.substr(1+0*o,o),16),n=parseInt(e.substr(1+1*o,o),16),i=parseInt(e.substr(1+2*o,o),16),r=l?parseInt(e.substr(1+3*o,o),16):255,1==o&&(t=(t<<4)+t,n=(n<<4)+n,i=(i<<4)+i,l&&(r=(r<<4)+r)),a=[t,n,i,r/255]}else e.startsWith("rgba(")?kt(a=e.slice(5,-1).split(",").map(Number)):e.startsWith("rgb(")?((a=e.slice(4,-1).split(",").map(Number)).push(1),kt(a)):ye(!1,14);return a}(n),e[n]=i,++t}return i}}();function _t(e){return Array.isArray(e)?e:mt(e)}function kt(e){return e[0]=at(e[0]+.5|0,0,255),e[1]=at(e[1]+.5|0,0,255),e[2]=at(e[2]+.5|0,0,255),e[3]=at(e[3],0,1),e}function xt(e){var t=e[0];t!=(0|t)&&(t=t+.5|0);var n=e[1];n!=(0|n)&&(n=n+.5|0);var i=e[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+t+","+n+","+i+","+(void 0===e[3]?1:Math.round(100*e[3])/100)+")"}var bt=function(){function e(){o(this,e),this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return c(e,[{key:"clear",value:function(){this.cache_={},this.cacheSize_=0}},{key:"canExpireCache",value:function(){return this.cacheSize_>this.maxCacheSize_}},{key:"expire",value:function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var n=this.cache_[t];0!==(3&e++)||n.hasListener()||(delete this.cache_[t],--this.cacheSize_)}}}},{key:"get",value:function(e,t,n){var i=wt(e,t,n);return i in this.cache_?this.cache_[i]:null}},{key:"set",value:function(e,t,n,i){var r=wt(e,t,n);this.cache_[r]=i,++this.cacheSize_}},{key:"setSize",value:function(e){this.maxCacheSize_=e,this.expire()}}]),e}();function wt(e,t,n){return t+":"+e+":"+(n?pt(n):"null")}var St=new bt,Ct="opacity",Et="visible",Tt="extent",Rt="zIndex",Pt="maxResolution",It="minResolution",Ft="maxZoom",Mt="minZoom",Lt="source",Ot="map",At=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),(i=t.call(this)).on,i.once,i.un,i.background_=e.background;var r=Object.assign({},e);return"object"===typeof e.properties&&(delete r.properties,Object.assign(r,e.properties)),r[Ct]=void 0!==e.opacity?e.opacity:1,ye("number"===typeof r[Ct],64),r[Et]=void 0===e.visible||e.visible,r[Rt]=e.zIndex,r[Pt]=void 0!==e.maxResolution?e.maxResolution:1/0,r[It]=void 0!==e.minResolution?e.minResolution:0,r[Mt]=void 0!==e.minZoom?e.minZoom:-1/0,r[Ft]=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==r.className?r.className:"ol-layer",delete r.className,i.setProperties(r),i.state_=null,i}return c(n,[{key:"getBackground",value:function(){return this.background_}},{key:"getClassName",value:function(){return this.className_}},{key:"getLayerState",value:function(e){var t=this.state_||{layer:this,managed:void 0===e||e},n=this.getZIndex();return t.opacity=at(Math.round(100*this.getOpacity())/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=void 0!==n||t.managed?n:1/0,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}},{key:"getLayersArray",value:function(e){return Z()}},{key:"getLayerStatesArray",value:function(e){return Z()}},{key:"getExtent",value:function(){return this.get(Tt)}},{key:"getMaxResolution",value:function(){return this.get(Pt)}},{key:"getMinResolution",value:function(){return this.get(It)}},{key:"getMinZoom",value:function(){return this.get(Mt)}},{key:"getMaxZoom",value:function(){return this.get(Ft)}},{key:"getOpacity",value:function(){return this.get(Ct)}},{key:"getSourceState",value:function(){return Z()}},{key:"getVisible",value:function(){return this.get(Et)}},{key:"getZIndex",value:function(){return this.get(Rt)}},{key:"setBackground",value:function(e){this.background_=e,this.changed()}},{key:"setExtent",value:function(e){this.set(Tt,e)}},{key:"setMaxResolution",value:function(e){this.set(Pt,e)}},{key:"setMinResolution",value:function(e){this.set(It,e)}},{key:"setMaxZoom",value:function(e){this.set(Ft,e)}},{key:"setMinZoom",value:function(e){this.set(Mt,e)}},{key:"setOpacity",value:function(e){ye("number"===typeof e,64),this.set(Ct,e)}},{key:"setVisible",value:function(e){this.set(Et,e)}},{key:"setZIndex",value:function(e){this.set(Rt,e)}},{key:"disposeInternal",value:function(){this.state_&&(this.state_.layer=null,this.state_=null),d(f(n.prototype),"disposeInternal",this).call(this)}}]),n}(Q),Dt="prerender",Nt="postrender",zt="precompose",jt="postcompose",Gt="rendercomplete",Wt=0,Bt=1,Ut={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Xt=42,Vt=256;var Yt={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},Kt=function(){function e(t){o(this,e),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 c(e,[{key:"canWrapX",value:function(){return this.canWrapX_}},{key:"getCode",value:function(){return this.code_}},{key:"getExtent",value:function(){return this.extent_}},{key:"getUnits",value:function(){return this.units_}},{key:"getMetersPerUnit",value:function(){return this.metersPerUnit_||Yt[this.units_]}},{key:"getWorldExtent",value:function(){return this.worldExtent_}},{key:"getAxisOrientation",value:function(){return this.axisOrientation_}},{key:"isGlobal",value:function(){return this.global_}},{key:"setGlobal",value:function(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)}},{key:"getDefaultTileGrid",value:function(){return this.defaultTileGrid_}},{key:"setDefaultTileGrid",value:function(e){this.defaultTileGrid_=e}},{key:"setExtent",value:function(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)}},{key:"setWorldExtent",value:function(e){this.worldExtent_=e}},{key:"setGetPointResolution",value:function(e){this.getPointResolutionFunc_=e}},{key:"getPointResolutionFunc",value:function(){return this.getPointResolutionFunc_}}]),e}(),Ht=6378137,Zt=Math.PI*Ht,qt=[-Zt,-Zt,Zt,Zt],$t=[-180,-85,180,85],Jt=Ht*Math.log(Math.tan(Math.PI/2)),Qt=function(e){g(n,e);var t=m(n);function n(e){return o(this,n),t.call(this,{code:e,units:"m",extent:qt,global:!0,worldExtent:$t,getPointResolution:function(e,t){return e/Math.cosh(t[1]/Ht)}})}return c(n)}(Kt),en=[new Qt("EPSG:3857"),new Qt("EPSG:102100"),new Qt("EPSG:102113"),new Qt("EPSG:900913"),new Qt("http://www.opengis.net/def/crs/EPSG/0/3857"),new Qt("http://www.opengis.net/gml/srs/epsg.xml#3857")];function tn(e,t,n){var i=e.length;n=n>1?n:2,void 0===t&&(t=n>2?e.slice():new Array(i));for(var r=0;r<i;r+=n){t[r]=Zt*e[r]/180;var a=Ht*Math.log(Math.tan(Math.PI*(+e[r+1]+90)/360));a>Jt?a=Jt:a<-Jt&&(a=-Jt),t[r+1]=a}return t}function nn(e,t,n){var i=e.length;n=n>1?n:2,void 0===t&&(t=n>2?e.slice():new Array(i));for(var r=0;r<i;r+=n)t[r]=180*e[r]/Zt,t[r+1]=360*Math.atan(Math.exp(e[r+1]/Ht))/Math.PI-90;return t}var rn=[-180,-90,180,90],an=6378137*Math.PI/180,on=function(e){g(n,e);var t=m(n);function n(e,i){return o(this,n),t.call(this,{code:e,units:"degrees",extent:rn,axisOrientation:i,global:!0,metersPerUnit:an,worldExtent:rn})}return c(n)}(Kt),sn=[new on("CRS:84"),new on("EPSG:4326","neu"),new on("urn:ogc:def:crs:OGC:1.3:CRS84"),new on("urn:ogc:def:crs:OGC:2:84"),new on("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new on("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new on("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],ln={};var un={};function cn(e,t,n){var i=e.getCode(),r=t.getCode();i in un||(un[i]={}),un[i][r]=n}function hn(e,t){for(var n=!0,i=e.length-1;i>=0;--i)if(e[i]!=t[i]){n=!1;break}return n}function fn(e,t){var n=Math.cos(t),i=Math.sin(t),r=e[0]*n-e[1]*i,a=e[1]*n+e[0]*i;return e[0]=r,e[1]=a,e}function dn(e,t){if(t.canWrapX()){var n=et(t.getExtent()),i=function(e,t,n){var i=t.getExtent(),r=0;t.canWrapX()&&(e[0]<i[0]||e[0]>i[2])&&(n=n||et(i),r=Math.floor((e[0]-i[0])/n));return r}(e,t,n);i&&(e[0]-=i*n)}return e}var vn=6371008.8;function gn(e,t,n){n=n||vn;var i=lt(e[1]),r=lt(t[1]),a=(r-i)/2,o=lt(t[0]-e[0])/2,s=Math.sin(a)*Math.sin(a)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(r);return 2*n*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))}var pn={info:1,warn:2,error:3,none:4},yn=pn.info;function mn(){var e;yn>pn.warn||(e=console).warn.apply(e,arguments)}var _n=!0;function kn(e){_n=!(void 0===e||e)}function xn(e,t){if(void 0!==t)for(var n=0,i=e.length;n<i;++n)t[n]=e[n];else t=e.slice();return t}function bn(e,t){if(void 0!==t&&e!==t){for(var n=0,i=e.length;n<i;++n)t[n]=e[n];e=t}return e}function wn(e){!function(e,t){ln[e]=t}(e.getCode(),e),cn(e,e,xn)}function Sn(e){return"string"===typeof e?ln[t=e]||ln[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:e||null;var t}function Cn(e,t,n,i){var r,a=(e=Sn(e)).getPointResolutionFunc();if(a){if(r=a(t,n),i&&i!==e.getUnits()){var o=e.getMetersPerUnit();o&&(r=r*o/Yt[i])}}else{var s=e.getUnits();if("degrees"==s&&!i||"degrees"==i)r=t;else{var l=Pn(e,Sn("EPSG:4326"));if(l===bn&&"degrees"!==s)r=t*e.getMetersPerUnit();else{var u=[n[0]-t/2,n[1],n[0]+t/2,n[1],n[0],n[1]-t/2,n[0],n[1]+t/2];r=(gn((u=l(u,u,2)).slice(0,2),u.slice(2,4))+gn(u.slice(4,6),u.slice(6,8)))/2}var c=i?Yt[i]:e.getMetersPerUnit();void 0!==c&&(r/=c)}}return r}function En(e){!function(e){e.forEach(wn)}(e),e.forEach((function(t){e.forEach((function(e){t!==e&&cn(t,e,xn)}))}))}function Tn(e,t){return e?"string"===typeof e?Sn(e):e:Sn(t)}function Rn(e,t){if(e===t)return!0;var n=e.getUnits()===t.getUnits();return(e.getCode()===t.getCode()||Pn(e,t)===xn)&&n}function Pn(e,t){var n=function(e,t){var n;return e in un&&t in un[e]&&(n=un[e][t]),n}(e.getCode(),t.getCode());return n||(n=bn),n}function In(e,t){return Pn(Sn(e),Sn(t))}function Fn(e,t,n){return In(t,n)(e,void 0,e.length)}function Mn(e,t,n,i){return it(e,In(t,n),void 0,i)}var Ln=null;function On(){return Ln}function An(e,t){return Ln?Fn(e,t,Ln):e}function Dn(e,t){return Ln?Fn(e,Ln,t):(_n&&!hn(e,[0,0])&&e[0]>=-180&&e[0]<=180&&e[1]>=-90&&e[1]<=90&&(_n=!1,mn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),e)}function Nn(e,t){return Ln?Mn(e,t,Ln):e}function zn(e,t){return Ln?Mn(e,Ln,t):e}function jn(e,t){if(!Ln)return e;var n=Sn(t).getUnits(),i=Ln.getUnits();return n&&i?e*Yt[n]/Yt[i]:e}function Gn(e,t,n){return function(i,r,a,o,s){if(i){if(!r&&!t)return i;var l=t?0:a[0]*r,u=t?0:a[1]*r,c=s?s[0]:0,h=s?s[1]:0,f=e[0]+l/2+c,d=e[2]-l/2+c,v=e[1]+u/2+h,g=e[3]-u/2+h;f>d&&(d=f=(d+f)/2),v>g&&(g=v=(g+v)/2);var p=at(i[0],f,d),y=at(i[1],v,g);if(o&&n&&r){var m=30*r;p+=-m*Math.log(1+Math.max(0,f-i[0])/m)+m*Math.log(1+Math.max(0,i[0]-d)/m),y+=-m*Math.log(1+Math.max(0,v-i[1])/m)+m*Math.log(1+Math.max(0,i[1]-g)/m)}return[p,y]}}}function Wn(e){return e}function Bn(e,t,n,i){var r=et(t)/n[0],a=qe(t)/n[1];return i?Math.min(e,Math.max(r,a)):Math.min(e,Math.min(r,a))}function Un(e,t,n){var i=Math.min(e,t);return i*=Math.log(1+50*Math.max(0,e/t-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/e-1))/50+1),at(i,n/2,2*t)}function Xn(e,t,n,i,r){return n=void 0===n||n,function(a,o,s,l){if(void 0!==a){var u=i?Bn(e,i,s,r):e;return n&&l?Un(a,u,t):at(a,t,u)}}}function Vn(e){if(void 0!==e)return 0}function Yn(e){if(void 0!==e)return e}function Kn(e){return Math.pow(e,3)}function Hn(e){return 1-Kn(1-e)}function Zn(e){return 3*e*e-2*e*e*e}function qn(e){return e}function $n(e,t,n,i,r,a){a=a||[];for(var o=0,s=t;s<n;s+=i){var l=e[s],u=e[s+1];a[o++]=r[0]*l+r[2]*u+r[4],a[o++]=r[1]*l+r[3]*u+r[5]}return a&&a.length!=o&&(a.length=o),a}function Jn(e,t,n,i,r,a,o){o=o||[];for(var s=Math.cos(r),l=Math.sin(r),u=a[0],c=a[1],h=0,f=t;f<n;f+=i){var d=e[f]-u,v=e[f+1]-c;o[h++]=u+d*s-v*l,o[h++]=c+d*l+v*s;for(var g=f+2;g<f+i;++g)o[h++]=e[g]}return o&&o.length!=h&&(o.length=h),o}!function(){var e,t,n;En(en),En(sn),e=en,t=tn,n=nn,sn.forEach((function(i){e.forEach((function(e){cn(i,e,t),cn(e,i,n)}))}))}();var Qn=[1,0,0,1,0,0],ei=function(e){g(n,e);var t=m(n);function n(){var e;return o(this,n),(e=t.call(this)).extent_=[1/0,1/0,-1/0,-1/0],e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=function(e){var t,n,i,r=!1;return function(){var a=Array.prototype.slice.call(arguments);return r&&this===i&&E(a,n)||(r=!0,i=this,n=a,t=e.apply(this,arguments)),t}}((function(e,t,n){if(!n)return this.getSimplifiedGeometry(t);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(t)})),e}return c(n,[{key:"simplifyTransformed",value:function(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}},{key:"clone",value:function(){return Z()}},{key:"closestPointXY",value:function(e,t,n,i){return Z()}},{key:"containsXY",value:function(e,t){var n=this.getClosestPoint([e,t]);return n[0]===e&&n[1]===t}},{key:"getClosestPoint",value:function(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}},{key:"intersectsCoordinate",value:function(e){return this.containsXY(e[0],e[1])}},{key:"computeExtent",value:function(e){return Z()}},{key:"getExtent",value:function(e){if(this.extentRevision_!=this.getRevision()){var t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Ae(t),this.extentRevision_=this.getRevision()}return function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e}(this.extent_,e)}},{key:"rotate",value:function(e,t){Z()}},{key:"scale",value:function(e,t,n){Z()}},{key:"simplify",value:function(e){return this.getSimplifiedGeometry(e*e)}},{key:"getSimplifiedGeometry",value:function(e){return Z()}},{key:"getType",value:function(){return Z()}},{key:"applyTransform",value:function(e){Z()}},{key:"intersectsExtent",value:function(e){return Z()}},{key:"translate",value:function(e,t){Z()}},{key:"transform",value:function(e,t){var n=Sn(e),i="tile-pixels"==n.getUnits()?function(e,i,r){var a=n.getExtent(),o=n.getWorldExtent(),s=qe(o)/qe(a);return xe(Qn,o[0],o[3],s,-s,0,0,0),$n(e,0,e.length,r,Qn,i),In(n,t)(e,i,r)}:In(n,t);return this.applyTransform(i),this}}]),n}(Q),ti=ei,ni=function(e){g(n,e);var t=m(n);function n(){var e;return o(this,n),(e=t.call(this)).layout="XY",e.stride=2,e.flatCoordinates=null,e}return c(n,[{key:"computeExtent",value:function(e){return De(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}},{key:"getCoordinates",value:function(){return Z()}},{key:"getFirstCoordinate",value:function(){return this.flatCoordinates.slice(0,this.stride)}},{key:"getFlatCoordinates",value:function(){return this.flatCoordinates}},{key:"getLastCoordinate",value:function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}},{key:"getLayout",value:function(){return this.layout}},{key:"getSimplifiedGeometry",value:function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}},{key:"getSimplifiedGeometryInternal",value:function(e){return this}},{key:"getStride",value:function(){return this.stride}},{key:"setFlatCoordinates",value:function(e,t){this.stride=ii(e),this.layout=e,this.flatCoordinates=t}},{key:"setCoordinates",value:function(e,t){Z()}},{key:"setLayout",value:function(e,t,n){var i;if(e)i=ii(e);else{for(var r=0;r<n;++r){if(0===t.length)return this.layout="XY",void(this.stride=2);t=t[0]}e=function(e){var t;2==e?t="XY":3==e?t="XYZ":4==e&&(t="XYZM");return t}(i=t.length)}this.layout=e,this.stride=i}},{key:"applyTransform",value:function(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}},{key:"rotate",value:function(e,t){var n=this.getFlatCoordinates();if(n){var i=this.getStride();Jn(n,0,n.length,i,e,t,n),this.changed()}}},{key:"scale",value:function(e,t,n){void 0===t&&(t=e),n||(n=Ye(this.getExtent()));var i=this.getFlatCoordinates();if(i){var r=this.getStride();!function(e,t,n,i,r,a,o,s){s=s||[];for(var l=o[0],u=o[1],c=0,h=t;h<n;h+=i){var f=e[h]-l,d=e[h+1]-u;s[c++]=l+r*f,s[c++]=u+a*d;for(var v=h+2;v<h+i;++v)s[c++]=e[v]}s&&s.length!=c&&(s.length=c)}(i,0,i.length,r,e,t,n,i),this.changed()}}},{key:"translate",value:function(e,t){var n=this.getFlatCoordinates();if(n){var i=this.getStride();!function(e,t,n,i,r,a,o){o=o||[];for(var s=0,l=t;l<n;l+=i){o[s++]=e[l]+r,o[s++]=e[l+1]+a;for(var u=l+2;u<l+i;++u)o[s++]=e[u]}o&&o.length!=s&&(o.length=s)}(n,0,n.length,i,e,t,n),this.changed()}}}]),n}(ti);function ii(e){var t;return"XY"==e?t=2:"XYZ"==e||"XYM"==e?t=3:"XYZM"==e&&(t=4),t}var ri=ni;function ai(e,t,n,i,r,a,o){var s,l=e[t],u=e[t+1],c=e[n]-l,h=e[n+1]-u;if(0===c&&0===h)s=t;else{var f=((r-l)*c+(a-u)*h)/(c*c+h*h);if(f>1)s=n;else{if(f>0){for(var d=0;d<i;++d)o[d]=ct(e[t+d],e[n+d],f);return void(o.length=i)}s=t}}for(var v=0;v<i;++v)o[v]=e[s+v];o.length=i}function oi(e,t,n,i,r){var a=e[t],o=e[t+1];for(t+=i;t<n;t+=i){var s=e[t],l=e[t+1],u=st(a,o,s,l);u>r&&(r=u),a=s,o=l}return r}function si(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a){var s=n[a];r=oi(e,t,s,i,r),t=s}return r}function li(e,t,n,i,r,a,o,s,l,u,c){if(t==n)return u;var h,f;if(0===r){if((f=st(o,s,e[t],e[t+1]))<u){for(h=0;h<i;++h)l[h]=e[t+h];return l.length=i,f}return u}c=c||[NaN,NaN];for(var d=t+i;d<n;)if(ai(e,d-i,d,i,o,s,c),(f=st(o,s,c[0],c[1]))<u){for(u=f,h=0;h<i;++h)l[h]=c[h];l.length=i,d+=i}else d+=i*Math.max((Math.sqrt(f)-Math.sqrt(u))/r|0,1);if(a&&(ai(e,n-i,t,i,o,s,c),(f=st(o,s,c[0],c[1]))<u)){for(u=f,h=0;h<i;++h)l[h]=c[h];l.length=i}return u}function ui(e,t,n,i,r,a,o,s,l,u,c){c=c||[NaN,NaN];for(var h=0,f=n.length;h<f;++h){var d=n[h];u=li(e,t,d,i,r,a,o,s,l,u,c),t=d}return u}function ci(e,t,n,i){for(var r=0,a=n.length;r<a;++r)for(var o=n[r],s=0;s<i;++s)e[t++]=o[s];return t}function hi(e,t,n,i,r){r=r||[];for(var a=0,o=0,s=n.length;o<s;++o){var l=ci(e,t,n[o],i);r[a++]=l,t=l}return r.length=a,r}function fi(e,t,n,i,r,a,o){var s=(n-t)/i;if(s<3){for(;t<n;t+=i)a[o++]=e[t],a[o++]=e[t+1];return o}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u=[t,n-i],c=0;u.length>0;){for(var h=u.pop(),f=u.pop(),d=0,v=e[f],g=e[f+1],p=e[h],y=e[h+1],m=f+i;m<h;m+=i){var _=ot(e[m],e[m+1],v,g,p,y);_>d&&(c=m,d=_)}d>r&&(l[(c-t)/i]=1,f+i<c&&u.push(f,c),c+i<h&&u.push(c,h))}for(var k=0;k<s;++k)l[k]&&(a[o++]=e[t+k*i],a[o++]=e[t+k*i+1]);return o}function di(e,t,n,i,r,a,o,s){for(var l=0,u=n.length;l<u;++l){var c=n[l];o=fi(e,t,c,i,r,a,o),s.push(o),t=c}return o}function vi(e,t){return t*Math.round(e/t)}function gi(e,t,n,i,r,a,o){if(t==n)return o;var s,l,u=vi(e[t],r),c=vi(e[t+1],r);t+=i,a[o++]=u,a[o++]=c;do{if(s=vi(e[t],r),l=vi(e[t+1],r),(t+=i)==n)return a[o++]=s,a[o++]=l,o}while(s==u&&l==c);for(;t<n;){var h=vi(e[t],r),f=vi(e[t+1],r);if(t+=i,h!=s||f!=l){var d=s-u,v=l-c,g=h-u,p=f-c;d*p==v*g&&(d<0&&g<d||d==g||d>0&&g>d)&&(v<0&&p<v||v==p||v>0&&p>v)?(s=h,l=f):(a[o++]=s,a[o++]=l,u=s,c=l,s=h,l=f)}}return a[o++]=s,a[o++]=l,o}function pi(e,t,n,i,r,a,o,s){for(var l=0,u=n.length;l<u;++l){var c=n[l];o=gi(e,t,c,i,r,a,o),s.push(o),t=c}return o}function yi(e,t,n,i,r){r=void 0!==r?r:[];for(var a=0,o=t;o<n;o+=i)r[a++]=e.slice(o,o+i);return r.length=a,r}function mi(e,t,n,i,r){r=void 0!==r?r:[];for(var a=0,o=0,s=n.length;o<s;++o){var l=n[o];r[a++]=yi(e,t,l,i,r[a]),t=l}return r.length=a,r}function _i(e,t,n,i,r){r=void 0!==r?r:[];for(var a=0,o=0,s=n.length;o<s;++o){var l=n[o];r[a++]=1===l.length&&l[0]===t?[]:mi(e,t,l,i,r[a]),t=l[l.length-1]}return r.length=a,r}function ki(e,t,n,i){for(var r=0,a=e[n-i],o=e[n-i+1];t<n;t+=i){var s=e[t],l=e[t+1];r+=o*s-a*l,a=s,o=l}return r/2}function xi(e,t,n,i){for(var r=0,a=0,o=n.length;a<o;++a){var s=n[a];r+=ki(e,t,s,i),t=s}return r}var bi=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),(r=t.call(this)).maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?r.setCoordinates(e,i):r.setFlatCoordinates(i,e),r}return c(n,[{key:"clone",value:function(){return new n(this.flatCoordinates.slice(),this.layout)}},{key:"closestPointXY",value:function(e,t,n,i){return i<Re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,n,i))}},{key:"getArea",value:function(){return ki(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}},{key:"getCoordinates",value:function(){return yi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}},{key:"getSimplifiedGeometryInternal",value:function(e){var t=[];return t.length=fi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new n(t,"XY")}},{key:"getType",value:function(){return"LinearRing"}},{key:"intersectsExtent",value:function(e){return!1}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ci(this.flatCoordinates,0,e,this.stride),this.changed()}}]),n}(ri),wi=bi,Si=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),(r=t.call(this)).setCoordinates(e,i),r}return c(n,[{key:"clone",value:function(){var e=new n(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}},{key:"closestPointXY",value:function(e,t,n,i){var r=this.flatCoordinates,a=st(e,t,r[0],r[1]);if(a<i){for(var o=this.stride,s=0;s<o;++s)n[s]=r[s];return n.length=o,a}return i}},{key:"getCoordinates",value:function(){return this.flatCoordinates?this.flatCoordinates.slice():[]}},{key:"computeExtent",value:function(e){return function(e,t){var n=e[0],i=e[1];return Oe(n,i,n,i,t)}(this.flatCoordinates,e)}},{key:"getType",value:function(){return"Point"}},{key:"intersectsExtent",value:function(e){return Fe(e,this.flatCoordinates[0],this.flatCoordinates[1])}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(e,t,n,i){for(var r=0,a=n.length;r<a;++r)e[t++]=n[r];return t}(this.flatCoordinates,0,e,this.stride),this.changed()}}]),n}(ri),Ci=Si;function Ei(e,t,n,i,r){return!Be(r,(function(r){return!Ti(e,t,n,i,r[0],r[1])}))}function Ti(e,t,n,i,r,a){for(var o=0,s=e[n-i],l=e[n-i+1];t<n;t+=i){var u=e[t],c=e[t+1];l<=a?c>a&&(u-s)*(a-l)-(r-s)*(c-l)>0&&o++:c<=a&&(u-s)*(a-l)-(r-s)*(c-l)<0&&o--,s=u,l=c}return 0!==o}function Ri(e,t,n,i,r,a){if(0===n.length)return!1;if(!Ti(e,t,n[0],i,r,a))return!1;for(var o=1,s=n.length;o<s;++o)if(Ti(e,n[o-1],n[o],i,r,a))return!1;return!0}function Pi(e,t,n,i,r,a,o){for(var s,l,u,c,h,f,d,v=r[a+1],g=[],p=0,y=n.length;p<y;++p){var m=n[p];for(c=e[m-i],f=e[m-i+1],s=t;s<m;s+=i)h=e[s],d=e[s+1],(v<=f&&d<=v||f<=v&&v<=d)&&(u=(v-f)/(d-f)*(h-c)+c,g.push(u)),c=h,f=d}var _=NaN,k=-1/0;for(g.sort(b),c=g[0],s=1,l=g.length;s<l;++s){h=g[s];var x=Math.abs(h-c);x>k&&Ri(e,t,n,i,u=(c+h)/2,v)&&(_=u,k=x),c=h}return isNaN(_)&&(_=r[a]),o?(o.push(_,v,k),o):[_,v,k]}function Ii(e,t,n,i,r){var a;for(t+=i;t<n;t+=i)if(a=r(e.slice(t-i,t),e.slice(t,t+i)))return a;return!1}function Fi(e,t,n,i,r){var a=Ge([1/0,1/0,-1/0,-1/0],e,t,n,i);return!!tt(r,a)&&(!!Ie(r,a)||(a[0]>=r[0]&&a[2]<=r[2]||(a[1]>=r[1]&&a[3]<=r[3]||Ii(e,t,n,i,(function(e,t){return function(e,t,n){var i=!1,r=Me(e,t),a=Me(e,n);if(r===Se.INTERSECTING||a===Se.INTERSECTING)i=!0;else{var o,s,l=e[0],u=e[1],c=e[2],h=e[3],f=t[0],d=t[1],v=n[0],g=n[1],p=(g-d)/(v-f);a&Se.ABOVE&&!(r&Se.ABOVE)&&(i=(o=v-(g-h)/p)>=l&&o<=c),i||!(a&Se.RIGHT)||r&Se.RIGHT||(i=(s=g-(v-c)*p)>=u&&s<=h),i||!(a&Se.BELOW)||r&Se.BELOW||(i=(o=v-(g-u)/p)>=l&&o<=c),i||!(a&Se.LEFT)||r&Se.LEFT||(i=(s=g-(v-l)*p)>=u&&s<=h)}return i}(r,e,t)})))))}function Mi(e,t,n,i,r){return!!Fi(e,t,n,i,r)||(!!Ti(e,t,n,i,r[0],r[1])||(!!Ti(e,t,n,i,r[0],r[3])||(!!Ti(e,t,n,i,r[2],r[1])||!!Ti(e,t,n,i,r[2],r[3]))))}function Li(e,t,n,i,r){if(!Mi(e,t,n[0],i,r))return!1;if(1===n.length)return!0;for(var a=1,o=n.length;a<o;++a)if(Ei(e,n[a-1],n[a],i,r)&&!Fi(e,n[a-1],n[a],i,r))return!1;return!0}function Oi(e,t,n,i){for(;t<n-i;){for(var r=0;r<i;++r){var a=e[t+r];e[t+r]=e[n-i+r],e[n-i+r]=a}t+=i,n-=i}}function Ai(e,t,n,i){for(var r=0,a=e[n-i],o=e[n-i+1];t<n;t+=i){var s=e[t],l=e[t+1];r+=(s-a)*(l+o),a=s,o=l}return 0===r?void 0:r>0}function Di(e,t,n,i,r){r=void 0!==r&&r;for(var a=0,o=n.length;a<o;++a){var s=n[a],l=Ai(e,t,s,i);if(0===a){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;t=s}return!0}function Ni(e,t,n,i,r){r=void 0!==r&&r;for(var a=0,o=n.length;a<o;++a){var s=n[a],l=Ai(e,t,s,i);(0===a?r&&l||!r&&!l:r&&!l||!r&&l)&&Oi(e,t,s,i),t=s}return t}function zi(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a)t=Ni(e,t,n[a],i,r);return t}var ji=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),(a=t.call(this)).ends_=[],a.flatInteriorPointRevision_=-1,a.flatInteriorPoint_=null,a.maxDelta_=-1,a.maxDeltaRevision_=-1,a.orientedRevision_=-1,a.orientedFlatCoordinates_=null,void 0!==i&&r?(a.setFlatCoordinates(i,e),a.ends_=r):a.setCoordinates(e,i),a}return c(n,[{key:"appendLinearRing",value:function(e){this.flatCoordinates?C(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}},{key:"clone",value:function(){var e=new n(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}},{key:"closestPointXY",value:function(e,t,n,i){return i<Re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(si(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ui(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,n,i))}},{key:"containsXY",value:function(e,t){return Ri(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}},{key:"getArea",value:function(){return xi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}},{key:"getCoordinates",value:function(e){var t;return void 0!==e?Ni(t=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,e):t=this.flatCoordinates,mi(t,0,this.ends_,this.stride)}},{key:"getEnds",value:function(){return this.ends_}},{key:"getFlatInteriorPoint",value:function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var e=Ye(this.getExtent());this.flatInteriorPoint_=Pi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}},{key:"getInteriorPoint",value:function(){return new Ci(this.getFlatInteriorPoint(),"XYM")}},{key:"getLinearRingCount",value:function(){return this.ends_.length}},{key:"getLinearRing",value:function(e){return e<0||this.ends_.length<=e?null:new wi(this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e]),this.layout)}},{key:"getLinearRings",value:function(){for(var e=this.layout,t=this.flatCoordinates,n=this.ends_,i=[],r=0,a=0,o=n.length;a<o;++a){var s=n[a],l=new wi(t.slice(r,s),e);i.push(l),r=s}return i}},{key:"getOrientedFlatCoordinates",value:function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;Di(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=Ni(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}},{key:"getSimplifiedGeometryInternal",value:function(e){var t=[],i=[];return t.length=pi(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,i),new n(t,"XY",i)}},{key:"getType",value:function(){return"Polygon"}},{key:"intersectsExtent",value:function(e){return Li(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=hi(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()}}]),n}(ri),Gi=ji;function Wi(e){var t=e[0],n=e[1],i=e[2],r=e[3],a=[t,n,t,r,i,r,i,n,t,n];return new ji(a,"XY",[a.length])}var Bi=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).on,i.once,i.un,e=Object.assign({},e),i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=Tn(e.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.nextCenter_=null,i.nextResolution_,i.nextRotation_,i.cancelAnchor_=void 0,e.projection&&kn(),e.center&&(e.center=Dn(e.center,i.projection_)),e.extent&&(e.extent=zn(e.extent,i.projection_)),i.applyOptions_(e),i}return c(n,[{key:"applyOptions_",value:function(e){var t=Object.assign({},e);for(var n in Ut)delete t[n];this.setProperties(t,!0);var i=function(e){var t,n,i,r=28,a=2,o=void 0!==e.minZoom?e.minZoom:0,s=void 0!==e.maxZoom?e.maxZoom:r,l=void 0!==e.zoomFactor?e.zoomFactor:a,u=void 0!==e.multiWorld&&e.multiWorld,c=void 0===e.smoothResolutionConstraint||e.smoothResolutionConstraint,h=void 0!==e.showFullExtent&&e.showFullExtent,f=Tn(e.projection,"EPSG:3857"),d=f.getExtent(),v=e.constrainOnlyCenter,g=e.extent;u||g||!f.isGlobal()||(v=!1,g=d);if(void 0!==e.resolutions){var p=e.resolutions;n=p[o],i=void 0!==p[s]?p[s]:p[p.length-1],t=e.constrainResolution?function(e,t,n,i){return t=void 0===t||t,function(r,a,o,s){if(void 0!==r){var l=e[0],u=e[e.length-1],c=n?Bn(l,n,o,i):l;if(s)return t?Un(r,c,u):at(r,u,c);var h=Math.min(c,r),f=Math.floor(w(e,h,a));return e[f]>c&&f<e.length-1?e[f+1]:e[f]}}}(p,c,!v&&g,h):Xn(n,i,c,!v&&g,h)}else{var y=(d?Math.max(et(d),qe(d)):360*Yt.degrees/f.getMetersPerUnit())/Vt/Math.pow(a,0),m=y/Math.pow(a,r-0);void 0!==(n=e.maxResolution)?o=0:n=y/Math.pow(l,o),void 0===(i=e.minResolution)&&(i=void 0!==e.maxZoom?void 0!==e.maxResolution?n/Math.pow(l,s):y/Math.pow(l,s):m),s=o+Math.floor(Math.log(n/i)/Math.log(l)),i=n/Math.pow(l,s-o),t=e.constrainResolution?function(e,t,n,i,r,a){return i=void 0===i||i,n=void 0!==n?n:0,function(o,s,l,u){if(void 0!==o){var c=r?Bn(t,r,l,a):t;if(u)return i?Un(o,c,n):at(o,n,c);var h=Math.ceil(Math.log(t/c)/Math.log(e)-1e-9),f=-s*(.5-1e-9)+.5,d=Math.min(c,o),v=Math.floor(Math.log(t/d)/Math.log(e)+f),g=Math.max(h,v);return at(t/Math.pow(e,g),n,c)}}}(l,n,i,c,!v&&g,h):Xn(n,i,c,!v&&g,h)}return{constraint:t,maxResolution:n,minResolution:i,minZoom:o,zoomFactor:l}}(e);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=i.minZoom;var r=function(e){if(void 0!==e.extent){var t=void 0===e.smoothExtentConstraint||e.smoothExtentConstraint;return Gn(e.extent,e.constrainOnlyCenter,t)}var n=Tn(e.projection,"EPSG:3857");if(!0!==e.multiWorld&&n.isGlobal()){var i=n.getExtent().slice();return i[0]=-1/0,i[2]=1/0,Gn(i,!1,!1)}return Wn}(e),a=i.constraint,o=function(e){var t=void 0===e.enableRotation||e.enableRotation;if(t){var n=e.constrainRotation;return void 0===n||!0===n?(i=i||lt(5),function(e,t){return t?e:void 0!==e?Math.abs(e)<=i?0:e:void 0}):!1===n?Yn:"number"===typeof n?function(e){var t=2*Math.PI/e;return function(e,n){return n?e:void 0!==e?e=Math.floor(e/t+.5)*t:void 0}}(n):Yn}var i;return Vn}(e);this.constraints_={center:r,resolution:a,rotation:o},this.setRotation(void 0!==e.rotation?e.rotation:0),this.setCenterInternal(void 0!==e.center?e.center:null),void 0!==e.resolution?this.setResolution(e.resolution):void 0!==e.zoom&&this.setZoom(e.zoom)}},{key:"padding",get:function(){return this.padding_},set:function(e){var t=this.padding_;this.padding_=e;var n=this.getCenterInternal();if(n){var i=e||[0,0,0,0];t=t||[0,0,0,0];var r=this.getResolution(),a=r/2*(i[3]-t[3]+t[1]-i[1]),o=r/2*(i[0]-t[0]+t[2]-i[2]);this.setCenterInternal([n[0]+a,n[1]-o])}}},{key:"getUpdatedOptions_",value:function(e){var t=this.getProperties();return void 0!==t.resolution?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}},{key:"animate",value:function(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var t=new Array(arguments.length),n=0;n<t.length;++n){var i=arguments[n];i.center&&((i=Object.assign({},i)).center=Dn(i.center,this.getProjection())),i.anchor&&((i=Object.assign({},i)).anchor=Dn(i.anchor,this.getProjection())),t[n]=i}this.animateInternal.apply(this,t)}},{key:"animateInternal",value:function(e){var t,n=arguments.length;n>1&&"function"===typeof arguments[n-1]&&(t=arguments[n-1],--n);for(var i=0;i<n&&!this.isDef();++i){var r=arguments[i];r.center&&this.setCenterInternal(r.center),void 0!==r.zoom?this.setZoom(r.zoom):r.resolution&&this.setResolution(r.resolution),void 0!==r.rotation&&this.setRotation(r.rotation)}if(i!==n){for(var a=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,l=this.targetRotation_,u=[];i<n;++i){var c=arguments[i],h={start:a,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||Zn,callback:t};if(c.center&&(h.sourceCenter=o,h.targetCenter=c.center.slice(),o=h.targetCenter),void 0!==c.zoom?(h.sourceResolution=s,h.targetResolution=this.getResolutionForZoom(c.zoom),s=h.targetResolution):c.resolution&&(h.sourceResolution=s,h.targetResolution=c.resolution,s=h.targetResolution),void 0!==c.rotation){h.sourceRotation=l;var f=ut(c.rotation-l+Math.PI,2*Math.PI)-Math.PI;h.targetRotation=l+f,l=h.targetRotation}Xi(h)?h.complete=!0:a+=h.duration,u.push(h)}this.animations_.push(u),this.setHint(Wt,1),this.updateAnimations_()}else t&&Ui(t,!0)}},{key:"getAnimating",value:function(){return this.hints_[Wt]>0}},{key:"getInteracting",value:function(){return this.hints_[Bt]>0}},{key:"cancelAnimations",value:function(){var e;this.setHint(Wt,-this.hints_[Wt]);for(var t=0,n=this.animations_.length;t<n;++t){var i=this.animations_[t];if(i[0].callback&&Ui(i[0].callback,!1),!e)for(var r=0,a=i.length;r<a;++r){var o=i[r];if(!o.complete){e=o.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}},{key:"updateAnimations_",value:function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var e=Date.now(),t=!1,n=this.animations_.length-1;n>=0;--n){for(var i=this.animations_[n],r=!0,a=0,o=i.length;a<o;++a){var s=i[a];if(!s.complete){var l=e-s.start,u=s.duration>0?l/s.duration:1;u>=1?(s.complete=!0,u=1):r=!1;var c=s.easing(u);if(s.sourceCenter){var h=s.sourceCenter[0],f=s.sourceCenter[1],d=s.targetCenter[0],v=s.targetCenter[1];this.nextCenter_=s.targetCenter;var g=h+c*(d-h),p=f+c*(v-f);this.targetCenter_=[g,p]}if(s.sourceResolution&&s.targetResolution){var y=1===c?s.targetResolution:s.sourceResolution+c*(s.targetResolution-s.sourceResolution);if(s.anchor){var m=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(y,0,m,!0);this.targetCenter_=this.calculateCenterZoom(_,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){var k=1===c?ut(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+c*(s.targetRotation-s.sourceRotation);if(s.anchor){var x=this.constraints_.rotation(k,!0);this.targetCenter_=this.calculateCenterRotate(x,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=k}if(this.applyTargetState_(!0),t=!0,!s.complete)break}}if(r){this.animations_[n]=null,this.setHint(Wt,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var b=i[0].callback;b&&Ui(b,!0)}}this.animations_=this.animations_.filter(Boolean),t&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}}},{key:"calculateCenterRotate",value:function(e,t){var n,i,r,a=this.getCenterInternal();return void 0!==a&&(fn(n=[a[0]-t[0],a[1]-t[1]],e-this.getRotation()),r=t,(i=n)[0]+=+r[0],i[1]+=+r[1]),n}},{key:"calculateCenterZoom",value:function(e,t){var n,i=this.getCenterInternal(),r=this.getResolution();void 0!==i&&void 0!==r&&(n=[t[0]-e*(t[0]-i[0])/r,t[1]-e*(t[1]-i[1])/r]);return n}},{key:"getViewportSize_",value:function(e){var t=this.viewportSize_;if(e){var n=t[0],i=t[1];return[Math.abs(n*Math.cos(e))+Math.abs(i*Math.sin(e)),Math.abs(n*Math.sin(e))+Math.abs(i*Math.cos(e))]}return t}},{key:"setViewportSize",value:function(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}},{key:"getCenter",value:function(){var e=this.getCenterInternal();return e?An(e,this.getProjection()):e}},{key:"getCenterInternal",value:function(){return this.get(Ut.CENTER)}},{key:"getConstraints",value:function(){return this.constraints_}},{key:"getConstrainResolution",value:function(){return this.get("constrainResolution")}},{key:"getHints",value:function(e){return void 0!==e?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}},{key:"calculateExtent",value:function(e){return Nn(this.calculateExtentInternal(e),this.getProjection())}},{key:"calculateExtentInternal",value:function(e){e=e||this.getViewportSizeMinusPadding_();var t=this.getCenterInternal();ye(t,1);var n=this.getResolution();ye(void 0!==n,2);var i=this.getRotation();return ye(void 0!==i,3),He(t,n,i,e)}},{key:"getMaxResolution",value:function(){return this.maxResolution_}},{key:"getMinResolution",value:function(){return this.minResolution_}},{key:"getMaxZoom",value:function(){return this.getZoomForResolution(this.minResolution_)}},{key:"setMaxZoom",value:function(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}},{key:"getMinZoom",value:function(){return this.getZoomForResolution(this.maxResolution_)}},{key:"setMinZoom",value:function(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}},{key:"setConstrainResolution",value:function(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}},{key:"getProjection",value:function(){return this.projection_}},{key:"getResolution",value:function(){return this.get(Ut.RESOLUTION)}},{key:"getResolutions",value:function(){return this.resolutions_}},{key:"getResolutionForExtent",value:function(e,t){return this.getResolutionForExtentInternal(zn(e,this.getProjection()),t)}},{key:"getResolutionForExtentInternal",value:function(e,t){t=t||this.getViewportSizeMinusPadding_();var n=et(e)/t[0],i=qe(e)/t[1];return Math.max(n,i)}},{key:"getResolutionForValueFunction",value:function(e){e=e||2;var t=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(t/n)/Math.log(e);return function(n){return t/Math.pow(e,n*i)}}},{key:"getRotation",value:function(){return this.get(Ut.ROTATION)}},{key:"getValueForResolutionFunction",value:function(e){var t=Math.log(e||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/t;return function(e){return Math.log(n/e)/t/r}}},{key:"getViewportSizeMinusPadding_",value:function(e){var t=this.getViewportSize_(e),n=this.padding_;return n&&(t=[t[0]-n[1]-n[3],t[1]-n[0]-n[2]]),t}},{key:"getState",value:function(){var e=this.getProjection(),t=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),r=this.padding_;if(r){var a=this.getViewportSizeMinusPadding_();i=Vi(i,this.getViewportSize_(),[a[0]/2+r[3],a[1]/2+r[0]],t,n)}return{center:i.slice(0),projection:void 0!==e?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}},{key:"getViewStateAndExtent",value:function(){return{viewState:this.getState(),extent:this.calculateExtent()}}},{key:"getZoom",value:function(){var e,t=this.getResolution();return void 0!==t&&(e=this.getZoomForResolution(t)),e}},{key:"getZoomForResolution",value:function(e){var t,n,i=this.minZoom_||0;if(this.resolutions_){var r=w(this.resolutions_,e,1);i=r,t=this.resolutions_[r],n=r==this.resolutions_.length-1?2:t/this.resolutions_[r+1]}else t=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(t/e)/Math.log(n)}},{key:"getResolutionForZoom",value:function(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var t=at(Math.floor(e),0,this.resolutions_.length-2),n=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(n,at(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}},{key:"fit",value:function(e,t){var n;if(ye(Array.isArray(e)||"function"===typeof e.getSimplifiedGeometry,24),Array.isArray(e))ye(!nt(e),25),n=Wi(zn(e,this.getProjection()));else if("Circle"===e.getType()){var i=zn(e.getExtent(),this.getProjection());(n=Wi(i)).rotate(this.getRotation(),Ye(i))}else{var r=On();n=r?e.clone().transform(r,this.getProjection()):e}this.fitInternal(n,t)}},{key:"rotatedExtentForGeometry",value:function(e){for(var t=this.getRotation(),n=Math.cos(t),i=Math.sin(-t),r=e.getFlatCoordinates(),a=e.getStride(),o=1/0,s=1/0,l=-1/0,u=-1/0,c=0,h=r.length;c<h;c+=a){var f=r[c]*n-r[c+1]*i,d=r[c]*i+r[c+1]*n;o=Math.min(o,f),s=Math.min(s,d),l=Math.max(l,f),u=Math.max(u,d)}return[o,s,l,u]}},{key:"fitInternal",value:function(e,t){var n=(t=t||{}).size;n||(n=this.getViewportSizeMinusPadding_());var i,r=void 0!==t.padding?t.padding:[0,0,0,0],a=void 0!==t.nearest&&t.nearest;i=void 0!==t.minResolution?t.minResolution:void 0!==t.maxZoom?this.getResolutionForZoom(t.maxZoom):0;var o=this.rotatedExtentForGeometry(e),s=this.getResolutionForExtentInternal(o,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);s=isNaN(s)?i:Math.max(s,i),s=this.getConstrainedResolution(s,a?0:1);var l=this.getRotation(),u=Math.sin(l),c=Math.cos(l),h=Ye(o);h[0]+=(r[1]-r[3])/2*s,h[1]+=(r[0]-r[2])/2*s;var f=h[0]*c-h[1]*u,d=h[1]*c+h[0]*u,v=this.getConstrainedCenter([f,d],s),g=t.callback?t.callback:P;void 0!==t.duration?this.animateInternal({resolution:s,center:v,duration:t.duration,easing:t.easing},g):(this.targetResolution_=s,this.targetCenter_=v,this.applyTargetState_(!1,!0),Ui(g,!0))}},{key:"centerOn",value:function(e,t,n){this.centerOnInternal(Dn(e,this.getProjection()),t,n)}},{key:"centerOnInternal",value:function(e,t,n){this.setCenterInternal(Vi(e,t,n,this.getResolution(),this.getRotation()))}},{key:"calculateCenterShift",value:function(e,t,n,i){var r,a=this.padding_;if(a&&e){var o=this.getViewportSizeMinusPadding_(-n),s=Vi(e,i,[o[0]/2+a[3],o[1]/2+a[0]],t,n);r=[e[0]-s[0],e[1]-s[1]]}return r}},{key:"isDef",value:function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}},{key:"adjustCenter",value:function(e){var t=An(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}},{key:"adjustCenterInternal",value:function(e){var t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}},{key:"adjustResolution",value:function(e,t){t=t&&Dn(t,this.getProjection()),this.adjustResolutionInternal(e,t)}},{key:"adjustResolutionInternal",value:function(e,t){var n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*e,0,i,n);t&&(this.targetCenter_=this.calculateCenterZoom(r,t)),this.targetResolution_*=e,this.applyTargetState_()}},{key:"adjustZoom",value:function(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}},{key:"adjustRotation",value:function(e,t){t&&(t=Dn(t,this.getProjection())),this.adjustRotationInternal(e,t)}},{key:"adjustRotationInternal",value:function(e,t){var n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+e,n);t&&(this.targetCenter_=this.calculateCenterRotate(i,t)),this.targetRotation_+=e,this.applyTargetState_()}},{key:"setCenter",value:function(e){this.setCenterInternal(e?Dn(e,this.getProjection()):e)}},{key:"setCenterInternal",value:function(e){this.targetCenter_=e,this.applyTargetState_()}},{key:"setHint",value:function(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}},{key:"setResolution",value:function(e){this.targetResolution_=e,this.applyTargetState_()}},{key:"setRotation",value:function(e){this.targetRotation_=e,this.applyTargetState_()}},{key:"setZoom",value:function(e){this.setResolution(this.getResolutionForZoom(e))}},{key:"applyTargetState_",value:function(e,t){var n=this.getAnimating()||this.getInteracting()||t,i=this.constraints_.rotation(this.targetRotation_,n),r=this.getViewportSize_(i),a=this.constraints_.resolution(this.targetResolution_,0,r,n),o=this.constraints_.center(this.targetCenter_,a,r,n,this.calculateCenterShift(this.targetCenter_,a,i,r));this.get(Ut.ROTATION)!==i&&this.set(Ut.ROTATION,i),this.get(Ut.RESOLUTION)!==a&&(this.set(Ut.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),o&&this.get(Ut.CENTER)&&hn(this.get(Ut.CENTER),o)||this.set(Ut.CENTER,o),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}},{key:"resolveConstraints",value:function(e,t,n){e=void 0!==e?e:200;var i=t||0,r=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,i,a),s=this.constraints_.center(this.targetCenter_,o,a,!1,this.calculateCenterShift(this.targetCenter_,o,r,a));if(0===e&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=r,this.targetCenter_=s,void this.applyTargetState_();n=n||(0===e?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===r&&this.getCenterInternal()&&hn(this.getCenterInternal(),s)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:s,resolution:o,duration:e,easing:Hn,anchor:n}))}},{key:"beginInteraction",value:function(){this.resolveConstraints(0),this.setHint(Bt,1)}},{key:"endInteraction",value:function(e,t,n){n=n&&Dn(n,this.getProjection()),this.endInteractionInternal(e,t,n)}},{key:"endInteractionInternal",value:function(e,t,n){this.getInteracting()&&(this.setHint(Bt,-1),this.resolveConstraints(e,t,n))}},{key:"getConstrainedCenter",value:function(e,t){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),n)}},{key:"getConstrainedZoom",value:function(e,t){var n=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(n,t))}},{key:"getConstrainedResolution",value:function(e,t){t=t||0;var n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,n)}}]),n}(Q);function Ui(e,t){setTimeout((function(){e(t)}),0)}function Xi(e){return!(e.sourceCenter&&e.targetCenter&&!hn(e.sourceCenter,e.targetCenter))&&(e.sourceResolution===e.targetResolution&&e.sourceRotation===e.targetRotation)}function Vi(e,t,n,i,r){var a=Math.cos(-r),o=Math.sin(-r),s=e[0]*a-e[1]*o,l=e[1]*a+e[0]*o;return[(s+=(t[0]/2-n[0])*i)*a-(l+=(n[1]-t[1]/2)*i)*(o=-o),l*a+s*o]}var Yi=Bi;function Ki(e,t){if(!e.visible)return!1;var n=t.resolution;if(n<e.minResolution||n>=e.maxResolution)return!1;var i=t.zoom;return i>e.minZoom&&i<=e.maxZoom}var Hi=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=Object.assign({},e);delete r.source,(i=t.call(this,r)).on,i.once,i.un,i.mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,i.sourceReady_=!1,i.rendered=!1,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addChangeListener(Lt,i.handleSourcePropertyChange_);var a=e.source?e.source:null;return i.setSource(a),i}return c(n,[{key:"getLayersArray",value:function(e){return(e=e||[]).push(this),e}},{key:"getLayerStatesArray",value:function(e){return(e=e||[]).push(this.getLayerState()),e}},{key:"getSource",value:function(){return this.get(Lt)||null}},{key:"getRenderSource",value:function(){return this.getSource()}},{key:"getSourceState",value:function(){var e=this.getSource();return e?e.getState():"undefined"}},{key:"handleSourceChange_",value:function(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}},{key:"handleSourcePropertyChange_",value:function(){var e=this;this.sourceChangeKey_&&(Y(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;var t=this.getSource();t&&(this.sourceChangeKey_=X(t,O,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((function(){e.dispatchEvent("sourceready")}),0))),this.changed()}},{key:"getFeatures",value:function(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}},{key:"getData",value:function(e){return this.renderer_&&this.rendered?this.renderer_.getData(e):null}},{key:"isVisible",value:function(e){var t,n,i=this,r=this.getMapInternal();!e&&r&&(e=r.getView()),!(t=e instanceof Yi?{viewState:e.getState(),extent:e.calculateExtent()}:e).layerStatesArray&&r&&(t.layerStatesArray=r.getLayerGroup().getLayerStatesArray()),n=t.layerStatesArray?t.layerStatesArray.find((function(e){return e.layer===i})):this.getLayerState();var a=this.getExtent();return Ki(n,t.viewState)&&(!a||tt(a,t.extent))}},{key:"getAttributions",value:function(e){if(!this.isVisible(e))return[];var t,n=this.getSource();if(n&&(t=n.getAttributions()),!t)return[];var i=t(e instanceof Yi?e.getViewStateAndExtent():e);return Array.isArray(i)||(i=[i]),i}},{key:"render",value:function(e,t){var n=this.getRenderer();return n.prepareFrame(e)?(this.rendered=!0,n.renderFrame(e,t)):null}},{key:"unrender",value:function(){this.rendered=!1}},{key:"setMapInternal",value:function(e){e||this.unrender(),this.set(Ot,e)}},{key:"getMapInternal",value:function(){return this.get(Ot)}},{key:"setMap",value:function(e){this.mapPrecomposeKey_&&(Y(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Y(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=X(e,zt,(function(e){var t=e.frameState.layerStatesArray,n=this.getLayerState(!1);ye(!t.some((function(e){return e.layer===n.layer})),67),t.push(n)}),this),this.mapRenderKey_=X(this,O,e.render,e),this.changed())}},{key:"setSource",value:function(e){this.set(Lt,e)}},{key:"getRenderer",value:function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}},{key:"hasRenderer",value:function(){return!!this.renderer_}},{key:"createRenderer",value:function(){return null}},{key:"disposeInternal",value:function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),d(f(n.prototype),"disposeInternal",this).call(this)}}]),n}(At),Zi=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).map_=e,i}return c(n,[{key:"dispatchRenderEvent",value:function(e,t){Z()}},{key:"calculateMatrices2D",value:function(e){var t=e.viewState,n=e.coordinateToPixelTransform,i=e.pixelToCoordinateTransform;xe(n,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),be(i,n)}},{key:"forEachFeatureAtCoordinate",value:function(e,t,n,i,r,a,o,s){var l,u=t.viewState;function c(e,t,n,i){return r.call(a,t,e?n:null,i)}var h=u.projection,f=dn(e.slice(),h),d=[[0,0]];if(h.canWrapX()&&i){var v=et(h.getExtent());d.push([-v,0],[v,0])}for(var g=t.layerStatesArray,p=g.length,y=[],m=[],_=0;_<d.length;_++)for(var k=p-1;k>=0;--k){var x=g[k],b=x.layer;if(b.hasRenderer()&&Ki(x,u)&&o.call(s,b)){var w=b.getRenderer(),S=b.getSource();if(w&&S){var C=S.getWrapX()?f:e,E=c.bind(null,x.managed);m[0]=C[0]+d[_][0],m[1]=C[1]+d[_][1],l=w.forEachFeatureAtCoordinate(m,t,n,E,y)}if(l)return l}}if(0!==y.length){var T=1/y.length;return y.forEach((function(e,t){return e.distanceSq+=t*T})),y.sort((function(e,t){return e.distanceSq-t.distanceSq})),y.some((function(e){return l=e.callback(e.feature,e.layer,e.geometry)})),l}}},{key:"hasFeatureAtCoordinate",value:function(e,t,n,i,r,a){return void 0!==this.forEachFeatureAtCoordinate(e,t,n,i,T,this,r,a)}},{key:"getMap",value:function(){return this.map_}},{key:"renderFrame",value:function(e){Z()}},{key:"scheduleExpireIconCache",value:function(e){St.canExpireCache()&&e.postRenderFunctions.push(qi)}}]),n}(x);function qi(e,t){St.expire()}var $i=Zi,Ji=function(e){g(n,e);var t=m(n);function n(e,i,r,a){var s;return o(this,n),(s=t.call(this,e)).inversePixelTransform=i,s.frameState=r,s.context=a,s}return c(n)}(_),Qi="ol-hidden",er="ol-unselectable",tr="ol-control",nr="ol-collapsed",ir=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"),rr=["style","variant","weight","size","lineHeight","family"],ar=function(e){var t=e.match(ir);if(!t)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,r=rr.length;i<r;++i){var a=t[i+1];void 0!==a&&(n[rr[i]]=a)}return n.families=n.family.split(/,\s?/),n};function or(e,t,n,i){var r;return r=n&&n.length?n.shift():ve?new OffscreenCanvas(e||300,t||300):document.createElement("canvas"),e&&(r.width=e),t&&(r.height=t),r.getContext("2d",i)}function sr(e){var t=e.canvas;t.width=1,t.height=1,e.clearRect(0,0,1,1)}function lr(e,t){var n=t.parentNode;n&&n.replaceChild(e,t)}function ur(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}var cr,hr="10px sans-serif",fr="#000",dr="round",vr=[],gr="round",pr="#000",yr="center",mr="middle",_r=[0,0,0,0],kr=new Q,xr=null,br={},wr=function(){var e,t,n="32px ",i=["monospace","serif"],r=i.length,a="wmytzilWMYTZIL@#/&?$%10\uf013";function o(e,o,s){for(var l=!0,u=0;u<r;++u){var c=i[u];if(t=Er(e+" "+o+" "+n+c,a),s!=c){var h=Er(e+" "+o+" "+n+s+","+c,a);l=l&&h!=t}}return!!l}function s(){for(var t=!0,n=kr.getKeys(),i=0,r=n.length;i<r;++i){var a=n[i];kr.get(a)<100&&(o.apply(this,a.split("\n"))?(I(br),xr=null,cr=void 0,kr.set(a,100)):(kr.set(a,kr.get(a)+1,!0),t=!1))}t&&(clearInterval(e),e=void 0)}return function(t){var n=ar(t);if(n)for(var i=n.families,r=0,a=i.length;r<a;++r){var l=i[r],u=n.style+"\n"+n.weight+"\n"+l;void 0===kr.get(u)&&(kr.set(u,100,!0),o(n.style,n.weight,l)||(kr.set(u,0,!0),void 0===e&&(e=setInterval(s,32))))}}}(),Sr=function(){var e;return function(t){var n=br[t];if(void 0==n){if(ve){var i=ar(t),r=Cr(t,"\u017dg");n=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else e||((e=document.createElement("div")).innerHTML="M",e.style.minHeight="0",e.style.maxHeight="none",e.style.height="auto",e.style.padding="0",e.style.border="none",e.style.position="absolute",e.style.display="block",e.style.left="-99999px"),e.style.font=t,document.body.appendChild(e),n=e.offsetHeight,document.body.removeChild(e);br[t]=n}return n}}();function Cr(e,t){return xr||(xr=or(1,1)),e!=cr&&(xr.font=e,cr=xr.font),xr.measureText(t)}function Er(e,t){return Cr(e,t).width}function Tr(e,t,n){if(t in n)return n[t];var i=t.split("\n").reduce((function(t,n){return Math.max(t,Er(e,n))}),0);return n[t]=i,i}function Rr(e,t,n,i,r,a,o,s,l,u,c){e.save(),1!==n&&(e.globalAlpha*=n),t&&e.setTransform.apply(e,t),i.contextInstructions?(e.translate(l,u),e.scale(c[0],c[1]),function(e,t){for(var n=e.contextInstructions,i=0,r=n.length;i<r;i+=2)Array.isArray(n[i+1])?t[n[i]].apply(t,n[i+1]):t[n[i]]=n[i+1]}(i,e)):c[0]<0||c[1]<0?(e.translate(l,u),e.scale(c[0],c[1]),e.drawImage(i,r,a,o,s,0,0,o,s)):e.drawImage(i,r,a,o,s,l,u,o*c[0],s*c[1]),e.restore()}var Pr=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),(i=t.call(this,e)).fontChangeListenerKey_=X(kr,k,e.redrawText.bind(e)),i.element_=document.createElement("div");var r=i.element_.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",i.element_.className=er+" ol-layers";var a=e.getViewport();return a.insertBefore(i.element_,a.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return c(n,[{key:"dispatchRenderEvent",value:function(e,t){var n=this.getMap();if(n.hasListener(e)){var i=new Ji(e,void 0,t);n.dispatchEvent(i)}}},{key:"disposeInternal",value:function(){Y(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),d(f(n.prototype),"disposeInternal",this).call(this)}},{key:"renderFrame",value:function(e){if(e){this.calculateMatrices2D(e),this.dispatchRenderEvent(zt,e);var t=e.layerStatesArray.sort((function(e,t){return e.zIndex-t.zIndex})),n=e.viewState;this.children_.length=0;for(var i=[],r=null,a=0,o=t.length;a<o;++a){var s=t[a];e.layerIndex=a;var l=s.layer,u=l.getSourceState();if(!Ki(s,n)||"ready"!=u&&"undefined"!=u)l.unrender();else{var c=l.render(e,r);c&&(c!==r&&(this.children_.push(c),r=c),"getDeclutter"in l&&i.push(l))}}for(var h=i.length-1;h>=0;--h)i[h].renderDeclutter(e);!function(e,t){for(var n=e.childNodes,i=0;;++i){var r=n[i],a=t[i];if(!r&&!a)break;r!==a&&(r?a?e.insertBefore(a,r):(e.removeChild(r),--i):e.appendChild(a))}}(this.element_,this.children_),this.dispatchRenderEvent(jt,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)}}]),n}($i),Ir=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),(r=t.call(this,e)).layer=i,r}return c(n)}(_),Fr="layers",Mr=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{};var r=Object.assign({},e);delete r.layers;var a=e.layers;return(i=t.call(this,r)).on,i.once,i.un,i.layersListenerKeys_=[],i.listenerKeys_={},i.addChangeListener(Fr,i.handleLayersChanged_),a?Array.isArray(a)?a=new le(a.slice(),{unique:!0}):ye("function"===typeof a.getArray,43):a=new le(void 0,{unique:!0}),i.setLayers(a),i}return c(n,[{key:"handleLayerChange_",value:function(){this.changed()}},{key:"handleLayersChanged_",value:function(){this.layersListenerKeys_.forEach(Y),this.layersListenerKeys_.length=0;var e=this.getLayers();for(var t in this.layersListenerKeys_.push(X(e,re,this.handleLayersAdd_,this),X(e,ae,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[t].forEach(Y);I(this.listenerKeys_);for(var n=e.getArray(),i=0,r=n.length;i<r;i++){var a=n[i];this.registerLayerListeners_(a),this.dispatchEvent(new Ir("addlayer",a))}this.changed()}},{key:"registerLayerListeners_",value:function(e){var t=[X(e,k,this.handleLayerChange_,this),X(e,O,this.handleLayerChange_,this)];e instanceof n&&t.push(X(e,"addlayer",this.handleLayerGroupAdd_,this),X(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[$(e)]=t}},{key:"handleLayerGroupAdd_",value:function(e){this.dispatchEvent(new Ir("addlayer",e.layer))}},{key:"handleLayerGroupRemove_",value:function(e){this.dispatchEvent(new Ir("removelayer",e.layer))}},{key:"handleLayersAdd_",value:function(e){var t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new Ir("addlayer",t)),this.changed()}},{key:"handleLayersRemove_",value:function(e){var t=e.element,n=$(t);this.listenerKeys_[n].forEach(Y),delete this.listenerKeys_[n],this.dispatchEvent(new Ir("removelayer",t)),this.changed()}},{key:"getLayers",value:function(){return this.get(Fr)}},{key:"setLayers",value:function(e){var t=this.getLayers();if(t)for(var n=t.getArray(),i=0,r=n.length;i<r;++i)this.dispatchEvent(new Ir("removelayer",n[i]));this.set(Fr,e)}},{key:"getLayersArray",value:function(e){return e=void 0!==e?e:[],this.getLayers().forEach((function(t){t.getLayersArray(e)})),e}},{key:"getLayerStatesArray",value:function(e){var t=void 0!==e?e:[],n=t.length;this.getLayers().forEach((function(e){e.getLayerStatesArray(t)}));var i=this.getLayerState(),r=i.zIndex;e||void 0!==i.zIndex||(r=0);for(var a=n,o=t.length;a<o;a++){var s=t[a];s.opacity*=i.opacity,s.visible=s.visible&&i.visible,s.maxResolution=Math.min(s.maxResolution,i.maxResolution),s.minResolution=Math.max(s.minResolution,i.minResolution),s.minZoom=Math.max(s.minZoom,i.minZoom),s.maxZoom=Math.min(s.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==s.extent?s.extent=$e(s.extent,i.extent):s.extent=i.extent),void 0===s.zIndex&&(s.zIndex=r)}return t}},{key:"getSourceState",value:function(){return"ready"}}]),n}(At),Lr=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),(a=t.call(this,e)).map=i,a.frameState=void 0!==r?r:null,a}return c(n)}(_),Or=function(e){g(n,e);var t=m(n);function n(e,i,r,a,s,l){var u;return o(this,n),(u=t.call(this,e,i,s)).originalEvent=r,u.pixel_=null,u.coordinate_=null,u.dragging=void 0!==a&&a,u.activePointers=l,u}return c(n,[{key:"pixel",get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(e){this.pixel_=e}},{key:"coordinate",get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(e){this.coordinate_=e}},{key:"preventDefault",value:function(){d(f(n.prototype),"preventDefault",this).call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){d(f(n.prototype),"stopPropagation",this).call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}]),n}(Lr),Ar={SINGLECLICK:"singleclick",CLICK:N,DBLCLICK:z,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Dr="pointermove",Nr="pointerdown",zr=function(e){g(n,e);var t=m(n);function n(e,i){var r;o(this,n),(r=t.call(this,e)).map_=e,r.clickTimeoutId_,r.emulateClicks_=!1,r.dragging_=!1,r.dragListenerKeys_=[],r.moveTolerance_=void 0===i?1:i,r.down_=null;var a=r.map_.getViewport();return r.activePointers_=[],r.trackedTouches_={},r.element_=a,r.pointerdownListenerKey_=X(a,Nr,r.handlePointerDown_,h(r)),r.originalPointerMoveEvent_,r.relayedListenerKey_=X(a,Dr,r.relayMoveEvent_,h(r)),r.boundHandleTouchMove_=r.handleTouchMove_.bind(h(r)),r.element_.addEventListener(B,r.boundHandleTouchMove_,!!pe&&{passive:!1}),r}return c(n,[{key:"emulateClick_",value:function(e){var t=this,n=new Or(Ar.CLICK,this.map_,e);this.dispatchEvent(n),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new Or(Ar.DBLCLICK,this.map_,e),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout((function(){t.clickTimeoutId_=void 0;var n=new Or(Ar.SINGLECLICK,t.map_,e);t.dispatchEvent(n)}),250)}},{key:"updateActivePointers_",value:function(e){var t=e,n=t.pointerId;if(t.type==Ar.POINTERUP||t.type==Ar.POINTERCANCEL){for(var i in delete this.trackedTouches_[n],this.trackedTouches_)if(this.trackedTouches_[i].target!==t.target){delete this.trackedTouches_[i];break}}else t.type!=Ar.POINTERDOWN&&t.type!=Ar.POINTERMOVE||(this.trackedTouches_[n]=t);this.activePointers_=Object.values(this.trackedTouches_)}},{key:"handlePointerUp_",value:function(e){this.updateActivePointers_(e);var t=new Or(Ar.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(Y),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}},{key:"isMouseActionButton_",value:function(e){return 0===e.button}},{key:"handlePointerDown_",value:function(e){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(e);var t=new Or(Ar.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),0===this.dragListenerKeys_.length){var n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(X(n,Ar.POINTERMOVE,this.handlePointerMove_,this),X(n,Ar.POINTERUP,this.handlePointerUp_,this),X(this.element_,Ar.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(X(this.element_.getRootNode(),Ar.POINTERUP,this.handlePointerUp_,this))}}},{key:"handlePointerMove_",value:function(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;var t=new Or(Ar.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}},{key:"relayMoveEvent_",value:function(e){this.originalPointerMoveEvent_=e;var t=!(!this.down_||!this.isMoving_(e));this.dispatchEvent(new Or(Ar.POINTERMOVE,this.map_,e,t))}},{key:"handleTouchMove_",value:function(e){var t=this.originalPointerMoveEvent_;t&&!t.defaultPrevented||"boolean"===typeof e.cancelable&&!0!==e.cancelable||e.preventDefault()}},{key:"isMoving_",value:function(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}},{key:"disposeInternal",value:function(){this.relayedListenerKey_&&(Y(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(B,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Y(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Y),this.dragListenerKeys_.length=0,this.element_=null,d(f(n.prototype),"disposeInternal",this).call(this)}}]),n}(L),jr="postrender",Gr="movestart",Wr="moveend",Br="loadstart",Ur="loadend",Xr="layergroup",Vr="size",Yr="target",Kr="view",Hr=1/0,Zr=0,qr=1,$r=2,Jr=3,Qr=4,ea=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),(r=t.call(this,(function(t){return e.apply(null,t)}),(function(e){return e[0].getKey()}))).boundHandleTileChange_=r.handleTileChange.bind(h(r)),r.tileChangeCallback_=i,r.tilesLoading_=0,r.tilesLoadingKeys_={},r}return c(n,[{key:"enqueue",value:function(e){var t=d(f(n.prototype),"enqueue",this).call(this,e);t&&e[0].addEventListener(O,this.boundHandleTileChange_);return t}},{key:"getTilesLoading",value:function(){return this.tilesLoading_}},{key:"handleTileChange",value:function(e){var t=e.target,n=t.getState();if(n===$r||n===Jr||n===Qr){n!==Jr&&t.removeEventListener(O,this.boundHandleTileChange_);var i=t.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}}},{key:"loadMoreTiles",value:function(e,t){for(var n,i,r=0;this.tilesLoading_<e&&r<t&&this.getCount()>0;)i=(n=this.dequeue()[0]).getKey(),n.getState()!==Zr||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++r,n.load())}}]),n}(function(){function e(t,n){o(this,e),this.priorityFunction_=t,this.keyFunction_=n,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return c(e,[{key:"clear",value:function(){this.elements_.length=0,this.priorities_.length=0,I(this.queuedElements_)}},{key:"dequeue",value:function(){var e=this.elements_,t=this.priorities_,n=e[0];1==e.length?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n}},{key:"enqueue",value:function(e){ye(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=Hr&&(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}},{key:"getCount",value:function(){return this.elements_.length}},{key:"getLeftChildIndex_",value:function(e){return 2*e+1}},{key:"getRightChildIndex_",value:function(e){return 2*e+2}},{key:"getParentIndex_",value:function(e){return e-1>>1}},{key:"heapify_",value:function(){var e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}},{key:"isEmpty",value:function(){return 0===this.elements_.length}},{key:"isKeyQueued",value:function(e){return e in this.queuedElements_}},{key:"isQueued",value:function(e){return this.isKeyQueued(this.keyFunction_(e))}},{key:"siftUp_",value:function(e){for(var t=this.elements_,n=this.priorities_,i=t.length,r=t[e],a=n[e],o=e;e<i>>1;){var s=this.getLeftChildIndex_(e),l=this.getRightChildIndex_(e),u=l<i&&n[l]<n[s]?l:s;t[e]=t[u],n[e]=n[u],e=u}t[e]=r,n[e]=a,this.siftDown_(o,e)}},{key:"siftDown_",value:function(e,t){for(var n=this.elements_,i=this.priorities_,r=n[t],a=i[t];t>e;){var o=this.getParentIndex_(t);if(!(i[o]>a))break;n[t]=n[o],i[t]=i[o],t=o}n[t]=r,i[t]=a}},{key:"reprioritize",value:function(){var e,t,n,i=this.priorityFunction_,r=this.elements_,a=this.priorities_,o=0,s=r.length;for(t=0;t<s;++t)(n=i(e=r[t]))==Hr?delete this.queuedElements_[this.keyFunction_(e)]:(a[o]=n,r[o++]=e);r.length=o,a.length=o,this.heapify_()}}]),e}()),ta=ea;var na=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),i=t.call(this);var r=e.element;return!r||e.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),i.element=r||null,i.target_=null,i.map_=null,i.listenerKeys=[],e.render&&(i.render=e.render),e.target&&i.setTarget(e.target),i}return c(n,[{key:"disposeInternal",value:function(){ur(this.element),d(f(n.prototype),"disposeInternal",this).call(this)}},{key:"getMap",value:function(){return this.map_}},{key:"setMap",value:function(e){this.map_&&ur(this.element);for(var t=0,n=this.listenerKeys.length;t<n;++t)Y(this.listenerKeys[t]);(this.listenerKeys.length=0,this.map_=e,e)&&((this.target_?this.target_:e.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==P&&this.listenerKeys.push(X(e,jr,this.render,this)),e.render())}},{key:"render",value:function(e){}},{key:"setTarget",value:function(e){this.target_="string"===typeof e?document.getElementById(e):e}}]),n}(Q),ia=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},(i=t.call(this,{element:document.createElement("div"),render:e.render,target:e.target})).ulElement_=document.createElement("ul"),i.collapsed_=void 0===e.collapsed||e.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==e.collapsible,i.collapsible_=void 0===e.collapsible||e.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==e.className?e.className:"ol-attribution",a=void 0!==e.tipLabel?e.tipLabel:"Attributions",s=void 0!==e.expandClassName?e.expandClassName:r+"-expand",l=void 0!==e.collapseLabel?e.collapseLabel:"\u203a",u=void 0!==e.collapseClassName?e.collapseClassName:r+"-collapse";"string"===typeof l?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=l,i.collapseLabel_.className=u):i.collapseLabel_=l;var c=void 0!==e.label?e.label:"i";"string"===typeof c?(i.label_=document.createElement("span"),i.label_.textContent=c,i.label_.className=s):i.label_=c;var f=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_;i.toggleButton_=document.createElement("button"),i.toggleButton_.setAttribute("type","button"),i.toggleButton_.setAttribute("aria-expanded",String(!i.collapsed_)),i.toggleButton_.title=a,i.toggleButton_.appendChild(f),i.toggleButton_.addEventListener(N,i.handleClick_.bind(h(i)),!1);var d=r+" "+er+" "+tr+(i.collapsed_&&i.collapsible_?" "+nr:"")+(i.collapsible_?"":" ol-uncollapsible"),v=i.element;return v.className=d,v.appendChild(i.toggleButton_),v.appendChild(i.ulElement_),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return c(n,[{key:"collectSourceAttributions_",value:function(e){var t=Array.from(new Set(this.getMap().getAllLayers().flatMap((function(t){return t.getAttributions(e)})))),n=!this.getMap().getAllLayers().some((function(e){return e.getSource()&&!1===e.getSource().getAttributionsCollapsible()}));return this.overrideCollapsible_||this.setCollapsible(n),t}},{key:"updateElement_",value:function(e){if(e){var t=this.collectSourceAttributions_(e),n=t.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!E(t,this.renderedAttributions_)){!function(e){for(;e.lastChild;)e.removeChild(e.lastChild)}(this.ulElement_);for(var i=0,r=t.length;i<r;++i){var a=document.createElement("li");a.innerHTML=t[i],this.ulElement_.appendChild(a)}this.renderedAttributions_=t}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)}},{key:"handleClick_",value:function(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}},{key:"handleToggle_",value:function(){this.element.classList.toggle(nr),this.collapsed_?lr(this.collapseLabel_,this.label_):lr(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}},{key:"getCollapsible",value:function(){return this.collapsible_}},{key:"setCollapsible",value:function(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}},{key:"setCollapsed",value:function(e){this.userCollapsed_=e,this.collapsible_&&this.collapsed_!==e&&this.handleToggle_()}},{key:"getCollapsed",value:function(){return this.collapsed_}},{key:"render",value:function(e){this.updateElement_(e.frameState)}}]),n}(na),ra=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},i=t.call(this,{element:document.createElement("div"),render:e.render,target:e.target});var r=void 0!==e.className?e.className:"ol-rotate",a=void 0!==e.label?e.label:"\u21e7",s=void 0!==e.compassClassName?e.compassClassName:"ol-compass";i.label_=null,"string"===typeof a?(i.label_=document.createElement("span"),i.label_.className=s,i.label_.textContent=a):(i.label_=a,i.label_.classList.add(s));var l=e.tipLabel?e.tipLabel:"Reset rotation",u=document.createElement("button");u.className=r+"-reset",u.setAttribute("type","button"),u.title=l,u.appendChild(i.label_),u.addEventListener(N,i.handleClick_.bind(h(i)),!1);var c=r+" "+er+" "+tr,f=i.element;return f.className=c,f.appendChild(u),i.callResetNorth_=e.resetNorth?e.resetNorth:void 0,i.duration_=void 0!==e.duration?e.duration:250,i.autoHide_=void 0===e.autoHide||e.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add(Qi),i}return c(n,[{key:"handleClick_",value:function(e){e.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}},{key:"resetNorth_",value:function(){var e=this.getMap().getView();if(e){var t=e.getRotation();void 0!==t&&(this.duration_>0&&t%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Hn}):e.setRotation(0))}}},{key:"render",value:function(e){var t=e.frameState;if(t){var n=t.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var r=this.element.classList.contains(Qi);r||0!==n?r&&0!==n&&this.element.classList.remove(Qi):this.element.classList.add(Qi)}this.label_.style.transform=i}this.rotation_=n}}}]),n}(na),aa=ra,oa=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},i=t.call(this,{element:document.createElement("div"),target:e.target});var r=void 0!==e.className?e.className:"ol-zoom",a=void 0!==e.delta?e.delta:1,s=void 0!==e.zoomInClassName?e.zoomInClassName:r+"-in",l=void 0!==e.zoomOutClassName?e.zoomOutClassName:r+"-out",u=void 0!==e.zoomInLabel?e.zoomInLabel:"+",c=void 0!==e.zoomOutLabel?e.zoomOutLabel:"\u2013",f=void 0!==e.zoomInTipLabel?e.zoomInTipLabel:"Zoom in",d=void 0!==e.zoomOutTipLabel?e.zoomOutTipLabel:"Zoom out",v=document.createElement("button");v.className=s,v.setAttribute("type","button"),v.title=f,v.appendChild("string"===typeof u?document.createTextNode(u):u),v.addEventListener(N,i.handleClick_.bind(h(i),a),!1);var g=document.createElement("button");g.className=l,g.setAttribute("type","button"),g.title=d,g.appendChild("string"===typeof c?document.createTextNode(c):c),g.addEventListener(N,i.handleClick_.bind(h(i),-a),!1);var p=r+" "+er+" "+tr,y=i.element;return y.className=p,y.appendChild(v),y.appendChild(g),i.duration_=void 0!==e.duration?e.duration:250,i}return c(n,[{key:"handleClick_",value:function(e,t){t.preventDefault(),this.zoomByDelta_(e)}},{key:"zoomByDelta_",value:function(e){var t=this.getMap().getView();if(t){var n=t.getZoom();if(void 0!==n){var i=t.getConstrainedZoom(n+e);this.duration_>0?(t.getAnimating()&&t.cancelAnimations(),t.animate({zoom:i,duration:this.duration_,easing:Hn})):t.setZoom(i)}}}}]),n}(na);var sa="active";function la(e,t,n,i){var r=e.getZoom();if(void 0!==r){var a=e.getConstrainedZoom(r+t),o=e.getResolutionForZoom(a);e.getAnimating()&&e.cancelAnimations(),e.animate({resolution:o,anchor:n,duration:void 0!==i?i:250,easing:Hn})}}var ua=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).on,i.once,i.un,e&&e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return c(n,[{key:"getActive",value:function(){return this.get(sa)}},{key:"getMap",value:function(){return this.map_}},{key:"handleEvent",value:function(e){return!0}},{key:"setActive",value:function(e){this.set(sa,e)}},{key:"setMap",value:function(e){this.map_=e}}]),n}(Q),ca=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),e=e||{},(i=t.call(this)).delta_=e.delta?e.delta:1,i.duration_=void 0!==e.duration?e.duration:250,i}return c(n,[{key:"handleEvent",value:function(e){var t=!1;if(e.type==Ar.DBLCLICK){var n=e.originalEvent,i=e.map,r=e.coordinate,a=n.shiftKey?-this.delta_:this.delta_;la(i.getView(),a,r,this.duration_),n.preventDefault(),t=!0}return!t}}]),n}(ua);function ha(e){for(var t=e.length,n=0,i=0,r=0;r<t;r++)n+=e[r].clientX,i+=e[r].clientY;return{clientX:n/t,clientY:i/t}}var fa=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),e=e||{},i=t.call(this,e),e.handleDownEvent&&(i.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(i.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(i.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(i.handleUpEvent=e.handleUpEvent),e.stopDown&&(i.stopDown=e.stopDown),i.handlingDownUpSequence=!1,i.targetPointers=[],i}return c(n,[{key:"getPointerCount",value:function(){return this.targetPointers.length}},{key:"handleDownEvent",value:function(e){return!1}},{key:"handleDragEvent",value:function(e){}},{key:"handleEvent",value:function(e){if(!e.originalEvent)return!0;var t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==Ar.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Ar.POINTERUP){var n=this.handleUpEvent(e);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(e.type==Ar.POINTERDOWN){var i=this.handleDownEvent(e);this.handlingDownUpSequence=i,t=this.stopDown(i)}else e.type==Ar.POINTERMOVE&&this.handleMoveEvent(e);return!t}},{key:"handleMoveEvent",value:function(e){}},{key:"handleUpEvent",value:function(e){return!1}},{key:"stopDown",value:function(e){return e}},{key:"updateTrackedPointers_",value:function(e){e.activePointers&&(this.targetPointers=e.activePointers)}}]),n}(ua);function da(e){var t=arguments;return function(e){for(var n=!0,i=0,r=t.length;i<r&&(n=n&&t[i](e));++i);return n}}var va=function(e){var t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},ga=function(e){return!e.map.getTargetElement().hasAttribute("tabindex")||function(e){var t=e.map.getTargetElement(),n=e.map.getOwnerDocument().activeElement;return t.contains(n)}(e)},pa=T,ya=function(e){var t=e.originalEvent;return 0==t.button&&!(he&&fe&&t.ctrlKey)},ma=function(e){var t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},_a=function(e){var t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},ka=function(e){var t=e.originalEvent,n=t.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n&&!t.target.isContentEditable},xa=function(e){var t=e.originalEvent;return ye(void 0!==t,56),"mouse"==t.pointerType},ba=function(e){var t=e.originalEvent;return ye(void 0!==t,56),t.isPrimary&&0===t.button},wa=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},(i=t.call(this,{stopDown:R})).kinetic_=e.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var r=e.condition?e.condition:da(ma,ba);return i.condition_=e.onFocusOnly?da(ga,r):r,i.noKinetic_=!1,i}return c(n,[{key:"handleDragEvent",value:function(e){var t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());var n=this.targetPointers,i=t.getEventPixel(ha(n));if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var r=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],a=e.map.getView();!function(e,t){e[0]*=t,e[1]*=t}(r,a.getResolution()),fn(r,a.getRotation()),a.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,e.originalEvent.preventDefault()}},{key:"handleUpEvent",value:function(e){var t=e.map,n=t.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),a=n.getCenterInternal(),o=t.getPixelFromCoordinateInternal(a),s=t.getCoordinateFromPixelInternal([o[0]-i*Math.cos(r),o[1]-i*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(s),duration:500,easing:Hn})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}},{key:"handleDownEvent",value:function(e){if(this.targetPointers.length>0&&this.condition_(e)){var t=e.map.getView();return this.lastCentroid=null,t.getAnimating()&&t.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}]),n}(fa),Sa=wa,Ca=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),e=e||{},(i=t.call(this,{stopDown:R})).condition_=e.condition?e.condition:va,i.lastAngle_=void 0,i.duration_=void 0!==e.duration?e.duration:250,i}return c(n,[{key:"handleDragEvent",value:function(e){if(xa(e)){var t=e.map,n=t.getView();if(n.getConstraints().rotation!==Vn){var i=t.getSize(),r=e.pixel,a=Math.atan2(i[1]/2-r[1],r[0]-i[0]/2);if(void 0!==this.lastAngle_){var o=a-this.lastAngle_;n.adjustRotationInternal(-o)}this.lastAngle_=a}}}},{key:"handleUpEvent",value:function(e){return!xa(e)||(e.map.getView().endInteraction(this.duration_),!1)}},{key:"handleDownEvent",value:function(e){return!!xa(e)&&(!(!ya(e)||!this.condition_(e))&&(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}}]),n}(fa),Ea=Ca,Ta=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return c(n,[{key:"disposeInternal",value:function(){this.setMap(null)}},{key:"render_",value:function(){var e=this.startPixel_,t=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(e[0],t[0])+n,i.top=Math.min(e[1],t[1])+n,i.width=Math.abs(t[0]-e[0])+n,i.height=Math.abs(t[1]-e[1])+n}},{key:"setMap",value:function(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}},{key:"setPixels",value:function(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}},{key:"createOrUpdateGeometry",value:function(){var e=this.startPixel_,t=this.endPixel_,n=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new Gi([n])}},{key:"getGeometry",value:function(){return this.geometry_}}]),n}(x),Ra=Ta,Pa="boxstart",Ia="boxdrag",Fa="boxend",Ma="boxcancel",La=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),(a=t.call(this,e)).coordinate=i,a.mapBrowserEvent=r,a}return c(n)}(_),Oa=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=(e=e||{}).condition?e.condition:_a;return(i=t.call(this,{condition:r,className:e.className||"ol-dragzoom",minArea:e.minArea})).duration_=void 0!==e.duration?e.duration:200,i.out_=void 0!==e.out&&e.out,i}return c(n,[{key:"onBoxEnd",value:function(e){var t=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=t.rotatedExtentForGeometry(n),r=t.getResolutionForExtentInternal(i),a=t.getResolution()/r;(n=n.clone()).scale(a*a)}t.fitInternal(n,{duration:this.duration_,easing:Hn})}}]),n}(function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).on,i.once,i.un,e=e||{},i.box_=new Ra(e.className||"ol-dragbox"),i.minArea_=void 0!==e.minArea?e.minArea:64,e.onBoxEnd&&(i.onBoxEnd=e.onBoxEnd),i.startPixel_=null,i.condition_=e.condition?e.condition:ya,i.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:i.defaultBoxEndCondition,i}return c(n,[{key:"defaultBoxEndCondition",value:function(e,t,n){var i=n[0]-t[0],r=n[1]-t[1];return i*i+r*r>=this.minArea_}},{key:"getGeometry",value:function(){return this.box_.getGeometry()}},{key:"handleDragEvent",value:function(e){this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new La(Ia,e.coordinate,e))}},{key:"handleUpEvent",value:function(e){this.box_.setMap(null);var t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new La(t?Fa:Ma,e.coordinate,e)),!1}},{key:"handleDownEvent",value:function(e){return!!this.condition_(e)&&(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new La(Pa,e.coordinate,e)),!0)}},{key:"onBoxEnd",value:function(e){}}]),n}(fa)),Aa="ArrowLeft",Da="ArrowUp",Na="ArrowRight",za="ArrowDown",ja=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),e=e||{},(i=t.call(this)).defaultCondition_=function(e){return ma(e)&&ka(e)},i.condition_=void 0!==e.condition?e.condition:i.defaultCondition_,i.duration_=void 0!==e.duration?e.duration:100,i.pixelDelta_=void 0!==e.pixelDelta?e.pixelDelta:128,i}return c(n,[{key:"handleEvent",value:function(e){var t=!1;if(e.type==j){var n=e.originalEvent,i=n.key;if(this.condition_(e)&&(i==za||i==Aa||i==Na||i==Da)){var r=e.map.getView(),a=r.getResolution()*this.pixelDelta_,o=0,s=0;i==za?s=-a:i==Aa?o=-a:i==Na?o=a:s=a;var l=[o,s];fn(l,r.getRotation()),function(e,t,n){var i=e.getCenterInternal();if(i){var r=[i[0]+t[0],i[1]+t[1]];e.animateInternal({duration:void 0!==n?n:250,easing:qn,center:e.getConstrainedCenter(r)})}}(r,l,this.duration_),n.preventDefault(),t=!0}}return!t}}]),n}(ua),Ga=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),e=e||{},(i=t.call(this)).condition_=e.condition?e.condition:ka,i.delta_=e.delta?e.delta:1,i.duration_=void 0!==e.duration?e.duration:100,i}return c(n,[{key:"handleEvent",value:function(e){var t=!1;if(e.type==j||e.type==G){var n=e.originalEvent,i=n.key;if(this.condition_(e)&&("+"===i||"-"===i)){var r=e.map,a="+"===i?this.delta_:-this.delta_;la(r.getView(),a,void 0,this.duration_),n.preventDefault(),t=!0}}return!t}}]),n}(ua),Wa=function(){function e(t,n,i){o(this,e),this.decay_=t,this.minVelocity_=n,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return c(e,[{key:"begin",value:function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}},{key:"update",value:function(e,t){this.points_.push(e,t,Date.now())}},{key:"end",value:function(){if(this.points_.length<6)return!1;var e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;for(var n=t-3;n>0&&this.points_[n+2]>e;)n-=3;var i=this.points_[t+2]-this.points_[n+2];if(i<1e3/60)return!1;var r=this.points_[t]-this.points_[n],a=this.points_[t+1]-this.points_[n+1];return this.angle_=Math.atan2(a,r),this.initialVelocity_=Math.sqrt(r*r+a*a)/i,this.initialVelocity_>this.minVelocity_}},{key:"getDistance",value:function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}},{key:"getAngle",value:function(){return this.angle_}}]),e}(),Ba=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},(i=t.call(this,e)).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==e.maxDelta?e.maxDelta:1,i.duration_=void 0!==e.duration?e.duration:250,i.timeout_=void 0!==e.timeout?e.timeout:80,i.useAnchor_=void 0===e.useAnchor||e.useAnchor,i.constrainResolution_=void 0!==e.constrainResolution&&e.constrainResolution;var r=e.condition?e.condition:pa;return i.condition_=e.onFocusOnly?da(ga,r):r,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return c(n,[{key:"endInteraction_",value:function(){this.trackpadTimeoutId_=void 0;var e=this.getMap();e&&e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}},{key:"handleEvent",value:function(e){if(!this.condition_(e))return!0;if(e.type!==U)return!0;var t,n=e.map,i=e.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate),e.type==U&&(t=i.deltaY,ce&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(t/=de),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(t*=40)),0===t)return!1;this.lastDelta_=t;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(t)<4?"trackpad":"wheel");var a=n.getView();if("trackpad"===this.mode_&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-t/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=t;var o=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),o),!1}},{key:"handleWheelZoom_",value:function(e){var t=e.getView();t.getAnimating()&&t.cancelAnimations();var n=-at(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),la(t,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}},{key:"setMouseAnchor",value:function(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}]),n}(ua),Ua=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=e=e||{};return r.stopDown||(r.stopDown=R),(i=t.call(this,r)).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==e.threshold?e.threshold:.3,i.duration_=void 0!==e.duration?e.duration:250,i}return c(n,[{key:"handleDragEvent",value:function(e){var t=0,n=this.targetPointers[0],i=this.targetPointers[1],r=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var a=r-this.lastAngle_;this.rotationDelta_+=a,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=a}this.lastAngle_=r;var o=e.map,s=o.getView();s.getConstraints().rotation!==Vn&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(ha(this.targetPointers))),this.rotating_&&(o.render(),s.adjustRotationInternal(t,this.anchor_)))}},{key:"handleUpEvent",value:function(e){return!(this.targetPointers.length<2)||(e.map.getView().endInteraction(this.duration_),!1)}},{key:"handleDownEvent",value:function(e){if(this.targetPointers.length>=2){var t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}]),n}(fa),Xa=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=e=e||{};return r.stopDown||(r.stopDown=R),(i=t.call(this,r)).anchor_=null,i.duration_=void 0!==e.duration?e.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return c(n,[{key:"handleDragEvent",value:function(e){var t=1,n=this.targetPointers[0],i=this.targetPointers[1],r=n.clientX-i.clientX,a=n.clientY-i.clientY,o=Math.sqrt(r*r+a*a);void 0!==this.lastDistance_&&(t=this.lastDistance_/o),this.lastDistance_=o;var s=e.map,l=s.getView();1!=t&&(this.lastScaleDelta_=t),this.anchor_=s.getCoordinateFromPixelInternal(s.getEventPixel(ha(this.targetPointers))),s.render(),l.adjustResolutionInternal(t,this.anchor_)}},{key:"handleUpEvent",value:function(e){if(this.targetPointers.length<2){var t=e.map.getView(),n=this.lastScaleDelta_>1?1:-1;return t.endInteraction(this.duration_,n),!1}return!0}},{key:"handleDownEvent",value:function(e){if(this.targetPointers.length>=2){var t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}]),n}(fa),Va=Xa;function Ya(e){e=e||{};var t=new le,n=new Wa(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&t.push(new Ea),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&t.push(new ca({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&t.push(new Sa({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&t.push(new Ua),(void 0===e.pinchZoom||e.pinchZoom)&&t.push(new Va({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(t.push(new ja),t.push(new Ga({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&t.push(new Ba({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&t.push(new Oa({duration:e.zoomDuration})),t}function Ka(e){return e[0]>0&&e[1]>0}function Ha(e,t){return Array.isArray(e)?e:(void 0===t?t=[e,e]:(t[0]=e,t[1]=e),t)}function Za(e){e instanceof Hi?e.setMapInternal(null):e instanceof Mr&&e.getLayers().forEach(Za)}function qa(e,t){if(e instanceof Hi)e.setMapInternal(t);else if(e instanceof Mr)for(var n=e.getLayers().getArray(),i=0,r=n.length;i<r;++i)qa(n[i],t)}var $a=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},(i=t.call(this)).on,i.once,i.un;var r=function(e){var t=null;void 0!==e.keyboardEventTarget&&(t="string"===typeof e.keyboardEventTarget?document.getElementById(e.keyboardEventTarget):e.keyboardEventTarget);var n,i,r,a={},o=e.layers&&"function"===typeof e.layers.getLayers?e.layers:new Mr({layers:e.layers});a[Xr]=o,a[Yr]=e.target,a[Kr]=e.view instanceof Yi?e.view:new Yi,void 0!==e.controls&&(Array.isArray(e.controls)?n=new le(e.controls.slice()):(ye("function"===typeof e.controls.getArray,47),n=e.controls));void 0!==e.interactions&&(Array.isArray(e.interactions)?i=new le(e.interactions.slice()):(ye("function"===typeof e.interactions.getArray,48),i=e.interactions));void 0!==e.overlays?Array.isArray(e.overlays)?r=new le(e.overlays.slice()):(ye("function"===typeof e.overlays.getArray,49),r=e.overlays):r=new le;return{controls:n,interactions:i,keyboardEventTarget:t,overlays:r,values:a}}(e);i.renderComplete_,i.loaded_=!0,i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(h(i)),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:de,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=i.animationDelay_.bind(h(i)),i.coordinateToPixelTransform_=[1,0,0,1,0,0],i.pixelToCoordinateTransform_=[1,0,0,1,0,0],i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=e.moveTolerance,i.keyboardEventTarget_=r.keyboardEventTarget,i.targetChangeHandlerKeys_=null,i.targetElement_=null,i.resizeObserver_=new ResizeObserver((function(){return i.updateSize()})),i.controls=r.controls||function(e){e=e||{};var t=new le;return(void 0===e.zoom||e.zoom)&&t.push(new oa(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&t.push(new aa(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&t.push(new ia(e.attributionOptions)),t}(),i.interactions=r.interactions||Ya({onFocusOnly:!0}),i.overlays_=r.overlays,i.overlayIdIndex_={},i.renderer_=null,i.postRenderFunctions_=[],i.tileQueue_=new ta(i.getTilePriority.bind(h(i)),i.handleTileChange_.bind(h(i))),i.addChangeListener(Xr,i.handleLayerGroupChanged_),i.addChangeListener(Kr,i.handleViewChanged_),i.addChangeListener(Vr,i.handleSizeChanged_),i.addChangeListener(Yr,i.handleTargetChanged_),i.setProperties(r.values);var a=h(i);return!e.view||e.view instanceof Yi||e.view.then((function(e){a.setView(new Yi(e))})),i.controls.addEventListener(re,(function(e){e.element.setMap(h(i))})),i.controls.addEventListener(ae,(function(e){e.element.setMap(null)})),i.interactions.addEventListener(re,(function(e){e.element.setMap(h(i))})),i.interactions.addEventListener(ae,(function(e){e.element.setMap(null)})),i.overlays_.addEventListener(re,(function(e){i.addOverlayInternal_(e.element)})),i.overlays_.addEventListener(ae,(function(e){var t=e.element.getId();void 0!==t&&delete i.overlayIdIndex_[t.toString()],e.element.setMap(null)})),i.controls.forEach((function(e){e.setMap(h(i))})),i.interactions.forEach((function(e){e.setMap(h(i))})),i.overlays_.forEach(i.addOverlayInternal_.bind(h(i))),i}return c(n,[{key:"addControl",value:function(e){this.getControls().push(e)}},{key:"addInteraction",value:function(e){this.getInteractions().push(e)}},{key:"addLayer",value:function(e){this.getLayerGroup().getLayers().push(e)}},{key:"handleLayerAdd_",value:function(e){qa(e.layer,this)}},{key:"addOverlay",value:function(e){this.getOverlays().push(e)}},{key:"addOverlayInternal_",value:function(e){var t=e.getId();void 0!==t&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}},{key:"disposeInternal",value:function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),d(f(n.prototype),"disposeInternal",this).call(this)}},{key:"forEachFeatureAtPixel",value:function(e,t,n){if(this.frameState_&&this.renderer_){var i=this.getCoordinateFromPixelInternal(e),r=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,a=void 0!==n.layerFilter?n.layerFilter:T,o=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,r,o,t,null,a,null)}}},{key:"getFeaturesAtPixel",value:function(e,t){var n=[];return this.forEachFeatureAtPixel(e,(function(e){n.push(e)}),t),n}},{key:"getAllLayers",value:function(){var e=[];return function t(n){n.forEach((function(n){n instanceof Mr?t(n.getLayers()):e.push(n)}))}(this.getLayers()),e}},{key:"hasFeatureAtPixel",value:function(e,t){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(e),i=void 0!==(t=void 0!==t?t:{}).layerFilter?t.layerFilter:T,r=void 0!==t.hitTolerance?t.hitTolerance:0,a=!1!==t.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,a,i,null)}},{key:"getEventCoordinate",value:function(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}},{key:"getEventCoordinateInternal",value:function(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}},{key:"getEventPixel",value:function(e){var t=this.viewport_.getBoundingClientRect(),n=this.getSize(),i=t.width/n[0],r=t.height/n[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-t.left)/i,(a.clientY-t.top)/r]}},{key:"getTarget",value:function(){return this.get(Yr)}},{key:"getTargetElement",value:function(){return this.targetElement_}},{key:"getCoordinateFromPixel",value:function(e){return An(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}},{key:"getCoordinateFromPixelInternal",value:function(e){var t=this.frameState_;return t?ke(t.pixelToCoordinateTransform,e.slice()):null}},{key:"getControls",value:function(){return this.controls}},{key:"getOverlays",value:function(){return this.overlays_}},{key:"getOverlayById",value:function(e){var t=this.overlayIdIndex_[e.toString()];return void 0!==t?t:null}},{key:"getInteractions",value:function(){return this.interactions}},{key:"getLayerGroup",value:function(){return this.get(Xr)}},{key:"setLayers",value:function(e){var t=this.getLayerGroup();if(e instanceof le)t.setLayers(e);else{var n=t.getLayers();n.clear(),n.extend(e)}}},{key:"getLayers",value:function(){return this.getLayerGroup().getLayers()}},{key:"getLoadingOrNotReady",value:function(){for(var e=this.getLayerGroup().getLayerStatesArray(),t=0,n=e.length;t<n;++t){var i=e[t];if(i.visible){var r=i.layer.getRenderer();if(r&&!r.ready)return!0;var a=i.layer.getSource();if(a&&a.loading)return!0}}return!1}},{key:"getPixelFromCoordinate",value:function(e){var t=Dn(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}},{key:"getPixelFromCoordinateInternal",value:function(e){var t=this.frameState_;return t?ke(t.coordinateToPixelTransform,e.slice(0,2)):null}},{key:"getRenderer",value:function(){return this.renderer_}},{key:"getSize",value:function(){return this.get(Vr)}},{key:"getView",value:function(){return this.get(Kr)}},{key:"getViewport",value:function(){return this.viewport_}},{key:"getOverlayContainer",value:function(){return this.overlayContainer_}},{key:"getOverlayContainerStopEvent",value:function(){return this.overlayContainerStopEvent_}},{key:"getOwnerDocument",value:function(){var e=this.getTargetElement();return e?e.ownerDocument:document}},{key:"getTilePriority",value:function(e,t,n,i){return function(e,t,n,i,r){if(!e||!(n in e.wantedTiles))return Hr;if(!e.wantedTiles[n][t.getKey()])return Hr;var a=e.viewState.center,o=i[0]-a[0],s=i[1]-a[1];return 65536*Math.log(r)+Math.sqrt(o*o+s*s)/r}(this.frameState_,e,t,n,i)}},{key:"handleBrowserEvent",value:function(e,t){t=t||e.type;var n=new Or(t,this,e);this.handleMapBrowserEvent(n)}},{key:"handleMapBrowserEvent",value:function(e){if(this.frameState_){var t=e.originalEvent,n=t.type;if(n===Nr||n===U||n===j){var i=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():i,a=t.target;if(this.overlayContainerStopEvent_.contains(a)||!(r===i?i.documentElement:r).contains(a))return}if(e.frameState=this.frameState_,!1!==this.dispatchEvent(e))for(var o=this.getInteractions().getArray().slice(),s=o.length-1;s>=0;s--){var l=o[s];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(e)||e.propagationStopped)break}}}},{key:"handlePostRender",value:function(){var e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){var n=this.maxTilesLoading_,i=n;if(e){var r=e.viewHints;if(r[Wt]||r[Bt]){var a=Date.now()-e.time>8;n=a?0:8,i=a?0:2}}t.getTilesLoading()<n&&(t.reprioritize(),t.loadMoreTiles(n,i))}e&&this.renderer_&&!e.animate&&(!0===this.renderComplete_?(this.hasListener(Gt)&&this.renderer_.dispatchRenderEvent(Gt,e),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Lr(Ur,this,e)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Lr(Br,this,e))));for(var o=this.postRenderFunctions_,s=0,l=o.length;s<l;++s)o[s](this,e);o.length=0}},{key:"handleSizeChanged_",value:function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}},{key:"handleTargetChanged_",value:function(){if(this.mapBrowserEventHandler_){for(var e=0,t=this.targetChangeHandlerKeys_.length;e<t;++e)Y(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(D,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(U,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,ur(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);var n=this.targetElement_.getRootNode();n instanceof ShadowRoot&&this.resizeObserver_.unobserve(n.host),this.setSize(void 0)}var i=this.getTarget(),r="string"===typeof i?document.getElementById(i):i;if(this.targetElement_=r,r){for(var a in r.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Pr(this)),this.mapBrowserEventHandler_=new zr(this,this.moveTolerance_),Ar)this.mapBrowserEventHandler_.addEventListener(Ar[a],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(D,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(U,this.boundHandleBrowserEvent_,!!pe&&{passive:!1});var o=this.keyboardEventTarget_?this.keyboardEventTarget_:r;this.targetChangeHandlerKeys_=[X(o,j,this.handleBrowserEvent,this),X(o,G,this.handleBrowserEvent,this)];var s=r.getRootNode();s instanceof ShadowRoot&&this.resizeObserver_.observe(s.host),this.resizeObserver_.observe(r)}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()}},{key:"handleTileChange_",value:function(){this.render()}},{key:"handleViewPropertyChanged_",value:function(){this.render()}},{key:"handleViewChanged_",value:function(){this.viewPropertyListenerKey_&&(Y(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Y(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=X(e,k,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=X(e,O,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}},{key:"handleLayerGroupChanged_",value:function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Y),this.layerGroupPropertyListenerKeys_=null);var e=this.getLayerGroup();e&&(this.handleLayerAdd_(new Ir("addlayer",e)),this.layerGroupPropertyListenerKeys_=[X(e,k,this.render,this),X(e,O,this.render,this),X(e,"addlayer",this.handleLayerAdd_,this),X(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}},{key:"isRendered",value:function(){return!!this.frameState_}},{key:"animationDelay_",value:function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}},{key:"renderSync",value:function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}},{key:"redrawText",value:function(){for(var e=this.getLayerGroup().getLayerStatesArray(),t=0,n=e.length;t<n;++t){var i=e[t].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}},{key:"render",value:function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}},{key:"removeControl",value:function(e){return this.getControls().remove(e)}},{key:"removeInteraction",value:function(e){return this.getInteractions().remove(e)}},{key:"removeLayer",value:function(e){return this.getLayerGroup().getLayers().remove(e)}},{key:"handleLayerRemove_",value:function(e){Za(e.layer)}},{key:"removeOverlay",value:function(e){return this.getOverlays().remove(e)}},{key:"renderFrame_",value:function(e){var t=this,n=this.getSize(),i=this.getView(),r=this.frameState_,a=null;if(void 0!==n&&Ka(n)&&i&&i.isDef()){var o=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=i.getState();if(a={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:He(s.center,s.resolution,s.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:s,viewHints:o,wantedTiles:{},mapId:$(this),renderTargets:{}},s.nextCenter&&s.nextResolution){var l=isNaN(s.nextRotation)?s.rotation:s.nextRotation;a.nextExtent=He(s.nextCenter,s.nextResolution,l,n)}}if(this.frameState_=a,this.renderer_.renderFrame(a),a){if(a.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,a.postRenderFunctions),r)(!this.previousExtent_||!nt(this.previousExtent_)&&!Ne(a.extent,this.previousExtent_))&&(this.dispatchEvent(new Lr(Gr,this,r)),this.previousExtent_=Ae(this.previousExtent_));this.previousExtent_&&!a.viewHints[Wt]&&!a.viewHints[Bt]&&!Ne(a.extent,this.previousExtent_)&&(this.dispatchEvent(new Lr(Wr,this,a)),Te(a.extent,this.previousExtent_))}this.dispatchEvent(new Lr(jr,this,a)),this.renderComplete_=this.hasListener(Br)||this.hasListener(Ur)||this.hasListener(Gt)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){t.postRenderTimeoutHandle_=void 0,t.handlePostRender()}),0))}},{key:"setLayerGroup",value:function(e){var t=this.getLayerGroup();t&&this.handleLayerRemove_(new Ir("removelayer",t)),this.set(Xr,e)}},{key:"setSize",value:function(e){this.set(Vr,e)}},{key:"setTarget",value:function(e){this.set(Yr,e)}},{key:"setView",value:function(e){if(!e||e instanceof Yi)this.set(Kr,e);else{this.set(Kr,new Yi);var t=this;e.then((function(e){t.setView(new Yi(e))}))}}},{key:"updateSize",value:function(){var e=this.getTargetElement(),t=void 0;if(e){var n=getComputedStyle(e),i=e.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),r=e.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(i)||isNaN(r)||!Ka(t=[i,r])&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&mn("No map visible because the map container's width or height are 0.")}var a=this.getSize();!t||a&&E(t,a)||(this.setSize(t),this.updateViewportSize_())}},{key:"updateViewportSize_",value:function(){var e=this.getView();if(e){var t=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(t=[parseInt(n.width,10),parseInt(n.height,10)]),e.setViewportSize(t)}}}]),n}(Q);var Ja=$a,Qa="preload",eo="useInterimTilesOnError",to=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{};var r=Object.assign({},e);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)).on,i.once,i.un,i.setPreload(void 0!==e.preload?e.preload:0),i.setUseInterimTilesOnError(void 0===e.useInterimTilesOnError||e.useInterimTilesOnError),i}return c(n,[{key:"getPreload",value:function(){return this.get(Qa)}},{key:"setPreload",value:function(e){this.set(Qa,e)}},{key:"getUseInterimTilesOnError",value:function(){return this.get(eo)}},{key:"setUseInterimTilesOnError",value:function(e){this.set(eo,e)}},{key:"getData",value:function(e){return d(f(n.prototype),"getData",this).call(this,e)}}]),n}(Hi),no=0,io=1,ro=2,ao=3,oo=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).ready=!0,i.boundHandleImageChange_=i.handleImageChange_.bind(h(i)),i.layer_=e,i.declutterExecutorGroup=null,i}return c(n,[{key:"getFeatures",value:function(e){return Z()}},{key:"getData",value:function(e){return null}},{key:"prepareFrame",value:function(e){return Z()}},{key:"renderFrame",value:function(e,t){return Z()}},{key:"loadedTileCallback",value:function(e,t,n){e[t]||(e[t]={}),e[t][n.tileCoord.toString()]=n}},{key:"createLoadedTileFinder",value:function(e,t,n){var i=this;return function(r,a){var o=i.loadedTileCallback.bind(i,n,r);return e.forEachLoadedTile(t,r,a,o)}}},{key:"forEachFeatureAtCoordinate",value:function(e,t,n,i,r){}},{key:"getLayer",value:function(){return this.layer_}},{key:"handleFontsChanged",value:function(){}},{key:"handleImageChange_",value:function(e){e.target.getState()===ro&&this.renderIfReadyAndVisible()}},{key:"loadImage",value:function(e){var t=e.getState();return t!=ro&&t!=ao&&e.addEventListener(O,this.boundHandleImageChange_),t==no&&(e.load(),t=e.getState()),t==ro}},{key:"renderIfReadyAndVisible",value:function(){var e=this.getLayer();e&&e.getVisible()&&"ready"===e.getSourceState()&&e.changed()}},{key:"disposeInternal",value:function(){delete this.layer_,d(f(n.prototype),"disposeInternal",this).call(this)}}]),n}(H),so=[],lo=null;var uo=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this,e)).container=null,i.renderedResolution,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i.pixelContext_=null,i.frameState=null,i}return c(n,[{key:"getImageData",value:function(e,t,n){var i;lo||(lo=or(1,1,void 0,{willReadFrequently:!0})),lo.clearRect(0,0,1,1);try{lo.drawImage(e,t,n,1,1,0,0,1,1),i=lo.getImageData(0,0,1,1).data}catch(r){return lo=null,null}return i}},{key:"getBackground",value:function(e){var t=this.getLayer().getBackground();return"function"===typeof t&&(t=t(e.viewState.resolution)),t||void 0}},{key:"useContainer",value:function(e,t,n){var i,r,a=this.getLayer().getClassName();if(e&&e.className===a&&(!n||e&&e.style.backgroundColor&&E(_t(e.style.backgroundColor),_t(n)))){var o=e.firstElementChild;o instanceof HTMLCanvasElement&&(r=o.getContext("2d"))}if(r&&r.canvas.style.transform===t?(this.container=e,this.context=r,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(i=document.createElement("div")).className=a;var s=i.style;s.position="absolute",s.width="100%",s.height="100%";var l=(r=or()).canvas;i.appendChild(l),(s=l.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=i,this.context=r}this.containerReused||!n||this.container.style.backgroundColor||(this.container.style.backgroundColor=n)}},{key:"clipUnrotated",value:function(e,t,n){var i=Je(n),r=Qe(n),a=Ve(n),o=Xe(n);ke(t.coordinateToPixelTransform,i),ke(t.coordinateToPixelTransform,r),ke(t.coordinateToPixelTransform,a),ke(t.coordinateToPixelTransform,o);var s=this.inversePixelTransform;ke(s,i),ke(s,r),ke(s,a),ke(s,o),e.save(),e.beginPath(),e.moveTo(Math.round(i[0]),Math.round(i[1])),e.lineTo(Math.round(r[0]),Math.round(r[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.clip()}},{key:"dispatchRenderEvent_",value:function(e,t,n){var i=this.getLayer();if(i.hasListener(e)){var r=new Ji(e,this.inversePixelTransform,n,t);i.dispatchEvent(r)}}},{key:"preRender",value:function(e,t){this.frameState=t,this.dispatchRenderEvent_(Dt,e,t)}},{key:"postRender",value:function(e,t){this.dispatchRenderEvent_(Nt,e,t)}},{key:"getRenderTransform",value:function(e,t,n,i,r,a,o){var s=r/2,l=a/2,u=i/t,c=-u,h=-e[0]+o,f=-e[1];return xe(this.tempTransform,s,l,u,c,-n,h,f)}},{key:"disposeInternal",value:function(){delete this.frameState,d(f(n.prototype),"disposeInternal",this).call(this)}}]),n}(oo),co=uo,ho=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),r=r||{},(a=t.call(this)).tileCoord=e,a.state=i,a.interimTile=null,a.key="",a.transition_=void 0===r.transition?250:r.transition,a.transitionStarts_={},a.interpolate=!!r.interpolate,a}return c(n,[{key:"changed",value:function(){this.dispatchEvent(O)}},{key:"release",value:function(){this.state===Jr&&this.setState(Qr)}},{key:"getKey",value:function(){return this.key+"/"+this.tileCoord}},{key:"getInterimTile",value:function(){if(!this.interimTile)return this;var e=this.interimTile;do{if(e.getState()==$r)return this.transition_=0,e;e=e.interimTile}while(e);return this}},{key:"refreshInterimChain",value:function(){if(this.interimTile){var e=this.interimTile,t=this;do{if(e.getState()==$r){e.interimTile=null;break}e.getState()==qr?t=e:e.getState()==Zr?t.interimTile=e.interimTile:t=e,e=t.interimTile}while(e)}}},{key:"getTileCoord",value:function(){return this.tileCoord}},{key:"getState",value:function(){return this.state}},{key:"setState",value:function(e){if(this.state!==Jr&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}},{key:"load",value:function(){Z()}},{key:"getAlpha",value:function(e,t){if(!this.transition_)return 1;var n=this.transitionStarts_[e];if(n){if(-1===n)return 1}else n=t,this.transitionStarts_[e]=n;var i=t-n+1e3/60;return i>=this.transition_?1:Kn(i/this.transition_)}},{key:"inTransition",value:function(e){return!!this.transition_&&-1!==this.transitionStarts_[e]}},{key:"endTransition",value:function(e){this.transition_&&(this.transitionStarts_[e]=-1)}}]),n}(L),fo=ho;function vo(e,t,n){var i=e,r=!0,a=!1,o=!1,s=[V(i,W,(function(){o=!0,a||t()}))];return i.src&&ge?(a=!0,i.decode().then((function(){r&&t()})).catch((function(e){r&&(o?t():n())}))):s.push(V(i,A,n)),function(){r=!1,s.forEach(Y)}}var go=function(e){g(n,e);var t=m(n);function n(e,i,r,a,s,l){var u;return o(this,n),(u=t.call(this,e,i,l)).crossOrigin_=a,u.src_=r,u.key=r,u.image_=new Image,null!==a&&(u.image_.crossOrigin=a),u.unlisten_=null,u.tileLoadFunction_=s,u}return c(n,[{key:"getImage",value:function(){return this.image_}},{key:"setImage",value:function(e){this.image_=e,this.state=$r,this.unlistenImage_(),this.changed()}},{key:"handleImageError_",value:function(){this.state=Jr,this.unlistenImage_(),this.image_=function(){var e=or(1,1);return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),e.canvas}(),this.changed()}},{key:"handleImageLoad_",value:function(){var e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=$r:this.state=Qr,this.unlistenImage_(),this.changed()}},{key:"load",value:function(){this.state==Jr&&(this.state=Zr,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Zr&&(this.state=qr,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=vo(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}},{key:"unlistenImage_",value:function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}]),n}(fo);var po,yo=go,mo=function(){function e(t,n,i,r,a,s){var l=this;o(this,e),this.sourceProj_=t,this.targetProj_=n;var u={},c=In(this.targetProj_,this.sourceProj_);this.transformInv_=function(e){var t=e[0]+"/"+e[1];return u[t]||(u[t]=c(e)),u[t]},this.maxSourceExtent_=r,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&et(r)>=et(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?et(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?et(this.targetProj_.getExtent()):null;var h=Je(i),f=Qe(i),d=Ve(i),v=Xe(i),g=this.transformInv_(h),p=this.transformInv_(f),y=this.transformInv_(d),m=this.transformInv_(v),_=10+(s?Math.max(0,Math.ceil(Math.log2(Ue(i)/(s*s*256*256)))):0);if(this.addQuad_(h,f,d,v,g,p,y,m,_),this.wrapsXInSource_){var k=1/0;this.triangles_.forEach((function(e,t,n){k=Math.min(k,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((function(e){if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-k>l.sourceWorldWidth_/2){var t=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];t[0][0]-k>l.sourceWorldWidth_/2&&(t[0][0]-=l.sourceWorldWidth_),t[1][0]-k>l.sourceWorldWidth_/2&&(t[1][0]-=l.sourceWorldWidth_),t[2][0]-k>l.sourceWorldWidth_/2&&(t[2][0]-=l.sourceWorldWidth_);var n=Math.min(t[0][0],t[1][0],t[2][0]);Math.max(t[0][0],t[1][0],t[2][0])-n<l.sourceWorldWidth_/2&&(e.source=t)}}))}u={}}return c(e,[{key:"addTriangle_",value:function(e,t,n,i,r,a){this.triangles_.push({source:[i,r,a],target:[e,t,n]})}},{key:"addQuad_",value:function(e,t,n,i,r,a,o,s,l){var u=Ce([r,a,o,s]),c=this.sourceWorldWidth_?et(u)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=et(Ce([e,t,n,i]))/this.targetWorldWidth_>.25||d;!f&&this.sourceProj_.isGlobal()&&c&&(d=c>.25||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||tt(u,this.maxSourceExtent_)){var v=0;if(!d&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])))if(l>0)d=!0;else if(1!=(v=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(s[0])&&isFinite(s[1])?0:1))&&2!=v&&4!=v&&8!=v)return;if(l>0){if(!d){var g,p=[(e[0]+n[0])/2,(e[1]+n[1])/2],y=this.transformInv_(p);if(f)g=(ut(r[0],h)+ut(o[0],h))/2-ut(y[0],h);else g=(r[0]+o[0])/2-y[0];var m=(r[1]+o[1])/2-y[1];d=g*g+m*m>this.errorThresholdSquared_}if(d){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){var _=[(t[0]+n[0])/2,(t[1]+n[1])/2],k=this.transformInv_(_),x=[(i[0]+e[0])/2,(i[1]+e[1])/2],b=this.transformInv_(x);this.addQuad_(e,t,_,x,r,a,k,b,l-1),this.addQuad_(x,_,n,i,b,k,o,s,l-1)}else{var w=[(e[0]+t[0])/2,(e[1]+t[1])/2],S=this.transformInv_(w),C=[(n[0]+i[0])/2,(n[1]+i[1])/2],E=this.transformInv_(C);this.addQuad_(e,w,C,i,r,S,E,s,l-1),this.addQuad_(w,t,n,C,S,a,o,E,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&v)&&this.addTriangle_(e,n,i,r,o,s),0==(14&v)&&this.addTriangle_(e,n,t,r,o,a),v&&(0==(13&v)&&this.addTriangle_(t,i,e,a,s,r),0==(7&v)&&this.addTriangle_(t,i,n,a,s,o))}}},{key:"calculateSourceExtent",value:function(){var e=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(t,n,i){var r=t.source;je(e,r[0]),je(e,r[1]),je(e,r[2])})),e}},{key:"getTriangles",value:function(){return this.triangles_}}]),e}(),_o=mo,ko=[];function xo(e,t,n,i,r){e.beginPath(),e.moveTo(0,0),e.lineTo(t,n),e.lineTo(i,r),e.closePath(),e.save(),e.clip(),e.fillRect(0,0,Math.max(t,i)+1,Math.max(n,r)),e.restore()}function bo(e,t){return Math.abs(e[4*t]-210)>2||Math.abs(e[4*t+3]-191.25)>2}function wo(e,t,n,i){var r=Fn(n,t,e),a=Cn(t,i,n),o=t.getMetersPerUnit();void 0!==o&&(a*=o);var s=e.getMetersPerUnit();void 0!==s&&(a/=s);var l=e.getExtent();if(!l||Pe(l,r)){var u=Cn(e,a,r)/a;isFinite(u)&&u>0&&(a/=u)}return a}function So(e,t,n,i,r,a,o,s,l,u,c,h){var f=or(Math.round(n*e),Math.round(n*t),ko);if(h||(f.imageSmoothingEnabled=!1),0===l.length)return f.canvas;function d(e){return Math.round(e*n)/n}f.scale(n,n),f.globalCompositeOperation="lighter";var v=[1/0,1/0,-1/0,-1/0];l.forEach((function(e,t,n){ze(v,e.extent)}));var g=et(v),p=qe(v),y=or(Math.round(n*g/i),Math.round(n*p/i),ko);h||(y.imageSmoothingEnabled=!1);var m=n/i;l.forEach((function(e,t,n){var i=e.extent[0]-v[0],r=-(e.extent[3]-v[3]),a=et(e.extent),o=qe(e.extent);e.image.width>0&&e.image.height>0&&y.drawImage(e.image,u,u,e.image.width-2*u,e.image.height-2*u,i*m,r*m,a*m,o*m)}));var _=Je(o);return s.getTriangles().forEach((function(e,t,r){var o=e.source,s=e.target,l=o[0][0],u=o[0][1],c=o[1][0],g=o[1][1],p=o[2][0],m=o[2][1],k=d((s[0][0]-_[0])/a),x=d(-(s[0][1]-_[1])/a),b=d((s[1][0]-_[0])/a),w=d(-(s[1][1]-_[1])/a),S=d((s[2][0]-_[0])/a),C=d(-(s[2][1]-_[1])/a),E=l,T=u;l=0,u=0;var R=function(e){for(var t=e.length,n=0;n<t;n++){for(var i=n,r=Math.abs(e[n][n]),a=n+1;a<t;a++){var o=Math.abs(e[a][n]);o>r&&(r=o,i=a)}if(0===r)return null;var s=e[i];e[i]=e[n],e[n]=s;for(var l=n+1;l<t;l++)for(var u=-e[l][n]/e[n][n],c=n;c<t+1;c++)n==c?e[l][c]=0:e[l][c]+=u*e[n][c]}for(var h=new Array(t),f=t-1;f>=0;f--){h[f]=e[f][t]/e[f][f];for(var d=f-1;d>=0;d--)e[d][t]-=e[d][f]*h[f]}return h}([[c-=E,g-=T,0,0,b-k],[p-=E,m-=T,0,0,S-k],[0,0,c,g,w-x],[0,0,p,m,C-x]]);if(R){if(f.save(),f.beginPath(),function(){if(void 0===po){var e=or(6,6,ko);e.globalCompositeOperation="lighter",e.fillStyle="rgba(210, 0, 0, 0.75)",xo(e,4,5,4,0),xo(e,4,5,0,5);var t=e.getImageData(0,0,3,3).data;po=bo(t,0)||bo(t,4)||bo(t,8),sr(e),ko.push(e.canvas)}return po}()||!h){f.moveTo(b,w);for(var P=k-b,I=x-w,F=0;F<4;F++)f.lineTo(b+d((F+1)*P/4),w+d(F*I/3)),3!=F&&f.lineTo(b+d((F+1)*P/4),w+d((F+1)*I/3));f.lineTo(S,C)}else f.moveTo(b,w),f.lineTo(k,x),f.lineTo(S,C);f.clip(),f.transform(R[0],R[2],R[1],R[3],k,x),f.translate(v[0]-E,v[3]-T),f.scale(i/n,-i/n),f.drawImage(y.canvas,0,0),f.restore()}})),sr(y),ko.push(y.canvas),c&&(f.save(),f.globalCompositeOperation="source-over",f.strokeStyle="black",f.lineWidth=1,s.getTriangles().forEach((function(e,t,n){var i=e.target,r=(i[0][0]-_[0])/a,o=-(i[0][1]-_[1])/a,s=(i[1][0]-_[0])/a,l=-(i[1][1]-_[1])/a,u=(i[2][0]-_[0])/a,c=-(i[2][1]-_[1])/a;f.beginPath(),f.moveTo(s,l),f.lineTo(r,o),f.lineTo(u,c),f.closePath(),f.stroke()})),f.restore()),f.canvas}var Co=function(e){g(n,e);var t=m(n);function n(e,i,r,a,s,l,u,c,h,f,d,v){var g;o(this,n),(g=t.call(this,s,Zr,{interpolate:!!v})).renderEdges_=void 0!==d&&d,g.pixelRatio_=u,g.gutter_=c,g.canvas_=null,g.sourceTileGrid_=i,g.targetTileGrid_=a,g.wrappedTileCoord_=l||s,g.sourceTiles_=[],g.sourcesListenerKeys_=null,g.sourceZ_=0;var p=a.getTileCoordExtent(g.wrappedTileCoord_),m=g.targetTileGrid_.getExtent(),_=g.sourceTileGrid_.getExtent(),k=m?$e(p,m):p;if(0===Ue(k))return g.state=Qr,y(g);var x=e.getExtent();x&&(_=_?$e(_,x):x);var b=a.getResolution(g.wrappedTileCoord_[0]),w=function(e,t,n,i){var r=Ye(n),a=wo(e,t,r,i);return(!isFinite(a)||a<=0)&&Be(n,(function(n){return a=wo(e,t,n,i),isFinite(a)&&a>0})),a}(e,r,k,b);if(!isFinite(w)||w<=0)return g.state=Qr,y(g);var S=void 0!==f?f:.5;if(g.triangulation_=new _o(e,r,k,_,w*S,b),0===g.triangulation_.getTriangles().length)return g.state=Qr,y(g);g.sourceZ_=i.getZForResolution(w);var C=g.triangulation_.calculateSourceExtent();if(_&&(e.canWrapX()?(C[1]=at(C[1],_[1],_[3]),C[3]=at(C[3],_[1],_[3])):C=$e(C,_)),Ue(C)){for(var E=i.getTileRangeForExtentAndZ(C,g.sourceZ_),T=E.minX;T<=E.maxX;T++)for(var R=E.minY;R<=E.maxY;R++){var P=h(g.sourceZ_,T,R,u);P&&g.sourceTiles_.push(P)}0===g.sourceTiles_.length&&(g.state=Qr)}else g.state=Qr;return g}return c(n,[{key:"getImage",value:function(){return this.canvas_}},{key:"reproject_",value:function(){var e=this,t=[];if(this.sourceTiles_.forEach((function(n){n&&n.getState()==$r&&t.push({extent:e.sourceTileGrid_.getTileCoordExtent(n.tileCoord),image:n.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=Jr;else{var n=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(n),r="number"===typeof i?i:i[0],a="number"===typeof i?i:i[1],o=this.targetTileGrid_.getResolution(n),s=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=So(r,a,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=$r}this.changed()}},{key:"load",value:function(){var e=this;if(this.state==Zr){this.state=qr,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((function(n){var i=n.getState();if(i==Zr||i==qr){t++;var r=X(n,O,(function(e){var i=n.getState();i!=$r&&i!=Jr&&i!=Qr||(Y(r),0===--t&&(this.unlistenSources_(),this.reproject_()))}),e);e.sourcesListenerKeys_.push(r)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(e,t,n){e.getState()==Zr&&e.load()}))}}},{key:"unlistenSources_",value:function(){this.sourcesListenerKeys_.forEach(Y),this.sourcesListenerKeys_=null}},{key:"release",value:function(){this.canvas_&&(sr(this.canvas_.getContext("2d")),ko.push(this.canvas_),this.canvas_=null),d(f(n.prototype),"release",this).call(this)}}]),n}(fo),Eo=Co,To=function(){function e(t,n,i,r){o(this,e),this.minX=t,this.maxX=n,this.minY=i,this.maxY=r}return c(e,[{key:"contains",value:function(e){return this.containsXY(e[1],e[2])}},{key:"containsTileRange",value:function(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}},{key:"containsXY",value:function(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}},{key:"equals",value:function(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}},{key:"extend",value:function(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}},{key:"getHeight",value:function(){return this.maxY-this.minY+1}},{key:"getSize",value:function(){return[this.getWidth(),this.getHeight()]}},{key:"getWidth",value:function(){return this.maxX-this.minX+1}},{key:"intersects",value:function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}]),e}();function Ro(e,t,n,i,r){return void 0!==r?(r.minX=e,r.maxX=t,r.minY=n,r.maxY=i,r):new To(e,t,n,i)}var Po=To,Io=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this,e)).extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new Po(0,0,0,0),i}return c(n,[{key:"isDrawableTile",value:function(e){var t=this.getLayer(),n=e.getState(),i=t.getUseInterimTilesOnError();return n==$r||n==Qr||n==Jr&&!i}},{key:"getTile",value:function(e,t,n,i){var r=i.pixelRatio,a=i.viewState.projection,o=this.getLayer(),s=o.getSource().getTile(e,t,n,r,a);return s.getState()==Jr&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(s)||(s=s.getInterimTile()),s}},{key:"getData",value:function(e){var t=this.frameState;if(!t)return null;var n=this.getLayer(),i=ke(t.pixelToCoordinateTransform,e.slice()),r=n.getExtent();if(r&&!Pe(r,i))return null;for(var a=t.pixelRatio,o=t.viewState.projection,s=t.viewState,l=n.getRenderSource(),u=l.getTileGridForProjection(s.projection),c=l.getTilePixelRatio(t.pixelRatio),h=u.getZForResolution(s.resolution);h>=u.getMinZoom();--h){var f=u.getTileCoordForCoordAndZ(i,h),d=l.getTile(h,f[1],f[2],a,o);if(!(d instanceof yo||d instanceof Eo)||d instanceof Eo&&d.getState()===Qr)return null;if(d.getState()===$r){var v=u.getOrigin(h),g=Ha(u.getTileSize(h)),p=u.getResolution(h),y=Math.floor(c*((i[0]-v[0])/p-f[1]*g[0])),m=Math.floor(c*((v[1]-i[1])/p-f[2]*g[1])),_=Math.round(c*l.getGutterForProjection(s.projection));return this.getImageData(d.getImage(),y+_,m+_)}}return null}},{key:"loadedTileCallback",value:function(e,t,i){return!!this.isDrawableTile(i)&&d(f(n.prototype),"loadedTileCallback",this).call(this,e,t,i)}},{key:"prepareFrame",value:function(e){return!!this.getLayer().getSource()}},{key:"renderFrame",value:function(e,t){var n=e.layerStatesArray[e.layerIndex],i=e.viewState,r=i.projection,a=i.resolution,o=i.center,s=i.rotation,l=e.pixelRatio,u=this.getLayer(),c=u.getSource(),h=c.getRevision(),f=c.getTileGridForProjection(r),d=f.getZForResolution(a,c.zDirection),v=f.getResolution(d),g=e.extent,p=e.viewState.resolution,y=c.getTilePixelRatio(l),m=Math.round(et(g)/p*l),_=Math.round(qe(g)/p*l),k=n.extent&&zn(n.extent,r);k&&(g=$e(g,zn(n.extent,r)));var x=v*m/2/y,w=v*_/2/y,S=[o[0]-x,o[1]-w,o[0]+x,o[1]+w],C=f.getTileRangeForExtentAndZ(g,d),E={};E[d]={};var T=this.createLoadedTileFinder(c,r,E),R=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var I=s?Ze(i.center,p,s,e.size):void 0,F=C.minX;F<=C.maxX;++F)for(var M=C.minY;M<=C.maxY;++M)if(!s||f.tileCoordIntersectsViewport([d,F,M],I)){var L=this.getTile(d,F,M,e);if(this.isDrawableTile(L)){var O=$(this);if(L.getState()==$r){E[d][L.tileCoord.toString()]=L;var A=L.inTransition(O);A&&1!==n.opacity&&(L.endTransition(O),A=!1),this.newTiles_||!A&&this.renderedTiles.includes(L)||(this.newTiles_=!0)}if(1===L.getAlpha(O,e.time))continue}var D=f.getTileCoordChildTileRange(L.tileCoord,P,R),N=!1;D&&(N=T(d+1,D)),N||f.forEachTileCoordParentTileRange(L.tileCoord,T,P,R)}var z=v/a*l/y;xe(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/l,1/l,s,-m/2,-_/2);var j=we(this.pixelTransform);this.useContainer(t,j,this.getBackground(e));var G=this.context,W=G.canvas;be(this.inversePixelTransform,this.pixelTransform),xe(this.tempTransform,m/2,_/2,z,z,0,-m/2,-_/2),W.width!=m||W.height!=_?(W.width=m,W.height=_):this.containerReused||G.clearRect(0,0,m,_),k&&this.clipUnrotated(G,e,k),c.getInterpolate()||(G.imageSmoothingEnabled=!1),this.preRender(G,e),this.renderedTiles.length=0;var B,U,X,V=Object.keys(E).map(Number);V.sort(b),1!==n.opacity||this.containerReused&&!c.getOpaque(e.viewState.projection)?(B=[],U=[]):V=V.reverse();for(var Y=V.length-1;Y>=0;--Y){var K=V[Y],H=c.getTilePixelSize(K,l,r),Z=f.getResolution(K)/v,q=H[0]*Z*z,J=H[1]*Z*z,Q=f.getTileCoordForCoordAndZ(Je(S),K),ee=f.getTileCoordExtent(Q),te=ke(this.tempTransform,[y*(ee[0]-S[0])/v,y*(S[3]-ee[3])/v]),ne=y*c.getGutterForProjection(r),ie=E[K];for(var re in ie){var ae=ie[re],oe=ae.tileCoord,se=Q[1]-oe[1],le=Math.round(te[0]-(se-1)*q),ue=Q[2]-oe[2],ce=Math.round(te[1]-(ue-1)*J),he=Math.round(te[0]-se*q),fe=Math.round(te[1]-ue*J),de=le-he,ve=ce-fe,ge=d===K,pe=ge&&1!==ae.getAlpha($(this),e.time),ye=!1;if(!pe)if(B){X=[he,fe,he+de,fe,he+de,fe+ve,he,fe+ve];for(var me=0,_e=B.length;me<_e;++me)if(d!==K&&K<U[me]){var Se=B[me];tt([he,fe,he+de,fe+ve],[Se[0],Se[3],Se[4],Se[7]])&&(ye||(G.save(),ye=!0),G.beginPath(),G.moveTo(X[0],X[1]),G.lineTo(X[2],X[3]),G.lineTo(X[4],X[5]),G.lineTo(X[6],X[7]),G.moveTo(Se[6],Se[7]),G.lineTo(Se[4],Se[5]),G.lineTo(Se[2],Se[3]),G.lineTo(Se[0],Se[1]),G.clip())}B.push(X),U.push(K)}else G.clearRect(he,fe,de,ve);this.drawTileImage(ae,e,he,fe,de,ve,ne,ge),B&&!pe?(ye&&G.restore(),this.renderedTiles.unshift(ae)):this.renderedTiles.push(ae),this.updateUsedTiles(e.usedTiles,c,ae)}}return this.renderedRevision=h,this.renderedResolution=v,this.extentChanged=!this.renderedExtent_||!Ne(this.renderedExtent_,S),this.renderedExtent_=S,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(e,c,f,l,r,g,d,u.getPreload()),this.scheduleExpireCache(e,c),this.postRender(G,e),n.extent&&G.restore(),G.imageSmoothingEnabled=!0,j!==W.style.transform&&(W.style.transform=j),this.container}},{key:"drawTileImage",value:function(e,t,n,i,r,a,o,s){var l=this.getTileImage(e);if(l){var u=$(this),c=t.layerStatesArray[t.layerIndex],h=c.opacity*(s?e.getAlpha(u,t.time):1),f=h!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(l,o,o,l.width-2*o,l.height-2*o,n,i,r,a),f&&this.context.restore(),h!==c.opacity?t.animate=!0:s&&e.endTransition(u)}}},{key:"getImage",value:function(){var e=this.context;return e?e.canvas:null}},{key:"getTileImage",value:function(e){return e.getImage()}},{key:"scheduleExpireCache",value:function(e,t){if(t.canExpireCache()){var n=function(e,t,n){var i=$(e);i in n.usedTiles&&e.expireCache(n.viewState.projection,n.usedTiles[i])}.bind(null,t);e.postRenderFunctions.push(n)}}},{key:"updateUsedTiles",value:function(e,t,n){var i=$(t);i in e||(e[i]={}),e[i][n.getKey()]=!0}},{key:"manageTilePyramid",value:function(e,t,n,i,r,a,o,s,l){var u=$(t);u in e.wantedTiles||(e.wantedTiles[u]={});var c,h,f,d,v,g,p=e.wantedTiles[u],y=e.tileQueue,m=n.getMinZoom(),_=e.viewState.rotation,k=_?Ze(e.viewState.center,e.viewState.resolution,_,e.size):void 0,x=0;for(g=m;g<=o;++g)for(h=n.getTileRangeForExtentAndZ(a,g,h),f=n.getResolution(g),d=h.minX;d<=h.maxX;++d)for(v=h.minY;v<=h.maxY;++v)_&&!n.tileCoordIntersectsViewport([g,d,v],k)||(o-g<=s?(++x,(c=t.getTile(g,d,v,i,r)).getState()==Zr&&(p[c.getKey()]=!0,y.isKeyQueued(c.getKey())||y.enqueue([c,u,n.getTileCoordCenter(c.tileCoord),f])),void 0!==l&&l(c)):t.useTile(g,d,v,r));t.updateCacheSize(x,r)}}]),n}(co),Fo=Io,Mo=function(e){g(n,e);var t=m(n);function n(e){return o(this,n),t.call(this,e)}return c(n,[{key:"createRenderer",value:function(){return new Fo(this)}}]),n}(to);function Lo(e,t,n,i){return void 0!==i?(i[0]=e,i[1]=t,i[2]=n,i):[e,t,n]}function Oo(e,t,n){return e+"/"+t+"/"+n}function Ao(e){return Oo(e[0],e[1],e[2])}var Do=function(e){g(n,e);var t=m(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:"clear",value:function(){for(;this.getCount()>0;)this.pop().release();d(f(n.prototype),"clear",this).call(this)}},{key:"expireCache",value:function(e){for(;this.canExpireCache();){if(this.peekLast().getKey()in e)break;this.pop().release()}}},{key:"pruneExceptNewestZ",value:function(){var e=this;if(0!==this.getCount()){var t=function(e){return e.split("/").map(Number)}(this.peekFirstKey()),n=t[0];this.forEach((function(t){t.tileCoord[0]!==n&&(e.remove(Ao(t.tileCoord)),t.release())}))}}}]),n}(function(){function e(t){o(this,e),this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return c(e,[{key:"canExpireCache",value:function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}},{key:"expireCache",value:function(e){for(;this.canExpireCache();)this.pop()}},{key:"clear",value:function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}},{key:"containsKey",value:function(e){return this.entries_.hasOwnProperty(e)}},{key:"forEach",value:function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer}},{key:"get",value:function(e,t){var n=this.entries_[e];return ye(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_}},{key:"remove",value:function(e){var t=this.entries_[e];return ye(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}},{key:"getCount",value:function(){return this.count_}},{key:"getKeys",value:function(){var e,t=new Array(this.count_),n=0;for(e=this.newest_;e;e=e.older)t[n++]=e.key_;return t}},{key:"getValues",value:function(){var e,t=new Array(this.count_),n=0;for(e=this.newest_;e;e=e.older)t[n++]=e.value_;return t}},{key:"peekLast",value:function(){return this.oldest_.value_}},{key:"peekLastKey",value:function(){return this.oldest_.key_}},{key:"peekFirstKey",value:function(){return this.newest_.key_}},{key:"peek",value:function(e){if(this.containsKey(e))return this.entries_[e].value_}},{key:"pop",value:function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}},{key:"replace",value:function(e,t){this.get(e),this.entries_[e].value_=t}},{key:"set",value:function(e,t){ye(!(e in this.entries_),16);var n={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[e]=n,++this.count_}},{key:"setSize",value:function(e){this.highWaterMark=e}}]),e}()),No=Do,zo="tileloadstart",jo="tileloadend",Go="tileloaderror";function Wo(e){return e?Array.isArray(e)?function(t){return e}:"function"===typeof e?e:function(t){return[e]}:null}var Bo=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),(i=t.call(this)).projection=Sn(e.projection),i.attributions_=Wo(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:"ready",i.wrapX_=void 0!==e.wrapX&&e.wrapX,i.interpolate_=!!e.interpolate,i.viewResolver=null,i.viewRejector=null;var r=h(i);return i.viewPromise_=new Promise((function(e,t){r.viewResolver=e,r.viewRejector=t})),i}return c(n,[{key:"getAttributions",value:function(){return this.attributions_}},{key:"getAttributionsCollapsible",value:function(){return this.attributionsCollapsible_}},{key:"getProjection",value:function(){return this.projection}},{key:"getResolutions",value:function(e){return null}},{key:"getView",value:function(){return this.viewPromise_}},{key:"getState",value:function(){return this.state_}},{key:"getWrapX",value:function(){return this.wrapX_}},{key:"getInterpolate",value:function(){return this.interpolate_}},{key:"refresh",value:function(){this.changed()}},{key:"setAttributions",value:function(e){this.attributions_=Wo(e),this.changed()}},{key:"setState",value:function(e){this.state_=e,this.changed()}}]),n}(Q),Uo=[0,0,0],Xo=function(){function e(t){var n;if(o(this,e),this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,ye(function(e,t,n){var i=t||b;return e.every((function(t,r){if(0===r)return!0;var a=i(e[r-1],t);return!(a>0||n&&0===a)}))}(this.resolutions_,(function(e,t){return t-e}),!0),17),!t.origins)for(var i=0,r=this.resolutions_.length-1;i<r;++i)if(n){if(this.resolutions_[i]/this.resolutions_[i+1]!==n){n=void 0;break}}else n=this.resolutions_[i]/this.resolutions_[i+1];this.zoomFactor_=n,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,ye(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=Je(a)),ye(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,ye(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:Vt,ye(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(e,t){var n=new Po(Math.min(0,e[0]),Math.max(e[0]-1,-1),Math.min(0,e[1]),Math.max(e[1]-1,-1));if(a){var i=this.getTileRangeForExtentAndZ(a,t);n.minX=Math.max(i.minX,n.minX),n.maxX=Math.min(i.maxX,n.maxX),n.minY=Math.max(i.minY,n.minY),n.maxY=Math.min(i.maxY,n.maxY)}return n}),this):a&&this.calculateTileRanges_(a)}return c(e,[{key:"forEachTileCoord",value:function(e,t,n){for(var i=this.getTileRangeForExtentAndZ(e,t),r=i.minX,a=i.maxX;r<=a;++r)for(var o=i.minY,s=i.maxY;o<=s;++o)n([t,r,o])}},{key:"forEachTileCoordParentTileRange",value:function(e,t,n,i){var r,a,o=null,s=e[0]-1;for(2===this.zoomFactor_?(r=e[1],a=e[2]):o=this.getTileCoordExtent(e,i);s>=this.minZoom;){if(t(s,2===this.zoomFactor_?Ro(r=Math.floor(r/2),r,a=Math.floor(a/2),a,n):this.getTileRangeForExtentAndZ(o,s,n)))return!0;--s}return!1}},{key:"getExtent",value:function(){return this.extent_}},{key:"getMaxZoom",value:function(){return this.maxZoom}},{key:"getMinZoom",value:function(){return this.minZoom}},{key:"getOrigin",value:function(e){return this.origin_?this.origin_:this.origins_[e]}},{key:"getResolution",value:function(e){return this.resolutions_[e]}},{key:"getResolutions",value:function(){return this.resolutions_}},{key:"getTileCoordChildTileRange",value:function(e,t,n){if(e[0]<this.maxZoom){if(2===this.zoomFactor_){var i=2*e[1],r=2*e[2];return Ro(i,i+1,r,r+1,t)}var a=this.getTileCoordExtent(e,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e[0]+1,t)}return null}},{key:"getTileRangeForTileCoordAndZ",value:function(e,t,n){if(t>this.maxZoom||t<this.minZoom)return null;var i=e[0],r=e[1],a=e[2];if(t===i)return Ro(r,a,r,a,n);if(this.zoomFactor_){var o=Math.pow(this.zoomFactor_,t-i),s=Math.floor(r*o),l=Math.floor(a*o);return t<i?Ro(s,s,l,l,n):Ro(s,Math.floor(o*(r+1))-1,l,Math.floor(o*(a+1))-1,n)}var u=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(u,t,n)}},{key:"getTileRangeForExtentAndZ",value:function(e,t,n){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,Uo);var i=Uo[1],r=Uo[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,Uo),Ro(i,Uo[1],r,Uo[2],n)}},{key:"getTileCoordCenter",value:function(e){var t=this.getOrigin(e[0]),n=this.getResolution(e[0]),i=Ha(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*i[0]*n,t[1]-(e[2]+.5)*i[1]*n]}},{key:"getTileCoordExtent",value:function(e,t){var n=this.getOrigin(e[0]),i=this.getResolution(e[0]),r=Ha(this.getTileSize(e[0]),this.tmpSize_),a=n[0]+e[1]*r[0]*i,o=n[1]-(e[2]+1)*r[1]*i;return Oe(a,o,a+r[0]*i,o+r[1]*i,t)}},{key:"getTileCoordForCoordAndResolution",value:function(e,t,n){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,n)}},{key:"getTileCoordForXYAndResolution_",value:function(e,t,n,i,r){var a=this.getZForResolution(n),o=n/this.getResolution(a),s=this.getOrigin(a),l=Ha(this.getTileSize(a),this.tmpSize_),u=o*(e-s[0])/n/l[0],c=o*(s[1]-t)/n/l[1];return i?(u=dt(u,5)-1,c=dt(c,5)-1):(u=ft(u,5),c=ft(c,5)),Lo(a,u,c,r)}},{key:"getTileCoordForXYAndZ_",value:function(e,t,n,i,r){var a=this.getOrigin(n),o=this.getResolution(n),s=Ha(this.getTileSize(n),this.tmpSize_),l=(e-a[0])/o/s[0],u=(a[1]-t)/o/s[1];return i?(l=dt(l,5)-1,u=dt(u,5)-1):(l=ft(l,5),u=ft(u,5)),Lo(n,l,u,r)}},{key:"getTileCoordForCoordAndZ",value:function(e,t,n){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,n)}},{key:"getTileCoordResolution",value:function(e){return this.resolutions_[e[0]]}},{key:"getTileSize",value:function(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}},{key:"getFullTileRange",value:function(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}},{key:"getZForResolution",value:function(e,t){return at(w(this.resolutions_,e,t||0),this.minZoom,this.maxZoom)}},{key:"tileCoordIntersectsViewport",value:function(e,t){return Mi(t,0,t.length,2,this.getTileCoordExtent(e))}},{key:"calculateTileRanges_",value:function(e){for(var t=this.resolutions_.length,n=new Array(t),i=this.minZoom;i<t;++i)n[i]=this.getTileRangeForExtentAndZ(e,i);this.fullTileRanges_=n}}]),e}(),Vo=Xo;function Yo(e){var t=e.getDefaultTileGrid();return t||(t=function(e,t,n,i){var r=Ho(e);return function(e,t,n,i){i=void 0!==i?i:"top-left";var r=Ko(e,t,n);return new Vo({extent:e,origin:Ke(e,i),resolutions:r,tileSize:n})}(r,t,n,i)}(e),e.setDefaultTileGrid(t)),t}function Ko(e,t,n,i){t=void 0!==t?t:Xt,n=Ha(void 0!==n?n:Vt);var r=qe(e),a=et(e);i=i>0?i:Math.max(a/n[0],r/n[1]);for(var o=t+1,s=new Array(o),l=0;l<o;++l)s[l]=i/Math.pow(2,l);return s}function Ho(e){var t=(e=Sn(e)).getExtent();if(!t){var n=180*Yt.degrees/e.getMetersPerUnit();t=Oe(-n,-n,n,n)}return t}var Zo=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),(i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})).on,i.once,i.un,i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;return i.tileGrid&&Ha(i.tileGrid.getTileSize(i.tileGrid.getMinZoom()),[256,256]),i.tileCache=new No(e.cacheSize||0),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition,interpolate:e.interpolate},i.zDirection=e.zDirection?e.zDirection:0,i}return c(n,[{key:"canExpireCache",value:function(){return this.tileCache.canExpireCache()}},{key:"expireCache",value:function(e,t){var n=this.getTileCacheForProjection(e);n&&n.expireCache(t)}},{key:"forEachLoadedTile",value:function(e,t,n,i){var r=this.getTileCacheForProjection(e);if(!r)return!1;for(var a,o,s,l=!0,u=n.minX;u<=n.maxX;++u)for(var c=n.minY;c<=n.maxY;++c)o=Oo(t,u,c),s=!1,r.containsKey(o)&&(s=(a=r.get(o)).getState()===$r)&&(s=!1!==i(a)),s||(l=!1);return l}},{key:"getGutterForProjection",value:function(e){return 0}},{key:"getKey",value:function(){return this.key_}},{key:"setKey",value:function(e){this.key_!==e&&(this.key_=e,this.changed())}},{key:"getOpaque",value:function(e){return this.opaque_}},{key:"getResolutions",value:function(e){var t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}},{key:"getTile",value:function(e,t,n,i,r){return Z()}},{key:"getTileGrid",value:function(){return this.tileGrid}},{key:"getTileGridForProjection",value:function(e){return this.tileGrid?this.tileGrid:Yo(e)}},{key:"getTileCacheForProjection",value:function(e){var t=this.getProjection();return ye(null===t||Rn(t,e),68),this.tileCache}},{key:"getTilePixelRatio",value:function(e){return this.tilePixelRatio_}},{key:"getTilePixelSize",value:function(e,t,n){var i,r,a,o=this.getTileGridForProjection(n),s=this.getTilePixelRatio(t),l=Ha(o.getTileSize(e),this.tmpSize);return 1==s?l:(i=l,r=s,void 0===(a=this.tmpSize)&&(a=[0,0]),a[0]=i[0]*r+.5|0,a[1]=i[1]*r+.5|0,a)}},{key:"getTileCoordForTileUrlFunction",value:function(e,t){t=void 0!==t?t:this.getProjection();var n=this.getTileGridForProjection(t);return this.getWrapX()&&t.isGlobal()&&(e=function(e,t,n){var i=t[0],r=e.getTileCoordCenter(t),a=Ho(n);if(!Pe(a,r)){var o=et(a),s=Math.ceil((a[0]-r[0])/o);return r[0]+=o*s,e.getTileCoordForCoordAndZ(r,i)}return t}(n,e,t)),function(e,t){var n=e[0],i=e[1],r=e[2];if(t.getMinZoom()>n||n>t.getMaxZoom())return!1;var a=t.getFullTileRange(n);return!a||a.containsXY(i,r)}(e,n)?e:null}},{key:"clear",value:function(){this.tileCache.clear()}},{key:"refresh",value:function(){this.clear(),d(f(n.prototype),"refresh",this).call(this)}},{key:"updateCacheSize",value:function(e,t){var n=this.getTileCacheForProjection(t);e>n.highWaterMark&&(n.highWaterMark=e)}},{key:"useTile",value:function(e,t,n,i){}}]),n}(Bo),qo=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),(r=t.call(this,e)).tile=i,r}return c(n)}(_);function $o(e,t){var n=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,a=/\{-y\}/g;return function(o,s,l){if(o)return e.replace(n,o[0].toString()).replace(i,o[1].toString()).replace(r,o[2].toString()).replace(a,(function(){var e=o[0],n=t.getFullTileRange(e);return ye(n,55),(n.getHeight()-o[2]-1).toString()}))}}function Jo(e,t){for(var n=e.length,i=new Array(n),r=0;r<n;++r)i[r]=$o(e[r],t);return function(e){if(1===e.length)return e[0];return function(t,n,i){if(t){var r=function(e){return(e[1]<<e[0])+e[2]}(t),a=ut(r,e.length);return e[a](t,n,i)}}}(i)}var Qo=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})).generateTileUrlFunction_=i.tileUrlFunction===n.prototype.tileUrlFunction,i.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(i.tileUrlFunction=e.tileUrlFunction),i.urls=null,e.urls?i.setUrls(e.urls):e.url&&i.setUrl(e.url),i.tileLoadingKeys_={},i}return c(n,[{key:"getTileLoadFunction",value:function(){return this.tileLoadFunction}},{key:"getTileUrlFunction",value:function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}},{key:"getUrls",value:function(){return this.urls}},{key:"handleTileChange",value:function(e){var t,n=e.target,i=$(n),r=n.getState();r==qr?(this.tileLoadingKeys_[i]=!0,t=zo):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],t=r==Jr?Go:r==$r?jo:void 0),void 0!=t&&this.dispatchEvent(new qo(t,n))}},{key:"setTileLoadFunction",value:function(e){this.tileCache.clear(),this.tileLoadFunction=e,this.changed()}},{key:"setTileUrlFunction",value:function(e,t){this.tileUrlFunction=e,this.tileCache.pruneExceptNewestZ(),"undefined"!==typeof t?this.setKey(t):this.changed()}},{key:"setUrl",value:function(e){var t=function(e){var t=[],n=/\{([a-z])-([a-z])\}/.exec(e);if(n){var i,r=n[1].charCodeAt(0),a=n[2].charCodeAt(0);for(i=r;i<=a;++i)t.push(e.replace(n[0],String.fromCharCode(i)));return t}if(n=/\{(\d+)-(\d+)\}/.exec(e)){for(var o=parseInt(n[2],10),s=parseInt(n[1],10);s<=o;s++)t.push(e.replace(n[0],s.toString()));return t}return t.push(e),t}(e);this.urls=t,this.setUrls(t)}},{key:"setUrls",value:function(e){this.urls=e;var t=e.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Jo(e,this.tileGrid),t):this.setKey(t)}},{key:"tileUrlFunction",value:function(e,t,n){}},{key:"useTile",value:function(e,t,n){var i=Oo(e,t,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)}}]),n}(Zo),es=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=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:ts,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:void 0===e.interpolate||e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:yo,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.renderReprojectionEdges_=!1,i}return c(n,[{key:"canExpireCache",value:function(){if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1}},{key:"expireCache",value:function(e,t){var n=this.getTileCacheForProjection(e);for(var i in this.tileCache.expireCache(this.tileCache==n?t:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[i];r.expireCache(r==n?t:{})}}},{key:"getGutterForProjection",value:function(e){return this.getProjection()&&e&&!Rn(this.getProjection(),e)?0:this.getGutter()}},{key:"getGutter",value:function(){return 0}},{key:"getKey",value:function(){var e=d(f(n.prototype),"getKey",this).call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e}},{key:"getOpaque",value:function(e){return!(this.getProjection()&&e&&!Rn(this.getProjection(),e))&&d(f(n.prototype),"getOpaque",this).call(this,e)}},{key:"getTileGridForProjection",value:function(e){var t=this.getProjection();if(this.tileGrid&&(!t||Rn(t,e)))return this.tileGrid;var n=$(e);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Yo(e)),this.tileGridForProjection[n]}},{key:"getTileCacheForProjection",value:function(e){var t=this.getProjection();if(!t||Rn(t,e))return this.tileCache;var n=$(e);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new No(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}},{key:"createTile_",value:function(e,t,n,i,r,a){var o=[e,t,n],s=this.getTileCoordForTileUrlFunction(o,r),l=s?this.tileUrlFunction(s,i,r):void 0,u=new this.tileClass(o,void 0!==l?Zr:Qr,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=a,u.addEventListener(O,this.handleTileChange.bind(this)),u}},{key:"getTile",value:function(e,t,n,i,r){var a=this,o=this.getProjection();if(!o||!r||Rn(o,r))return this.getTileInternal(e,t,n,i,o||r);var s,l=this.getTileCacheForProjection(r),u=[e,t,n],c=Ao(u);l.containsKey(c)&&(s=l.get(c));var h=this.getKey();if(s&&s.key==h)return s;var f=this.getTileGridForProjection(o),d=this.getTileGridForProjection(r),v=this.getTileCoordForTileUrlFunction(u,r),g=new Eo(o,f,r,d,u,v,this.getTilePixelRatio(i),this.getGutter(),(function(e,t,n,i){return a.getTileInternal(e,t,n,i,o)}),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return g.key=h,s?(g.interimTile=s,g.refreshInterimChain(),l.replace(c,g)):l.set(c,g),g}},{key:"getTileInternal",value:function(e,t,n,i,r){var a=null,o=Oo(e,t,n),s=this.getKey();if(this.tileCache.containsKey(o)){if((a=this.tileCache.get(o)).key!=s){var l=a;a=this.createTile_(e,t,n,i,r,s),l.getState()==Zr?a.interimTile=l.interimTile:a.interimTile=l,a.refreshInterimChain(),this.tileCache.replace(o,a)}}else a=this.createTile_(e,t,n,i,r,s),this.tileCache.set(o,a);return a}},{key:"setRenderReprojectionEdges",value:function(e){if(this.renderReprojectionEdges_!=e){for(var t in this.renderReprojectionEdges_=e,this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}},{key:"setTileGridForProjection",value:function(e,t){var n=Sn(e);if(n){var i=$(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=t)}}},{key:"clear",value:function(){for(var e in d(f(n.prototype),"clear",this).call(this),this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}}]),n}(Qo);function ts(e,t){e.getImage().src=t}var ns=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),i=void 0!==(e=e||{}).attributions?e.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var r=void 0!==e.crossOrigin?e.crossOrigin:"anonymous",a=void 0!==e.url?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:r,interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:19,opaque:void 0===e.opaque||e.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:a,wrapX:e.wrapX,zDirection:e.zDirection})}return c(n)}(function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=void 0!==(e=e||{}).projection?e.projection:"EPSG:3857",a=void 0!==e.tileGrid?e.tileGrid:function(e){var t=e||{},n=t.extent||Sn("EPSG:3857").getExtent(),i={extent:n,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:Ko(n,t.maxZoom,t.tileSize,t.maxResolution)};return new Vo(i)}({extent:Ho(r),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});return(i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:e.opaque,projection:r,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:a,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})).gutter_=void 0!==e.gutter?e.gutter:0,i}return c(n,[{key:"getGutter",value:function(){return this.gutter_}}]),n}(es)),is=n(950),rs=function(){function e(t){o(this,e),this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ha(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}return c(e,[{key:"clone",value:function(){var t=this.getScale();return new e({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}},{key:"getOpacity",value:function(){return this.opacity_}},{key:"getRotateWithView",value:function(){return this.rotateWithView_}},{key:"getRotation",value:function(){return this.rotation_}},{key:"getScale",value:function(){return this.scale_}},{key:"getScaleArray",value:function(){return this.scaleArray_}},{key:"getDisplacement",value:function(){return this.displacement_}},{key:"getDeclutterMode",value:function(){return this.declutterMode_}},{key:"getAnchor",value:function(){return Z()}},{key:"getImage",value:function(e){return Z()}},{key:"getHitDetectionImage",value:function(){return Z()}},{key:"getPixelRatio",value:function(e){return 1}},{key:"getImageState",value:function(){return Z()}},{key:"getImageSize",value:function(){return Z()}},{key:"getOrigin",value:function(){return Z()}},{key:"getSize",value:function(){return Z()}},{key:"setDisplacement",value:function(e){this.displacement_=e}},{key:"setOpacity",value:function(e){this.opacity_=e}},{key:"setRotateWithView",value:function(e){this.rotateWithView_=e}},{key:"setRotation",value:function(e){this.rotation_=e}},{key:"setScale",value:function(e){this.scale_=e,this.scaleArray_=Ha(e)}},{key:"listenImageChange",value:function(e){Z()}},{key:"load",value:function(){Z()}},{key:"unlistenImageChange",value:function(e){Z()}}]),e}(),as=rs;function os(e){return Array.isArray(e)?xt(e):e}var ss=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=void 0!==e.rotateWithView&&e.rotateWithView;return(i=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})).canvas_=void 0,i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.size_=null,i.renderOptions_=null,i.render(),i}return c(n,[{key:"clone",value:function(){var e=this.getScale(),t=new n({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(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}},{key:"getAnchor",value:function(){var e=this.size_;if(!e)return null;var t=this.getDisplacement(),n=this.getScaleArray();return[e[0]/2-t[0]/n[0],e[1]/2+t[1]/n[1]]}},{key:"getAngle",value:function(){return this.angle_}},{key:"getFill",value:function(){return this.fill_}},{key:"setFill",value:function(e){this.fill_=e,this.render()}},{key:"getHitDetectionImage",value:function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}},{key:"getImage",value:function(e){var t=this.canvas_[e];if(!t){var n=this.renderOptions_,i=or(n.size*e,n.size*e);this.draw_(n,i,e),t=i.canvas,this.canvas_[e]=t}return t}},{key:"getPixelRatio",value:function(e){return e}},{key:"getImageSize",value:function(){return this.size_}},{key:"getImageState",value:function(){return ro}},{key:"getOrigin",value:function(){return this.origin_}},{key:"getPoints",value:function(){return this.points_}},{key:"getRadius",value:function(){return this.radius_}},{key:"getRadius2",value:function(){return this.radius2_}},{key:"getSize",value:function(){return this.size_}},{key:"getStroke",value:function(){return this.stroke_}},{key:"setStroke",value:function(e){this.stroke_=e,this.render()}},{key:"listenImageChange",value:function(e){}},{key:"load",value:function(){}},{key:"unlistenImageChange",value:function(e){}},{key:"calculateLineJoinSize_",value:function(e,t,n){if(0===t||this.points_===1/0||"bevel"!==e&&"miter"!==e)return t;var i=this.radius_,r=void 0===this.radius2_?i:this.radius2_;if(i<r){var a=i;i=r,r=a}var o=void 0===this.radius2_?this.points_:2*this.points_,s=2*Math.PI/o,l=r*Math.sin(s),u=i-Math.sqrt(r*r-l*l),c=Math.sqrt(l*l+u*u),h=c/l;if("miter"===e&&h<=n)return h*t;var f=t/2/h,d=t/2*(u/c),v=Math.sqrt((i+f)*(i+f)+d*d)-i;if(void 0===this.radius2_||"bevel"===e)return 2*v;var g=i*Math.sin(s),p=r-Math.sqrt(i*i-g*g),y=Math.sqrt(g*g+p*p)/g;if(y<=n){var m=y*t/2-r-i;return 2*Math.max(v,m)}return 2*v}},{key:"createRenderOptions",value:function(){var e,t=gr,n=0,i=null,r=0,a=0;this.stroke_&&(null===(e=this.stroke_.getColor())&&(e=pr),e=os(e),void 0===(a=this.stroke_.getWidth())&&(a=1),i=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),void 0===(t=this.stroke_.getLineJoin())&&(t=gr),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var o=this.calculateLineJoinSize_(t,a,n),s=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:e,strokeWidth:a,size:Math.ceil(2*s+o),lineDash:i,lineDashOffset:r,lineJoin:t,miterLimit:n}}},{key:"render",value:function(){this.renderOptions_=this.createRenderOptions();var e=this.renderOptions_.size;this.canvas_={},this.size_=[e,e]}},{key:"draw_",value:function(e,t,n){if(t.scale(n,n),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){var i=this.fill_.getColor();null===i&&(i=fr),t.fillStyle=os(i),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}},{key:"createHitDetectionCanvas_",value:function(e){if(this.fill_){var t=this.fill_.getColor(),n=0;if("string"===typeof t&&(t=_t(t)),null===t?n=1:Array.isArray(t)&&(n=4===t.length?t[3]:1),0===n){var i=or(e.size,e.size);this.hitDetectionCanvas_=i.canvas,this.drawHitDetectionCanvas_(e,i)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}},{key:"createPath_",value:function(e){var t=this.points_,n=this.radius_;if(t===1/0)e.arc(0,0,n,0,2*Math.PI);else{var i=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(t*=2);for(var r=this.angle_-Math.PI/2,a=2*Math.PI/t,o=0;o<t;o++){var s=r+o*a,l=o%2===0?n:i;e.lineTo(l*Math.cos(s),l*Math.sin(s))}e.closePath()}}},{key:"drawHitDetectionCanvas_",value:function(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=fr,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}}]),n}(as),ls=ss,us=function(e){g(n,e);var t=m(n);function n(e){return o(this,n),e=e||{radius:5},t.call(this,{points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:void 0!==e.scale?e.scale:1,rotation:void 0!==e.rotation?e.rotation:0,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode})}return c(n,[{key:"clone",value:function(){var e=this.getScale(),t=new n({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}},{key:"setRadius",value:function(e){this.radius_=e,this.render()}}]),n}(ls),cs=us,hs=function(){function e(t){o(this,e),t=t||{},this.color_=void 0!==t.color?t.color:null}return c(e,[{key:"clone",value:function(){var t=this.getColor();return new e({color:Array.isArray(t)?t.slice():t||void 0})}},{key:"getColor",value:function(){return this.color_}},{key:"setColor",value:function(e){this.color_=e}}]),e}(),fs=function(){function e(t){o(this,e),t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}return c(e,[{key:"clone",value:function(){var t=this.getColor();return new e({color:Array.isArray(t)?t.slice():t||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()})}},{key:"getColor",value:function(){return this.color_}},{key:"getLineCap",value:function(){return this.lineCap_}},{key:"getLineDash",value:function(){return this.lineDash_}},{key:"getLineDashOffset",value:function(){return this.lineDashOffset_}},{key:"getLineJoin",value:function(){return this.lineJoin_}},{key:"getMiterLimit",value:function(){return this.miterLimit_}},{key:"getWidth",value:function(){return this.width_}},{key:"setColor",value:function(e){this.color_=e}},{key:"setLineCap",value:function(e){this.lineCap_=e}},{key:"setLineDash",value:function(e){this.lineDash_=e}},{key:"setLineDashOffset",value:function(e){this.lineDashOffset_=e}},{key:"setLineJoin",value:function(e){this.lineJoin_=e}},{key:"setMiterLimit",value:function(e){this.miterLimit_=e}},{key:"setWidth",value:function(e){this.width_=e}}]),e}(),ds=function(){function e(t){o(this,e),t=t||{},this.geometry_=null,this.geometryFunction_=ps,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}return c(e,[{key:"clone",value:function(){var t=this.getGeometry();return t&&"object"===typeof t&&(t=t.clone()),new e({geometry:t,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()})}},{key:"getRenderer",value:function(){return this.renderer_}},{key:"setRenderer",value:function(e){this.renderer_=e}},{key:"setHitDetectionRenderer",value:function(e){this.hitDetectionRenderer_=e}},{key:"getHitDetectionRenderer",value:function(){return this.hitDetectionRenderer_}},{key:"getGeometry",value:function(){return this.geometry_}},{key:"getGeometryFunction",value:function(){return this.geometryFunction_}},{key:"getFill",value:function(){return this.fill_}},{key:"setFill",value:function(e){this.fill_=e}},{key:"getImage",value:function(){return this.image_}},{key:"setImage",value:function(e){this.image_=e}},{key:"getStroke",value:function(){return this.stroke_}},{key:"setStroke",value:function(e){this.stroke_=e}},{key:"getText",value:function(){return this.text_}},{key:"setText",value:function(e){this.text_=e}},{key:"getZIndex",value:function(){return this.zIndex_}},{key:"setGeometry",value:function(e){"function"===typeof e?this.geometryFunction_=e:"string"===typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=ps,this.geometry_=e}},{key:"setZIndex",value:function(e){this.zIndex_=e}}]),e}();var vs=null;function gs(e,t){if(!vs){var n=new hs({color:"rgba(255,255,255,0.4)"}),i=new fs({color:"#3399CC",width:1.25});vs=[new ds({image:new cs({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return vs}function ps(e){return e.getGeometry()}var ys=ds,ms=null,_s=function(e){g(n,e);var t=m(n);function n(e,i,r,a,s,l){var u;return o(this,n),(u=t.call(this)).hitDetectionImage_=null,u.image_=e,u.crossOrigin_=a,u.canvas_={},u.color_=l,u.unlisten_=null,u.imageState_=s,u.size_=r,u.src_=i,u.tainted_,u}return c(n,[{key:"initializeImage_",value:function(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}},{key:"isTainted_",value:function(){if(void 0===this.tainted_&&this.imageState_===ro){ms||(ms=or(1,1,void 0,{willReadFrequently:!0})),ms.drawImage(this.image_,0,0);try{ms.getImageData(0,0,1,1),this.tainted_=!1}catch(e){ms=null,this.tainted_=!0}}return!0===this.tainted_}},{key:"dispatchChangeEvent_",value:function(){this.dispatchEvent(O)}},{key:"handleImageError_",value:function(){this.imageState_=ao,this.unlistenImage_(),this.dispatchChangeEvent_()}},{key:"handleImageLoad_",value:function(){this.imageState_=ro,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_()}},{key:"getImage",value:function(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}},{key:"getPixelRatio",value:function(e){return this.replaceColor_(e),this.canvas_[e]?e:1}},{key:"getImageState",value:function(){return this.imageState_}},{key:"getHitDetectionImage",value:function(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){var e=this.size_[0],t=this.size_[1],n=or(e,t);n.fillRect(0,0,e,t),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}},{key:"getSize",value:function(){return this.size_}},{key:"getSrc",value:function(){return this.src_}},{key:"load",value:function(){if(this.imageState_===no){this.image_||this.initializeImage_(),this.imageState_=io;try{this.image_.src=this.src_}catch(e){this.handleImageError_()}this.unlisten_=vo(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}},{key:"replaceColor_",value:function(e){if(this.color_&&!this.canvas_[e]&&this.imageState_===ro){var t=this.image_,n=document.createElement("canvas");n.width=Math.ceil(t.width*e),n.height=Math.ceil(t.height*e);var i=n.getContext("2d");i.scale(e,e),i.drawImage(t,0,0),i.globalCompositeOperation="multiply",i.fillStyle=pt(this.color_),i.fillRect(0,0,n.width/e,n.height/e),i.globalCompositeOperation="destination-in",i.drawImage(t,0,0),this.canvas_[e]=n}}},{key:"unlistenImage_",value:function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}]),n}(L);function ks(e,t,n,i){return void 0!==n&&void 0!==i?[n/e,i/t]:void 0!==n?n/e:void 0!==i?i/t:1}var xs=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n);var r=void 0!==(e=e||{}).opacity?e.opacity:1,s=void 0!==e.rotation?e.rotation:0,l=void 0!==e.scale?e.scale:1,u=void 0!==e.rotateWithView&&e.rotateWithView;(i=t.call(this,{opacity:r,rotation:s,scale:l,displacement:void 0!==e.displacement?e.displacement:[0,0],rotateWithView:u,declutterMode:e.declutterMode})).anchor_=void 0!==e.anchor?e.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==e.anchorOrigin?e.anchorOrigin:"top-left",i.anchorXUnits_=void 0!==e.anchorXUnits?e.anchorXUnits:"fraction",i.anchorYUnits_=void 0!==e.anchorYUnits?e.anchorYUnits:"fraction",i.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null;var c=void 0!==e.img?e.img:null;i.imgSize_=e.imgSize;var h=e.src;ye(!(void 0!==h&&c),4),ye(!c||c&&i.imgSize_,5),void 0!==h&&0!==h.length||!c||(h=c.src||$(c)),ye(void 0!==h&&h.length>0,6),ye(!((void 0!==e.width||void 0!==e.height)&&void 0!==e.scale),69);var f=void 0!==e.src?no:ro;if(i.color_=void 0!==e.color?_t(e.color):null,i.iconImage_=function(e,t,n,i,r,a){var o=St.get(t,i,a);return o||(o=new _s(e,t,n,i,r,a),St.set(t,i,a,o)),o}(c,h,void 0!==i.imgSize_?i.imgSize_:null,i.crossOrigin_,f,i.color_),i.offset_=void 0!==e.offset?e.offset:[0,0],i.offsetOrigin_=void 0!==e.offsetOrigin?e.offsetOrigin:"top-left",i.origin_=null,i.size_=void 0!==e.size?e.size:null,void 0!==e.width||void 0!==e.height){var d,v;if(e.size){var g=a(e.size,2);d=g[0],v=g[1]}else{var p=i.getImage(1);if(!(p instanceof HTMLCanvasElement||p.src&&p.complete)){i.initialOptions_=e;return i.listenImageChange((function t(){if(i.unlistenImageChange(t),i.initialOptions_){var n=i.iconImage_.getSize();i.setScale(ks(n[0],n[1],e.width,e.height))}})),y(i)}d=p.width,v=p.height}void 0!==d&&i.setScale(ks(d,v,e.width,e.height))}return i}return c(n,[{key:"clone",value:function(){var e,t,i;this.initialOptions_?(t=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e);var r=new n({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:e,width:t,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return r}},{key:"getAnchor",value:function(){var e=this.normalizedAnchor_;if(!e){e=this.anchor_;var t=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!t)return null;e=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(e[0]*=t[0]),"fraction"==this.anchorYUnits_&&(e[1]*=t[1])}if("top-left"!=this.anchorOrigin_){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(e[0]=-e[0]+t[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(e[1]=-e[1]+t[1])}this.normalizedAnchor_=e}var n=this.getDisplacement(),i=this.getScaleArray();return[e[0]-n[0]/i[0],e[1]+n[1]/i[1]]}},{key:"setAnchor",value:function(e){this.anchor_=e,this.normalizedAnchor_=null}},{key:"getColor",value:function(){return this.color_}},{key:"getImage",value:function(e){return this.iconImage_.getImage(e)}},{key:"getPixelRatio",value:function(e){return this.iconImage_.getPixelRatio(e)}},{key:"getImageSize",value:function(){return this.iconImage_.getSize()}},{key:"getImageState",value:function(){return this.iconImage_.getImageState()}},{key:"getHitDetectionImage",value:function(){return this.iconImage_.getHitDetectionImage()}},{key:"getOrigin",value:function(){if(this.origin_)return this.origin_;var e=this.offset_;if("top-left"!=this.offsetOrigin_){var t=this.getSize(),n=this.iconImage_.getSize();if(!t||!n)return null;e=e.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(e[0]=n[0]-t[0]-e[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(e[1]=n[1]-t[1]-e[1])}return this.origin_=e,this.origin_}},{key:"getSrc",value:function(){return this.iconImage_.getSrc()}},{key:"getSize",value:function(){return this.size_?this.size_:this.iconImage_.getSize()}},{key:"getWidth",value:function(){var e=this.getScaleArray();return this.size_?this.size_[0]*e[0]:this.iconImage_.getImageState()==ro?this.iconImage_.getSize()[0]*e[0]:void 0}},{key:"getHeight",value:function(){var e=this.getScaleArray();return this.size_?this.size_[1]*e[1]:this.iconImage_.getImageState()==ro?this.iconImage_.getSize()[1]*e[1]:void 0}},{key:"setScale",value:function(e){delete this.initialOptions_,d(f(n.prototype),"setScale",this).call(this,e)}},{key:"listenImageChange",value:function(e){this.iconImage_.addEventListener(O,e)}},{key:"load",value:function(){this.iconImage_.load()}},{key:"unlistenImageChange",value:function(e){this.iconImage_.removeEventListener(O,e)}}]),n}(as),bs=xs,ws=function(){function e(t){o(this,e),t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Ha(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new hs({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}return c(e,[{key:"clone",value:function(){var t=this.getScale();return new e({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}},{key:"getOverflow",value:function(){return this.overflow_}},{key:"getFont",value:function(){return this.font_}},{key:"getMaxAngle",value:function(){return this.maxAngle_}},{key:"getPlacement",value:function(){return this.placement_}},{key:"getRepeat",value:function(){return this.repeat_}},{key:"getOffsetX",value:function(){return this.offsetX_}},{key:"getOffsetY",value:function(){return this.offsetY_}},{key:"getFill",value:function(){return this.fill_}},{key:"getRotateWithView",value:function(){return this.rotateWithView_}},{key:"getRotation",value:function(){return this.rotation_}},{key:"getScale",value:function(){return this.scale_}},{key:"getScaleArray",value:function(){return this.scaleArray_}},{key:"getStroke",value:function(){return this.stroke_}},{key:"getText",value:function(){return this.text_}},{key:"getTextAlign",value:function(){return this.textAlign_}},{key:"getJustify",value:function(){return this.justify_}},{key:"getTextBaseline",value:function(){return this.textBaseline_}},{key:"getBackgroundFill",value:function(){return this.backgroundFill_}},{key:"getBackgroundStroke",value:function(){return this.backgroundStroke_}},{key:"getPadding",value:function(){return this.padding_}},{key:"setOverflow",value:function(e){this.overflow_=e}},{key:"setFont",value:function(e){this.font_=e}},{key:"setMaxAngle",value:function(e){this.maxAngle_=e}},{key:"setOffsetX",value:function(e){this.offsetX_=e}},{key:"setOffsetY",value:function(e){this.offsetY_=e}},{key:"setPlacement",value:function(e){this.placement_=e}},{key:"setRepeat",value:function(e){this.repeat_=e}},{key:"setRotateWithView",value:function(e){this.rotateWithView_=e}},{key:"setFill",value:function(e){this.fill_=e}},{key:"setRotation",value:function(e){this.rotation_=e}},{key:"setScale",value:function(e){this.scale_=e,this.scaleArray_=Ha(void 0!==e?e:1)}},{key:"setStroke",value:function(e){this.stroke_=e}},{key:"setText",value:function(e){this.text_=e}},{key:"setTextAlign",value:function(e){this.textAlign_=e}},{key:"setJustify",value:function(e){this.justify_=e}},{key:"setTextBaseline",value:function(e){this.textBaseline_=e}},{key:"setBackgroundFill",value:function(e){this.backgroundFill_=e}},{key:"setBackgroundStroke",value:function(e){this.backgroundStroke_=e}},{key:"setPadding",value:function(e){this.padding_=e}}]),e}(),Ss=ws;function Cs(e){return new ys({fill:Es(e,""),stroke:Ts(e,""),text:Rs(e),image:Ps(e)})}function Es(e,t){var n=e[t+"fill-color"];if(n)return new hs({color:n})}function Ts(e,t){var n=e[t+"stroke-width"],i=e[t+"stroke-color"];if(n||i)return new fs({width:n,color:i,lineCap:e[t+"stroke-line-cap"],lineJoin:e[t+"stroke-line-join"],lineDash:e[t+"stroke-line-dash"],lineDashOffset:e[t+"stroke-line-dash-offset"],miterLimit:e[t+"stroke-miter-limit"]})}function Rs(e){var t=e["text-value"];if(t)return new Ss({text:t,font:e["text-font"],maxAngle:e["text-max-angle"],offsetX:e["text-offset-x"],offsetY:e["text-offset-y"],overflow:e["text-overflow"],placement:e["text-placement"],repeat:e["text-repeat"],scale:e["text-scale"],rotateWithView:e["text-rotate-with-view"],rotation:e["text-rotation"],textAlign:e["text-align"],justify:e["text-justify"],textBaseline:e["text-baseline"],padding:e["text-padding"],fill:Es(e,"text-"),backgroundFill:Es(e,"text-background-"),stroke:Ts(e,"text-"),backgroundStroke:Ts(e,"text-background-")})}function Ps(e){var t=e["icon-src"],n=e["icon-img"];if(t||n)return new bs({src:t,img:n,imgSize:e["icon-img-size"],anchor:e["icon-anchor"],anchorOrigin:e["icon-anchor-origin"],anchorXUnits:e["icon-anchor-x-units"],anchorYUnits:e["icon-anchor-y-units"],color:e["icon-color"],crossOrigin:e["icon-cross-origin"],offset:e["icon-offset"],displacement:e["icon-displacement"],opacity:e["icon-opacity"],scale:e["icon-scale"],width:e["icon-width"],height:e["icon-height"],rotation:e["icon-rotation"],rotateWithView:e["icon-rotate-with-view"],size:e["icon-size"],declutterMode:e["icon-declutter-mode"]});var i=e["shape-points"];if(i){var r="shape-";return new ls({points:i,fill:Es(e,r),stroke:Ts(e,r),radius:e["shape-radius"],radius1:e["shape-radius1"],radius2:e["shape-radius2"],angle:e["shape-angle"],displacement:e["shape-displacement"],rotation:e["shape-rotation"],rotateWithView:e["shape-rotate-with-view"],scale:e["shape-scale"],declutterMode:e["shape-declutter-mode"]})}var a=e["circle-radius"];if(a){var o="circle-";return new cs({radius:a,fill:Es(e,o),stroke:Ts(e,o),displacement:e["circle-displacement"],scale:e["circle-scale"],rotation:e["circle-rotation"],rotateWithView:e["circle-rotate-with-view"],declutterMode:e["circle-declutter-mode"]})}}var Is="renderOrder",Fs=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{};var r=Object.assign({},e);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(i=t.call(this,r)).declutter_=void 0!==e.declutter&&e.declutter,i.renderBuffer_=void 0!==e.renderBuffer?e.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(e.style),i.updateWhileAnimating_=void 0!==e.updateWhileAnimating&&e.updateWhileAnimating,i.updateWhileInteracting_=void 0!==e.updateWhileInteracting&&e.updateWhileInteracting,i}return c(n,[{key:"getDeclutter",value:function(){return this.declutter_}},{key:"getFeatures",value:function(e){return d(f(n.prototype),"getFeatures",this).call(this,e)}},{key:"getRenderBuffer",value:function(){return this.renderBuffer_}},{key:"getRenderOrder",value:function(){return this.get(Is)}},{key:"getStyle",value:function(){return this.style_}},{key:"getStyleFunction",value:function(){return this.styleFunction_}},{key:"getUpdateWhileAnimating",value:function(){return this.updateWhileAnimating_}},{key:"getUpdateWhileInteracting",value:function(){return this.updateWhileInteracting_}},{key:"renderDeclutter",value:function(e){e.declutterTree||(e.declutterTree=new is(9)),this.getRenderer().renderDeclutter(e)}},{key:"setRenderOrder",value:function(e){this.set(Is,e)}},{key:"setStyle",value:function(e){var t;if(void 0===e)t=gs;else if(null===e)t=null;else if("function"===typeof e)t=e;else if(e instanceof ys)t=e;else if(Array.isArray(e)){for(var n=e.length,i=new Array(n),r=0;r<n;++r){var a=e[r];i[r]=a instanceof ys?a:Cs(a)}t=i}else t=Cs(e);this.style_=t,this.styleFunction_=null===e?void 0:function(e){var t;if("function"===typeof e)t=e;else{var n;Array.isArray(e)?n=e:(ye("function"===typeof e.getZIndex,41),n=[e]),t=function(){return n}}return t}(this.style_),this.changed()}}]),n}(Hi),Ms={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},Ls=[Ms.FILL],Os=[Ms.STROKE],As=[Ms.BEGIN_PATH],Ds=[Ms.CLOSE_PATH],Ns=Ms,zs=function(){function e(){o(this,e)}return c(e,[{key:"drawCustom",value:function(e,t,n,i){}},{key:"drawGeometry",value:function(e){}},{key:"setStyle",value:function(e){}},{key:"drawCircle",value:function(e,t){}},{key:"drawFeature",value:function(e,t){}},{key:"drawGeometryCollection",value:function(e,t){}},{key:"drawLineString",value:function(e,t){}},{key:"drawMultiLineString",value:function(e,t){}},{key:"drawMultiPoint",value:function(e,t){}},{key:"drawMultiPolygon",value:function(e,t){}},{key:"drawPoint",value:function(e,t){}},{key:"drawPolygon",value:function(e,t){}},{key:"drawText",value:function(e,t){}},{key:"setFillStrokeStyle",value:function(e,t){}},{key:"setImageStyle",value:function(e,t){}},{key:"setTextStyle",value:function(e,t){}}]),e}(),js=function(e){g(n,e);var t=m(n);function n(e,i,r,a){var s;return o(this,n),(s=t.call(this)).tolerance=e,s.maxExtent=i,s.pixelRatio=a,s.maxLineWidth=0,s.resolution=r,s.beginGeometryInstruction1_=null,s.beginGeometryInstruction2_=null,s.bufferedMaxExtent_=null,s.instructions=[],s.coordinates=[],s.tmpCoordinate_=[],s.hitDetectionInstructions=[],s.state={},s}return c(n,[{key:"applyPixelRatio",value:function(e){var t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))}},{key:"appendFlatPointCoordinates",value:function(e,t){for(var n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,r=this.coordinates,a=r.length,o=0,s=e.length;o<s;o+=t)i[0]=e[o],i[1]=e[o+1],Pe(n,i)&&(r[a++]=i[0],r[a++]=i[1]);return a}},{key:"appendFlatLineCoordinates",value:function(e,t,n,i,r,a){var o=this.coordinates,s=o.length,l=this.getBufferedMaxExtent();a&&(t+=i);var u,c,h,f=e[t],d=e[t+1],v=this.tmpCoordinate_,g=!0;for(u=t+i;u<n;u+=i)v[0]=e[u],v[1]=e[u+1],(h=Me(l,v))!==c?(g&&(o[s++]=f,o[s++]=d,g=!1),o[s++]=v[0],o[s++]=v[1]):h===Se.INTERSECTING?(o[s++]=v[0],o[s++]=v[1],g=!1):g=!0,f=v[0],d=v[1],c=h;return(r&&g||u===t+i)&&(o[s++]=f,o[s++]=d),s}},{key:"drawCustomCoordinates_",value:function(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a){var s=n[a],l=this.appendFlatLineCoordinates(e,t,s,i,!1,!1);r.push(l),t=s}return t}},{key:"drawCustom",value:function(e,t,n,i){this.beginGeometry(e,t);var r,a,o,s,l,u=e.getType(),c=e.getStride(),h=this.coordinates.length;switch(u){case"MultiPolygon":r=e.getOrientedFlatCoordinates(),s=[];var f=e.getEndss();l=0;for(var d=0,v=f.length;d<v;++d){var g=[];l=this.drawCustomCoordinates_(r,l,f[d],c,g),s.push(g)}this.instructions.push([Ns.CUSTOM,h,s,e,n,_i]),this.hitDetectionInstructions.push([Ns.CUSTOM,h,s,e,i||n,_i]);break;case"Polygon":case"MultiLineString":o=[],r="Polygon"==u?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),l=this.drawCustomCoordinates_(r,0,e.getEnds(),c,o),this.instructions.push([Ns.CUSTOM,h,o,e,n,mi]),this.hitDetectionInstructions.push([Ns.CUSTOM,h,o,e,i||n,mi]);break;case"LineString":case"Circle":r=e.getFlatCoordinates(),a=this.appendFlatLineCoordinates(r,0,r.length,c,!1,!1),this.instructions.push([Ns.CUSTOM,h,a,e,n,yi]),this.hitDetectionInstructions.push([Ns.CUSTOM,h,a,e,i||n,yi]);break;case"MultiPoint":r=e.getFlatCoordinates(),(a=this.appendFlatPointCoordinates(r,c))>h&&(this.instructions.push([Ns.CUSTOM,h,a,e,n,yi]),this.hitDetectionInstructions.push([Ns.CUSTOM,h,a,e,i||n,yi]));break;case"Point":r=e.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),a=this.coordinates.length,this.instructions.push([Ns.CUSTOM,h,a,e,n]),this.hitDetectionInstructions.push([Ns.CUSTOM,h,a,e,i||n])}this.endGeometry(t)}},{key:"beginGeometry",value:function(e,t){this.beginGeometryInstruction1_=[Ns.BEGIN_GEOMETRY,t,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ns.BEGIN_GEOMETRY,t,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}},{key:"finish",value:function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}},{key:"reverseHitDetectionInstructions",value:function(){var e,t=this.hitDetectionInstructions;t.reverse();var n,i,r=t.length,a=-1;for(e=0;e<r;++e)(i=(n=t[e])[0])==Ns.END_GEOMETRY?a=e:i==Ns.BEGIN_GEOMETRY&&(n[2]=e,S(this.hitDetectionInstructions,a,e),a=-1)}},{key:"setFillStrokeStyle",value:function(e,t){var n=this.state;if(e){var i=e.getColor();n.fillStyle=os(i||fr)}else n.fillStyle=void 0;if(t){var r=t.getColor();n.strokeStyle=os(r||pr);var a=t.getLineCap();n.lineCap=void 0!==a?a:dr;var o=t.getLineDash();n.lineDash=o?o.slice():vr;var s=t.getLineDashOffset();n.lineDashOffset=s||0;var l=t.getLineJoin();n.lineJoin=void 0!==l?l:gr;var u=t.getWidth();n.lineWidth=void 0!==u?u:1;var c=t.getMiterLimit();n.miterLimit=void 0!==c?c: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}},{key:"createFill",value:function(e){var t=e.fillStyle,n=[Ns.SET_FILL_STYLE,t];return"string"!==typeof t&&n.push(!0),n}},{key:"applyStroke",value:function(e){this.instructions.push(this.createStroke(e))}},{key:"createStroke",value:function(e){return[Ns.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}},{key:"updateFillStyle",value:function(e,t){var n=e.fillStyle;"string"===typeof n&&e.currentFillStyle==n||(void 0!==n&&this.instructions.push(t.call(this,e)),e.currentFillStyle=n)}},{key:"updateStrokeStyle",value:function(e,t){var n=e.strokeStyle,i=e.lineCap,r=e.lineDash,a=e.lineDashOffset,o=e.lineJoin,s=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=n||e.currentLineCap!=i||r!=e.currentLineDash&&!E(e.currentLineDash,r)||e.currentLineDashOffset!=a||e.currentLineJoin!=o||e.currentLineWidth!=s||e.currentMiterLimit!=l)&&(void 0!==n&&t.call(this,e),e.currentStrokeStyle=n,e.currentLineCap=i,e.currentLineDash=r,e.currentLineDashOffset=a,e.currentLineJoin=o,e.currentLineWidth=s,e.currentMiterLimit=l)}},{key:"endGeometry",value:function(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var t=[Ns.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}},{key:"getBufferedMaxExtent",value:function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Te(this.maxExtent),this.maxLineWidth>0)){var e=this.resolution*(this.maxLineWidth+1)/2;Ee(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}]),n}(zs),Gs=js,Ws=function(e){g(n,e);var t=m(n);function n(e,i,r,a){var s;return o(this,n),(s=t.call(this,e,i,r,a)).hitDetectionImage_=null,s.image_=null,s.imagePixelRatio_=void 0,s.anchorX_=void 0,s.anchorY_=void 0,s.height_=void 0,s.opacity_=void 0,s.originX_=void 0,s.originY_=void 0,s.rotateWithView_=void 0,s.rotation_=void 0,s.scale_=void 0,s.width_=void 0,s.declutterMode_=void 0,s.declutterImageWithText_=void 0,s}return c(n,[{key:"drawPoint",value:function(e,t){if(this.image_){this.beginGeometry(e,t);var n=e.getFlatCoordinates(),i=e.getStride(),r=this.coordinates.length,a=this.appendFlatPointCoordinates(n,i);this.instructions.push([Ns.DRAW_IMAGE,r,a,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([Ns.DRAW_IMAGE,r,a,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(t)}}},{key:"drawMultiPoint",value:function(e,t){if(this.image_){this.beginGeometry(e,t);var n=e.getFlatCoordinates(),i=e.getStride(),r=this.coordinates.length,a=this.appendFlatPointCoordinates(n,i);this.instructions.push([Ns.DRAW_IMAGE,r,a,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([Ns.DRAW_IMAGE,r,a,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(t)}}},{key:"finish",value: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,d(f(n.prototype),"finish",this).call(this)}},{key:"setImageStyle",value:function(e,t){var n=e.getAnchor(),i=e.getSize(),r=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=i[1],this.opacity_=e.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=i[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}]),n}(Gs),Bs=function(e){g(n,e);var t=m(n);function n(e,i,r,a){return o(this,n),t.call(this,e,i,r,a)}return c(n,[{key:"drawFlatCoordinates_",value:function(e,t,n,i){var r=this.coordinates.length,a=this.appendFlatLineCoordinates(e,t,n,i,!1,!1),o=[Ns.MOVE_TO_LINE_TO,r,a];return this.instructions.push(o),this.hitDetectionInstructions.push(o),n}},{key:"drawLineString",value:function(e,t){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([Ns.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,vr,0],As);var a=e.getFlatCoordinates(),o=e.getStride();this.drawFlatCoordinates_(a,0,a.length,o),this.hitDetectionInstructions.push(Os),this.endGeometry(t)}}},{key:"drawMultiLineString",value:function(e,t){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([Ns.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],As);for(var a=e.getEnds(),o=e.getFlatCoordinates(),s=e.getStride(),l=0,u=0,c=a.length;u<c;++u)l=this.drawFlatCoordinates_(o,l,a[u],s);this.hitDetectionInstructions.push(Os),this.endGeometry(t)}}},{key:"finish",value:function(){var e=this.state;return void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Os),this.reverseHitDetectionInstructions(),this.state=null,d(f(n.prototype),"finish",this).call(this)}},{key:"applyStroke",value:function(e){void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Os),e.lastStroke=this.coordinates.length),e.lastStroke=0,d(f(n.prototype),"applyStroke",this).call(this,e),this.instructions.push(As)}}]),n}(Gs),Us=Bs,Xs=function(e){g(n,e);var t=m(n);function n(e,i,r,a){return o(this,n),t.call(this,e,i,r,a)}return c(n,[{key:"drawFlatCoordinatess_",value:function(e,t,n,i){var r=this.state,a=void 0!==r.fillStyle,o=void 0!==r.strokeStyle,s=n.length;this.instructions.push(As),this.hitDetectionInstructions.push(As);for(var l=0;l<s;++l){var u=n[l],c=this.coordinates.length,h=this.appendFlatLineCoordinates(e,t,u,i,!0,!o),f=[Ns.MOVE_TO_LINE_TO,c,h];this.instructions.push(f),this.hitDetectionInstructions.push(f),o&&(this.instructions.push(Ds),this.hitDetectionInstructions.push(Ds)),t=u}return a&&(this.instructions.push(Ls),this.hitDetectionInstructions.push(Ls)),o&&(this.instructions.push(Os),this.hitDetectionInstructions.push(Os)),t}},{key:"drawCircle",value:function(e,t){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(e,t),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Ns.SET_FILL_STYLE,fr]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Ns.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var a=e.getFlatCoordinates(),o=e.getStride(),s=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,o,!1,!1);var l=[Ns.CIRCLE,s];this.instructions.push(As,l),this.hitDetectionInstructions.push(As,l),void 0!==n.fillStyle&&(this.instructions.push(Ls),this.hitDetectionInstructions.push(Ls)),void 0!==n.strokeStyle&&(this.instructions.push(Os),this.hitDetectionInstructions.push(Os)),this.endGeometry(t)}}},{key:"drawPolygon",value:function(e,t){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(e,t),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Ns.SET_FILL_STYLE,fr]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Ns.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var a=e.getEnds(),o=e.getOrientedFlatCoordinates(),s=e.getStride();this.drawFlatCoordinatess_(o,0,a,s),this.endGeometry(t)}}},{key:"drawMultiPolygon",value:function(e,t){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(e,t),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Ns.SET_FILL_STYLE,fr]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Ns.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var a=e.getEndss(),o=e.getOrientedFlatCoordinates(),s=e.getStride(),l=0,u=0,c=a.length;u<c;++u)l=this.drawFlatCoordinatess_(o,l,a[u],s);this.endGeometry(t)}}},{key:"finish",value:function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var t=this.coordinates,i=0,r=t.length;i<r;++i)t[i]=vi(t[i],e);return d(f(n.prototype),"finish",this).call(this)}},{key:"setFillStrokeStyles_",value:function(){var e=this.state;void 0!==e.fillStyle&&this.updateFillStyle(e,this.createFill),void 0!==e.strokeStyle&&this.updateStrokeStyle(e,this.applyStroke)}}]),n}(Gs),Vs=Xs;function Ys(e,t,n,i,r){for(var o=[],s=n,l=0,u=t.slice(n,2);l<e&&s+r<i;){var c=a(u.slice(-2),2),h=c[0],f=c[1],d=t[s+r],v=t[s+r+1],g=Math.sqrt((d-h)*(d-h)+(v-f)*(v-f));if((l+=g)>=e){var p=(e-l+g)/g,y=ct(h,d,p),m=ct(f,v,p);u.push(y,m),o.push(u),u=[y,m],l==e&&(s+=r),l=0}else if(l<e)u.push(t[s+r],t[s+r+1]),s+=r;else{var _=g-l,k=ct(h,d,_/g),x=ct(f,v,_/g);u.push(k,x),o.push(u),u=[k,x],l=0,s+=r}}return l>0&&o.push(u),o}function Ks(e,t,n,i,r){var a,o,s,l,u,c,h,f,d,v=n,g=n,p=0,y=0,m=n;for(a=n;a<i;a+=r){var _=t[a],k=t[a+1];void 0!==l&&(f=_-l,d=k-u,s=Math.sqrt(f*f+d*d),void 0!==c&&(y+=o,Math.acos((c*f+h*d)/(o*s))>e&&(y>p&&(p=y,v=m,g=a),y=0,m=a-r)),o=s,c=f,h=d),l=_,u=k}return(y+=s)>p?[m,a]:[v,g]}var Hs={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Zs=function(e){g(n,e);var t=m(n);function n(e,i,r,a){var s;return o(this,n),(s=t.call(this,e,i,r,a)).labels_=null,s.text_="",s.textOffsetX_=0,s.textOffsetY_=0,s.textRotateWithView_=void 0,s.textRotation_=0,s.textFillState_=null,s.fillStates={},s.textStrokeState_=null,s.strokeStates={},s.textState_={},s.textStates={},s.textKey_="",s.fillKey_="",s.strokeKey_="",s.declutterImageWithText_=void 0,s}return c(n,[{key:"finish",value:function(){var e=d(f(n.prototype),"finish",this).call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}},{key:"drawText",value:function(e,t){var n=this.textFillState_,i=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(n||i)){var a=this.coordinates,o=a.length,s=e.getType(),l=null,u=e.getStride();if("line"!==r.placement||"LineString"!=s&&"MultiLineString"!=s&&"Polygon"!=s&&"MultiPolygon"!=s){var c=r.overflow?null:[];switch(s){case"Point":case"MultiPoint":l=e.getFlatCoordinates();break;case"LineString":l=e.getFlatMidpoint();break;case"Circle":l=e.getCenter();break;case"MultiLineString":l=e.getFlatMidpoints(),u=2;break;case"Polygon":l=e.getFlatInteriorPoint(),r.overflow||c.push(l[2]/this.resolution),u=3;break;case"MultiPolygon":var h=e.getFlatInteriorPoints();l=[];for(var f=0,d=h.length;f<d;f+=3)r.overflow||c.push(h[f+2]/this.resolution),l.push(h[f],h[f+1]);if(0===l.length)return;u=2}var v=this.appendFlatPointCoordinates(l,u);if(v===o)return;if(c&&(v-o)/2!==l.length/u){var g=o/2;c=c.filter((function(e,t){var n=a[2*(g+t)]===l[t*u]&&a[2*(g+t)+1]===l[t*u+1];return n||--g,n}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,t);var p=r.padding;if(p!=_r&&(r.scale[0]<0||r.scale[1]<0)){var y=r.padding[0],m=r.padding[1],_=r.padding[2],k=r.padding[3];r.scale[0]<0&&(m=-m,k=-k),r.scale[1]<0&&(y=-y,_=-_),p=[y,m,_,k]}var x=this.pixelRatio;this.instructions.push([Ns.DRAW_IMAGE,o,v,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,p==_r?_r:p.map((function(e){return e*x})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,c]);var b=1/x;this.hitDetectionInstructions.push([Ns.DRAW_IMAGE,o,v,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[b,b],NaN,void 0,this.declutterImageWithText_,p,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,c]),this.endGeometry(t)}else{if(!tt(this.getBufferedMaxExtent(),e.getExtent()))return;var w;if(l=e.getFlatCoordinates(),"LineString"==s)w=[l.length];else if("MultiLineString"==s)w=e.getEnds();else if("Polygon"==s)w=e.getEnds().slice(0,1);else if("MultiPolygon"==s){var S=e.getEndss();w=[];for(var C=0,E=S.length;C<E;++C)w.push(S[C][0])}this.beginGeometry(e,t);for(var T=r.repeat,R=T?void 0:r.textAlign,P=0,I=0,F=w.length;I<F;++I)for(var M=void 0,L=0,O=(M=T?Ys(T*this.resolution,l,P,w[I],u):[l.slice(P,w[I])]).length;L<O;++L){var A=M[L],D=0,N=A.length;if(void 0==R){var z=Ks(r.maxAngle,A,0,A.length,2);D=z[0],N=z[1]}for(var j=D;j<N;j+=u)a.push(A[j],A[j+1]);var G=a.length;P=w[I],this.drawChars_(o,G),o=G}this.endGeometry(t)}}}},{key:"saveTextStates_",value:function(){var e=this.textStrokeState_,t=this.textState_,n=this.textFillState_,i=this.strokeKey_;e&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:t.font,textAlign:t.textAlign||yr,justify:t.justify,textBaseline:t.textBaseline||mr,scale:t.scale});var a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}},{key:"drawChars_",value:function(e,t){var n=this.textStrokeState_,i=this.textState_,r=this.strokeKey_,a=this.textKey_,o=this.fillKey_;this.saveTextStates_();var s=this.pixelRatio,l=Hs[i.textBaseline],u=this.textOffsetY_*s,c=this.text_,h=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([Ns.DRAW_CHARS,e,t,l,i.overflow,o,i.maxAngle,s,u,r,h*s,c,a,1]),this.hitDetectionInstructions.push([Ns.DRAW_CHARS,e,t,l,i.overflow,o,i.maxAngle,1,u,r,h,c,a,1/s])}},{key:"setTextStyle",value:function(e,t){var n,i,r;if(e){var a=e.getFill();a?((i=this.textFillState_)||(i={},this.textFillState_=i),i.fillStyle=os(a.getColor()||fr)):(i=null,this.textFillState_=i);var o=e.getStroke();if(o){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var s=o.getLineDash(),l=o.getLineDashOffset(),u=o.getWidth(),c=o.getMiterLimit();r.lineCap=o.getLineCap()||dr,r.lineDash=s?s.slice():vr,r.lineDashOffset=void 0===l?0:l,r.lineJoin=o.getLineJoin()||gr,r.lineWidth=void 0===u?1:u,r.miterLimit=void 0===c?10:c,r.strokeStyle=os(o.getColor()||pr)}else r=null,this.textStrokeState_=r;n=this.textState_;var h=e.getFont()||hr;wr(h);var f=e.getScaleArray();n.overflow=e.getOverflow(),n.font=h,n.maxAngle=e.getMaxAngle(),n.placement=e.getPlacement(),n.textAlign=e.getTextAlign(),n.repeat=e.getRepeat(),n.justify=e.getJustify(),n.textBaseline=e.getTextBaseline()||mr,n.backgroundFill=e.getBackgroundFill(),n.backgroundStroke=e.getBackgroundStroke(),n.padding=e.getPadding()||_r,n.scale=void 0===f?[1,1]:f;var d=e.getOffsetX(),v=e.getOffsetY(),g=e.getRotateWithView(),p=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===v?0:v,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===p?0:p,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:$(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+$(i.fillStyle):""}else this.text_="";this.declutterImageWithText_=t}}]),n}(Gs),qs={Circle:Vs,Default:Gs,Image:Ws,LineString:Us,Polygon:Vs,Text:Zs},$s=function(){function e(t,n,i,r){o(this,e),this.tolerance_=t,this.maxExtent_=n,this.pixelRatio_=r,this.resolution_=i,this.buildersByZIndex_={}}return c(e,[{key:"finish",value:function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var n=this.buildersByZIndex_[t];for(var i in n){var r=n[i].finish();e[t][i]=r}}return e}},{key:"getBuilder",value:function(e,t){var n=void 0!==e?e.toString():"0",i=this.buildersByZIndex_[n];void 0===i&&(i={},this.buildersByZIndex_[n]=i);var r=i[t];void 0===r&&(r=new(0,qs[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=r);return r}}]),e}();function Js(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qs(e,t,n,i,r,a,o,s,l,u,c,h){var f=e[t],d=e[t+1],v=0,g=0,p=0,y=0;function m(){v=f,g=d,f=e[t+=i],d=e[t+1],y+=p,p=Math.sqrt((f-v)*(f-v)+(d-g)*(d-g))}do{m()}while(t<n-i&&y+p<a);for(var _=0===p?0:(a-y)/p,k=ct(v,f,_),x=ct(g,d,_),b=t-i,w=y,S=a+s*l(u,r,c);t<n-i&&y+p<S;)m();var C,E=ct(v,f,_=0===p?0:(S-y)/p),T=ct(g,d,_);if(h){var R=[k,x,E,T];Jn(R,0,4,2,h,R,R),C=R[0]>R[2]}else C=k>E;var P,I=Math.PI,F=[],M=b+i===t;if(p=0,y=w,f=e[t=b],d=e[t+1],M){m(),P=Math.atan2(d-g,f-v),C&&(P+=P>0?-I:I);var L=(E+k)/2,O=(T+x)/2;return F[0]=[L,O,(S-a)/2,P,r],F}for(var A=0,D=(r=r.replace(/\n/g," ")).length;A<D;){m();var N=Math.atan2(d-g,f-v);if(C&&(N+=N>0?-I:I),void 0!==P){var z=N-P;if(z+=z>I?-2*I:z<-I?2*I:0,Math.abs(z)>o)return null}P=N;for(var j=A,G=0;A<D;++A){var W=s*l(u,r[C?D-A-1:A],c);if(t+i<n&&y+p<a+G+W/2)break;G+=W}if(A!==j){var B=C?r.substring(D-j,D-A):r.substring(j,A),U=ct(v,f,_=0===p?0:(a+G/2-y)/p),X=ct(g,d,_);F.push([U,X,G/2,N,B]),a+=G}}return F}function el(e,t,n,i){for(var r=e[t],a=e[t+1],o=0,s=t+i;s<n;s+=i){var l=e[s],u=e[s+1];o+=Math.sqrt((l-r)*(l-r)+(u-a)*(u-a)),r=l,a=u}return o}var tl=[1/0,1/0,-1/0,-1/0],nl=[],il=[],rl=[],al=[];function ol(e){return e[3].declutterBox}var sl=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 ll(e,t){return"start"!==t&&"end"!==t||sl.test(e)||(t="start"===t?"left":"right"),Hs[t]}function ul(e,t,n){return n>0&&e.push("\n",""),e.push(t,""),e}var cl=function(){function e(t,n,i,r){o(this,e),this.overlaps=i,this.pixelRatio=n,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 c(e,[{key:"createLabel",value:function(e,t,n,i){var r=e+t+n+i;if(this.labels_[r])return this.labels_[r];var a=i?this.strokeStates[i]:null,o=n?this.fillStates[n]:null,s=this.textStates[t],l=this.pixelRatio,u=[s.scale[0]*l,s.scale[1]*l],c=Array.isArray(e),h=s.justify?Hs[s.justify]:ll(Array.isArray(e)?e[0]:e,s.textAlign||yr),f=i&&a.lineWidth?a.lineWidth:0,d=c?e:e.split("\n").reduce(ul,[]),v=function(e,t){for(var n=[],i=[],r=[],a=0,o=0,s=0,l=0,u=0,c=t.length;u<=c;u+=2){var h=t[u];if("\n"!==h&&u!==c){var f=t[u+1]||e.font,d=Er(f,h);n.push(d),o+=d;var v=Sr(f);i.push(v),l=Math.max(l,v)}else a=Math.max(a,o),r.push(o),o=0,s+=l}return{width:a,height:s,widths:n,heights:i,lineWidths:r}}(s,d),g=v.width,p=v.height,y=v.widths,m=v.heights,_=v.lineWidths,k=g+f,x=[],b=(k+2)*u[0],w=(p+f)*u[1],S={width:b<0?Math.floor(b):Math.ceil(b),height:w<0?Math.floor(w):Math.ceil(w),contextInstructions:x};1==u[0]&&1==u[1]||x.push("scale",u),i&&(x.push("strokeStyle",a.strokeStyle),x.push("lineWidth",f),x.push("lineCap",a.lineCap),x.push("lineJoin",a.lineJoin),x.push("miterLimit",a.miterLimit),x.push("setLineDash",[a.lineDash]),x.push("lineDashOffset",a.lineDashOffset)),n&&x.push("fillStyle",o.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");for(var C,E=.5-h,T=h*k+E*f,R=[],P=[],I=0,F=0,M=0,L=0,O=0,A=d.length;O<A;O+=2){var D=d[O];if("\n"!==D){var N=d[O+1]||s.font;N!==C&&(i&&R.push("font",N),n&&P.push("font",N),C=N),I=Math.max(I,m[M]);var z=[D,T+E*y[M]+h*(y[M]-_[L]),.5*(f+I)+F];T+=y[M],i&&R.push("strokeText",z),n&&P.push("fillText",z),++M}else F+=I,I=0,T=h*k+E*f,++L}return Array.prototype.push.apply(x,R),Array.prototype.push.apply(x,P),this.labels_[r]=S,S}},{key:"replayTextBackground_",value:function(e,t,n,i,r,a,o){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,i),e.lineTo.apply(e,r),e.lineTo.apply(e,t),a&&(this.alignFill_=a[2],this.fill_(e)),o&&(this.setStrokeStyle_(e,o),e.stroke())}},{key:"calculateImageOrLabelDimensions_",value:function(e,t,n,i,r,a,o,s,l,u,c,h,f,d,v,g){var p,y=n-(o*=h[0]),m=i-(s*=h[1]),_=r+l>e?e-l:r,k=a+u>t?t-u:a,x=d[3]+_*h[0]+d[1],b=d[0]+k*h[1]+d[2],w=y-d[3],S=m-d[0];return(v||0!==c)&&(nl[0]=w,al[0]=w,nl[1]=S,il[1]=S,il[0]=w+x,rl[0]=il[0],rl[1]=S+b,al[1]=rl[1]),0!==c?(ke(p=xe([1,0,0,1,0,0],n,i,1,1,c,-n,-i),nl),ke(p,il),ke(p,rl),ke(p,al),Oe(Math.min(nl[0],il[0],rl[0],al[0]),Math.min(nl[1],il[1],rl[1],al[1]),Math.max(nl[0],il[0],rl[0],al[0]),Math.max(nl[1],il[1],rl[1],al[1]),tl)):Oe(Math.min(w,w+x),Math.min(S,S+b),Math.max(w,w+x),Math.max(S,S+b),tl),f&&(y=Math.round(y),m=Math.round(m)),{drawImageX:y,drawImageY:m,drawImageW:_,drawImageH:k,originX:l,originY:u,declutterBox:{minX:tl[0],minY:tl[1],maxX:tl[2],maxY:tl[3],value:g},canvasTransform:p,scale:h}}},{key:"replayImageOrLabel_",value:function(e,t,n,i,r,a,o){var s=!(!a&&!o),l=i.declutterBox,u=e.canvas,c=o?o[2]*i.scale[0]/2:0;return l.minX-c<=u.width/t&&l.maxX+c>=0&&l.minY-c<=u.height/t&&l.maxY+c>=0&&(s&&this.replayTextBackground_(e,nl,il,rl,al,a,o),Rr(e,i.canvasTransform,r,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}},{key:"fill_",value:function(e){if(this.alignFill_){var t=ke(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;e.save(),e.translate(t[0]%n,t[1]%n),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()}},{key:"setStrokeStyle_",value:function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}},{key:"drawLabelWithPointPlacement_",value:function(e,t,n,i){var r=this.textStates[t],a=this.createLabel(e,t,i,n),o=this.strokeStates[n],s=this.pixelRatio,l=ll(Array.isArray(e)?e[0]:e,r.textAlign||yr),u=Hs[r.textBaseline||mr],c=o&&o.lineWidth?o.lineWidth:0;return{label:a,anchorX:l*(a.width/s-2*r.scale[0])+2*(.5-l)*c,anchorY:u*a.height/s+2*(.5-u)*c}}},{key:"execute_",value:function(e,t,n,i,r,a,o,s){var l,u,c;this.pixelCoordinates_&&E(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=$n(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),u=this.renderedTransform_,c=n,u[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5]);for(var h,f,d,v,g,p,y,m,_,k,x,b,w,S,C,T,R=0,P=i.length,I=0,F=0,M=0,L=null,O=null,A=this.coordinateCache_,D=this.viewRotation_,N=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,z={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},j=this.instructions!=i||this.overlaps?0:200;R<P;){var G=i[R];switch(G[0]){case Ns.BEGIN_GEOMETRY:w=G[1],T=G[3],w.getGeometry()?void 0===o||tt(o,T.getExtent())?++R:R=G[2]+1:R=G[2];break;case Ns.BEGIN_PATH:F>j&&(this.fill_(e),F=0),M>j&&(e.stroke(),M=0),F||M||(e.beginPath(),v=NaN,g=NaN),++R;break;case Ns.CIRCLE:var W=l[I=G[1]],B=l[I+1],U=l[I+2]-W,X=l[I+3]-B,V=Math.sqrt(U*U+X*X);e.moveTo(W+V,B),e.arc(W,B,V,0,2*Math.PI,!0),++R;break;case Ns.CLOSE_PATH:e.closePath(),++R;break;case Ns.CUSTOM:I=G[1],h=G[2];var Y=G[3],K=G[4],H=6==G.length?G[5]:void 0;z.geometry=Y,z.feature=w,R in A||(A[R]=[]);var Z=A[R];H?H(l,I,h,2,Z):(Z[0]=l[I],Z[1]=l[I+1],Z.length=2),K(Z,z),++R;break;case Ns.DRAW_IMAGE:I=G[1],h=G[2],m=G[3],f=G[4],d=G[5];var q=G[6],$=G[7],J=G[8],Q=G[9],ee=G[10],te=G[11],ne=G[12],ie=G[13],re=G[14],ae=G[15];if(!m&&G.length>=20){_=G[19],k=G[20],x=G[21],b=G[22];var oe=this.drawLabelWithPointPlacement_(_,k,x,b);m=oe.label,G[3]=m;var se=G[23];f=(oe.anchorX-se)*this.pixelRatio,G[4]=f;var le=G[24];d=(oe.anchorY-le)*this.pixelRatio,G[5]=d,q=m.height,G[6]=q,ie=m.width,G[13]=ie}var ue=void 0;G.length>25&&(ue=G[25]);var ce=void 0,he=void 0,fe=void 0;G.length>17?(ce=G[16],he=G[17],fe=G[18]):(ce=_r,he=!1,fe=!1),ee&&N?te+=D:ee||N||(te-=D);for(var de=0;I<h;I+=2)if(!(ue&&ue[de++]<ie/this.pixelRatio)){var ve=this.calculateImageOrLabelDimensions_(m.width,m.height,l[I],l[I+1],ie,q,f,d,J,Q,te,ne,r,ce,he||fe,w),ge=[e,t,m,ve,$,he?L:null,fe?O:null];if(s){if("none"===re)continue;if("obstacle"===re){s.insert(ve.declutterBox);continue}var pe=void 0,ye=void 0;if(ae){var me=h-I;if(!ae[me]){ae[me]=ge;continue}if(pe=ae[me],delete ae[me],ye=ol(pe),s.collides(ye))continue}if(s.collides(ve.declutterBox))continue;pe&&(s.insert(ye),this.replayImageOrLabel_.apply(this,pe)),s.insert(ve.declutterBox)}this.replayImageOrLabel_.apply(this,ge)}++R;break;case Ns.DRAW_CHARS:var _e=G[1],ke=G[2],xe=G[3],be=G[4];b=G[5];var we=G[6],Se=G[7],Ce=G[8];x=G[9];var Ee=G[10];_=G[11],k=G[12];var Te=[G[13],G[13]],Re=this.textStates[k],Pe=Re.font,Ie=[Re.scale[0]*Se,Re.scale[1]*Se],Fe=void 0;Pe in this.widths_?Fe=this.widths_[Pe]:(Fe={},this.widths_[Pe]=Fe);var Me=el(l,_e,ke,2),Le=Math.abs(Ie[0])*Tr(Pe,_,Fe);if(be||Le<=Me){var Oe=this.textStates[k].textAlign,Ae=Qs(l,_e,ke,2,_,(Me-Le)*Hs[Oe],we,Math.abs(Ie[0]),Tr,Pe,Fe,N?0:this.viewRotation_);e:if(Ae){var De=[],Ne=void 0,ze=void 0,je=void 0,Ge=void 0,We=void 0;if(x)for(Ne=0,ze=Ae.length;Ne<ze;++Ne){je=(We=Ae[Ne])[4],Ge=this.createLabel(je,k,"",x),f=We[2]+(Ie[0]<0?-Ee:Ee),d=xe*Ge.height+2*(.5-xe)*Ee*Ie[1]/Ie[0]-Ce;var Be=this.calculateImageOrLabelDimensions_(Ge.width,Ge.height,We[0],We[1],Ge.width,Ge.height,f,d,0,0,We[3],Te,!1,_r,!1,w);if(s&&s.collides(Be.declutterBox))break e;De.push([e,t,Ge,Be,1,null,null])}if(b)for(Ne=0,ze=Ae.length;Ne<ze;++Ne){je=(We=Ae[Ne])[4],Ge=this.createLabel(je,k,b,""),f=We[2],d=xe*Ge.height-Ce;var Ue=this.calculateImageOrLabelDimensions_(Ge.width,Ge.height,We[0],We[1],Ge.width,Ge.height,f,d,0,0,We[3],Te,!1,_r,!1,w);if(s&&s.collides(Ue.declutterBox))break e;De.push([e,t,Ge,Ue,1,null,null])}s&&s.load(De.map(ol));for(var Xe=0,Ve=De.length;Xe<Ve;++Xe)this.replayImageOrLabel_.apply(this,De[Xe])}}++R;break;case Ns.END_GEOMETRY:if(void 0!==a){var Ye=a(w=G[1],T);if(Ye)return Ye}++R;break;case Ns.FILL:j?F++:this.fill_(e),++R;break;case Ns.MOVE_TO_LINE_TO:for(I=G[1],h=G[2],S=l[I],y=(C=l[I+1])+.5|0,(p=S+.5|0)===v&&y===g||(e.moveTo(S,C),v=p,g=y),I+=2;I<h;I+=2)p=(S=l[I])+.5|0,y=(C=l[I+1])+.5|0,I!=h-2&&p===v&&y===g||(e.lineTo(S,C),v=p,g=y);++R;break;case Ns.SET_FILL_STYLE:L=G,this.alignFill_=G[2],F&&(this.fill_(e),F=0,M&&(e.stroke(),M=0)),e.fillStyle=G[1],++R;break;case Ns.SET_STROKE_STYLE:O=G,M&&(e.stroke(),M=0),this.setStrokeStyle_(e,G),++R;break;case Ns.STROKE:j?M++:e.stroke(),++R;break;default:++R}}F&&this.fill_(e),M&&e.stroke()}},{key:"execute",value:function(e,t,n,i,r,a){this.viewRotation_=i,this.execute_(e,t,n,this.instructions,r,void 0,void 0,a)}},{key:"executeHitDetection",value:function(e,t,n,i,r){return this.viewRotation_=n,this.execute_(e,1,t,this.hitDetectionInstructions,!0,i,r)}}]),e}(),hl=cl,fl=["Polygon","Circle","LineString","Image","Text","Default"],dl=function(){function e(t,n,i,r,a,s){o(this,e),this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=i,this.resolution_=n,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(a)}return c(e,[{key:"clip",value:function(e,t){var n=this.getClipCoords(t);e.beginPath(),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3]),e.lineTo(n[4],n[5]),e.lineTo(n[6],n[7]),e.clip()}},{key:"createExecutors_",value:function(e){for(var t in e){var n=this.executorsByZIndex_[t];void 0===n&&(n={},this.executorsByZIndex_[t]=n);var i=e[t];for(var r in i){var a=i[r];n[r]=new hl(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}}},{key:"hasExecutors",value:function(e){for(var t in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[t],i=0,r=e.length;i<r;++i)if(e[i]in n)return!0;return!1}},{key:"forEachFeatureAtCoordinate",value:function(e,t,n,i,r,a){var o=2*(i=Math.round(i))+1,s=xe(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=or(o,o,void 0,{willReadFrequently:!0}));var u,c=this.hitDetectionContext_;c.canvas.width!==o||c.canvas.height!==o?(c.canvas.width=o,c.canvas.height=o):l||c.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(je(u=[1/0,1/0,-1/0,-1/0],e),Ee(u,t*(this.renderBuffer_+i),u));var h,f=function(e){if(void 0!==vl[e])return vl[e];for(var t=2*e+1,n=e*e,i=new Array(n+1),r=0;r<=e;++r)for(var a=0;a<=e;++a){var o=r*r+a*a;if(o>n)break;var s=i[o];s||(s=[],i[o]=s),s.push(4*((e+r)*t+(e+a))+3),r>0&&s.push(4*((e-r)*t+(e+a))+3),a>0&&(s.push(4*((e+r)*t+(e-a))+3),r>0&&s.push(4*((e-r)*t+(e-a))+3))}for(var l=[],u=0,c=i.length;u<c;++u)i[u]&&l.push.apply(l,Js(i[u]));return vl[e]=l,l}(i);function d(e,t){for(var n=c.getImageData(0,0,o,o).data,s=0,l=f.length;s<l;s++)if(n[f[s]]>0){if(!a||"Image"!==h&&"Text"!==h||a.includes(e)){var u=(f[s]-3)/4,d=i-u%o,v=i-(u/o|0),g=r(e,t,d*d+v*v);if(g)return g}c.clearRect(0,0,o,o);break}}var v,g,p,y,m,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(b),v=_.length-1;v>=0;--v){var k=_[v].toString();for(p=this.executorsByZIndex_[k],g=fl.length-1;g>=0;--g)if(void 0!==(y=p[h=fl[g]])&&(m=y.executeHitDetection(c,s,n,d,u)))return m}}},{key:"getClipCoords",value:function(e){var t=this.maxExtent_;if(!t)return null;var n=t[0],i=t[1],r=t[2],a=t[3],o=[n,i,n,a,r,a,r,i];return $n(o,0,8,2,e,o),o}},{key:"isEmpty",value:function(){return F(this.executorsByZIndex_)}},{key:"execute",value:function(e,t,n,i,r,a,o){var s,l,u,c,h,f,d=Object.keys(this.executorsByZIndex_).map(Number);for(d.sort(b),this.maxExtent_&&(e.save(),this.clip(e,n)),a=a||fl,o&&d.reverse(),s=0,l=d.length;s<l;++s){var v=d[s].toString();for(h=this.executorsByZIndex_[v],u=0,c=a.length;u<c;++u){void 0!==(f=h[a[u]])&&f.execute(e,t,n,i,r,o)}}this.maxExtent_&&e.restore()}}]),e}(),vl={};var gl=dl,pl=function(e){g(n,e);var t=m(n);function n(e,i,r,a,s,l,u){var c;return o(this,n),(c=t.call(this)).context_=e,c.pixelRatio_=i,c.extent_=r,c.transform_=a,c.transformRotation_=a?ht(Math.atan2(a[1],a[0]),10):0,c.viewRotation_=s,c.squaredTolerance_=l,c.userTransform_=u,c.contextFillState_=null,c.contextStrokeState_=null,c.contextTextState_=null,c.fillState_=null,c.strokeState_=null,c.image_=null,c.imageAnchorX_=0,c.imageAnchorY_=0,c.imageHeight_=0,c.imageOpacity_=0,c.imageOriginX_=0,c.imageOriginY_=0,c.imageRotateWithView_=!1,c.imageRotation_=0,c.imageScale_=[0,0],c.imageWidth_=0,c.text_="",c.textOffsetX_=0,c.textOffsetY_=0,c.textRotateWithView_=!1,c.textRotation_=0,c.textScale_=[0,0],c.textFillState_=null,c.textStrokeState_=null,c.textState_=null,c.pixelCoordinates_=[],c.tmpLocalTransform_=[1,0,0,1,0,0],c}return c(n,[{key:"drawImages_",value:function(e,t,n,i){if(this.image_){var r=$n(e,t,n,i,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.tmpLocalTransform_,s=a.globalAlpha;1!=this.imageOpacity_&&(a.globalAlpha=s*this.imageOpacity_);var l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(var u=0,c=r.length;u<c;u+=2){var h=r[u]-this.imageAnchorX_,f=r[u+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=h+this.imageAnchorX_,v=f+this.imageAnchorY_;xe(o,d,v,1,1,l,-d,-v),a.setTransform.apply(a,o),a.translate(d,v),a.scale(this.imageScale_[0],this.imageScale_[1]),a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),a.setTransform(1,0,0,1,0,0)}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,h,f,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(a.globalAlpha=s)}}},{key:"drawText_",value:function(e,t,n,i){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=$n(e,t,n,i,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.textRotation_;for(0===this.transformRotation_&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);t<n;t+=i){var s=r[t]+this.textOffsetX_,l=r[t+1]+this.textOffsetY_;0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]?(a.translate(s-this.textOffsetX_,l-this.textOffsetY_),a.rotate(o),a.translate(this.textOffsetX_,this.textOffsetY_),a.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&a.strokeText(this.text_,0,0),this.textFillState_&&a.fillText(this.text_,0,0),a.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&a.strokeText(this.text_,s,l),this.textFillState_&&a.fillText(this.text_,s,l))}}}},{key:"moveToLineTo_",value:function(e,t,n,i,r){var a=this.context_,o=$n(e,t,n,i,this.transform_,this.pixelCoordinates_);a.moveTo(o[0],o[1]);var s=o.length;r&&(s-=2);for(var l=2;l<s;l+=2)a.lineTo(o[l],o[l+1]);return r&&a.closePath(),n}},{key:"drawRings_",value:function(e,t,n,i){for(var r=0,a=n.length;r<a;++r)t=this.moveToLineTo_(e,t,n[r],i,!0);return t}},{key:"drawCircle",value:function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),tt(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var t=function(e,t,n){var i=e.getFlatCoordinates();if(!i)return null;var r=e.getStride();return $n(i,0,i.length,r,t,n)}(e,this.transform_,this.pixelCoordinates_),n=t[2]-t[0],i=t[3]-t[1],r=Math.sqrt(n*n+i*i),a=this.context_;a.beginPath(),a.arc(t[0],t[1],r,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}""!==this.text_&&this.drawText_(e.getCenter(),0,2,2)}}},{key:"setStyle",value:function(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}},{key:"setTransform",value:function(e){this.transform_=e}},{key:"drawGeometry",value:function(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e)}}},{key:"drawFeature",value:function(e,t){var n=t.getGeometryFunction()(e);n&&(this.setStyle(t),this.drawGeometry(n))}},{key:"drawGeometryCollection",value:function(e){for(var t=e.getGeometriesArray(),n=0,i=t.length;n<i;++n)this.drawGeometry(t[n])}},{key:"drawPoint",value:function(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var t=e.getFlatCoordinates(),n=e.getStride();this.image_&&this.drawImages_(t,0,t.length,n),""!==this.text_&&this.drawText_(t,0,t.length,n)}},{key:"drawMultiPoint",value:function(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var t=e.getFlatCoordinates(),n=e.getStride();this.image_&&this.drawImages_(t,0,t.length,n),""!==this.text_&&this.drawText_(t,0,t.length,n)}},{key:"drawLineString",value:function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),tt(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var t=this.context_,n=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(n,0,n.length,e.getStride(),!1),t.stroke()}if(""!==this.text_){var i=e.getFlatMidpoint();this.drawText_(i,0,2,2)}}}},{key:"drawMultiLineString",value:function(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var t=e.getExtent();if(tt(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=e.getFlatCoordinates(),r=0,a=e.getEnds(),o=e.getStride();n.beginPath();for(var s=0,l=a.length;s<l;++s)r=this.moveToLineTo_(i,r,a[s],o,!1);n.stroke()}if(""!==this.text_){var u=e.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}}},{key:"drawPolygon",value:function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),tt(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(""!==this.text_){var n=e.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}}},{key:"drawMultiPolygon",value:function(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),tt(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var t=this.context_,n=e.getOrientedFlatCoordinates(),i=0,r=e.getEndss(),a=e.getStride();t.beginPath();for(var o=0,s=r.length;o<s;++o){var l=r[o];i=this.drawRings_(n,i,l,a)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(""!==this.text_){var u=e.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}}},{key:"setContextFillState_",value:function(e){var t=this.context_,n=this.contextFillState_;n?n.fillStyle!=e.fillStyle&&(n.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}},{key:"setContextStrokeState_",value:function(e){var t=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=e.lineCap&&(n.lineCap=e.lineCap,t.lineCap=e.lineCap),E(n.lineDash,e.lineDash)||t.setLineDash(n.lineDash=e.lineDash),n.lineDashOffset!=e.lineDashOffset&&(n.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),n.lineJoin!=e.lineJoin&&(n.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),n.lineWidth!=e.lineWidth&&(n.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),n.miterLimit!=e.miterLimit&&(n.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),n.strokeStyle!=e.strokeStyle&&(n.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}},{key:"setContextTextState_",value:function(e){var t=this.context_,n=this.contextTextState_,i=e.textAlign?e.textAlign:yr;n?(n.font!=e.font&&(n.font=e.font,t.font=e.font),n.textAlign!=i&&(n.textAlign=i,t.textAlign=i),n.textBaseline!=e.textBaseline&&(n.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=i,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:i,textBaseline:e.textBaseline})}},{key:"setFillStrokeStyle",value:function(e,t){var n=this;if(e){var i=e.getColor();this.fillState_={fillStyle:os(i||fr)}}else this.fillState_=null;if(t){var r=t.getColor(),a=t.getLineCap(),o=t.getLineDash(),s=t.getLineDashOffset(),l=t.getLineJoin(),u=t.getWidth(),c=t.getMiterLimit(),h=o||vr;this.strokeState_={lineCap:void 0!==a?a:dr,lineDash:1===this.pixelRatio_?h:h.map((function(e){return e*n.pixelRatio_})),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==l?l:gr,lineWidth:(void 0!==u?u:1)*this.pixelRatio_,miterLimit:void 0!==c?c:10,strokeStyle:os(r||pr)}}else this.strokeState_=null}},{key:"setImageStyle",value:function(e){var t;if(e&&(t=e.getSize())){var n=e.getPixelRatio(this.pixelRatio_),i=e.getAnchor(),r=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*n,this.imageAnchorY_=i[1]*n,this.imageHeight_=t[1]*n,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();var a=e.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=t[0]*n}else this.image_=null}},{key:"setTextStyle",value:function(e){if(e){var t=e.getFill();if(t){var n=t.getColor();this.textFillState_={fillStyle:os(n||fr)}}else this.textFillState_=null;var i=e.getStroke();if(i){var r=i.getColor(),a=i.getLineCap(),o=i.getLineDash(),s=i.getLineDashOffset(),l=i.getLineJoin(),u=i.getWidth(),c=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==a?a:dr,lineDash:o||vr,lineDashOffset:s||0,lineJoin:void 0!==l?l:gr,lineWidth:void 0!==u?u:1,miterLimit:void 0!==c?c:10,strokeStyle:os(r||pr)}}else this.textStrokeState_=null;var h=e.getFont(),f=e.getOffsetX(),d=e.getOffsetY(),v=e.getRotateWithView(),g=e.getRotation(),p=e.getScaleArray(),y=e.getText(),m=e.getTextAlign(),_=e.getTextBaseline();this.textState_={font:void 0!==h?h:hr,textAlign:void 0!==m?m:yr,textBaseline:void 0!==_?_:mr},this.text_=void 0!==y?Array.isArray(y)?y.reduce((function(e,t,n){return e+(n%2?" ":t)}),""):y:"",this.textOffsetX_=void 0!==f?this.pixelRatio_*f:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==v&&v,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*p[0],this.pixelRatio_*p[1]]}else this.text_=""}}]),n}(zs),yl=pl,ml=.5;var _l=.5,kl={Point:function(e,t,n,i,r){var a,o=n.getImage(),s=n.getText();if(o){if(o.getImageState()!=ro)return;var l=e;if(r){var u=o.getDeclutterMode();if("none"!==u)if(l=r,"obstacle"===u){var c=e.getBuilder(n.getZIndex(),"Image");c.setImageStyle(o,a),c.drawPoint(t,i)}else s&&s.getText()&&(a={})}var h=l.getBuilder(n.getZIndex(),"Image");h.setImageStyle(o,a),h.drawPoint(t,i)}if(s&&s.getText()){var f=e;r&&(f=r);var d=f.getBuilder(n.getZIndex(),"Text");d.setTextStyle(s,a),d.drawText(t,i)}},LineString:function(e,t,n,i,r){var a=n.getStroke();if(a){var o=e.getBuilder(n.getZIndex(),"LineString");o.setFillStrokeStyle(null,a),o.drawLineString(t,i)}var s=n.getText();if(s&&s.getText()){var l=(r||e).getBuilder(n.getZIndex(),"Text");l.setTextStyle(s),l.drawText(t,i)}},Polygon:function(e,t,n,i,r){var a=n.getFill(),o=n.getStroke();if(a||o){var s=e.getBuilder(n.getZIndex(),"Polygon");s.setFillStrokeStyle(a,o),s.drawPolygon(t,i)}var l=n.getText();if(l&&l.getText()){var u=(r||e).getBuilder(n.getZIndex(),"Text");u.setTextStyle(l),u.drawText(t,i)}},MultiPoint:function(e,t,n,i,r){var a,o=n.getImage(),s=n.getText();if(o){if(o.getImageState()!=ro)return;var l=e;if(r){var u=o.getDeclutterMode();if("none"!==u)if(l=r,"obstacle"===u){var c=e.getBuilder(n.getZIndex(),"Image");c.setImageStyle(o,a),c.drawMultiPoint(t,i)}else s&&s.getText()&&(a={})}var h=l.getBuilder(n.getZIndex(),"Image");h.setImageStyle(o,a),h.drawMultiPoint(t,i)}if(s&&s.getText()){var f=e;r&&(f=r);var d=f.getBuilder(n.getZIndex(),"Text");d.setTextStyle(s,a),d.drawText(t,i)}},MultiLineString:function(e,t,n,i,r){var a=n.getStroke();if(a){var o=e.getBuilder(n.getZIndex(),"LineString");o.setFillStrokeStyle(null,a),o.drawMultiLineString(t,i)}var s=n.getText();if(s&&s.getText()){var l=(r||e).getBuilder(n.getZIndex(),"Text");l.setTextStyle(s),l.drawText(t,i)}},MultiPolygon:function(e,t,n,i,r){var a=n.getFill(),o=n.getStroke();if(o||a){var s=e.getBuilder(n.getZIndex(),"Polygon");s.setFillStrokeStyle(a,o),s.drawMultiPolygon(t,i)}var l=n.getText();if(l&&l.getText()){var u=(r||e).getBuilder(n.getZIndex(),"Text");u.setTextStyle(l),u.drawText(t,i)}},GeometryCollection:function(e,t,n,i,r){var a,o,s=t.getGeometriesArray();for(a=0,o=s.length;a<o;++a){(0,kl[s[a].getType()])(e,s[a],n,i,r)}},Circle:function(e,t,n,i,r){var a=n.getFill(),o=n.getStroke();if(a||o){var s=e.getBuilder(n.getZIndex(),"Circle");s.setFillStrokeStyle(a,o),s.drawCircle(t,i)}var l=n.getText();if(l&&l.getText()){var u=(r||e).getBuilder(n.getZIndex(),"Text");u.setTextStyle(l),u.drawText(t,i)}}};function xl(e,t){return parseInt($(e),10)-parseInt($(t),10)}function bl(e,t){return _l*e/t}function wl(e,t,n,i,r,a,o){var s=!1,l=n.getImage();if(l){var u=l.getImageState();u==ro||u==ao?l.unlistenImageChange(r):(u==no&&l.load(),l.listenImageChange(r),s=!0)}return function(e,t,n,i,r,a){var o=n.getGeometryFunction()(t);if(!o)return;var s=o.simplifyTransformed(i,r),l=n.getRenderer();if(l)Sl(e,s,n,t);else{(0,kl[s.getType()])(e,s,n,t,a)}}(e,t,n,i,a,o),s}function Sl(e,t,n,i){if("GeometryCollection"!=t.getType())e.getBuilder(n.getZIndex(),"Default").drawCustom(t,i,n.getRenderer(),n.getHitDetectionRenderer());else for(var r=t.getGeometries(),a=0,o=r.length;a<o;++a)Sl(e,r[a],n,i)}var Cl=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this,e)).boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(h(i)),i.animatingOrInteracting_,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=[1/0,1/0,-1/0,-1/0],i.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],i.renderedRotation_,i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i.compositionContext_=null,i.opacity_=1,i}return c(n,[{key:"renderWorlds",value:function(e,t,n){var i=t.extent,r=t.viewState,a=r.center,o=r.resolution,s=r.projection,l=r.rotation,u=s.getExtent(),c=this.getLayer().getSource(),h=t.pixelRatio,f=t.viewHints,d=!(f[Wt]||f[Bt]),v=this.compositionContext_,g=Math.round(t.size[0]*h),p=Math.round(t.size[1]*h),y=c.getWrapX()&&s.canWrapX(),m=y?et(u):null,_=y?Math.ceil((i[2]-u[2])/m)+1:1,k=y?Math.floor((i[0]-u[0])/m):0;do{var x=this.getRenderTransform(a,o,l,h,g,p,k*m);e.execute(v,1,x,l,d,void 0,n)}while(++k<_)}},{key:"setupCompositionContext_",value:function(){if(1!==this.opacity_){var e=or(this.context.canvas.width,this.context.canvas.height,so);this.compositionContext_=e}else this.compositionContext_=this.context}},{key:"releaseCompositionContext_",value:function(){if(1!==this.opacity_){var e=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=e,sr(this.compositionContext_),so.push(this.compositionContext_.canvas),this.compositionContext_=null}}},{key:"renderDeclutter",value:function(e){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree),this.releaseCompositionContext_())}},{key:"renderFrame",value:function(e,t){var n=e.pixelRatio,i=e.layerStatesArray[e.layerIndex];!function(e,t,n){_e(e,t,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),be(this.inversePixelTransform,this.pixelTransform);var r=we(this.pixelTransform);this.useContainer(t,r,this.getBackground(e));var a=this.context,o=a.canvas,s=this.replayGroup_,l=this.declutterExecutorGroup;if((!s||s.isEmpty())&&(!l||l.isEmpty()))return null;var u=Math.round(e.size[0]*n),c=Math.round(e.size[1]*n);o.width!=u||o.height!=c?(o.width=u,o.height=c,o.style.transform!==r&&(o.style.transform=r)):this.containerReused||a.clearRect(0,0,u,c),this.preRender(a,e);var h=e.viewState,f=h.projection;this.opacity_=i.opacity,this.setupCompositionContext_();var d=!1,v=!0;if(i.extent&&this.clipping){var g=zn(i.extent,f);(d=(v=tt(g,e.extent))&&!Ie(g,e.extent))&&this.clipUnrotated(this.compositionContext_,e,g)}return v&&this.renderWorlds(s,e),d&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(a,e),this.renderedRotation_!==h.rotation&&(this.renderedRotation_=h.rotation,this.hitDetectionImageData_=null),this.container}},{key:"getFeatures",value:function(e){var t=this;return new Promise((function(n){if(!t.hitDetectionImageData_&&!t.animatingOrInteracting_){var i=[t.context.canvas.width,t.context.canvas.height];ke(t.pixelTransform,i);var r=t.renderedCenter_,a=t.renderedResolution_,o=t.renderedRotation_,s=t.renderedProjection_,l=t.wrappedRenderedExtent_,u=t.getLayer(),c=[],h=i[0]*ml,f=i[1]*ml;c.push(t.getRenderTransform(r,a,o,ml,h,f,0).slice());var d=u.getSource(),v=s.getExtent();if(d.getWrapX()&&s.canWrapX()&&!Ie(v,l)){for(var g,p=l[0],y=et(v),m=0;p<v[0];)g=y*--m,c.push(t.getRenderTransform(r,a,o,ml,h,f,g).slice()),p+=y;for(m=0,p=l[2];p>v[2];)g=y*++m,c.push(t.getRenderTransform(r,a,o,ml,h,f,g).slice()),p-=y}t.hitDetectionImageData_=function(e,t,n,i,r,a,o){var s=or(e[0]*ml,e[1]*ml);s.imageSmoothingEnabled=!1;for(var l=s.canvas,u=new yl(s,ml,r,null,o),c=n.length,h=Math.floor(16777215/c),f={},d=1;d<=c;++d){var v=n[d-1],g=v.getStyleFunction()||i;if(i){var p=g(v,a);if(p){Array.isArray(p)||(p=[p]);for(var y=(d*h).toString(16).padStart(7,"#00000"),m=0,_=p.length;m<_;++m){var k=p[m],x=k.getGeometryFunction()(v);if(x&&tt(r,x.getExtent())){var w=k.clone(),S=w.getFill();S&&S.setColor(y);var C=w.getStroke();C&&(C.setColor(y),C.setLineDash(null)),w.setText(void 0);var E=k.getImage();if(E&&0!==E.getOpacity()){var T=E.getImageSize();if(!T)continue;var R=or(T[0],T[1],void 0,{alpha:!1}),P=R.canvas;R.fillStyle=y,R.fillRect(0,0,P.width,P.height),w.setImage(new bs({img:P,imgSize:T,anchor:E.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:E.getOrigin(),opacity:1,size:E.getSize(),scale:E.getScale(),rotation:E.getRotation(),rotateWithView:E.getRotateWithView()}))}var I=w.getZIndex()||0,F=f[I];F||(F={},f[I]=F,F.Polygon=[],F.Circle=[],F.LineString=[],F.Point=[]);var M=x.getType();if("GeometryCollection"===M)for(var L=x.getGeometriesArrayRecursive(),O=0,A=L.length;O<A;++O){var D=L[O];F[D.getType().replace("Multi","")].push(D,w)}else F[M.replace("Multi","")].push(x,w)}}}}}for(var N=Object.keys(f).map(Number).sort(b),z=0,j=N.length;z<j;++z){var G=f[N[z]];for(var W in G)for(var B=G[W],U=0,X=B.length;U<X;U+=2){u.setStyle(B[U+1]);for(var V=0,Y=t.length;V<Y;++V)u.setTransform(t[V]),u.drawGeometry(B[U])}}return s.getImageData(0,0,l.width,l.height)}(i,c,t.renderedFeatures_,u.getStyleFunction(),l,a,o)}n(function(e,t,n){var i=[];if(n){var r=Math.floor(Math.round(e[0])*ml),a=Math.floor(Math.round(e[1])*ml),o=4*(at(r,0,n.width-1)+at(a,0,n.height-1)*n.width),s=n.data[o],l=n.data[o+1],u=n.data[o+2]+256*(l+256*s),c=Math.floor(16777215/t.length);u&&u%c===0&&i.push(t[u/c-1])}return i}(e,t.renderedFeatures_,t.hitDetectionImageData_))}))}},{key:"forEachFeatureAtCoordinate",value:function(e,t,n,i,r){var a=this;if(this.replayGroup_){var o,s=t.viewState.resolution,l=t.viewState.rotation,u=this.getLayer(),c={},h=function(e,t,n){var a=$(e),o=c[a];if(o){if(!0!==o&&n<o.distanceSq){if(0===n)return c[a]=!0,r.splice(r.lastIndexOf(o),1),i(e,u,t);o.geometry=t,o.distanceSq=n}}else{if(0===n)return c[a]=!0,i(e,u,t);r.push(c[a]={feature:e,layer:u,geometry:t,distanceSq:n,callback:i})}},f=[this.replayGroup_];return this.declutterExecutorGroup&&f.push(this.declutterExecutorGroup),f.some((function(i){return o=i.forEachFeatureAtCoordinate(e,s,l,n,h,i===a.declutterExecutorGroup&&t.declutterTree?t.declutterTree.all().map((function(e){return e.value})):null)})),o}}},{key:"handleFontsChanged",value:function(){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}},{key:"handleStyleImageChange_",value:function(e){this.renderIfReadyAndVisible()}},{key:"prepareFrame",value:function(e){var t=this,n=this.getLayer(),i=n.getSource();if(!i)return!1;var r=e.viewHints[Wt],a=e.viewHints[Bt],o=n.getUpdateWhileAnimating(),s=n.getUpdateWhileInteracting();if(this.ready&&!o&&r||!s&&a)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var l=e.extent,u=e.viewState,c=u.projection,h=u.resolution,f=e.pixelRatio,d=n.getRevision(),v=n.getRenderBuffer(),g=n.getRenderOrder();void 0===g&&(g=xl);var p=u.center.slice(),y=Ee(l,v*h),m=y.slice(),_=[y.slice()],k=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!Ie(k,e.extent)){var x=et(k),b=Math.max(et(y)/2,x);y[0]=k[0]-b,y[2]=k[2]+b,dn(p,c);var w=rt(_[0],c);w[0]<k[0]&&w[2]<k[2]?_.push([w[0]+x,w[1],w[2]+x,w[3]]):w[0]>k[0]&&w[2]>k[2]&&_.push([w[0]-x,w[1],w[2]-x,w[3]])}if(this.ready&&this.renderedResolution_==h&&this.renderedRevision_==d&&this.renderedRenderOrder_==g&&Ie(this.wrappedRenderedExtent_,y))return E(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var S,C=new $s(bl(h,f),y,h,f);this.getLayer().getDeclutter()&&(S=new $s(bl(h,f),y,h,f));var T,R=On();if(R){for(var P=0,I=_.length;P<I;++P){var F=Nn(_[P],c);i.loadFeatures(F,jn(h,c),R)}T=Pn(R,c)}else for(var M=0,L=_.length;M<L;++M)i.loadFeatures(_[M],h,c);var O=function(e,t){var n=bl(e,t);return n*n}(h,f),A=!0,D=function(e){var i,r=e.getStyleFunction()||n.getStyleFunction();if(r&&(i=r(e,h)),i){var a=t.renderFeature(e,O,i,C,T,S);A=A&&!a}},N=Nn(y,c),z=i.getFeaturesInExtent(N);g&&z.sort(g);for(var j=0,G=z.length;j<G;++j)D(z[j]);this.renderedFeatures_=z,this.ready=A;var W=C.finish(),B=new gl(y,h,f,i.getOverlaps(),W,n.getRenderBuffer());return S&&(this.declutterExecutorGroup=new gl(y,h,f,i.getOverlaps(),S.finish(),n.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=d,this.renderedRenderOrder_=g,this.renderedExtent_=m,this.wrappedRenderedExtent_=y,this.renderedCenter_=p,this.renderedProjection_=c,this.replayGroup_=B,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}},{key:"renderFeature",value:function(e,t,n,i,r,a){if(!n)return!1;var o=!1;if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)o=wl(i,e,n[s],t,this.boundHandleStyleImageChange_,r,a)||o;else o=wl(i,e,n,t,this.boundHandleStyleImageChange_,r,a);return o}}]),n}(co),El=Cl,Tl=function(e){g(n,e);var t=m(n);function n(e){return o(this,n),t.call(this,e)}return c(n,[{key:"createRenderer",value:function(){return new El(this)}}]),n}(Fs),Rl=function(){function e(t){o(this,e),this.rbush_=new is(t),this.items_={}}return c(e,[{key:"insert",value:function(e,t){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(n),this.items_[$(t)]=n}},{key:"load",value:function(e,t){for(var n=new Array(t.length),i=0,r=t.length;i<r;i++){var a=e[i],o=t[i],s={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:o};n[i]=s,this.items_[$(o)]=s}this.rbush_.load(n)}},{key:"remove",value:function(e){var t=$(e),n=this.items_[t];return delete this.items_[t],null!==this.rbush_.remove(n)}},{key:"update",value:function(e,t){var n=this.items_[$(t)];Ne([n.minX,n.minY,n.maxX,n.maxY],e)||(this.remove(t),this.insert(e,t))}},{key:"getAll",value:function(){return this.rbush_.all().map((function(e){return e.value}))}},{key:"getInExtent",value:function(e){var t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map((function(e){return e.value}))}},{key:"forEach",value:function(e){return this.forEach_(this.getAll(),e)}},{key:"forEachInExtent",value:function(e,t){return this.forEach_(this.getInExtent(e),t)}},{key:"forEach_",value:function(e,t){for(var n,i=0,r=e.length;i<r;i++)if(n=t(e[i]))return n;return n}},{key:"isEmpty",value:function(){return F(this.items_)}},{key:"clear",value:function(){this.rbush_.clear(),this.items_={}}},{key:"getExtent",value:function(e){var t=this.rbush_.toJSON();return Oe(t.minX,t.minY,t.maxX,t.maxY,e)}},{key:"concat",value:function(e){for(var t in this.rbush_.load(e.rbush_.all()),e.items_)this.items_[t]=e.items_[t]}}]),e}(),Pl=Rl,Il="addfeature",Fl="changefeature",Ml="clear",Ll="removefeature",Ol="featuresloadstart",Al="featuresloadend",Dl="featuresloaderror";function Nl(e,t){return[[-1/0,-1/0,1/0,1/0]]}var zl=!1;function jl(e,t){return function(n,i,r,a,o){var s=this;!function(e,t,n,i,r,a,o){var s=new XMLHttpRequest;s.open("GET","function"===typeof e?e(n,i,r):e,!0),"arraybuffer"==t.getType()&&(s.responseType="arraybuffer"),s.withCredentials=zl,s.onload=function(e){if(!s.status||s.status>=200&&s.status<300){var i,l=t.getType();"json"==l||"text"==l?i=s.responseText:"xml"==l?(i=s.responseXML)||(i=(new DOMParser).parseFromString(s.responseText,"application/xml")):"arraybuffer"==l&&(i=s.response),i?a(t.readFeatures(i,{extent:n,featureProjection:r}),t.readProjection(i)):o()}else o()},s.onerror=o,s.send()}(e,t,n,i,r,(function(e,t){s.addFeatures(e),void 0!==a&&a(e)}),o||P)}}var Gl=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;return o(this,n),(a=t.call(this,e)).feature=i,a.features=r,a}return c(n)}(_),Wl=function(e){g(n,e);var t=m(n);function n(e){var i;o(this,n),e=e||{},(i=t.call(this,{attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===e.wrapX||e.wrapX})).on,i.once,i.un,i.loader_=P,i.format_=e.format,i.overlaps_=void 0===e.overlaps||e.overlaps,i.url_=e.url,void 0!==e.loader?i.loader_=e.loader:void 0!==i.url_&&(ye(i.format_,7),i.loader_=jl(i.url_,i.format_)),i.strategy_=void 0!==e.strategy?e.strategy:Nl;var r,a,s=void 0===e.useSpatialIndex||e.useSpatialIndex;return i.featuresRtree_=s?new Pl:null,i.loadedExtentsRtree_=new Pl,i.loadingExtentsCount_=0,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(e.features)?a=e.features:e.features&&(a=(r=e.features).getArray()),s||void 0!==r||(r=new le(a)),void 0!==a&&i.addFeaturesInternal(a),void 0!==r&&i.bindFeaturesCollection_(r),i}return c(n,[{key:"addFeature",value:function(e){this.addFeatureInternal(e),this.changed()}},{key:"addFeatureInternal",value:function(e){var t=$(e);if(this.addToIndex_(t,e)){this.setupChangeEvents_(t,e);var n=e.getGeometry();if(n){var i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new Gl(Il,e))}else this.featuresCollection_&&this.featuresCollection_.remove(e)}},{key:"setupChangeEvents_",value:function(e,t){this.featureChangeKeys_[e]=[X(t,O,this.handleFeatureChange_,this),X(t,k,this.handleFeatureChange_,this)]}},{key:"addToIndex_",value:function(e,t){var n=!0,i=t.getId();return void 0!==i&&(i.toString()in this.idIndex_?n=!1:this.idIndex_[i.toString()]=t),n&&(ye(!(e in this.uidIndex_),30),this.uidIndex_[e]=t),n}},{key:"addFeatures",value:function(e){this.addFeaturesInternal(e),this.changed()}},{key:"addFeaturesInternal",value:function(e){for(var t=[],n=[],i=[],r=0,a=e.length;r<a;r++){var o=e[r],s=$(o);this.addToIndex_(s,o)&&n.push(o)}for(var l=0,u=n.length;l<u;l++){var c=n[l],h=$(c);this.setupChangeEvents_(h,c);var f=c.getGeometry();if(f){var d=f.getExtent();t.push(d),i.push(c)}else this.nullGeometryFeatures_[h]=c}if(this.featuresRtree_&&this.featuresRtree_.load(t,i),this.hasListener(Il))for(var v=0,g=n.length;v<g;v++)this.dispatchEvent(new Gl(Il,n[v]))}},{key:"bindFeaturesCollection_",value:function(e){var t=this,n=!1;this.addEventListener(Il,(function(t){n||(n=!0,e.push(t.feature),n=!1)})),this.addEventListener(Ll,(function(t){n||(n=!0,e.remove(t.feature),n=!1)})),e.addEventListener(re,(function(e){n||(n=!0,t.addFeature(e.element),n=!1)})),e.addEventListener(ae,(function(e){n||(n=!0,t.removeFeature(e.element),n=!1)})),this.featuresCollection_=e}},{key:"clear",value:function(e){var t=this;if(e){for(var n in this.featureChangeKeys_){this.featureChangeKeys_[n].forEach(Y)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){for(var i in this.featuresRtree_.forEach((function(e){t.removeFeatureInternal(e)})),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var r=new Gl(Ml);this.dispatchEvent(r),this.changed()}},{key:"forEachFeature",value:function(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}},{key:"forEachFeatureAtCoordinateDirect",value:function(e,t){var n=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(n,(function(n){if(n.getGeometry().intersectsCoordinate(e))return t(n)}))}},{key:"forEachFeatureInExtent",value:function(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}},{key:"forEachFeatureIntersectingExtent",value:function(e,t){return this.forEachFeatureInExtent(e,(function(n){if(n.getGeometry().intersectsExtent(e)){var i=t(n);if(i)return i}}))}},{key:"getFeaturesCollection",value:function(){return this.featuresCollection_}},{key:"getFeatures",value:function(){var e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),F(this.nullGeometryFeatures_)||C(e,Object.values(this.nullGeometryFeatures_))),e}},{key:"getFeaturesAtCoordinate",value:function(e){var t=[];return this.forEachFeatureAtCoordinateDirect(e,(function(e){t.push(e)})),t}},{key:"getFeaturesInExtent",value:function(e,t){var n=this;if(this.featuresRtree_){var i;if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);var r=function(e,t){if(t.canWrapX()){var n=t.getExtent();if(!isFinite(e[0])||!isFinite(e[2]))return[[n[0],e[1],n[2],e[3]]];rt(e,t);var i=et(n);if(et(e)>i)return[[n[0],e[1],n[2],e[3]]];if(e[0]<n[0])return[[e[0]+i,e[1],n[2],e[3]],[n[0],e[1],e[2],e[3]]];if(e[2]>n[2])return[[e[0],e[1],n[2],e[3]],[n[0],e[1],e[2]-i,e[3]]]}return[e]}(e,t);return(i=[]).concat.apply(i,Js(r.map((function(e){return n.featuresRtree_.getInExtent(e)}))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}},{key:"getClosestFeatureToCoordinate",value:function(e,t){var n=e[0],i=e[1],r=null,a=[NaN,NaN],o=1/0,s=[-1/0,-1/0,1/0,1/0];return t=t||T,this.featuresRtree_.forEachInExtent(s,(function(e){if(t(e)){var l=e.getGeometry(),u=o;if((o=l.closestPointXY(n,i,a,o))<u){r=e;var c=Math.sqrt(o);s[0]=n-c,s[1]=i-c,s[2]=n+c,s[3]=i+c}}})),r}},{key:"getExtent",value:function(e){return this.featuresRtree_.getExtent(e)}},{key:"getFeatureById",value:function(e){var t=this.idIndex_[e.toString()];return void 0!==t?t:null}},{key:"getFeatureByUid",value:function(e){var t=this.uidIndex_[e];return void 0!==t?t:null}},{key:"getFormat",value:function(){return this.format_}},{key:"getOverlaps",value:function(){return this.overlaps_}},{key:"getUrl",value:function(){return this.url_}},{key:"handleFeatureChange_",value:function(e){var t=e.target,n=$(t),i=t.getGeometry();if(i){var r=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(r,t)):this.featuresRtree_&&this.featuresRtree_.update(r,t)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[n]=t);var a=t.getId();if(void 0!==a){var o=a.toString();this.idIndex_[o]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[o]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[n]=t;this.changed(),this.dispatchEvent(new Gl(Fl,t))}},{key:"hasFeature",value:function(e){var t=e.getId();return void 0!==t?t in this.idIndex_:$(e)in this.uidIndex_}},{key:"isEmpty",value:function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&F(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}},{key:"loadFeatures",value:function(e,t,n){for(var i=this,r=this.loadedExtentsRtree_,a=this.strategy_(e,t,n),o=function(){var e=a[s];r.forEachInExtent(e,(function(t){return Ie(t.extent,e)}))||(++i.loadingExtentsCount_,i.dispatchEvent(new Gl(Ol)),i.loader_.call(i,e,t,n,(function(e){--i.loadingExtentsCount_,i.dispatchEvent(new Gl(Al,void 0,e))}),(function(){--i.loadingExtentsCount_,i.dispatchEvent(new Gl(Dl))})),r.insert(e,{extent:e.slice()}))},s=0,l=a.length;s<l;++s)o();this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}},{key:"refresh",value:function(){this.clear(!0),this.loadedExtentsRtree_.clear(),d(f(n.prototype),"refresh",this).call(this)}},{key:"removeLoadedExtent",value:function(e){var t,n=this.loadedExtentsRtree_;n.forEachInExtent(e,(function(n){if(Ne(n.extent,e))return t=n,!0})),t&&n.remove(t)}},{key:"removeFeature",value:function(e){if(e){var t=$(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}}},{key:"removeFeatureInternal",value:function(e){var t=$(e),n=this.featureChangeKeys_[t];if(n){n.forEach(Y),delete this.featureChangeKeys_[t];var i=e.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[t],this.dispatchEvent(new Gl(Ll,e)),e}}},{key:"removeFromIdIndex_",value:function(e){var t=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===e){delete this.idIndex_[n],t=!0;break}return t}},{key:"setLoader",value:function(e){this.loader_=e}},{key:"setUrl",value:function(e){ye(this.format_,7),this.url_=e,this.setLoader(jl(e,this.format_))}}]),n}(Bo),Bl=function(e){g(n,e);var t=m(n);function n(e){var i;if(o(this,n),(i=t.call(this)).on,i.once,i.un,i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addChangeListener(i.geometryName_,i.handleGeometryChanged_),e)if("function"===typeof e.getSimplifiedGeometry){var r=e;i.setGeometry(r)}else{var a=e;i.setProperties(a)}return i}return c(n,[{key:"clone",value:function(){var e=new n(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var i=this.getStyle();return i&&e.setStyle(i),e}},{key:"getGeometry",value:function(){return this.get(this.geometryName_)}},{key:"getId",value:function(){return this.id_}},{key:"getGeometryName",value:function(){return this.geometryName_}},{key:"getStyle",value:function(){return this.style_}},{key:"getStyleFunction",value:function(){return this.styleFunction_}},{key:"handleGeometryChange_",value:function(){this.changed()}},{key:"handleGeometryChanged_",value:function(){this.geometryChangeKey_&&(Y(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=X(e,O,this.handleGeometryChange_,this)),this.changed()}},{key:"setGeometry",value:function(e){this.set(this.geometryName_,e)}},{key:"setStyle",value:function(e){this.style_=e,this.styleFunction_=e?function(e){if("function"===typeof e)return e;var t;if(Array.isArray(e))t=e;else{ye("function"===typeof e.getZIndex,41),t=[e]}return function(){return t}}(e):void 0,this.changed()}},{key:"setId",value:function(e){this.id_=e,this.changed()}},{key:"setGeometryName",value:function(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}]),n}(Q);var Ul=Bl;function Xl(e){for(var t=[],n=0,i=e.length;n<i;++n)t.push(e[n].clone());return t}var Vl=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),(i=t.call(this)).geometries_=e||null,i.changeEventsKeys_=[],i.listenGeometriesChange_(),i}return c(n,[{key:"unlistenGeometriesChange_",value:function(){this.changeEventsKeys_.forEach(Y),this.changeEventsKeys_.length=0}},{key:"listenGeometriesChange_",value:function(){if(this.geometries_)for(var e=0,t=this.geometries_.length;e<t;++e)this.changeEventsKeys_.push(X(this.geometries_[e],O,this.changed,this))}},{key:"clone",value:function(){var e=new n(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e}},{key:"closestPointXY",value:function(e,t,n,i){if(i<Re(this.getExtent(),e,t))return i;for(var r=this.geometries_,a=0,o=r.length;a<o;++a)i=r[a].closestPointXY(e,t,n,i);return i}},{key:"containsXY",value:function(e,t){for(var n=this.geometries_,i=0,r=n.length;i<r;++i)if(n[i].containsXY(e,t))return!0;return!1}},{key:"computeExtent",value:function(e){Ae(e);for(var t=this.geometries_,n=0,i=t.length;n<i;++n)ze(e,t[n].getExtent());return e}},{key:"getGeometries",value:function(){return Xl(this.geometries_)}},{key:"getGeometriesArray",value:function(){return this.geometries_}},{key:"getGeometriesArrayRecursive",value:function(){for(var e=[],t=this.geometries_,n=0,i=t.length;n<i;++n)t[n].getType()===this.getType()?e=e.concat(t[n].getGeometriesArrayRecursive()):e.push(t[n]);return e}},{key:"getSimplifiedGeometry",value:function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var t=[],i=this.geometries_,r=!1,a=0,o=i.length;a<o;++a){var s=i[a],l=s.getSimplifiedGeometry(e);t.push(l),l!==s&&(r=!0)}if(r){var u=new n(null);return u.setGeometriesArray(t),u}return this.simplifiedGeometryMaxMinSquaredTolerance=e,this}},{key:"getType",value:function(){return"GeometryCollection"}},{key:"intersectsExtent",value:function(e){for(var t=this.geometries_,n=0,i=t.length;n<i;++n)if(t[n].intersectsExtent(e))return!0;return!1}},{key:"isEmpty",value:function(){return 0===this.geometries_.length}},{key:"rotate",value:function(e,t){for(var n=this.geometries_,i=0,r=n.length;i<r;++i)n[i].rotate(e,t);this.changed()}},{key:"scale",value:function(e,t,n){n||(n=Ye(this.getExtent()));for(var i=this.geometries_,r=0,a=i.length;r<a;++r)i[r].scale(e,t,n);this.changed()}},{key:"setGeometries",value:function(e){this.setGeometriesArray(Xl(e))}},{key:"setGeometriesArray",value:function(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}},{key:"applyTransform",value:function(e){for(var t=this.geometries_,n=0,i=t.length;n<i;++n)t[n].applyTransform(e);this.changed()}},{key:"translate",value:function(e,t){for(var n=this.geometries_,i=0,r=n.length;i<r;++i)n[i].translate(e,t);this.changed()}},{key:"disposeInternal",value:function(){this.unlistenGeometriesChange_(),d(f(n.prototype),"disposeInternal",this).call(this)}}]),n}(ti);function Yl(e,t,n){var i,r=n?Sn(n.featureProjection):null,a=n?Sn(n.dataProjection):null;if(i=r&&a&&!Rn(r,a)?(t?e.clone():e).transform(t?r:a,t?a:r):e,t&&n&&void 0!==n.decimals){var o=Math.pow(10,n.decimals);i===e&&(i=e.clone()),i.applyTransform((function(e){for(var t=0,n=e.length;t<n;++t)e[t]=Math.round(e[t]*o)/o;return e}))}return i}function Kl(e){if("string"===typeof e){var t=JSON.parse(e);return t||null}return null!==e?e:null}var Hl=function(e){g(n,e);var t=m(n);function n(){return o(this,n),t.call(this)}return c(n,[{key:"getType",value:function(){return"json"}},{key:"readFeature",value:function(e,t){return this.readFeatureFromObject(Kl(e),this.getReadOptions(e,t))}},{key:"readFeatures",value:function(e,t){return this.readFeaturesFromObject(Kl(e),this.getReadOptions(e,t))}},{key:"readFeatureFromObject",value:function(e,t){return Z()}},{key:"readFeaturesFromObject",value:function(e,t){return Z()}},{key:"readGeometry",value:function(e,t){return this.readGeometryFromObject(Kl(e),this.getReadOptions(e,t))}},{key:"readGeometryFromObject",value:function(e,t){return Z()}},{key:"readProjection",value:function(e){return this.readProjectionFromObject(Kl(e))}},{key:"readProjectionFromObject",value:function(e){return Z()}},{key:"writeFeature",value:function(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}},{key:"writeFeatureObject",value:function(e,t){return Z()}},{key:"writeFeatures",value:function(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}},{key:"writeFeaturesObject",value:function(e,t){return Z()}},{key:"writeGeometry",value:function(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}},{key:"writeGeometryObject",value:function(e,t){return Z()}}]),n}(function(){function e(){o(this,e),this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return c(e,[{key:"getReadOptions",value:function(e,t){if(t){var n=t.dataProjection?Sn(t.dataProjection):this.readProjection(e);t.extent&&n&&"tile-pixels"===n.getUnits()&&(n=Sn(n)).setWorldExtent(t.extent),t={dataProjection:n,featureProjection:t.featureProjection}}return this.adaptOptions(t)}},{key:"adaptOptions",value:function(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)}},{key:"getType",value:function(){return Z()}},{key:"readFeature",value:function(e,t){return Z()}},{key:"readFeatures",value:function(e,t){return Z()}},{key:"readGeometry",value:function(e,t){return Z()}},{key:"readProjection",value:function(e){return Z()}},{key:"writeFeature",value:function(e,t){return Z()}},{key:"writeFeatures",value:function(e,t){return Z()}},{key:"writeGeometry",value:function(e,t){return Z()}}]),e}());function Zl(e,t,n,i,r,a,o){var s,l,u=(n-t)/i;if(1===u)s=t;else if(2===u)s=t,l=r;else if(0!==u){for(var c=e[t],h=e[t+1],f=0,d=[0],v=t+i;v<n;v+=i){var g=e[v],p=e[v+1];f+=Math.sqrt((g-c)*(g-c)+(p-h)*(p-h)),d.push(f),c=g,h=p}var y=r*f,m=function(e,t,n){var i,r;n=n||b;for(var a=0,o=e.length,s=!1;a<o;)(r=+n(e[i=a+(o-a>>1)],t))<0?a=i+1:(o=i,s=!r);return s?a:~a}(d,y);m<0?(l=(y-d[-m-2])/(d[-m-1]-d[-m-2]),s=t+(-m-2)*i):s=t+m*i}o=o>1?o:2,a=a||new Array(o);for(var _=0;_<o;++_)a[_]=void 0===s?NaN:void 0===l?e[s+_]:ct(e[s+_],e[s+i+_],l);return a}function ql(e,t,n,i,r,a){if(n==t)return null;var o;if(r<e[t+i-1])return a?((o=e.slice(t,t+i))[i-1]=r,o):null;if(e[n-1]<r)return a?((o=e.slice(n-i,n))[i-1]=r,o):null;if(r==e[t+i-1])return e.slice(t,t+i);for(var s=t/i,l=n/i;s<l;){var u=s+l>>1;r<e[(u+1)*i-1]?l=u:s=u+1}var c=e[s*i-1];if(r==c)return e.slice((s-1)*i,(s-1)*i+i);var h=(r-c)/(e[(s+1)*i-1]-c);o=[];for(var f=0;f<i-1;++f)o.push(ct(e[(s-1)*i+f],e[s*i+f],h));return o.push(r),o}var $l=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),(r=t.call(this)).flatMidpoint_=null,r.flatMidpointRevision_=-1,r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?r.setCoordinates(e,i):r.setFlatCoordinates(i,e),r}return c(n,[{key:"appendCoordinate",value:function(e){this.flatCoordinates?C(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()}},{key:"clone",value:function(){var e=new n(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}},{key:"closestPointXY",value:function(e,t,n,i){return i<Re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,n,i))}},{key:"forEachSegment",value:function(e){return Ii(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}},{key:"getCoordinateAtM",value:function(e,t){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(t=void 0!==t&&t,ql(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}},{key:"getCoordinates",value:function(){return yi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}},{key:"getCoordinateAt",value:function(e,t){return Zl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}},{key:"getLength",value:function(){return el(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}},{key:"getFlatMidpoint",value:function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}},{key:"getSimplifiedGeometryInternal",value:function(e){var t=[];return t.length=fi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new n(t,"XY")}},{key:"getType",value:function(){return"LineString"}},{key:"intersectsExtent",value:function(e){return Fi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ci(this.flatCoordinates,0,e,this.stride),this.changed()}}]),n}(ri),Jl=$l,Ql=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;if(o(this,n),(a=t.call(this)).ends_=[],a.maxDelta_=-1,a.maxDeltaRevision_=-1,Array.isArray(e[0]))a.setCoordinates(e,i);else if(void 0!==i&&r)a.setFlatCoordinates(i,e),a.ends_=r;else{for(var s=a.getLayout(),l=e,u=[],c=[],h=0,f=l.length;h<f;++h){var d=l[h];0===h&&(s=d.getLayout()),C(u,d.getFlatCoordinates()),c.push(u.length)}a.setFlatCoordinates(s,u),a.ends_=c}return a}return c(n,[{key:"appendLineString",value:function(e){this.flatCoordinates?C(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}},{key:"clone",value:function(){var e=new n(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}},{key:"closestPointXY",value:function(e,t,n,i){return i<Re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(si(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ui(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,n,i))}},{key:"getCoordinateAtM",value:function(e,t,n){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(t=void 0!==t&&t,n=void 0!==n&&n,function(e,t,n,i,r,a,o){if(o)return ql(e,t,n[n.length-1],i,r,a);var s;if(r<e[i-1])return a?((s=e.slice(0,i))[i-1]=r,s):null;if(e[e.length-1]<r)return a?((s=e.slice(e.length-i))[i-1]=r,s):null;for(var l=0,u=n.length;l<u;++l){var c=n[l];if(t!=c){if(r<e[t+i-1])return null;if(r<=e[c-1])return ql(e,t,c,i,r,!1);t=c}}return null}(this.flatCoordinates,0,this.ends_,this.stride,e,t,n))}},{key:"getCoordinates",value:function(){return mi(this.flatCoordinates,0,this.ends_,this.stride)}},{key:"getEnds",value:function(){return this.ends_}},{key:"getLineString",value:function(e){return e<0||this.ends_.length<=e?null:new Jl(this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e]),this.layout)}},{key:"getLineStrings",value:function(){for(var e=this.flatCoordinates,t=this.ends_,n=this.layout,i=[],r=0,a=0,o=t.length;a<o;++a){var s=t[a],l=new Jl(e.slice(r,s),n);i.push(l),r=s}return i}},{key:"getFlatMidpoints",value:function(){for(var e=[],t=this.flatCoordinates,n=0,i=this.ends_,r=this.stride,a=0,o=i.length;a<o;++a){var s=i[a];C(e,Zl(t,n,s,r,.5)),n=s}return e}},{key:"getSimplifiedGeometryInternal",value:function(e){var t=[],i=[];return t.length=di(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,i),new n(t,"XY",i)}},{key:"getType",value:function(){return"MultiLineString"}},{key:"intersectsExtent",value:function(e){return function(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a){if(Fi(e,t,n[a],i,r))return!0;t=n[a]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,e)}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=hi(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()}}]),n}(ri),eu=Ql,tu=function(e){g(n,e);var t=m(n);function n(e,i){var r;return o(this,n),r=t.call(this),i&&!Array.isArray(e[0])?r.setFlatCoordinates(i,e):r.setCoordinates(e,i),r}return c(n,[{key:"appendPoint",value:function(e){this.flatCoordinates?C(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()}},{key:"clone",value:function(){var e=new n(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}},{key:"closestPointXY",value:function(e,t,n,i){if(i<Re(this.getExtent(),e,t))return i;for(var r=this.flatCoordinates,a=this.stride,o=0,s=r.length;o<s;o+=a){var l=st(e,t,r[o],r[o+1]);if(l<i){i=l;for(var u=0;u<a;++u)n[u]=r[o+u];n.length=a}}return i}},{key:"getCoordinates",value:function(){return yi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}},{key:"getPoint",value:function(e){var t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||t<=e?null:new Ci(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}},{key:"getPoints",value:function(){for(var e=this.flatCoordinates,t=this.layout,n=this.stride,i=[],r=0,a=e.length;r<a;r+=n){var o=new Ci(e.slice(r,r+n),t);i.push(o)}return i}},{key:"getType",value:function(){return"MultiPoint"}},{key:"intersectsExtent",value:function(e){for(var t=this.flatCoordinates,n=this.stride,i=0,r=t.length;i<r;i+=n){if(Fe(e,t[i],t[i+1]))return!0}return!1}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ci(this.flatCoordinates,0,e,this.stride),this.changed()}}]),n}(ri),nu=tu;var iu=function(e){g(n,e);var t=m(n);function n(e,i,r){var a;if(o(this,n),(a=t.call(this)).endss_=[],a.flatInteriorPointsRevision_=-1,a.flatInteriorPoints_=null,a.maxDelta_=-1,a.maxDeltaRevision_=-1,a.orientedRevision_=-1,a.orientedFlatCoordinates_=null,!r&&!Array.isArray(e[0])){for(var s=a.getLayout(),l=e,u=[],c=[],h=0,f=l.length;h<f;++h){var d=l[h];0===h&&(s=d.getLayout());for(var v=u.length,g=d.getEnds(),p=0,y=g.length;p<y;++p)g[p]+=v;C(u,d.getFlatCoordinates()),c.push(g)}i=s,e=u,r=c}return void 0!==i&&r?(a.setFlatCoordinates(i,e),a.endss_=r):a.setCoordinates(e,i),a}return c(n,[{key:"appendPolygon",value:function(e){var t;if(this.flatCoordinates){var n=this.flatCoordinates.length;C(this.flatCoordinates,e.getFlatCoordinates());for(var i=0,r=(t=e.getEnds().slice()).length;i<r;++i)t[i]+=n}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()}},{key:"clone",value:function(){for(var e=this.endss_.length,t=new Array(e),i=0;i<e;++i)t[i]=this.endss_[i].slice();var r=new n(this.flatCoordinates.slice(),this.layout,t);return r.applyProperties(this),r}},{key:"closestPointXY",value:function(e,t,n,i){return i<Re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a){var s=n[a];r=si(e,t,s,i,r),t=s[s.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(e,t,n,i,r,a,o,s,l,u,c){c=c||[NaN,NaN];for(var h=0,f=n.length;h<f;++h){var d=n[h];u=ui(e,t,d,i,r,a,o,s,l,u,c),t=d[d.length-1]}return u}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,n,i))}},{key:"containsXY",value:function(e,t){return function(e,t,n,i,r,a){if(0===n.length)return!1;for(var o=0,s=n.length;o<s;++o){var l=n[o];if(Ri(e,t,l,i,r,a))return!0;t=l[l.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}},{key:"getArea",value:function(){return function(e,t,n,i){for(var r=0,a=0,o=n.length;a<o;++a){var s=n[a];r+=xi(e,t,s,i),t=s[s.length-1]}return r}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}},{key:"getCoordinates",value:function(e){var t;return void 0!==e?zi(t=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,e):t=this.flatCoordinates,_i(t,0,this.endss_,this.stride)}},{key:"getEndss",value:function(){return this.endss_}},{key:"getFlatInteriorPoints",value:function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var e=function(e,t,n,i){for(var r=[],a=[1/0,1/0,-1/0,-1/0],o=0,s=n.length;o<s;++o){var l=n[o];a=De(e,t,l[0],i),r.push((a[0]+a[2])/2,(a[1]+a[3])/2),t=l[l.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=function(e,t,n,i,r){for(var a=[],o=0,s=n.length;o<s;++o){var l=n[o];a=Pi(e,t,l,i,r,2*o,a),t=l[l.length-1]}return a}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}},{key:"getInteriorPoints",value:function(){return new nu(this.getFlatInteriorPoints().slice(),"XYM")}},{key:"getOrientedFlatCoordinates",value:function(){if(this.orientedRevision_!=this.getRevision()){var e=this.flatCoordinates;!function(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a){var s=n[a];if(!Di(e,t,s,i,r))return!1;s.length&&(t=s[s.length-1])}return!0}(e,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=zi(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=e,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}},{key:"getSimplifiedGeometryInternal",value:function(e){var t=[],i=[];return t.length=function(e,t,n,i,r,a,o,s){for(var l=0,u=n.length;l<u;++l){var c=n[l],h=[];o=pi(e,t,c,i,r,a,o,h),s.push(h),t=c[c.length-1]}return o}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,i),new n(t,"XY",i)}},{key:"getPolygon",value:function(e){if(e<0||this.endss_.length<=e)return null;var t;if(0===e)t=0;else{var n=this.endss_[e-1];t=n[n.length-1]}var i=this.endss_[e].slice(),r=i[i.length-1];if(0!==t)for(var a=0,o=i.length;a<o;++a)i[a]-=t;return new Gi(this.flatCoordinates.slice(t,r),this.layout,i)}},{key:"getPolygons",value:function(){for(var e=this.layout,t=this.flatCoordinates,n=this.endss_,i=[],r=0,a=0,o=n.length;a<o;++a){var s=n[a].slice(),l=s[s.length-1];if(0!==r)for(var u=0,c=s.length;u<c;++u)s[u]-=r;var h=new Gi(t.slice(r,l),e,s);i.push(h),r=l}return i}},{key:"getType",value:function(){return"MultiPolygon"}},{key:"intersectsExtent",value:function(e){return function(e,t,n,i,r){for(var a=0,o=n.length;a<o;++a){var s=n[a];if(Li(e,t,s,i,r))return!0;t=s[s.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}},{key:"setCoordinates",value:function(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);var n=function(e,t,n,i,r){r=r||[];for(var a=0,o=0,s=n.length;o<s;++o){var l=hi(e,t,n[o],i,r[a]);0===l.length&&(l[0]=t),r[a++]=l,t=l[l.length-1]}return r.length=a,r}(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===n.length)this.flatCoordinates.length=0;else{var i=n[n.length-1];this.flatCoordinates.length=0===i.length?0:i[i.length-1]}this.changed()}}]),n}(ri),ru=iu;function au(e,t){if(!e)return null;var n;switch(e.type){case"Point":n=function(e){return new Ci(e.coordinates)}(e);break;case"LineString":n=function(e){return new Jl(e.coordinates)}(e);break;case"Polygon":n=function(e){return new Gi(e.coordinates)}(e);break;case"MultiPoint":n=function(e){return new nu(e.coordinates)}(e);break;case"MultiLineString":n=function(e){return new eu(e.coordinates)}(e);break;case"MultiPolygon":n=function(e){return new ru(e.coordinates)}(e);break;case"GeometryCollection":n=function(e,t){var n=e.geometries.map((function(e){return au(e,t)}));return new Vl(n)}(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return Yl(n,!1,t)}function ou(e,t){var n,i=(e=Yl(e,!0,t)).getType();switch(i){case"Point":n=function(e,t){return{type:"Point",coordinates:e.getCoordinates()}}(e);break;case"LineString":n=function(e,t){return{type:"LineString",coordinates:e.getCoordinates()}}(e);break;case"Polygon":n=function(e,t){var n;t&&(n=t.rightHanded);return{type:"Polygon",coordinates:e.getCoordinates(n)}}(e,t);break;case"MultiPoint":n=function(e,t){return{type:"MultiPoint",coordinates:e.getCoordinates()}}(e);break;case"MultiLineString":n=function(e,t){return{type:"MultiLineString",coordinates:e.getCoordinates()}}(e);break;case"MultiPolygon":n=function(e,t){var n;t&&(n=t.rightHanded);return{type:"MultiPolygon",coordinates:e.getCoordinates(n)}}(e,t);break;case"GeometryCollection":n=function(e,t){t=Object.assign({},t),delete t.featureProjection;var n=e.getGeometriesArray().map((function(e){return ou(e,t)}));return{type:"GeometryCollection",geometries:n}}(e,t);break;case"Circle":n={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return n}var su=function(e){g(n,e);var t=m(n);function n(e){var i;return o(this,n),e=e||{},(i=t.call(this)).dataProjection=Sn(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(i.defaultFeatureProjection=Sn(e.featureProjection)),i.geometryName_=e.geometryName,i.extractGeometryName_=e.extractGeometryName,i.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],i}return c(n,[{key:"readFeatureFromObject",value:function(e,t){var n=null,i=au((n="Feature"===e.type?e:{type:"Feature",geometry:e,properties:null}).geometry,t),r=new Ul;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&r.setGeometryName(n.geometry_name),r.setGeometry(i),"id"in n&&r.setId(n.id),n.properties&&r.setProperties(n.properties,!0),r}},{key:"readFeaturesFromObject",value:function(e,t){var n=null;if("FeatureCollection"===e.type){n=[];for(var i=e.features,r=0,a=i.length;r<a;++r)n.push(this.readFeatureFromObject(i[r],t))}else n=[this.readFeatureFromObject(e,t)];return n}},{key:"readGeometryFromObject",value:function(e,t){return au(e,t)}},{key:"readProjectionFromObject",value:function(e){var t,n=e.crs;return n?"name"==n.type?t=Sn(n.properties.name):"EPSG"===n.type?t=Sn("EPSG:"+n.properties.code):ye(!1,36):t=this.dataProjection,t}},{key:"writeFeatureObject",value:function(e,t){t=this.adaptOptions(t);var n={type:"Feature",geometry:null,properties:null},i=e.getId();if(void 0!==i&&(n.id=i),!e.hasProperties())return n;var r=e.getProperties(),a=e.getGeometry();return a&&(n.geometry=ou(a,t),delete r[e.getGeometryName()]),F(r)||(n.properties=r),n}},{key:"writeFeaturesObject",value:function(e,t){t=this.adaptOptions(t);for(var n=[],i=0,r=e.length;i<r;++i)n.push(this.writeFeatureObject(e[i],t));return{type:"FeatureCollection",features:n}}},{key:"writeGeometryObject",value:function(e,t){return ou(e,this.adaptOptions(t))}}]),n}(Hl);function lu(e,t){return function(){return e.apply(t,arguments)}}var uu=Object.prototype.toString,cu=Object.getPrototypeOf,hu=function(e){return function(t){var n=uu.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null)),fu=function(e){return e=e.toLowerCase(),function(t){return hu(t)===e}},du=function(e){return function(t){return typeof t===e}},vu=Array.isArray,gu=du("undefined");var pu=fu("ArrayBuffer");var yu=du("string"),mu=du("function"),_u=du("number"),ku=function(e){return null!==e&&"object"===typeof e},xu=function(e){if("object"!==hu(e))return!1;var t=cu(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},bu=fu("Date"),wu=fu("File"),Su=fu("Blob"),Cu=fu("FileList"),Eu=fu("URLSearchParams");function Tu(e,t){var n,i,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==r&&r;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),vu(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{var o,s=a?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;for(n=0;n<l;n++)o=s[n],t.call(null,e[o],o,e)}}function Ru(e,t){t=t.toLowerCase();for(var n,i=Object.keys(e),r=i.length;r-- >0;)if(t===(n=i[r]).toLowerCase())return n;return null}var Pu="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,Iu=function(e){return!gu(e)&&e!==Pu};var Fu,Mu=(Fu="undefined"!==typeof Uint8Array&&cu(Uint8Array),function(e){return Fu&&e instanceof Fu}),Lu=fu("HTMLFormElement"),Ou=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),Au=fu("RegExp"),Du=function(e,t){var n=Object.getOwnPropertyDescriptors(e),i={};Tu(n,(function(n,r){!1!==t(n,r,e)&&(i[r]=n)})),Object.defineProperties(e,i)},Nu="abcdefghijklmnopqrstuvwxyz",zu="0123456789",ju={DIGIT:zu,ALPHA:Nu,ALPHA_DIGIT:Nu+Nu.toUpperCase()+zu};var Gu=fu("AsyncFunction"),Wu={isArray:vu,isArrayBuffer:pu,isBuffer:function(e){return null!==e&&!gu(e)&&null!==e.constructor&&!gu(e.constructor)&&mu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"===typeof FormData&&e instanceof FormData||mu(e.append)&&("formdata"===(t=hu(e))||"object"===t&&mu(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&pu(e.buffer)},isString:yu,isNumber:_u,isBoolean:function(e){return!0===e||!1===e},isObject:ku,isPlainObject:xu,isUndefined:gu,isDate:bu,isFile:wu,isBlob:Su,isRegExp:Au,isFunction:mu,isStream:function(e){return ku(e)&&mu(e.pipe)},isURLSearchParams:Eu,isTypedArray:Mu,isFileList:Cu,forEach:Tu,merge:function e(){for(var t=(Iu(this)&&this||{}).caseless,n={},i=function(i,r){var a=t&&Ru(n,r)||r;xu(n[a])&&xu(i)?n[a]=e(n[a],i):xu(i)?n[a]=e({},i):vu(i)?n[a]=i.slice():n[a]=i},r=0,a=arguments.length;r<a;r++)arguments[r]&&Tu(arguments[r],i);return n},extend:function(e,t,n){return Tu(t,(function(t,i){n&&mu(t)?e[i]=lu(t,n):e[i]=t}),{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,i){var r,a,o,s={};if(t=t||{},null==e)return t;do{for(a=(r=Object.getOwnPropertyNames(e)).length;a-- >0;)o=r[a],i&&!i(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=!1!==n&&cu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:hu,kindOfTest:fu,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;if(vu(e))return e;var t=e.length;if(!_u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,i=(e&&e[Symbol.iterator]).call(e);(n=i.next())&&!n.done;){var r=n.value;t.call(e,r[0],r[1])}},matchAll:function(e,t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:Lu,hasOwnProperty:Ou,hasOwnProp:Ou,reduceDescriptors:Du,freezeMethods:function(e){Du(e,(function(t,n){if(mu(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var i=e[n];mu(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},i=function(e){e.forEach((function(e){n[e]=!0}))};return vu(e)?i(e):i(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:Ru,global:Pu,isContextDefined:Iu,ALPHABET:ju,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ju.ALPHA_DIGIT,n="",i=t.length;e--;)n+=t[Math.random()*i|0];return n},isSpecCompliantForm:function(e){return!!(e&&mu(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,i){if(ku(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;var r=vu(n)?[]:{};return Tu(n,(function(t,n){var a=e(t,i+1);!gu(a)&&(r[n]=a)})),t[i]=void 0,r}}return n}(e,0)},isAsyncFn:Gu,isThenable:function(e){return e&&(ku(e)||mu(e))&&mu(e.then)&&mu(e.catch)}};function Bu(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}Wu.inherits(Bu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Wu.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Uu=Bu.prototype,Xu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){Xu[e]={value:e}})),Object.defineProperties(Bu,Xu),Object.defineProperty(Uu,"isAxiosError",{value:!0}),Bu.from=function(e,t,n,i,r,a){var o=Object.create(Uu);return Wu.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),Bu.call(o,e.message,t,n,i,r),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var Vu=Bu;function Yu(e){return Wu.isPlainObject(e)||Wu.isArray(e)}function Ku(e){return Wu.endsWith(e,"[]")?e.slice(0,-2):e}function Hu(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ku(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var Zu=Wu.toFlatObject(Wu,{},null,(function(e){return/^is[A-Z]/.test(e)}));var qu=function(e,t,n){if(!Wu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var i=(n=Wu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Wu.isUndefined(t[e])}))).metaTokens,r=n.visitor||u,a=n.dots,o=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&Wu.isSpecCompliantForm(t);if(!Wu.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Wu.isDate(e))return e.toISOString();if(!s&&Wu.isBlob(e))throw new Vu("Blob is not supported. Use a Buffer instead.");return Wu.isArrayBuffer(e)||Wu.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,r){var s=e;if(e&&!r&&"object"===typeof e)if(Wu.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(Wu.isArray(e)&&function(e){return Wu.isArray(e)&&!e.some(Yu)}(e)||(Wu.isFileList(e)||Wu.endsWith(n,"[]"))&&(s=Wu.toArray(e)))return n=Ku(n),s.forEach((function(e,i){!Wu.isUndefined(e)&&null!==e&&t.append(!0===o?Hu([n],i,a):null===o?n:n+"[]",l(e))})),!1;return!!Yu(e)||(t.append(Hu(r,n,a),l(e)),!1)}var c=[],h=Object.assign(Zu,{defaultVisitor:u,convertValue:l,isVisitable:Yu});if(!Wu.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!Wu.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+i.join("."));c.push(n),Wu.forEach(n,(function(n,a){!0===(!(Wu.isUndefined(n)||null===n)&&r.call(t,n,Wu.isString(a)?a.trim():a,i,h))&&e(n,i?i.concat(a):[a])})),c.pop()}}(e),t};function $u(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ju(e,t){this._pairs=[],e&&qu(e,this,t)}var Qu=Ju.prototype;Qu.append=function(e,t){this._pairs.push([e,t])},Qu.toString=function(e){var t=e?function(t){return e.call(this,t,$u)}:$u;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ec=Ju;function tc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nc(e,t,n){if(!t)return e;var i,r=n&&n.encode||tc,a=n&&n.serialize;if(i=a?a(t,n):Wu.isURLSearchParams(t)?t.toString():new ec(t,n).toString(r)){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}var ic=function(){function e(){o(this,e),this.handlers=[]}return c(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){Wu.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),rc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ac={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:ec,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},isStandardBrowserEnv:function(){var e;return("undefined"===typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!==typeof window&&"undefined"!==typeof document)}(),isStandardBrowserWebWorkerEnv:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};var oc=function(e){function t(e,n,i,r){var a=e[r++],o=Number.isFinite(+a),s=r>=e.length;return a=!a&&Wu.isArray(i)?i.length:a,s?(Wu.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o):(i[a]&&Wu.isObject(i[a])||(i[a]=[]),t(e,n,i[a],r)&&Wu.isArray(i[a])&&(i[a]=function(e){var t,n,i={},r=Object.keys(e),a=r.length;for(t=0;t<a;t++)i[n=r[t]]=e[n];return i}(i[a])),!o)}if(Wu.isFormData(e)&&Wu.isFunction(e.entries)){var n={};return Wu.forEachEntry(e,(function(e,i){t(function(e){return Wu.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),i,n,0)})),n}return null},sc={"Content-Type":void 0};var lc={transitional:rc,adapter:["xhr","http"],transformRequest:[function(e,t){var n,i=t.getContentType()||"",r=i.indexOf("application/json")>-1,a=Wu.isObject(e);if(a&&Wu.isHTMLForm(e)&&(e=new FormData(e)),Wu.isFormData(e))return r&&r?JSON.stringify(oc(e)):e;if(Wu.isArrayBuffer(e)||Wu.isBuffer(e)||Wu.isStream(e)||Wu.isFile(e)||Wu.isBlob(e))return e;if(Wu.isArrayBufferView(e))return e.buffer;if(Wu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return qu(e,new ac.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return ac.isNode&&Wu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=Wu.isFileList(e))||i.indexOf("multipart/form-data")>-1){var o=this.env&&this.env.FormData;return qu(n?{"files[]":e}:e,o&&new o,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(Wu.isString(e))try{return(t||JSON.parse)(e),Wu.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||lc.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&Wu.isString(e)&&(n&&!this.responseType||i)){var r=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(r){if("SyntaxError"===a.name)throw Vu.from(a,Vu.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ac.classes.FormData,Blob:ac.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Wu.forEach(["delete","get","head"],(function(e){lc.headers[e]={}})),Wu.forEach(["post","put","patch"],(function(e){lc.headers[e]=Wu.merge(sc)}));var uc=lc,cc=Wu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hc=Symbol("internals");function fc(e){return e&&String(e).trim().toLowerCase()}function dc(e){return!1===e||null==e?e:Wu.isArray(e)?e.map(dc):String(e)}function vc(e,t,n,i,r){return Wu.isFunction(i)?i.call(this,t,n):(r&&(t=n),Wu.isString(t)?Wu.isString(i)?-1!==t.indexOf(i):Wu.isRegExp(i)?i.test(t):void 0:void 0)}var gc=function(e,t){function n(e){o(this,n),e&&this.set(e)}return c(n,[{key:"set",value:function(e,t,n){var i=this;function r(e,t,n){var r=fc(t);if(!r)throw new Error("header name must be a non-empty string");var a=Wu.findKey(i,r);(!a||void 0===i[a]||!0===n||void 0===n&&!1!==i[a])&&(i[a||t]=dc(e))}var a=function(e,t){return Wu.forEach(e,(function(e,n){return r(e,n,t)}))};return Wu.isPlainObject(e)||e instanceof this.constructor?a(e,t):Wu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a(function(e){var t,n,i,r={};return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),t=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!t||r[t]&&cc[t]||("set-cookie"===t?r[t]?r[t].push(n):r[t]=[n]:r[t]=r[t]?r[t]+", "+n:n)})),r}(e),t):null!=e&&r(t,e,n),this}},{key:"get",value:function(e,t){if(e=fc(e)){var n=Wu.findKey(this,e);if(n){var i=this[n];if(!t)return i;if(!0===t)return function(e){for(var t,n=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=i.exec(e);)n[t[1]]=t[2];return n}(i);if(Wu.isFunction(t))return t.call(this,i,n);if(Wu.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=fc(e)){var n=Wu.findKey(this,e);return!(!n||void 0===this[n]||t&&!vc(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,i=!1;function r(e){if(e=fc(e)){var r=Wu.findKey(n,e);!r||t&&!vc(0,n[r],r,t)||(delete n[r],i=!0)}}return Wu.isArray(e)?e.forEach(r):r(e),i}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,i=!1;n--;){var r=t[n];e&&!vc(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}},{key:"normalize",value:function(e){var t=this,n={};return Wu.forEach(this,(function(i,r){var a=Wu.findKey(n,r);if(a)return t[a]=dc(i),void delete t[r];var o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(r):String(r).trim();o!==r&&delete t[r],t[o]=dc(i),n[o]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return Wu.forEach(this,(function(n,i){null!=n&&!1!==n&&(t[i]=e&&Wu.isArray(n)?n.join(", "):n)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=a(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[hc]=this[hc]={accessors:{}}).accessors,n=this.prototype;function i(e){var i=fc(e);t[i]||(!function(e,t){var n=Wu.toCamelCase(" "+t);["get","set","has"].forEach((function(i){Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[i]=!0)}return Wu.isArray(e)?e.forEach(i):i(e),this}}]),n}();gc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Wu.freezeMethods(gc.prototype),Wu.freezeMethods(gc);var pc=gc;function yc(e,t){var n=this||uc,i=t||n,r=pc.from(i.headers),a=i.data;return Wu.forEach(e,(function(e){a=e.call(n,a,r.normalize(),t?t.status:void 0)})),r.normalize(),a}function mc(e){return!(!e||!e.__CANCEL__)}function _c(e,t,n){Vu.call(this,null==e?"canceled":e,Vu.ERR_CANCELED,t,n),this.name="CanceledError"}Wu.inherits(_c,Vu,{__CANCEL__:!0});var kc=_c;var xc=ac.isStandardBrowserEnv?{write:function(e,t,n,i,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),Wu.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Wu.isString(i)&&o.push("path="+i),Wu.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function bc(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var wc=ac.isStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=Wu.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};var Sc=function(e,t){e=e||10;var n,i=new Array(e),r=new Array(e),a=0,o=0;return t=void 0!==t?t:1e3,function(s){var l=Date.now(),u=r[o];n||(n=l),i[a]=s,r[a]=l;for(var c=o,h=0;c!==a;)h+=i[c++],c%=e;if((a=(a+1)%e)===o&&(o=(o+1)%e),!(l-n<t)){var f=u&&l-u;return f?Math.round(1e3*h/f):void 0}}};function Cc(e,t){var n=0,i=Sc(50,250);return function(r){var a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-n,l=i(s);n=a;var u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&a<=o?(o-a)/l:void 0,event:r};u[t?"download":"upload"]=!0,e(u)}}var Ec={http:null,xhr:"undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var i,r=e.data,a=pc.from(e.headers).normalize(),o=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}Wu.isFormData(r)&&(ac.isStandardBrowserEnv||ac.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.setContentType("multipart/form-data;",!1));var l=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",c=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(u+":"+c))}var h=bc(e.baseURL,e.url);function f(){if(l){var i=pc.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new Vu("Request failed with status code "+n.status,[Vu.ERR_BAD_REQUEST,Vu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:i,config:e,request:l}),l=null}}if(l.open(e.method.toUpperCase(),nc(h,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(f)},l.onabort=function(){l&&(n(new Vu("Request aborted",Vu.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Vu("Network Error",Vu.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||rc;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Vu(t,i.clarifyTimeoutError?Vu.ETIMEDOUT:Vu.ECONNABORTED,e,l)),l=null},ac.isStandardBrowserEnv){var d=(e.withCredentials||wc(h))&&e.xsrfCookieName&&xc.read(e.xsrfCookieName);d&&a.set(e.xsrfHeaderName,d)}void 0===r&&a.setContentType(null),"setRequestHeader"in l&&Wu.forEach(a.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),Wu.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&l.addEventListener("progress",Cc(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Cc(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=function(t){l&&(n(!t||t.type?new kc(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));var v=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(h);v&&-1===ac.protocols.indexOf(v)?n(new Vu("Unsupported protocol "+v+":",Vu.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};Wu.forEach(Ec,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));var Tc=function(e){for(var t,n,i=(e=Wu.isArray(e)?e:[e]).length,r=0;r<i&&(t=e[r],!(n=Wu.isString(t)?Ec[t.toLowerCase()]:t));r++);if(!n){if(!1===n)throw new Vu("Adapter ".concat(t," is not supported by the environment"),"ERR_NOT_SUPPORT");throw new Error(Wu.hasOwnProp(Ec,t)?"Adapter '".concat(t,"' is not available in the build"):"Unknown adapter '".concat(t,"'"))}if(!Wu.isFunction(n))throw new TypeError("adapter is not a function");return n};function Rc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kc(null,e)}function Pc(e){return Rc(e),e.headers=pc.from(e.headers),e.data=yc.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tc(e.adapter||uc.adapter)(e).then((function(t){return Rc(e),t.data=yc.call(e,e.transformResponse,t),t.headers=pc.from(t.headers),t}),(function(t){return mc(t)||(Rc(e),t&&t.response&&(t.response.data=yc.call(e,e.transformResponse,t.response),t.response.headers=pc.from(t.response.headers))),Promise.reject(t)}))}var Ic=function(e){return e instanceof pc?e.toJSON():e};function Fc(e,t){t=t||{};var n={};function i(e,t,n){return Wu.isPlainObject(e)&&Wu.isPlainObject(t)?Wu.merge.call({caseless:n},e,t):Wu.isPlainObject(t)?Wu.merge({},t):Wu.isArray(t)?t.slice():t}function r(e,t,n){return Wu.isUndefined(t)?Wu.isUndefined(e)?void 0:i(void 0,e,n):i(e,t,n)}function a(e,t){if(!Wu.isUndefined(t))return i(void 0,t)}function o(e,t){return Wu.isUndefined(t)?Wu.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(n,r,a){return a in t?i(n,r):a in e?i(void 0,n):void 0}var l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:function(e,t){return r(Ic(e),Ic(t),!0)}};return Wu.forEach(Object.keys(Object.assign({},e,t)),(function(i){var a=l[i]||r,o=a(e[i],t[i],i);Wu.isUndefined(o)&&a!==s||(n[i]=o)})),n}var Mc="1.4.0",Lc={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Lc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Oc={};Lc.transitional=function(e,t,n){function i(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Vu(i(r," has been removed"+(t?" in "+t:"")),Vu.ERR_DEPRECATED);return t&&!Oc[r]&&(Oc[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}};var Ac={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Vu("options must be an object",Vu.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),r=i.length;r-- >0;){var a=i[r],o=t[a];if(o){var s=e[a],l=void 0===s||o(s,a,e);if(!0!==l)throw new Vu("option "+a+" must be "+l,Vu.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Vu("Unknown option "+a,Vu.ERR_BAD_OPTION)}},validators:Lc},Dc=Ac.validators,Nc=function(){function e(t){o(this,e),this.defaults=t,this.interceptors={request:new ic,response:new ic}}return c(e,[{key:"request",value:function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};var n,i=t=Fc(this.defaults,t),r=i.transitional,a=i.paramsSerializer,o=i.headers;void 0!==r&&Ac.assertOptions(r,{silentJSONParsing:Dc.transitional(Dc.boolean),forcedJSONParsing:Dc.transitional(Dc.boolean),clarifyTimeoutError:Dc.transitional(Dc.boolean)},!1),null!=a&&(Wu.isFunction(a)?t.paramsSerializer={serialize:a}:Ac.assertOptions(a,{encode:Dc.function,serialize:Dc.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(n=o&&Wu.merge(o.common,o[t.method]))&&Wu.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete o[e]})),t.headers=pc.concat(n,o);var s=[],l=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var u,c=[];this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));var h,f=0;if(!l){var d=[Pc.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,c),h=d.length,u=Promise.resolve(t);f<h;)u=u.then(d[f++],d[f++]);return u}h=s.length;var v=t;for(f=0;f<h;){var g=s[f++],p=s[f++];try{v=g(v)}catch(y){p.call(this,y);break}}try{u=Pc.call(this,v)}catch(y){return Promise.reject(y)}for(f=0,h=c.length;f<h;)u=u.then(c[f++],c[f++]);return u}},{key:"getUri",value:function(e){return nc(bc((e=Fc(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),e}();Wu.forEach(["delete","get","head","options"],(function(e){Nc.prototype[e]=function(t,n){return this.request(Fc(n||{},{method:e,url:t,data:(n||{}).data}))}})),Wu.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request(Fc(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Nc.prototype[e]=t(),Nc.prototype[e+"Form"]=t(!0)}));var zc=Nc,jc=function(){function e(t){if(o(this,e),"function"!==typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var i=this;this.promise.then((function(e){if(i._listeners){for(var t=i._listeners.length;t-- >0;)i._listeners[t](e);i._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){i.subscribe(e),t=e})).then(e);return n.cancel=function(){i.unsubscribe(t)},n},t((function(e,t,r){i.reason||(i.reason=new kc(e,t,r),n(i.reason))}))}return c(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}();var Gc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gc).forEach((function(e){var t=a(e,2),n=t[0],i=t[1];Gc[i]=n}));var Wc=Gc;var Bc=function e(t){var n=new zc(t),i=lu(zc.prototype.request,n);return Wu.extend(i,zc.prototype,n,{allOwnKeys:!0}),Wu.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(Fc(t,n))},i}(uc);Bc.Axios=zc,Bc.CanceledError=kc,Bc.CancelToken=jc,Bc.isCancel=mc,Bc.VERSION=Mc,Bc.toFormData=qu,Bc.AxiosError=Vu,Bc.Cancel=Bc.CanceledError,Bc.all=function(e){return Promise.all(e)},Bc.spread=function(e){return function(t){return e.apply(null,t)}},Bc.isAxiosError=function(e){return Wu.isObject(e)&&!0===e.isAxiosError},Bc.mergeConfig=Fc,Bc.AxiosHeaders=pc,Bc.formToJSON=function(e){return oc(Wu.isHTMLForm(e)?new FormData(e):e)},Bc.HttpStatusCode=Wc,Bc.default=Bc;var Uc=Bc,Xc=n(184),Vc=function(){var t=(0,e.useRef)(null),n=a((0,e.useState)(""),2),i=n[0],r=n[1],o=a((0,e.useState)(""),2),s=o[0],l=o[1],u=a((0,e.useState)(!1),2),c=u[0],h=u[1],f=a((0,e.useState)(""),2),d=f[0],v=f[1],g=a((0,e.useState)([0,0]),2),p=g[0],y=g[1];(0,e.useEffect)((function(){i&&s&&!d&&Uc.get("https://parcelview.azurewebsites.net/parcel?printkey=".concat(i,"&swis=").concat(s)).then((function(e){v(e.data);var t=e.data.geometry.coordinates[0][0];console.log(t);var n=t.reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]);n[0]/=t.length,n[1]/=t.length,console.log(n),y(n),h(!0)})).catch((function(e){console.log(e)}))}),[i,s]),(0,e.useEffect)((function(){var e=document.getElementById("root");if(r(e.getAttribute("data-printkey")),l(e.getAttribute("data-swis")),c&&d&&i&&s&&!t.current){var n=new Mo({source:new ns}),a=new Tl({source:new Wl({url:"https://parcelview.azurewebsites.net/parcel?printkey=".concat(i,"&swis=").concat(s),format:new su}),style:function(e){return new ys({stroke:new fs({color:"magenta",width:3}),fill:new hs({color:"transparent"})})}});t.current=new Ja({target:"map",layers:[n,a],view:new Yi({center:Fn(p,"EPSG:4326","EPSG:3857"),zoom:16.5}),interactions:Ya({doubleClickZoom:!1})})}}),[i,s,d,c]);return(0,Xc.jsx)(Xc.Fragment,{children:c?(0,Xc.jsx)("div",{id:"map",style:{height:"100%",width:"100%"}}):(0,Xc.jsx)("p",{children:"GIS information unavailable for current parcel."})})},Yc=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,i=t.getFID,r=t.getFCP,a=t.getLCP,o=t.getTTFB;n(e),i(e),r(e),a(e),o(e)}))};t.createRoot(document.getElementById("root")).render((0,Xc.jsx)(Vc,{})),Yc()}()}();
//# sourceMappingURL=main.d4554773.js.map