(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();function nC(r,e){const t=Object.create(null),n=r.split(",");for(let i=0;i!!t[i.toLowerCase()]:i=>!!t[i]}const LK="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",OK=nC(LK);function c0(r){if(Oe(r)){const e={};for(let t=0;t{if(t){const n=t.split(RK);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function h0(r){let e="";if(Hn(r))e=r;else if(Oe(r))for(let t=0;tth(t,e))}const kK=r=>Hn(r)?r:r==null?"":Oe(r)||Tn(r)&&(r.toString===z6||!ar(r.toString))?JSON.stringify(r,W6,2):String(r),W6=(r,e)=>e&&e.__v_isRef?W6(r,e.value):sg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i])=>(t[`${n} =>`]=i,t),{})}:gd(e)?{[`Set(${e.size})`]:[...e.values()]}:Tn(e)&&!Oe(e)&&!Y6(e)?String(e):e,wn={},og=[],gA=()=>{},HK=()=>!1,GK=/^on[^a-z]/,f0=r=>GK.test(r),LO=r=>r.startsWith("onUpdate:"),ci=Object.assign,OO=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},$K=Object.prototype.hasOwnProperty,Vr=(r,e)=>$K.call(r,e),Oe=Array.isArray,sg=r=>tv(r)==="[object Map]",gd=r=>tv(r)==="[object Set]",BN=r=>tv(r)==="[object Date]",VK=r=>tv(r)==="[object RegExp]",ar=r=>typeof r=="function",Hn=r=>typeof r=="string",Sy=r=>typeof r=="symbol",Tn=r=>r!==null&&typeof r=="object",FO=r=>Tn(r)&&ar(r.then)&&ar(r.catch),z6=Object.prototype.toString,tv=r=>z6.call(r),jK=r=>tv(r).slice(8,-1),Y6=r=>tv(r)==="[object Object]",RO=r=>Hn(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,Zm=nC(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),aC=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},KK=/-(\w)/g,Uo=aC(r=>r.replace(KK,(e,t)=>t?t.toUpperCase():"")),WK=/\B([A-Z])/g,Us=aC(r=>r.replace(WK,"-$1").toLowerCase()),d0=aC(r=>r.charAt(0).toUpperCase()+r.slice(1)),Jm=aC(r=>r?`on${d0(r)}`:""),Tg=(r,e)=>!Object.is(r,e),Ag=(r,e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},Ow=r=>{const e=parseFloat(r);return isNaN(e)?r:e},Fw=r=>{const e=Hn(r)?Number(r):NaN;return isNaN(e)?r:e};let bN;const zK=()=>bN||(bN=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let hs;class MO{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=hs,!e&&hs&&(this.index=(hs.scopes||(hs.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=hs;try{return hs=this,e()}finally{hs=t}}}on(){hs=this}off(){hs=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t{const e=new Set(r);return e.w=0,e.n=0,e},Z6=r=>(r.w&eh)>0,J6=r=>(r.n&eh)>0,qK=({deps:r})=>{if(r.length)for(let e=0;e{const{deps:e}=r;if(e.length){let t=0;for(let n=0;n{(u==="length"||u>=A)&&s.push(l)})}else switch(t!==void 0&&s.push(o.get(t)),e){case"add":Oe(r)?RO(t)&&s.push(o.get("length")):(s.push(o.get(Of)),sg(r)&&s.push(o.get(WS)));break;case"delete":Oe(r)||(s.push(o.get(Of)),sg(r)&&s.push(o.get(WS)));break;case"set":sg(r)&&s.push(o.get(Of));break}if(s.length===1)s[0]&&zS(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);zS(NO(A))}}function zS(r,e){const t=Oe(r)?r:[...r];for(const n of t)n.computed&&SN(n);for(const n of t)n.computed||SN(n)}function SN(r,e){(r!==hA||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}function eW(r,e){var t;return(t=Rw.get(r))===null||t===void 0?void 0:t.get(e)}const rW=nC("__proto__,__v_isRef,__isVue"),r4=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(Sy)),nW=oC(),iW=oC(!1,!0),aW=oC(!0),oW=oC(!0,!0),xN=sW();function sW(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Dr(this);for(let a=0,o=this.length;a{r[e]=function(...t){ev();const n=Dr(this)[e].apply(this,t);return rv(),n}}),r}function AW(r){const e=Dr(this);return ko(e,"has",r),e.hasOwnProperty(r)}function oC(r=!1,e=!1){return function(n,i,a){if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&a===(r?e?l4:A4:e?s4:o4).get(n))return n;const o=Oe(n);if(!r){if(o&&Vr(xN,i))return Reflect.get(xN,i,a);if(i==="hasOwnProperty")return AW}const s=Reflect.get(n,i,a);return(Sy(i)?r4.has(i):rW(i))||(r||ko(n,"get",i),e)?s:Aa(s)?o&&RO(i)?s:s.value:Tn(s)?r?UO(s):vd(s):s}}const lW=n4(),uW=n4(!0);function n4(r=!1){return function(t,n,i,a){let o=t[n];if(Yf(o)&&Aa(o)&&!Aa(i))return!1;if(!r&&(!xy(i)&&!Yf(i)&&(o=Dr(o),i=Dr(i)),!Oe(t)&&Aa(o)&&!Aa(i)))return o.value=i,!0;const s=Oe(t)&&RO(n)?Number(n)r,sC=r=>Reflect.getPrototypeOf(r);function x_(r,e,t=!1,n=!1){r=r.__v_raw;const i=Dr(r),a=Dr(e);t||(e!==a&&ko(i,"get",e),ko(i,"get",a));const{has:o}=sC(i),s=n?PO:t?kO:Iy;if(o.call(i,e))return s(r.get(e));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(e)}function I_(r,e=!1){const t=this.__v_raw,n=Dr(t),i=Dr(r);return e||(r!==i&&ko(n,"has",r),ko(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function L_(r,e=!1){return r=r.__v_raw,!e&&ko(Dr(r),"iterate",Of),Reflect.get(r,"size",r)}function IN(r){r=Dr(r);const e=Dr(this);return sC(e).has.call(e,r)||(e.add(r),wu(e,"add",r,r)),this}function LN(r,e){e=Dr(e);const t=Dr(this),{has:n,get:i}=sC(t);let a=n.call(t,r);a||(r=Dr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?Tg(e,o)&&wu(t,"set",r,e):wu(t,"add",r,e),this}function ON(r){const e=Dr(this),{has:t,get:n}=sC(e);let i=t.call(e,r);i||(r=Dr(r),i=t.call(e,r)),n&&n.call(e,r);const a=e.delete(r);return i&&wu(e,"delete",r,void 0),a}function FN(){const r=Dr(this),e=r.size!==0,t=r.clear();return e&&wu(r,"clear",void 0,void 0),t}function O_(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Dr(o),A=e?PO:r?kO:Iy;return!r&&ko(s,"iterate",Of),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function F_(r,e,t){return function(...n){const i=this.__v_raw,a=Dr(i),o=sg(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?PO:e?kO:Iy;return!e&&ko(a,"iterate",A?WS:Of),{next(){const{value:c,done:h}=l.next();return h?{value:c,done:h}:{value:s?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function Ac(r){return function(...e){return r==="delete"?!1:this}}function gW(){const r={get(a){return x_(this,a)},get size(){return L_(this)},has:I_,add:IN,set:LN,delete:ON,clear:FN,forEach:O_(!1,!1)},e={get(a){return x_(this,a,!1,!0)},get size(){return L_(this)},has:I_,add:IN,set:LN,delete:ON,clear:FN,forEach:O_(!1,!0)},t={get(a){return x_(this,a,!0)},get size(){return L_(this,!0)},has(a){return I_.call(this,a,!0)},add:Ac("add"),set:Ac("set"),delete:Ac("delete"),clear:Ac("clear"),forEach:O_(!0,!1)},n={get(a){return x_(this,a,!0,!0)},get size(){return L_(this,!0)},has(a){return I_.call(this,a,!0)},add:Ac("add"),set:Ac("set"),delete:Ac("delete"),clear:Ac("clear"),forEach:O_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=F_(a,!1,!1),t[a]=F_(a,!0,!1),e[a]=F_(a,!1,!0),n[a]=F_(a,!0,!0)}),[r,t,e,n]}const[vW,mW,yW,_W]=gW();function AC(r,e){const t=e?r?_W:yW:r?mW:vW;return(n,i,a)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get(Vr(t,i)&&i in n?t:n,i,a)}const wW={get:AC(!1,!1)},EW={get:AC(!1,!0)},CW={get:AC(!0,!1)},BW={get:AC(!0,!0)},o4=new WeakMap,s4=new WeakMap,A4=new WeakMap,l4=new WeakMap;function bW(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function TW(r){return r.__v_skip||!Object.isExtensible(r)?0:bW(jK(r))}function vd(r){return Yf(r)?r:lC(r,!1,i4,wW,o4)}function u4(r){return lC(r,!1,dW,EW,s4)}function UO(r){return lC(r,!0,a4,CW,A4)}function SW(r){return lC(r,!0,pW,BW,l4)}function lC(r,e,t,n,i){if(!Tn(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const a=i.get(r);if(a)return a;const o=TW(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Ff(r){return Yf(r)?Ff(r.__v_raw):!!(r&&r.__v_isReactive)}function Yf(r){return!!(r&&r.__v_isReadonly)}function xy(r){return!!(r&&r.__v_isShallow)}function DO(r){return Ff(r)||Yf(r)}function Dr(r){const e=r&&r.__v_raw;return e?Dr(e):r}function QO(r){return Lw(r,"__v_skip",!0),r}const Iy=r=>Tn(r)?vd(r):r,kO=r=>Tn(r)?UO(r):r;function HO(r){Vc&&hA&&(r=Dr(r),e4(r.dep||(r.dep=NO())))}function uC(r,e){r=Dr(r);const t=r.dep;t&&zS(t)}function Aa(r){return!!(r&&r.__v_isRef===!0)}function Fo(r){return h4(r,!1)}function c4(r){return h4(r,!0)}function h4(r,e){return Aa(r)?r:new xW(r,e)}class xW{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Dr(e),this._value=t?e:Iy(e)}get value(){return HO(this),this._value}set value(e){const t=this.__v_isShallow||xy(e)||Yf(e);e=t?e:Dr(e),Tg(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Iy(e),uC(this))}}function IW(r){uC(r)}function Rf(r){return Aa(r)?r.value:r}const LW={get:(r,e,t)=>Rf(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Aa(i)&&!Aa(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function GO(r){return Ff(r)?r:new Proxy(r,LW)}class OW{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e(()=>HO(this),()=>uC(this));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function FW(r){return new OW(r)}function rh(r){const e=Oe(r)?new Array(r.length):{};for(const t in r)e[t]=f4(r,t);return e}class RW{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return eW(Dr(this._object),this._key)}}function f4(r,e,t){const n=r[e];return Aa(n)?n:new RW(r,e,t)}var d4;class MW{constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[d4]=!1,this._dirty=!0,this.effect=new p0(e,()=>{this._dirty||(this._dirty=!0,uC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Dr(this);return HO(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}d4="__v_isReadonly";function NW(r,e,t=!1){let n,i;const a=ar(r);return a?(n=r,i=gA):(n=r.get,i=r.set),new MW(n,i,a||!i,t)}function PW(r,...e){}function UW(r,e){}function fu(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){md(a,e,t)}return i}function ms(r,e,t,n){if(ar(r)){const a=fu(r,e,t,n);return a&&FO(a)&&a.catch(o=>{md(o,e,t)}),a}const i=[];for(let a=0;a>>1;Oy(ja[n])JA&&ja.splice(e,1)}function VO(r){Oe(r)?lg.push(...r):(!nu||!nu.includes(r,r.allowRecurse?yf+1:yf))&&lg.push(r),g4()}function RN(r,e=Ly?JA+1:0){for(;eOy(t)-Oy(n)),yf=0;yfr.id==null?1/0:r.id,HW=(r,e)=>{const t=Oy(r)-Oy(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function v4(r){YS=!1,Ly=!0,ja.sort(HW);const e=gA;try{for(JA=0;JANp.emit(i,...a)),R_=[]):typeof window<"u"&&window.HTMLElement&&!(!((n=(t=window.navigator)===null||t===void 0?void 0:t.userAgent)===null||n===void 0)&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{m4(a,e)}),setTimeout(()=>{Np||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,R_=[])},3e3)):R_=[]}function GW(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||wn;let i=t;const a=e.startsWith("update:"),o=a&&e.slice(7);if(o&&o in n){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:c,trim:h}=n[u]||wn;h&&(i=t.map(f=>Hn(f)?f.trim():f)),c&&(i=t.map(Ow))}let s,A=n[s=Jm(e)]||n[s=Jm(Uo(e))];!A&&a&&(A=n[s=Jm(Us(e))]),A&&ms(A,r,6,i);const l=n[s+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[s])return;r.emitted[s]=!0,ms(l,r,6,i)}}function y4(r,e,t=!1){const n=e.emitsCache,i=n.get(r);if(i!==void 0)return i;const a=r.emits;let o={},s=!1;if(!ar(r)){const A=l=>{const u=y4(l,e,!0);u&&(s=!0,ci(o,u))};!t&&e.mixins.length&&e.mixins.forEach(A),r.extends&&A(r.extends),r.mixins&&r.mixins.forEach(A)}return!a&&!s?(Tn(r)&&n.set(r,null),null):(Oe(a)?a.forEach(A=>o[A]=null):ci(o,a),Tn(r)&&n.set(r,o),o)}function fC(r,e){return!r||!f0(e)?!1:(e=e.slice(2).replace(/Once$/,""),Vr(r,e[0].toLowerCase()+e.slice(1))||Vr(r,Us(e))||Vr(r,e))}let _a=null,dC=null;function Fy(r){const e=_a;return _a=r,dC=r&&r.type.__scopeId||null,e}function $W(r){dC=r}function VW(){dC=null}const jW=r=>jO;function jO(r,e=_a,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&rx(-1);const a=Fy(e);let o;try{o=r(...i)}finally{Fy(a),n._d&&rx(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function q1(r){const{type:e,vnode:t,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:A,emit:l,render:u,renderCache:c,data:h,setupState:f,ctx:d,inheritAttrs:g}=r;let m,v;const y=Fy(r);try{if(t.shapeFlag&4){const C=i||n;m=fs(u.call(C,C,c,a,f,h,d)),v=A}else{const C=e;m=fs(C.length>1?C(a,{attrs:A,slots:s,emit:l}):C(a,null)),v=e.props?A:WW(A)}}catch(C){ry.length=0,md(C,r,1),m=Pn(Wa)}let w=m;if(v&&g!==!1){const C=Object.keys(v),{shapeFlag:O}=w;C.length&&O&7&&(o&&C.some(LO)&&(v=zW(v,o)),w=gl(w,v))}return t.dirs&&(w=gl(w),w.dirs=w.dirs?w.dirs.concat(t.dirs):t.dirs),t.transition&&(w.transition=t.transition),m=w,Fy(y),m}function KW(r){let e;for(let t=0;t{let e;for(const t in r)(t==="class"||t==="style"||f0(t))&&((e||(e={}))[t]=r[t]);return e},zW=(r,e)=>{const t={};for(const n in r)(!LO(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function YW(r,e,t){const{props:n,children:i,component:a}=r,{props:o,children:s,patchFlag:A}=e,l=a.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&A>=0){if(A&1024)return!0;if(A&16)return n?MN(n,o,l):!!o;if(A&8){const u=e.dynamicProps;for(let c=0;cr.__isSuspense,XW={name:"Suspense",__isSuspense:!0,process(r,e,t,n,i,a,o,s,A,l){r==null?ZW(e,t,n,i,a,o,s,A,l):JW(r,e,t,n,i,o,s,A,l)},hydrate:tz,create:WO,normalize:ez},qW=XW;function Ry(r,e){const t=r.props&&r.props[e];ar(t)&&t()}function ZW(r,e,t,n,i,a,o,s,A){const{p:l,o:{createElement:u}}=A,c=u("div"),h=r.suspense=WO(r,i,n,e,c,t,a,o,s,A);l(null,h.pendingBranch=r.ssContent,c,null,n,h,a,o),h.deps>0?(Ry(r,"onPending"),Ry(r,"onFallback"),l(null,r.ssFallback,e,t,n,null,a,o),ug(h,r.ssFallback)):h.resolve()}function JW(r,e,t,n,i,a,o,s,{p:A,um:l,o:{createElement:u}}){const c=e.suspense=r.suspense;c.vnode=e,e.el=r.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:d,pendingBranch:g,isInFallback:m,isHydrating:v}=c;if(g)c.pendingBranch=h,fA(h,g)?(A(g,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():m&&(A(d,f,t,n,i,null,a,o,s),ug(c,f))):(c.pendingId++,v?(c.isHydrating=!1,c.activeBranch=g):l(g,i,c),c.deps=0,c.effects.length=0,c.hiddenContainer=u("div"),m?(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():(A(d,f,t,n,i,null,a,o,s),ug(c,f))):d&&fA(h,d)?(A(d,h,t,n,i,c,a,o,s),c.resolve(!0)):(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0&&c.resolve()));else if(d&&fA(h,d))A(d,h,t,n,i,c,a,o,s),ug(c,h);else if(Ry(e,"onPending"),c.pendingBranch=h,c.pendingId++,A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0)c.resolve();else{const{timeout:y,pendingId:w}=c;y>0?setTimeout(()=>{c.pendingId===w&&c.fallback(f)},y):y===0&&c.fallback(f)}}function WO(r,e,t,n,i,a,o,s,A,l,u=!1){const{p:c,m:h,um:f,n:d,o:{parentNode:g,remove:m}}=l,v=r.props?Fw(r.props.timeout):void 0,y={vnode:r,parent:e,parentComponent:t,isSVG:o,container:n,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(w=!1){const{vnode:C,activeBranch:O,pendingBranch:F,pendingId:I,effects:T,parentComponent:L,container:N}=y;if(y.isHydrating)y.isHydrating=!1;else if(!w){const P=O&&F.transition&&F.transition.mode==="out-in";P&&(O.transition.afterLeave=()=>{I===y.pendingId&&h(F,N,U,0)});let{anchor:U}=y;O&&(U=d(O),f(O,L,y,!0)),P||h(F,N,U,0)}ug(y,F),y.pendingBranch=null,y.isInFallback=!1;let x=y.parent,S=!1;for(;x;){if(x.pendingBranch){x.effects.push(...T),S=!0;break}x=x.parent}S||VO(T),y.effects=[],Ry(C,"onResolve")},fallback(w){if(!y.pendingBranch)return;const{vnode:C,activeBranch:O,parentComponent:F,container:I,isSVG:T}=y;Ry(C,"onFallback");const L=d(O),N=()=>{y.isInFallback&&(c(null,w,I,L,F,null,T,s,A),ug(y,w))},x=w.transition&&w.transition.mode==="out-in";x&&(O.transition.afterLeave=N),y.isInFallback=!0,f(O,F,null,!0),x||N()},move(w,C,O){y.activeBranch&&h(y.activeBranch,w,C,O),y.container=w},next(){return y.activeBranch&&d(y.activeBranch)},registerDep(w,C){const O=!!y.pendingBranch;O&&y.deps++;const F=w.vnode.el;w.asyncDep.catch(I=>{md(I,w,0)}).then(I=>{if(w.isUnmounted||y.isUnmounted||y.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:T}=w;nx(w,I,!1),F&&(T.el=F);const L=!F&&w.subTree.el;C(w,T,g(F||w.subTree.el),F?null:d(w.subTree),y,o,A),L&&m(L),KO(w,T.el),O&&--y.deps===0&&y.resolve()})},unmount(w,C){y.isUnmounted=!0,y.activeBranch&&f(y.activeBranch,t,w,C),y.pendingBranch&&f(y.pendingBranch,t,w,C)}};return y}function tz(r,e,t,n,i,a,o,s,A){const l=e.suspense=WO(e,n,t,r.parentNode,document.createElement("div"),null,i,a,o,s,!0),u=A(r,l.pendingBranch=e.ssContent,t,l,a,o);return l.deps===0&&l.resolve(),u}function ez(r){const{shapeFlag:e,children:t}=r,n=e&32;r.ssContent=NN(n?t.default:t),r.ssFallback=n?NN(t.fallback):Pn(Wa)}function NN(r){let e;if(ar(r)){const t=Zf&&r._c;t&&(r._d=!1,ti()),r=r(),t&&(r._d=!0,e=Po,Y4())}return Oe(r)&&(r=KW(r)),r=fs(r),e&&!r.dynamicChildren&&(r.dynamicChildren=e.filter(t=>t!==r)),r}function w4(r,e){e&&e.pendingBranch?Oe(r)?e.effects.push(...r):e.effects.push(r):VO(r)}function ug(r,e){r.activeBranch=e;const{vnode:t,parentComponent:n}=r,i=t.el=e.el;n&&n.subTree===t&&(n.vnode.el=i,KO(n,i))}function Qr(r,e){if(li){let t=li.provides;const n=li.parent&&li.parent.provides;n===t&&(t=li.provides=Object.create(n)),t[r]=e}}function Be(r,e,t=!1){const n=li||_a;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&r in i)return i[r];if(arguments.length>1)return t&&ar(e)?e.call(n.proxy):e}}function E4(r,e){return g0(r,null,e)}function C4(r,e){return g0(r,null,{flush:"post"})}function rz(r,e){return g0(r,null,{flush:"sync"})}const M_={};function ye(r,e,t){return g0(r,e,t)}function g0(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=wn){const s=q6()===(li==null?void 0:li.scope)?li:null;let A,l=!1,u=!1;if(Aa(r)?(A=()=>r.value,l=xy(r)):Ff(r)?(A=()=>r,n=!0):Oe(r)?(u=!0,l=r.some(w=>Ff(w)||xy(w)),A=()=>r.map(w=>{if(Aa(w))return w.value;if(Ff(w))return Bf(w);if(ar(w))return fu(w,s,2)})):ar(r)?e?A=()=>fu(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return c&&c(),ms(r,s,3,[h])}:A=gA,e&&n){const w=A;A=()=>Bf(w())}let c,h=w=>{c=v.onStop=()=>{fu(w,s,4)}},f;if(xg)if(h=gA,e?t&&ms(e,s,3,[A(),u?[]:void 0,h]):A(),i==="sync"){const w=sk();f=w.__watcherHandles||(w.__watcherHandles=[])}else return gA;let d=u?new Array(r.length).fill(M_):M_;const g=()=>{if(v.active)if(e){const w=v.run();(n||l||(u?w.some((C,O)=>Tg(C,d[O])):Tg(w,d)))&&(c&&c(),ms(e,s,3,[w,d===M_?void 0:u&&d[0]===M_?[]:d,h]),d=w)}else v.run()};g.allowRecurse=!!e;let m;i==="sync"?m=g:i==="post"?m=()=>ga(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),m=()=>hC(g));const v=new p0(A,m);e?t?g():d=v.run():i==="post"?ga(v.run.bind(v),s&&s.suspense):v.run();const y=()=>{v.stop(),s&&s.scope&&OO(s.scope.effects,v)};return f&&f.push(y),y}function nz(r,e,t){const n=this.proxy,i=Hn(r)?r.includes(".")?B4(n,r):()=>n[r]:r.bind(n,n);let a;ar(e)?a=e:(a=e.handler,t=e);const o=li;ih(this);const s=g0(i,a.bind(n),t);return o?ih(o):jc(),s}function B4(r,e){const t=e.split(".");return()=>{let n=r;for(let i=0;i{Bf(t,e)});else if(Y6(r))for(const t in r)Bf(r[t],e);return r}function zO(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return cr(()=>{r.isMounted=!0}),mC(()=>{r.isUnmounting=!0}),r}const Os=[Function,Array],iz={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Os,onEnter:Os,onAfterEnter:Os,onEnterCancelled:Os,onBeforeLeave:Os,onLeave:Os,onAfterLeave:Os,onLeaveCancelled:Os,onBeforeAppear:Os,onAppear:Os,onAfterAppear:Os,onAppearCancelled:Os},setup(r,{slots:e}){const t=yh(),n=zO();let i;return()=>{const a=e.default&&pC(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const g of a)if(g.type!==Wa){o=g;break}}const s=Dr(r),{mode:A}=s;if(n.isLeaving)return Bb(o);const l=PN(o);if(!l)return Bb(o);const u=Sg(l,s,n,t);Xf(l,u);const c=t.subTree,h=c&&PN(c);let f=!1;const{getTransitionKey:d}=l.type;if(d){const g=d();i===void 0?i=g:g!==i&&(i=g,f=!0)}if(h&&h.type!==Wa&&(!fA(l,h)||f)){const g=Sg(h,s,n,t);if(Xf(h,g),A==="out-in")return n.isLeaving=!0,g.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},Bb(o);A==="in-out"&&l.type!==Wa&&(g.delayLeave=(m,v,y)=>{const w=b4(n,h);w[String(h.key)]=h,m._leaveCb=()=>{v(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=y})}return o}}},YO=iz;function b4(r,e){const{leavingVNodes:t}=r;let n=t.get(e.type);return n||(n=Object.create(null),t.set(e.type,n)),n}function Sg(r,e,t,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:A,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:c,onLeave:h,onAfterLeave:f,onLeaveCancelled:d,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=e,w=String(r.key),C=b4(t,r),O=(T,L)=>{T&&ms(T,n,9,L)},F=(T,L)=>{const N=L[1];O(T,L),Oe(T)?T.every(x=>x.length<=1)&&N():T.length<=1&&N()},I={mode:a,persisted:o,beforeEnter(T){let L=s;if(!t.isMounted)if(i)L=g||s;else return;T._leaveCb&&T._leaveCb(!0);const N=C[w];N&&fA(r,N)&&N.el._leaveCb&&N.el._leaveCb(),O(L,[T])},enter(T){let L=A,N=l,x=u;if(!t.isMounted)if(i)L=m||A,N=v||l,x=y||u;else return;let S=!1;const P=T._enterCb=U=>{S||(S=!0,U?O(x,[T]):O(N,[T]),I.delayedLeave&&I.delayedLeave(),T._enterCb=void 0)};L?F(L,[T,P]):P()},leave(T,L){const N=String(r.key);if(T._enterCb&&T._enterCb(!0),t.isUnmounting)return L();O(c,[T]);let x=!1;const S=T._leaveCb=P=>{x||(x=!0,L(),P?O(d,[T]):O(f,[T]),T._leaveCb=void 0,C[N]===r&&delete C[N])};C[N]=r,h?F(h,[T,S]):S()},clone(T){return Sg(T,e,t,n)}};return I}function Bb(r){if(m0(r))return r=gl(r),r.children=null,r}function PN(r){return m0(r)?r.children?r.children[0]:void 0:r}function Xf(r,e){r.shapeFlag&6&&r.component?Xf(r.component.subTree,e):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}function pC(r,e=!1,t){let n=[],i=0;for(let a=0;a1)for(let a=0;a!!r.type.__asyncLoader;function az(r){ar(r)&&(r={loader:r});const{loader:e,loadingComponent:t,errorComponent:n,delay:i=200,timeout:a,suspensible:o=!0,onError:s}=r;let A=null,l,u=0;const c=()=>(u++,A=null,h()),h=()=>{let f;return A||(f=A=e().catch(d=>{if(d=d instanceof Error?d:new Error(String(d)),s)return new Promise((g,m)=>{s(d,()=>g(c()),()=>m(d),u+1)});throw d}).then(d=>f!==A&&A?A:(d&&(d.__esModule||d[Symbol.toStringTag]==="Module")&&(d=d.default),l=d,d)))};return v0({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return l},setup(){const f=li;if(l)return()=>bb(l,f);const d=y=>{A=null,md(y,f,13,!n)};if(o&&f.suspense||xg)return h().then(y=>()=>bb(y,f)).catch(y=>(d(y),()=>n?Pn(n,{error:y}):null));const g=Fo(!1),m=Fo(),v=Fo(!!i);return i&&setTimeout(()=>{v.value=!1},i),a!=null&&setTimeout(()=>{if(!g.value&&!m.value){const y=new Error(`Async component timed out after ${a}ms.`);d(y),m.value=y}},a),h().then(()=>{g.value=!0,f.parent&&m0(f.parent.vnode)&&hC(f.parent.update)}).catch(y=>{d(y),m.value=y}),()=>{if(g.value&&l)return bb(l,f);if(m.value&&n)return Pn(n,{error:m.value});if(t&&!v.value)return Pn(t)}}})}function bb(r,e){const{ref:t,props:n,children:i,ce:a}=e.vnode,o=Pn(r,n,i);return o.ref=t,o.ce=a,delete e.vnode.ce,o}const m0=r=>r.type.__isKeepAlive,oz={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:e}){const t=yh(),n=t.ctx;if(!n.renderer)return()=>{const y=e.default&&e.default();return y&&y.length===1?y[0]:y};const i=new Map,a=new Set;let o=null;const s=t.suspense,{renderer:{p:A,m:l,um:u,o:{createElement:c}}}=n,h=c("div");n.activate=(y,w,C,O,F)=>{const I=y.component;l(y,w,C,0,s),A(I.vnode,y,w,C,I,s,O,y.slotScopeIds,F),ga(()=>{I.isDeactivated=!1,I.a&&Ag(I.a);const T=y.props&&y.props.onVnodeMounted;T&&Oo(T,I.parent,y)},s)},n.deactivate=y=>{const w=y.component;l(y,h,null,1,s),ga(()=>{w.da&&Ag(w.da);const C=y.props&&y.props.onVnodeUnmounted;C&&Oo(C,w.parent,y),w.isDeactivated=!0},s)};function f(y){Tb(y),u(y,t,s,!0)}function d(y){i.forEach((w,C)=>{const O=ax(w.type);O&&(!y||!y(O))&&g(C)})}function g(y){const w=i.get(y);!o||!fA(w,o)?f(w):o&&Tb(o),i.delete(y),a.delete(y)}ye(()=>[r.include,r.exclude],([y,w])=>{y&&d(C=>Om(y,C)),w&&d(C=>!Om(w,C))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&i.set(m,Sb(t.subTree))};return cr(v),vC(v),mC(()=>{i.forEach(y=>{const{subTree:w,suspense:C}=t,O=Sb(w);if(y.type===O.type&&y.key===O.key){Tb(O);const F=O.component.da;F&&ga(F,C);return}f(y)})}),()=>{if(m=null,!e.default)return null;const y=e.default(),w=y[0];if(y.length>1)return o=null,y;if(!nh(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return o=null,w;let C=Sb(w);const O=C.type,F=ax(Mf(C)?C.type.__asyncResolved||{}:O),{include:I,exclude:T,max:L}=r;if(I&&(!F||!Om(I,F))||T&&F&&Om(T,F))return o=C,w;const N=C.key==null?O:C.key,x=i.get(N);return C.el&&(C=gl(C),w.shapeFlag&128&&(w.ssContent=C)),m=N,x?(C.el=x.el,C.component=x.component,C.transition&&Xf(C,C.transition),C.shapeFlag|=512,a.delete(N),a.add(N)):(a.add(N),L&&a.size>parseInt(L,10)&&g(a.values().next().value)),C.shapeFlag|=256,o=C,_4(w.type)?w:C}}},sz=oz;function Om(r,e){return Oe(r)?r.some(t=>Om(t,e)):Hn(r)?r.split(",").includes(e):VK(r)?r.test(e):!1}function T4(r,e){x4(r,"a",e)}function S4(r,e){x4(r,"da",e)}function x4(r,e,t=li){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(gC(e,n,t),t){let i=t.parent;for(;i&&i.parent;)m0(i.parent.vnode)&&Az(n,e,t,i),i=i.parent}}function Az(r,e,t,n){const i=gC(e,r,n,!0);pr(()=>{OO(n[e],i)},t)}function Tb(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function Sb(r){return r.shapeFlag&128?r.ssContent:r}function gC(r,e,t=li,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;ev(),ih(t);const s=ms(e,t,r,o);return jc(),rv(),s});return n?i.unshift(a):i.push(a),a}}const Ou=r=>(e,t=li)=>(!xg||r==="sp")&&gC(r,(...n)=>e(...n),t),I4=Ou("bm"),cr=Ou("m"),L4=Ou("bu"),vC=Ou("u"),mC=Ou("bum"),pr=Ou("um"),O4=Ou("sp"),F4=Ou("rtg"),R4=Ou("rtc");function M4(r,e=li){gC("ec",r,e)}function lz(r,e){const t=_a;if(t===null)return r;const n=wC(t)||t.proxy,i=r.dirs||(r.dirs=[]);for(let a=0;ae(o,s,void 0,a&&a[s]));else{const o=Object.keys(r);i=new Array(o.length);for(let s=0,A=o.length;s{const a=n.fn(...i);return a&&(a.key=n.key),a}:n.fn)}return r}function Rr(r,e,t={},n,i){if(_a.isCE||_a.parent&&Mf(_a.parent)&&_a.parent.isCE)return e!=="default"&&(t.name=e),Pn("slot",t,n&&n());let a=r[e];a&&a._c&&(a._d=!1),ti();const o=a&&U4(a(t)),s=yC(ya,{key:t.key||o&&o.key||`_${e}`},o||(n?n():[]),o&&r._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),a&&a._c&&(a._d=!0),s}function U4(r){return r.some(e=>nh(e)?!(e.type===Wa||e.type===ya&&!U4(e.children)):!0)?r:null}function pz(r,e){const t={};for(const n in r)t[e&&/[A-Z]/.test(n)?`on:${n}`:Jm(n)]=r[n];return t}const XS=r=>r?ek(r)?wC(r)||r.proxy:XS(r.parent):null,ty=ci(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>XS(r.parent),$root:r=>XS(r.root),$emit:r=>r.emit,$options:r=>ZO(r),$forceUpdate:r=>r.f||(r.f=()=>hC(r.update)),$nextTick:r=>r.n||(r.n=cC.bind(r.proxy)),$watch:r=>nz.bind(r)}),xb=(r,e)=>r!==wn&&!r.__isScriptSetup&&Vr(r,e),qS={get({_:r},e){const{ctx:t,setupState:n,data:i,props:a,accessCache:o,type:s,appContext:A}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return n[e];case 2:return i[e];case 4:return t[e];case 3:return a[e]}else{if(xb(n,e))return o[e]=1,n[e];if(i!==wn&&Vr(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&Vr(l,e))return o[e]=3,a[e];if(t!==wn&&Vr(t,e))return o[e]=4,t[e];ZS&&(o[e]=0)}}const u=ty[e];let c,h;if(u)return e==="$attrs"&&ko(r,"get",e),u(r);if((c=s.__cssModules)&&(c=c[e]))return c;if(t!==wn&&Vr(t,e))return o[e]=4,t[e];if(h=A.config.globalProperties,Vr(h,e))return h[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return xb(i,e)?(i[e]=t,!0):n!==wn&&Vr(n,e)?(n[e]=t,!0):Vr(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(a[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:n,appContext:i,propsOptions:a}},o){let s;return!!t[o]||r!==wn&&Vr(r,o)||xb(e,o)||(s=a[0])&&Vr(s,o)||Vr(n,o)||Vr(ty,o)||Vr(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Vr(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}},gz=ci({},qS,{get(r,e){if(e!==Symbol.unscopables)return qS.get(r,e,r)},has(r,e){return e[0]!=="_"&&!OK(e)}});let ZS=!0;function vz(r){const e=ZO(r),t=r.proxy,n=r.ctx;ZS=!1,e.beforeCreate&&DN(e.beforeCreate,r,"bc");const{data:i,computed:a,methods:o,watch:s,provide:A,inject:l,created:u,beforeMount:c,mounted:h,beforeUpdate:f,updated:d,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:w,unmounted:C,render:O,renderTracked:F,renderTriggered:I,errorCaptured:T,serverPrefetch:L,expose:N,inheritAttrs:x,components:S,directives:P,filters:U}=e;if(l&&mz(l,n,null,r.appContext.config.unwrapInjectedRef),o)for(const rt in o){const nt=o[rt];ar(nt)&&(n[rt]=nt.bind(t))}if(i){const rt=i.call(t,t);Tn(rt)&&(r.data=vd(rt))}if(ZS=!0,a)for(const rt in a){const nt=a[rt],At=ar(nt)?nt.bind(t,t):ar(nt.get)?nt.get.bind(t,t):gA,ct=!ar(nt)&&ar(nt.set)?nt.set.bind(t):gA,Tt=Ze({get:At,set:ct});Object.defineProperty(n,rt,{enumerable:!0,configurable:!0,get:()=>Tt.value,set:M=>Tt.value=M})}if(s)for(const rt in s)D4(s[rt],n,t,rt);if(A){const rt=ar(A)?A.call(t):A;Reflect.ownKeys(rt).forEach(nt=>{Qr(nt,rt[nt])})}u&&DN(u,r,"c");function q(rt,nt){Oe(nt)?nt.forEach(At=>rt(At.bind(t))):nt&&rt(nt.bind(t))}if(q(I4,c),q(cr,h),q(L4,f),q(vC,d),q(T4,g),q(S4,m),q(M4,T),q(R4,F),q(F4,I),q(mC,y),q(pr,C),q(O4,L),Oe(N))if(N.length){const rt=r.exposed||(r.exposed={});N.forEach(nt=>{Object.defineProperty(rt,nt,{get:()=>t[nt],set:At=>t[nt]=At})})}else r.exposed||(r.exposed={});O&&r.render===gA&&(r.render=O),x!=null&&(r.inheritAttrs=x),S&&(r.components=S),P&&(r.directives=P)}function mz(r,e,t=gA,n=!1){Oe(r)&&(r=JS(r));for(const i in r){const a=r[i];let o;Tn(a)?"default"in a?o=Be(a.from||i,a.default,!0):o=Be(a.from||i):o=Be(a),Aa(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function DN(r,e,t){ms(Oe(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function D4(r,e,t,n){const i=n.includes(".")?B4(t,n):()=>t[n];if(Hn(r)){const a=e[r];ar(a)&&ye(i,a)}else if(ar(r))ye(i,r.bind(t));else if(Tn(r))if(Oe(r))r.forEach(a=>D4(a,e,t,n));else{const a=ar(r.handler)?r.handler.bind(t):e[r.handler];ar(a)&&ye(i,a,r)}}function ZO(r){const e=r.type,{mixins:t,extends:n}=e,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=r.appContext,s=a.get(e);let A;return s?A=s:!i.length&&!t&&!n?A=e:(A={},i.length&&i.forEach(l=>Nw(A,l,o,!0)),Nw(A,e,o)),Tn(e)&&a.set(e,A),A}function Nw(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&Nw(r,a,t,!0),i&&i.forEach(o=>Nw(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=yz[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const yz={data:QN,props:df,emits:df,methods:df,computed:df,beforeCreate:oo,created:oo,beforeMount:oo,mounted:oo,beforeUpdate:oo,updated:oo,beforeDestroy:oo,beforeUnmount:oo,destroyed:oo,unmounted:oo,activated:oo,deactivated:oo,errorCaptured:oo,serverPrefetch:oo,components:df,directives:df,watch:wz,provide:QN,inject:_z};function QN(r,e){return e?r?function(){return ci(ar(r)?r.call(this,this):r,ar(e)?e.call(this,this):e)}:e:r}function _z(r,e){return df(JS(r),JS(e))}function JS(r){if(Oe(r)){const e={};for(let t=0;t0)&&!(o&16)){if(o&8){const u=r.vnode.dynamicProps;for(let c=0;c{A=!0;const[h,f]=k4(c,e,!0);ci(o,h),f&&s.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}if(!a&&!A)return Tn(r)&&n.set(r,og),og;if(Oe(a))for(let u=0;u-1,f[1]=g<0||d-1||Vr(f,"default"))&&s.push(c)}}}const l=[o,s];return Tn(r)&&n.set(r,l),l}function kN(r){return r[0]!=="$"}function HN(r){const e=r&&r.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:r===null?"null":""}function GN(r,e){return HN(r)===HN(e)}function $N(r,e){return Oe(e)?e.findIndex(t=>GN(t,r)):ar(e)&&GN(e,r)?0:-1}const H4=r=>r[0]==="_"||r==="$stable",JO=r=>Oe(r)?r.map(fs):[fs(r)],Bz=(r,e,t)=>{if(e._n)return e;const n=jO((...i)=>JO(e(...i)),t);return n._c=!1,n},G4=(r,e,t)=>{const n=r._ctx;for(const i in r){if(H4(i))continue;const a=r[i];if(ar(a))e[i]=Bz(i,a,n);else if(a!=null){const o=JO(a);e[i]=()=>o}}},$4=(r,e)=>{const t=JO(e);r.slots.default=()=>t},bz=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Dr(e),Lw(e,"_",t)):G4(e,r.slots={})}else r.slots={},e&&$4(r,e);Lw(r.slots,_C,1)},Tz=(r,e,t)=>{const{vnode:n,slots:i}=r;let a=!0,o=wn;if(n.shapeFlag&32){const s=e._;s?t&&s===1?a=!1:(ci(i,e),!t&&s===1&&delete i._):(a=!e.$stable,G4(e,i)),o=e}else e&&($4(r,e),o={default:1});if(a)for(const s in i)!H4(s)&&!(s in o)&&delete i[s]};function V4(){return{app:null,config:{isNativeTag:HK,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Sz=0;function xz(r,e){return function(n,i=null){ar(n)||(n=Object.assign({},n)),i!=null&&!Tn(i)&&(i=null);const a=V4(),o=new Set;let s=!1;const A=a.app={_uid:Sz++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:lk,get config(){return a.config},set config(l){},use(l,...u){return o.has(l)||(l&&ar(l.install)?(o.add(l),l.install(A,...u)):ar(l)&&(o.add(l),l(A,...u))),A},mixin(l){return a.mixins.includes(l)||a.mixins.push(l),A},component(l,u){return u?(a.components[l]=u,A):a.components[l]},directive(l,u){return u?(a.directives[l]=u,A):a.directives[l]},mount(l,u,c){if(!s){const h=Pn(n,i);return h.appContext=a,u&&e?e(h,l):r(h,l,c),s=!0,A._container=l,l.__vue_app__=A,wC(h.component)||h.component.proxy}},unmount(){s&&(r(null,A._container),delete A._container.__vue_app__)},provide(l,u){return a.provides[l]=u,A}};return A}}function Pw(r,e,t,n,i=!1){if(Oe(r)){r.forEach((h,f)=>Pw(h,e&&(Oe(e)?e[f]:e),t,n,i));return}if(Mf(n)&&!i)return;const a=n.shapeFlag&4?wC(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:A}=r,l=e&&e.r,u=s.refs===wn?s.refs={}:s.refs,c=s.setupState;if(l!=null&&l!==A&&(Hn(l)?(u[l]=null,Vr(c,l)&&(c[l]=null)):Aa(l)&&(l.value=null)),ar(A))fu(A,s,12,[o,u]);else{const h=Hn(A),f=Aa(A);if(h||f){const d=()=>{if(r.f){const g=h?Vr(c,A)?c[A]:u[A]:A.value;i?Oe(g)&&OO(g,a):Oe(g)?g.includes(a)||g.push(a):h?(u[A]=[a],Vr(c,A)&&(c[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else h?(u[A]=o,Vr(c,A)&&(c[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(d.id=-1,ga(d,t)):d()}}}let lc=!1;const N_=r=>/svg/.test(r.namespaceURI)&&r.tagName!=="foreignObject",P_=r=>r.nodeType===8;function Iz(r){const{mt:e,p:t,o:{patchProp:n,createText:i,nextSibling:a,parentNode:o,remove:s,insert:A,createComment:l}}=r,u=(v,y)=>{if(!y.hasChildNodes()){t(null,v,y),Mw(),y._vnode=v;return}lc=!1,c(y.firstChild,v,null,null,null),Mw(),y._vnode=v,lc&&console.error("Hydration completed but contains mismatches.")},c=(v,y,w,C,O,F=!1)=>{const I=P_(v)&&v.data==="[",T=()=>g(v,y,w,C,O,I),{type:L,ref:N,shapeFlag:x,patchFlag:S}=y;let P=v.nodeType;y.el=v,S===-2&&(F=!1,y.dynamicChildren=null);let U=null;switch(L){case qf:P!==3?y.children===""?(A(y.el=i(""),o(v),v),U=v):U=T():(v.data!==y.children&&(lc=!0,v.data=y.children),U=a(v));break;case Wa:P!==8||I?U=T():U=a(v);break;case Nf:if(I&&(v=a(v),P=v.nodeType),P===1||P===3){U=v;const tt=!y.children.length;for(let q=0;q{F=F||!!y.dynamicChildren;const{type:I,props:T,patchFlag:L,shapeFlag:N,dirs:x}=y,S=I==="input"&&x||I==="option";if(S||L!==-1){if(x&&qA(y,null,w,"created"),T)if(S||!F||L&48)for(const U in T)(S&&U.endsWith("value")||f0(U)&&!Zm(U))&&n(v,U,null,T[U],!1,void 0,w);else T.onClick&&n(v,"onClick",null,T.onClick,!1,void 0,w);let P;if((P=T&&T.onVnodeBeforeMount)&&Oo(P,w,y),x&&qA(y,null,w,"beforeMount"),((P=T&&T.onVnodeMounted)||x)&&w4(()=>{P&&Oo(P,w,y),x&&qA(y,null,w,"mounted")},C),N&16&&!(T&&(T.innerHTML||T.textContent))){let U=f(v.firstChild,y,v,w,C,O,F);for(;U;){lc=!0;const tt=U;U=U.nextSibling,s(tt)}}else N&8&&v.textContent!==y.children&&(lc=!0,v.textContent=y.children)}return v.nextSibling},f=(v,y,w,C,O,F,I)=>{I=I||!!y.dynamicChildren;const T=y.children,L=T.length;for(let N=0;N{const{slotScopeIds:I}=y;I&&(O=O?O.concat(I):I);const T=o(v),L=f(a(v),y,T,w,C,O,F);return L&&P_(L)&&L.data==="]"?a(y.anchor=L):(lc=!0,A(y.anchor=l("]"),T,L),L)},g=(v,y,w,C,O,F)=>{if(lc=!0,y.el=null,F){const L=m(v);for(;;){const N=a(v);if(N&&N!==L)s(N);else break}}const I=a(v),T=o(v);return s(v),t(null,y,T,I,w,C,N_(T),O),I},m=v=>{let y=0;for(;v;)if(v=a(v),v&&P_(v)&&(v.data==="["&&y++,v.data==="]")){if(y===0)return a(v);y--}return v};return[u,c]}const ga=w4;function j4(r){return W4(r)}function K4(r){return W4(r,Iz)}function W4(r,e){const t=zK();t.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:A,setText:l,setElementText:u,parentNode:c,nextSibling:h,setScopeId:f=gA,insertStaticContent:d}=r,g=(j,Z,ft,it=null,V=null,Ft=null,Mt=!1,Et=null,Bt=!!Z.dynamicChildren)=>{if(j===Z)return;j&&!fA(j,Z)&&(it=ot(j),M(j,V,Ft,!0),j=null),Z.patchFlag===-2&&(Bt=!1,Z.dynamicChildren=null);const{type:Ct,ref:Rt,shapeFlag:Nt}=Z;switch(Ct){case qf:m(j,Z,ft,it);break;case Wa:v(j,Z,ft,it);break;case Nf:j==null&&y(Z,ft,it,Mt);break;case ya:S(j,Z,ft,it,V,Ft,Mt,Et,Bt);break;default:Nt&1?O(j,Z,ft,it,V,Ft,Mt,Et,Bt):Nt&6?P(j,Z,ft,it,V,Ft,Mt,Et,Bt):(Nt&64||Nt&128)&&Ct.process(j,Z,ft,it,V,Ft,Mt,Et,Bt,X)}Rt!=null&&V&&Pw(Rt,j&&j.ref,Ft,Z||j,!Z)},m=(j,Z,ft,it)=>{if(j==null)n(Z.el=s(Z.children),ft,it);else{const V=Z.el=j.el;Z.children!==j.children&&l(V,Z.children)}},v=(j,Z,ft,it)=>{j==null?n(Z.el=A(Z.children||""),ft,it):Z.el=j.el},y=(j,Z,ft,it)=>{[j.el,j.anchor]=d(j.children,Z,ft,it,j.el,j.anchor)},w=({el:j,anchor:Z},ft,it)=>{let V;for(;j&&j!==Z;)V=h(j),n(j,ft,it),j=V;n(Z,ft,it)},C=({el:j,anchor:Z})=>{let ft;for(;j&&j!==Z;)ft=h(j),i(j),j=ft;i(Z)},O=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{Mt=Mt||Z.type==="svg",j==null?F(Z,ft,it,V,Ft,Mt,Et,Bt):L(j,Z,V,Ft,Mt,Et,Bt)},F=(j,Z,ft,it,V,Ft,Mt,Et)=>{let Bt,Ct;const{type:Rt,props:Nt,shapeFlag:Dt,transition:Wt,dirs:te}=j;if(Bt=j.el=o(j.type,Ft,Nt&&Nt.is,Nt),Dt&8?u(Bt,j.children):Dt&16&&T(j.children,Bt,null,it,V,Ft&&Rt!=="foreignObject",Mt,Et),te&&qA(j,null,it,"created"),I(Bt,j,j.scopeId,Mt,it),Nt){for(const oe in Nt)oe!=="value"&&!Zm(oe)&&a(Bt,oe,null,Nt[oe],Ft,j.children,it,V,J);"value"in Nt&&a(Bt,"value",null,Nt.value),(Ct=Nt.onVnodeBeforeMount)&&Oo(Ct,it,j)}te&&qA(j,null,it,"beforeMount");const Ae=(!V||V&&!V.pendingBranch)&&Wt&&!Wt.persisted;Ae&&Wt.beforeEnter(Bt),n(Bt,Z,ft),((Ct=Nt&&Nt.onVnodeMounted)||Ae||te)&&ga(()=>{Ct&&Oo(Ct,it,j),Ae&&Wt.enter(Bt),te&&qA(j,null,it,"mounted")},V)},I=(j,Z,ft,it,V)=>{if(ft&&f(j,ft),it)for(let Ft=0;Ft{for(let Ct=Bt;Ct{const Et=Z.el=j.el;let{patchFlag:Bt,dynamicChildren:Ct,dirs:Rt}=Z;Bt|=j.patchFlag&16;const Nt=j.props||wn,Dt=Z.props||wn;let Wt;ft&&ef(ft,!1),(Wt=Dt.onVnodeBeforeUpdate)&&Oo(Wt,ft,Z,j),Rt&&qA(Z,j,ft,"beforeUpdate"),ft&&ef(ft,!0);const te=V&&Z.type!=="foreignObject";if(Ct?N(j.dynamicChildren,Ct,Et,ft,it,te,Ft):Mt||nt(j,Z,Et,null,ft,it,te,Ft,!1),Bt>0){if(Bt&16)x(Et,Z,Nt,Dt,ft,it,V);else if(Bt&2&&Nt.class!==Dt.class&&a(Et,"class",null,Dt.class,V),Bt&4&&a(Et,"style",Nt.style,Dt.style,V),Bt&8){const Ae=Z.dynamicProps;for(let oe=0;oe{Wt&&Oo(Wt,ft,Z,j),Rt&&qA(Z,j,ft,"updated")},it)},N=(j,Z,ft,it,V,Ft,Mt)=>{for(let Et=0;Et{if(ft!==it){if(ft!==wn)for(const Et in ft)!Zm(Et)&&!(Et in it)&&a(j,Et,ft[Et],null,Mt,Z.children,V,Ft,J);for(const Et in it){if(Zm(Et))continue;const Bt=it[Et],Ct=ft[Et];Bt!==Ct&&Et!=="value"&&a(j,Et,Ct,Bt,Mt,Z.children,V,Ft,J)}"value"in it&&a(j,"value",ft.value,it.value)}},S=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{const Ct=Z.el=j?j.el:s(""),Rt=Z.anchor=j?j.anchor:s("");let{patchFlag:Nt,dynamicChildren:Dt,slotScopeIds:Wt}=Z;Wt&&(Et=Et?Et.concat(Wt):Wt),j==null?(n(Ct,ft,it),n(Rt,ft,it),T(Z.children,ft,Rt,V,Ft,Mt,Et,Bt)):Nt>0&&Nt&64&&Dt&&j.dynamicChildren?(N(j.dynamicChildren,Dt,ft,V,Ft,Mt,Et),(Z.key!=null||V&&Z===V.subTree)&&tF(j,Z,!0)):nt(j,Z,ft,Rt,V,Ft,Mt,Et,Bt)},P=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{Z.slotScopeIds=Et,j==null?Z.shapeFlag&512?V.ctx.activate(Z,ft,it,Mt,Bt):U(Z,ft,it,V,Ft,Mt,Bt):tt(j,Z,Bt)},U=(j,Z,ft,it,V,Ft,Mt)=>{const Et=j.component=tk(j,it,V);if(m0(j)&&(Et.ctx.renderer=X),rk(Et),Et.asyncDep){if(V&&V.registerDep(Et,q),!j.el){const Bt=Et.subTree=Pn(Wa);v(null,Bt,Z,ft)}return}q(Et,j,Z,ft,V,Ft,Mt)},tt=(j,Z,ft)=>{const it=Z.component=j.component;if(YW(j,Z,ft))if(it.asyncDep&&!it.asyncResolved){rt(it,Z,ft);return}else it.next=Z,kW(it.update),it.update();else Z.el=j.el,it.vnode=Z},q=(j,Z,ft,it,V,Ft,Mt)=>{const Et=()=>{if(j.isMounted){let{next:Rt,bu:Nt,u:Dt,parent:Wt,vnode:te}=j,Ae=Rt,oe;ef(j,!1),Rt?(Rt.el=te.el,rt(j,Rt,Mt)):Rt=te,Nt&&Ag(Nt),(oe=Rt.props&&Rt.props.onVnodeBeforeUpdate)&&Oo(oe,Wt,Rt,te),ef(j,!0);const Jt=q1(j),fe=j.subTree;j.subTree=Jt,g(fe,Jt,c(fe.el),ot(fe),j,V,Ft),Rt.el=Jt.el,Ae===null&&KO(j,Jt.el),Dt&&ga(Dt,V),(oe=Rt.props&&Rt.props.onVnodeUpdated)&&ga(()=>Oo(oe,Wt,Rt,te),V)}else{let Rt;const{el:Nt,props:Dt}=Z,{bm:Wt,m:te,parent:Ae}=j,oe=Mf(Z);if(ef(j,!1),Wt&&Ag(Wt),!oe&&(Rt=Dt&&Dt.onVnodeBeforeMount)&&Oo(Rt,Ae,Z),ef(j,!0),Nt&&at){const Jt=()=>{j.subTree=q1(j),at(Nt,j.subTree,j,V,null)};oe?Z.type.__asyncLoader().then(()=>!j.isUnmounted&&Jt()):Jt()}else{const Jt=j.subTree=q1(j);g(null,Jt,ft,it,j,V,Ft),Z.el=Jt.el}if(te&&ga(te,V),!oe&&(Rt=Dt&&Dt.onVnodeMounted)){const Jt=Z;ga(()=>Oo(Rt,Ae,Jt),V)}(Z.shapeFlag&256||Ae&&Mf(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&j.a&&ga(j.a,V),j.isMounted=!0,Z=ft=it=null}},Bt=j.effect=new p0(Et,()=>hC(Ct),j.scope),Ct=j.update=()=>Bt.run();Ct.id=j.uid,ef(j,!0),Ct()},rt=(j,Z,ft)=>{Z.component=j;const it=j.vnode.props;j.vnode=Z,j.next=null,Cz(j,Z.props,it,ft),Tz(j,Z.children,ft),ev(),RN(),rv()},nt=(j,Z,ft,it,V,Ft,Mt,Et,Bt=!1)=>{const Ct=j&&j.children,Rt=j?j.shapeFlag:0,Nt=Z.children,{patchFlag:Dt,shapeFlag:Wt}=Z;if(Dt>0){if(Dt&128){ct(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt);return}else if(Dt&256){At(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt);return}}Wt&8?(Rt&16&&J(Ct,V,Ft),Nt!==Ct&&u(ft,Nt)):Rt&16?Wt&16?ct(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt):J(Ct,V,Ft,!0):(Rt&8&&u(ft,""),Wt&16&&T(Nt,ft,it,V,Ft,Mt,Et,Bt))},At=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{j=j||og,Z=Z||og;const Ct=j.length,Rt=Z.length,Nt=Math.min(Ct,Rt);let Dt;for(Dt=0;DtRt?J(j,V,Ft,!0,!1,Nt):T(Z,ft,it,V,Ft,Mt,Et,Bt,Nt)},ct=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{let Ct=0;const Rt=Z.length;let Nt=j.length-1,Dt=Rt-1;for(;Ct<=Nt&&Ct<=Dt;){const Wt=j[Ct],te=Z[Ct]=Bt?bc(Z[Ct]):fs(Z[Ct]);if(fA(Wt,te))g(Wt,te,ft,null,V,Ft,Mt,Et,Bt);else break;Ct++}for(;Ct<=Nt&&Ct<=Dt;){const Wt=j[Nt],te=Z[Dt]=Bt?bc(Z[Dt]):fs(Z[Dt]);if(fA(Wt,te))g(Wt,te,ft,null,V,Ft,Mt,Et,Bt);else break;Nt--,Dt--}if(Ct>Nt){if(Ct<=Dt){const Wt=Dt+1,te=WtDt)for(;Ct<=Nt;)M(j[Ct],V,Ft,!0),Ct++;else{const Wt=Ct,te=Ct,Ae=new Map;for(Ct=te;Ct<=Dt;Ct++){const Ne=Z[Ct]=Bt?bc(Z[Ct]):fs(Z[Ct]);Ne.key!=null&&Ae.set(Ne.key,Ct)}let oe,Jt=0;const fe=Dt-te+1;let qt=!1,nr=0;const ke=new Array(fe);for(Ct=0;Ct=fe){M(Ne,V,Ft,!0);continue}let Pe;if(Ne.key!=null)Pe=Ae.get(Ne.key);else for(oe=te;oe<=Dt;oe++)if(ke[oe-te]===0&&fA(Ne,Z[oe])){Pe=oe;break}Pe===void 0?M(Ne,V,Ft,!0):(ke[Pe-te]=Ct+1,Pe>=nr?nr=Pe:qt=!0,g(Ne,Z[Pe],ft,null,V,Ft,Mt,Et,Bt),Jt++)}const wr=qt?Lz(ke):og;for(oe=wr.length-1,Ct=fe-1;Ct>=0;Ct--){const Ne=te+Ct,Pe=Z[Ne],Gr=Ne+1{const{el:Ft,type:Mt,transition:Et,children:Bt,shapeFlag:Ct}=j;if(Ct&6){Tt(j.component.subTree,Z,ft,it);return}if(Ct&128){j.suspense.move(Z,ft,it);return}if(Ct&64){Mt.move(j,Z,ft,X);return}if(Mt===ya){n(Ft,Z,ft);for(let Nt=0;NtEt.enter(Ft),V);else{const{leave:Nt,delayLeave:Dt,afterLeave:Wt}=Et,te=()=>n(Ft,Z,ft),Ae=()=>{Nt(Ft,()=>{te(),Wt&&Wt()})};Dt?Dt(Ft,te,Ae):Ae()}else n(Ft,Z,ft)},M=(j,Z,ft,it=!1,V=!1)=>{const{type:Ft,props:Mt,ref:Et,children:Bt,dynamicChildren:Ct,shapeFlag:Rt,patchFlag:Nt,dirs:Dt}=j;if(Et!=null&&Pw(Et,null,ft,j,!0),Rt&256){Z.ctx.deactivate(j);return}const Wt=Rt&1&&Dt,te=!Mf(j);let Ae;if(te&&(Ae=Mt&&Mt.onVnodeBeforeUnmount)&&Oo(Ae,Z,j),Rt&6)H(j.component,ft,it);else{if(Rt&128){j.suspense.unmount(ft,it);return}Wt&&qA(j,null,Z,"beforeUnmount"),Rt&64?j.type.remove(j,Z,ft,V,X,it):Ct&&(Ft!==ya||Nt>0&&Nt&64)?J(Ct,Z,ft,!1,!0):(Ft===ya&&Nt&384||!V&&Rt&16)&&J(Bt,Z,ft),it&&W(j)}(te&&(Ae=Mt&&Mt.onVnodeUnmounted)||Wt)&&ga(()=>{Ae&&Oo(Ae,Z,j),Wt&&qA(j,null,Z,"unmounted")},ft)},W=j=>{const{type:Z,el:ft,anchor:it,transition:V}=j;if(Z===ya){Y(ft,it);return}if(Z===Nf){C(j);return}const Ft=()=>{i(ft),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(j.shapeFlag&1&&V&&!V.persisted){const{leave:Mt,delayLeave:Et}=V,Bt=()=>Mt(ft,Ft);Et?Et(j.el,Ft,Bt):Bt()}else Ft()},Y=(j,Z)=>{let ft;for(;j!==Z;)ft=h(j),i(j),j=ft;i(Z)},H=(j,Z,ft)=>{const{bum:it,scope:V,update:Ft,subTree:Mt,um:Et}=j;it&&Ag(it),V.stop(),Ft&&(Ft.active=!1,M(Mt,j,Z,ft)),Et&&ga(Et,Z),ga(()=>{j.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},J=(j,Z,ft,it=!1,V=!1,Ft=0)=>{for(let Mt=Ft;Mtj.shapeFlag&6?ot(j.component.subTree):j.shapeFlag&128?j.suspense.next():h(j.anchor||j.el),ut=(j,Z,ft)=>{j==null?Z._vnode&&M(Z._vnode,null,null,!0):g(Z._vnode||null,j,Z,null,null,null,ft),RN(),Mw(),Z._vnode=j},X={p:g,um:M,m:Tt,r:W,mt:U,mc:T,pc:nt,pbc:N,n:ot,o:r};let It,at;return e&&([It,at]=e(X)),{render:ut,hydrate:It,createApp:xz(ut,It)}}function ef({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function tF(r,e,t=!1){const n=r.children,i=e.children;if(Oe(n)&&Oe(i))for(let a=0;a>1,r[t[s]]0&&(e[n]=t[a-1]),t[a]=n)}}for(a=t.length,o=t[a-1];a-- >0;)t[a]=o,o=e[o];return t}const Oz=r=>r.__isTeleport,ey=r=>r&&(r.disabled||r.disabled===""),VN=r=>typeof SVGElement<"u"&&r instanceof SVGElement,ex=(r,e)=>{const t=r&&r.to;return Hn(t)?e?e(t):null:t},Fz={__isTeleport:!0,process(r,e,t,n,i,a,o,s,A,l){const{mc:u,pc:c,pbc:h,o:{insert:f,querySelector:d,createText:g,createComment:m}}=l,v=ey(e.props);let{shapeFlag:y,children:w,dynamicChildren:C}=e;if(r==null){const O=e.el=g(""),F=e.anchor=g("");f(O,t,n),f(F,t,n);const I=e.target=ex(e.props,d),T=e.targetAnchor=g("");I&&(f(T,I),o=o||VN(I));const L=(N,x)=>{y&16&&u(w,N,x,i,a,o,s,A)};v?L(t,F):I&&L(I,T)}else{e.el=r.el;const O=e.anchor=r.anchor,F=e.target=r.target,I=e.targetAnchor=r.targetAnchor,T=ey(r.props),L=T?t:F,N=T?O:I;if(o=o||VN(F),C?(h(r.dynamicChildren,C,L,i,a,o,s),tF(r,e,!0)):A||c(r,e,L,N,i,a,o,s,!1),v)T||U_(e,t,O,l,1);else if((e.props&&e.props.to)!==(r.props&&r.props.to)){const x=e.target=ex(e.props,d);x&&U_(e,x,null,l,0)}else T&&U_(e,F,I,l,1)}z4(e)},remove(r,e,t,n,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:A,anchor:l,targetAnchor:u,target:c,props:h}=r;if(c&&a(u),(o||!ey(h))&&(a(l),s&16))for(let f=0;f0?Po||og:null,Y4(),Zf>0&&Po&&Po.push(r),r}function Yi(r,e,t,n,i,a){return X4(eF(r,e,t,n,i,a,!0))}function yC(r,e,t,n,i){return X4(Pn(r,e,t,n,i,!0))}function nh(r){return r?r.__v_isVNode===!0:!1}function fA(r,e){return r.type===e.type&&r.key===e.key}function Nz(r){}const _C="__vInternal",q4=({key:r})=>r??null,Z1=({ref:r,ref_key:e,ref_for:t})=>r!=null?Hn(r)||Aa(r)||ar(r)?{i:_a,r,k:e,f:!!t}:r:null;function eF(r,e=null,t=null,n=0,i=null,a=r===ya?0:1,o=!1,s=!1){const A={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&q4(e),ref:e&&Z1(e),scopeId:dC,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:_a};return s?(nF(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Hn(t)?8:16),Zf>0&&!o&&Po&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&Po.push(A),A}const Pn=Pz;function Pz(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===P4)&&(r=Wa),nh(r)){const s=gl(r,e,!0);return t&&nF(s,t),Zf>0&&!a&&Po&&(s.shapeFlag&6?Po[Po.indexOf(r)]=s:Po.push(s)),s.patchFlag|=-2,s}if(Vz(r)&&(r=r.__vccOpts),e){e=Z4(e);let{class:s,style:A}=e;s&&!Hn(s)&&(e.class=h0(s)),Tn(A)&&(DO(A)&&!Oe(A)&&(A=ci({},A)),e.style=c0(A))}const o=Hn(r)?1:_4(r)?128:Oz(r)?64:Tn(r)?4:ar(r)?2:0;return eF(r,e,t,n,i,o,a,!0)}function Z4(r){return r?DO(r)||_C in r?ci({},r):r:null}function gl(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?J4(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&q4(s),ref:e&&e.ref?t&&i?Oe(i)?i.concat(Z1(e)):[i,Z1(e)]:Z1(e):i,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:o,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==ya?a===-1?16:a|16:a,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&gl(r.ssContent),ssFallback:r.ssFallback&&gl(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce}}function rF(r=" ",e=0){return Pn(qf,null,r,e)}function Uz(r,e){const t=Pn(Nf,null,r);return t.staticCount=e,t}function Mr(r="",e=!1){return e?(ti(),yC(Wa,null,r)):Pn(Wa,null,r)}function fs(r){return r==null||typeof r=="boolean"?Pn(Wa):Oe(r)?Pn(ya,null,r.slice()):typeof r=="object"?bc(r):Pn(qf,null,String(r))}function bc(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:gl(r)}function nF(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(Oe(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),nF(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(_C in e)?e._ctx=_a:i===3&&_a&&(_a.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else ar(e)?(e={default:e,_ctx:_a},t=32):(e=String(e),n&64?(t=16,e=[rF(e)]):t=8);r.children=e,r.shapeFlag|=t}function J4(...r){const e={};for(let t=0;tli||_a,ih=r=>{li=r,r.scope.on()},jc=()=>{li&&li.scope.off(),li=null};function ek(r){return r.vnode.shapeFlag&4}let xg=!1;function rk(r,e=!1){xg=e;const{props:t,children:n}=r.vnode,i=ek(r);Ez(r,t,i,e),bz(r,n);const a=i?kz(r,e):void 0;return xg=!1,a}function kz(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=QO(new Proxy(r.ctx,qS));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?ik(r):null;ih(r),ev();const a=fu(n,r,0,[r.props,i]);if(rv(),jc(),FO(a)){if(a.then(jc,jc),e)return a.then(o=>{nx(r,o,e)}).catch(o=>{md(o,r,0)});r.asyncDep=a}else nx(r,a,e)}else nk(r,e)}function nx(r,e,t){ar(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Tn(e)&&(r.setupState=GO(e)),nk(r,t)}let Uw,ix;function Hz(r){Uw=r,ix=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,gz))}}const Gz=()=>!Uw;function nk(r,e,t){const n=r.type;if(!r.render){if(!e&&Uw&&!n.render){const i=n.template||ZO(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=ci(ci({isCustomElement:a,delimiters:s},o),A);n.render=Uw(i,l)}}r.render=n.render||gA,ix&&ix(r)}ih(r),ev(),vz(r),rv(),jc()}function $z(r){return new Proxy(r.attrs,{get(e,t){return ko(r,"get","$attrs"),e[t]}})}function ik(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=$z(r))},slots:r.slots,emit:r.emit,expose:e}}function wC(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(GO(QO(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in ty)return ty[t](r)},has(e,t){return t in e||t in ty}}))}function ax(r,e=!0){return ar(r)?r.displayName||r.name:r.name||e&&r.__name}function Vz(r){return ar(r)&&"__vccOpts"in r}const Ze=(r,e)=>NW(r,e,xg);function jz(){return null}function Kz(){return null}function Wz(r){}function zz(r,e){return null}function Yz(){return ak().slots}function Xz(){return ak().attrs}function ak(){const r=yh();return r.setupContext||(r.setupContext=ik(r))}function qz(r,e){const t=Oe(r)?r.reduce((n,i)=>(n[i]={},n),{}):r;for(const n in e){const i=t[n];i?Oe(i)||ar(i)?t[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(t[n]={default:e[n]})}return t}function Zz(r,e){const t={};for(const n in r)e.includes(n)||Object.defineProperty(t,n,{enumerable:!0,get:()=>r[n]});return t}function Jz(r){const e=yh();let t=r();return jc(),FO(t)&&(t=t.catch(n=>{throw ih(e),n})),[t,()=>ih(e)]}function EC(r,e,t){const n=arguments.length;return n===2?Tn(e)&&!Oe(e)?nh(e)?Pn(r,null,[e]):Pn(r,e):Pn(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&nh(t)&&(t=[t]),Pn(r,e,t))}const ok=Symbol(""),sk=()=>Be(ok);function tY(){}function eY(r,e,t,n){const i=t[n];if(i&&Ak(i,r))return i;const a=e();return a.memo=r.slice(),t[n]=a}function Ak(r,e){const t=r.memo;if(t.length!=e.length)return!1;for(let n=0;n0&&Po&&Po.push(r),!0}const lk="3.2.47",rY={createComponentInstance:tk,setupComponent:rk,renderComponentRoot:q1,setCurrentRenderingInstance:Fy,isVNode:nh,normalizeVNode:fs},nY=rY,iY=null,aY=null,oY="http://www.w3.org/2000/svg",_f=typeof document<"u"?document:null,jN=_f&&_f.createElement("template"),sY={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,n)=>{const i=e?_f.createElementNS(oY,r):_f.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>_f.createTextNode(r),createComment:r=>_f.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>_f.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,n,i,a){const o=t?t.previousSibling:e.lastChild;if(i&&(i===a||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),t),!(i===a||!(i=i.nextSibling)););else{jN.innerHTML=n?`${r}`:r;const s=jN.content;if(n){const A=s.firstChild;for(;A.firstChild;)s.appendChild(A.firstChild);s.removeChild(A)}e.insertBefore(s,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}};function AY(r,e,t){const n=r._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}function lY(r,e,t){const n=r.style,i=Hn(t);if(t&&!i){if(e&&!Hn(e))for(const a in e)t[a]==null&&ox(n,a,"");for(const a in t)ox(n,a,t[a])}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const KN=/\s*!important$/;function ox(r,e,t){if(Oe(t))t.forEach(n=>ox(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=uY(r,e);KN.test(t)?r.setProperty(Us(n),t.replace(KN,""),"important"):r[n]=t}}const WN=["Webkit","Moz","ms"],Ib={};function uY(r,e){const t=Ib[e];if(t)return t;let n=Uo(e);if(n!=="filter"&&n in r)return Ib[e]=n;n=d0(n);for(let i=0;iLb||(gY.then(()=>Lb=0),Lb=Date.now());function mY(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;ms(yY(n,t.value),e,5,[n])};return t.value=r,t.attached=vY(),t}function yY(r,e){if(Oe(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const XN=/^on[a-z]/,_Y=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?AY(r,n,i):e==="style"?lY(r,t,n):f0(e)?LO(e)||dY(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):wY(r,e,n,i))?hY(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),cY(r,e,n,i))};function wY(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&XN.test(e)&&ar(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||XN.test(e)&&Hn(t)?!1:e in r}function uk(r,e){const t=v0(r);class n extends CC{constructor(a){super(t,a,e)}}return n.def=t,n}const EY=r=>uk(r,Tk),CY=typeof HTMLElement<"u"?HTMLElement:class{};class CC extends CY{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,cC(()=>{this._connected||(lx(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let n=0;n{for(const i of n)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const e=(n,i=!1)=>{const{props:a,styles:o}=n;let s;if(a&&!Oe(a))for(const A in a){const l=a[A];(l===Number||l&&l.type===Number)&&(A in this._props&&(this._props[A]=Fw(this._props[A])),(s||(s=Object.create(null)))[Uo(A)]=!0)}this._numberProps=s,i&&this._resolveProps(n),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then(n=>e(n,!0)):e(this._def)}_resolveProps(e){const{props:t}=e,n=Oe(t)?t:Object.keys(t||{});for(const i of Object.keys(this))i[0]!=="_"&&n.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of n.map(Uo))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(e){let t=this.getAttribute(e);const n=Uo(e);this._numberProps&&this._numberProps[n]&&(t=Fw(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,i=!0){t!==this._props[e]&&(this._props[e]=t,i&&this._instance&&this._update(),n&&(t===!0?this.setAttribute(Us(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(Us(e),t+""):t||this.removeAttribute(Us(e))))}_update(){lx(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Pn(this._def,ci({},this._props));return this._instance||(e.ce=t=>{this._instance=t,t.isCE=!0;const n=(a,o)=>{this.dispatchEvent(new CustomEvent(a,{detail:o}))};t.emit=(a,...o)=>{n(a,o),Us(a)!==a&&n(Us(a),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof CC){t.parent=i._instance,t.provides=i._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(t=>{const n=document.createElement("style");n.textContent=t,this.shadowRoot.appendChild(n)})}}function BY(r="$style"){{const e=yh();if(!e)return wn;const t=e.type.__cssModules;if(!t)return wn;const n=t[r];return n||wn}}function bY(r){const e=yh();if(!e)return;const t=e.ut=(i=r(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>Ax(a,i))},n=()=>{const i=r(e.proxy);sx(e.subTree,i),t(i)};C4(n),cr(()=>{const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),pr(()=>i.disconnect())})}function sx(r,e){if(r.shapeFlag&128){const t=r.suspense;r=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{sx(t.activeBranch,e)})}for(;r.component;)r=r.component.subTree;if(r.shapeFlag&1&&r.el)Ax(r.el,e);else if(r.type===ya)r.children.forEach(t=>sx(t,e));else if(r.type===Nf){let{el:t,anchor:n}=r;for(;t&&(Ax(t,e),t!==n);)t=t.nextSibling}}function Ax(r,e){if(r.nodeType===1){const t=r.style;for(const n in e)t.setProperty(`--${n}`,e[n])}}const uc="transition",am="animation",iF=(r,{slots:e})=>EC(YO,hk(r),e);iF.displayName="Transition";const ck={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TY=iF.props=ci({},YO.props,ck),rf=(r,e=[])=>{Oe(r)?r.forEach(t=>t(...e)):r&&r(...e)},qN=r=>r?Oe(r)?r.some(e=>e.length>1):r.length>1:!1;function hk(r){const e={};for(const S in r)S in ck||(e[S]=r[S]);if(r.css===!1)return e;const{name:t="v",type:n,duration:i,enterFromClass:a=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:s=`${t}-enter-to`,appearFromClass:A=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:c=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=r,d=SY(i),g=d&&d[0],m=d&&d[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:w,onLeave:C,onLeaveCancelled:O,onBeforeAppear:F=v,onAppear:I=y,onAppearCancelled:T=w}=e,L=(S,P,U)=>{wc(S,P?u:s),wc(S,P?l:o),U&&U()},N=(S,P)=>{S._isLeaving=!1,wc(S,c),wc(S,f),wc(S,h),P&&P()},x=S=>(P,U)=>{const tt=S?I:y,q=()=>L(P,S,U);rf(tt,[P,q]),ZN(()=>{wc(P,S?A:a),eu(P,S?u:s),qN(tt)||JN(P,n,g,q)})};return ci(e,{onBeforeEnter(S){rf(v,[S]),eu(S,a),eu(S,o)},onBeforeAppear(S){rf(F,[S]),eu(S,A),eu(S,l)},onEnter:x(!1),onAppear:x(!0),onLeave(S,P){S._isLeaving=!0;const U=()=>N(S,P);eu(S,c),dk(),eu(S,h),ZN(()=>{S._isLeaving&&(wc(S,c),eu(S,f),qN(C)||JN(S,n,m,U))}),rf(C,[S,U])},onEnterCancelled(S){L(S,!1),rf(w,[S])},onAppearCancelled(S){L(S,!0),rf(T,[S])},onLeaveCancelled(S){N(S),rf(O,[S])}})}function SY(r){if(r==null)return null;if(Tn(r))return[Ob(r.enter),Ob(r.leave)];{const e=Ob(r);return[e,e]}}function Ob(r){return Fw(r)}function eu(r,e){e.split(/\s+/).forEach(t=>t&&r.classList.add(t)),(r._vtc||(r._vtc=new Set)).add(e)}function wc(r,e){e.split(/\s+/).forEach(n=>n&&r.classList.remove(n));const{_vtc:t}=r;t&&(t.delete(e),t.size||(r._vtc=void 0))}function ZN(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let xY=0;function JN(r,e,t,n){const i=r._endId=++xY,a=()=>{i===r._endId&&n()};if(t)return setTimeout(a,t);const{type:o,timeout:s,propCount:A}=fk(r,e);if(!o)return n();const l=o+"end";let u=0;const c=()=>{r.removeEventListener(l,h),a()},h=f=>{f.target===r&&++u>=A&&c()};setTimeout(()=>{u(t[d]||"").split(", "),i=n(`${uc}Delay`),a=n(`${uc}Duration`),o=tP(i,a),s=n(`${am}Delay`),A=n(`${am}Duration`),l=tP(s,A);let u=null,c=0,h=0;e===uc?o>0&&(u=uc,c=o,h=a.length):e===am?l>0&&(u=am,c=l,h=A.length):(c=Math.max(o,l),u=c>0?o>l?uc:am:null,h=u?u===uc?a.length:A.length:0);const f=u===uc&&/\b(transform|all)(,|$)/.test(n(`${uc}Property`).toString());return{type:u,timeout:c,propCount:h,hasTransform:f}}function tP(r,e){for(;r.lengtheP(t)+eP(r[n])))}function eP(r){return Number(r.slice(0,-1).replace(",","."))*1e3}function dk(){return document.body.offsetHeight}const pk=new WeakMap,gk=new WeakMap,vk={name:"TransitionGroup",props:ci({},TY,{tag:String,moveClass:String}),setup(r,{slots:e}){const t=yh(),n=zO();let i,a;return vC(()=>{if(!i.length)return;const o=r.moveClass||`${r.name||"v"}-move`;if(!MY(i[0].el,t.vnode.el,o))return;i.forEach(OY),i.forEach(FY);const s=i.filter(RY);dk(),s.forEach(A=>{const l=A.el,u=l.style;eu(l,o),u.transform=u.webkitTransform=u.transitionDuration="";const c=l._moveCb=h=>{h&&h.target!==l||(!h||/transform$/.test(h.propertyName))&&(l.removeEventListener("transitionend",c),l._moveCb=null,wc(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=Dr(r),s=hk(o);let A=o.tag||ya;i=a,a=e.default?pC(e.default()):[];for(let l=0;ldelete r.mode;vk.props;const LY=vk;function OY(r){const e=r.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function FY(r){gk.set(r,r.el.getBoundingClientRect())}function RY(r){const e=pk.get(r),t=gk.get(r),n=e.left-t.left,i=e.top-t.top;if(n||i){const a=r.el.style;return a.transform=a.webkitTransform=`translate(${n}px,${i}px)`,a.transitionDuration="0s",r}}function MY(r,e,t){const n=r.cloneNode();r._vtc&&r._vtc.forEach(o=>{o.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),t.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(n);const{hasTransform:a}=fk(n);return i.removeChild(n),a}const ah=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Oe(e)?t=>Ag(e,t):e};function NY(r){r.target.composing=!0}function rP(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Dw={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r._assign=ah(i);const a=n||i.props&&i.props.type==="number";Au(r,e?"change":"input",o=>{if(o.target.composing)return;let s=r.value;t&&(s=s.trim()),a&&(s=Ow(s)),r._assign(s)}),t&&Au(r,"change",()=>{r.value=r.value.trim()}),e||(Au(r,"compositionstart",NY),Au(r,"compositionend",rP),Au(r,"change",rP))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,modifiers:{lazy:t,trim:n,number:i}},a){if(r._assign=ah(a),r.composing||document.activeElement===r&&r.type!=="range"&&(t||n&&r.value.trim()===e||(i||r.type==="number")&&Ow(r.value)===e))return;const o=e??"";r.value!==o&&(r.value=o)}},aF={deep:!0,created(r,e,t){r._assign=ah(t),Au(r,"change",()=>{const n=r._modelValue,i=Ig(r),a=r.checked,o=r._assign;if(Oe(n)){const s=iC(n,i),A=s!==-1;if(a&&!A)o(n.concat(i));else if(!a&&A){const l=[...n];l.splice(s,1),o(l)}}else if(gd(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(yk(r,a))})},mounted:nP,beforeUpdate(r,e,t){r._assign=ah(t),nP(r,e,t)}};function nP(r,{value:e,oldValue:t},n){r._modelValue=e,Oe(e)?r.checked=iC(e,n.props.value)>-1:gd(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=th(e,yk(r,!0)))}const oF={created(r,{value:e},t){r.checked=th(e,t.props.value),r._assign=ah(t),Au(r,"change",()=>{r._assign(Ig(r))})},beforeUpdate(r,{value:e,oldValue:t},n){r._assign=ah(n),e!==t&&(r.checked=th(e,n.props.value))}},mk={deep:!0,created(r,{value:e,modifiers:{number:t}},n){const i=gd(e);Au(r,"change",()=>{const a=Array.prototype.filter.call(r.options,o=>o.selected).map(o=>t?Ow(Ig(o)):Ig(o));r._assign(r.multiple?i?new Set(a):a:a[0])}),r._assign=ah(n)},mounted(r,{value:e}){iP(r,e)},beforeUpdate(r,e,t){r._assign=ah(t)},updated(r,{value:e}){iP(r,e)}};function iP(r,e){const t=r.multiple;if(!(t&&!Oe(e)&&!gd(e))){for(let n=0,i=r.options.length;n-1:a.selected=e.has(o);else if(th(Ig(a),e)){r.selectedIndex!==n&&(r.selectedIndex=n);return}}!t&&r.selectedIndex!==-1&&(r.selectedIndex=-1)}}function Ig(r){return"_value"in r?r._value:r.value}function yk(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const _k={created(r,e,t){D_(r,e,t,null,"created")},mounted(r,e,t){D_(r,e,t,null,"mounted")},beforeUpdate(r,e,t,n){D_(r,e,t,n,"beforeUpdate")},updated(r,e,t,n){D_(r,e,t,n,"updated")}};function wk(r,e){switch(r){case"SELECT":return mk;case"TEXTAREA":return Dw;default:switch(e){case"checkbox":return aF;case"radio":return oF;default:return Dw}}}function D_(r,e,t,n,i){const o=wk(r.tagName,t.props&&t.props.type)[i];o&&o(r,e,t,n)}function PY(){Dw.getSSRProps=({value:r})=>({value:r}),oF.getSSRProps=({value:r},e)=>{if(e.props&&th(e.props.value,r))return{checked:!0}},aF.getSSRProps=({value:r},e)=>{if(Oe(r)){if(e.props&&iC(r,e.props.value)>-1)return{checked:!0}}else if(gd(r)){if(e.props&&r.has(e.props.value))return{checked:!0}}else if(r)return{checked:!0}},_k.getSSRProps=(r,e)=>{if(typeof e.type!="string")return;const t=wk(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(r,e)}}const UY=["ctrl","shift","alt","meta"],DY={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>UY.some(t=>r[`${t}Key`]&&!e.includes(t))},QY=(r,e)=>(t,...n)=>{for(let i=0;it=>{if(!("key"in t))return;const n=Us(t.key);if(e.some(i=>i===n||kY[i]===n))return r(t)},Ek={beforeMount(r,{value:e},{transition:t}){r._vod=r.style.display==="none"?"":r.style.display,t&&e?t.beforeEnter(r):om(r,e)},mounted(r,{value:e},{transition:t}){t&&e&&t.enter(r)},updated(r,{value:e,oldValue:t},{transition:n}){!e!=!t&&(n?e?(n.beforeEnter(r),om(r,!0),n.enter(r)):n.leave(r,()=>{om(r,!1)}):om(r,e))},beforeUnmount(r,{value:e}){om(r,e)}};function om(r,e){r.style.display=e?r._vod:"none"}function GY(){Ek.getSSRProps=({value:r})=>{if(!r)return{style:{display:"none"}}}}const Ck=ci({patchProp:_Y},sY);let ny,aP=!1;function Bk(){return ny||(ny=j4(Ck))}function bk(){return ny=aP?ny:K4(Ck),aP=!0,ny}const lx=(...r)=>{Bk().render(...r)},Tk=(...r)=>{bk().hydrate(...r)},Sk=(...r)=>{const e=Bk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=xk(n);if(!i)return;const a=e._component;!ar(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=t(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e},$Y=(...r)=>{const e=bk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=xk(n);if(i)return t(i,!0,i instanceof SVGElement)},e};function xk(r){return Hn(r)?document.querySelector(r):r}let oP=!1;const VY=()=>{oP||(oP=!0,PY(),GY())},jY=()=>{},KY=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:YO,Comment:Wa,EffectScope:MO,Fragment:ya,KeepAlive:sz,ReactiveEffect:p0,Static:Nf,Suspense:qW,Teleport:Mz,Text:qf,Transition:iF,TransitionGroup:LY,VueElement:CC,assertNumber:UW,callWithAsyncErrorHandling:ms,callWithErrorHandling:fu,camelize:Uo,capitalize:d0,cloneVNode:gl,compatUtils:aY,compile:jY,computed:Ze,createApp:Sk,createBlock:yC,createCommentVNode:Mr,createElementBlock:Yi,createElementVNode:eF,createHydrationRenderer:K4,createPropsRestProxy:Zz,createRenderer:j4,createSSRApp:$Y,createSlots:dz,createStaticVNode:Uz,createTextVNode:rF,createVNode:Pn,customRef:FW,defineAsyncComponent:az,defineComponent:v0,defineCustomElement:uk,defineEmits:Kz,defineExpose:Wz,defineProps:jz,defineSSRCustomElement:EY,get devtools(){return Np},effect:JK,effectScope:YK,getCurrentInstance:yh,getCurrentScope:q6,getTransitionRawChildren:pC,guardReactiveProps:Z4,h:EC,handleError:md,hydrate:Tk,initCustomFormatter:tY,initDirectivesForSSR:VY,inject:Be,isMemoSame:Ak,isProxy:DO,isReactive:Ff,isReadonly:Yf,isRef:Aa,isRuntimeOnly:Gz,isShallow:xy,isVNode:nh,markRaw:QO,mergeDefaults:qz,mergeProps:J4,nextTick:cC,normalizeClass:h0,normalizeProps:PK,normalizeStyle:c0,onActivated:T4,onBeforeMount:I4,onBeforeUnmount:mC,onBeforeUpdate:L4,onDeactivated:S4,onErrorCaptured:M4,onMounted:cr,onRenderTracked:R4,onRenderTriggered:F4,onScopeDispose:XK,onServerPrefetch:O4,onUnmounted:pr,onUpdated:vC,openBlock:ti,popScopeId:VW,provide:Qr,proxyRefs:GO,pushScopeId:$W,queuePostFlushCb:VO,reactive:vd,readonly:UO,ref:Fo,registerRuntimeCompiler:Hz,render:lx,renderList:fz,renderSlot:Rr,resolveComponent:N4,resolveDirective:hz,resolveDynamicComponent:cz,resolveFilter:iY,resolveTransitionHooks:Sg,setBlockTracking:rx,setDevtoolsHook:m4,setTransitionHooks:Xf,shallowReactive:u4,shallowReadonly:SW,shallowRef:c4,ssrContextKey:ok,ssrUtils:nY,stop:tW,toDisplayString:kK,toHandlerKey:Jm,toHandlers:pz,toRaw:Dr,toRef:f4,toRefs:rh,transformVNodeArgs:Nz,triggerRef:IW,unref:Rf,useAttrs:Xz,useCssModule:BY,useCssVars:bY,useSSRContext:sk,useSlots:Yz,useTransitionState:zO,vModelCheckbox:aF,vModelDynamic:_k,vModelRadio:oF,vModelSelect:mk,vModelText:Dw,vShow:Ek,version:lk,warn:PW,watch:ye,watchEffect:E4,watchPostEffect:C4,watchSyncEffect:rz,withAsyncContext:Jz,withCtx:jO,withDefaults:zz,withDirectives:lz,withKeys:HY,withMemo:eY,withModifiers:QY,withScopeId:jW},Symbol.toStringTag,{value:"Module"})),WY=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},zY={};function YY(r,e){const t=N4("router-view");return ti(),yC(t)}const XY=WY(zY,[["render",YY]]);var qY=Object.defineProperty,ZY=Object.defineProperties,JY=Object.getOwnPropertyDescriptors,sP=Object.getOwnPropertySymbols,tX=Object.prototype.hasOwnProperty,eX=Object.prototype.propertyIsEnumerable,AP=(r,e,t)=>e in r?qY(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Jn=(r,e)=>{for(var t in e||(e={}))tX.call(e,t)&&AP(r,t,e[t]);if(sP)for(var t of sP(e))eX.call(e,t)&&AP(r,t,e[t]);return r},bA=(r,e)=>ZY(r,JY(e)),rX=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),BC=rX;function nX(r,e,t){for(var n,i,a=t||oh,o=0,s=r.length,A=!1;o>1),i=+a(r[n],e),i<0?o=n+1:(s=n,A=!i);return A?o:~o}function oh(r,e){return r>e?1:r=0}function bC(r,e,t){var n=r.length;if(r[0]<=e)return 0;if(e<=r[n-1])return n-1;var i=void 0;if(t>0){for(i=1;i0?i-1:i:r[i-1]-e0||t&&o===0)})}function ul(){return!0}function yd(){return!1}function Jf(){}function oX(r){var e=!1,t,n,i;return function(){var a=Array.prototype.slice.call(arguments);return(!e||this!==i||!Fu(a,n))&&(e=!0,i=this,n=a,t=r.apply(this,arguments)),t}}function Re(){return function(){throw new Error("Unimplemented abstract method.")}()}var sX=0;function Ee(r){return r.ol_uid||(r.ol_uid=String(++sX))}var Ik="6.14.1",sh=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",AX=sh.indexOf("firefox")!==-1,lX=sh.indexOf("safari")!==-1&&sh.indexOf("chrom")==-1,uX=lX&&!!(sh.indexOf("version/15.4")>=0||sh.match(/cpu (os|iphone os) 15_4 like mac os x/)),cX=sh.indexOf("webkit")!==-1&&sh.indexOf("edge")==-1,Lk=sh.indexOf("macintosh")!==-1,td=typeof devicePixelRatio<"u"?devicePixelRatio:1,TC=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,hX=typeof Image<"u"&&Image.prototype.decode,Ok=function(){var r=!1;try{var e=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return r}(),fX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dX=function(r){fX(e,r);function e(t){var n=this,i="v"+Ik.split("-")[0],a="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+t+" for details.";return n=r.call(this,a)||this,n.code=t,n.name="AssertionError",n.message=a,n}return e}(Error),Fk=dX;function Le(r,e){if(!r)throw new Fk(e)}var sF=new Array(6);function xi(){return[1,0,0,1,0,0]}function iy(r){return y0(r,1,0,0,1,0,0)}function nv(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=r[4],s=r[5],A=e[0],l=e[1],u=e[2],c=e[3],h=e[4],f=e[5];return r[0]=t*A+i*l,r[1]=n*A+a*l,r[2]=t*u+i*c,r[3]=n*u+a*c,r[4]=t*h+i*f+o,r[5]=n*h+a*f+s,r}function y0(r,e,t,n,i,a,o){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r[4]=a,r[5]=o,r}function pX(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function bn(r,e){var t=e[0],n=e[1];return e[0]=r[0]*t+r[2]*n+r[4],e[1]=r[1]*t+r[3]*n+r[5],e}function gX(r,e){var t=Math.cos(e),n=Math.sin(e);return nv(r,y0(sF,t,n,-n,t,0,0))}function ay(r,e,t){return nv(r,y0(sF,e,0,0,t,0,0))}function vX(r,e,t){return y0(r,e,0,0,t,0,0)}function mX(r,e,t){return nv(r,y0(sF,1,0,0,1,e,t))}function yo(r,e,t,n,i,a,o,s){var A=Math.sin(a),l=Math.cos(a);return r[0]=n*l,r[1]=i*A,r[2]=-n*A,r[3]=i*l,r[4]=o*n*l-s*n*A+e,r[5]=o*i*A+s*i*l+t,r}function _0(r,e){var t=yX(e);Le(t!==0,32);var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],A=e[5];return r[0]=o/t,r[1]=-i/t,r[2]=-a/t,r[3]=n/t,r[4]=(a*A-o*s)/t,r[5]=-(n*A-i*s)/t,r}function yX(r){return r[0]*r[3]-r[1]*r[2]}var lP;function AF(r){var e="matrix("+r.join(", ")+")";if(TC)return e;var t=lP||(lP=document.createElement("div"));return t.style.transform=e,t.style.transform}var Fm={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},aa={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function oa(r){for(var e=Di(),t=0,n=r.length;ti&&(A=A|aa.RIGHT),sa&&(A=A|aa.ABOVE),A===aa.UNKNOWN&&(A=aa.INTERSECTING),A}function Di(){return[1/0,1/0,-1/0,-1/0]}function Ho(r,e,t,n,i){return i?(i[0]=r,i[1]=e,i[2]=t,i[3]=n,i):[r,e,t,n]}function wh(r){return Ho(1/0,1/0,-1/0,-1/0,r)}function Pf(r,e){var t=r[0],n=r[1];return Ho(t,n,t,n,e)}function wX(r,e){var t=wh(e);return uF(t,r)}function xC(r,e,t,n,i){var a=wh(i);return cF(a,r,e,t,n)}function EX(r,e){var t=wh(e);return Rk(t,r)}function vl(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function CX(r,e,t){return Math.abs(r[0]-e[0])r[2]&&(r[2]=e[2]),e[1]r[3]&&(r[3]=e[3]),r}function Uf(r,e){e[0]r[2]&&(r[2]=e[0]),e[1]r[3]&&(r[3]=e[1])}function uF(r,e){for(var t=0,n=e.length;te[0]?n[0]=r[0]:n[0]=e[0],r[1]>e[1]?n[1]=r[1]:n[1]=e[1],r[2]=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function av(r){return r[2]=o&&g<=A),!n&&a&aa.RIGHT&&!(i&aa.RIGHT)&&(m=f-(h-A)*d,n=m>=s&&m<=l),!n&&a&aa.BELOW&&!(i&aa.BELOW)&&(g=h-(f-s)/d,n=g>=o&&g<=A),!n&&a&aa.LEFT&&!(i&aa.LEFT)&&(m=f-(h-o)*d,n=m>=s&&m<=l)}return n}function hF(r,e,t,n){var i=[];if(n>1)for(var a=r[2]-r[0],o=r[3]-r[1],s=0;s=t[2])){var i=Kr(t),a=Math.floor((n[0]-t[0])/i),o=a*i;r[0]-=o,r[2]-=o}return r}var xX=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:oa,buffer:_o,clone:lF,closestSquaredDistanceXY:_h,containsCoordinate:mA,containsExtent:ps,containsXY:SC,coordinateRelationship:Qw,createEmpty:Di,createOrUpdate:Ho,createOrUpdateEmpty:wh,createOrUpdateFromCoordinate:Pf,createOrUpdateFromCoordinates:wX,createOrUpdateFromFlatCoordinates:xC,createOrUpdateFromRings:EX,equals:vl,approximatelyEquals:CX,extend:Ah,extendCoordinate:Uf,extendCoordinates:uF,extendFlatCoordinates:cF,extendRings:Rk,extendXY:Mk,forEachCorner:IC,getArea:My,getBottomLeft:w0,getBottomRight:iv,getCenter:Ya,getCorner:Nk,getEnlargedArea:BX,getForViewAndSize:Df,getHeight:Li,getIntersectionArea:bX,getIntersection:ks,getMargin:TX,getSize:SX,getTopLeft:TA,getTopRight:E0,getWidth:Kr,intersects:qn,isEmpty:av,returnOrUpdate:Pk,scaleFromCenter:Uk,intersectsSegment:Dk,applyTransform:hF,wrapX:Qk},Symbol.toStringTag,{value:"Module"}));function Un(r,e,t){return Math.min(Math.max(r,e),t)}var IX=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),kk=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function LX(r,e,t,n,i,a){var o=i-t,s=a-n;if(o!==0||s!==0){var A=((r-t)*o+(e-n)*s)/(o*o+s*s);A>1?(t=i,n=a):A>0&&(t+=o*A,n+=s*A)}return Qf(r,e,t,n)}function Qf(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function OX(r){for(var e=r.length,t=0;ti&&(i=o,n=a)}if(i===0)return null;var s=r[n];r[n]=r[t],r[t]=s;for(var A=t+1;A=0;h--){c[h]=r[h][e]/r[h][h];for(var f=h-1;f>=0;f--)r[f][e]-=r[f][h]*c[h]}return c}function uP(r){return r*180/Math.PI}function Kc(r){return r*Math.PI/180}function Wc(r,e){var t=r%e;return t*e<0?t+e:t}function ou(r,e,t){return r+t*(e-r)}function fF(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function cP(r,e){return Math.round(fF(r,e))}function zp(r,e){return Math.floor(fF(r,e))}function Mc(r,e){return Math.ceil(fF(r,e))}var Hk=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Gk=/^([a-z]*)$|^hsla?\(.*\)$/i;function du(r){return typeof r=="string"?r:jk(r)}function $k(r){var e=document.createElement("div");if(e.style.color=r,e.style.color!==""){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}else return""}var Vk=function(){var r=1024,e={},t=0;return function(n){var i;if(e.hasOwnProperty(n))i=e[n];else{if(t>=r){var a=0;for(var o in e)a++&3||(delete e[o],--t)}i=FX(n),e[n]=i,++t}return i}}();function lh(r){return Array.isArray(r)?r:Vk(r)}function FX(r){var e,t,n,i,a;if(Gk.exec(r)&&(r=$k(r)),Hk.exec(r)){var o=r.length-1,s=void 0;o<=4?s=1:s=2;var A=o===4||o===8;e=parseInt(r.substr(1+0*s,s),16),t=parseInt(r.substr(1+1*s,s),16),n=parseInt(r.substr(1+2*s,s),16),A?i=parseInt(r.substr(1+3*s,s),16):i=255,s==1&&(e=(e<<4)+e,t=(t<<4)+t,n=(n<<4)+n,A&&(i=(i<<4)+i)),a=[e,t,n,i/255]}else r.indexOf("rgba(")==0?(a=r.slice(5,-1).split(",").map(Number),hP(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),hP(a)):Le(!1,14);return a}function hP(r){return r[0]=Un(r[0]+.5|0,0,255),r[1]=Un(r[1]+.5|0,0,255),r[2]=Un(r[2]+.5|0,0,255),r[3]=Un(r[3],0,1),r}function jk(r){var e=r[0];e!=(e|0)&&(e=e+.5|0);var t=r[1];t!=(t|0)&&(t=t+.5|0);var n=r[2];n!=(n|0)&&(n=n+.5|0);var i=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+e+","+t+","+n+","+i+")"}function RX(r){return Gk.test(r)&&(r=$k(r)),Hk.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var MX=function(){function r(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return r.prototype.clear=function(){this.cache_={},this.cacheSize_=0},r.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},r.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var n=this.cache_[t];!(e++&3)&&!n.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}},r.prototype.get=function(e,t,n){var i=fP(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=fP(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function fP(r,e,t){var n=t?du(t):"null";return e+":"+r+":"+n}var kw=new MX,NX=function(){function r(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}return r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0},r}();function PX(r){r.stopPropagation()}var Vo=NX,ed={PROPERTYCHANGE:"propertychange"},Ce=typeof Object.assign=="function"?Object.assign:function(r,e){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(r),n=1,i=arguments.length;n0:!1},e.prototype.removeEventListener=function(t,n){var i=this.listeners_&&this.listeners_[t];if(i){var a=i.indexOf(n);a!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[a]=Jf,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(BC),wd=DX,xe={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function je(r,e,t,n,i){if(n&&n!==r&&(t=t.bind(n)),i){var a=t;t=function(){r.removeEventListener(e,t),a.apply(this,arguments)}}var o={target:r,type:e,listener:t};return r.addEventListener(e,t),o}function Ny(r,e,t,n){return je(r,e,t,n,!0)}function Yr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),_d(r))}var QX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),C0=function(r){QX(e,r);function e(){var t=r.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return e.prototype.changed=function(){++this.revision_,this.dispatchEvent(xe.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,a=new Array(i),o=0;o=r.maxResolution)return!1;var n=e.zoom;return n>r.minZoom&&n<=r.maxZoom}var Ed=VX;function sm(r,e,t){var n=t!==void 0?r.toFixed(t):""+r,i=n.indexOf(".");return i=i===-1?n.length:i,i>e?n:new Array(1+e-i).join("0")+n}function Wk(r,e){for(var t=(""+r).split("."),n=(""+e).split("."),i=0;io)return 1;if(o>a)return-1}return 0}function zk(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function jX(r,e){var t=e.getRadius(),n=e.getCenter(),i=n[0],a=n[1],o=r[0],s=r[1],A=o-i,l=s-a;A===0&&l===0&&(A=1);var u=Math.sqrt(A*A+l*l),c=i+t*A/u,h=a+t*l/u;return[c,h]}function gF(r,e){var t=r[0],n=r[1],i=e[0],a=e[1],o=i[0],s=i[1],A=a[0],l=a[1],u=A-o,c=l-s,h=u===0&&c===0?0:(u*(t-o)+c*(n-s))/(u*u+c*c||0),f,d;return h<=0?(f=o,d=s):h>=1?(f=A,d=l):(f=o+h*u,d=s+h*c),[f,d]}function uA(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function vF(r,e){var t=Math.cos(e),n=Math.sin(e),i=r[0]*t-r[1]*n,a=r[1]*t+r[0]*n;return r[0]=i,r[1]=a,r}function Yk(r,e){return r[0]*=e,r[1]*=e,r}function pu(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function pP(r,e){return Math.sqrt(pu(r,e))}function KX(r,e){return pu(r,gF(r,e))}function mF(r,e){if(e.canWrapX()){var t=Kr(e.getExtent()),n=Xk(r,e,t);n&&(r[0]-=n*t)}return r}function Xk(r,e,t){var n=e.getExtent(),i=0;if(e.canWrapX()&&(r[0]n[2])){var a=t||Kr(n);i=Math.floor((r[0]-n[0])/a)}return i}var WX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zX=function(r){WX(e,r);function e(t){var n=r.call(this)||this;return n.map_=t,n}return e.prototype.dispatchRenderEvent=function(t,n){Re()},e.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,a=t.pixelToCoordinateTransform;yo(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),_0(a,i)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o,s,A,l){var u,c=n.viewState;function h(tt,q,rt,nt){return o.call(s,q,tt?rt:null,nt)}var f=c.projection,d=mF(t.slice(),f),g=[[0,0]];if(f.canWrapX()&&a){var m=f.getExtent(),v=Kr(m);g.push([-v,0],[v,0])}for(var y=n.layerStatesArray,w=y.length,C=[],O=[],F=0;F=0;--I){var T=y[I],L=T.layer;if(L.hasRenderer()&&Hw(T,c)&&A.call(l,L)){var N=L.getRenderer(),x=L.getSource();if(N&&x){var S=x.getWrapX()?d:t,P=h.bind(null,T.managed);O[0]=S[0]+g[F][0],O[1]=S[1]+g[F][1],u=N.forEachFeatureAtCoordinate(O,n,i,P,C)}if(u)return u}}if(C.length!==0){var U=1/C.length;return C.forEach(function(tt,q){return tt.distanceSq+=q*U}),C.sort(function(tt,q){return tt.distanceSq-q.distanceSq}),C.some(function(tt){return u=tt.callback(tt.feature,tt.layer,tt.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){return Re()},e.prototype.hasFeatureAtCoordinate=function(t,n,i,a,o,s){var A=this.forEachFeatureAtCoordinate(t,n,i,a,ul,this,o,s);return A!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Re()},e.prototype.scheduleExpireIconCache=function(t){kw.canExpireCache()&&t.postRenderFunctions.push(YX)},e}(BC);function YX(r,e){kw.expire()}var XX=zX,qX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ZX=function(r){qX(e,r);function e(t,n,i,a){var o=r.call(this,t)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=a,o}return e}(Vo),oy=ZX,Q_="ol-hidden",JX="ol-selectable",ml="ol-unselectable",gP="ol-unsupported",Cd="ol-control",Gw="ol-collapsed",tq=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"),vP=["style","variant","weight","size","lineHeight","family"],qk=function(r){var e=r.match(tq);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=vP.length;n=0;--s)a[s].renderDeclutter(t);nq(this.element_,this.children_),this.dispatchRenderEvent(No.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){for(var s=n.viewState,A=n.layerStatesArray,l=A.length,u=l-1;u>=0;--u){var c=A[u],h=c.layer;if(h.hasRenderer()&&Hw(c,s)&&o(h)){var f=h.getRenderer(),d=f.getDataAtPixel(t,n,i);if(d){var g=a(h,d);if(g)return g}}}},e}(XX),r8=cq,si={ADD:"add",REMOVE:"remove"},n8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yP={LENGTH:"length"},k_=function(r){n8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.element=n,a.index=i,a}return e}(Vo),hq=function(r){n8(e,r);function e(t,n){var i=r.call(this)||this;i.on,i.once,i.un;var a=n||{};if(i.unique_=!!a.unique,i.array_=t||[],i.unique_)for(var o=0,s=i.array_.length;o0;)this.pop()},e.prototype.extend=function(t){for(var n=0,i=t.length;nthis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Yr(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(xe.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Yr(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Yr),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},e}(wd),_q=yq,ZA={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},wi={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Ww=1/0,wq=function(){function r(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return r.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,_d(this.queuedElements_)},r.prototype.dequeue=function(){var e=this.elements_,t=this.priorities_,n=e[0];e.length==1?(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},r.prototype.enqueue=function(e){Le(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=Ww?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1},r.prototype.getCount=function(){return this.elements_.length},r.prototype.getLeftChildIndex_=function(e){return e*2+1},r.prototype.getRightChildIndex_=function(e){return e*2+2},r.prototype.getParentIndex_=function(e){return e-1>>1},r.prototype.heapify_=function(){var e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)},r.prototype.isEmpty=function(){return this.elements_.length===0},r.prototype.isKeyQueued=function(e){return e in this.queuedElements_},r.prototype.isQueued=function(e){return this.isKeyQueued(this.keyFunction_(e))},r.prototype.siftUp_=function(e){for(var t=this.elements_,n=this.priorities_,i=t.length,a=t[e],o=n[e],s=e;e>1;){var A=this.getLeftChildIndex_(e),l=this.getRightChildIndex_(e),u=le;){var s=this.getParentIndex_(t);if(i[s]>o)n[t]=n[s],i[t]=i[s],t=s;else break}n[t]=a,i[t]=o},r.prototype.reprioritize=function(){var e=this.priorityFunction_,t=this.elements_,n=this.priorities_,i=0,a=t.length,o,s,A;for(s=0;s0;)o=this.dequeue()[0],s=o.getKey(),a=o.getState(),a===Te.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,o.load())},e}(Eq),bq=Bq;function Tq(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return Ww;var a=r.viewState.center,o=n[0]-a[0],s=n[1]-a[1];return 65536*Math.log(i)+Math.sqrt(o*o+s*s)/i}var pt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},ov={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},yA={};yA[ov.RADIANS]=6370997/(2*Math.PI);yA[ov.DEGREES]=2*Math.PI*6370997/360;yA[ov.FEET]=.3048;yA[ov.METERS]=1;yA[ov.USFEET]=1200/3937;var ho=ov,In={ANIMATING:0,INTERACTING:1},cs={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Sq=42,yF=256,xq=function(){function r(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return r.prototype.canWrapX=function(){return this.canWrapX_},r.prototype.getCode=function(){return this.code_},r.prototype.getExtent=function(){return this.extent_},r.prototype.getUnits=function(){return this.units_},r.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||yA[this.units_]},r.prototype.getWorldExtent=function(){return this.worldExtent_},r.prototype.getAxisOrientation=function(){return this.axisOrientation_},r.prototype.isGlobal=function(){return this.global_},r.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)},r.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},r.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},r.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)},r.prototype.setWorldExtent=function(e){this.worldExtent_=e},r.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},r.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},r}(),Ru=xq,Iq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),b0=6378137,Yp=Math.PI*b0,Lq=[-Yp,-Yp,Yp,Yp],Oq=[-180,-85,180,85],H_=b0*Math.log(Math.tan(Math.PI/2)),fp=function(r){Iq(e,r);function e(t){return r.call(this,{code:t,units:ho.METERS,extent:Lq,global:!0,worldExtent:Oq,getPointResolution:function(n,i){return n/IX(i[1]/b0)}})||this}return e}(Ru),_P=[new fp("EPSG:3857"),new fp("EPSG:102100"),new fp("EPSG:102113"),new fp("EPSG:900913"),new fp("http://www.opengis.net/def/crs/EPSG/0/3857"),new fp("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Fq(r,e,t){var n=r.length,i=t>1?t:2,a=e;a===void 0&&(i>2?a=r.slice():a=new Array(n));for(var o=0;oH_?s=H_:s<-H_&&(s=-H_),a[o+1]=s}return a}function Rq(r,e,t){var n=r.length,i=t>1?t:2,a=e;a===void 0&&(i>2?a=r.slice():a=new Array(n));for(var o=0;o=2;--l)o[s+l]=e[s+l]}return o}}function $q(r,e,t,n){var i=Ve(r),a=Ve(e);Fg(i,a,CP(t)),Fg(a,i,CP(n))}function el(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=nd(r,e);return n===_F&&t}function nd(r,e){var t=r.getCode(),n=e.getCode(),i=a8(t,n);return i||(i=LC),i}function Gy(r,e){var t=Ve(r),n=Ve(e);return nd(t,n)}function uh(r,e,t){var n=Gy(e,t);return n(r,void 0,r.length)}function Xw(r,e,t,n){var i=Gy(e,t);return hF(r,i,void 0,n)}var Vq=null;function id(){return Vq}function Rg(r,e){return r}function Mn(r,e){return fx&&!uA(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(fx=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function OC(r,e){return r}function gs(r,e){return r}function jq(r,e){return r}function BP(r,e,t){return function(n){var i=n[0],a=n[1],o,s;if(r.canWrapX()){var A=r.getExtent(),l=Kr(A);s=Xk(n,r,l),s&&(i=i-s*l),i=Un(i,A[0],A[2]),a=Un(a,A[1],A[3]),o=t([i,a])}else o=t(n);return s&&e.canWrapX()&&(o[0]+=s*Kr(e.getExtent())),o}}function Kq(){dx(_P),dx(EP),Gq(EP,_P,Fq,Rq)}Kq();function bP(r,e,t){return function(n,i,a,o,s){if(n){if(!i&&!e)return n;var A=e?0:a[0]*i,l=e?0:a[1]*i,u=s?s[0]:0,c=s?s[1]:0,h=r[0]+A/2+u,f=r[2]-A/2+u,d=r[1]+l/2+c,g=r[3]-l/2+c;h>f&&(h=(f+h)/2,f=h),d>g&&(d=(g+d)/2,g=d);var m=Un(n[0],h,f),v=Un(n[1],d,g);if(o&&t&&i){var y=30*i;m+=-y*Math.log(1+Math.max(0,h-n[0])/y)+y*Math.log(1+Math.max(0,n[0]-f)/y),v+=-y*Math.log(1+Math.max(0,d-n[1])/y)+y*Math.log(1+Math.max(0,n[1]-g)/y)}return[m,v]}}}function Wq(r){return r}function EF(r,e,t,n){var i=Kr(e)/t[0],a=Li(e)/t[1];return n?Math.min(r,Math.max(i,a)):Math.min(r,Math.min(i,a))}function CF(r,e,t){var n=Math.min(r,e),i=50;return n*=Math.log(1+i*Math.max(0,r/e-1))/i+1,t&&(n=Math.max(n,t),n/=Math.log(1+i*Math.max(0,t/r-1))/i+1),Un(n,t/2,e*2)}function zq(r,e,t,n){return function(i,a,o,s){if(i!==void 0){var A=r[0],l=r[r.length-1],u=t?EF(A,t,o,n):A;if(s){var c=e!==void 0?e:!0;return c?CF(i,u,l):Un(i,l,u)}var h=Math.min(u,i),f=Math.floor(bC(r,h,a));return r[f]>u&&f1)c=t;else if(h>0){for(var f=0;fi&&(i=l),a=s,o=A}return i}function IF(r,e,t,n,i){for(var a=0,o=t.length;a0;){for(var c=l.pop(),h=l.pop(),f=0,d=r[h],g=r[h+1],m=r[c],v=r[c+1],y=h+n;yf&&(u=y,f=O)}f>i&&(A[(u-e)/n]=1,h+n0&&g>f)&&(d<0&&m0&&m>d)){l=c,u=h;continue}a[o++]=l,a[o++]=u,s=l,A=u,l=c,u=h}}return a[o++]=l,a[o++]=u,o}function u8(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;Aa&&(l-s)*(a-A)-(i-s)*(u-A)>0&&o++:u<=a&&(l-s)*(a-A)-(i-s)*(u-A)<0&&o--,s=l,A=u}return o!==0}function MF(r,e,t,n,i,a){if(t.length===0||!Tf(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;oC&&(l=(u+c)/2,MF(r,e,t,n,l,d)&&(w=l,C=O)),u=c}return isNaN(w)&&(w=i[a]),o?(o.push(w,d,C),o):[w,d,C]}function f8(r,e,t,n,i){for(var a=[],o=0,s=t.length;o=i[0]&&a[2]<=i[2]||a[1]>=i[1]&&a[3]<=i[3]?!0:d8(r,e,t,n,function(o,s){return Dk(i,o,s)}):!1}function _3(r,e,t,n,i){for(var a=0,o=t.length;a0}function g8(r,e,t,n,i){for(var a=i!==void 0?i:!1,o=0,s=t.length;o1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);for(var a=0;a0},e.prototype.getInteracting=function(){return this.hints_[In.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(In.ANIMATING,-this.hints_[In.ANIMATING]);for(var t,n=0,i=this.animations_.length;n=0;--i){for(var a=this.animations_[i],o=!0,s=0,A=a.length;s0?u/l.duration:1;c>=1?(l.complete=!0,c=1):o=!1;var h=l.easing(c);if(l.sourceCenter){var f=l.sourceCenter[0],d=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;var v=f+h*(g-f),y=d+h*(m-d);this.targetCenter_=[v,y]}if(l.sourceResolution&&l.targetResolution){var w=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var C=this.getViewportSize_(this.getRotation()),O=this.constraints_.resolution(w,0,C,!0);this.targetCenter_=this.calculateCenterZoom(O,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=w,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){var F=h===1?Wc(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var I=this.constraints_.rotation(F,!0);this.targetCenter_=this.calculateCenterRotate(I,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=F}if(this.applyTargetState_(!0),n=!0,!l.complete)break}}if(o){this.animations_[i]=null,this.setHint(In.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=a[0].callback;T&&G_(T,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,n){var i,a=this.getCenterInternal();return a!==void 0&&(i=[a[0]-n[0],a[1]-n[1]],vF(i,t-this.getRotation()),zk(i,n)),i},e.prototype.calculateCenterZoom=function(t,n){var i,a=this.getCenterInternal(),o=this.getResolution();if(a!==void 0&&o!==void 0){var s=n[0]-t*(n[0]-a[0])/o,A=n[1]-t*(n[1]-a[1])/o;i=[s,A]}return i},e.prototype.getViewportSize_=function(t){var n=this.viewportSize_;if(t){var i=n[0],a=n[1];return[Math.abs(i*Math.cos(t))+Math.abs(a*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(a*Math.cos(t))]}else return n},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t&&Rg(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(cs.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var n=this.calculateExtentInternal(t);return OC(n,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var n=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();Le(i,1);var a=this.getResolution();Le(a!==void 0,2);var o=this.getRotation();return Le(o!==void 0,3),Df(i,a,o,n)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(cs.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(gs(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=Kr(t)/i[0],o=Li(t)/i[1];return Math.max(a,o)},e.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.maxResolution_),a=this.minResolution_,o=Math.log(i/a)/Math.log(n);return function(s){var A=i/Math.pow(n,s*o);return A}},e.prototype.getRotation=function(){return this.get(cs.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),a=this.minResolution_,o=Math.log(i/a)/n;return function(s){var A=Math.log(i/s)/n/o;return A}},e.prototype.getViewportSizeMinusPadding_=function(t){var n=this.getViewportSize_(t),i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},e.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),i=this.getRotation(),a=this.getCenterInternal(),o=this.padding_;if(o){var s=this.getViewportSizeMinusPadding_();a=Mb(a,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],n,i)}return{center:a.slice(0),projection:t!==void 0?t:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,n=this.getResolution();return n!==void 0&&(t=this.getZoomForResolution(n)),t},e.prototype.getZoomForResolution=function(t){var n=this.minZoom_||0,i,a;if(this.resolutions_){var o=bC(this.resolutions_,t,1);n=o,i=this.resolutions_[o],o==this.resolutions_.length-1?a=2:a=i/this.resolutions_[o+1]}else i=this.maxResolution_,a=this.zoomFactor_;return n+Math.log(i/t)/Math.log(a)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var n=Un(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,Un(t-n,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,n){var i;if(Le(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){Le(!av(t),25);var a=gs(t,this.getProjection());i=ch(a)}else if(t.getType()===pt.CIRCLE){var a=gs(t.getExtent(),this.getProjection());i=ch(a),i.rotate(this.getRotation(),Ya(a))}else{var o=id();o?i=t.clone().transform(o,this.getProjection()):i=t}this.fitInternal(i,n)},e.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),a=Math.sin(-n),o=t.getFlatCoordinates(),s=t.getStride(),A=1/0,l=1/0,u=-1/0,c=-1/0,h=0,f=o.length;h0&&r[1]>0}function m8(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]*e+.5|0,t[1]=r[1]*e+.5|0,t}function Wi(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var N3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function y8(r){if(r instanceof Ed){r.setMapInternal(null);return}r instanceof B0&&r.getLayers().forEach(y8)}function _8(r,e){if(r instanceof Ed){r.setMapInternal(e);return}if(r instanceof B0)for(var t=r.getLayers().getArray(),n=0,i=t.length;n=0;l--){var u=A[l];if(!(u.getMap()!==this||!u.getActive()||!this.getTargetElement())){var c=u.handleEvent(t);if(!c||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){var i=this.maxTilesLoading_,a=i;if(t){var o=t.viewHints;if(o[In.ANIMATING]||o[In.INTERACTING]){var s=Date.now()-t.time>8;i=s?0:8,a=s?0:2}}n.getTilesLoading()0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Fu(n,this.renderedAttributions_)){Jk(this.ulElement_);for(var a=0,o=n.length;a0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:Gs}):n.setRotation(0))}},e.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.rotation_){var a="rotate("+i+"rad)";if(this.autoHide_){var o=this.element.classList.contains(Q_);!o&&i===0?this.element.classList.add(Q_):o&&i!==0&&this.element.classList.remove(Q_)}this.label_.style.transform=a}this.rotation_=i}},e}(Nr),C8=V3,j3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),K3=function(r){j3(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this;var a=i.className!==void 0?i.className:"ol-zoom",o=i.delta!==void 0?i.delta:1,s=i.zoomInClassName!==void 0?i.zoomInClassName:a+"-in",A=i.zoomOutClassName!==void 0?i.zoomOutClassName:a+"-out",l=i.zoomInLabel!==void 0?i.zoomInLabel:"+",u=i.zoomOutLabel!==void 0?i.zoomOutLabel:"–",c=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",h=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=c,f.appendChild(typeof l=="string"?document.createTextNode(l):l),f.addEventListener(xe.CLICK,n.handleClick_.bind(n,o),!1);var d=document.createElement("button");d.className=A,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof u=="string"?document.createTextNode(u):u),d.addEventListener(xe.CLICK,n.handleClick_.bind(n,-o),!1);var g=a+" "+ml+" "+Cd,m=n.element;return m.className=g,m.appendChild(f),m.appendChild(d),n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleClick_=function(t,n){n.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var n=this.getMap(),i=n.getView();if(i){var a=i.getZoom();if(a!==void 0){var o=i.getConstrainedZoom(a+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:o,duration:this.duration_,easing:Gs})):i.setZoom(o)}}},e}(Nr),B8=K3,W3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),RP=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],MP={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},z3=function(r){W3(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this,n.on,n.once,n.un,n.keys_=i.keys!==void 0?i.keys:!1,n.source_=i.source,n.isInFullscreen_=!1,n.boundHandleMapTargetChange_=n.handleMapTargetChange_.bind(n),n.cssClassName_=i.className!==void 0?i.className:"ol-full-screen",n.documentListeners_=[],n.activeClassName_=i.activeClassName!==void 0?i.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=i.inactiveClassName!==void 0?i.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var a=i.label!==void 0?i.label:"⤢";n.labelNode_=typeof a=="string"?document.createTextNode(a):a;var o=i.labelActive!==void 0?i.labelActive:"×";n.labelActiveNode_=typeof o=="string"?document.createTextNode(o):o;var s=i.tipLabel?i.tipLabel:"Toggle full-screen";return n.button_=document.createElement("button"),n.button_.title=s,n.button_.setAttribute("type","button"),n.button_.appendChild(n.labelNode_),n.button_.addEventListener(xe.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat(ml," ").concat(Cd),n.element.appendChild(n.button_),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){var t=this.getMap();if(t){var n=t.getOwnerDocument();if(NP(n))if(PP(n))X3(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?Y3(i):b8(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=PP(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(Lg(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(MP.ENTERFULLSCREEN)):(Lg(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(MP.LEAVEFULLSCREEN)),t.updateSize())}},e.prototype.setClassName_=function(t,n){var i,a,o,s;n?((i=t.classList).remove.apply(i,this.inactiveClassName_),(a=t.classList).add.apply(a,this.activeClassName_)):((o=t.classList).remove.apply(o,this.activeClassName_),(s=t.classList).add.apply(s,this.inactiveClassName_))},e.prototype.setMap=function(t){var n=this.getMap();n&&n.removeChangeListener(wi.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(wi.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,n=0,i=t.length;nd*Pb||f>g*Pb?this.resetExtent_():ps(l,o)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getSize(),a=t.getView(),o=a.calculateExtentInternal(i),s=n.getView(),A=Math.log(Pb/$_)/Math.LN2,l=1/(Math.pow(2,A/2)*$_);Uk(o,l),s.fitInternal(ch(o))},e.prototype.recenter_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getView(),a=n.getView();a.setCenterInternal(i.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),n=this.ovmap_;if(!(!t.isRendered()||!n.isRendered())){var i=t.getSize(),a=t.getView(),o=n.getView(),s=this.rotateWithView_?0:-a.getRotation(),A=this.boxOverlay_,l=this.boxOverlay_.getElement(),u=a.getCenterInternal(),c=a.getResolution(),h=o.getResolution(),f=i[0]*c/h,d=i[1]*c/h;if(A.setPosition(u),l){l.style.width=f+"px",l.style.height=d+"px";var g="rotate("+s+"rad)";l.style.transform=g}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Ny(this.ovmap_,ZA.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(Gw),this.collapsed_?Lg(this.collapseLabel_,this.label_):Lg(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(Nr),aZ=iZ,oZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ub="units",af={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},sZ=[1,2,5],Db=25.4/.28,AZ=function(r){oZ(e,r);function e(t){var n=this,i=t||{},a=i.className!==void 0?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.on,n.once,n.un,n.innerElement_=document.createElement("div"),n.innerElement_.className=a+"-inner",n.element.className=a+" "+ml,n.element.appendChild(n.innerElement_),n.viewState_=null,n.minWidth_=i.minWidth!==void 0?i.minWidth:64,n.renderedVisible_=!1,n.renderedWidth_=void 0,n.renderedHTML_="",n.addChangeListener(Ub,n.handleUnitsChanged_),n.setUnits(i.units||af.METRIC),n.scaleBar_=i.bar||!1,n.scaleBarSteps_=i.steps||4,n.scaleBarText_=i.text||!1,n.dpi_=i.dpi||void 0,n}return e.prototype.getUnits=function(){return this.get(Ub)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Ub,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var n=t.center,i=t.projection,a=this.getUnits(),o=a==af.DEGREES?ho.DEGREES:ho.METERS,s=Yw(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||Db)/Db,l=A*s,u="";if(a==af.DEGREES){var c=yA[ho.DEGREES];l*=c,l=A)break;++h}var v;this.scaleBar_?v=this.createScaleBar(d,f,u):v=f.toFixed(g<0?-g:0)+" "+u,this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=d&&(this.innerElement_.style.width=d+"px",this.renderedWidth_=d),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)},e.prototype.createScaleBar=function(t,n,i){for(var a="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),o=[],s=t/this.scaleBarSteps_,A="#ffffff",l=0;l
'+this.createMarker("relative",l)+(l%2===0||this.scaleBarSteps_===2?this.createStepText(l,t,!1,n,i):"")+""),l===this.scaleBarSteps_-1&&o.push(this.createStepText(l+1,t,!0,n,i)),A==="#ffffff"?A="#000000":A="#ffffff";var u;this.scaleBarText_?u='
'+a+"
":u="";var c='
'+u+o.join("")+"
";return c},e.prototype.createMarker=function(t,n){var i=t==="absolute"?3:-10;return'
'},e.prototype.createStepText=function(t,n,i,a,o){var s=t===0?0:Math.round(a/this.scaleBarSteps_*t*100)/100,A=s+(t===0?"":" "+o),l=t===0?-3:n/this.scaleBarSteps_*-1,u=t===0?0:n/this.scaleBarSteps_*2;return'
'+A+"
"},e.prototype.getScaleForResolution=function(){var t=Yw(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,ho.METERS),n=this.dpi_||Db,i=1e3/25.4;return parseFloat(t.toString())*i*n},e.prototype.render=function(t){var n=t.frameState;n?this.viewState_=n.viewState:this.viewState_=null,this.updateElement_()},e}(Nr),lZ=AZ,uZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Am={VERTICAL:0,HORIZONTAL:1},cZ=function(r){uZ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render})||this,n.dragListenerKeys_=[],n.currentResolution_=void 0,n.direction_=Am.VERTICAL,n.dragging_,n.heightLimit_=0,n.widthLimit_=0,n.startX_,n.startY_,n.thumbSize_=null,n.sliderInitialized_=!1,n.duration_=i.duration!==void 0?i.duration:200;var a=i.className!==void 0?i.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=a+"-thumb "+ml;var s=n.element;return s.className=a+" "+ml+" "+Cd,s.appendChild(o),s.addEventListener(tl.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(tl.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(tl.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(xe.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(xe.CLICK,PX,!1),n}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),t&&t.render()},e.prototype.initSlider_=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(n===0&&i===0)return this.sliderInitialized_=!1;var a=getComputedStyle(t);n-=parseFloat(a.paddingRight)+parseFloat(a.paddingLeft),i-=parseFloat(a.paddingTop)+parseFloat(a.paddingBottom);var o=t.firstElementChild,s=getComputedStyle(o),A=o.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),l=o.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.thumbSize_=[A,l],n>i?(this.direction_=Am.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=Am.VERTICAL,this.heightLimit_=i-l),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var n=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),a=this.getResolutionForPosition_(i),o=n.getConstrainedZoom(n.getZoomForResolution(a));n.animateInternal({zoom:o,duration:this.duration_,easing:Gs})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(n.style.left),this.startY_=t.clientY-parseFloat(n.style.top),this.dragging_=!0,this.dragListenerKeys_.length===0){var i=this.handleDraggerDrag_,a=this.handleDraggerEnd_,o=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(je(o,tl.POINTERMOVE,i,this),je(o,tl.POINTERUP,a,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var n=t.clientX-this.startX_,i=t.clientY-this.startY_,a=this.getRelativePosition_(n,i);this.currentResolution_=this.getResolutionForPosition_(a),this.getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){if(this.dragging_){var n=this.getMap().getView();n.endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(Yr),this.dragListenerKeys_.length=0}},e.prototype.setThumbPosition_=function(t){var n=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==Am.HORIZONTAL?i.style.left=this.widthLimit_*n+"px":i.style.top=this.heightLimit_*n+"px"},e.prototype.getRelativePosition_=function(t,n){var i;return this.direction_===Am.HORIZONTAL?i=t/this.widthLimit_:i=n/this.heightLimit_,Un(i,0,1)},e.prototype.getResolutionForPosition_=function(t){var n=this.getMap().getView().getResolutionForValueFunction();return n(1-t)},e.prototype.getPositionForResolution_=function(t){var n=this.getMap().getView().getValueForResolutionFunction();return Un(1-n(t),0,1)},e.prototype.render=function(t){if(t.frameState&&!(!this.sliderInitialized_&&!this.initSlider_())){var n=t.frameState.viewState.resolution;this.currentResolution_=n,this.setThumbPosition_(n)}},e}(Nr),hZ=cZ,fZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dZ=function(r){fZ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this,n.extent=i.extent?i.extent:null;var a=i.className!==void 0?i.className:"ol-zoom-extent",o=i.label!==void 0?i.label:"E",s=i.tipLabel!==void 0?i.tipLabel:"Fit to extent",A=document.createElement("button");A.setAttribute("type","button"),A.title=s,A.appendChild(typeof o=="string"?document.createTextNode(o):o),A.addEventListener(xe.CLICK,n.handleClick_.bind(n),!1);var l=a+" "+ml+" "+Cd,u=n.element;return u.className=l,u.appendChild(A),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap(),n=t.getView(),i=this.extent?this.extent:n.getProjection().getExtent();n.fitInternal(ch(i))},e}(Nr),pZ=dZ;function gZ(r){var e=r||{},t=new Ii,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new B8(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new C8(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new E8(e.attributionOptions)),t}var mx={ACTIVE:"active"},vZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),mZ=function(r){vZ(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,t&&t.handleEvent&&(n.handleEvent=t.handleEvent),n.map_=null,n.setActive(!0),n}return e.prototype.getActive=function(){return this.get(mx.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(mx.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(Oi);function yZ(r,e,t){var n=r.getCenterInternal();if(n){var i=[n[0]+e[0],n[1]+e[1]];r.animateInternal({duration:t!==void 0?t:250,easing:TF,center:r.getConstrainedCenter(i)})}}function PF(r,e,t,n){var i=r.getZoom();if(i!==void 0){var a=r.getConstrainedZoom(i+e),o=r.getResolutionForZoom(a);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:o,anchor:t,duration:n!==void 0?n:250,easing:Gs})}}var sv=mZ,_Z=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),wZ=function(r){_Z(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==yr.DBLCLICK){var i=t.originalEvent,a=t.map,o=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,A=a.getView();PF(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(sv),EZ=wZ,CZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),BZ=function(r){CZ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==yr.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==yr.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==yr.POINTERDOWN){var a=this.handleDownEvent(t);this.handlingDownUpSequence=a,n=this.stopDown(a)}else t.type==yr.POINTERMOVE&&this.handleMoveEvent(t);return!n},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(bZ(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==yr.POINTERUP?delete this.trackedPointers_[i]:t.type==yr.POINTERDOWN?this.trackedPointers_[i]=n:i in this.trackedPointers_&&(this.trackedPointers_[i]=n),this.targetPointers=dF(this.trackedPointers_)}},e}(sv);function UF(r){for(var e=r.length,t=0,n=0,i=0;i0&&this.condition_(t)){var n=t.map,i=n.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1},e}(Es),NZ=MZ,PZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),UZ=function(r){PZ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:yd})||this,n.condition_=i.condition?i.condition:I8,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(kf(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==BF){var a=n.getSize(),o=t.pixel,s=Math.atan2(a[1]/2-o[1],o[0]-a[0]/2);if(this.lastAngle_!==void 0){var A=s-this.lastAngle_;i.adjustRotationInternal(-A)}this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){if(!kf(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!kf(t))return!1;if(QF(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(Es),DZ=UZ,QZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kZ=function(r){QZ(e,r);function e(t){var n=r.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+t,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,n=this.endPixel_,i="px",a=this.element_.style;a.left=Math.min(t[0],n[0])+i,a.top=Math.min(t[1],n[1])+i,a.width=Math.abs(n[0]-t[0])+i,a.height=Math.abs(n[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,n){this.startPixel_=t,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,n=this.endPixel_,i=[t,[t[0],n[1]],n,[n[0],t[1]]],a=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);a[4]=a[0].slice(),this.geometry_?this.geometry_.setCoordinates([a]):this.geometry_=new Dn([a])},e.prototype.getGeometry=function(){return this.geometry_},e}(BC),HZ=kZ,O8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),V_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},Qb=function(r){O8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.coordinate=n,a.mapBrowserEvent=i,a}return e}(Vo),GZ=function(r){O8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new HZ(i.className||"ol-dragbox"),n.minArea_=i.minArea!==void 0?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:QF,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return e.prototype.defaultBoxEndCondition=function(t,n,i){var a=i[0]-n[0],o=i[1]-n[1];return a*a+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Qb(V_.BOXDRAG,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var n=this.boxEndCondition_(t,this.startPixel_,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new Qb(n?V_.BOXEND:V_.BOXCANCEL,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Qb(V_.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(Es),$Z=GZ,VZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),jZ=function(r){VZ(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:S0;return n=r.call(this,{condition:a,className:i.className||"ol-dragzoom",minArea:i.minArea})||this,n.duration_=i.duration!==void 0?i.duration:200,n.out_=i.out!==void 0?i.out:!1,n}return e.prototype.onBoxEnd=function(t){var n=this.getMap(),i=n.getView(),a=this.getGeometry();if(this.out_){var o=i.rotatedExtentForGeometry(a),s=i.getResolutionForExtentInternal(o),A=i.getResolution()/s;a=a.clone(),a.scale(A*A)}i.fitInternal(a,{duration:this.duration_,easing:Gs})},e}($Z),KZ=jZ,of={LEFT:37,UP:38,RIGHT:39,DOWN:40},WZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zZ=function(r){WZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return DC(a)&&kF(a)},n.condition_=i.condition!==void 0?i.condition:n.defaultCondition_,n.duration_=i.duration!==void 0?i.duration:100,n.pixelDelta_=i.pixelDelta!==void 0?i.pixelDelta:128,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==xe.KEYDOWN){var i=t.originalEvent,a=i.keyCode;if(this.condition_(t)&&(a==of.DOWN||a==of.LEFT||a==of.RIGHT||a==of.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==of.DOWN?u=-A:a==of.LEFT?l=-A:a==of.RIGHT?l=A:u=A;var c=[l,u];vF(c,s.getRotation()),yZ(s,c,this.duration_),i.preventDefault(),n=!0}}return!n},e}(sv),YZ=zZ,XZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),qZ=function(r){XZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:kF,n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:100,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==xe.KEYDOWN||t.type==xe.KEYPRESS){var i=t.originalEvent,a=i.charCode;if(this.condition_(t)&&(a=="+".charCodeAt(0)||a=="-".charCodeAt(0))){var o=t.map,s=a=="+".charCodeAt(0)?this.delta_:-this.delta_,A=o.getView();PF(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(sv),ZZ=qZ,JZ=function(){function r(e,t,n){this.decay_=e,this.minVelocity_=t,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return r.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},r.prototype.update=function(e,t){this.points_.push(e,t,Date.now())},r.prototype.end=function(){if(this.points_.length<6)return!1;var e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]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 a=this.points_[t]-this.points_[n],o=this.points_[t+1]-this.points_[n+1];return this.angle_=Math.atan2(o,a),this.initialVelocity_=Math.sqrt(a*a+o*o)/i,this.initialVelocity_>this.minVelocity_},r.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},r.prototype.getAngle=function(){return this.angle_},r}(),tJ=JZ,eJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kb={TRACKPAD:"trackpad",WHEEL:"wheel"},rJ=function(r){eJ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,i)||this,n.totalDelta_=0,n.lastDelta_=0,n.maxDelta_=i.maxDelta!==void 0?i.maxDelta:1,n.duration_=i.duration!==void 0?i.duration:250,n.timeout_=i.timeout!==void 0?i.timeout:80,n.useAnchor_=i.useAnchor!==void 0?i.useAnchor:!0,n.constrainResolution_=i.constrainResolution!==void 0?i.constrainResolution:!1;var a=i.condition?i.condition:PC;return n.condition_=i.onFocusOnly?Zw(DF,a):a,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap().getView();t.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var n=t.type;if(n!==xe.WHEEL)return!0;var i=t.map,a=t.originalEvent;a.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var o;if(t.type==xe.WHEEL&&(o=a.deltaY,AX&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=td),a.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;var s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?kb.TRACKPAD:kb.WHEEL);var A=i.getView();if(this.mode_===kb.TRACKPAD&&!(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(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;var l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1},e.prototype.handleWheelZoom_=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-Un(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),PF(n,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(sv),nJ=rJ,iJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aJ=function(r){iJ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=yd),n=r.call(this,a)||this,n.anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=i.threshold!==void 0?i.threshold:.3,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){var n=0,i=this.targetPointers[0],a=this.targetPointers[1],o=Math.atan2(a.clientY-i.clientY,a.clientX-i.clientX);if(this.lastAngle_!==void 0){var s=o-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=s}this.lastAngle_=o;var A=t.map,l=A.getView();if(l.getConstraints().rotation!==BF){var u=A.getViewport().getBoundingClientRect(),c=UF(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.anchor_=A.getCoordinateFromPixelInternal(c),this.rotating_&&(A.render(),l.adjustRotationInternal(n,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(Es),oJ=aJ,sJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),AJ=function(r){sJ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=yd),n=r.call(this,a)||this,n.anchor_=null,n.duration_=i.duration!==void 0?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return e.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],a=this.targetPointers[1],o=i.clientX-a.clientX,s=i.clientY-a.clientY,A=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(n=this.lastDistance_/A),this.lastDistance_=A;var l=t.map,u=l.getView();n!=1&&(this.lastScaleDelta_=n);var c=l.getViewport().getBoundingClientRect(),h=UF(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),l.render(),u.adjustResolutionInternal(n,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(Es),lJ=AJ,dA={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},uJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cJ=function(r){uJ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:S0,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=i.duration!==void 0?i.duration:400,n}return e.prototype.handleDragEvent=function(t){if(kf(t)){var n=t.map,i=n.getSize(),a=t.pixel,o=a[0]-i[0]/2,s=i[1]/2-a[1],A=Math.atan2(s,o),l=Math.sqrt(o*o+s*s),u=n.getView();if(this.lastAngle_!==void 0){var c=this.lastAngle_-A;u.adjustRotationInternal(c)}this.lastAngle_=A,this.lastMagnitude_!==void 0&&u.adjustResolutionInternal(this.lastMagnitude_/l),this.lastMagnitude_!==void 0&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},e.prototype.handleUpEvent=function(t){if(!kf(t))return!0;var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return kf(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(Es),hJ=cJ,fJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),F8=function(r){fJ(e,r);function e(t,n,i){var a=r.call(this)||this;if(i!==void 0&&n===void 0)a.setFlatCoordinates(i,t);else{var o=n||0;a.setCenterAndRadius(t,o,i)}return a}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){var o=this.flatCoordinates,s=t-o[0],A=n-o[1],l=s*s+A*A;if(l=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:IC(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var n=this.stride,i=this.flatCoordinates[n]-this.flatCoordinates[0],a=t.slice();a[n]=a[0]+i;for(var o=1;o1?o:2,C=a||new Array(w),d=0;d>1;it;){if(n-t>600){var a=n-t+1,o=e-t+1,s=Math.log(a),A=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*A*(a-A)/a)*(o-a/2<0?-1:1),u=Math.max(t,Math.floor(e-o*A/a+l)),c=Math.min(n,Math.floor(e+(a-o)*A/a+l));N8(r,e,u,c,i)}var h=r[e],f=t,d=n;for(lm(r,t,e),i(r[n],h)>0&&lm(r,t,n);f0;)d--}i(r[t],h)===0?lm(r,t,d):(d++,lm(r,d,n)),d<=e&&(t=d+1),e<=d&&(n=d-1)}}function lm(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function SJ(r,e){return re?1:0}class P8{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const n=[];if(!K_(e,t))return n;const i=this.toBBox,a=[];for(;t;){for(let o=0;o=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(i,a,t)}_split(e,t){const n=e[t],i=n.children.length,a=this._minEntries;this._chooseSplitAxis(n,a,i);const o=this._chooseSplitIndex(n,a,i),s=Dp(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,dp(n,this.toBBox),dp(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=Dp([e,t]),this.data.height=e.height+1,this.data.leaf=!1,dp(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let i,a=1/0,o=1/0;for(let s=t;s<=n-t;s++){const A=Rm(e,0,s,this.toBBox),l=Rm(e,s,n,this.toBBox),u=FJ(A,l),c=Hb(A)+Hb(l);u=t;l--){const u=e.children[l];Mm(s,e.leaf?a(u):u),A+=j_(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)Mm(t[i],e)}_condense(e){for(let t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():dp(e[t],this.toBBox)}}function xJ(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n=r.minX&&e.maxY>=r.minY}function Dp(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function DP(r,e,t,n,i){const a=[e,t];for(;a.length;){if(t=a.pop(),e=a.pop(),t-e<=n)continue;const o=e+Math.ceil((t-e)/n/2)*n;TJ(r,o,e,t,i),a.push(e,o,o,t)}}var rr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},RJ=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Wi(e.scale),this.displacement_=e.displacement}return r.prototype.clone=function(){var e=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},r.prototype.getOpacity=function(){return this.opacity_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getDisplacement=function(){return this.displacement_},r.prototype.getAnchor=function(){return Re()},r.prototype.getImage=function(e){return Re()},r.prototype.getHitDetectionImage=function(){return Re()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return Re()},r.prototype.getImageSize=function(){return Re()},r.prototype.getOrigin=function(){return Re()},r.prototype.getSize=function(){return Re()},r.prototype.setDisplacement=function(e){this.displacement_=e},r.prototype.setOpacity=function(e){this.opacity_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=Wi(e)},r.prototype.listenImageChange=function(e){Re()},r.prototype.load=function(){Re()},r.prototype.unlistenImageChange=function(e){Re()},r}(),U8=RJ;function il(r){return Array.isArray(r)?jk(r):r}var MJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),NJ=function(r){MJ(e,r);function e(t){var n=this,i=t.rotateWithView!==void 0?t.rotateWithView:!1;return n=r.call(this,{opacity:1,rotateWithView:i,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0]})||this,n.canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=t.fill!==void 0?t.fill:null,n.origin_=[0,0],n.points_=t.points,n.radius_=t.radius!==void 0?t.radius:t.radius1,n.radius2_=t.radius2,n.angle_=t.angle!==void 0?t.angle:0,n.stroke_=t.stroke!==void 0?t.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var n=this.canvas_[t];if(!n){var i=this.renderOptions_,a=wo(i.size*t,i.size*t);this.draw_(i,a,t),n=a.canvas,this.canvas_[t]=n}return n},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return rr.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,n,i){if(n===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return n;var a=this.radius_,o=this.radius2_===void 0?a:this.radius2_;if(aA&&(this.instructions.push([Ye.CUSTOM,A,u,t,i,lu]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,u,t,a||i,lu]));break;case pt.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([Ye.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([Ye.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[Ye.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ye.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var n,i=t.length,a,o,s=-1;for(n=0;nthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var n=t.fillStyle,i=[Ye.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Ye.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,n){var i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,n){var i=t.strokeStyle,a=t.lineCap,o=t.lineDash,s=t.lineDashOffset,A=t.lineJoin,l=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=a||o!=t.currentLineDash&&!Fu(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=A||t.currentLineWidth!=l||t.currentMiterLimit!=u)&&(i!==void 0&&n.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=a,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=A,t.currentLineWidth=l,t.currentMiterLimit=u)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var n=[Ye.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=lF(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;_o(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(D8),L0=KJ,WJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zJ=function(r){WJ(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return e.prototype.drawPoint=function(t,n){if(this.image_){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),a=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(i,a);this.instructions.push([Ye.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([Ye.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(n)}},e.prototype.drawMultiPoint=function(t,n){if(this.image_){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),a=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(i,a);this.instructions.push([Ye.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([Ye.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(n)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,r.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,n){var i=t.getAnchor(),a=t.getSize(),o=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),A=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=o,this.image_=s,this.height_=a[1],this.opacity_=t.getOpacity(),this.originX_=A[0]*this.imagePixelRatio_,this.originY_=A[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=a[0],this.declutterImageWithText_=n},e}(L0),YJ=zJ,XJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),qJ=function(r){XJ(e,r);function e(t,n,i,a){return r.call(this,t,n,i,a)||this}return e.prototype.drawFlatCoordinates_=function(t,n,i,a){var o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,n,i,a,!1,!1),A=[Ye.MOVE_TO_LINE_TO,o,s];return this.instructions.push(A),this.hitDetectionInstructions.push(A),i},e.prototype.drawLineString=function(t,n){var i=this.state,a=i.strokeStyle,o=i.lineWidth;if(!(a===void 0||o===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Ye.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Py,Uy],Sf);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(Nc),this.endGeometry(n)}},e.prototype.drawMultiLineString=function(t,n){var i=this.state,a=i.strokeStyle,o=i.lineWidth;if(!(a===void 0||o===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Ye.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Sf);for(var s=t.getEnds(),A=t.getFlatCoordinates(),l=t.getStride(),u=0,c=0,h=s.length;cr&&(A>s&&(s=A,a=l,o=c),A=0,l=c-i)),h=f,m=y,v=w),d=C,g=O}return A+=f,A>s?[l,c]:[a,o]}var rtt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tE={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ntt=function(r){rtt(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return e.prototype.finish=function(){var t=r.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},e.prototype.drawText=function(t,n){var i=this.textFillState_,a=this.textStrokeState_,o=this.textState_;if(!(this.text_===""||!o||!i&&!a)){var s=this.coordinates,A=s.length,l=t.getType(),u=null,c=t.getStride();if(o.placement===Q8.LINE&&(l==pt.LINE_STRING||l==pt.MULTI_LINE_STRING||l==pt.POLYGON||l==pt.MULTI_POLYGON)){if(!qn(this.getBufferedMaxExtent(),t.getExtent()))return;var h=void 0;if(u=t.getFlatCoordinates(),l==pt.LINE_STRING)h=[u.length];else if(l==pt.MULTI_LINE_STRING)h=t.getEnds();else if(l==pt.POLYGON)h=t.getEnds().slice(0,1);else if(l==pt.MULTI_POLYGON){var f=t.getEndss();h=[];for(var d=0,g=f.length;dS[2]}else x=C>L;var P=Math.PI,U=[],tt=F+n===e;e=F,m=0,v=I,h=r[e],f=r[e+1];var q;if(tt){y(),q=Math.atan2(f-g,h-d),x&&(q+=q>0?-P:P);var rt=(L+C)/2,nt=(N+O)/2;return U[0]=[rt,nt,(T-a)/2,q,i],U}for(var At=0,ct=i.length;At0?-P:P),q!==void 0){var M=Tt-q;if(M+=M>P?-2*P:M<-P?2*P:0,Math.abs(M)>o)return null}q=Tt;for(var W=At,Y=0;At0&&r.push(` `,""),r.push(e,""),r}var ptt=function(){function r(e,t,n,i){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=xi(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return r.prototype.createLabel=function(e,t,n,i){var a=e+t+n+i;if(this.labels_[a])return this.labels_[a];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,A=this.textStates[t],l=this.pixelRatio,u=[A.scale[0]*l,A.scale[1]*l],c=Array.isArray(e),h=VP(c?e[0]:e,A.textAlign||ky),f=i&&o.lineWidth?o.lineWidth:0,d=c?e:e.split(` `).reduce(dtt,[]),g=sq(A,d),m=g.width,v=g.height,y=g.widths,w=g.heights,C=g.lineWidths,O=m+f,F=[],I=(O+2)*u[0],T=(v+f)*u[1],L={width:I<0?Math.floor(I):Math.ceil(I),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:F};if((u[0]!=1||u[1]!=1)&&F.push("scale",u),i){F.push("strokeStyle",o.strokeStyle),F.push("lineWidth",f),F.push("lineCap",o.lineCap),F.push("lineJoin",o.lineJoin),F.push("miterLimit",o.miterLimit);var N=TC?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;N.prototype.setLineDash&&(F.push("setLineDash",[o.lineDash]),F.push("lineDashOffset",o.lineDashOffset))}n&&F.push("fillStyle",s.fillStyle),F.push("textBaseline","middle"),F.push("textAlign","center");for(var x=.5-h,S=h*O+x*f,P=[],U=[],tt=0,q=0,rt=0,nt=0,At,ct=0,Tt=d.length;cte?e-l:a,C=o+u>t?t-u:o,O=d[3]+w*h[0]+d[1],F=d[0]+C*h[1]+d[2],I=v-d[3],T=y-d[0];(g||c!==0)&&(cc[0]=I,hc[0]=I,cc[1]=T,Vl[1]=T,Vl[0]=I+O,jl[0]=Vl[0],jl[1]=T+F,hc[1]=jl[1]);var L;return c!==0?(L=yo(xi(),n,i,1,1,c,-n,-i),bn(L,cc),bn(L,Vl),bn(L,jl),bn(L,hc),Ho(Math.min(cc[0],Vl[0],jl[0],hc[0]),Math.min(cc[1],Vl[1],jl[1],hc[1]),Math.max(cc[0],Vl[0],jl[0],hc[0]),Math.max(cc[1],Vl[1],jl[1],hc[1]),pp)):Ho(Math.min(I,I+O),Math.min(T,T+F),Math.max(I,I+O),Math.max(T,T+F),pp),f&&(v=Math.round(v),y=Math.round(y)),{drawImageX:v,drawImageY:y,drawImageW:w,drawImageH:C,originX:l,originY:u,declutterBox:{minX:pp[0],minY:pp[1],maxX:pp[2],maxY:pp[3],value:m},canvasTransform:L,scale:h}},r.prototype.replayImageOrLabel_=function(e,t,n,i,a,o,s){var A=!!(o||s),l=i.declutterBox,u=e.canvas,c=s?s[2]*i.scale[0]/2:0,h=l.minX-c<=u.width/t&&l.maxX+c>=0&&l.minY-c<=u.height/t&&l.maxY+c>=0;return h&&(A&&this.replayTextBackground_(e,cc,Vl,jl,hc,o,s),Aq(e,i.canvasTransform,a,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},r.prototype.fill_=function(e){if(this.alignFill_){var t=bn(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()},r.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.setLineDash&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},r.prototype.drawLabelWithPointPlacement_=function(e,t,n,i){var a=this.textStates[t],o=this.createLabel(e,t,i,n),s=this.strokeStates[n],A=this.pixelRatio,l=VP(Array.isArray(e)?e[0]:e,a.textAlign||ky),u=tE[a.textBaseline||jw],c=s&&s.lineWidth?s.lineWidth:0,h=o.width/A-2*a.scale[0],f=l*h+2*(.5-l)*c,d=u*o.height/A+2*(.5-u)*c;return{label:o,anchorX:f,anchorY:d}},r.prototype.execute_=function(e,t,n,i,a,o,s,A){var l;this.pixelCoordinates_&&Fu(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=zc(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),pX(this.renderedTransform_,n));for(var u=0,c=i.length,h=0,f,d,g,m,v,y,w,C,O,F,I,T,L=0,N=0,x=null,S=null,P=this.coordinateCache_,U=this.viewRotation_,tt=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,q={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:U},rt=this.instructions!=i||this.overlaps?0:200,nt,At,ct,Tt;urt&&(this.fill_(e),L=0),N>rt&&(e.stroke(),N=0),!L&&!N&&(e.beginPath(),m=NaN,v=NaN),++u;break;case Ye.CIRCLE:h=M[1];var Y=l[h],H=l[h+1],J=l[h+2],ot=l[h+3],ut=J-Y,X=ot-H,It=Math.sqrt(ut*ut+X*X);e.moveTo(Y+It,H),e.arc(Y,H,It,0,2*Math.PI,!0),++u;break;case Ye.CLOSE_PATH:e.closePath(),++u;break;case Ye.CUSTOM:h=M[1],f=M[2];var at=M[3],j=M[4],Z=M.length==6?M[5]:void 0;q.geometry=at,q.feature=nt,u in P||(P[u]=[]);var ft=P[u];Z?Z(l,h,f,2,ft):(ft[0]=l[h],ft[1]=l[h+1],ft.length=2),j(ft,q),++u;break;case Ye.DRAW_IMAGE:h=M[1],f=M[2],C=M[3],d=M[4],g=M[5];var it=M[6],V=M[7],Ft=M[8],Mt=M[9],Et=M[10],Bt=M[11],Ct=M[12],Rt=M[13],Nt=M[14];if(!C&&M.length>=19){O=M[18],F=M[19],I=M[20],T=M[21];var Dt=this.drawLabelWithPointPlacement_(O,F,I,T);C=Dt.label,M[3]=C;var Wt=M[22];d=(Dt.anchorX-Wt)*this.pixelRatio,M[4]=d;var te=M[23];g=(Dt.anchorY-te)*this.pixelRatio,M[5]=g,it=C.height,M[6]=it,Rt=C.width,M[13]=Rt}var Ae=void 0;M.length>24&&(Ae=M[24]);var oe=void 0,Jt=void 0,fe=void 0;M.length>16?(oe=M[15],Jt=M[16],fe=M[17]):(oe=bf,Jt=!1,fe=!1),Et&&tt?Bt+=U:!Et&&!tt&&(Bt-=U);for(var qt=0;h0){if(!o||f!==Er.IMAGE&&f!==Er.TEXT||o.indexOf(F)!==-1){var x=(h[L]-3)/4,S=i-x%s,P=i-(x/s|0),U=a(F,I,S*S+P*P);if(U)return U}u.clearRect(0,0,s,s);break}}var g=Object.keys(this.executorsByZIndex_).map(Number);g.sort(oh);var m,v,y,w,C;for(m=g.length-1;m>=0;--m){var O=g[m].toString();for(y=this.executorsByZIndex_[O],v=Vb.length-1;v>=0;--v)if(f=Vb[v],w=y[f],w!==void 0&&(C=w.executeHitDetection(u,A,n,d,c),C))return C}},r.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var n=t[0],i=t[1],a=t[2],o=t[3],s=[n,i,n,o,a,o,a,i];return zc(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return rd(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(oh),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||Vb,u,c,h,f,d,g;for(s&&A.reverse(),u=0,c=A.length;ut)break;var s=n[o];s||(s=[],n[o]=s),s.push(((r+i)*e+(r+a))*4+3),i>0&&s.push(((r-i)*e+(r+a))*4+3),a>0&&(s.push(((r+i)*e+(r-a))*4+3),i>0&&s.push(((r-i)*e+(r-a))*4+3))}for(var A=[],i=0,l=n.length;i0,6);var c=i.src!==void 0?rr.IDLE:rr.LOADED;return n.color_=i.color!==void 0?lh(i.color):null,n.iconImage_=Stt(l,u,n.imgSize_!==void 0?n.imgSize_:null,n.crossOrigin_,c,n.color_),n.offset_=i.offset!==void 0?i.offset:[0,0],n.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:Vi.TOP_LEFT,n.origin_=null,n.size_=i.size!==void 0?i.size:null,n}return e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var n=this.getSize();if(this.anchorXUnits_==uo.FRACTION||this.anchorYUnits_==uo.FRACTION){if(!n)return null;t=this.anchor_.slice(),this.anchorXUnits_==uo.FRACTION&&(t[0]*=n[0]),this.anchorYUnits_==uo.FRACTION&&(t[1]*=n[1])}if(this.anchorOrigin_!=Vi.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==Vi.TOP_RIGHT||this.anchorOrigin_==Vi.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==Vi.BOTTOM_LEFT||this.anchorOrigin_==Vi.BOTTOM_RIGHT)&&(t[1]=-t[1]+n[1])}this.normalizedAnchor_=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Vi.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==Vi.TOP_RIGHT||this.offsetOrigin_==Vi.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==Vi.BOTTOM_LEFT||this.offsetOrigin_==Vi.BOTTOM_RIGHT)&&(t[1]=i[1]-n[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(xe.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(xe.CHANGE,t)},e}(U8),O0=Itt,Ltt="#333",Ott=function(){function r(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Wi(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new Ba({color:Ltt}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:Q8.POINT,this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}return r.prototype.clone=function(){var e=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),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})},r.prototype.getOverflow=function(){return this.overflow_},r.prototype.getFont=function(){return this.font_},r.prototype.getMaxAngle=function(){return this.maxAngle_},r.prototype.getPlacement=function(){return this.placement_},r.prototype.getOffsetX=function(){return this.offsetX_},r.prototype.getOffsetY=function(){return this.offsetY_},r.prototype.getFill=function(){return this.fill_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getStroke=function(){return this.stroke_},r.prototype.getText=function(){return this.text_},r.prototype.getTextAlign=function(){return this.textAlign_},r.prototype.getTextBaseline=function(){return this.textBaseline_},r.prototype.getBackgroundFill=function(){return this.backgroundFill_},r.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},r.prototype.getPadding=function(){return this.padding_},r.prototype.setOverflow=function(e){this.overflow_=e},r.prototype.setFont=function(e){this.font_=e},r.prototype.setMaxAngle=function(e){this.maxAngle_=e},r.prototype.setOffsetX=function(e){this.offsetX_=e},r.prototype.setOffsetY=function(e){this.offsetY_=e},r.prototype.setPlacement=function(e){this.placement_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setFill=function(e){this.fill_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=Wi(e!==void 0?e:1)},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.setText=function(e){this.text_=e},r.prototype.setTextAlign=function(e){this.textAlign_=e},r.prototype.setTextBaseline=function(e){this.textBaseline_=e},r.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},r.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},r.prototype.setPadding=function(e){this.padding_=e},r}(),Bd=Ott,ds=.5;function $8(r,e,t,n,i,a,o){var s=r[0]*ds,A=r[1]*ds,l=wo(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,c=new jF(l,ds,i,null,o),h=t.length,f=Math.floor((256*256*256-1)/h),d={},g=1;g<=h;++g){var m=t[g-1],v=m.getStyleFunction()||n;if(n){var y=v(m,a);if(y){Array.isArray(y)||(y=[y]);for(var w=g*f,C="#"+("000000"+w.toString(16)).slice(-6),O=0,F=y.length;Og[2];)++y,w=v*y,c.push(this.getRenderTransform(a,o,s,ds,h,f,w).slice()),m-=v}this.hitDetectionImageData_=$8(i,c,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(V8(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){var s=this;if(this.replayGroup_){var A=n.viewState.resolution,l=n.viewState.rotation,u=this.getLayer(),c={},h=function(g,m,v){var y=Ee(g),w=c[y];if(w){if(w!==!0&&vO[0]&&T[2]>O[2]&&C.push([T[0]-F,T[1],T[2]-F,T[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==d&&this.renderedRenderOrder_==m&&ps(this.wrappedRenderedExtent_,y))return Fu(this.renderedExtent_,w)||(this.hitDetectionImageData_=null,this.renderedExtent_=w),this.renderedCenter_=v,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var L=new eE(wx(h,f),y,h,f),N;this.getLayer().getDeclutter()&&(N=new eE(wx(h,f),y,h,f));for(var x,S,P,S=0,P=C.length;S=200&&s.status<300){var l=e.getType(),u=void 0;l==dA.JSON||l==dA.TEXT?u=s.responseText:l==dA.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==dA.ARRAY_BUFFER&&(u=s.response),u?a(e.readFeatures(u,{extent:t,featureProjection:i}),e.readProjection(u)):o()}else o()},s.onerror=o,s.send()}function KP(r,e){return function(t,n,i,a,o){var s=this;eet(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||Jf)}}var Y8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fc=function(r){Y8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.feature=n,a.features=i,a}return e}(Vo),ret=function(r){Y8(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:co.READY,wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=Jf,n.format_=i.format,n.overlaps_=i.overlaps===void 0?!0:i.overlaps,n.url_=i.url,i.loader!==void 0?n.loader_=i.loader:n.url_!==void 0&&(Le(n.format_,7),n.loader_=KP(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:z8;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new iE:null,n.loadedExtentsRtree_=new iE,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null;var o,s;return Array.isArray(i.features)?s=i.features:i.features&&(o=i.features,s=o.getArray()),!a&&o===void 0&&(o=new Ii(s)),s!==void 0&&n.addFeaturesInternal(s),o!==void 0&&n.bindFeaturesCollection_(o),n}return e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var n=Ee(t);if(!this.addToIndex_(n,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(n,t);var i=t.getGeometry();if(i){var a=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(a,t)}else this.nullGeometryFeatures_[n]=t;this.dispatchEvent(new fc(ji.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[je(n,xe.CHANGE,this.handleFeatureChange_,this),je(n,ed.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,n){var i=!0,a=n.getId();return a!==void 0&&(a.toString()in this.idIndex_?i=!1:this.idIndex_[a.toString()]=n),i&&(Le(!(t in this.uidIndex_),30),this.uidIndex_[t]=n),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],a=[],o=0,s=t.length;o0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),r.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var n=this.loadedExtentsRtree_,i;n.forEachInExtent(t,function(a){if(vl(a.extent,t))return i=a,!0}),i&&n.remove(i)},e.prototype.removeFeature=function(t){if(t){var n=Ee(t);n in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[n]:this.featuresRtree_&&this.featuresRtree_.remove(t);var i=this.removeFeatureInternal(t);i&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var n=Ee(t),i=this.featureChangeKeys_[n];if(i){i.forEach(Yr),delete this.featureChangeKeys_[n];var a=t.getId();return a!==void 0&&delete this.idIndex_[a.toString()],delete this.uidIndex_[n],this.dispatchEvent(new fc(ji.REMOVEFEATURE,t)),t}},e.prototype.removeFromIdIndex_=function(t){var n=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],n=!0;break}return n},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){Le(this.format_,7),this.url_=t,this.setLoader(KP(t,this.format_))},e}(kC),Mu=ret,X8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),$r={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},z_={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},Y_=function(r){X8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}(Vo),net=function(r){X8(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=yd),n=r.call(this,i)||this,n.on,n.once,n.un,n.shouldHandle_=!1,n.downPx_=null,n.downTimeout_,n.lastDragTime_,n.pointerType_,n.freehand_=!1,n.source_=t.source?t.source:null,n.features_=t.features?t.features:null,n.snapTolerance_=t.snapTolerance?t.snapTolerance:12,n.type_=t.type,n.mode_=aet(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===$r.POLYGON?3:2,n.maxPoints_=n.mode_===$r.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:ul;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===$r.CIRCLE)a=function(A,l,u){var c=l||new GF([NaN,NaN]),h=Mn(A[0]),f=pu(h,Mn(A[A.length-1]));return c.setCenterAndRadius(h,Math.sqrt(f)),c};else{var s;o===$r.POINT?s=xr:o===$r.LINE_STRING?s=en:o===$r.POLYGON&&(s=Dn),a=function(A,l,u){return l?o===$r.POLYGON?A[0].length?l.setCoordinates([A[0].concat([A[0][0]])]):l.setCoordinates([]):l.setCoordinates(A):l=new s(A),l}}}return n.geometryFunction_=a,n.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,n.finishCoordinate_=null,n.sketchFeature_=null,n.sketchPoint_=null,n.sketchCoords_=null,n.sketchLine_=null,n.sketchLineCoords_=null,n.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,n.overlay_=new El({source:new Mu({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:iet(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:DC,n.freehandCondition_,t.freehand?n.freehandCondition_=PC:n.freehandCondition_=t.freehandCondition?t.freehandCondition:S0,n.addChangeListener(mx.ACTIVE,n.updateState_),n}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(t){t.originalEvent.type===xe.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==$r.POINT&&this.freehandCondition_(t);var n=t.type===yr.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===yr.POINTERDRAG){var a=Date.now();a-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===yr.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===yr.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=t.type===yr.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===yr.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===yr.DBLCLICK&&(i=!1),r.prototype.handleEvent.call(this,t)&&i},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new iu(yr.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var n=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var i=!this.finishCoordinate_;i&&this.startDrawing_(t.coordinate),!i&&this.freehand_?this.finishDrawing():!this.freehand_&&(!i||this.mode_===$r.POINT)&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),n=!1}else this.freehand_&&this.abortDrawing();return!n&&this.stopClick_&&t.preventDefault(),n},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var n=this.downPx_,i=t.pixel,a=n[0]-i[0],o=n[1]-i[1],s=a*a+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var n=!1;if(this.sketchFeature_){var i=!1,a=[this.finishCoordinate_],o=this.mode_;if(o===$r.POINT)n=!0;else if(o===$r.CIRCLE)n=this.sketchCoords_.length===2;else if(o===$r.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===$r.POLYGON){var s=this.sketchCoords_;i=s[0].length>this.minPoints_,a=[s[0][0],s[0][s[0].length-2]]}if(i)for(var A=this.getMap(),l=0,u=a.length;l=this.maxPoints_&&(this.freehand_?o.pop():a=!0),o.push(t.slice()),this.geometryFunction_(o,n,i)):s===$r.POLYGON&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():a=!0),o.push(t.slice()),a&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,n,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),a&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),i,a=this.mode_;if(a===$r.LINE_STRING||a===$r.CIRCLE){if(i=this.sketchCoords_,i.splice(-2,1),i.length>=2){this.finishCoordinate_=i[i.length-2].slice();var o=this.finishCoordinate_.slice();i[i.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(i,t,n),t.getType()===pt.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(a===$r.POLYGON){i=this.sketchCoords_[0],i.splice(-2,1);var s=this.sketchLine_.getGeometry();if(i.length>=2){var o=i[i.length-2].slice();i[i.length-1]=o,this.createOrUpdateSketchPoint_(o)}s.setCoordinates(i),this.geometryFunction_(this.sketchCoords_,t,n)}i.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var n=this.sketchCoords_,i=t.getGeometry(),a=this.getMap().getView().getProjection();this.mode_===$r.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===$r.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===pt.MULTI_POINT?t.setGeometry(new $s([n])):this.type_===pt.MULTI_LINE_STRING?t.setGeometry(new Xa([n])):this.type_===pt.MULTI_POLYGON&&t.setGeometry(new qa([n])),this.dispatchEvent(new Y_(z_.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Y_(z_.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===$r.LINE_STRING||n===$r.CIRCLE)a=this.sketchCoords_;else if(n===$r.POLYGON)a=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&a.shift(),a.pop();for(var o=0;o=0;--a){for(var o=i[a],s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===o&&this.dragSegments_.splice(s,1);n.remove(o)}},e.prototype.setActive=function(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),r.prototype.setActive.call(this,t)},e.prototype.setMap=function(t){this.overlay_.setMap(t),r.prototype.setMap.call(this,t)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var n=t.target;this.removeFeature_(n),this.addFeature_(n)}},e.prototype.handleFeatureRemove_=function(t){var n=t.element;this.removeFeature_(n)},e.prototype.writePointGeometry_=function(t,n){var i=n.getCoordinates(),a={feature:t,geometry:n,segment:[i,i]};this.rBush_.insert(n.getExtent(),a)},e.prototype.writeMultiPointGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a=0;--y)this.insertVertex_(o[y],s)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var n=this.dragSegments_.length-1;n>=0;--n){var i=this.dragSegments_[n][0],a=i.geometry;if(a.getType()===pt.CIRCLE){var o=a.getCenter(),s=i.featureSegments[0],A=i.featureSegments[1];s.segment[0]=o,s.segment[1]=o,A.segment[0]=o,A.segment[1]=o,this.rBush_.update(Pf(o),s);var l=a,u=id();if(u){var c=t.map.getView().getProjection();l=l.clone().transform(u,c),l=v8(l).transform(c,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(oa(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new Wb(Kb.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,n,i){var a=this,o=i||n.getCoordinateFromPixel(t),s=n.getView().getProjection(),A=function(U,tt){return YP(o,U,s)-YP(o,tt,s)},l,u;if(this.hitDetection_){var c=typeof this.hitDetection_=="object"?function(U){return U===a.hitDetection_}:void 0;n.forEachFeatureAtPixel(t,function(U,tt,q){if(q=q||U.getGeometry(),q.getType()===pt.POINT&&Pi(a.features_.getArray(),U)){u=q;var rt=q.getFlatCoordinates().slice(0,2);l=[{feature:U,geometry:q,segment:[rt,rt]}]}return!0},{layerFilter:c})}if(!l){var h=gs(Pf(o,zP)),f=n.getView().getResolution()*this.pixelTolerance_,d=OC(_o(h,f,zP));l=this.rBush_.getInExtent(d)}if(l&&l.length>0){var g=l.sort(A)[0],m=g.segment,v=XP(o,g,s),y=n.getPixelFromCoordinate(v),w=pP(t,y);if(u||w<=this.pixelTolerance_){var C={};if(C[Ee(m)]=!0,this.snapToPointer_||(this.delta_[0]=v[0]-o[0],this.delta_[1]=v[1]-o[1]),g.geometry.getType()===pt.CIRCLE&&g.index===sy)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);else{var O=n.getPixelFromCoordinate(m[0]),F=n.getPixelFromCoordinate(m[1]),I=pu(y,O),T=pu(y,F);w=Math.sqrt(Math.min(I,T)),this.snappedToVertex_=w<=this.pixelTolerance_,this.snappedToVertex_&&(v=I>T?m[1]:m[0]),this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);var L={};L[Ee(g.geometry)]=!0;for(var N=1,x=l.length;N=0;--l)s=t[l],d=s[0],g=Ee(d.feature),d.depth&&(g+="-"+d.depth.join("-")),g in n||(n[g]={}),s[1]===0?(n[g].right=d,n[g].index=d.index):s[1]==1&&(n[g].left=d,n[g].index=d.index+1);for(g in n){switch(f=n[g].right,c=n[g].left,u=n[g].index,h=u-1,c!==void 0?d=c:d=f,h<0&&(h=0),A=d.geometry,o=A.getCoordinates(),a=o,i=!1,A.getType()){case pt.MULTI_LINE_STRING:o[d.depth[0]].length>2&&(o[d.depth[0]].splice(u,1),i=!0);break;case pt.LINE_STRING:o.length>2&&(o.splice(u,1),i=!0);break;case pt.MULTI_POLYGON:a=a[d.depth[1]];case pt.POLYGON:a=a[d.depth[0]],a.length>4&&(u==a.length-1&&(u=0),a.splice(u,1),i=!0,u===0&&(a.pop(),a.push(a[0]),h=a.length-1));break}if(i){this.setGeometryCoordinates_(A,o);var m=[];if(c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[0])),f!==void 0&&(this.rBush_.remove(f),m.push(f.segment[1])),c!==void 0&&f!==void 0){var v={depth:d.depth,feature:d.feature,geometry:d.geometry,index:h,segment:m};this.rBush_.insert(oa(v.segment),v)}this.updateSegmentIndices_(A,u,d.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return i},e.prototype.setGeometryCoordinates_=function(t,n){this.changingFeature_=!0,t.setCoordinates(n),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,n,i,a){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(i===void 0||o.depth===void 0||Fu(o.depth,i))&&o.index>n&&(o.index+=a)})},e}(Es);function set(r,e){return r.index-e.index}function YP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE){var i=n;if(e.index===sy){var a=id();a&&(i=i.clone().transform(a,t));var o=pu(i.getCenter(),Mn(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=Mn(r);return hg[0]=Mn(e.segment[0]),hg[1]=Mn(e.segment[1]),KX(A,hg)}function XP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE&&e.index===sy){var i=n,a=id();return a&&(i=i.clone().transform(a,t)),Rg(i.getClosestPoint(Mn(r)))}var o=Mn(r);return hg[0]=Mn(e.segment[0]),hg[1]=Mn(e.segment[1]),Rg(gF(o,hg))}function Aet(){var r=$F();return function(e,t){return r[pt.POINT]}}var zF=oet,Z8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),uet={SELECT:"select"},cet=function(r){Z8(e,r);function e(t,n,i,a){var o=r.call(this,t)||this;return o.selected=n,o.deselected=i,o.mapBrowserEvent=a,o}return e}(Vo),X_={},het=function(r){Z8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=i.condition?i.condition:UC,n.addCondition_=i.addCondition?i.addCondition:yx,n.removeCondition_=i.removeCondition?i.removeCondition:yx,n.toggleCondition_=i.toggleCondition?i.toggleCondition:S0,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:ul,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:fet(),n.features_=i.features||new Ii;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return Pi(o,s)}}else a=ul;return n.layerFilter_=a,n.featureLayerAssociation_={},n}return e.prototype.addFeatureLayerAssociation_=function(t,n){this.featureLayerAssociation_[Ee(t)]=n},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[Ee(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(t){var n=this.getMap();n&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),r.prototype.setMap.call(this,t),t?(this.features_.addEventListener(si.ADD,this.boundAddFeature_),this.features_.addEventListener(si.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(si.ADD,this.boundAddFeature_),this.features_.removeEventListener(si.REMOVE,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var n=t.element;if(this.style_&&this.applySelectedStyle_(n),!this.getLayer(n)){var i=this.getMap().getAllLayers().find(function(a){if(a instanceof El&&a.getSource()&&a.getSource().hasFeature(n))return a});i&&this.addFeatureLayerAssociation_(n,i)}},e.prototype.removeFeature_=function(t){var n=t.element;this.style_&&this.restorePreviousStyle_(n)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var n=Ee(t);n in X_||(X_[n]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){for(var n=this.getMap().getInteractions().getArray(),i=n.length-1;i>=0;--i){var a=n[i];if(a!==this&&a instanceof e&&a.getStyle()&&a.getFeatures().getArray().lastIndexOf(t)!==-1){t.setStyle(a.getStyle());return}}var o=Ee(t);t.setStyle(X_[o]),delete X_[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[Ee(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var n=this.addCondition_(t),i=this.removeCondition_(t),a=this.toggleCondition_(t),o=!n&&!i&&!a,s=t.map,A=this.getFeatures(),l=[],u=[];if(o){_d(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(g,m){if(this.filter_(g,m))return this.addFeatureLayerAssociation_(g,m),u.push(g),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var c=A.getLength()-1;c>=0;--c){var h=A.item(c),f=u.indexOf(h);f>-1?u.splice(f,1):(A.remove(h),l.push(h))}u.length!==0&&A.extend(u)}else{s.forEachFeatureAtPixel(t.pixel,function(g,m){if(this.filter_(g,m))return(n||a)&&!Pi(A.getArray(),g)?(this.addFeatureLayerAssociation_(g,m),u.push(g)):(i||a)&&Pi(A.getArray(),g)&&(l.push(g),this.removeFeatureLayerAssociation_(g)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=l.length-1;d>=0;--d)A.remove(l[d]);A.extend(u)}return(u.length>0||l.length>0)&&this.dispatchEvent(new cet(uet.SELECT,u,l,t)),!0},e}(sv);function fet(){var r=$F();return tn(r[pt.POLYGON],r[pt.LINE_STRING]),tn(r[pt.GEOMETRY_COLLECTION],r[pt.LINE_STRING]),function(e){return e.getGeometry()?r[e.getGeometry().getType()]:null}}var HC=het,det=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function qP(r){if(r.feature)return r.feature;if(r.element)return r.element}var zb=[],pet=function(r){det(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=ul),a.stopDown||(a.stopDown=yd),n=r.call(this,a)||this,n.source_=i.source?i.source:null,n.vertex_=i.vertex!==void 0?i.vertex:!0,n.edge_=i.edge!==void 0?i.edge:!0,n.features_=i.features?i.features:null,n.featuresListenerKeys_=[],n.featureChangeListenerKeys_={},n.indexedFeaturesExtents_={},n.pendingFeatures_={},n.pixelTolerance_=i.pixelTolerance!==void 0?i.pixelTolerance:10,n.rBush_=new iE,n.GEOMETRY_SEGMENTERS_={Point:n.segmentPointGemetry_.bind(n),LineString:n.segmentLineStringGemetry_.bind(n),LinearRing:n.segmentLineStringGemetry_.bind(n),Polygon:n.segmentPolygonGemetry_.bind(n),MultiPoint:n.segmentMultiPointGemetry_.bind(n),MultiLineString:n.segmentMultiLineStringGemetry_.bind(n),MultiPolygon:n.segmentMultiPolygonGemetry_.bind(n),GeometryCollection:n.segmentGeometryCollectionGemetry_.bind(n),Circle:n.segmentCircleGemetry_.bind(n)},n}return e.prototype.addFeature=function(t,n){var i=n!==void 0?n:!0,a=Ee(t),o=t.getGeometry();if(o){var s=this.GEOMETRY_SEGMENTERS_[o.getType()];if(s){this.indexedFeaturesExtents_[a]=o.getExtent(Di());var A=[];if(s(A,o),A.length===1)this.rBush_.insert(oa(A[0]),{feature:t,segment:A[0]});else if(A.length>1){var l=A.map(function(c){return oa(c)}),u=A.map(function(c){return{feature:t,segment:c}});this.rBush_.load(l,u)}}}i&&(this.featureChangeListenerKeys_[a]=je(t,xe.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(t){var n=this.snapTo(t.pixel,t.coordinate,t.map);return n&&(t.coordinate=n.vertex.slice(0,2),t.pixel=n.vertexPixel),r.prototype.handleEvent.call(this,t)},e.prototype.handleFeatureAdd_=function(t){var n=qP(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=qP(t);this.removeFeature(n)},e.prototype.handleFeatureChange_=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=Ee(n);i in this.pendingFeatures_||(this.pendingFeatures_[i]=n)}else this.updateFeature_(n)},e.prototype.handleUpEvent=function(t){var n=dF(this.pendingFeatures_);return n.length&&(n.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,n){var i=n!==void 0?n:!0,a=Ee(t),o=this.indexedFeaturesExtents_[a];if(o){var s=this.rBush_,A=[];s.forEachInExtent(o,function(u){t===u.feature&&A.push(u)});for(var l=A.length-1;l>=0;--l)s.remove(A[l])}i&&(Yr(this.featureChangeListenerKeys_[a]),delete this.featureChangeListenerKeys_[a])},e.prototype.setMap=function(t){var n=this.getMap(),i=this.featuresListenerKeys_,a=this.getFeatures_();n&&(i.forEach(Yr),i.length=0,a.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?i.push(je(this.features_,si.ADD,this.handleFeatureAdd_,this),je(this.features_,si.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(je(this.source_,ji.ADDFEATURE,this.handleFeatureAdd_,this),je(this.source_,ji.REMOVEFEATURE,this.handleFeatureRemove_,this)),a.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,n,i){var a=i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=oa([a,o]),A=this.rBush_.getInExtent(s),l=A.length;if(l===0)return null;var u=i.getView().getProjection(),c=Mn(n),h,f=1/0,d=this.pixelTolerance_*this.pixelTolerance_,g=function(){if(h){var N=i.getPixelFromCoordinate(h),x=pu(t,N);if(x<=d)return{vertex:h,vertexPixel:[Math.round(N[0]),Math.round(N[1])]}}return null};if(this.vertex_){for(var m=0;m{t[i]=t[i].value});const n=vd(Jn({},t));return ye(r,()=>{t=rh(r),Object.keys(t).forEach(i=>{n[i]!=t[i].value&&!e.includes(i)&&(n[i]=t[i].value)})}),{properties:n}}var me=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t};const _et={name:"ol-map",setup(r,{emit:e}){const{properties:t}=Or(r),n=Fo(null);let i=new GC(t);ye(t,()=>{i.setProperties(t)}),cr(()=>{i.setTarget(n.value)}),pr(()=>{i.setTarget(null),i=null}),Qr("map",i);const a=()=>i.focus(),o=(h,f,d={})=>i.forEachFeatureAtPixel(h,f,d),s=(h,f,d)=>i.forEachLayerAtPixel(h,f,d),A=h=>i.getCoordinateFromPixel(h),l=()=>i.refresh(),u=()=>i.render(),c=()=>i.updateSize();return i.on("click",h=>e("click",h)),i.on("dblclick",h=>e("dblclick",h)),i.on("singleclick",h=>e("singleclick",h)),i.on("pointerdrag",h=>e("pointerdrag",h)),i.on("pointermove",h=>e("pointermove",h)),i.on("movestart",h=>e("movestart",h)),i.on("moveend",h=>e("moveend",h)),i.on("postrender",h=>e("postrender",h)),i.on("precompose",h=>e("precompose",h)),i.on("postcompose",h=>e("postcompose",h)),{map:i,mapRef:n,focus:a,forEachFeatureAtPixel:o,forEachLayerAtPixel:s,getCoordinateFromPixel:A,refresh:l,render:u,updateSize:c}},props:{loadTilesWhileAnimating:{type:Boolean,default:!1},loadTilesWhileInteracting:{type:Boolean,default:!1},moveTolerance:{type:Number,default:1},pixelRatio:{type:Number,default:1},controls:{type:Array,default:()=>[]}}};function wet(r,e,t,n,i,a){return ti(),Yi("div",{ref:o=>n.mapRef=o},[Rr(r.$slots,"default")],512)}var Ex=me(_et,[["render",wet]]);function Eet(r,e){const t=Be("map"),{properties:n}=Or(r),i=()=>bA(Jn({},n),{projection:typeof n.projection=="string"?n.projection:new Ru(Jn({},n.projection))});let a=new rl(i());cr(()=>{t.setView(a)}),a.on("change:center",()=>{e("centerChanged",O()),e("zoomChanged",ct())}),a.on("change:resolution",()=>e("resolutionChanged",U())),a.on("change:rotation",()=>e("rotationChanged",At())),ye(n,()=>{let X=i();a.setProperties(X),a.applyOptions_(X)});const o=X=>a.adjustCenter(X),s=(X,It)=>a.adjustResolution(X,It),A=(X,It)=>a.adjustRotation(X,It),l=(X,It)=>a.adjustZoom(X,It),u=X=>a.animate(X),c=()=>a.beginInteraction(),h=X=>a.calculateExtent(X),f=()=>a.cancelAnimations(),d=(X,It,at)=>a.centerOn(X,It,at),g=()=>a.changed(),m=X=>a.dispatchEvent(X),v=(X,It,at)=>a.endInteraction(X,It,at),y=(X,It)=>a.fit(X,It),w=X=>a.get(X),C=()=>a.getAnimating(),O=()=>a.getCenter(),F=()=>a.getInteracting(),I=()=>a.getKeys(),T=()=>a.getMaxResolution(),L=()=>a.getMaxZoom(),N=()=>a.getMinResolution(),x=()=>a.getMinZoom(),S=()=>a.getProjection(),P=()=>a.getProperties(),U=()=>a.getResolution(),tt=(X,It)=>a.getResolutionForExtent(X,It),q=X=>a.getResolutionForZoom(X),rt=()=>a.getResolutions(),nt=()=>a.getRevision(),At=()=>a.getRotation(),ct=()=>a.getZoom();return{view:a,adjustCenter:o,adjustResolution:s,adjustRotation:A,adjustZoom:l,animate:u,beginInteraction:c,calculateExtent:h,cancelAnimations:f,centerOn:d,changed:g,dispatchEvent:m,endInteraction:v,fit:y,get:w,getAnimating:C,getCenter:O,getInteracting:F,getKeys:I,getMaxResolution:T,getMaxZoom:L,getMinResolution:N,getMinZoom:x,getProjection:S,getProperties:P,getResolution:U,getResolutionForExtent:tt,getResolutionForZoom:q,getResolutions:rt,getRevision:nt,getRotation:At,getZoom:ct,getZoomForResolution:X=>a.getZoomForResolution(X),setCenter:X=>a.setCenter(X),setConstrainResolution:X=>a.setConstrainResolution(X),setMaxZoom:X=>a.setMaxZoom(X),setMinZoom:X=>a.setMinZoom(X),setResolution:X=>a.setResolution(X),setRotation:X=>a.setRotation(X),setZoom:X=>a.setZoom(X)}}const Cet={name:"ol-view",setup(r,{emit:e}){const t=Eet(r,e);return Jn({},t)},props:{center:{type:Array,default:()=>[0,0]},constrainRotation:{type:Boolean,default:!0},enableRotation:{type:Boolean,default:!0},extent:{type:Array},constrainOnlyCenter:{type:Boolean,default:!1},smoothExtentConstraint:{type:Boolean,default:!0},maxResolution:{type:Number},minResolution:{type:Number},maxZoom:{type:Number,default:28},minZoom:{type:Number,default:0},multiWorld:{type:Boolean,default:!1},constrainResolution:{type:Boolean,default:!1},smoothResolutionConstraint:{type:Boolean,default:!0},showFullExtent:{type:Boolean,default:!1},projection:{type:[String,Object],default:"EPSG:3857"},resolution:{type:Number},resolutions:{type:Array},rotation:{type:Number},zoom:{type:Number,default:0},zoomFactor:{type:Number,default:2},padding:{type:Array,default:()=>[0,0,0,0]}}};function Bet(r,e,t,n,i,a){return Mr("",!0)}var Cx=me(Cet,[["render",Bet]]);const bet={name:"ol-feature",setup(r){const e=Be("vectorSource"),t=Be("vectorLayer"),n=Be("animation",null),{properties:i}=Or(r);let a=Ze(()=>new _r(Jn({},i.properties)));return ye(a,(o,s)=>{e.value.removeFeature(s),e.value.addFeature(o),e.value.changed()}),ye(e,(o,s)=>{s.removeFeature(a.value),o.addFeature(a.value),o.changed()}),cr(()=>{e.value.addFeature(a.value),n!=null&&t.value.animateFeature(a.value,n.value)}),pr(()=>{e.value.removeFeature(a.value)}),Qr("feature",a),Qr("stylable",a),{feature:a}},props:{properties:{type:[FC,Object,Array]}}};function Tet(r,e,t,n,i,a){return Rr(r.$slots,"default")}var Bx=me(bet,[["render",Tet]]);function xet(r,e){const t=Be("map"),n=Fo(null),{properties:i}=Or(r);let a=Ze(()=>new T8(i));cr(()=>{t.addOverlay(a.value)}),pr(()=>{t.removeOverlay(a.value)}),ye(a,(g,m)=>{t.removeOverlay(m),t.addOverlay(g)}),E4(()=>{c(n.value)},{flush:"post"}),a.value.on("change:element",()=>e("elementChanged",o())),a.value.on("change:offset",()=>e("offsetChanged",s())),a.value.on("change:position",()=>e("positionChanged",A())),a.value.on("change:positioning",()=>e("positioningChanged",l()));const o=()=>a.value.getElement(),s=()=>a.value.getOffset(),A=()=>a.value.getPosition(),l=()=>a.value.getPositioning(),u=g=>a.value.panIntoView(g),c=g=>a.value.setElement(g);return{overlay:a,htmlContent:n,getOffset:s,getPosition:A,getPositioning:l,panIntoView:u,setElement:c,setOffset:g=>a.value.setOffset(g),setPosition:g=>a.value.setPosition(g),setPositioning:g=>a.value.setPositioning(g)}}const Iet={name:"ol-overlay",setup(r,{emit:e}){const t=new xet(r,e);return Jn({},t)},props:{position:{type:Array},offset:{type:Array},positioning:{type:String},stopEvent:{type:Boolean,default:!0},insertFirst:{type:Boolean,default:!0},autoPan:{type:Boolean,default:!1},autoPanMargin:{type:Number,default:20},autoPanAnimation:{type:Object,default:void 0}}},Let={ref:"htmlContent"};function Oet(r,e,t,n,i,a){return ti(),Yi("div",Let,[Rr(r.$slots,"default",{position:t.position})],512)}var bx=me(Iet,[["render",Oet]]),J8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Yn={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},Fet=function(r){J8(e,r);function e(t){var n=r.call(this,xe.ERROR)||this;return n.code=t.code,n.message=t.message,n}return e}(Vo),Ret=function(r){J8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.position_=null,n.transform_=LC,n.watchId_=void 0,n.addChangeListener(Yn.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(Yn.TRACKING,n.handleTrackingChanged_),i.projection!==void 0&&n.setProjection(i.projection),i.trackingOptions!==void 0&&n.setTrackingOptions(i.trackingOptions),n.setTracking(i.tracking!==void 0?i.tracking:!1),n}return e.prototype.disposeInternal=function(){this.setTracking(!1),r.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=nd(Ve("EPSG:4326"),t),this.position_&&this.set(Yn.POSITION,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!t&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var n=t.coords;this.set(Yn.ACCURACY,n.accuracy),this.set(Yn.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(Yn.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(Yn.HEADING,n.heading===null?void 0:Kc(n.heading)),this.position_?(this.position_[0]=n.longitude,this.position_[1]=n.latitude):this.position_=[n.longitude,n.latitude];var i=this.transform_(this.position_);this.set(Yn.POSITION,i),this.set(Yn.SPEED,n.speed===null?void 0:n.speed);var a=S3(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(Yn.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Fet(t))},e.prototype.getAccuracy=function(){return this.get(Yn.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(Yn.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(Yn.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(Yn.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(Yn.HEADING)},e.prototype.getPosition=function(){return this.get(Yn.POSITION)},e.prototype.getProjection=function(){return this.get(Yn.PROJECTION)},e.prototype.getSpeed=function(){return this.get(Yn.SPEED)},e.prototype.getTracking=function(){return this.get(Yn.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(Yn.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(Yn.PROJECTION,Ve(t))},e.prototype.setTracking=function(t){this.set(Yn.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(Yn.TRACKING_OPTIONS,t)},e}(Oi),Met=Ret;const Net={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=Or(r);let n=Ze(()=>{let h=new Met(t);return h.on("change",c),h});const i=Fo([]),a=Fo(0),o=Fo(0),s=Fo(0),A=Fo(0),l=Fo(0),u=Fo({});ye(i,()=>{e("positionChanged",i.value)}),ye(A,()=>{e("speedChanged",A.value)}),ye(l,()=>{e("headingChanged",l.value)}),ye(o,()=>{e("altitudeChanged",o.value)}),ye(s,()=>{e("altitudeAccuracyChanged",s.value)}),ye(u,()=>{e("accuracyGeometryChanged",u.value)});const c=()=>{i.value=n.value.getPosition(),A.value=n.value.getSpeed(),l.value=n.value.getHeading(),a.value=n.value.getAccuracy(),o.value=n.value.getAltitude(),s.value=n.value.getAltitudeAccuracy(),u.value=n.value.getAccuracyGeometry()};return ye(n,(h,f)=>{f.un("change",c),h.on("change",c)}),{geoLoc:n,position:i,accuracy:a,altitude:o,altitudeAccuracy:s,speed:A,heading:l,accuracyGeometry:u}},props:{projection:{type:[String,Object],default:"EPSG:3857"},tracking:{type:Boolean,default:!0},trackingOptions:{type:Object,default:()=>({enableHighAccuracy:!0})}}};function Pet(r,e,t,n,i,a){return Rr(r.$slots,"default",{position:n.position,speed:n.speed,heading:n.heading,accuracy:n.accuracy,altitude:n.altitude,altitudeAccuracy:n.altitudeAccuracy,accuracyGeometry:n.accuracyGeometry})}var Tx=me(Net,[["render",Pet]]);function Uet(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var ad=1,od=2,tw=3,Det=4,Sx=5,ZP=6378137,Qet=6356752314e-3,JP=.0066943799901413165,Ay=484813681109536e-20,ee=Math.PI/2,ket=.16666666666666666,Het=.04722222222222222,Get=.022156084656084655,he=1e-10,va=.017453292519943295,al=57.29577951308232,An=Math.PI/4,Vy=Math.PI*2,Ci=3.14159265359,jo={};jo.greenwich=0;jo.lisbon=-9.131906111111;jo.paris=2.337229166667;jo.bogota=-74.080916666667;jo.madrid=-3.687938888889;jo.rome=12.452333333333;jo.bern=7.439583333333;jo.jakarta=106.807719444444;jo.ferro=-17.666666666667;jo.brussels=4.367975;jo.stockholm=18.058277777778;jo.athens=23.7163375;jo.oslo=10.722916666667;var $et={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},t5=/[\s_\-\/\(\)]/g;function hh(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(t5,""),i=-1,a,o;++i=this.text.length)return;r=this.text[this.place++]}switch(this.state){case jy:return this.neutral(r);case tH:return this.keyword(r);case aE:return this.quoted(r);case rH:return this.afterquote(r);case eH:return this.number(r);case YF:return}};Nu.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=aE;return}if($C.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)};Nu.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=jy;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=jy,this.currentObject=this.stack.pop(),this.currentObject||(this.state=YF);return}};Nu.prototype.number=function(r){if(nH.test(r)){this.word+=r;return}if($C.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)};Nu.prototype.quoted=function(r){if(r==='"'){this.state=rH;return}this.word+=r};Nu.prototype.keyword=function(r){if(Ket.test(r)){this.word+=r;return}if(r==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=jy;return}if($C.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)};Nu.prototype.neutral=function(r){if(jet.test(r)){this.word=r,this.state=tH;return}if(r==='"'){this.word="",this.state=aE;return}if(nH.test(r)){this.word=r,this.state=eH;return}if($C.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)};Nu.prototype.output=function(){for(;this.place0?90:-90),r.lat_ts=r.lat1)}function iH(r){var e=Wet(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return qp(e,i),Xet(i),i}function Ao(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Ao[r]=xx(arguments[1]):Ao[r]=iH(arguments[1]):Ao[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Ao.apply(e,n):Ao(n)});if(typeof r=="string"){if(r in Ao)return Ao[r]}else"EPSG"in r?Ao["EPSG:"+r.EPSG]=r:"ESRI"in r?Ao["ESRI:"+r.ESRI]=r:"IAU2000"in r?Ao["IAU2000:"+r.IAU2000]=r:console.log(r);return}}Uet(Ao);function qet(r){return typeof r=="string"}function Zet(r){return r in Ao}var Jet=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function trt(r){return Jet.some(function(e){return r.indexOf(e)>-1})}var ert=["3857","900913","3785","102113"];function rrt(r){var e=hh(r,"authority");if(e){var t=hh(e,"epsg");return t&&ert.indexOf(t)>-1}}function nrt(r){var e=hh(r,"extension");if(e)return hh(e,"proj4")}function irt(r){return r[0]==="+"}function art(r){if(qet(r)){if(Zet(r))return Ao[r];if(trt(r)){var e=iH(r);if(rrt(e))return Ao["EPSG:3857"];var t=nrt(e);return t?xx(t):e}if(irt(r))return xx(r)}else return r}function r5(r,e){r=r||{};var t,n;if(!e)return r;for(n in e)t=e[n],t!==void 0&&(r[n]=t);return r}function yl(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function F0(r){return r<0?-1:1}function we(r){return Math.abs(r)<=Ci?r:r-F0(r)*Vy}function vA(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(ee-e))/n}function Ky(r,e){for(var t=.5*r,n,i,a=ee-2*Math.atan(e),o=0;o<=15;o++)if(n=r*Math.sin(a),i=ee-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function ort(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=yl(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function srt(r){var e=r.x,t=r.y;if(t*al>90&&t*al<-90&&e*al>180&&e*al<-180)return null;var n,i;if(Math.abs(Math.abs(t)-ee)<=he)return null;if(this.sphere)n=this.x0+this.a*this.k0*we(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(An+.5*t));else{var a=Math.sin(t),o=vA(this.e,t,a);n=this.x0+this.a*this.k0*we(e-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function Art(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=ee-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(i=Ky(this.e,a),i===-9999)return null}return n=we(this.long0+e/(this.a*this.k0)),r.x=n,r.y=i,r}var lrt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],urt={init:ort,forward:srt,inverse:Art,names:lrt};function crt(){}function n5(r){return r}var hrt=["longlat","identity"],frt={init:crt,forward:n5,inverse:n5,names:hrt},drt=[urt,frt],ew={},oE=[];function aH(r,e){var t=oE.length;return r.names?(oE[t]=r,r.names.forEach(function(n){ew[n.toLowerCase()]=t}),this):(console.log(e),!0)}function prt(r){if(!r)return!1;var e=r.toLowerCase();if(typeof ew[e]<"u"&&oE[ew[e]])return oE[ew[e]]}function grt(){drt.forEach(aH)}var vrt={start:grt,add:aH,get:prt},Ar={};Ar.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ar.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ar.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ar.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ar.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ar.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ar.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ar.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ar.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ar.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ar.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ar.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ar.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ar.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ar.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ar.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ar.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ar.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ar.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ar.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ar.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ar.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ar.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ar.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ar.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ar.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ar.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ar.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ar.hough={a:6378270,rf:297,ellipseName:"Hough"};Ar.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ar.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ar.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ar.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ar.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ar.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ar.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ar.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ar.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ar.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ar.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ar.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var mrt=Ar.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ar.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function yrt(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(ket+o*(Het+o*Get)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function _rt(r,e,t,n,i){if(!r){var a=hh(Ar,n);a||(a=mrt),r=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*r),(t===0||Math.abs(r-e)3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=od,s.datum_params[3]*=Ay,s.datum_params[4]*=Ay,s.datum_params[5]*=Ay,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=tw,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var oH={};function Ert(r,e){var t=new DataView(e),n=brt(t),i=Trt(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=Srt(t,i,n),o={header:i,subgrids:a};return oH[r]=o,o}function Crt(r){if(r===void 0)return null;var e=r.split(",");return e.map(Brt)}function Brt(r){if(r.length===0)return null;var e=r[0]==="@";return e&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:r,mandatory:!e,grid:oH[r]||null,isNull:!1}}function Zp(r){return r/3600*Math.PI/180}function brt(r){var e=r.getInt32(8,!1);return e===11?!1:(e=r.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function Trt(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:Ix(r,56,56+8).trim(),fromSemiMajorAxis:r.getFloat64(120,e),fromSemiMinorAxis:r.getFloat64(136,e),toSemiMajorAxis:r.getFloat64(152,e),toSemiMinorAxis:r.getFloat64(168,e)}}function Ix(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function Srt(r,e,t){for(var n=176,i=[],a=0;a5e-11?!1:r.datum_type===ad?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]:r.datum_type===od?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]&&r.datum_params[3]===e.datum_params[3]&&r.datum_params[4]===e.datum_params[4]&&r.datum_params[5]===e.datum_params[5]&&r.datum_params[6]===e.datum_params[6]:!0}function sH(r,e,t){var n=r.x,i=r.y,a=r.z?r.z:0,o,s,A,l;if(i<-ee&&i>-1.001*ee)i=-ee;else if(i>ee&&i<1.001*ee)i=ee;else{if(i<-ee)return{x:-1/0,y:-1/0,z:r.z};if(i>ee)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(i),l=Math.cos(i),A=s*s,o=t/Math.sqrt(1-e*A),{x:(o+a)*l*Math.cos(n),y:(o+a)*l*Math.sin(n),z:(o*(1-e)+a)*s}}function AH(r,e,t,n){var i=1e-12,a=i*i,o=30,s,A,l,u,c,h,f,d,g,m,v,y,w,C=r.x,O=r.y,F=r.z?r.z:0,I,T,L;if(s=Math.sqrt(C*C+O*O),A=Math.sqrt(C*C+O*O+F*F),s/ta&&wn.y||u>n.x||fs&&Math.abs(A.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=we(a.x+t.ll[0]),n.y=a.y+t.ll[1]}else isNaN(a.x)||(n.x=r.x+a.x,n.y=r.y+a.y);return n}function a5(r,e){var t={x:r.x/e.del[0],y:r.y/e.del[1]},n={x:Math.floor(t.x),y:Math.floor(t.y)},i={x:t.x-1*n.x,y:t.y-1*n.y},a={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=e.lim[0]||n.y<0||n.y>=e.lim[1])return a;o=n.y*e.lim[0]+n.x;var s={x:e.cvs[o][0],y:e.cvs[o][1]};o++;var A={x:e.cvs[o][0],y:e.cvs[o][1]};o+=e.lim[0];var l={x:e.cvs[o][0],y:e.cvs[o][1]};o--;var u={x:e.cvs[o][0],y:e.cvs[o][1]},c=i.x*i.y,h=i.x*(1-i.y),f=(1-i.x)*(1-i.y),d=(1-i.x)*i.y;return a.x=f*s.x+h*A.x+d*u.x+c*l.x,a.y=f*s.y+h*A.y+d*u.y+c*l.y,a}function o5(r,e,t){var n=t.x,i=t.y,a=t.z||0,o,s,A,l={};for(A=0;A<3;A++)if(!(e&&A===2&&t.z===void 0))switch(A===0?(o=n,"ew".indexOf(r.axis[A])!==-1?s="x":s="y"):A===1?(o=i,"ns".indexOf(r.axis[A])!==-1?s="y":s="x"):(o=a,s="z"),r.axis[A]){case"e":l[s]=o;break;case"w":l[s]=-o;break;case"n":l[s]=o;break;case"s":l[s]=-o;break;case"u":t[s]!==void 0&&(l.z=o);break;case"d":t[s]!==void 0&&(l.z=-o);break;default:return null}return l}function lH(r){var e={x:r[0],y:r[1]};return r.length>2&&(e.z=r[2]),r.length>3&&(e.m=r[3]),e}function Prt(r){s5(r.x),s5(r.y)}function s5(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function Urt(r,e){return(r.datum.datum_type===ad||r.datum.datum_type===od)&&e.datumCode!=="WGS84"||(e.datum.datum_type===ad||e.datum.datum_type===od)&&r.datumCode!=="WGS84"}function sE(r,e,t,n){var i;if(Array.isArray(t)&&(t=lH(t)),Prt(t),r.datum&&e.datum&&Urt(r,e)&&(i=new cl("WGS84"),t=sE(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=o5(r,!1,t)),r.projName==="longlat")t={x:t.x*va,y:t.y*va,z:t.z||0};else if(r.to_meter&&(t={x:t.x*r.to_meter,y:t.y*r.to_meter,z:t.z||0}),t=r.inverse(t),!t)return;if(r.from_greenwich&&(t.x+=r.from_greenwich),t=Mrt(r.datum,e.datum,t),!!t)return e.from_greenwich&&(t={x:t.x-e.from_greenwich,y:t.y,z:t.z||0}),e.projName==="longlat"?t={x:t.x*al,y:t.y*al,z:t.z||0}:(t=e.forward(t),e.to_meter&&(t={x:t.x/e.to_meter,y:t.y/e.to_meter,z:t.z||0})),n&&e.axis!=="enu"?o5(e,!0,t):t}var A5=cl("WGS84");function Yb(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=sE(r,e,t,n)||{x:NaN,y:NaN},t.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(t.splice(3)):[i.x,i.y,t[2]].concat(t.splice(3)):[i.x,i.y].concat(t.splice(2)):[i.x,i.y]):(a=sE(r,e,t,n),o=Object.keys(t),o.length===2||o.forEach(function(s){if(typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"){if(s==="x"||s==="y"||s==="z")return}else if(s==="x"||s==="y")return;a[s]=t[s]}),a)}function l5(r){return r instanceof cl?r:r.oProj?r.oProj:cl(r)}function Go(r,e,t){r=l5(r);var n=!1,i;return typeof e>"u"?(e=r,r=A5,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=A5,n=!0),e=l5(e),t?Yb(r,e,t):(i={forward:function(a,o){return Yb(r,e,a,o)},inverse:function(a,o){return Yb(e,r,a,o)}},n&&(i.oProj=e),i)}var u5=6,uH="AJSAJS",cH="AFAFAF",Jp=65,Lo=73,Rs=79,Pm=86,Um=90,Drt={forward:hH,inverse:Qrt,toPoint:fH};function hH(r,e){return e=e||5,Grt(krt({lat:r[1],lon:r[0]}),e)}function Qrt(r){var e=XF(pH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function fH(r){var e=XF(pH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Xb(r){return r*(Math.PI/180)}function c5(r){return 180*(r/Math.PI)}function krt(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,c,h,f=Xb(e),d=Xb(t),g,m;m=Math.floor((t+180)/6)+1,t===180&&(m=60),e>=56&&e<64&&t>=3&&t<12&&(m=32),e>=72&&e<84&&(t>=0&&t<9?m=31:t>=9&&t<21?m=33:t>=21&&t<33?m=35:t>=33&&t<42&&(m=37)),o=(m-1)*6-180+3,g=Xb(o),s=i/(1-i),A=n/Math.sqrt(1-i*Math.sin(f)*Math.sin(f)),l=Math.tan(f)*Math.tan(f),u=s*Math.cos(f)*Math.cos(f),c=Math.cos(f)*(d-g),h=n*((1-i/4-3*i*i/64-5*i*i*i/256)*f-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*f)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*f)-35*i*i*i/3072*Math.sin(6*f));var v=a*A*(c+(1-l+u)*c*c*c/6+(5-18*l+l*l+72*u-58*s)*c*c*c*c*c/120)+5e5,y=a*(h+A*Math.tan(f)*(c*c/2+(5-l+9*u+4*u*u)*c*c*c*c/24+(61-58*l+l*l+600*u-330*s)*c*c*c*c*c*c/720));return e<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(v),zoneNumber:m,zoneLetter:Hrt(e)}}function XF(r){var e=r.northing,t=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var a=.9996,o=6378137,s=.00669438,A,l=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,c,h,f,d,g,m,v,y,w=t-5e5,C=e;n<"N"&&(C-=1e7),m=(i-1)*6-180+3,A=s/(1-s),g=C/a,v=g/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),y=v+(3*l/2-27*l*l*l/32)*Math.sin(2*v)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*v)+151*l*l*l/96*Math.sin(6*v),u=o/Math.sqrt(1-s*Math.sin(y)*Math.sin(y)),c=Math.tan(y)*Math.tan(y),h=A*Math.cos(y)*Math.cos(y),f=o*(1-s)/Math.pow(1-s*Math.sin(y)*Math.sin(y),1.5),d=w/(u*a);var O=y-u*Math.tan(y)/f*(d*d/2-(5+3*c+10*h-4*h*h-9*A)*d*d*d*d/24+(61+90*c+298*h+45*c*c-252*A-3*h*h)*d*d*d*d*d*d/720);O=c5(O);var F=(d-(1+2*c+h)*d*d*d/6+(5-2*h+28*c-3*h*h+8*A+24*c*c)*d*d*d*d*d/120)/Math.cos(y);F=m+c5(F);var I;if(r.accuracy){var T=XF({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});I={top:T.lat,right:T.lon,bottom:O,left:F}}else I={lat:O,lon:F};return I}function Hrt(r){var e="Z";return 84>=r&&r>=72?e="X":72>r&&r>=64?e="W":64>r&&r>=56?e="V":56>r&&r>=48?e="U":48>r&&r>=40?e="T":40>r&&r>=32?e="S":32>r&&r>=24?e="R":24>r&&r>=16?e="Q":16>r&&r>=8?e="P":8>r&&r>=0?e="N":0>r&&r>=-8?e="M":-8>r&&r>=-16?e="L":-16>r&&r>=-24?e="K":-24>r&&r>=-32?e="J":-32>r&&r>=-40?e="H":-40>r&&r>=-48?e="G":-48>r&&r>=-56?e="F":-56>r&&r>=-64?e="E":-64>r&&r>=-72?e="D":-72>r&&r>=-80&&(e="C"),e}function Grt(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+$rt(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function $rt(r,e,t){var n=dH(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return Vrt(i,a,n)}function dH(r){var e=r%u5;return e===0&&(e=u5),e}function Vrt(r,e,t){var n=t-1,i=uH.charCodeAt(n),a=cH.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>Um&&(o=o-Um+Jp-1,A=!0),(o===Lo||iLo||(o>Lo||iRs||(o>Rs||iUm&&(o=o-Um+Jp-1),s>Pm?(s=s-Pm+Jp-1,A=!0):A=!1,(s===Lo||aLo||(s>Lo||aRs||(s>Rs||aPm&&(s=s-Pm+Jp-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function pH(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var e=r.length,t=null,n="",i,a=0;!/[A-Z]/.test(i=r.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,a++}var o=parseInt(n,10);if(a===0||a+3>e)throw"MGRSPoint bad conversion from: "+r;var s=r.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+r;t=r.substring(a,a+=2);for(var A=dH(o),l=jrt(t.charAt(0),A),u=Krt(t.charAt(1),A);u0&&(g=1e5/Math.pow(10,h),m=r.substring(a,a+h),f=parseFloat(m)*g,v=r.substring(a+h),d=parseFloat(v)*g),y=f+l,w=d+u,{easting:y,northing:w,zoneLetter:s,zoneNumber:o,accuracy:g}}function jrt(r,e){for(var t=uH.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Rs&&t++,t>Um){if(i)throw"Bad character: "+r;t=Jp,i=!0}n+=1e5}return n}function Krt(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=cH.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Rs&&t++,t>Pm){if(i)throw"Bad character: "+r;t=Jp,i=!0}n+=1e5}return n}function Wrt(r){var e;switch(r){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+r}function Ng(r,e,t){if(!(this instanceof Ng))return new Ng(r,e,t);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof e>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=e,this.z=t||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ng.fromMGRS=function(r){return new Ng(fH(r))};Ng.prototype.toMGRS=function(r){return hH([this.x,this.y],r)};var zrt=1,Yrt=.25,h5=.046875,f5=.01953125,d5=.01068115234375,Xrt=.75,qrt=.46875,Zrt=.013020833333333334,Jrt=.007120768229166667,tnt=.3645833333333333,ent=.005696614583333333,rnt=.3076171875;function gH(r){var e=[];e[0]=zrt-r*(Yrt+r*(h5+r*(f5+r*d5))),e[1]=r*(Xrt-r*(h5+r*(f5+r*d5)));var t=r*r;return e[2]=t*(qrt-r*(Zrt+r*Jrt)),t*=r,e[3]=t*(tnt-r*ent),e[4]=t*r*rnt,e}function VC(r,e,t,n){return t*=e,e*=e,n[0]*r-t*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}var nnt=20;function vH(r,e,t){for(var n=1/(1-e),i=r,a=nnt;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(VC(i,o,Math.cos(i),t)-r)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)he?Math.tan(t):0,g=Math.pow(d,2),m=Math.pow(g,2);i=1-this.es*Math.pow(s,2),u=u/Math.sqrt(i);var v=VC(t,s,A,this.en);a=this.a*(this.k0*u*(1+c/6*(1-g+h+c/20*(5-18*g+m+14*h-58*g*h+c/42*(61+179*m-m*g-479*g)))))+this.x0,o=this.a*(this.k0*(v-this.ml0+s*n*u/2*(1+c/12*(5-g+9*h+4*f+c/30*(61+m-58*g+270*h-330*g*h+c/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var l=A*Math.sin(n);if(Math.abs(Math.abs(l)-1)=1){if(l-1>he)return 93;o=0}else o=Math.acos(o);t<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return r.x=a,r.y=o,r}function ont(r){var e,t,n,i,a=(r.x-this.x0)*(1/this.a),o=(r.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,t=vH(e,this.es,this.en),Math.abs(t)he?Math.tan(t):0,d=this.ep2*Math.pow(h,2),g=Math.pow(d,2),m=Math.pow(f,2),v=Math.pow(m,2);e=1-this.es*Math.pow(c,2);var y=a*Math.sqrt(e)/this.k0,w=Math.pow(y,2);e=e*f,n=t-e*w/(1-this.es)*.5*(1-w/12*(5+3*m-9*d*m+d-4*g-w/30*(61+90*m-252*d*m+45*v+46*d-w/56*(1385+3633*m+4095*v+1574*v*m)))),i=we(this.long0+y*(1-w/6*(1+2*m+d-w/20*(5+28*m+24*v+8*d*m+6*d-w/42*(61+662*m+1320*v+720*v*m))))/h)}else n=ee*F0(o),i=0;else{var s=Math.exp(a/this.k0),A=.5*(s-1/s),l=this.lat0+o/this.k0,u=Math.cos(l);e=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(A,2))),n=Math.asin(e),o<0&&(n=-n),A===0&&u===0?i=0:i=we(Math.atan2(A,u)+this.long0)}return r.x=i,r.y=n,r}var snt=["Fast_Transverse_Mercator","Fast Transverse Mercator"],rw={init:int,forward:ant,inverse:ont,names:snt};function mH(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function jC(r,e){r=Math.abs(r),e=Math.abs(e);var t=Math.max(r,e),n=Math.min(r,e)/(t||1);return t*Math.sqrt(1+Math.pow(n,2))}function Ant(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function lnt(r){var e=Math.abs(r);return e=Ant(e*(1+e/(jC(1,e)+1))),r<0?-e:e}function qF(r,e){for(var t=2*Math.cos(2*e),n=r.length-1,i=r[n],a=0,o;--n>=0;)o=-a+t*i+r[n],a=i,i=o;return e+o*Math.sin(2*e)}function unt(r,e){for(var t=2*Math.cos(e),n=r.length-1,i=r[n],a=0,o;--n>=0;)o=-a+t*i+r[n],a=i,i=o;return Math.sin(e)*o}function cnt(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function yH(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=mH(t),o=cnt(t),s=2*i*o,A=-2*n*a,l=r.length-1,u=r[l],c=0,h=0,f=0,d,g;--l>=0;)d=h,g=c,h=u,c=f,u=-d+s*h-A*c+r[l],f=-g+A*h+s*c;return s=n*o,A=i*a,[s*u-A*f,s*f+A*u]}function hnt(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(rw.init.apply(this),this.forward=rw.forward,this.inverse=rw.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),e=r/(2-r),t=e;this.cgb[0]=e*(2+e*(-2/3+e*(-2+e*(116/45+e*(26/45+e*(-2854/675)))))),this.cbg[0]=e*(-2+e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))),t=t*e,this.cgb[1]=t*(7/3+e*(-8/5+e*(-227/45+e*(2704/315+e*(2323/945))))),this.cbg[1]=t*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),t=t*e,this.cgb[2]=t*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=t*(-26/15+e*(34/21+e*(8/5+e*(-12686/2835)))),t=t*e,this.cgb[3]=t*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=t*(1237/630+e*(-12/5+e*(-24832/14175))),t=t*e,this.cgb[4]=t*(4174/315+e*(-144838/6237)),this.cbg[4]=t*(-734/315+e*(109598/31185)),t=t*e,this.cgb[5]=t*(601676/22275),this.cbg[5]=t*(444337/155925),t=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+t*(1/4+t*(1/64+t/256))),this.utg[0]=e*(-.5+e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=t*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=t*(13/48+e*(-3/5+e*(557/1440+e*(281/630+e*(-1983433/1935360))))),t=t*e,this.utg[2]=t*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=t*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),t=t*e,this.utg[3]=t*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=t*(49561/161280+e*(-179/168+e*(6601661/7257600))),t=t*e,this.utg[4]=t*(-4583/161280+e*(108847/3991680)),this.gtu[4]=t*(34729/80640+e*(-3418889/1995840)),t=t*e,this.utg[5]=t*(-20648693/638668800),this.gtu[5]=t*(212378941/319334400);var n=qF(this.cbg,this.lat0);this.Zb=-this.Qn*(n+unt(this.gtu,2*n))}function fnt(r){var e=we(r.x-this.long0),t=r.y;t=qF(this.cbg,t);var n=Math.sin(t),i=Math.cos(t),a=Math.sin(e),o=Math.cos(e);t=Math.atan2(n,o*i),e=Math.atan2(a*i,jC(n,i*o)),e=lnt(Math.tan(e));var s=yH(this.gtu,2*t,2*e);t=t+s[0],e=e+s[1];var A,l;return Math.abs(e)<=2.623395162778?(A=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*t+this.Zb)+this.y0):(A=1/0,l=1/0),r.x=A,r.y=l,r}function dnt(r){var e=(r.x-this.x0)*(1/this.a),t=(r.y-this.y0)*(1/this.a);t=(t-this.Zb)/this.Qn,e=e/this.Qn;var n,i;if(Math.abs(e)<=2.623395162778){var a=yH(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(mH(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,jC(A,l*s)),e=Math.atan2(A,l*s),n=we(e+this.long0),i=qF(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var pnt=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],nw={init:hnt,forward:fnt,inverse:dnt,names:pnt};function gnt(r,e){if(r===void 0){if(r=Math.floor((we(e)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var vnt="etmerc";function mnt(){var r=gnt(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*va,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,nw.init.apply(this),this.forward=nw.forward,this.inverse=nw.inverse}var ynt=["Universal Transverse Mercator System","utm"],_nt={init:mnt,names:ynt,dependsOn:vnt};function ZF(r,e){return Math.pow((1-r)/(1+r),e)}var wnt=20;function Ent(){var r=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+An)/(Math.pow(Math.tan(.5*this.lat0+An),this.C)*ZF(this.e*r,this.ratexp))}function Cnt(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+An),this.C)*ZF(this.e*Math.sin(t),this.ratexp))-ee,r.x=this.C*e,r}function Bnt(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+An)/this.K,1/this.C),a=wnt;a>0&&(n=2*Math.atan(i*ZF(this.e*Math.sin(r.y),-.5*this.e))-ee,!(Math.abs(n-r.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=he&&(this.k0=.5*this.cons*yl(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/vA(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=yl(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-ee,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Rnt(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),a,o,s,A,l,u,c=we(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=he&&Math.abs(t+this.lat0)<=he?(r.x=NaN,r.y=NaN,r):this.sphere?(a=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(c)),r.x=this.a*a*i*Math.sin(c)+this.x0,r.y=this.a*a*(this.coslat0*n-this.sinlat0*i*Math.cos(c))+this.y0,r):(o=2*Math.atan(this.ssfn_(t,n,this.e))-ee,A=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=he?(l=vA(this.e,t*this.con,this.con*n),u=2*this.a*this.k0*l/this.cons,r.x=this.x0+u*Math.sin(e-this.long0),r.y=this.y0-this.con*u*Math.cos(e-this.long0),r):(Math.abs(this.sinlat0)0?e=we(this.long0+Math.atan2(r.x,-1*r.y)):e=we(this.long0+Math.atan2(r.x,r.y)):e=we(this.long0+Math.atan2(r.x*Math.sin(s),o*this.coslat0*Math.cos(s)-r.y*this.sinlat0*Math.sin(s))),r.x=e,r.y=t,r)}else if(Math.abs(this.coslat0)<=he){if(o<=he)return t=this.lat0,e=this.long0,r.x=e,r.y=t,r;r.x*=this.con,r.y*=this.con,n=o*this.cons/(2*this.a*this.k0),t=this.con*Ky(this.e,n),e=this.con*we(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=he?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),e=we(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),t=-1*Ky(this.e,Math.tan(.5*(ee+a)));return r.x=e,r.y=t,r}var Nnt=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],Pnt={init:Fnt,forward:Rnt,inverse:Mnt,names:Nnt,ssfn_:Ont};function Unt(){var r=this.lat0;this.lambda0=this.long0;var e=Math.sin(r),t=this.a,n=this.rf,i=1/n,a=2*i-Math.pow(i,2),o=this.e=Math.sqrt(a);this.R=this.k0*t*Math.sqrt(1-a)/(1-a*Math.pow(e,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),A=Math.log(Math.tan(Math.PI/4+r/2)),l=Math.log((1+o*e)/(1-o*e));this.K=s-this.alpha*A+this.alpha*o/2*l}function Dnt(r){var e=Math.log(Math.tan(Math.PI/4-r.y/2)),t=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(e+t)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(r.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return r.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,r.x=this.R*o+this.x0,r}function Qnt(r){for(var e=r.x-this.x0,t=r.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,A=0,l=a,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;A=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(A))-Math.PI/2}return r.x=s,r.y=l,r}var knt=["somerc"],Hnt={init:Unt,forward:Dnt,inverse:Qnt,names:knt},Qp=1e-7;function Gnt(r){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],t=typeof r.PROJECTION=="object"?Object.keys(r.PROJECTION)[0]:r.PROJECTION;return"no_uoff"in r||"no_off"in r||e.indexOf(t)!==-1}function $nt(){var r,e,t,n,i,a,o,s,A,l,u=0,c,h=0,f=0,d=0,g=0,m=0,v=0;this.no_off=Gnt(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(v=this.alpha),w&&(u=this.rectified_grid_angle*va),y||w)h=this.longc;else if(f=this.long1,g=this.lat1,d=this.long2,m=this.lat2,Math.abs(g-m)<=Qp||(r=Math.abs(g))<=Qp||Math.abs(r-ee)<=Qp||Math.abs(Math.abs(this.lat0)-ee)<=Qp||Math.abs(Math.abs(m)-ee)<=Qp)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>he?(s=Math.sin(this.lat0),t=Math.cos(this.lat0),r=1-this.es*s*s,this.B=t*t,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*e/r,n=this.B*e/(t*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(vA(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),y||w?(y?(c=Math.asin(Math.sin(v)/n),w||(u=v)):(c=u,v=Math.asin(n*Math.sin(c))),this.lam0=h-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(a=Math.pow(vA(this.e,g,Math.sin(g)),this.B),o=Math.pow(vA(this.e,m,Math.sin(m)),this.B),i=this.E/a,A=(o-a)/(o+a),l=this.E*this.E,l=(l-o*a)/(l+o*a),r=f-d,r<-Math.pi?d-=Vy:r>Math.pi&&(d+=Vy),this.lam0=we(.5*(f+d)-Math.atan(l*Math.tan(.5*this.B*(f-d))/A)/this.B),c=Math.atan(2*Math.sin(this.B*we(f-this.lam0))/(i-1/i)),u=v=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(An-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(An+i))}function Vnt(r){var e={},t,n,i,a,o,s,A,l;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-ee)>he){if(o=this.E/Math.pow(vA(this.e,r.y,Math.sin(r.y)),this.B),s=1/o,t=.5*(o-s),n=.5*(o+s),a=Math.sin(this.B*r.x),i=(t*this.singam-a*this.cosgam)/n,Math.abs(Math.abs(i)-1)0?this.v_pole_n:this.v_pole_s,A=this.ArB*r.y;return this.no_rot?(e.x=A,e.y=l):(A-=this.u_0,e.x=l*this.cosrot+A*this.sinrot,e.y=A*this.cosrot-l*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function jnt(r){var e,t,n,i,a,o,s,A={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(t=r.y,e=r.x):(t=r.x*this.cosrot-r.y*this.sinrot,e=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*t),i=.5*(n-1/n),a=.5*(n+1/n),o=Math.sin(this.BrA*e),s=(o*this.cosgam+i*this.singam)/a,Math.abs(Math.abs(s)-1)he?this.ns=Math.log(n/s)/Math.log(i/A):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Ynt(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=he&&(t=F0(t)*(ee-2*he));var n=Math.abs(Math.abs(t)-ee),i,a;if(n>he)i=vA(this.e,t,Math.sin(t)),a=this.a*this.f0*Math.pow(i,this.ns);else{if(n=t*this.ns,n<=0)return null;a=0}var o=this.ns*we(e-this.long0);return r.x=this.k0*(a*Math.sin(o))+this.x0,r.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,r}function Xnt(r){var e,t,n,i,a,o=(r.x-this.x0)/this.k0,s=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),t=1):(e=-Math.sqrt(o*o+s*s),t=-1);var A=0;if(e!==0&&(A=Math.atan2(t*o,t*s)),e!==0||this.ns>0){if(t=1/this.ns,n=Math.pow(e/(this.a*this.f0),t),i=Ky(this.e,n),i===-9999)return null}else i=-ee;return a=we(A/this.ns+this.long0),r.x=a,r.y=i,r}var qnt=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],Znt={init:znt,forward:Ynt,inverse:Xnt,names:qnt};function Jnt(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function tit(r){var e,t,n,i,a,o,s,A=r.x,l=r.y,u=we(A-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),t=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(t)+Math.sin(this.ad)*Math.cos(t)*Math.cos(n)),a=Math.asin(Math.cos(t)*Math.sin(n)/Math.cos(i)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=s*Math.cos(o)/1,r.x=s*Math.sin(o)/1,this.czech||(r.y*=-1,r.x*=-1),r}function eit(r){var e,t,n,i,a,o,s,A,l=r.x;r.x=r.y,r.y=l,this.czech||(r.y*=-1,r.x*=-1),o=Math.sqrt(r.x*r.x+r.y*r.y),a=Math.atan2(r.y,r.x),i=a/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),t=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),r.x=this.long0-t/this.alfa,s=e,A=0;var u=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-r.y)<1e-10&&(A=1),s=r.y,u+=1;while(A===0&&u<15);return u>=15?null:r}var rit=["Krovak","krovak"],nit={init:Jnt,forward:tit,inverse:eit,names:rit};function fo(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function R0(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function M0(r){return .375*r*(1+.25*r*(1+.46875*r))}function N0(r){return .05859375*r*r*(1+.75*r)}function P0(r){return r*r*r*(35/3072)}function Pg(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function Av(r){return Math.abs(r)1e-7?(t=r*e,(1-r*r)*(e/(1-t*t)-.5/r*Math.log((1-t)/(1+t)))):2*e}var lit=1,uit=2,cit=3,hit=4;function fit(){var r=Math.abs(this.lat0);if(Math.abs(r-ee)0){var e;switch(this.qp=Yc(this.e,1),this.mmf=.5/(1-this.es),this.apa=Eit(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Yc(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function dit(r){var e,t,n,i,a,o,s,A,l,u,c=r.x,h=r.y;if(c=we(c-this.long0),this.sphere){if(a=Math.sin(h),u=Math.cos(h),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n,t<=he)return null;t=Math.sqrt(2/t),e=t*u*Math.sin(c),t*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)=0?(e=(l=Math.sqrt(o))*i,t=n*(this.mode===this.S_POLE?l:-l)):e=t=0;break}}return r.x=this.a*e+this.x0,r.y=this.a*t+this.y0,r}function pit(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i,a,o,s,A,l;if(this.sphere){var u=0,c,h=0;if(c=Math.sqrt(e*e+t*t),i=c*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=he?0:Math.asin(t*h/c),e*=h,t=u*c;break;case this.OBLIQ:i=Math.abs(c)<=he?this.lat0:Math.asin(u*this.sinph0+t*h*this.cosph0/c),e*=h*this.cosph0,t=(u-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:t=-t,i=ee-i;break;case this.S_POLE:i-=ee;break}n=t===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,t)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,t*=this.dd,A=Math.sqrt(e*e+t*t),A1&&(r=r>1?1:-1),Math.asin(r)}function Tit(){Math.abs(this.lat1+this.lat2)he?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function Sit(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=Yc(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*we(e-this.long0),o=i*Math.sin(a)+this.x0,s=this.rh-i*Math.cos(a)+this.y0;return r.x=o,r.y=s,r}function xit(r){var e,t,n,i,a,o;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,e!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(t=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,t)),a=we(i/this.ns0+this.long0),r.x=a,r.y=o,r}function Iit(r,e){var t,n,i,a,o,s=fh(.5*e);if(r0||Math.abs(o)<=he?(s=this.x0+this.a*a*t*Math.sin(n)/o,A=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*i)/o):(s=this.x0+this.infinity_dist*t*Math.sin(n),A=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*t*i)),r.x=s,r.y=A,r}function Mit(r){var e,t,n,i,a,o;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(e=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(e,this.rc),t=Math.sin(i),n=Math.cos(i),o=fh(n*this.sin_p14+r.y*t*this.cos_p14/e),a=Math.atan2(r.x*t,e*this.cos_p14*n-r.y*this.sin_p14*t),a=we(this.long0+a)):(o=this.phic0,a=0),r.x=a,r.y=o,r}var Nit=["gnom"],Pit={init:Fit,forward:Rit,inverse:Mit,names:Nit};function Uit(r,e){var t=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(e)-t)<1e-6)return e<0?-1*ee:ee;for(var n=Math.asin(.5*e),i,a,o,s,A=0;A<30;A++)if(a=Math.sin(n),o=Math.cos(n),s=r*a,i=Math.pow(1-s*s,2)/(2*o)*(e/(1-r*r)-a/(1-s*s)+.5/r*Math.log((1-s)/(1+s))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function Dit(){this.sphere||(this.k0=yl(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Qit(r){var e=r.x,t=r.y,n,i,a=we(e-this.long0);if(this.sphere)n=this.x0+this.a*a*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(t)/Math.cos(this.lat_ts);else{var o=Yc(this.e,Math.sin(t));n=this.x0+this.a*this.k0*a,i=this.y0+this.a*o*.5/this.k0}return r.x=n,r.y=i,r}function kit(r){r.x-=this.x0,r.y-=this.y0;var e,t;return this.sphere?(e=we(this.long0+r.x/this.a/Math.cos(this.lat_ts)),t=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(t=Uit(this.e,2*r.y*this.k0/this.a),e=we(this.long0+r.x/(this.a*this.k0))),r.x=e,r.y=t,r}var Hit=["cea"],Git={init:Dit,forward:Qit,inverse:kit,names:Hit};function $it(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Vit(r){var e=r.x,t=r.y,n=we(e-this.long0),i=Av(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function jit(r){var e=r.x,t=r.y;return r.x=we(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=Av(this.lat0+(t-this.y0)/this.a),r}var Kit=["Equirectangular","Equidistant_Cylindrical","eqc"],Wit={init:$it,forward:Vit,inverse:jit,names:Kit},p5=20;function zit(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=R0(this.es),this.e1=M0(this.es),this.e2=N0(this.es),this.e3=P0(this.es),this.ml0=this.a*fo(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Yit(r){var e=r.x,t=r.y,n,i,a,o=we(e-this.long0);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=he?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(t),i=this.a*(Av(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=he)n=this.a*o,i=-1*this.ml0;else{var s=Pg(this.a,this.e,Math.sin(t))/Math.tan(t);n=s*Math.sin(a),i=this.a*fo(this.e0,this.e1,this.e2,this.e3,t)-this.ml0+s*(1-Math.cos(a))}return r.x=n+this.x0,r.y=i+this.y0,r}function Xit(r){var e,t,n,i,a,o,s,A,l;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=he)e=we(n/this.a+this.long0),t=0;else{o=this.lat0+i/this.a,s=n*n/this.a/this.a+o*o,A=o;var u;for(a=p5;a;--a)if(u=Math.tan(A),l=-1*(o*(A*u+1)-A-.5*(A*A+s)*u)/((A-o)/u-1),A+=l,Math.abs(l)<=he){t=A;break}e=we(this.long0+Math.asin(n*Math.tan(A)/this.a)/Math.sin(t))}else if(Math.abs(i+this.ml0)<=he)t=0,e=we(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,A=o;var c,h,f,d,g;for(a=p5;a;--a)if(g=this.e*Math.sin(A),c=Math.sqrt(1-g*g)*Math.tan(A),h=this.a*fo(this.e0,this.e1,this.e2,this.e3,A),f=this.e0-2*this.e1*Math.cos(2*A)+4*this.e2*Math.cos(4*A)-6*this.e3*Math.cos(6*A),d=h/this.a,l=(o*(c*d+1)-d-.5*c*(d*d+s))/(this.es*Math.sin(2*A)*(d*d+s-2*o*d)/(4*c)+(o-d)*(c*f-2/Math.sin(2*A))-f),A-=l,Math.abs(l)<=he){t=A;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=we(this.long0+Math.asin(n*c/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var qit=["Polyconic","poly"],Zit={init:zit,forward:Yit,inverse:Xit,names:qit};function Jit(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function tat(r){var e,t=r.x,n=r.y,i=n-this.lat0,a=t-this.long0,o=i/Ay*1e-5,s=a,A=1,l=0;for(e=1;e<=10;e++)A=A*o,l=l+this.A[e]*A;var u=l,c=s,h=1,f=0,d,g,m=0,v=0;for(e=1;e<=6;e++)d=h*u-f*c,g=f*u+h*c,h=d,f=g,m=m+this.B_re[e]*h-this.B_im[e]*f,v=v+this.B_im[e]*h+this.B_re[e]*f;return r.x=v*this.a+this.x0,r.y=m*this.a+this.y0,r}function eat(r){var e,t=r.x,n=r.y,i=t-this.x0,a=n-this.y0,o=a/this.a,s=i/this.a,A=1,l=0,u,c,h=0,f=0;for(e=1;e<=6;e++)u=A*o-l*s,c=l*o+A*s,A=u,l=c,h=h+this.C_re[e]*A-this.C_im[e]*l,f=f+this.C_im[e]*A+this.C_re[e]*l;for(var d=0;d.999999999999&&(t=.999999999999),e=Math.asin(t);var n=we(this.long0+r.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),t=(2*e+Math.sin(2*e))/Math.PI,Math.abs(t)>1&&(t=1);var i=Math.asin(t);return r.x=n,r.y=i,r}var mat=["Mollweide","moll"],yat={init:pat,forward:gat,inverse:vat,names:mat};function _at(){Math.abs(this.lat1+this.lat2)=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),e=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),e=-1);var a=0;if(t!==0&&(a=Math.atan2(e*r.x,e*r.y)),this.sphere)return i=we(this.long0+a/this.ns),n=Av(this.g-t/this.a),r.x=i,r.y=n,r;var o=this.g-t/this.a;return n=AE(o,this.e0,this.e1,this.e2,this.e3),i=we(this.long0+a/this.ns),r.x=i,r.y=n,r}var Cat=["Equidistant_Conic","eqdc"],Bat={init:_at,forward:wat,inverse:Eat,names:Cat};function bat(){this.R=this.a}function Tat(r){var e=r.x,t=r.y,n=we(e-this.long0),i,a;Math.abs(t)<=he&&(i=this.x0+this.R*n,a=this.y0);var o=fh(2*Math.abs(t/Math.PI));(Math.abs(n)<=he||Math.abs(Math.abs(t)-ee)<=he)&&(i=this.x0,t>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/n-n/Math.PI),A=s*s,l=Math.sin(o),u=Math.cos(o),c=u/(l+u-1),h=c*c,f=c*(2/l-1),d=f*f,g=Math.PI*this.R*(s*(c-d)+Math.sqrt(A*(c-d)*(c-d)-(d+A)*(h-d)))/(d+A);n<0&&(g=-g),i=this.x0+g;var m=A+c;return g=Math.PI*this.R*(f*m-s*Math.sqrt((d+A)*(A+1)-m*m))/(d+A),t>=0?a=this.y0+g:a=this.y0-g,r.x=i,r.y=a,r}function Sat(r){var e,t,n,i,a,o,s,A,l,u,c,h,f;return r.x-=this.x0,r.y-=this.y0,c=Math.PI*this.R,n=r.x/c,i=r.y/c,a=n*n+i*i,o=-Math.abs(i)*(1+a),s=o-2*i*i+n*n,A=-2*o+1+2*i*i+a*a,f=i*i/A+(2*s*s*s/A/A/A-9*o*s/A/A)/27,l=(o-s*s/3/A)/A,u=2*Math.sqrt(-l/3),c=3*f/l/u,Math.abs(c)>1&&(c>=0?c=1:c=-1),h=Math.acos(c)/3,r.y>=0?t=(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI:t=-(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI,Math.abs(n)2*ee*this.a?void 0:(t=e/this.a,n=Math.sin(t),i=Math.cos(t),a=this.long0,Math.abs(e)<=he?o=this.lat0:(o=fh(i*this.sin_p12+r.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-ee,Math.abs(s)<=he?this.lat0>=0?a=we(this.long0+Math.atan2(r.x,-r.y)):a=we(this.long0-Math.atan2(-r.x,r.y)):a=we(this.long0+Math.atan2(r.x*n,e*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=a,r.y=o,r)):(A=R0(this.es),l=M0(this.es),u=N0(this.es),c=P0(this.es),Math.abs(this.sin_p12-1)<=he?(h=this.a*fo(A,l,u,c,ee),e=Math.sqrt(r.x*r.x+r.y*r.y),f=h-e,o=AE(f/this.a,A,l,u,c),a=we(this.long0+Math.atan2(r.x,-1*r.y)),r.x=a,r.y=o,r):Math.abs(this.sin_p12+1)<=he?(h=this.a*fo(A,l,u,c,ee),e=Math.sqrt(r.x*r.x+r.y*r.y),f=e-h,o=AE(f/this.a,A,l,u,c),a=we(this.long0+Math.atan2(r.x,r.y)),r.x=a,r.y=o,r):(e=Math.sqrt(r.x*r.x+r.y*r.y),m=Math.atan2(r.x,r.y),d=Pg(this.a,this.e,this.sin_p12),v=Math.cos(m),y=this.e*this.cos_p12*v,w=-y*y/(1-this.es),C=3*this.es*(1-w)*this.sin_p12*this.cos_p12*v/(1-this.es),O=e/d,F=O-w*(1+w)*Math.pow(O,3)/6-C*(1+3*w)*Math.pow(O,4)/24,I=1-w*F*F/2-O*F*F*F/6,g=Math.asin(this.sin_p12*Math.cos(F)+this.cos_p12*Math.sin(F)*v),a=we(this.long0+Math.asin(Math.sin(m)*Math.sin(F)/Math.cos(g))),T=Math.sin(g),o=Math.atan2((T-this.es*I*this.sin_p12)*Math.tan(g),T*(1-this.es)),r.x=a,r.y=o,r))}var Rat=["Azimuthal_Equidistant","aeqd"],Mat={init:Lat,forward:Oat,inverse:Fat,names:Rat};function Nat(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Pat(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=we(l-this.long0),e=Math.sin(u),t=Math.cos(u),i=Math.cos(n),o=this.sin_p14*e+this.cos_p14*t*i,a=1,(o>0||Math.abs(o)<=he)&&(s=this.a*a*t*Math.sin(n),A=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*i)),r.x=s,r.y=A,r}function Uat(r){var e,t,n,i,a,o,s;return r.x-=this.x0,r.y-=this.y0,e=Math.sqrt(r.x*r.x+r.y*r.y),t=fh(e/this.a),n=Math.sin(t),i=Math.cos(t),o=this.long0,Math.abs(e)<=he?(s=this.lat0,r.x=o,r.y=s,r):(s=fh(i*this.sin_p14+r.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-ee,Math.abs(a)<=he?(this.lat0>=0?o=we(this.long0+Math.atan2(r.x,-r.y)):o=we(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=s,r):(o=we(this.long0+Math.atan2(r.x*n,e*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=o,r.y=s,r))}var Dat=["ortho"],Qat={init:Nat,forward:Pat,inverse:Uat,names:Dat},Xn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ln={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function kat(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ee-An/2?this.face=Xn.TOP:this.lat0<=-(ee-An/2)?this.face=Xn.BOTTOM:Math.abs(this.long0)<=An?this.face=Xn.FRONT:Math.abs(this.long0)<=ee+An?this.face=this.long0>0?Xn.RIGHT:Xn.LEFT:this.face=Xn.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Hat(r){var e={x:0,y:0},t,n,i,a,o,s,A={value:0};if(r.x-=this.long0,this.es!==0?t=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):t=r.y,n=r.x,this.face===Xn.TOP)a=ee-t,n>=An&&n<=ee+An?(A.value=ln.AREA_0,i=n-ee):n>ee+An||n<=-(ee+An)?(A.value=ln.AREA_1,i=n>0?n-Ci:n+Ci):n>-(ee+An)&&n<=-An?(A.value=ln.AREA_2,i=n+ee):(A.value=ln.AREA_3,i=n);else if(this.face===Xn.BOTTOM)a=ee+t,n>=An&&n<=ee+An?(A.value=ln.AREA_0,i=-n+ee):n=-An?(A.value=ln.AREA_1,i=-n):n<-An&&n>=-(ee+An)?(A.value=ln.AREA_2,i=-n-ee):(A.value=ln.AREA_3,i=n>0?-n+Ci:-n-Ci);else{var l,u,c,h,f,d,g;this.face===Xn.RIGHT?n=fg(n,+ee):this.face===Xn.BACK?n=fg(n,+Ci):this.face===Xn.LEFT&&(n=fg(n,-ee)),h=Math.sin(t),f=Math.cos(t),d=Math.sin(n),g=Math.cos(n),l=f*g,u=f*d,c=h,this.face===Xn.FRONT?(a=Math.acos(l),i=Z_(a,c,u,A)):this.face===Xn.RIGHT?(a=Math.acos(u),i=Z_(a,c,-l,A)):this.face===Xn.BACK?(a=Math.acos(-l),i=Z_(a,c,-u,A)):this.face===Xn.LEFT?(a=Math.acos(-u),i=Z_(a,c,l,A)):(a=i=0,A.value=ln.AREA_0)}return s=Math.atan(12/Ci*(i+Math.acos(Math.sin(i)*Math.cos(An))-ee)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),A.value===ln.AREA_1?s+=ee:A.value===ln.AREA_2?s+=Ci:A.value===ln.AREA_3&&(s+=1.5*Ci),e.x=o*Math.cos(s),e.y=o*Math.sin(s),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,r.x=e.x,r.y=e.y,r}function Gat(r){var e={lam:0,phi:0},t,n,i,a,o,s,A,l,u,c={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),t=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?c.value=ln.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=ln.AREA_1,t-=ee):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=ln.AREA_2,t=t<0?t+Ci:t-Ci):(c.value=ln.AREA_3,t+=ee),u=Ci/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),s=Math.atan(o),i=Math.cos(t),a=Math.tan(n),A=1-i*i*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),A<-1?A=-1:A>1&&(A=1),this.face===Xn.TOP)l=Math.acos(A),e.phi=ee-l,c.value===ln.AREA_0?e.lam=s+ee:c.value===ln.AREA_1?e.lam=s<0?s+Ci:s-Ci:c.value===ln.AREA_2?e.lam=s-ee:e.lam=s;else if(this.face===Xn.BOTTOM)l=Math.acos(A),e.phi=l-ee,c.value===ln.AREA_0?e.lam=-s+ee:c.value===ln.AREA_1?e.lam=-s:c.value===ln.AREA_2?e.lam=-s-ee:e.lam=s<0?-s-Ci:-s+Ci;else{var h,f,d;h=A,u=h*h,u>=1?d=0:d=Math.sqrt(1-u)*Math.sin(s),u+=d*d,u>=1?f=0:f=Math.sqrt(1-u),c.value===ln.AREA_1?(u=f,f=-d,d=u):c.value===ln.AREA_2?(f=-f,d=-d):c.value===ln.AREA_3&&(u=f,f=d,d=-u),this.face===Xn.RIGHT?(u=h,h=-f,f=u):this.face===Xn.BACK?(h=-h,f=-f):this.face===Xn.LEFT&&(u=h,h=f,f=-u),e.phi=Math.acos(-d)-ee,e.lam=Math.atan2(f,h),this.face===Xn.RIGHT?e.lam=fg(e.lam,-ee):this.face===Xn.BACK?e.lam=fg(e.lam,-Ci):this.face===Xn.LEFT&&(e.lam=fg(e.lam,+ee))}if(this.es!==0){var g,m,v;g=e.phi<0?1:0,m=Math.tan(e.phi),v=this.b/Math.sqrt(m*m+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),g&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function Z_(r,e,t,n){var i;return rAn&&i<=ee+An?(n.value=ln.AREA_1,i-=ee):i>ee+An||i<=-(ee+An)?(n.value=ln.AREA_2,i=i>=0?i-Ci:i+Ci):(n.value=ln.AREA_3,i+=ee)),i}function fg(r,e){var t=r+e;return t<-Ci?t+=Vy:t>+Ci&&(t-=Vy),t}var $at=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Vat={init:kat,forward:Hat,inverse:Gat,names:$at},Lx=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Dm=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],_H=.8487,wH=1.3523,EH=al/5,jat=1/EH,tg=18,lE=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},Kat=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function Wat(r,e,t,n){for(var i=e;n;--n){var a=r(i);if(i-=a,Math.abs(a)=tg&&(n=tg-1),t=al*(t-jat*n);var i={x:lE(Lx[n],t)*e,y:lE(Dm[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*_H+this.x0,i.y=i.y*this.a*wH+this.y0,i}function Xat(r){var e={x:(r.x-this.x0)/(this.a*_H),y:Math.abs(r.y-this.y0)/(this.a*wH)};if(e.y>=1)e.x/=Lx[tg][0],e.y=r.y<0?-ee:ee;else{var t=Math.floor(e.y*tg);for(t<0?t=0:t>=tg&&(t=tg-1);;)if(Dm[t][0]>e.y)--t;else if(Dm[t+1][0]<=e.y)++t;else break;var n=Dm[t],i=5*(e.y-n[0])/(Dm[t+1][0]-n[0]);i=Wat(function(a){return(lE(n,a)-e.y)/Kat(n,a)},i,he,100),e.x/=lE(Lx[t],i),e.y=(5*t+i)*va,r.y<0&&(e.y=-e.y)}return e.x=we(e.x+this.long0),e}var qat=["Robinson","robin"],Zat={init:zat,forward:Yat,inverse:Xat,names:qat};function Jat(){this.name="geocent"}function tot(r){var e=sH(r,this.es,this.a);return e}function eot(r){var e=AH(r,this.es,this.a,this.b);return e}var rot=["Geocentric","geocentric","geocent","Geocent"],not={init:Jat,forward:tot,inverse:eot,names:rot},Ga={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},cm={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function iot(){if(Object.keys(cm).forEach(function(t){if(typeof this[t]>"u")this[t]=cm[t].def;else{if(cm[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);cm[t].num&&(this[t]=parseFloat(this[t]))}cm[t].degrees&&(this[t]=this[t]*va)}.bind(this)),Math.abs(Math.abs(this.lat0)-ee)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(r),this.sw=Math.sin(r)}function aot(r){r.x-=this.long0;var e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i,a;switch(this.mode){case Ga.OBLIQ:a=this.sinph0*e+this.cosph0*t*n;break;case Ga.EQUIT:a=t*n;break;case Ga.S_POLE:a=-e;break;case Ga.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),i=a*t*Math.sin(r.x),this.mode){case Ga.OBLIQ:a*=this.cosph0*e-this.sinph0*t*n;break;case Ga.EQUIT:a*=e;break;case Ga.N_POLE:a*=-(t*n);break;case Ga.S_POLE:a*=t*n;break}var o,s;return o=a*this.cg+i*this.sg,s=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-a*this.sg)*this.cw*s,a=o*s,r.x=i*this.a,r.y=a*this.a,r}function oot(r){r.x/=this.a,r.y/=this.a;var e={x:r.x,y:r.y},t,n,i;i=1/(this.pn1-r.y*this.sw),t=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=t*this.cg+n*this.sg,r.y=n*this.cg-t*this.sg;var a=jC(r.x,r.y);if(Math.abs(a)t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Re()},e.prototype.getAlpha=function(t,n){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(!i)i=n,this.transitionStarts_[t]=i;else if(i===-1)return 1;var a=n-i+1e3/60;return a>=this.transition_?1:bF(a/this.transition_)},e.prototype.inTransition=function(t){return this.transition_?this.transitionStarts_[t]!==-1:!1},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(wd),tR=vot,mot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yot=function(r){mot(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,s)||this;return A.crossOrigin_=a,A.src_=i,A.key=i,A.image_=new Image,a!==null&&(A.image_.crossOrigin=a),A.unlisten_=null,A.tileLoadFunction_=o,A}return e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=Te.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=Te.ERROR,this.unlistenImage_(),this.image_=_ot(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Te.LOADED:this.state=Te.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Te.ERROR&&(this.state=Te.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Te.IDLE&&(this.state=Te.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=KF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(tR);function _ot(){var r=wo(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var cE=yot,BH=.5,wot=10,g5=.25,Eot=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=Gy(this.targetProj_,this.sourceProj_);this.transformInv_=function(w){var C=w[0]+"/"+w[1];return s[C]||(s[C]=A(w)),s[C]},this.maxSourceExtent_=i,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Kr(i)==Kr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Kr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Kr(this.targetProj_.getExtent()):null;var l=TA(n),u=E0(n),c=iv(n),h=w0(n),f=this.transformInv_(l),d=this.transformInv_(u),g=this.transformInv_(c),m=this.transformInv_(h),v=wot+(o?Math.max(0,Math.ceil(kk(My(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,h,f,d,g,m,v),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach(function(w,C,O){y=Math.min(y,w.source[0][0],w.source[1][0],w.source[2][0])}),this.triangles_.forEach(function(w){if(Math.max(w.source[0][0],w.source[1][0],w.source[2][0])-y>this.sourceWorldWidth_/2){var C=[[w.source[0][0],w.source[0][1]],[w.source[1][0],w.source[1][1]],[w.source[2][0],w.source[2][1]]];C[0][0]-y>this.sourceWorldWidth_/2&&(C[0][0]-=this.sourceWorldWidth_),C[1][0]-y>this.sourceWorldWidth_/2&&(C[1][0]-=this.sourceWorldWidth_),C[2][0]-y>this.sourceWorldWidth_/2&&(C[2][0]-=this.sourceWorldWidth_);var O=Math.min(C[0][0],C[1][0],C[2][0]),F=Math.max(C[0][0],C[1][0],C[2][0]);F-O.5&&c<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var g=oa([e,t,n,i]),m=Kr(g)/this.targetWorldWidth_;d=m>g5||d}!f&&this.sourceProj_.isGlobal()&&c&&(d=c>g5||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!qn(u,this.maxSourceExtent_))){var v=0;if(!d&&(!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(A[0])||!isFinite(A[1]))){if(l>0)d=!0;else if(v=(!isFinite(a[0])||!isFinite(a[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(s[0])||!isFinite(s[1])?2:0)+(!isFinite(A[0])||!isFinite(A[1])?1:0),v!=1&&v!=2&&v!=4&&v!=8)return}if(l>0){if(!d){var y=[(e[0]+n[0])/2,(e[1]+n[1])/2],w=this.transformInv_(y),C=void 0;if(f){var O=(Wc(a[0],h)+Wc(s[0],h))/2;C=O-Wc(w[0],h)}else C=(a[0]+s[0])/2-w[0];var F=(a[1]+s[1])/2-w[1],I=C*C+F*F;d=I>this.errorThresholdSquared_}if(d){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){var T=[(t[0]+n[0])/2,(t[1]+n[1])/2],L=this.transformInv_(T),N=[(i[0]+e[0])/2,(i[1]+e[1])/2],x=this.transformInv_(N);this.addQuad_(e,t,T,N,a,o,L,x,l-1),this.addQuad_(N,T,n,i,x,L,s,A,l-1)}else{var S=[(e[0]+t[0])/2,(e[1]+t[1])/2],P=this.transformInv_(S),U=[(n[0]+i[0])/2,(n[1]+i[1])/2],tt=this.transformInv_(U);this.addQuad_(e,S,U,i,a,P,tt,A,l-1),this.addQuad_(S,t,n,U,P,o,s,tt,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}v&11||this.addTriangle_(e,n,i,a,s,A),v&14||this.addTriangle_(e,n,t,a,s,o),v&&(v&13||this.addTriangle_(t,i,e,o,A,a),v&7||this.addTriangle_(t,i,n,o,A,s))}},r.prototype.calculateSourceExtent=function(){var e=Di();return this.triangles_.forEach(function(t,n,i){var a=t.source;Uf(e,a[0]),Uf(e,a[1]),Uf(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),bH=Eot,Ug={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},TH={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},qb;function v5(r,e,t,n,i){r.beginPath(),r.moveTo(0,0),r.lineTo(e,t),r.lineTo(n,i),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(e,n)+1,Math.max(t,i)),r.restore()}function Zb(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function Cot(){if(qb===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",v5(r,4,5,4,0),v5(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;qb=Zb(e,0)||Zb(e,4)||Zb(e,8)}return qb}function Wy(r,e,t,n){var i=uh(t,e,r),a=Yw(e,n,t),o=e.getMetersPerUnit();o!==void 0&&(a*=o);var s=r.getMetersPerUnit();s!==void 0&&(a/=s);var A=r.getExtent();if(!A||mA(A,i)){var l=Yw(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function Bot(r,e,t,n){var i=Ya(t),a=Wy(r,e,i,n);return(!isFinite(a)||a<=0)&&IC(t,function(o){return a=Wy(r,e,o,n),isFinite(a)&&a>0}),a}function SH(r,e,t,n,i,a,o,s,A,l,u,c){var h=wo(Math.round(t*r),Math.round(t*e));if(c||Ce(h,Ug),A.length===0)return h.canvas;h.scale(t,t);function f(C){return Math.round(C*t)/t}h.globalCompositeOperation="lighter";var d=Di();A.forEach(function(C,O,F){Ah(d,C.extent)});var g=Kr(d),m=Li(d),v=wo(Math.round(t*g/n),Math.round(t*m/n));c||Ce(v,Ug);var y=t/n;A.forEach(function(C,O,F){var I=C.extent[0]-d[0],T=-(C.extent[3]-d[3]),L=Kr(C.extent),N=Li(C.extent);C.image.width>0&&C.image.height>0&&v.drawImage(C.image,l,l,C.image.width-2*l,C.image.height-2*l,I*y,T*y,L*y,N*y)});var w=TA(o);return s.getTriangles().forEach(function(C,O,F){var I=C.source,T=C.target,L=I[0][0],N=I[0][1],x=I[1][0],S=I[1][1],P=I[2][0],U=I[2][1],tt=f((T[0][0]-w[0])/a),q=f(-(T[0][1]-w[1])/a),rt=f((T[1][0]-w[0])/a),nt=f(-(T[1][1]-w[1])/a),At=f((T[2][0]-w[0])/a),ct=f(-(T[2][1]-w[1])/a),Tt=L,M=N;L=0,N=0,x-=Tt,S-=M,P-=Tt,U-=M;var W=[[x,S,0,0,rt-tt],[P,U,0,0,At-tt],[0,0,x,S,nt-q],[0,0,P,U,ct-q]],Y=OX(W);if(Y){if(h.save(),h.beginPath(),Cot()||!c){h.moveTo(rt,nt);for(var H=4,J=tt-rt,ot=q-nt,ut=0;utthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY},r}();function gp(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new xH(r,e,t,n)}var rR=xH,Sot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),xot=function(r){Sot(e,r);function e(t){var n=r.call(this,t)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=Di(),n.tmpTileRange_=new rR(0,0,0,0),n}return e.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==Te.LOADED||i==Te.EMPTY||i==Te.ERROR&&!a},e.prototype.getTile=function(t,n,i,a){var o=a.pixelRatio,s=a.viewState.projection,A=this.getLayer(),l=A.getSource(),u=l.getTile(t,n,i,o,s);return u.getState()==Te.ERROR&&(A.getUseInterimTilesOnError()?A.getPreload()>0&&(this.newTiles_=!0):u.setState(Te.LOADED)),this.isDrawableTile(u)||(u=u.getInterimTile()),u},e.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),a=bn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!mA(o,a))return null;for(var s=n.pixelRatio,A=n.viewState.projection,l=n.viewState,u=i.getRenderSource(),c=u.getTileGridForProjection(l.projection),h=u.getTilePixelRatio(n.pixelRatio),f=c.getZForResolution(l.resolution);f>=c.getMinZoom();--f){var d=c.getTileCoordForCoordAndZ(a,f),g=u.getTile(f,d[1],d[2],s,A);if(!(g instanceof cE||g instanceof eR))return null;if(g.getState()===Te.LOADED){var m=c.getOrigin(f),v=Wi(c.getTileSize(f)),y=c.getResolution(f),w=Math.floor(h*((a[0]-m[0])/y-d[1]*v[0])),C=Math.floor(h*((m[1]-a[1])/y-d[2]*v[1]));return this.getImageData(g.getImage(),w,C)}}return null},e.prototype.loadedTileCallback=function(t,n,i){return this.isDrawableTile(i)?r.prototype.loadedTileCallback.call(this,t,n,i):!1},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],a=t.viewState,o=a.projection,s=a.resolution,A=a.center,l=a.rotation,u=t.pixelRatio,c=this.getLayer(),h=c.getSource(),f=h.getRevision(),d=h.getTileGridForProjection(o),g=d.getZForResolution(s,h.zDirection),m=d.getResolution(g),v=t.extent,y=i.extent&&gs(i.extent);y&&(v=ks(v,gs(i.extent)));var w=h.getTilePixelRatio(u),C=Math.round(t.size[0]*w),O=Math.round(t.size[1]*w);if(l){var F=Math.round(Math.sqrt(C*C+O*O));C=F,O=F}var I=m*C/2/w,T=m*O/2/w,L=[A[0]-I,A[1]-T,A[0]+I,A[1]+T],N=d.getTileRangeForExtentAndZ(v,g),x={};x[g]={};var S=this.createLoadedTileFinder(h,o,x),P=this.tmpExtent,U=this.tmpTileRange_;this.newTiles_=!1;for(var tt=N.minX;tt<=N.maxX;++tt)for(var q=N.minY;q<=N.maxY;++q){var rt=this.getTile(g,tt,q,t);if(this.isDrawableTile(rt)){var nt=Ee(this);if(rt.getState()==Te.LOADED){x[g][rt.tileCoord.toString()]=rt;var At=rt.inTransition(nt);!this.newTiles_&&(At||this.renderedTiles.indexOf(rt)===-1)&&(this.newTiles_=!0)}if(rt.getAlpha(nt,t.time)===1)continue}var ct=d.getTileCoordChildTileRange(rt.tileCoord,U,P),Tt=!1;ct&&(Tt=S(g+1,ct)),Tt||d.forEachTileCoordParentTileRange(rt.tileCoord,S,U,P)}var M=m/s;yo(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/w,1/w,l,-C/2,-O/2);var W=AF(this.pixelTransform);this.useContainer(n,W,i.opacity,this.getBackground(t));var Y=this.context,H=Y.canvas;_0(this.inversePixelTransform,this.pixelTransform),yo(this.tempTransform,C/2,O/2,M,M,0,-C/2,-O/2),H.width!=C||H.height!=O?(H.width=C,H.height=O):this.containerReused||Y.clearRect(0,0,C,O),y&&this.clipUnrotated(Y,t,y),h.getInterpolate()||Ce(Y,Ug),this.preRender(Y,t),this.renderedTiles.length=0;var J=Object.keys(x).map(Number);J.sort(oh);var ot,ut,X;i.opacity===1&&(!this.containerReused||h.getOpaque(t.viewState.projection))?J=J.reverse():(ot=[],ut=[]);for(var It=J.length-1;It>=0;--It){var at=J[It],j=h.getTilePixelSize(at,u,o),Z=d.getResolution(at),ft=Z/m,it=j[0]*ft*M,V=j[1]*ft*M,Ft=d.getTileCoordForCoordAndZ(TA(L),at),Mt=d.getTileCoordExtent(Ft),Et=bn(this.tempTransform,[w*(Mt[0]-L[0])/m,w*(L[3]-Mt[3])/m]),Bt=w*h.getGutterForProjection(o),Ct=x[at];for(var Rt in Ct){var rt=Ct[Rt],Nt=rt.tileCoord,Dt=Ft[1]-Nt[1],Wt=Math.round(Et[0]-(Dt-1)*it),te=Ft[2]-Nt[2],Ae=Math.round(Et[1]-(te-1)*V),tt=Math.round(Et[0]-Dt*it),q=Math.round(Et[1]-te*V),oe=Wt-tt,Jt=Ae-q,fe=g===at,At=fe&&rt.getAlpha(Ee(this),t.time)!==1,qt=!1;if(!At)if(ot){X=[tt,q,tt+oe,q,tt+oe,q+Jt,tt,q+Jt];for(var nr=0,ke=ot.length;nr{}}}};function Fot(r,e,t,n,i,a){return ti(),Yi("div")}var bd=me(Oot,[["render",Fot]]);const Rot={extends:bd,name:"ol-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=Ze(()=>new nR(n)),a=()=>{t!=null?(t.value.getOverviewMap().addLayer(i.value),t.value.changed()):e.addLayer(i.value)},o=()=>{t!=null?(t.value.getOverviewMap().removeLayer(i.value),t.value.changed()):e.removeLayer(i.value)};return t!=null&&ye(t,()=>{o(),a()}),cr(()=>{a()}),pr(()=>{o()}),Qr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function Mot(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Fx=me(Rot,[["render",Mot]]),Not=function(){function r(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return r.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},r.prototype.expireCache=function(e){for(;this.canExpireCache();)this.pop()},r.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},r.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},r.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},r.prototype.get=function(e,t){var n=this.entries_[e];return Le(n!==void 0,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_},r.prototype.remove=function(e){var t=this.entries_[e];return Le(t!==void 0,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_},r.prototype.getCount=function(){return this.count_},r.prototype.getKeys=function(){var e=new Array(this.count_),t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.key_;return e},r.prototype.getValues=function(){var e=new Array(this.count_),t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.value_;return e},r.prototype.peekLast=function(){return this.oldest_.value_},r.prototype.peekLastKey=function(){return this.oldest_.key_},r.prototype.peekFirstKey=function(){return this.newest_.key_},r.prototype.pop=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_},r.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},r.prototype.set=function(e,t){Le(!(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_},r.prototype.setSize=function(e){this.highWaterMark=e},r}(),LH=Not,Pot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Uot=function(r){Pot(e,r);function e(t){var n=this,i=Te.IDLE;return n=r.call(this,t.tileCoord,i,{transition:t.transition,interpolate:t.interpolate})||this,n.loader_=t.loader,n.data_=null,n.error_=null,n}return e.prototype.getData=function(){return this.data_},e.prototype.getError=function(){return this.error_},e.prototype.load=function(){this.state=Te.LOADING,this.changed();var t=this;this.loader_().then(function(n){t.data_=n,t.state=Te.LOADED,t.changed()}).catch(function(n){t.error_=n,t.state=Te.ERROR,t.changed()})},e}(tR),Dot=Uot,zy=34962,KC=34963,Qot=35040,iR=35044,iw=35048,kot=5121,Hot=5123,Got=5125,OH=5126,m5=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function FH(r,e){for(var t=Ce({preserveDrawingBuffer:!0,antialias:!uX},e),n=m5.length,i=0;i0))){var t=e.canvas,n=FH(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete hE[r]}}var nst=function(r){Jot(e,r);function e(t){var n=r.call(this)||this,i=t||{};n.boundHandleWebGLContextLost_=n.handleWebGLContextLost.bind(n),n.boundHandleWebGLContextRestored_=n.handleWebGLContextRestored.bind(n),n.canvasCacheKey_=i.canvasCacheKey?w5(i.canvasCacheKey):tst(),n.canvas_=est(n.canvasCacheKey_),n.gl_=FH(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(J_.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(J_.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=xi(),n.offsetScaleMatrix_=xi(),n.tmpMat4_=MH(),n.uniformLocations_={},n.attribLocations_={},n.uniforms_=[],i.uniforms&&n.setUniforms(i.uniforms);var a=n.getGL();return n.postProcessPasses_=i.postProcesses?i.postProcesses.map(function(o){return new _5({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new _5({webGlContext:a})],n.shaderCompileErrors_=null,n.startTime_=Date.now(),n}return e.prototype.setUniforms=function(t){this.uniforms_=[];for(var n in t)this.uniforms_.push({name:n,value:t[n]});this.uniformLocations_={}},e.prototype.canvasCacheKeyMatches=function(t){return this.canvasCacheKey_===w5(t)},e.prototype.getExtension=function(t){if(t in this.extensionCache_)return this.extensionCache_[t];var n=this.gl_.getExtension(t);return this.extensionCache_[t]=n,n},e.prototype.bindBuffer=function(t){var n=this.getGL(),i=Ee(t),a=this.bufferCache_[i];if(!a){var o=n.createBuffer();a={buffer:t,webGlBuffer:o},this.bufferCache_[i]=a}n.bindBuffer(t.getType(),a.webGlBuffer)},e.prototype.flushBufferData=function(t){var n=this.getGL();this.bindBuffer(t),n.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var n=this.getGL(),i=Ee(t),a=this.bufferCache_[i];a&&!n.isContextLost()&&n.deleteBuffer(a.webGlBuffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(J_.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(J_.RESTORED,this.boundHandleWebGLContextRestored_),rst(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},e.prototype.prepareDraw=function(t,n){var i=this.getGL(),a=this.getCanvas(),o=t.size,s=t.pixelRatio;a.width=o[0]*s,a.height=o[1]*s,a.style.width=o[0]+"px",a.style.height=o[1]+"px",i.useProgram(this.currentProgram_);for(var A=this.postProcessPasses_.length-1;A>=0;A--)this.postProcessPasses_[A].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,n,i){var a=this.getGL(),o=n.getSize();a.bindFramebuffer(a.FRAMEBUFFER,n.getFramebuffer()),a.viewport(0,0,o[0],o[1]),a.bindTexture(a.TEXTURE_2D,n.getTexture()),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.enable(a.BLEND),a.blendFunc(a.ONE,i?a.ZERO:a.ONE_MINUS_SRC_ALPHA),a.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,n){var i=this.getGL();this.getExtension("OES_element_index_uint");var a=i.UNSIGNED_INT,o=4,s=n-t,A=t*o;i.drawElements(i.TRIANGLES,s,a,A)},e.prototype.finalizeDraw=function(t,n,i){for(var a=0,o=this.postProcessPasses_.length;at||t>e.getMaxZoom())return!1;var a=e.getFullTileRange(t);return a?a.containsXY(n,i):!0}var cst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ur={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY",RENDER_EXTENT:"u_renderExtent",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},ow={TEXTURE_COORD:"a_textureCoord"},hst=[{name:ow.TEXTURE_COORD,size:2,type:Ns.FLOAT}],fst={};function dst(r){return 2*(1-1/(r+1))-1}function C5(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function eT(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=ks(e,gs(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=ks(e,i))}return e}function rT(r,e){return"".concat(r.getKey(),",").concat(Xy(e))}var pst=function(r){cst(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=xi(),i.tempMat4_=MH(),i.tempTileRange_=new rR(0,0,0,0),i.tempTileCoord_=Yy(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new ly(KC,iR),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new LH(a),i.paletteTextures_=n.paletteTextures||[],i.frameState_=null,i}return e.prototype.reset=function(t){r.prototype.reset.call(this,{uniforms:t.uniforms}),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))},e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)},e.prototype.isDrawableTile_=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==Te.LOADED||i==Te.EMPTY||i==Te.ERROR&&!a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getRenderSource();return!i||av(eT(t,t.extent))?!1:i.getState()===co.READY},e.prototype.enqueueTiles=function(t,n,i,a){var o=t.viewState,s=this.getLayer(),A=s.getRenderSource(),l=A.getTileGridForProjection(o.projection),u=A.getTilePixelRatio(t.pixelRatio),c=A.getGutterForProjection(o.projection),h=Ee(A);h in t.wantedTiles||(t.wantedTiles[h]={});for(var f=t.wantedTiles[h],d=this.tileTextureCache_,g=Math.max(i-s.getPreload(),l.getMinZoom(),s.getMinZoom()),m=i;m>=g;--m)for(var v=l.getTileRangeForExtentAndZ(n,m,this.tempTileRange_),y=l.getResolution(m),w=v.minX;w<=v.maxX;++w)for(var C=v.minY;C<=v.maxY;++C){var O=Yy(m,w,C,this.tempTileCoord_),F=rT(A,O),I=void 0,T=void 0;if(d.containsKey(F)&&(I=d.get(F),T=I.tile),!I||I.tile.key!==A.getKey())if(T=A.getTile(m,w,C,t.pixelRatio,o.projection),!I)I=new Yot({tile:T,grid:l,helper:this.helper,tilePixelRatio:u,gutter:c}),d.set(F,I);else if(this.isDrawableTile_(T))I.setTile(T);else{var L=T.getInterimTile();I.setTile(L)}C5(a,I,m);var N=T.getKey();f[N]=!0,T.getState()===Te.IDLE&&(t.tileQueue.isKeyQueued(N)||t.tileQueue.enqueue([T,h,l.getTileCoordCenter(O),y]))}},e.prototype.renderFrame=function(t){this.frameState_=t,this.renderComplete=!0;var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState,a=this.getLayer(),o=a.getRenderSource(),s=o.getTileGridForProjection(i.projection),A=eT(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var c=s.getZForResolution(i.nextResolution,o.zDirection),h=eT(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,A,l,u);for(var f={},d=Ee(this),g=t.time,m=!1,v=u[l],y=0,w=v.length;y=N;--x){var S=this.findAltTiles_(s,F,x,u);if(S)break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!m);for(var P=Object.keys(u).map(Number).sort(oh),U=i.center[0],tt=i.center[1],q=0,rt=P.length;q=u.getMinZoom();--f){var d=u.getTileCoordForCoordAndZ(o,f),g=rT(l,d);if(h.containsKey(g)){var m=h.get(g);if(m.loaded){var v=u.getOrigin(f),y=Wi(u.getTileSize(f)),w=u.getResolution(f),C=(o[0]-v[0])/w-d[1]*y[0],O=(v[1]-o[1])/w-d[2]*y[1];return m.getPixelData(C,O)}}}return null},e.prototype.findAltTiles_=function(t,n,i,a){var o=t.getTileRangeForTileCoordAndZ(n,i,this.tempTileRange_);if(!o)return!1;for(var s=!0,A=this.tileTextureCache_,l=this.getLayer().getRenderSource(),u=o.minX;u<=o.maxX;++u)for(var c=o.minY;c<=o.maxY;++c){var h=rT(l,[i,u,c]),f=!1;if(A.containsKey(h)){var d=A.get(h);d.loaded&&(C5(a,d,i),f=!0)}f||(s=!1)}return s},e.prototype.removeHelper=function(){if(this.helper){var t=this.tileTextureCache_;t.forEach(function(n){return n.dispose()}),t.clear()}r.prototype.removeHelper.call(this)},e.prototype.disposeInternal=function(){var t=this.helper;if(t){var n=t.getGL();n.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}r.prototype.disposeInternal.call(this),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_},e}(PH),gst=pst,vst=function(){function r(e,t){this.name=e,this.data=t,this.texture_=null}return r.prototype.getTexture=function(e){if(!this.texture_){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.data.length/4,1,0,e.RGBA,e.UNSIGNED_BYTE,this.data),this.texture_=t}return this.texture_},r}(),mst=vst,ue={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},dr={};function _l(r){if(typeof r=="number")return ue.NUMBER;if(typeof r=="boolean")return ue.BOOLEAN;if(typeof r=="string")return RX(r)?ue.COLOR|ue.STRING:ue.STRING;if(!Array.isArray(r))throw new Error("Unhandled value type: ".concat(JSON.stringify(r)));var e=r,t=e.every(function(i){return typeof i=="number"});if(t)return e.length===3||e.length===4?ue.COLOR|ue.NUMBER_ARRAY:ue.NUMBER_ARRAY;if(typeof e[0]!="string")throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(e)));var n=dr[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.getReturnType(e.slice(1))}function yst(r){return kk(r)%1===0}function zC(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function DH(r){if(r.length<2||r.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(r.length,"(").concat(r.map(zC).join(", "),")")}function _st(r){var e=lh(r).slice();return e.length<4&&e.push(1),DH(e.map(function(t,n){return n<3?t/255:t}))}function fE(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function wst(r,e){return zC(fE(r,e))}function ve(r,e,t){if(Array.isArray(e)&&typeof e[0]=="string"){var n=dr[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.toGlsl(r,e.slice(1),t)}var i=_l(e);if((i&ue.NUMBER)>0)return zC(e);if((i&ue.BOOLEAN)>0)return e.toString();if((i&ue.STRING)>0&&(t===void 0||t==ue.STRING))return wst(r,e.toString());if((i&ue.COLOR)>0&&(t===void 0||t==ue.COLOR))return _st(e);if((i&ue.NUMBER_ARRAY)>0)return DH(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function QH(r){if(!(_l(r)&ue.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function Fi(r){for(var e=0;ee)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function HH(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function Est(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function oR(r,e){if(!yst(e))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(r)))}dr.get={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),kH(e[0]);var t=e[0].toString();r.attributes.indexOf(t)===-1&&r.attributes.push(t);var n=r.inFragmentShader?"v_":"a_";return n+t}};function sR(r){return"u_var_"+r}dr.var={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),kH(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),sR(t)}};var GH="u_paletteTextures";dr.palette={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Fn(e,2),QH(e[0]);var t=ve(r,e[0]),n=e[1];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");for(var i=n.length,a=new Uint8Array(i*4),o=0;o"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," > ").concat(ve(r,e[1]),")")}};dr[">="]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," >= ").concat(ve(r,e[1]),")")}};dr["<"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," < ").concat(ve(r,e[1]),")")}};dr["<="]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Fi(e),"(".concat(ve(r,e[0])," <= ").concat(ve(r,e[1]),")")}};function $H(r){return{getReturnType:function(e){return ue.BOOLEAN},toGlsl:function(e,t){Fn(t,2);for(var n=ue.ANY,i=0;i= ").concat(t," && ").concat(i," <= ").concat(n,")")}};dr.array={getReturnType:function(r){return ue.NUMBER_ARRAY},toGlsl:function(r,e){Eh(e,2),YC(e,4),Fi(e);var t=e.map(function(n){return ve(r,n,ue.NUMBER)});return"vec".concat(e.length,"(").concat(t.join(", "),")")}};dr.color={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Eh(e,3),YC(e,4),Fi(e);var t=e;e.length===3&&t.push(1);var n=e.map(function(i,a){return ve(r,i,ue.NUMBER)+(a<3?" / 255.0":"")});return"vec".concat(e.length,"(").concat(n.join(", "),")")}};dr.interpolate={getReturnType:function(r){for(var e=ue.COLOR|ue.NUMBER,t=3;t=1;A-=2){var l=ve(r,e[A]),u=ve(r,e[A+1],i);s="(".concat(a," == ").concat(l," ? ").concat(u," : ").concat(s||o,")")}return s}};dr.case={getReturnType:function(r){for(var e=ue.ANY,t=1;t=0;a-=2){var A=ve(r,e[a]),l=ve(r,e[a+1],i);s="(".concat(A," ? ").concat(l," : ").concat(s||o,")")}return s}};var Cst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function B5(r,e){var t=` attribute vec2 `.concat(ow.TEXTURE_COORD,`; uniform mat4 `).concat(ur.TILE_TRANSFORM,`; uniform float `).concat(ur.TEXTURE_PIXEL_WIDTH,`; uniform float `).concat(ur.TEXTURE_PIXEL_HEIGHT,`; uniform float `).concat(ur.TEXTURE_RESOLUTION,`; uniform float `).concat(ur.TEXTURE_ORIGIN_X,`; uniform float `).concat(ur.TEXTURE_ORIGIN_Y,`; uniform float `).concat(ur.DEPTH,`; varying vec2 v_textureCoord; varying vec2 v_mapCoord; void main() { v_textureCoord = `).concat(ow.TEXTURE_COORD,`; v_mapCoord = vec2( `).concat(ur.TEXTURE_ORIGIN_X," + ").concat(ur.TEXTURE_RESOLUTION," * ").concat(ur.TEXTURE_PIXEL_WIDTH,` * v_textureCoord[0], `).concat(ur.TEXTURE_ORIGIN_Y," - ").concat(ur.TEXTURE_RESOLUTION," * ").concat(ur.TEXTURE_PIXEL_HEIGHT,` * v_textureCoord[1] ); gl_Position = `).concat(ur.TILE_TRANSFORM," * vec4(").concat(ow.TEXTURE_COORD,", ").concat(ur.DEPTH,`, 1.0); } `),n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},i=[];if(r.color!==void 0){var a=ve(n,r.color,ue.COLOR);i.push("color = ".concat(a,";"))}if(r.contrast!==void 0){var o=ve(n,r.contrast,ue.NUMBER);i.push("color.rgb = clamp((".concat(o," + 1.0) * color.rgb - (").concat(o," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(r.exposure!==void 0){var s=ve(n,r.exposure,ue.NUMBER);i.push("color.rgb = clamp((".concat(s," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(r.saturation!==void 0){var A=ve(n,r.saturation,ue.NUMBER);i.push(` float saturation = `.concat(A,` + 1.0; float sr = (1.0 - saturation) * 0.2126; float sg = (1.0 - saturation) * 0.7152; float sb = (1.0 - saturation) * 0.0722; mat3 saturationMatrix = mat3( sr + saturation, sr, sr, sg, sg + saturation, sg, sb, sb, sb + saturation ); color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0)); `))}if(r.gamma!==void 0){var l=ve(n,r.gamma,ue.NUMBER);i.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(l,"));"))}if(r.brightness!==void 0){var u=ve(n,r.brightness,ue.NUMBER);i.push("color.rgb = clamp(color.rgb + ".concat(u,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var c={},h=n.variables.length;if(h>1&&!r.variables)throw new Error("Missing variables in style (expected ".concat(n.variables,")"));for(var f=function(w){var C=n.variables[w];if(!(C in r.variables))throw new Error("Missing '".concat(C,"' in style variables"));var O=sR(C);c[O]=function(){var F=r.variables[C];return typeof F=="string"&&(F=fE(n,F)),F!==void 0?F:-9999999}},d=0;d `).concat(ur.RENDER_EXTENT,`[2] || v_mapCoord[1] > `).concat(ur.RENDER_EXTENT,`[3] ) { discard; } vec4 color = texture2D(`).concat(ur.TILE_TEXTURE_ARRAY,`[0], v_textureCoord); `).concat(i.join(` `),` if (color.a == 0.0) { discard; } gl_FragColor = color; gl_FragColor.rgb *= gl_FragColor.a; gl_FragColor *= `).concat(ur.TRANSITION_ALPHA,`; }`);return{vertexShader:t,fragmentShader:y,uniforms:c,paletteTextures:n.paletteTextures}}var jH=function(r){Cst(e,r);function e(t){var n=this,i=t?Ce({},t):{},a=i.style||{};delete i.style;var o=i.cacheSize;return delete i.cacheSize,n=r.call(this,i)||this,n.sources_=i.sources,n.renderedSource_=null,n.renderedResolution_=NaN,n.style_=a,n.cacheSize_=o,n.styleVariables_=n.style_.variables||{},n.addChangeListener(Jr.SOURCE,n.handleSourceUpdate_),n}return e.prototype.getSources=function(t,n){var i=this.getSource();return this.sources_?typeof this.sources_=="function"?this.sources_(t,n):this.sources_:i?[i]:[]},e.prototype.getRenderSource=function(){return this.renderedSource_||this.getSource()},e.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():co.UNDEFINED},e.prototype.handleSourceUpdate_=function(){this.getSource()&&this.setStyle(this.style_)},e.prototype.getSourceBandCount_=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},e.prototype.createRenderer=function(){var t=B5(this.style_,this.getSourceBandCount_());return new gst(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})},e.prototype.renderSources=function(t,n){for(var i=this.getRenderer(),a,o=0,s=n.length;o.5*a.resolution){var h=this.getSources(t.extent,this.renderedResolution_).filter(function(f){return!o.includes(f)});if(h.length>0)return this.renderSources(t,h)}return c},e.prototype.setStyle=function(t){this.styleVariables_=t.variables||{},this.style_=t;var n=B5(this.style_,this.getSourceBandCount_()),i=this.getRenderer();i.reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},e.prototype.updateStyleVariables=function(t){Ce(this.styleVariables_,t),this.changed()},e}(CH);jH.prototype.dispose;var Bst=jH;const bst={extends:bd,name:"ol-webgl-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=Ze(()=>new Bst(n)),a=()=>{t!=null?(t.value.getOverviewMap().addLayer(i.value),t.value.changed()):e.addLayer(i.value)},o=()=>{t!=null?(t.value.getOverviewMap().removeLayer(i.value),t.value.changed()):e.removeLayer(i.value)};return t!=null&&ye(t,()=>{o(),a()}),cr(()=>{a()}),pr(()=>{o()}),Qr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function Tst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Rx=me(bst,[["render",Tst]]),Sst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),xst=function(r){Sst(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(Ed),Ist=xst,Lst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ost=function(r){Lst(e,r);function e(t){var n=r.call(this,t)||this;return n.image_=null,n}return e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,a=t.viewState,o=a.resolution,s=this.getLayer().getSource(),A=t.viewHints,l=t.extent;if(n.extent!==void 0&&(l=ks(l,gs(n.extent,a.projection))),!A[In.ANIMATING]&&!A[In.INTERACTING]&&!av(l))if(s){var u=a.projection,c=s.getImage(l,o,i,u);c&&(this.loadImage(c)?this.image_=c:c.getState()===rr.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),a=bn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!mA(o,a))return null;var s=this.image_.getExtent(),A=this.image_.getImage(),l=Kr(s),u=Math.floor(A.width*((a[0]-s[0])/l));if(u<0||u>=A.width)return null;var c=Li(s),h=Math.floor(A.height*((s[3]-a[1])/c));return h<0||h>=A.height?null:this.getImageData(A,u,h)},e.prototype.renderFrame=function(t,n){var i=this.image_,a=i.getExtent(),o=i.getResolution(),s=i.getPixelRatio(),A=t.layerStatesArray[t.layerIndex],l=t.pixelRatio,u=t.viewState,c=u.center,h=u.resolution,f=t.size,d=l*o/(h*s),g=Math.round(f[0]*l),m=Math.round(f[1]*l),v=u.rotation;if(v){var y=Math.round(Math.sqrt(g*g+m*m));g=y,m=y}yo(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,v,-g/2,-m/2),_0(this.inversePixelTransform,this.pixelTransform);var w=AF(this.pixelTransform);this.useContainer(n,w,A.opacity,this.getBackground(t));var C=this.context,O=C.canvas;O.width!=g||O.height!=m?(O.width=g,O.height=m):this.containerReused||C.clearRect(0,0,g,m);var F=!1,I=!0;if(A.extent){var T=gs(A.extent,u.projection);I=qn(T,t.extent),F=I&&!ps(T,t.extent),F&&this.clipUnrotated(C,t,T)}var L=i.getImage(),N=yo(this.tempTransform,g/2,m/2,d,d,0,s*(a[0]-c[0])/o,s*(c[1]-a[3])/o);this.renderedResolution=o*l/s;var x=L.width*N[0],S=L.height*N[3];if(this.getLayer().getSource().getInterpolate()||Ce(C,Ug),this.preRender(C,t),I&&x>=.5&&S>=.5){var P=N[4],U=N[5],tt=A.opacity,q=void 0;tt!==1&&(q=C.globalAlpha,C.globalAlpha=tt),C.drawImage(L,0,0,+L.width,+L.height,Math.round(P),Math.round(U),Math.round(x),Math.round(S)),tt!==1&&(C.globalAlpha=q)}return this.postRender(C,t),F&&C.restore(),Ce(C,TH),w!==O.style.transform&&(O.style.transform=w),this.container},e}(VF),Fst=Ost,Rst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Mst=function(r){Rst(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Fst(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Ist),KH=Mst;const Nst={extends:bd,name:"ol-image-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=new KH(t);return ye(t,()=>{n.setProperties(t)}),cr(()=>{e.addLayer(n)}),pr(()=>{e.removeLayer(n)}),Qr("imageLayer",n),{imageLayer:n}}};function Pst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Mx=me(Nst,[["render",Pst]]);const Ust={extends:bd,name:"ol-vector-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=Ze(()=>new El(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Qr("vectorLayer",n),Qr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function Dst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Nx=me(Ust,[["render",Dst]]),Qst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),kst=function(r){Qst(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.expireCache=function(t){for(;this.canExpireCache();){var n=this.peekLast();if(n.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(this.getCount()!==0){var t=this.peekFirstKey(),n=lst(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(Xy(a.tileCoord)),a.release())}.bind(this))}},e}(LH),WH=kst,iT={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Hst=[0,0,0],dc=5,Gst=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,Le(aX(this.resolutions_,function(o,s){return s-o},!0),17);var t;if(!e.origins){for(var n=0,i=this.resolutions_.length-1;n=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),s=Math.floor(s/2),a=gp(o,o,s,s,n)):a=this.getTileRangeForExtentAndZ(A,l,n),t(l,a))return!0;--l}return!1},r.prototype.getExtent=function(){return this.extent_},r.prototype.getMaxZoom=function(){return this.maxZoom},r.prototype.getMinZoom=function(){return this.minZoom},r.prototype.getOrigin=function(e){return this.origin_?this.origin_:this.origins_[e]},r.prototype.getResolution=function(e){return this.resolutions_[e]},r.prototype.getResolutions=function(){return this.resolutions_},r.prototype.getTileCoordChildTileRange=function(e,t,n){if(e[0]this.maxZoom||t0?n:Math.max(o/s[0],a/s[1]),l=i+1,u=new Array(l),c=0;ci.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,n,i,a){},e}(kC),Wst=function(r){qH(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}(Vo),ZH=Kst;function zst(r,e){var t=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,a=/\{-y\}/g;return function(o,s,A){if(o)return r.replace(t,o[0].toString()).replace(n,o[1].toString()).replace(i,o[2].toString()).replace(a,function(){var l=o[0],u=e.getFullTileRange(l);Le(u,55);var c=u.getHeight()-o[2]-1;return c.toString()})}}function Yst(r,e){for(var t=r.length,n=new Array(t),i=0;i>=1;return t.join("")}var aAt='Terms of Use',oAt=function(r){nAt(e,r);function e(t){var n=this,i=t.hidpi!==void 0?t.hidpi:!1,a=t.imageSmoothing!==void 0?t.imageSmoothing:!0;t.interpolate!==void 0&&(a=t.interpolate),n=r.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:a,opaque:!0,projection:Ve("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:co.LOADING,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection})||this,n.hidpi_=i,n.culture_=t.culture!==void 0?t.culture:"en-us",n.maxZoom_=t.maxZoom!==void 0?t.maxZoom:-1,n.apiKey_=t.key,n.imagerySet_=t.imagerySet;var o="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+n.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+n.apiKey_+"&c="+n.culture_;return rAt(o,n.handleImageryMetadataResponse.bind(n),void 0,"jsonp"),n}return e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(t.statusCode!=200||t.statusDescription!="OK"||t.authenticationResultCode!="ValidCredentials"||t.resourceSets.length!=1||t.resourceSets[0].resources.length!=1){this.setState(co.ERROR);return}var n=t.resourceSets[0].resources[0],i=this.maxZoom_==-1?n.zoomMax:this.maxZoom_,a=this.getProjection(),o=XC(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=YH({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,c=this.hidpi_;if(this.tileUrlFunction=dE(n.imageUrlSubdomains.map(function(f){var d=[0,0,0],g=n.imageUrl.replace("{subdomain}",f).replace("{culture}",u);return function(m,v,y){if(m){Yy(m[0],m[1],m[2],d);var w=g;return c&&(w+="&dpi=d1&device=mobile"),w.replace("{quadkey}",iAt(d))}else return}})),n.imageryProviders){var h=nd(Ve("EPSG:4326"),this.getProjection());this.setAttributions(function(f){var d=[],g=f.viewState,m=this.getTileGrid(),v=m.getZForResolution(g.resolution,this.zDirection),y=m.getTileCoordForCoordAndZ(g.center,v),w=y[0];return n.imageryProviders.map(function(C){for(var O=!1,F=C.coverageAreas,I=0,T=F.length;I=L.zoomMin&&w<=L.zoomMax){var N=L.bbox,x=[N[1],N[0],N[3],N[2]],S=hF(x,h);if(qn(S,f.extent)){O=!0;break}}}O&&d.push(C.attribution)}),d.push(aAt),d}.bind(this))}this.setState(co.READY)},e}(qC),sAt=oAt,AAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lAt=function(r){AAt(e,r);function e(t){var n=t||{},i=n.imageSmoothing!==void 0?n.imageSmoothing:!0;n.interpolate!==void 0&&(i=n.interpolate);var a=n.projection!==void 0?n.projection:"EPSG:3857",o=n.tileGrid!==void 0?n.tileGrid:YH({extent:XC(a),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return r.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:i,opaque:n.opaque,projection:a,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX!==void 0?n.wrapX:!0,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return e}(qC),eG=lAt,uAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cAt=function(r){uAt(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,wrapX:t.wrapX})||this;return n.resolution=void 0,n.distance=t.distance!==void 0?t.distance:20,n.minDistance=t.minDistance||0,n.interpolationRatio=0,n.features=[],n.geometryFunction=t.geometryFunction||function(i){var a=i.getGeometry();return Le(a.getType()==pt.POINT,10),a},n.createCustomCluster_=t.createCluster,n.source=null,n.boundRefresh_=n.refresh.bind(n),n.updateDistance(n.distance,n.minDistance),n.setSource(t.source||null),n}return e.prototype.clear=function(t){this.features.length=0,r.prototype.clear.call(this,t)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,n,i){this.source.loadFeatures(t,n,i),n!==this.resolution&&(this.resolution=n,this.refresh())},e.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},e.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},e.prototype.getMinDistance=function(){return this.minDistance},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(xe.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(xe.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,n){var i=t===0?0:Math.min(n,t)/t,a=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,a&&this.refresh()},e.prototype.cluster=function(){if(!(this.resolution===void 0||!this.source))for(var t=Di(),n=this.distance*this.resolution,i=this.source.getFeatures(),a={},o=0,s=i.length;o=0;--a){var o=this.geometryFunction(t[a]);o?zk(i,o.getCoordinates()):t.splice(a,1)}Yk(i,1/t.length);var s=Ya(n),A=this.interpolationRatio,l=new xr([i[0]*(1-A)+s[0]*A,i[1]*(1-A)+s[1]*A]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new _r({geometry:l,features:t})},e}(Mu),rG=cAt,nl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hAt(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}),e}var Va=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n1,n=t&&r.imageInfo.profile[1].supports?r.imageInfo.profile[1].supports:[],i=t&&r.imageInfo.profile[1].formats?r.imageInfo.profile[1].formats:[],a=t&&r.imageInfo.profile[1].qualities?r.imageInfo.profile[1].qualities:[];return{url:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:r.imageInfo.sizes===void 0?void 0:r.imageInfo.sizes.map(function(o){return[o.width,o.height]}),tileSize:r.imageInfo.tiles===void 0?void 0:[r.imageInfo.tiles.map(function(o){return o.width})[0],r.imageInfo.tiles.map(function(o){return o.height===void 0?o.width:o.height})[0]],resolutions:r.imageInfo.tiles===void 0?void 0:r.imageInfo.tiles.map(function(o){return o.scaleFactors})[0],supports:Va(Va([],e.supports,!0),n,!0),formats:Va(Va([],e.formats,!0),i,!0),qualities:Va(Va([],e.qualities,!0),a,!0)}}function vAt(r){var e=r.getComplianceLevelSupportedFeatures(),t=r.imageInfo.extraFormats===void 0?e.formats:Va(Va([],e.formats,!0),r.imageInfo.extraFormats,!0),n=r.imageInfo.preferredFormats!==void 0&&Array.isArray(r.imageInfo.preferredFormats)&&r.imageInfo.preferredFormats.length>0?r.imageInfo.preferredFormats.filter(function(i){return Pi(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&Pi(t,a)?a:i},void 0):void 0;return{url:r.imageInfo.id,sizes:r.imageInfo.sizes===void 0?void 0:r.imageInfo.sizes.map(function(i){return[i.width,i.height]}),tileSize:r.imageInfo.tiles===void 0?void 0:[r.imageInfo.tiles.map(function(i){return i.width})[0],r.imageInfo.tiles.map(function(i){return i.height})[0]],resolutions:r.imageInfo.tiles===void 0?void 0:r.imageInfo.tiles.map(function(i){return i.scaleFactors})[0],supports:r.imageInfo.extraFeatures===void 0?e.supports:Va(Va([],e.supports,!0),r.imageInfo.extraFeatures,!0),formats:t,qualities:r.imageInfo.extraQualities===void 0?e.qualities:Va(Va([],e.qualities,!0),r.imageInfo.extraQualities,!0),preferredFormat:n}}var ZC={};ZC[lo.VERSION1]=pAt;ZC[lo.VERSION2]=gAt;ZC[lo.VERSION3]=vAt;var mAt=function(){function r(e){this.setImageInfo(e)}return r.prototype.setImageInfo=function(e){typeof e=="string"?this.imageInfo=JSON.parse(e):this.imageInfo=e},r.prototype.getImageApiVersion=function(){if(this.imageInfo!==void 0){var e=this.imageInfo["@context"]||"ol-no-context";typeof e=="string"&&(e=[e]);for(var t=0;t0&&typeof this.imageInfo.profile[0]=="string"&&b5.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0];break}},r.prototype.getComplianceLevelFromProfile=function(e){var t=this.getComplianceLevelEntryFromProfile(e);if(t!==void 0){var n=t.match(/level[0-2](?:\.json)?$/g);return Array.isArray(n)?n[0].replace(".json",""):void 0}},r.prototype.getComplianceLevelSupportedFeatures=function(){if(this.imageInfo!==void 0){var e=this.getImageApiVersion(),t=this.getComplianceLevelFromProfile(e);return t===void 0?sd.none.none:sd[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:ZC[n](this);if(i!==void 0)return{url:i.url,version:n,size:[this.imageInfo.width,this.imageInfo.height],sizes:i.sizes,format:t.format!==void 0&&Pi(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&Pi(i.qualities,t.quality)?t.quality:Pi(i.qualities,"native")?"native":"default",resolutions:Array.isArray(i.resolutions)?i.resolutions.sort(function(a,o){return o-a}):void 0,tileSize:i.tileSize}}},r}(),yAt=mAt,_At=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),wAt=function(r){_At(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),c=n.getExtent(),h=c?ks(i,c):i,f=Ya(h),d=Wy(t,n,f,a),g=BH,m=new bH(t,n,h,u,d*g,a),v=m.calculateSourceExtent(),y=s(v,d,o),w=y?rr.IDLE:rr.EMPTY,C=y?y.getPixelRatio():1;return l=r.call(this,i,a,C,w)||this,l.targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=m,l.targetResolution_=a,l.targetExtent_=i,l.sourceImage_=y,l.sourcePixelRatio_=C,l.interpolate_=A,l.canvas_=null,l.sourceListenerKey_=null,l}return e.prototype.disposeInternal=function(){this.state==rr.LOADING&&this.unlistenSource_(),r.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==rr.LOADED){var n=Kr(this.targetExtent_)/this.targetResolution_,i=Li(this.targetExtent_)/this.targetResolution_;this.canvas_=SH(n,i,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==rr.IDLE){this.state=rr.LOADING,this.changed();var t=this.sourceImage_.getState();t==rr.LOADED||t==rr.ERROR?this.reproject_():(this.sourceListenerKey_=je(this.sourceImage_,xe.CHANGE,function(n){var i=this.sourceImage_.getState();(i==rr.LOADED||i==rr.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Yr(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(H8),EAt=wAt,nG=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aT={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},CAt=function(r){nG(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}(Vo),BAt=function(r){nG(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(i=t.interpolate),n=r.call(this,{attributions:t.attributions,projection:t.projection,state:t.state,interpolate:i})||this,n.on,n.once,n.un,n.resolutions_=t.resolutions!==void 0?t.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n}return e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var n=bC(this.resolutions_,t,0);t=this.resolutions_[n]}return t},e.prototype.getImage=function(t,n,i,a){var o=this.getProjection();if(!o||!a||el(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&el(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&vl(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new EAt(o,a,t,n,i,function(s,A,l){return this.getImageInternal(s,A,l,o)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_},e.prototype.getImageInternal=function(t,n,i,a){return Re()},e.prototype.handleImageChange=function(t){var n=t.target,i;switch(n.getState()){case rr.LOADING:this.loading=!0,i=aT.IMAGELOADSTART;break;case rr.LOADED:this.loading=!1,i=aT.IMAGELOADEND;break;case rr.ERROR:this.loading=!1,i=aT.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new CAt(i,n))},e}(kC);function iG(r,e){r.getImage().src=e}var aG=BAt;function Dg(r,e){var t=[];Object.keys(e).forEach(function(i){e[i]!==null&&e[i]!==void 0&&t.push(i+"="+encodeURIComponent(e[i]))});var n=t.join("&");return r=r.replace(/[?&]$/,""),r=r.indexOf("?")===-1?r+"?":r+"&",r+n}var bAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),TAt=function(r){bAt(e,r);function e(t){var n=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:iG,o=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(o=t.interpolate),n=r.call(this,{attributions:t.attributions,interpolate:o,projection:Ve(t.projection)})||this,n.url_=t.url,n.imageExtent_=t.imageExtent,n.image_=new G8(n.imageExtent_,void 0,1,n.url_,i,a),n.imageSize_=t.imageSize?t.imageSize:null,n.image_.addEventListener(xe.CHANGE,n.handleImageChange.bind(n)),n}return e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,n,i,a){return qn(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(t){if(this.image_.getState()==rr.LOADED){var n=this.image_.getExtent(),i=this.image_.getImage(),a=void 0,o=void 0;this.imageSize_?(a=this.imageSize_[0],o=this.imageSize_[1]):(a=i.width,o=i.height);var s=Kr(n),A=Li(n),l=s/a,u=A/o,c=a,h=o;if(l>u?c=Math.round(s/u):h=Math.round(A/l),c!==a||h!==o){var f=wo(c,h);this.getInterpolate()||Ce(f,Ug);var d=f.canvas;f.drawImage(i,0,0,a,o,0,0,d.width,d.height),this.image_.setImage(d)}}r.prototype.handleImageChange.call(this,t)},e}(aG),SAt=TAt,Uc="1.3.0",Dc={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},xAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),pc=4,T5=[101,101],IAt=function(r){xAt(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;return i.interpolate!==void 0&&(a=i.interpolate),n=r.call(this,{attributions:i.attributions,interpolate:a,projection:i.projection,resolutions:i.resolutions})||this,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null,n.url_=i.url,n.imageLoadFunction_=i.imageLoadFunction!==void 0?i.imageLoadFunction:iG,n.params_=i.params||{},n.v13_=!0,n.updateV13_(),n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=i.ratio!==void 0?i.ratio:1.5,n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){if(this.url_!==void 0){var o=Ve(i),s=this.getProjection();s&&s!==o&&(n=Wy(s,o,t,n),t=uh(t,o,s));var A=Df(t,n,0,T5),l={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(l,this.params_,a);var u=zp((t[0]-A[0])/n,pc),c=zp((A[3]-t[1])/n,pc);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(A,T5,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n===void 0||n.LAYER===void 0){var a=this.params_.LAYERS,o=!Array.isArray(a)||a.length===1;if(!o)return;i.LAYER=a}if(t!==void 0){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1,A=28e-5;i.SCALE=t*s/A}return Ce(i,n),Dg(this.url_,i)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,n,i,a){if(this.url_===void 0)return null;n=this.findNearestResolution(n),i!=1&&(!this.hidpi_||this.serverType_===void 0)&&(i=1);var o=n/i,s=Ya(t),A=Mc(Kr(t)/o,pc),l=Mc(Li(t)/o,pc),u=Df(s,o,0,[A,l]),c=Mc(this.ratio_*Kr(t)/o,pc),h=Mc(this.ratio_*Li(t)/o,pc),f=Df(s,o,0,[c,h]),d=this.image_;if(d&&this.renderedRevision_==this.getRevision()&&d.getResolution()==n&&d.getPixelRatio()==i&&ps(d.getExtent(),u))return d;var g={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Ce(g,this.params_),this.imageSize_[0]=cP(Kr(f)/o,pc),this.imageSize_[1]=cP(Li(f)/o,pc);var m=this.getRequestUrl_(f,this.imageSize_,i,a,g);return this.image_=new G8(f,n,i,m,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(xe.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,n,i,a,o){if(Le(this.url_!==void 0,9),o[this.v13_?"CRS":"SRS"]=a.getCode(),"STYLES"in this.params_||(o.STYLES=""),i!=1)switch(this.serverType_){case Dc.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case Dc.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case Dc.CARMENTA_SERVER:case Dc.QGIS:o.DPI=90*i;break;default:Le(!1,8);break}o.WIDTH=n[0],o.HEIGHT=n[1];var A=a.getAxisOrientation(),l;return this.v13_&&A.substr(0,2)=="ne"?l=[t[1],t[0],t[3],t[2]]:l=t,o.BBOX=l.join(","),Dg(this.url_,o)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){Ce(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Uc;this.v13_=Wk(t,"1.3")>=0},e}(aG),LAt=IAt,OAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),FAt='© OpenStreetMap contributors.',RAt=function(r){OAt(e,r);function e(t){var n=t||{},i=n.imageSmoothing!==void 0?n.imageSmoothing:!0;n.interpolate!==void 0&&(i=n.interpolate);var a;n.attributions!==void 0?a=n.attributions:a=[FAt];var o=n.crossOrigin!==void 0?n.crossOrigin:"anonymous",s=n.url!==void 0?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return r.call(this,{attributions:a,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:o,interpolate:i,maxZoom:n.maxZoom!==void 0?n.maxZoom:19,opaque:n.opaque!==void 0?n.opaque:!0,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:s,wrapX:n.wrapX,zDirection:n.zDirection})||this}return e}(eG),MAt=RAt,NAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),PAt=function(r){NAt(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;i.interpolate!==void 0&&(a=i.interpolate);var o=i.params||{},s="TRANSPARENT"in o?o.TRANSPARENT:!0;return n=r.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:a,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:i.wrapX!==void 0?i.wrapX:!0,transition:i.transition,zDirection:i.zDirection})||this,n.gutter_=i.gutter!==void 0?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.tmpExtent_=Di(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){var o=Ve(i),s=this.getProjection(),A=this.getTileGrid();A||(A=this.getTileGridForProjection(o));var l=A.getZForResolution(n,this.zDirection),u=A.getTileCoordForCoordAndZ(t,l);if(!(A.getResolutions().length<=u[0])){var c=A.getResolution(u[0]),h=A.getTileCoordExtent(u,this.tmpExtent_),f=Wi(A.getTileSize(u[0]),this.tmpSize),d=this.gutter_;d!==0&&(f=OP(f,d,this.tmpSize),h=_o(h,c*d,h)),s&&s!==o&&(c=Wy(s,o,t,c),h=Xw(h,o,s),t=uh(t,o,s));var g={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(g,this.params_,a);var m=Math.floor((t[0]-h[0])/c),v=Math.floor((h[3]-t[1])/c);return g[this.v13_?"I":"X"]=m,g[this.v13_?"J":"Y"]=v,this.getRequestUrl_(u,f,h,1,s||o,g)}},e.prototype.getLegendUrl=function(t,n){if(this.urls[0]!==void 0){var i={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n===void 0||n.LAYER===void 0){var a=this.params_.LAYERS,o=!Array.isArray(a)||a.length===1;if(!o)return;i.LAYER=a}if(t!==void 0){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1,A=28e-5;i.SCALE=t*s/A}return Ce(i,n),Dg(this.urls[0],i)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,n,i,a,o,s){var A=this.urls;if(A){if(s.WIDTH=n[0],s.HEIGHT=n[1],s[this.v13_?"CRS":"SRS"]=o.getCode(),"STYLES"in this.params_||(s.STYLES=""),a!=1)switch(this.serverType_){case Dc.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case Dc.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case Dc.CARMENTA_SERVER:case Dc.QGIS:s.DPI=90*a;break;default:Le(!1,52);break}var u=o.getAxisOrientation(),c=i;if(this.v13_&&u.substr(0,2)=="ne"){var h=void 0;h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h}s.BBOX=c.join(",");var f;if(A.length==1)f=A[0];else{var d=Wc(UH(t),A.length);f=A[d]}return Dg(f,s)}},e.prototype.getTilePixelRatio=function(t){return!this.hidpi_||this.serverType_===void 0?1:t},e.prototype.getKeyForParams_=function(){var t=0,n=[];for(var i in this.params_)n[t++]=i+"-"+this.params_[i];return n.join("/")},e.prototype.updateParams=function(t){Ce(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Uc;this.v13_=Wk(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,n,i){var a=this.getTileGrid();if(a||(a=this.getTileGridForProjection(i)),!(a.getResolutions().length<=t[0])){n!=1&&(!this.hidpi_||this.serverType_===void 0)&&(n=1);var o=a.getResolution(t[0]),s=a.getTileCoordExtent(t,this.tmpExtent_),A=Wi(a.getTileSize(t[0]),this.tmpSize),l=this.gutter_;l!==0&&(A=OP(A,l,this.tmpSize),s=_o(s,o*l,s)),n!=1&&(A=m8(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Uc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Ce(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(qC),UAt=PAt,t1={KVP:"KVP",REST:"REST"},DAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),QAt=function(r){DAt(e,r);function e(t){var n=r.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes})||this;return n.matrixIds_=t.matrixIds,n}return e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(AR),Px=QAt,kAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),HAt=function(r){kAt(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;t.interpolate!==void 0&&(i=t.interpolate);var a=t.requestEncoding!==void 0?t.requestEncoding:t1.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=JH(t.url)),n=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:t.wrapX!==void 0?t.wrapX:!1,transition:t.transition,zDirection:t.zDirection})||this,n.version_=t.version!==void 0?t.version:"1.0.0",n.format_=t.format!==void 0?t.format:"image/jpeg",n.dimensions_=t.dimensions!==void 0?t.dimensions:{},n.layer_=t.layer,n.matrixSet_=t.matrixSet,n.style_=t.style,n.requestEncoding_=a,n.setKey(n.getKeyForDimensions_()),s&&s.length>0&&(n.tileUrlFunction=dE(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(` `);this.setTileUrlFunction(dE(t.map(this.createFromWMTSTemplate.bind(this))),n)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,n=[];for(var i in this.dimensions_)n[t++]=i+"-"+this.dimensions_[i];return n.join("/")},e.prototype.updateDimensions=function(t){Ce(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var n=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};n==t1.KVP&&Ce(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==t1.KVP?Dg(t,i):t.replace(/\{(\w+?)\}/g,function(s,A){return A.toLowerCase()in i?i[A.toLowerCase()]:s});var a=this.tileGrid,o=this.dimensions_;return function(s,A,l){if(s){var u={TileMatrix:a.getMatrixId(s[0]),TileCol:s[1],TileRow:s[2]};Ce(u,o);var c=t;return n==t1.KVP?c=Dg(c,u):c=c.replace(/\{(\w+?)\}/g,function(h,f){return u[f]}),c}else return}},e}(qC),oG=HAt;window.ol&&!ol.ext&&(ol.ext={});var kr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r};window.ol&&(ol.inherits||(ol.inherits=kr));window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});function JC(r){const e=r.frameState,t=nv(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new jF(r.context,e.pixelRatio,e.extent,t,e.viewState.rotation)}window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"});var sw=Ik.split(".");sw=parseInt(sw[0])*100+parseInt(sw[1]);var Ux=function(r,e){var t=r.frameState.pixelRatio;if(sw>605&&t!==1&&e.getImage()instanceof O0){e=e.clone();var n=e.getImage();n.setScale(n.getScale()*t);var i=n.getAnchor();if(n.setDisplacement){var a=n.getDisplacement();a&&(a[0]-=i[0]/t,a[1]+=i[1]/t,n.setAnchor([0,0]))}else i&&(i[0]/=t,i[1]/=t)}return e},Td=function(r){var e=r||{};El.call(this,e),this.oldcluster=new Mu,this.clusters=[],this.animation={start:!1},this.set("animationDuration",typeof e.animationDuration=="number"?e.animationDuration:700),this.set("animationMethod",e.animationMethod||Gs),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};kr(Td,El);Td.prototype.saveCluster=function(){if(this.oldcluster){if(this.oldcluster.clear(),!this.get("animationDuration"))return;var r=this.getSource().getFeatures();r.length&&r[0].get("features")&&(this.oldcluster.addFeatures(this.clusters),this.clusters=r.slice(0),this.sourceChanged=!0)}};Td.prototype.getClusterForFeature=function(r,e){for(var t=0,n;n=e[t];t++){var i=n.get("features");if(i&&i.length){for(var a=0,o;o=i[a];a++)if(r===o)return n}}return!1};Td.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};Td.prototype.animate=function(r){var e=this.get("animationDuration");if(e){var t=r.frameState.viewState.resolution,n,i,a=this.animation,o=r.frameState.time;if(a.resolution!=t&&this.sourceChanged){var s=r.frameState.extent;for(a.resolution1e3){this.stopAnimation();return}o=a.start=new Date().getTime()}if(a.start){var u=r.vectorContext||JC(r),c=(o-a.start)/e;c>1&&(this.stopAnimation(),c=1),c=this.get("animationMethod")(c);var h=this.getStyle(),f=typeof h=="function"?h:h.length?function(){return h}:function(){return[h]};for(r.context.save(),r.context.globalAlpha=this.getOpacity(),n=0,l;l=a.clusters[n];n++){var d=l.f.getGeometry().getCoordinates(),g=d[0]-l.pt[0],m=d[1]-l.pt[1];a.revers?(d[0]=l.pt[0]+c*g,d[1]=l.pt[1]+c*m):(d[0]=d[0]-c*g,d[1]=d[1]-c*m);var v=f(l.f,t,!0);if(v.length||(v=[v]),l.f.get("features").length===1&&!g&&!m)A=l.f.get("features")[0];else{var y=new xr(d);A=new _r(y)}for(var w=0,C;C=v[w];w++)if(C.getText()&&/\n/.test(C.getText().getText())){var O=C.getText().getOffsetX(),F=C.getText().getOffsetY(),I=C.getText().getRotation()||0,T=Number((C.getText().getFont()||"10px").match(/\d+/))*1.2,L=C.getText().getText().split(` `),N,x=L.length-1,S=C.clone();L.forEach(function(P,U){switch(U==1&&(S.setImage(),S.setFill(),S.setStroke()),C.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":{N=x;break}case"hanging":case"top":{N=0;break}default:{N=x/2;break}}S.getText().setOffsetX(O-Math.sin(I)*T*(U-N)),S.getText().setOffsetY(F+Math.cos(I)*T*(U-N)),S.getText().setText(P),u.drawFeature(A,Ux(r,S))})}else u.drawFeature(A,Ux(r,C))}r.context.restore(),r.frameState.animate=!0,r.context.save(),r.context.beginPath(),r.context.rect(0,0,0,0),r.context.clip(),this.clip_=!0}}};Td.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const GAt={extends:bd,name:"ol-animated-clusterlayer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=Ze(()=>new Td(bA(Jn({},t),{source:new rG({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=Ze(()=>n.value.getSource());return ye(t,()=>{n.value.setProperties(t),n.value.changed()}),cr(()=>{e.addLayer(n.value),n.value.changed(),e.changed()}),pr(()=>{e.removeLayer(n.value)}),Qr("vectorLayer",i),Qr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:Gs},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function $At(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Dx=me(GAt,[["render",$At]]),WA=new Uint8Array(4),VAt=function(){function r(e,t){this.helper_=e;var n=e.getGL();this.texture_=n.createTexture(),this.framebuffer_=n.createFramebuffer(),this.size_=t||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return r.prototype.setSize=function(e){Fu(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())},r.prototype.getSize=function(){return this.size_},r.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},r.prototype.readAll=function(){if(this.dataCacheDirty_){var e=this.size_,t=this.helper_.getGL();t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},r.prototype.readPixel=function(e,t){if(e<0||t<0||e>this.size_[0]||t>=this.size_[1])return WA[0]=0,WA[1]=0,WA[2]=0,WA[3]=0,WA;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return WA[0]=this.data_[n*4],WA[1]=this.data_[n*4+1],WA[2]=this.data_[n*4+2],WA[3]=this.data_[n*4+3],WA},r.prototype.getTexture=function(){return this.texture_},r.prototype.getFramebuffer=function(){return this.framebuffer_},r.prototype.updateSize_=function(){var e=this.size_,t=this.helper_.getGL();this.texture_=this.helper_.createTexture(e,null,this.texture_),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.viewport(0,0,e[0],e[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(e[0]*e[1]*4)},r}(),jAt=VAt;function KAt(){var r='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r"u"?"data:application/javascript;base64,"+Buffer.from(r,"binary").toString("base64"):URL.createObjectURL(new Blob([r],{type:"application/javascript"})))}var WAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zAt=function(r){WAt(e,r);function e(t,n){var i=this,a=n.uniforms||{},o=xi();a[kp.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new ly(zy,iw),i.hitVerticesBuffer_=new ly(zy,iw),i.indicesBuffer_=new ly(KC,iw),i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.program_,i.hitDetectionEnabled_=!!(n.hitFragmentShader&&n.hitVertexShader),i.hitVertexShader_=n.hitVertexShader,i.hitFragmentShader_=n.hitFragmentShader,i.hitProgram_;var s=n.attributes?n.attributes.map(function(l){return{name:"a_"+l.name,size:1,type:Ns.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Ns.FLOAT},{name:"a_index",size:1,type:Ns.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Ns.FLOAT},{name:"a_index",size:1,type:Ns.FLOAT},{name:"a_hitColor",size:4,type:Ns.FLOAT},{name:"a_featureUid",size:1,type:Ns.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=Di(),i.currentTransform_=o,i.renderTransform_=xi(),i.invertRenderTransform_=xi(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=KAt(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===tT.GENERATE_BUFFERS){var c=u.projectionTransform;u.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(u.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=c,_0(this.invertRenderTransform_,this.renderTransform_),u.hitDetection?this.hitRenderInstructions_=new Float32Array(l.data.renderInstructions):(this.renderInstructions_=new Float32Array(l.data.renderInstructions),u.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}}.bind(i)),i.featureCache_={},i.featureCount_=0;var A=i.getLayer().getSource();return i.sourceListenKeys_=[je(A,ji.ADDFEATURE,i.handleSourceFeatureAdded_,i),je(A,ji.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),je(A,ji.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),je(A,ji.CLEAR,i.handleSourceFeatureClear_,i)],A.forEachFeature(function(l){this.featureCache_[Ee(l)]={feature:l,properties:l.getProperties(),geometry:l.getGeometry()},this.featureCount_++}.bind(i)),i}return e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new jAt(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var n=t.feature;this.featureCache_[Ee(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var n=t.feature;this.featureCache_[Ee(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var n=t.feature;delete this.featureCache_[Ee(n)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var i=this.indicesBuffer_.getSize();this.helper.drawElements(0,i),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var a=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(n,t),a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getSource(),a=t.viewState,o=!t.viewHints[In.ANIMATING]&&!t.viewHints[In.INTERACTING],s=!vl(this.previousExtent_,t.extent),A=this.sourceRevision_new JAt(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Qr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function elt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Qx=me(tlt,[["render",elt]]),rlt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),iA={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},nlt=["#00f","#0ff","#0f0","#ff0","#f00"],ilt=function(r){rlt(e,r);function e(t){var n=this,i=t||{},a=Ce({},i);delete a.gradient,delete a.radius,delete a.blur,delete a.weight,n=r.call(this,a)||this,n.gradient_=null,n.addChangeListener(iA.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:nlt),n.setBlur(i.blur!==void 0?i.blur:15),n.setRadius(i.radius!==void 0?i.radius:8);var o=i.weight?i.weight:"weight";return typeof o=="string"?n.weightFunction_=function(s){return s.get(o)}:n.weightFunction_=o,n.setRenderOrder(null),n}return e.prototype.getBlur=function(){return this.get(iA.BLUR)},e.prototype.getGradient=function(){return this.get(iA.GRADIENT)},e.prototype.getRadius=function(){return this.get(iA.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=alt(this.getGradient())},e.prototype.setBlur=function(t){this.set(iA.BLUR,t)},e.prototype.setGradient=function(t){this.set(iA.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(iA.RADIUS,t)},e.prototype.createRenderer=function(){return new sG(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.weightFunction_(t);return n!==void 0?Un(n,0,1):1}.bind(this)}],vertexShader:` precision mediump float; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; uniform float u_size; attribute vec2 a_position; attribute float a_index; attribute float a_weight; varying vec2 v_texCoord; varying float v_weight; void main(void) { mat4 offsetMatrix = u_offsetScaleMatrix; float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0; float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0; vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets; float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0; float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0; v_texCoord = vec2(u, v); v_weight = a_weight; }`,fragmentShader:` precision mediump float; uniform float u_blurSlope; varying vec2 v_texCoord; varying float v_weight; void main(void) { vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0); float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y; float value = (1.0 - sqrt(sqRadius)) * u_blurSlope; float alpha = smoothstep(0.0, 1.0, value) * v_weight; gl_FragColor = vec4(alpha, alpha, alpha, alpha); }`,hitVertexShader:` precision mediump float; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; uniform float u_size; attribute vec2 a_position; attribute float a_index; attribute float a_weight; attribute vec4 a_hitColor; varying vec2 v_texCoord; varying float v_weight; varying vec4 v_hitColor; void main(void) { mat4 offsetMatrix = u_offsetScaleMatrix; float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0; float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0; vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets; float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0; float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0; v_texCoord = vec2(u, v); v_hitColor = a_hitColor; v_weight = a_weight; }`,hitFragmentShader:` precision mediump float; uniform float u_blurSlope; varying vec2 v_texCoord; varying float v_weight; varying vec4 v_hitColor; void main(void) { vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0); float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y; float value = (1.0 - sqrt(sqRadius)) * u_blurSlope; float alpha = smoothstep(0.0, 1.0, value) * v_weight; if (alpha < 0.05) { discard; } gl_FragColor = v_hitColor; }`,uniforms:{u_size:function(){return(this.get(iA.RADIUS)+this.get(iA.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(iA.RADIUS)/Math.max(1,this.get(iA.BLUR))}.bind(this)},postProcesses:[{fragmentShader:` precision mediump float; uniform sampler2D u_image; uniform sampler2D u_gradientTexture; uniform float u_opacity; varying vec2 v_texCoord; void main() { vec4 color = texture2D(u_image, v_texCoord); gl_FragColor.a = color.a * u_opacity; gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb; gl_FragColor.rgb *= gl_FragColor.a; }`,uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},e.prototype.renderDeclutter=function(){},e}(QC);function alt(r){for(var e=1,t=256,n=wo(e,t),i=n.createLinearGradient(0,0,e,t),a=1/(r.length-1),o=0,s=r.length;onew AG(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Qr("heatmapLayer",n),Qr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function slt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var kx=me(olt,[["render",slt]]);function pE(r){pE.installed||(pE.installed=!0,r.component(Fx.name,Fx),r.component(Rx.name,Rx),r.component(Mx.name,Mx),r.component(Nx.name,Nx),r.component(Dx.name,Dx),r.component(Qx.name,Qx),r.component(kx.name,kx))}var Alt=Object.freeze(Object.defineProperty({__proto__:null,default:pE,install:pE,TileLayer:Fx,WebGLTileLayer:Rx,ImageLayer:Mx,VectorLayer:Nx,AnimatedClusterLayer:Dx,WebglPointsLayer:Qx,HeatmapLayer:kx},Symbol.toStringTag,{value:"Module"}));const llt={name:"ol-source-xyz",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new eG(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{attributions:{type:[String,Array]},url:{type:String},cacheSize:{type:Number,default:2048},crossOrigin:{type:String},maxZoom:{type:Number,default:28},minZoom:{type:Number,default:0},opaque:{type:Boolean},projection:{type:String,default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},tileSize:{type:Array,default:()=>[256,256]},tilePixelRatio:{type:Number,default:1},tileKey:{type:String},transition:{type:Number},tileGrid:{type:Object}}};function ult(r,e,t,n,i,a){return Mr("",!0)}var Hx=me(llt,[["render",ult]]);const clt={name:"ol-source-osm",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new MAt(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{attributions:{type:String},cacheSize:{type:Number,default:2048},crossOrigin:{type:String,default:"anonymous"},imageSmoothing:{type:Boolean,default:!0},minZoom:{type:Number,default:0},maxZoom:{type:Number,default:19},opaque:{type:Boolean,default:!0},reprojectionErrorThreshold:{type:Number,default:.5},transition:{type:Number,default:250},url:{type:String,default:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"},wrapX:{type:Boolean,default:!0}}};function hlt(r,e,t,n,i,a){return Mr("",!0)}var Gx=me(clt,[["render",hlt]]);const flt={name:"ol-source-image-static",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new SAt(bA(Jn({},t),{projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection))}));let i=n();return ye(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),cr(()=>{e.setSource(i)}),pr(()=>{e.setSource(null)}),{layer:e,source:i}},props:{attributions:{type:String},crossOrigin:{type:String},imageExtent:{type:Array},projection:{type:[String,Object]},imageSmoothing:{type:Boolean,default:!0},imageSize:{type:Array},url:{type:String}}};function dlt(r,e,t,n,i,a){return Mr("",!0)}var $x=me(flt,[["render",dlt]]);const plt={name:"ol-source-wmts",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r),n=Ze(()=>Ve(t.projection).getExtent()),i=Ze(()=>TA(n.value)),a=Ze(()=>Kr(n.value)/256),o=Ze(()=>{const A=new Array(t.tileZoomLevel),l=new Array(t.tileZoomLevel);for(var u=0;unew oG(bA(Jn({},t),{projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection)),tileGrid:o.value})));return ye(s,()=>{e.value.setSource(s.value)}),ye(e,()=>{e.value.setSource(s.value)}),cr(()=>{e.value.setSource(s.value)}),pr(()=>{e.value.setSource(null)}),{tileLayer:e,source:s}},props:{tileZoomLevel:{type:Number,default:30},attributions:{type:String},cacheSize:{type:Number},crossOrigin:{type:String},imageSmoothing:{type:Boolean,default:!0},projection:{type:[String,Object],default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},tilePixelRatio:{type:Number,default:1},format:{type:String,default:"image/jpeg"},version:{type:String,default:"1.0.0"},matrixSet:{type:String},dimensions:{type:Object},requestEncoding:{type:String,default:"KVP"},url:{type:String},urls:{type:Array},wrapX:{type:Boolean,default:!1},transition:{type:Number},layer:{type:String},style:{type:String}}};function glt(r,e,t,n,i,a){return Mr("",!0)}var Vx=me(plt,[["render",glt]]);const vlt={name:"ol-source-vector",setup(r){const e=Be("vectorLayer")||Be("heatmapLayer"),{properties:t}=Or(r);let n=Ze(()=>new Mu(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),Qr("vectorSource",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},features:{type:Array,default:()=>[]},format:{type:Object},loader:{type:Function},overlaps:{type:Boolean,default:!0},projection:{type:String,default:"EPSG:3857"},strategy:{type:Function},url:{type:[String,Function]},useSpatialIndex:{type:Boolean,default:!0},wrapX:{type:Boolean,default:!0}}};function mlt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var jx=me(vlt,[["render",mlt]]);const ylt={name:"ol-source-cluster",setup(r){const e=Be("vectorLayer"),{properties:t}=Or(r);let n=Ze(()=>new rG(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value),e.value.changed()}),pr(()=>{e.value.setSource(null)}),Qr("vectorLayer",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},distance:{type:Number,default:20},geometryFunction:{type:Function,default:r=>r.getGeometry()},wrapX:{type:Boolean,default:!0}}};function _lt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Kx=me(ylt,[["render",_lt]]);const wlt={name:"ol-source-bingmaps",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new sAt(bA(Jn({},t),{key:t.apiKey})));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{cacheSize:{type:Number},hidpi:{type:Boolean,default:!1},culture:{type:String,default:"en-us"},apiKey:{type:String},imagerySet:{type:String},imageSmoothing:{type:Boolean,default:!0},maxZoom:{type:Number,default:21},reprojectionErrorThreshold:{type:Number,default:.5},tileLoadFunction:{type:Function,default:(r,e)=>r.getImage().src=e},wrapX:{type:Boolean,default:!0},transition:{type:Number}}};function Elt(r,e,t,n,i,a){return Mr("",!0)}var Wx=me(wlt,[["render",Elt]]);class au extends oG{constructor(e){au.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},au.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?au.layerLabelMap[t.layerType]:t.layerType,t.matrixSet=t.projection==="EPSG:4326"||t.projection==="EPSG:4490"?"c":"w",!t.url&&!t.urls&&(t.url="https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),t.tk&&(t.url=`${t.url}tk=${t.tk}`),t.url=t.url.replace("{layer}",t.layerType).replace("{proj}",t.matrixSet);let n=t.tileGrid||au.getTileGrid(t.projection||"EPSG:3857"),i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",a={version:t.version||"1.0.0",format:t.format||"tiles",dimensions:t.dimensions||{},layer:t.layerType,matrixSet:t.matrixSet,tileGrid:n,style:t.style||"default",cacheSize:t.cacheSize,crossOrigin:i,opaque:t.opaque===void 0?!0:t.opaque,maxZoom:au.layerZoomMap[t.layerType],reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:t.url,urls:t.urls,projection:t.projection||"EPSG:3857",wrapX:t.wrapX};t.tileProxy&&(a.tileLoadFunction=s),super(a),t.tileProxy&&(this.tileProxy=t.tileProxy);let o=this;function s(A,l){A.getImage().src=o.tileProxy+encodeURIComponent(l)}}static getTileGrid(e){return e==="EPSG:4326"||e==="EPSG:4490"?au.default4326TileGrid():au.default3857TileGrid()}static default4326TileGrid(){let e=[],t=[];for(let i=1;i<19;i++)e.push(.703125*2/Math.pow(2,i)),t.push(i);return new Px({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}static default3857TileGrid(){let e=[],t=[];for(let i=1;i<19;i++)e.push(78271.51696402031*2/Math.pow(2,i)),t.push(i);return new Px({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const Clt={name:"ol-source-tianditu",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=Ze(()=>new au(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{layerType:{type:String,default:"img"},tk:{type:String},isLabel:{type:Boolean,default:!1},cacheSize:{type:Number},crossOrigin:{type:String},projection:{Type:String,default:"EPSG:3857"},hidpi:{type:Boolean,default:!1},requestEncoding:{type:String,default:"KVP"},format:{type:String},version:{type:String,default:"1.0.0"},culture:{type:String,default:"en-us"},matrixSet:{type:String},dimensions:{type:Object,default:()=>{}},imageSmoothing:{type:Boolean,default:!0},maxZoom:{type:Number,default:21},reprojectionErrorThreshold:{type:Number},tileLoadFunction:{type:Function,default:(r,e)=>r.getImage().src=e},wrapX:{type:Boolean,default:!0},transition:{type:Number}}};function Blt(r,e,t,n,i,a){return Mr("",!0)}var zx=me(Clt,[["render",Blt]]);const blt={name:"ol-source-image-wms",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new LAt(bA(Jn({},t),{params:{LAYERS:r.layers,STYLES:r.styles,TIME:r.time},projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection))}));let i=n();return ye(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),cr(()=>{e.setSource(i)}),pr(()=>{e.setSource(null)}),{layer:e,source:i}},props:{attributions:{type:String},crossOrigin:{type:String},imageExtent:{type:Array},projection:{type:[String,Object],default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},format:{type:String,default:"image/png"},version:{type:String,default:"1.3.0"},matrixSet:{type:String},serverType:{type:String,default:"mapserver"},imageSmoothing:{type:Boolean,default:!0},layers:{type:[String,Array],required:!0},styles:{type:[String,Array],default:""},time:{type:String},ratio:{type:Number,default:1},imageSize:{type:Array},url:{type:String},params:{type:Object},imageLoadFunction:{type:Function}}};function Tlt(r,e,t,n,i,a){return Mr("",!0)}var Yx=me(blt,[["render",Tlt]]);const Slt={name:"ol-source-webglpoints",setup(r){const e=Be("webglPointsLayer"),{properties:t}=Or(r);let n=Ze(()=>new Mu(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),Qr("vectorSource",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},features:{type:Array,default:()=>[]},format:{type:Object},loader:{type:Function},overlaps:{type:Boolean,default:!0},projection:{type:String,default:"EPSG:3857"},strategy:{type:Function},url:{type:[String,Function]},useSpatialIndex:{type:Boolean,default:!0},wrapX:{type:Boolean,default:!0}}};function xlt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Xx=me(Slt,[["render",xlt]]);function gE(r){gE.installed||(gE.installed=!0,r.component(Hx.name,Hx),r.component(Gx.name,Gx),r.component($x.name,$x),r.component(Vx.name,Vx),r.component(jx.name,jx),r.component(Kx.name,Kx),r.component(Wx.name,Wx),r.component(zx.name,zx),r.component(Yx.name,Yx),r.component(Xx.name,Xx))}var Ilt=Object.freeze(Object.defineProperty({__proto__:null,default:gE,install:gE,SourceXYZ:Hx,SourceOSM:Gx,SourceImageStatic:$x,SourceWMTS:Vx,SourceVector:jx,SourceCluster:Kx,SourceTianDiTu:zx,SourceImageWMS:Yx,SourceWebglPoints:Xx,SourceBingMaps:Wx},Symbol.toStringTag,{value:"Module"}));function Xi(r,e,t){const n=Be("map"),i=Be("controlBar",null),a=i!=null?i.value:n,{properties:o}=Or(e);let s=Ze(()=>new r(Jn({},o)));return s.value.set("order",t.attrs.order==null?0:t.attrs.order),ye(s,(A,l)=>{a.removeControl&&(a.removeControl(l),a.addControl(A),n.changed())}),cr(()=>{if(a.addControl(s.value),a.controls_!=null){let A=[...a.controls_];A.sort((l,u)=>l.get("order")-u.get("order")),a.controls_=[],A.forEach(l=>{a.addControl(l)}),a.changed()}n.changed()}),pr(()=>{if(a.removeControl)a.removeControl(s.value);else{let A=a.controls_.findIndex(l=>l==s.value);a.controls_.splice(A,1),s.value.dispose()}n.changed()}),{map:n,control:s}}const Llt={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Xi(q3,r,e);return{control:t}},props:{className:{type:String,default:"ol-full-screen"},label:{type:String,default:"⤢"},labelActive:{type:String,default:"×"},activeClassName:{type:String,default:"ol-full-screen-true"},inactiveClassName:{type:String,default:"ol-full-screen-false"},tipLabel:{type:String,default:"Toggle full-screen"},keys:{type:Boolean,default:!1},target:{type:Object,default:void 0},source:{type:Object,default:void 0}}};function Olt(r,e,t,n,i,a){return Mr("",!0)}var qx=me(Llt,[["render",Olt]]);const Flt={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Xi(tZ,r,e);return{control:t}},props:{className:{type:String,default:"ol-mouse-position"},coordinateFormat:{type:[String,Function]},projection:{type:String},render:{type:Function},target:{type:HTMLElement},undefinedHTML:{type:String,default:" "}}};function Rlt(r,e,t,n,i,a){return Mr("",!0)}var Zx=me(Flt,[["render",Rlt]]);const Mlt={name:"ol-attribution-control",setup(r,e){const{control:t}=Xi(E8,r,e);return{control:t}},props:{className:{type:String,default:"ol-attribution"},target:{type:HTMLElement},collapsible:{type:Boolean},collapsed:{type:Boolean,default:!0},tipLabel:{type:String,default:"Attributions"},label:{type:String,default:"i"},expandClassName:{type:String,default:"ol-attribution-expand"},collapseLabel:{type:String,default:"»"},collapseClassName:{type:String,default:"ol-attribution-collapse"},render:{type:Function}}};function Nlt(r,e,t,n,i,a){return Mr("",!0)}var Jx=me(Mlt,[["render",Nlt]]);const Plt={name:"ol-overviewmap-control",setup(r,e){const t=Be("map"),{control:n}=Xi(aZ,r,e);return cr(()=>{n.value.setMap(t)}),pr(()=>{n.value.setMap(null)}),Qr("overviewMap",n),{control:n}},props:{className:{type:String,default:"ol-overviewmap"},collapsed:{type:Boolean,default:!0},collapseLabel:{type:String,default:"«"},collapsible:{type:Boolean,default:!0},label:{type:String,default:"»"},render:{type:Function},rotateWithView:{type:Boolean,default:!1},target:{type:HTMLElement},tipLabel:{type:String,default:"Overview map"}}};function Ult(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var tI=me(Plt,[["render",Ult]]);const Dlt={name:"ol-scaleline-control",setup(r,e){const{control:t}=Xi(lZ,r,e);return{control:t}},props:{className:{type:String,default:"ol-scale-line"},minWidth:{type:Number,default:64},render:{type:Function},target:{type:HTMLElement},units:{type:String,default:"metric"},bar:{type:Boolean,default:!1},steps:{type:Number,default:4},text:{type:Boolean,default:!1},dpi:{type:Number,default:void 0}}};function Qlt(r,e,t,n,i,a){return Mr("",!0)}var eI=me(Dlt,[["render",Qlt]]);const klt={name:"ol-zoom-control",setup(r,e){const{control:t}=Xi(B8,r,e);return{control:t}},props:{duration:{type:Number,default:250},className:{type:String,default:"ol-zoom"},zoomInClassName:{type:String,default:"ol-zoom-in"},zoomOutClassName:{type:String,default:"ol-zoom-out"},zoomInLabel:{type:String,default:"+"},zoomOutLabel:{type:String,default:"-"},zoomInTipLabel:{type:String,default:"Zoom in"},zoomOutTipLabel:{type:String,default:"Zoom Out"},delta:{type:Number,default:1},target:{type:HTMLElement}}};function Hlt(r,e,t,n,i,a){return Mr("",!0)}var rI=me(klt,[["render",Hlt]]);const Glt={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Xi(hZ,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function $lt(r,e,t,n,i,a){return Mr("",!0)}var nI=me(Glt,[["render",$lt]]);const Vlt={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Xi(pZ,r,e);return{control:t}},props:{className:{type:String,default:"ol-zoom-extent"},target:{type:HTMLElement},label:{type:String,default:"E"},tipLabel:{type:String,default:"Fit to extent"},extent:{type:Array}}};function jlt(r,e,t,n,i,a){return Mr("",!0)}var iI=me(Vlt,[["render",jlt]]);const Klt={name:"ol-rotate-control",setup(r,e){const{control:t}=Xi(C8,r,e);return{control:t}},props:{className:{type:String,default:"ol-rotate"},label:{type:String,default:"⇧"},tipLabel:{type:String,default:"Reset rotation"},compassClassName:{type:String,default:"ol-compass"},duration:{type:Number,default:250},autoHide:{type:Boolean,default:!1},render:{type:Function},resetNorth:{type:Function},target:{type:HTMLElement}}};function Wlt(r,e,t,n,i,a){return Mr("",!0)}var S5=me(Klt,[["render",Wlt]]),lG={exports:{}},zlt=hAt(k3);/*! * ol-contextmenu - v4.1.0 * https://github.com/jonataswalker/ol-contextmenu * Built: Sat Aug 15 2020 10:43:26 GMT-0300 (Brasilia Standard Time) */(function(r,e){(function(t,n){r.exports=n(zlt)})(nl,function(t){function n(L){return L&&typeof L=="object"&&"default"in L?L:{default:L}}var i=n(t),a="ol-ctx-menu",o={namespace:a,container:a+"-container",separator:a+"-separator",submenu:a+"-submenu",hidden:a+"-hidden",icon:a+"-icon",zoomIn:a+"-zoom-in",zoomOut:a+"-zoom-out",unselectable:"ol-unselectable"},s=o,A="beforeopen",l="open",u="close",c="contextmenu",h={width:150,scrollAt:4,eventType:c,defaultItems:!0},f=[{text:"Zoom In",classname:o.zoomIn+" "+o.icon,callback:function(L,N){var x=N.getView();x.animate({zoom:+x.getZoom()+1,duration:700,center:L.coordinate})}},{text:"Zoom Out",classname:o.zoomOut+" "+o.icon,callback:function(L,N){var x=N.getView();x.animate({zoom:+x.getZoom()-1,duration:700,center:L.coordinate})}}];function d(L,N){if(N===void 0&&(N="Assertion failed"),!L)throw typeof Error<"u"?new Error(N):N}function g(L){return/^\d+$/.test(L)}function m(L,N){return L.classList?L.classList.contains(N):C(N).test(L.className)}function v(L,N,x){N===void 0&&(N=window.document);var S=Array.prototype.slice,P=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(L))switch(L[0]){case"#":P=[y(L.substr(1))];break;case".":P=S.call(N.getElementsByClassName(L.substr(1).replace(/\./g," ")));break;default:P=S.call(N.getElementsByTagName(L))}else P=S.call(N.querySelectorAll(L));return x?P:P[0]}function y(L){return L=L[0]==="#"?L.substr(1,L.length):L,document.getElementById(L)}function w(L){var N=document.createDocumentFragment(),x=document.createElement("div");for(x.innerHTML=L;x.firstChild;)N.appendChild(x.firstChild);return N}function C(L){return new RegExp("(^|\\s+) "+L+" (\\s+|$)")}function O(L,N,x){L.classList?L.classList.add(N):L.className=(L.className+" "+N).trim(),x&&g(x)&&window.setTimeout(function(){return F(L,N)},x)}function F(L,N,x){L.classList?L.classList.remove(N):L.className=L.className.replace(C(N)," ").trim(),x&&g(x)&&window.setTimeout(function(){return O(L,N)},x)}var I=function(L){return this.Base=L,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:L.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};I.prototype.init=function(L){this.map=L,this.viewport=L.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},I.prototype.getItemsLength=function(){var L=this,N=0;return Object.keys(this.items).forEach(function(x){L.items[x].submenu||L.items[x].separator||N++}),N},I.prototype.getPixelClicked=function(){return this.pixelClicked},I.prototype.getCoordinateClicked=function(){return this.coordinateClicked},I.prototype.positionContainer=function(L){var N=this,x=this.Base.container,S=this.map.getSize(),P=S[1]-L[1],U=S[0]-L[0],tt=x.offsetWidth,q=Math.round(this.lineHeight*this.getItemsLength()),rt=v("li."+s.submenu+">div",x,!0);U>=tt?(x.style.right="auto",x.style.left=L[0]+5+"px"):(x.style.left="auto",x.style.right="15px"),P>=q?(x.style.bottom="auto",x.style.top=L[1]-10+"px"):(x.style.top="auto",x.style.bottom=0),function nt(At,ct,Tt){if(Array.isArray(At))At.forEach(function(Y){return nt(Y,ct,Tt)});else for(var M=Array.isArray(ct)?ct:ct.split(/\s+/),W=M.length;W--;)m(At,M[W])&&F(At,M[W],Tt)}(x,s.hidden),rt.length&&(this.submenu.lastLeft=U<2*tt?"-"+tt+"px":this.submenu.left,rt.forEach(function(nt){var At,ct,Tt,M={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},W=(ct=(At=nt).getBoundingClientRect(),Tt=document.documentElement,{left:ct.left+window.pageXOffset-Tt.clientLeft,top:ct.top+window.pageYOffset-Tt.clientTop,width:At.offsetWidth,height:At.offsetHeight}),Y=W.height,H=P-Y;H<0&&(H=Y-(M.h-W.top),nt.style.top="-"+H+"px"),nt.style.left=N.submenu.lastLeft}))},I.prototype.openMenu=function(L,N){this.Base.dispatchEvent({type:l,pixel:L,coordinate:N}),this.opened=!0,this.positionContainer(L)},I.prototype.closeMenu=function(){this.opened=!1,function L(N,x,S){if(Array.isArray(N))N.forEach(function(tt){return L(tt,x)});else for(var P=Array.isArray(x)?x:x.split(/\s+/),U=P.length;U--;)m(N,P[U])||O(N,P[U],S)}(this.Base.container,s.hidden),this.Base.dispatchEvent({type:u})},I.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},I.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},I.prototype.handleEvent=function(L){var N=this;this.coordinateClicked=this.map.getEventCoordinate(L),this.pixelClicked=this.map.getEventPixel(L),this.Base.dispatchEvent({type:A,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(L.stopPropagation(),L.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),L.target.addEventListener("pointerdown",{handleEvent:function(x){N.opened&&(N.closeMenu(),x.stopPropagation(),L.target.removeEventListener(x.type,this,!1))}},!1))},I.prototype.handleMapMoveEvent=function(L){this.closeMenu()},I.prototype.setItemListener=function(L,N){var x,S=this;L&&typeof this.items[N].callback=="function"&&(x=this.items[N].callback,L.addEventListener("click",function(P){P.preventDefault();var U={coordinate:S.getCoordinateClicked(),data:S.items[N].data||null};S.closeMenu(),x(U,S.map)},!1))};var T=function(L){return this.Base=L,this.Base.container=this.container=this.createContainer(!0),this};return T.prototype.createContainer=function(L){var N=document.createElement("div"),x=document.createElement("ul"),S=[s.container,s.unselectable];return L&&S.push(s.hidden),N.className=S.join(" "),N.style.width=parseInt(this.Base.options.width,10)+"px",N.appendChild(x),N},T.prototype.createMenu=function(){var L=[];if("items"in this.Base.options?L=this.Base.options.defaultItems?this.Base.options.items.concat(f):this.Base.options.items:this.Base.options.defaultItems&&(L=f),L.length===0)return!1;L.forEach(this.addMenuEntry,this)},T.prototype.addMenuEntry=function(L){var N,x=this;if(L.items&&Array.isArray(L.items)){L.classname=L.classname||"",N=s.submenu,~L.classname.indexOf(N)||(L.classname=L.classname.length?" "+s.submenu:s.submenu);var S=this.generateHtmlAndPublish(this.container,L),P=this.createContainer();P.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,S.appendChild(P),L.items.forEach(function(U){x.generateHtmlAndPublish(P,U,!0)})}else this.generateHtmlAndPublish(this.container,L)},T.prototype.generateHtmlAndPublish=function(L,N,x){var S,P,U="_"+Math.random().toString(36).substr(2,9),tt=!1;return typeof N=="string"&&N.trim()==="-"?(S=w('

  • '),P=[].slice.call(S.childNodes,0)[0],L.firstChild.appendChild(S),tt=!0):(N.classname=N.classname||"",S=w(""+N.text+""),P=document.createElement("li"),N.icon&&(N.classname===""?N.classname=s.icon:N.classname.indexOf(s.icon)===-1&&(N.classname+=" "+s.icon),P.setAttribute("style","background-image:url("+N.icon+")")),P.id=U,P.className=N.classname,P.appendChild(S),L.firstChild.appendChild(P)),this.Base.Internal.items[U]={id:U,submenu:x||0,separator:tt,callback:N.callback,data:N.data||null},this.Base.Internal.setItemListener(P,U),P},T.prototype.removeMenuEntry=function(L){var N=v("#"+L,this.container.firstChild);N&&this.container.firstChild.removeChild(N),delete this.Base.Internal.items[L]},T.prototype.cloneAndGetLineHeight=function(){var L=this.container.cloneNode(),N=w("Foo"),x=w("Foo"),S=document.createElement("li"),P=document.createElement("li");S.appendChild(N),P.appendChild(x),L.appendChild(S),L.appendChild(P),this.container.parentNode.appendChild(L);var U=L.offsetHeight/2;return this.container.parentNode.removeChild(L),U},function(L){function N(x){x===void 0&&(x={}),d(typeof x=="object","@param `opt_options` should be object type!"),this.options=function(S,P){var U={};for(var tt in S)U[tt]=S[tt];for(var q in P)U[q]=P[q];return U}(h,x),this.disabled=!1,this.Internal=new I(this),this.Html=new T(this),L.call(this,{element:this.container})}return L&&(N.__proto__=L),N.prototype=Object.create(L&&L.prototype),N.prototype.constructor=N,N.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},N.prototype.close=function(){this.Internal.closeMenu()},N.prototype.enable=function(){this.disabled=!1},N.prototype.disable=function(){this.disabled=!0},N.prototype.getDefaultItems=function(){return f},N.prototype.countItems=function(){return Object.keys(this.Internal.items).length},N.prototype.extend=function(x){d(Array.isArray(x),"@param `arr` should be an Array."),x.forEach(this.push,this)},N.prototype.isOpen=function(){return this.Internal.opened},N.prototype.updatePosition=function(x){d(Array.isArray(x),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(x)},N.prototype.pop=function(){var x=Object.keys(this.Internal.items);this.Html.removeMenuEntry(x[x.length-1])},N.prototype.push=function(x){d(x!=null,"@param `item` must be informed."),this.Html.addMenuEntry(x)},N.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},N.prototype.setMap=function(x){L.prototype.setMap.call(this,x),x?this.Internal.init(x,this):this.Internal.removeListeners()},N}(i.default)})})(lG);var Ylt=lG.exports;const Xlt={name:"ol-context-menu",setup(r,e){const{control:t}=Xi(Ylt,r,e);return{control:t}},props:{eventType:{type:String,default:"contextmenu"},defaultItems:{type:Boolean,default:!0},width:{type:Number,default:150},items:{type:Array,default:()=>[]}}};function qlt(r,e,t,n,i,a){return Mr("",!0)}var aI=me(Xlt,[["render",qlt]]),Ko=function(r){r=r||{};var e=document.createElement("button"),t=document.createElement("div");t.className=(r.className||"ol-swipe")+" ol-unselectable ol-control",t.appendChild(e),t.addEventListener("mousedown",this.move.bind(this)),t.addEventListener("touchstart",this.move.bind(this)),Nr.call(this,{element:t}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],r.layers&&this.addLayer(r.layers,!1),r.rightLayers&&this.addLayer(r.rightLayers,!0),this.on("propertychange",function(n){if(this.getMap())try{this.getMap().renderSync()}catch{}this.get("orientation")==="horizontal"?(this.element.style.top=this.get("position")*100+"%",this.element.style.left=""):(this.get("orientation")!=="vertical"&&this.set("orientation","vertical"),this.element.style.left=this.get("position")*100+"%",this.element.style.top=""),n.key==="orientation"&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(i){i.layer.getImageRatio&&i.layer.changed()})}.bind(this)),this.set("position",r.position||.5),this.set("orientation",r.orientation||"vertical")};kr(Ko,Nr);Ko.prototype.setMap=function(r){var e,t;if(this.getMap()){for(e=0;e=0&&this.getMap()&&(this.layers[t].right?r[e].un(["precompose","prerender"],this.precomposeRight_):r[e].un(["precompose","prerender"],this.precomposeLeft_),r[e].un(["postcompose","postrender"],this.postcompose_),this.layers.splice(t,1))}if(this.getMap())try{this.getMap().renderSync()}catch{}};Ko.prototype.getRectangle=function(){var r;return this.get("orientation")==="vertical"?(r=this.getMap().getSize(),[0,0,r[0]*this.get("position"),r[1]]):(r=this.getMap().getSize(),[0,0,r[0],r[1]*this.get("position")])};Ko.prototype.move=function(r){var e=this,t;switch(this._movefn||(this._movefn=this.move.bind(this)),r.type){case"touchcancel":case"touchend":case"mouseup":{e.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(s){document.removeEventListener(s,e._movefn)}),this.layers.forEach(function(s){s.layer.getImageRatio&&s.layer.changed()});break}case"mousedown":case"touchstart":e.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(s){document.addEventListener(s,e._movefn)});case"mousemove":case"touchmove":{if(e.isMoving)if(e.get("orientation")==="vertical"){var n=r.pageX||r.touches&&r.touches.length&&r.touches[0].pageX||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageX;if(!n)break;n-=e.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft,t=e.getMap().getSize()[0];var i=t-Math.min(Math.max(0,t-n),t);t=i/t,e.set("position",t),e.dispatchEvent({type:"moving",size:[i,e.getMap().getSize()[1]],position:[t,0]})}else{var a=r.pageY||r.touches&&r.touches.length&&r.touches[0].pageY||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageY;if(!a)break;a-=e.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop,t=e.getMap().getSize()[1];var o=t-Math.min(Math.max(0,t-a),t);t=o/t,e.set("position",t),e.dispatchEvent({type:"moving",size:[e.getMap().getSize()[0],o],position:[0,t]})}break}}};Ko.prototype._transformPt=function(r,e){var t=r.inversePixelTransform,n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e};Ko.prototype._drawRect=function(r,e){var t=r.inversePixelTransform;if(t){var n=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(r.context.save(),r.target.getImageRatio){var i=-Math.atan2(r.frameState.pixelToCoordinateTransform[1],r.frameState.pixelToCoordinateTransform[0]);r.context.translate(r.frameState.size[0]/2,r.frameState.size[1]/2),r.context.rotate(i),r.context.translate(-r.frameState.size[0]/2,-r.frameState.size[1]/2)}n.forEach(function(o,s){o=[o[0]*t[0]-o[1]*t[1]+t[4],-o[0]*t[2]+o[1]*t[3]+t[5]],s?r.context.lineTo(o[0],o[1]):r.context.moveTo(o[0],o[1])}),r.context.restore()}else{var a=r.frameState.pixelRatio;r.context.rect(e[0][0]*a,e[0][1]*a,e[1][0]*a,e[1][1]*a)}};Ko.prototype.precomposeLeft=function(r){var e=r.context;if(e instanceof WebGLRenderingContext){if(r.type==="prerender"){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var t=this.getMap().getSize(),n=this._transformPt(r,[0,t[1]]),i=this._transformPt(r,[t[0],0]),a=i[0]-n[0],o=i[1]-n[1];this.get("orientation")==="vertical"?a=Math.round(a*this.get("position")):(o=Math.round(o*this.get("position")),n[1]+=t[1]-o),e.scissor(n[0],n[1],a,o)}}else{var s=r.frameState.size;e.save(),e.beginPath();var A=[[0,0],[s[0],s[1]]];this.get("orientation")==="vertical"?A[1]=[s[0]*.5+this.getMap().getSize()[0]*(this.get("position")-.5),s[1]]:A[1]=[s[0],s[1]*.5+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(r,A),e.clip()}};Ko.prototype.precomposeRight=function(r){var e=r.context;if(e instanceof WebGLRenderingContext){if(r.type==="prerender"){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var t=this.getMap().getSize(),n=this._transformPt(r,[0,t[1]]),i=this._transformPt(r,[t[0],0]),a=i[0]-n[0],o=i[1]-n[1];this.get("orientation")==="vertical"?(a=Math.round(a*(1-this.get("position"))),n[0]+=t[0]-a):o=Math.round(o*(1-this.get("position"))),e.scissor(n[0],n[1],a,o)}}else{var s=r.frameState.size;e.save(),e.beginPath();var A=[[0,0],[s[0],s[1]]];this.get("orientation")==="vertical"?A[0]=[s[0]*.5+this.getMap().getSize()[0]*(this.get("position")-.5),0]:A[0]=[0,s[1]*.5+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(r,A),e.clip()}};Ko.prototype.postcompose=function(r){if(r.context instanceof WebGLRenderingContext){if(r.type==="postrender"){var e=r.context;e.disable(e.SCISSOR_TEST)}}else r.target.getClassName&&r.target.getClassName()!=="ol-layer"&&r.target.get("declutter")?setTimeout(function(){r.context.restore()},0):r.context.restore()};const Zlt={name:"ol-swipe-control",setup(r,e){const{control:t}=Xi(Ko,r,e),{layerList:n}=rh(r);return n.value.forEach((i,a)=>{t.value.addLayer(i,a==1)}),{control:t}},props:{layerList:{type:Array},className:{type:String,default:"ol-swipe"},position:{type:Number,default:.5},orientation:{type:String,default:"vertical"}}};function Jlt(r,e,t,n,i,a){return Mr("",!0)}var oI=me(Zlt,[["render",Jlt]]),Cs=function(r){r||(r={});var e=document.createElement("div");if(e.classList.add("ol-unselectable","ol-control","ol-bar"),r.className){var t=r.className.split(" ").filter(function(i){return i.length>0});e.classList.add.apply(e.classList,t)}if(r.group&&e.classList.add("ol-group"),Nr.call(this,{element:e,target:r.target}),this.set("toggleOne",r.toggleOne),this.set("autoDeactivate",r.autoDeactivate),this.controls_=[],r.controls instanceof Array)for(var n=0;nT-.5?y.classList.add("ol-100pc"):y.classList.remove("ol-100pc")}},g=function(I){I.target.classList.contains("ol-noscroll")||(l=!1,t=I[s],a=new Date,r.classList.add("ol-move"),I.preventDefault(),window.addEventListener("pointermove",m),yt.addListener(window,["pointerup","pointercancel"],O))},m=function(I){if(l=!0,t!==!1){var T=(c?-1/u:1)*(t-I[s]);r[A]+=T,i=new Date,i-a&&(n=(n+T/(i-a))/2),t=I[s],a=i,T&&o(!0)}},v=function(I){var T=I>0?Math.min(100,I/2):Math.max(-100,I/2);I-=T,r[A]+=T,-1100||c?n=0:a>0&&(n=((n||0)+(t-I[s])/a)/2),v(e.animate===!1?0:n*200),t=!1,n=0,a=0,r.classList.contains("ol-move")?r.classList.remove("ol-hasClick"):(r.classList.add("ol-hasClick"),setTimeout(function(){r.classList.remove("ol-hasClick")},500)),c=!1,window.removeEventListener("pointermove",m),yt.removeListener(window,["pointerup","pointercancel"],O)},F=function(I){var T=Math.max(-1,Math.min(1,I.wheelDelta||-I.detail));return r.classList.add("ol-move"),r[A]-=T*30,r.classList.remove("ol-move"),!1};return e.mousewheel&&yt.addListener(r,["mousewheel","DOMMouseScroll","onmousewheel"],F),{refresh:f}};yt.dispatchEvent=function(r,e){var t;try{t=new CustomEvent(r)}catch{t=document.createEvent("CustomEvent"),t.initCustomEvent(r,!0,!0,{})}e.dispatchEvent(t)};var Pu=function(r){r=r||{};var e=document.createElement("div");e.className=(r.className||"")+" ol-button ol-unselectable ol-control";var t=this,n=this.button_=document.createElement(/ol-text-button/.test(r.className)?"div":"button");n.type="button",r.title&&(n.title=r.title),r.name&&(n.name=r.name),r.html instanceof Element?n.appendChild(r.html):n.innerHTML=r.html||"";var i=function(a){a&&a.preventDefault&&(a.preventDefault(),a.stopPropagation()),r.handleClick&&r.handleClick.call(t,a)};n.addEventListener("click",i),e.appendChild(n),!r.title&&n.firstElementChild&&(n.title=n.firstElementChild.title),Nr.call(this,{element:e,target:r.target}),r.title&&this.set("title",r.title),r.title&&this.set("title",r.title),r.name&&this.set("name",r.name)};kr(Pu,Nr);Pu.prototype.setVisible=function(r){r?yt.show(this.element):yt.hide(this.element)};Pu.prototype.setTitle=function(r){this.button_.setAttribute("title",r)};Pu.prototype.setHtml=function(r){yt.setHTML(this.button_,r)};Pu.prototype.getButtonElement=function(){return this.button_};var Vs=function(r){r=r||{};var e=this;this.interaction_=r.interaction,this.interaction_&&(this.interaction_.setActive(r.active),this.interaction_.on("change:active",function(){e.setActive(e.interaction_.getActive())})),r.toggleFn&&(r.onToggle=r.toggleFn),r.handleClick=function(){e.toggle(),r.onToggle&&r.onToggle.call(e,e.getActive())},r.className=(r.className||"")+" ol-toggle",Pu.call(this,r),this.set("title",r.title),this.set("autoActivate",r.autoActivate),r.bar&&this.setSubBar(r.bar),this.setActive(r.active),this.setDisable(r.disable)};kr(Vs,Pu);Vs.prototype.setMap=function(r){!r&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),Pu.prototype.setMap.call(this,r),r&&(this.interaction_&&r.addInteraction(this.interaction_),this.subbar_&&r.addControl(this.subbar_))};Vs.prototype.getSubBar=function(){return this.subbar_};Vs.prototype.setSubBar=function(r){var e=this.getMap();e&&this.subbar_&&e.removeControl(this.subbar_),this.subbar_=r,r&&(this.subbar_.setTarget(this.element),this.subbar_.element.classList.add("ol-option-bar"),e&&e.addControl(this.subbar_))};Vs.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};Vs.prototype.setDisable=function(r){this.getDisable()!=r&&(this.element.querySelector("button").disabled=r,r&&this.getActive()&&this.setActive(!1),this.dispatchEvent({type:"change:disable",key:"disable",oldValue:!r,disable:r}))};Vs.prototype.getActive=function(){return this.element.classList.contains("ol-active")};Vs.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};Vs.prototype.setActive=function(r){this.interaction_&&this.interaction_.setActive(r),this.subbar_&&this.subbar_.setActive(r),this.getActive()!==r&&(r?this.element.classList.add("ol-active"):this.element.classList.remove("ol-active"),this.dispatchEvent({type:"change:active",key:"active",oldValue:!r,active:r}))};Vs.prototype.setInteraction=function(r){this.interaction_=r};Vs.prototype.getInteraction=function(){return this.interaction_};const rut={name:"ol-control-toggle",setup(r,e){const{control:t}=Xi(Vs,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function nut(r,e,t,n,i,a){return Mr("",!0)}var AI=me(rut,[["render",nut]]);const iut={name:"ol-control-button",setup(r,e){const{control:t}=Xi(Pu,r,e);return{control:t}},props:{html:{type:String},name:{type:String},className:{type:String},title:{type:String},handleClick:{type:Function}}};function aut(r,e,t,n,i,a){return Mr("",!0)}var lI=me(iut,[["render",aut]]),Za=function(r){r=r||{},r.fullscreen&&(r.target=document.body);var e=yt.create("DIV",{className:((r.className||"")+(r.zoom?" ol-zoom":"")+" ol-ext-dialog").trim(),click:function(i){this.get("hideOnBack")&&i.target===e&&this.close(),this.get("hideOnClick")&&this.close()}.bind(this)}),t=yt.create("FORM",{on:{submit:this._onButton("submit")},parent:e});yt.create("H2",{parent:t}),yt.create("DIV",{className:"ol-closebox",click:this._onButton("cancel"),parent:t}),yt.create("DIV",{className:"ol-content",parent:t}),this._progress=yt.create("DIV",{style:{display:"none"},parent:t});var n=yt.create("DIV",{className:"ol-progress-bar",parent:this._progress});this._progressbar=yt.create("DIV",{parent:n}),this._progressMessage=yt.create("DIV",{className:"ol-progress-message",parent:this._progress}),yt.create("DIV",{className:"ol-buttons",parent:t}),Nr.call(this,{element:e,target:r.target}),this.set("closeBox",r.closeBox!==!1),this.set("zoom",!!r.zoom),this.set("hideOnClick",!!r.hideOnClick),this.set("hideOnBack",!!r.hideOnBack),this.set("className",e.className),this.set("closeOnSubmit",r.closeOnSubmit),this.set("buttons",r.buttons),this.setContent(r)};kr(Za,Nr);Za.prototype.show=function(r){r&&((r instanceof Element||typeof r=="string")&&(r={content:r}),this.setContent(r)),this.element.classList.add("ol-visible");var e=this.element.querySelector('input[type="text"],input[type="search"],input[type="number"]');if(e&&e.focus(),this.dispatchEvent({type:"show"}),r){if(r.autoclose){var t=setTimeout(function(){this.hide()}.bind(this),r.autoclose);this.once("hide",function(){clearTimeout(t)})}if(r.hideOnBack){var n=this.get("hideOnBack");this.set("hideOnBack",!0),this.once("hide",function(){this.set("hideOnBack",n)}.bind(this))}}};Za.prototype.open=function(){this.show()};Za.prototype.setContentMessage=function(r){if(r!==void 0){var e=this.getContentElement();r instanceof Element&&yt.setHTML(e,""),yt.setHTML(e,r||"")}};Za.prototype.setTitle=function(r){var e=this.element.querySelector("form");e.querySelector("h2").innerText=r||"",r?e.classList.add("ol-title"):e.classList.remove("ol-title")};Za.prototype.setContent=function(r){if(r){this.element.className=this.get("className"),typeof r=="string"&&(r={content:r}),r=r||{},this.setProgress(!1),r.max&&this.setProgress(0,r.max),r.progress!==void 0&&this.setProgress(r.progress),this.get("zoom")?this.element.classList.add("ol-zoom"):this.element.classList.remove("ol-zoom"),r.className&&r.className.split(" ").forEach(function(a){this.element.classList.add(a)}.bind(this));var e=this.element.querySelector("form");r.content!==void 0&&(r.content instanceof Element&&yt.setHTML(e.querySelector(".ol-content"),""),yt.setHTML(e.querySelector(".ol-content"),r.content||"")),this.setTitle(r.title),r.closeBox||this.get("closeBox")&&r.closeBox!==!1?e.classList.add("ol-closebox"):e.classList.remove("ol-closebox");var t=this.element.querySelector(".ol-buttons");t.innerHTML="";var n=r.buttons||this.get("buttons");if(n){e.classList.add("ol-button");for(var i in n)yt.create("INPUT",{type:i==="submit"?"submit":"button",value:n[i],click:this._onButton(i,r.onButton),parent:t})}else e.classList.remove("ol-button")}};Za.prototype.getContentElement=function(){return this.element.querySelector("form .ol-content")};Za.prototype.setProgress=function(r,e,t){if(r===!1){yt.setStyle(this._progress,{display:"none"});return}if(e>0?this.set("max",Number(e)):e=this.get("max"),!e)yt.setStyle(this._progress,{display:"none"});else{var n=Math.round(r/e*100);yt.setStyle(this._progress,{display:""}),this._progressbar.className=n?"":"notransition",yt.setStyle(this._progressbar,{width:n+"%"})}this._progressMessage.innerHTML="",yt.setHTML(this._progressMessage,t||"")};Za.prototype._onButton=function(r,e){var t=function(n){n.preventDefault(),(r!=="submit"||this.get("closeOnSubmit")!==!1)&&this.hide();var i=this.getInputs();this.dispatchEvent({type:"button",button:r,inputs:i}),typeof e=="function"&&e(r,i)}.bind(this);return t};Za.prototype.getInputs=function(){var r={};return["input","textarea","select"].forEach(function(e){this.element.querySelectorAll("form "+e).forEach(function(t){t.className&&t.className.split(" ").forEach(function(n){r[n]=t})})}.bind(this)),r};Za.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})};Za.prototype.close=Za.prototype.hide;Za.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")};var out=function(r){if(!r)return null;var e=r.getViewport().getElementsByClassName("ol-fixedoverlay")[0];return e||(r.getViewport().querySelector(".ol-layers")?(e=document.createElement("canvas"),e.className="ol-fixedoverlay",r.getViewport().querySelector(".ol-layers").after(e),r.on("precompose",function(t){e.width=r.getSize()[0]*t.frameState.pixelRatio,e.height=r.getSize()[1]*t.frameState.pixelRatio})):e=r.getViewport().querySelector("canvas")),e},qi=function(r){r||(r={}),this.setStyle(r.style),Nr.call(this,r)};kr(qi,Nr);qi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(ys(this._listener),this._listener=null),Nr.prototype.setMap.call(this,r),e)try{e.renderSync()}catch{}r&&(this._listener=r.on("postcompose",this._draw.bind(this)))};qi.prototype.getCanvas=function(r){return out(r)};qi.prototype.getContext=function(r){var e=r.context;if(!e&&this.getMap()){var t=this.getMap().getViewport().getElementsByClassName("ol-fixedoverlay")[0];e=t?t.getContext("2d"):null}return e};qi.prototype.setStyle=function(r){this._style=r||new Ea({})};qi.prototype.getStyle=function(){return this._style};qi.prototype.getStroke=function(){var r=this._style.getStroke();return r||this._style.setStroke(new zi({color:"#000",width:1.25})),this._style.getStroke()};qi.prototype.getFill=function(){var r=this._style.getFill();return r||this._style.setFill(new Ba({color:"#fff"})),this._style.getFill()};qi.prototype.getTextStroke=function(){var r=this._style.getText();return r||(r=new Bd({})),r.getStroke()||r.setStroke(new zi({color:"#fff",width:3})),r.getStroke()};qi.prototype.getTextFill=function(){var r=this._style.getText();return r||(r=new Bd({})),r.getFill()||r.setFill(new Ba({color:"#fff"})),r.getFill()};qi.prototype.getTextFont=function(){var r=this._style.getText();return r||(r=new Bd({})),r.getFont()||r.setFont("12px sans-serif"),r.getFont()};qi.prototype._draw=function(){console.warn("[CanvasBase] draw function not implemented.")};function sut(r,e){var t=r.canvas,n=e||{},i=n.pixelRatio||td,a=n.size;a&&(t.width=a[0]*i,t.height=a[1]*i,t.style.width=a[0]+"px",t.style.height=a[1]+"px");var o=[0,0,t.width,t.height],s=ay(xi(),i,i);return new jF(r,i,o,s,0)}var Qg=function(r){r=r||{},Oi.call(this,r),r.feature&&this.set("feature",r.feature.clone())};kr(Qg,Oi);Qg.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};Qg.prototype.getElement=function(r,e){var t=yt.create("LI",{className:this.get("className"),click:function(n){e(!1),n.stopPropagation()},style:{height:r[1]+"px"},"aria-label":this.get("title")});return yt.create("DIV",{click:function(n){e(!0),n.stopPropagation()},style:{width:r[0]+"px",height:r[1]+"px"},parent:t}),t};window.ol&&!ol.legend&&(ol.legend={});var ba=function(r){r=r||{},Oi.call(this),this._items=new Ii;var e=[],t;this._items.on("add",function(n){e.push({item:n.element,on:n.element.on("change",function(){this.refresh()}.bind(this))}),t&&(clearTimeout(t),t=null),t=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._items.on("remove",function(n){for(var i=0;i"u"&&(r.margin=10);var n=r.size||[40,25];r.onload=r.onload||function(){setTimeout(function(){ba.getLegendImage(r,e,t)},100)};var i=n[0]+2*r.margin,a=r.lineHeight||n[1]+2*r.margin,o=td;e||(t=0,e=document.createElement("canvas"),e.width=i*o,e.height=a*o);var s=e.getContext("2d");s.save();var A=sut(s,{pixelRatio:o}),l=r.typeGeom,u,c=r.feature;!c&&l&&(/Point/.test(l)?c=new _r(new xr([0,0])):/LineString/.test(l)?c=new _r(new en([0,0])):c=new _r(new Dn([[0,0]])),r.properties&&c.setProperties(r.properties)),c?(u=c.getStyle(),typeof u=="function"&&(u=u(c)),u||(u=typeof r.style=="function"?r.style(c):r.style||[]),l=c.getGeometry().getType()):u=[],u instanceof Array||(u=[u]);var h=i/2,f=a/2,d=n[0]/2,g=n[1]/2,m,v;if(l==="Point"){var y=null;for(m=0;v=u[m];m++){var w=v.getImage();if(w){var C=w.getImage();if(C&&C.complete&&!C.naturalWidth&&(typeof r.onload=="function"&&C.addEventListener("load",function(){setTimeout(function(){r.onload()},100)}),w.load()),w.getAnchor){var O=w.getAnchor();if(O){var F=w.getSize(),I=O[0]-F[0],T=O[1]-F[1];y?Ah(y,[I,T,I+F[0],T+F[1]]):y=[I,T,I+F[0],T+F[1]]}}}}y&&(h=h+(y[2]+y[0])/2,f=f+(y[3]+y[1])/2)}for(f+=t*a||0,m=0;v=u[m];m++)switch(A.setStyle(v),l){case xr:case"Point":case"MultiPoint":A.drawGeometry(new xr([h,f]));break;case en:case"LineString":case"MultiLineString":s.save(),s.rect(r.margin*o,0,n[0]*o,e.height),s.clip(),A.drawGeometry(new en([[h-d,f],[h+d,f]])),s.restore();break;case Dn:case"Polygon":case"MultiPolygon":A.drawGeometry(new Dn([[[h-d,f-g],[h+d,f-g],[h+d,f+g],[h-d,f+g],[h-d,f-g]]]));break}return s.restore(),e};var SA=function(r){r=r||{};var e=document.createElement("div");if(r.target)e.className=r.className||"ol-legend";else{e.className=(r.className||"ol-legend")+" ol-unselectable ol-control"+(r.collapsible===!1?" ol-uncollapsible":" ol-collapsed");var t=document.createElement("button");t.setAttribute("type","button"),t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t),t=document.createElement("button"),t.setAttribute("type","button"),t.className="ol-closebox",t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t)}qi.call(this,{element:e,target:r.target}),this._legend=r.legend,this._legend.getCanvas().className="ol-legendImg",e.appendChild(this._legend.getCanvas()),e.appendChild(this._legend.getListElement()),r.collapsible!==!1&&r.collapsed===!1&&this.show(),this._legend.on("select",function(n){this.dispatchEvent(n)}.bind(this)),this._legend.on("refresh",function(){if(this._onCanvas&&this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this))};kr(SA,qi);SA.prototype.getLegend=function(){return this._legend};SA.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};SA.prototype.onCanvas=function(){return!!this._onCanvas};SA.prototype._draw=function(r){if(this._onCanvas&&!this.element.classList.contains("ol-collapsed")){var e=this._legend.getCanvas(),t=this.getContext(r),n=t.canvas.height-e.height;t.save(),t.rect(0,n,e.width,e.height);var i="#fff";this._legend.getTextStyle().getBackgroundFill()&&(i=du(this._legend.getTextStyle().getBackgroundFill().getColor())),t.fillStyle=t.strokeStyle=i,t.lineWidth=10,t.lineJoin="round",t.stroke(),t.clearRect(0,n,e.width,e.height),t.fill(),t.drawImage(e,0,n),t.restore()}};SA.prototype.show=function(){if(this.element.classList.contains("ol-collapsed")&&(this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:!1}),this.getMap()))try{this.getMap().renderSync()}catch{}};SA.prototype.hide=function(){if(!this.element.classList.contains("ol-collapsed")&&(this.element.classList.add("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:!0}),this.getMap()))try{this.getMap().renderSync()}catch{}};SA.prototype.collapse=function(r){r===!1?this.show():this.hide()};SA.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};SA.prototype.toggle=function(){if(this.element.classList.toggle("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:this.element.classList.contains("ol-collapsed")}),this.getMap())try{this.getMap().renderSync()}catch{}};var Ch=function(r){r||(r={});var e=yt.create("DIV",{className:r.className||"ol-print"});r.target||(e.classList.add("ol-unselectable","ol-control"),yt.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e})),Nr.call(this,{element:e,target:r.target}),this.set("immediate",r.immediate),this.set("imageType",r.imageType||"image/jpeg"),this.set("quality",r.quality||.8),this.set("orientation",r.orientation)};kr(Ch,Nr);Ch.prototype.toClipboard=function(r,e){try{r.canvas.toBlob(function(t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},t.type,{value:t,enumerable:!0}))]),typeof e=="function"&&e(!0)}catch{typeof e=="function"&&e(!1)}})}catch{typeof e=="function"&&e(!1)}};Ch.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};Ch.prototype._getCanvas=function(r,e,t){var n;if(r.context)t=r.context.canvas;else{if(t)n=t.getContext("2d");else{t=document.createElement("canvas");var i=this.getMap().getSize();t.width=i[0],t.height=i[1],n=t.getContext("2d"),/jp.*g$/.test(e)&&(n.fillStyle=this.get("bgColor")||"white",n.fillRect(0,0,t.width,t.height))}this.getMap().getViewport().querySelectorAll(".ol-layers canvas, canvas.ol-fixedoverlay").forEach(function(a){if(a.width){if(n.save(),a.parentNode.style.opacity==="0")return;n.globalAlpha=parseFloat(a.parentNode.style.opacity)||1,yt.getStyle(a.parentNode,"mix-blend-mode")==="multiply"&&(n.globalCompositeOperation="multiply");var o=yt.getStyle(a,"transform")||yt.getStyle(a,"-webkit-transform");/^matrix/.test(o)?(o=o.replace(/^matrix\(|\)$/g,"").split(","),o.forEach(function(s,A){o[A]=parseFloat(s)}),n.transform(o[0],o[1],o[2],o[3],o[4],o[5]),n.drawImage(a,0,0)):n.drawImage(a,0,0,yt.getStyle(a,"width"),yt.getStyle(a,"height")),n.restore()}}.bind(this))}return t};Ch.prototype.fastPrint=function(r,e){r=r||{},this._ol6?requestAnimationFrame(function(){e(this._getCanvas({},r.imageType,r.canvas))}.bind(this)):(this.getMap().once("postcompose",function(t){t.context||(this._ol6=!0),e(this._getCanvas(t,r.imageType,r.canvas))}.bind(this)),this.getMap().render())};Ch.prototype.print=function(r){r=r||{};var e=r.imageType||this.get("imageType"),t=r.quality||this.get("quality");if(this.getMap()){if(r.immediate!=="silent"&&this.dispatchEvent(Object.assign({type:"printing"},r)),!r.immediate){setTimeout(function(){r=Object.assign({},r),r.immediate="silent",this.print(r)}.bind(this),200);return}this.getMap().once(this.get("immediate")?"postcompose":"rendercomplete",function(n){var i=this._getCanvas(n,e),a=r.size||[210,297],o=r.format||"a4",s,A,l,u=r.orient||this.get("orientation"),c=typeof r.margin=="number"?r.margin:10;if(i){u!=="landscape"&&u!=="portrait"&&(u=i.width>i.height?"landscape":"portrait"),u==="landscape"&&(a=[a[1],a[0]]);var h=Math.min((a[0]-2*c)/i.width,(a[1]-2*c)/i.height);s=h*i.width,A=h*i.height,l=[(a[0]-s)/2,(a[1]-A)/2]}var f;try{f=i?i.toDataURL(e,t):null}catch{this.dispatchEvent({type:"error",canvas:i});return}var d=Object.assign({type:"print",print:{format:o,orientation:u,unit:"mm",size:a,position:l,imageWidth:s,imageHeight:A},image:f,imageType:e,quality:t,canvas:i},r);this.dispatchEvent(d)}.bind(this)),this.getMap().render()}};var Bh=function(r){r||(r={});var e=yt.create("DIV",{className:(r.className||"")+" ol-control-title ol-unselectable",style:{display:"block",visibility:"hidden"}});qi.call(this,{element:e,style:r.style}),this.setTitle(r.title||""),this.setVisible(r.visible),this.element.style.font=this.getTextFont()};kr(Bh,qi);Bh.prototype.setStyle=function(r){qi.prototype.setStyle.call(this,r),this.element&&(this.element.style.font=this.getTextFont()),this.getMap()&&this.getMap().render()};Bh.prototype.setTitle=function(r){if(this.element.textContent=r,this.set("title",r),this.getMap())try{this.getMap().renderSync()}catch{}};Bh.prototype.getTitle=function(){return this.get("title")};Bh.prototype.setVisible=function(r){if(this.element.style.display=r?"block":"none",this.getMap())try{this.getMap().renderSync()}catch{}};Bh.prototype.getVisible=function(){return this.element.style.display!=="none"};Bh.prototype._draw=function(r){if(this.getVisible()){var e=this.getContext(r);if(e){var t=r.frameState.pixelRatio;e.save(),e.scale(t,t);var n=this.element.getBoundingClientRect(),i=this.getMap().getViewport().getBoundingClientRect(),a=this.getMap().getSize()[0]/i.width;e.translate(Math.round((n.left-i.left)*a),Math.round((n.top-i.top)*a));var o=this.element.clientHeight,s=this.element.clientWidth,A=s/2;e.beginPath(),e.fillStyle=du(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=du(this.getTextFill().getColor()),e.strokeStyle=du(this.getTextStroke().getColor()),e.lineWidth=this.getTextStroke().getWidth(),e.textAlign="center",e.textBaseline="middle",e.font=this.getTextFont(),e.lineWidth&&e.strokeText(this.getTitle(),A,o/2),e.fillText(this.getTitle(),A,o/2),e.closePath(),e.restore()}}};var uI=function(r,e){var t=r.getView(),n=t.getProjection(),i=t.getCenter(),a=r.getPixelFromCoordinate(i);a[1]+=1;var o=r.getCoordinateFromPixel(a),s=zw(uh(i,n,"EPSG:4326"),uh(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},Aut=function(r,e,t){if(r&&e){var n=e;if(typeof e=="string"&&(n=e.split("/")[1],n||(n=e),n=n.replace(/[^\d]/g,""),n=parseInt(n)),!n)return;var i=r.getView(),a=i.getProjection(),o=i.getCenter(),s=r.getPixelFromCoordinate(o);s[1]+=1;var A=r.getCoordinateFromPixel(s),l=zw(uh(o,a,"EPSG:4326"),uh(A,a,"EPSG:4326"));return l*=(t||96)/.0254,i.setResolution(i.getResolution()*n/l),n}},Eu=function(r){r||(r={});var e=document.createElement("div");e.className="ol-control ol-compassctrl ol-unselectable ol-hidden"+(r.className?" "+r.className:""),e.style.position="absolute",e.style.visibility="hidden";var t=r.style instanceof zi?new Ea({stroke:r.style}):r.style;r.style||(t=new Ea({stroke:new zi({width:0})})),qi.call(this,{element:e,style:t}),this.set("rotateVithView",r.rotateWithView!==!1),this.setVisible(r.visible!==!1),this.setImage(r.image||r.src)};kr(Eu,qi);Eu.prototype.setImage=function(r){if(r instanceof Image)this.img_=r,this.img_.onload=function(){if(this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this);else if(typeof r=="string")switch(r){case"compact":{this.img_=this.compactCompass_(this.element.clientWidth,this.getStroke().getColor());break}case"default":{this.img_=this.defaultCompass_(this.element.clientWidth,this.getStroke().getColor());break}default:{this.img_=new Image,this.img_.onload=function(){if(this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this),this.img_.src=r;break}}else this.img_=this.defaultCompass_(this.element.clientWidth,this.getStroke().getColor())};Eu.prototype.compactCompass_=function(r,e){var t=document.createElement("canvas"),n=t.getContext("2d");r=t.width=t.height=r||150;var i=r/2;return n.translate(i,i),n.fillStyle=e||"#963",n.lineWidth=5,n.lineJoin=n.lineCap="round",n.font="bold "+i*.4+"px sans-serif",n.textBaseline="bottom",n.textAlign="center",n.strokeStyle="#fff",n.globalAlpha=.75,n.strokeText("N",0,-i/2),n.globalAlpha=1,n.fillText("N",0,-i/2),n.beginPath(),n.moveTo(0,i/4),n.lineTo(i/3,i/2),n.lineTo(0,-i/2),n.lineTo(-i/3,i/2),n.lineTo(0,i/4),n.lineWidth=12,n.fillStyle="#fff",n.globalAlpha=.75,n.fill(),n.stroke(),n.globalAlpha=1,n.fillStyle=n.strokeStyle=e||"#963",n.lineWidth=5,n.beginPath(),n.moveTo(0,i/4),n.lineTo(0,-i/2),n.lineTo(i/3,i/2),n.lineTo(0,i/4),n.fill(),n.stroke(),n.beginPath(),n.moveTo(0,i/4),n.lineTo(0,-i/2),n.lineTo(-i/3,i/2),n.lineTo(0,i/4),n.stroke(),t};Eu.prototype.defaultCompass_=function(r,e){var t=document.createElement("canvas"),n=t.getContext("2d");r=t.width=t.height=r||150;var i=r/2,a=.22*i;function o(A,l){n.fillStyle=e||"#963",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,-l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(l,-l),n.moveTo(0,0),n.fill(),n.stroke()}function s(A,l){n.globalCompositeOperation="destination-out",n.fillStyle="#fff",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,-l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(-l,-l),n.moveTo(0,0),n.fill(),n.globalCompositeOperation="source-over",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,-l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(-l,-l),n.moveTo(0,0),n.stroke()}return n.translate(i,i),n.strokeStyle=e||"#963",n.lineWidth=1.5,n.beginPath(),n.arc(0,0,r*.41,0,2*Math.PI),n.arc(0,0,r*.44,0,2*Math.PI),n.stroke(),n.rotate(Math.PI/4),o(i*.9,a*.8),s(i*.9,a*.8),n.rotate(-Math.PI/4),o(i,a),s(i,a),t};Eu.prototype.getVisible=function(){return yt.getStyle(this.element,"display")==="block"};Eu.prototype.setVisible=function(r){r?this.element.classList.add("ol-visible"):this.element.classList.remove("ol-visible"),this.getMap()&&this.getMap().render()};Eu.prototype._draw=function(r){var e=this.getContext(r);if(!(!e||!this.getVisible())){var t=e.canvas,n,i=[];for(n=0;n<8;n++)i[n]=[Math.cos(Math.PI*n/8),Math.sin(Math.PI*n/8)];var a=r.frameState.pixelRatio;e.save(),e.scale(a,a);var o=this.element.clientWidth,s=this.element.clientHeight,A={left:this.element.offsetLeft,top:this.element.offsetTop},l=this.img_,u=r.frameState.viewState.rotation;if(e.beginPath(),e.translate(A.left+o/2,A.top+s/2),this.get("rotateVithView")&&e.rotate(u),this.getStroke().getWidth()){e.beginPath(),e.strokeStyle=this.getStroke().getColor(),e.lineWidth=this.getStroke().getWidth();var c=Math.max(t.width,t.height);for(n=0;n<8;n++)e.moveTo(-i[n][0]*c,-i[n][1]*c),e.lineTo(i[n][0]*c,i[n][1]*c);e.stroke()}l.width&&e.drawImage(l,-o/2,-s/2,o,s),e.closePath(),e.restore()}};var Qn=function(r){r||(r={}),this._lang=r.lang||"en";var e=yt.create("DIV",{className:(r.className||"ol-print")+" ol-unselectable ol-control"});yt.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e}),Nr.call(this,{element:e}),r.openWindow&&this.on("print",function(S){S.canvas&&window.open().document.write('')}),r.target=yt.create("DIV");var t=this._printCtrl=new Ch(r);t.on(["print","error","printing"],function(S){i.setAttribute("data-status",S.type),S.clipboard||this.dispatchEvent(S)}.bind(this)),this._compass=new Eu({src:r.northImage||"compact",visible:!1,className:"olext-print-compass",style:new zi({color:"#333",width:0})});var n=this._printDialog=new Za({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),i=n.getContentElement();this._input={};var a=yt.create("DIV",{className:"ol-print-param",parent:i});this._pages=[yt.create("DIV",{className:"ol-page"})];var o=yt.create("DIV",{className:"ol-map",parent:this._pages[0]});yt.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:i}),yt.create("H2",{html:this.i18n("title"),parent:a});var s=yt.create("UL",{parent:a}),A=yt.create("LI",{className:"ol-orientation",parent:s});this._input.orientation={list:A};var l=yt.create("LABEL",{className:"portrait",parent:A});this._input.orientation.portrait=yt.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),yt.create("SPAN",{html:this.i18n("portrait"),parent:l}),l=yt.create("LABEL",{className:"landscape",parent:A}),this._input.orientation.landscape=yt.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),yt.create("SPAN",{html:this.i18n("landscape"),parent:l});var u;A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:s});var c=this._input.size=yt.create("SELECT",{on:{change:function(){this.setSize(c.value||L)}.bind(this)},parent:A});for(u in this.paperSize)yt.create("OPTION",{html:u+(this.paperSize[u]?" - "+this.paperSize[u][0]+"x"+this.paperSize[u][1]+" mm":this.i18n("custom")),value:u,parent:c});A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:s});var h=this._input.margin=yt.create("SELECT",{on:{change:function(){this.setMargin(h.value)}.bind(this)},parent:A});for(u in this.marginSize)yt.create("OPTION",{html:this.i18n(u)+" - "+this.marginSize[u]+" mm",value:this.marginSize[u],parent:h});A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:s});var f=this._input.scale=yt.create("SELECT",{on:{change:function(){this.setScale(parseInt(f.value))}.bind(this)},parent:A});Object.keys(this.scales).forEach(function(S){yt.create("OPTION",{html:this.scales[S],value:S,parent:f})}.bind(this)),A=yt.create("LI",{className:"ol-legend",parent:s});var d=yt.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){x.legend.control.setCanvas(d.checked)}.bind(this)},parent:A});A=yt.create("LI",{className:"ol-print-north",parent:s});var g=this._input.north=yt.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){g.checked?this._compass.element.classList.add("ol-print-compass"):this._compass.element.classList.remove("ol-print-compass"),this.getMap().render()}.bind(this)},parent:A});A=yt.create("LI",{className:"ol-print-title",parent:s});var m=yt.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(S){x.title.control.setVisible(S.target.checked)}.bind(this)},parent:A}),v=yt.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(S){S.keyCode===13&&S.preventDefault()},keyup:function(){x.title.control.setTitle(v.value)},change:function(){x.title.control.setTitle(v.value)}.bind(this)},parent:A}),y=yt.create("DIV",{className:"ol-user-param",parent:a});A=yt.create("LI",{className:"ol-saveas",parent:s});var w=yt.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),C=yt.create("SELECT",{on:{change:function(){if(this.formats[C.value].clipboard)t.copyMap(this.formats[C.value],function(U){U&&(w.classList.add("visible"),setTimeout(function(){w.classList.remove("visible")},1e3))});else{var S=typeof this.getSize()=="string"?this.getSize():null,P=Object.assign({format:S,size:S?this.paperSize[S]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[C.value]);t.print(P)}C.value=""}.bind(this)},parent:A});yt.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:C}),this.formats.forEach(function(S,P){if(S.pdf){if(r.pdf===!1)return}else if(S.clipboard){if(r.copy===!1)return}else if(r.save===!1)return;yt.create("OPTION",{html:this.i18n(S.title),value:P,parent:C})}.bind(this)),A=yt.create("LI",{className:"ol-savelegend",parent:s});var O=yt.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),F=yt.create("SELECT",{on:{change:function(){var S=x.legend.control.getLegend().getCanvas(),P=document.createElement("CANVAS");P.width=S.width,P.height=S.height;var U=P.getContext("2d");if(U.fillStyle="#fff",U.fillRect(0,0,P.width,P.height),U.drawImage(S,0,0),this.formats[F.value].clipboard)P.toBlob(function(Tt){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},Tt.type,{value:Tt,enumerable:!0}))]),O.classList.add("visible"),setTimeout(function(){O.classList.remove("visible")},1e3)}catch{}},"image/png");else{var tt;try{tt=P.toDataURL(this.formats[F.value].imageType,this.formats[F.value].quality);var q=typeof this.getSize()=="string"?this.getSize():"A4",rt=P.width/96*25.4,nt=P.height/96*25.4,At=this.paperSize[q];this.getOrientation()==="landscape"&&(At=[At[1],At[0]]);var ct=[(At[0]-rt)/2,(At[1]-nt)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:q,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[q],position:ct,imageWidth:rt,imageHeight:nt},image:tt,imageType:this.formats[F.value].imageType,pdf:this.formats[F.value].pdf,quality:this.formats[F.value].quality,canvas:P})}catch{}}F.value=""}.bind(this)},parent:A});yt.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:F}),this.formats.forEach(function(S,P){yt.create("OPTION",{html:this.i18n(S.title),value:P,parent:F})}.bind(this));var I=yt.create("DIV",{className:"ol-ext-buttons",parent:a});yt.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(S){S.preventDefault(),window.print()},parent:I}),yt.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){n.hide()},parent:I}),yt.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:a});var T,L,N,x={};n.on("show",function(){this.dispatchEvent({type:"show",userElement:y,dialog:this._printDialog,page:this.getPage()});var S=this.getMap();S&&(document.body.classList.add("ol-print-document"),T=S.getTargetElement(),L=S.getSize(),typeof this.getSize()=="string"?this.setSize(this.getSize()):this.setSize(L),S.setTarget(o),N&&ys(N),N=S.on("moveend",function(){this.setScale(uI(S))}.bind(this)),this.setScale(uI(S)),x={},this.getMap().getControls().forEach(function(P){P instanceof SA&&(x.legend={control:P}),P instanceof Bh&&(x.title={control:P}),P instanceof Eu&&(x.compass?P.element.classList.remove("ol-print-compass"):(this._input.north.checked?P.element.classList.add("ol-print-compass"):P.element.classList.remove("ol-print-compass"),this._compass=P,x.compass={control:P}))}.bind(this)),x.title?(m.checked=x.title.isVisible=x.title.control.getVisible(),v.value=x.title.control.getTitle(),m.parentNode.parentNode.classList.remove("hidden")):m.parentNode.parentNode.classList.add("hidden"),x.legend?(x.legend.ison=x.legend.control.onCanvas(),x.legend.collapsed=x.legend.control.isCollapsed(),x.legend.control.collapse(!1),F.parentNode.classList.remove("hidden"),d.parentNode.parentNode.classList.remove("hidden"),d.checked=!x.legend.collapsed,x.legend.control.setCanvas(!x.legend.collapsed)):(F.parentNode.classList.add("hidden"),d.parentNode.parentNode.classList.add("hidden")))}.bind(this)),n.on("hide",function(){document.body.classList.remove("ol-print-document"),T&&(this.getMap().setTarget(T),T=null,N&&ys(N),x.title&&x.title.control.setVisible(x.title.isVisible),x.legend&&(x.legend.control.setCanvas(x.legend.ison),x.legend.control.collapse(x.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),r.saveAs&&this.on("print",function(S){S.pdf||S.canvas.toBlob(function(P){var U=(S.print.legend?"legend.":"map.")+S.imageType.replace("image/","");r.saveAs(P,U)},S.imageType,S.quality)}),r.jsPDF&&this.on("print",function(S){if(S.pdf){var P=new r.jsPDF({orientation:S.print.orientation,unit:S.print.unit,format:S.print.size});P.addImage(S.image,"JPEG",S.print.position[0],S.print.position[0],S.print.imageWidth,S.print.imageHeight),P.save(S.print.legend?"legend.pdf":"map.pdf")}})};kr(Qn,Nr);Qn.prototype.isOpen=function(){return this._printDialog.isOpen()};Qn.addLang=function(r,e){Qn.prototype._labels[r]=e};Qn.prototype.i18n=function(r){var e=this._labels.en[r]||"bad param";return this._labels[this._lang]&&this._labels[this._lang][r]&&(e=this._labels[this._lang][r]),e};Qn.prototype._labels={en:{title:"Print",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",size:"Page size",custom:"screen size",margin:"Margin",scale:"Scale",legend:"Legend",north:"North arrow",mapTitle:"Map title",saveas:"Save as...",saveLegend:"Save legend...",copied:"✔ Copied to clipboard",errorMsg:"Can't save map canvas...",printBt:"Print...",clipboardFormat:"copy to clipboard...",jpegFormat:"save as jpeg",pngFormat:"save as png",pdfFormat:"save as pdf",none:"none",small:"small",large:"large",cancel:"cancel"},fr:{title:"Imprimer",orientation:"Orientation",portrait:"Portrait",landscape:"Paysage",size:"Taille du papier",custom:"taille écran",margin:"Marges",scale:"Echelle",legend:"Légende",north:"Flèche du nord",mapTitle:"Titre de la carte",saveas:"Enregistrer sous...",saveLegend:"Enregistrer la légende...",copied:"✔ Carte copiée",errorMsg:"Impossible d'enregistrer la carte",printBt:"Imprimer",clipboardFormat:"copier dans le presse-papier...",jpegFormat:"enregistrer un jpeg",pngFormat:"enregistrer un png",pdfFormat:"enregistrer un pdf",none:"aucune",small:"petites",large:"larges",cancel:"annuler"},de:{title:"Drucken",orientation:"Ausrichtung",portrait:"Hochformat",landscape:"Querformat",size:"Papierformat",custom:"Bildschirmgröße",margin:"Rand",scale:"Maßstab",legend:"Legende",north:"Nordpfeil",mapTitle:"Kartentitel",saveas:"Speichern als...",saveLegend:"Legende speichern...",copied:"✔ In die Zwischenablage kopiert",errorMsg:"Kann Karte nicht speichern...",printBt:"Drucken...",clipboardFormat:"in die Zwischenablage kopieren...",jpegFormat:"speichern als jpeg",pngFormat:"speichern als png",pdfFormat:"speichern als pdf",none:"kein",small:"klein",large:"groß",cancel:"abbrechen"},zh:{title:"打印",orientation:"方向",portrait:"纵向",landscape:"横向",size:"页面大小",custom:"屏幕大小",margin:"外边距",scale:"尺度",legend:"图例",north:"指北针",mapTitle:"地图名字",saveas:"保存为...",saveLegend:"保存图例为...",copied:"✔ 已复制到剪贴板",errorMsg:"无法保存地图...",printBt:"打印...",cancel:"取消"}};Qn.prototype.paperSize={"":null,A0:[841,1189],A1:[594,841],A2:[420,594],A3:[297,420],A4:[210,297],"US Letter":[215.9,279.4],A5:[148,210],B4:[257,364],B5:[182,257]};Qn.prototype.marginSize={none:0,small:5,large:10};Qn.prototype.formats=[{title:"clipboardFormat",imageType:"image/png",clipboard:!0},{title:"jpegFormat",imageType:"image/jpeg",quality:.8},{title:"pngFormat",imageType:"image/png",quality:.8},{title:"pdfFormat",imageType:"image/jpeg",pdf:!0}];Qn.prototype.scales={" 5000":"1/5.000"," 10000":"1/10.000"," 25000":"1/25.000"," 50000":"1/50.000"," 100000":"1/100.000"," 250000":"1/250.000"," 1000000":"1/1.000.000"};Qn.prototype.getOrientation=function(){return this._orientation||"portrait"};Qn.prototype.setOrientation=function(r){this._orientation=r==="landscape"?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()};Qn.prototype.getMargin=function(){return this._margin||0};Qn.prototype.setMargin=function(r){this._margin=r,this._input.margin.value=r,this.setSize()};Qn.prototype.getSize=function(){return this._size};Qn.prototype.setSize=function(r){if(this._printDialog.getContentElement().setAttribute("data-status",""),r?this._size=r:r=this._size,!!r){if(typeof r=="string"){for(var e in this.paperSize)e&&new RegExp(e,"i").test(r)&&(r=e);this.paperSize[r]||(r=this._size="A4"),this._input.size.value=r,r=[Math.trunc(this.paperSize[r][0]*96/25.4),Math.trunc(this.paperSize[r][1]*96/25.4)],this.getOrientation()==="landscape"&&(r=[r[1],r[0]]),this.getPage().classList.remove("margin")}else this._input.size.value="",this.getPage().classList.add("margin");var t=this.getPage(),n=t.parentNode.getBoundingClientRect(),i=(n.width-40)/r[0],a=(n.height-40)/r[1],o=Math.min(i,a,1);t.style.width=r[0]+"px",t.style.height=r[1]+"px",t.style["-webkit-transform"]=t.style.transform="translate(-50%,-50%) scale("+o+")";var s=Math.round(5/o);t.style["-webkit-box-shadow"]=t.style["box-shadow"]=s+"px "+s+"px "+s+"px rgba(0,0,0,.6)",t.style.padding=this.getMargin()*96/25.4+"px",this.getMap()&&this.getMap().updateSize(),this.dispatchEvent({type:"dialog:refresh"})}};Qn.prototype.getContentElement=function(){return this._printDialog.getContentElement()};Qn.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")};Qn.prototype.getPage=function(){return this._pages[0]};Qn.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),Nr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))};Qn.prototype.setScale=function(r){Aut(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};Qn.prototype.getScale=function(){return uI(this.getMap())};Qn.prototype.print=function(r){r=r||{},r.size&&this.setSize(r.size),r.scale&&this.setScale(r.scale),r.orientation&&this.setOrientation(r.orientation),r.margin&&this.setMargin(r.margin),this._printDialog.show()};Qn.prototype.getrintControl=function(){return this._printCtrl};var lR={exports:{}};(function(r,e){(function(t,n){n()})(nl,function(){function t(l,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function n(l,u,c){var h=new XMLHttpRequest;h.open("GET",l),h.responseType="blob",h.onload=function(){A(h.response,u,c)},h.onerror=function(){console.error("could not download file")},h.send()}function i(l){var u=new XMLHttpRequest;u.open("HEAD",l,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(u)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof nl=="object"&&nl.global===nl?nl:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,u,c){var h=o.URL||o.webkitURL,f=document.createElement("a");u=u||l.name||"download",f.download=u,f.rel="noopener",typeof l=="string"?(f.href=l,f.origin===location.origin?a(f):i(f.href)?n(l,u,c):a(f,f.target="_blank")):(f.href=h.createObjectURL(l),setTimeout(function(){h.revokeObjectURL(f.href)},4e4),setTimeout(function(){a(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,u,c){if(u=u||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(t(l,c),u);else if(i(l))n(l,u,c);else{var h=document.createElement("a");h.href=l,h.target="_blank",setTimeout(function(){a(h)})}}:function(l,u,c,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof l=="string")return n(l,u,c);var f=l.type==="application/octet-stream",d=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||f&&d||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var w=m.result;w=g?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=w:location=w,h=null},m.readAsDataURL(l)}else{var v=o.URL||o.webkitURL,y=v.createObjectURL(l);h?h.location=y:location.href=y,h=null,setTimeout(function(){v.revokeObjectURL(y)},4e4)}});o.saveAs=A.saveAs=A,r.exports=A})})(lR);function mn(r){return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(r)}var po=Uint8Array,go=Uint16Array,qy=Uint32Array,tB=new po([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),eB=new po([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),cI=new po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hG=function(r,e){for(var t=new go(31),n=0;n<31;++n)t[n]=e+=1<>>1|(Nn&21845)<<1;gc=(gc&52428)>>>2|(gc&13107)<<2,gc=(gc&61680)>>>4|(gc&3855)<<4,fI[Nn]=((gc&65280)>>>8|(gc&255)<<8)>>>1}var hl=function(r,e,t){for(var n=r.length,i=0,a=new go(e);i>>A]=l}else for(s=new go(n),i=0;i>>15-r[i];return s},dh=new po(288);for(var Nn=0;Nn<144;++Nn)dh[Nn]=8;for(var Nn=144;Nn<256;++Nn)dh[Nn]=9;for(var Nn=256;Nn<280;++Nn)dh[Nn]=7;for(var Nn=280;Nn<288;++Nn)dh[Nn]=8;var Zy=new po(32);for(var Nn=0;Nn<32;++Nn)Zy[Nn]=5;var uut=hl(dh,9,0),cut=hl(dh,9,1),hut=hl(Zy,5,0),fut=hl(Zy,5,1),oT=function(r){for(var e=r[0],t=1;te&&(e=r[t]);return e},aA=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},sT=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},uR=function(r){return(r/8>>0)+(r&7&&1)},gG=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof go?go:r instanceof qy?qy:po)(t-e);return n.set(r.subarray(e,t)),n},dut=function(r,e,t){var n=r.length,i=!e||t,a=!t||t.i;t||(t={}),e||(e=new po(n*3));var o=function(J){var ot=e.length;if(J>ot){var ut=new po(Math.max(ot*2,J));ut.set(e),e=ut}},s=t.f||0,A=t.p||0,l=t.b||0,u=t.l,c=t.d,h=t.m,f=t.n,d=n*8;do{if(!u){t.f=s=aA(r,A,1);var g=aA(r,A+1,3);if(A+=3,g)if(g==1)u=cut,c=fut,h=9,f=5;else if(g==2){var w=aA(r,A,31)+257,C=aA(r,A+10,15)+4,O=w+aA(r,A+5,31)+1;A+=14;for(var F=new po(O),I=new po(19),T=0;Td)break;for(var x=hl(I,L,1),T=0;T>>4;if(m<16)F[T++]=m;else{var P=0,U=0;for(m==16?(U=3+aA(r,A,3),A+=2,P=F[T-1]):m==17?(U=3+aA(r,A,7),A+=3):m==18&&(U=11+aA(r,A,127),A+=7);U--;)F[T++]=P}}var tt=F.subarray(0,w),q=F.subarray(w);h=oT(tt),f=oT(q),u=hl(tt,h,1),c=hl(q,f,1)}else throw"invalid block type";else{var m=uR(A)+4,v=r[m-4]|r[m-3]<<8,y=m+v;if(y>n){if(a)throw"unexpected EOF";break}i&&o(l+v),e.set(r.subarray(m,y),l),t.b=l+=v,t.p=A=y*8;continue}if(A>d)throw"unexpected EOF"}i&&o(l+131072);for(var rt=(1<>>4;if(A+=P&15,A>d)throw"unexpected EOF";if(!P)throw"invalid length/literal";if(ct<256)e[l++]=ct;else if(ct==256){u=null;break}else{var Tt=ct-254;if(ct>264){var T=ct-257,M=tB[T];Tt=aA(r,A,(1<>>4;if(!W)throw"invalid distance";A+=W&15;var q=lut[Y];if(Y>3){var M=eB[Y];q+=sT(r,A)&(1<d)throw"unexpected EOF";i&&o(l+131072);for(var H=l+Tt;l>0;r[n]|=t,r[n+1]|=t>>>8},hm=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8,r[n+2]|=t>>>16},AT=function(r,e){for(var t=[],n=0;nh&&(h=a[n].s);var f=new go(h+1),d=dI(t[u-1],f,0);if(d>e){var n=0,g=0,m=d-e,v=1<e)g+=v-(1<>>=m;g>0;){var w=a[n].s;f[w]=0&&g;--n){var C=a[n].s;f[C]==e&&(--f[C],++g)}d=e}return[new po(f),d]},dI=function(r,e,t){return r.s==-1?Math.max(dI(r.l,e,t+1),dI(r.r,e,t+1)):e[r.s]=t},I5=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new go(++e),n=0,i=r[0],a=1,o=function(A){t[n++]=A},s=1;s<=e;++s)if(r[s]==i&&s!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=r[s]}return[t.subarray(0,n),e]},fm=function(r,e){for(var t=0,n=0;n>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var a=0;a4&&!N[cI[S-1]];--S);var P=l+5<<3,U=fm(i,dh)+fm(a,Zy)+o,tt=fm(i,h)+fm(a,g)+o+14+3*S+fm(I,N)+(2*I[16]+3*I[17]+7*I[18]);if(P<=U&&P<=tt)return Aw(e,u,r.subarray(A,A+l));var q,rt,nt,At;if(Wl(e,u,1+(tt15&&(Wl(e,u,W[T]>>>5&127),u+=W[T]>>>12)}}else q=uut,rt=dh,nt=hut,At=Zy;for(var T=0;T255){var Y=n[T]>>>18&31;hm(e,u,q[Y+257]),u+=rt[Y+257],Y>7&&(Wl(e,u,n[T]>>>23&31),u+=tB[Y]);var H=n[T]&31;hm(e,u,nt[H]),u+=At[H],H>3&&(hm(e,u,n[T]>>>5&8191),u+=eB[H])}else hm(e,u,q[n[T]]),u+=rt[n[T]];return hm(e,u,q[256]),u+rt[256]},put=new qy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),gut=new po(0),vut=function(r,e,t,n,i,a){var o=r.length,s=new po(n+o+5*(1+Math.floor(o/7e3))+i),A=s.subarray(n,s.length-i),l=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var c=u+65535;c>>13,d=h&8191,g=(1<7e3||N>24576)&&q>423){l=L5(r,A,0,O,F,I,L,N,S,u-S,l),N=T=L=0,S=u;for(var rt=0;rt<286;++rt)F[rt]=0;for(var rt=0;rt<30;++rt)I[rt]=0}var nt=2,At=0,ct=d,Tt=U-tt&32767;if(q>2&&P==C(u-Tt))for(var M=Math.min(f,q)-1,W=Math.min(32767,u),Y=Math.min(258,q);Tt<=W&&--ct&&U!=tt;){if(r[u+nt]==r[u+nt-Tt]){for(var H=0;Hnt){if(nt=H,At=Tt,H>M)break;for(var J=Math.min(Tt,H-2),ot=0,rt=0;rtot&&(ot=It,tt=ut)}}}U=tt,tt=m[U],Tt+=U-tt+32768&32767}if(At){O[N++]=268435456|hI[nt]<<18|x5[At];var at=hI[nt]&31,j=x5[At]&31;L+=tB[at]+eB[j],++F[257+at],++I[j],x=u+nt,++T}else O[N++]=r[u],++F[r[u]]}}l=L5(r,A,a,O,F,I,L,N,S,u-S,l),a||(l=Aw(A,l,gut))}return gG(s,0,n+uR(l)+i)},mut=function(){var r=1,e=0;return{p:function(t){for(var n=r,i=e,a=t.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o>>8<<16|(e&255)<<8|e>>>8)+((r&255)<<23)*2}}},yut=function(r,e,t,n,i){return vut(r,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+e.mem,t,n,!i)},_ut=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},wut=function(r,e){var t=e.level,n=t==0?0:t<6?1:t==9?3:2;r[0]=120,r[1]=n<<6|(n?32-2*n:1)},Eut=function(r){if((r[0]&15)!=8||r[0]>>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(r[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function pI(r,e){e===void 0&&(e={});var t=mut();t.p(r);var n=yut(r,e,2,4);return wut(n,e),_ut(n,n.length-4,t.d()),n}function Cut(r,e){return dut((Eut(r),r.subarray(2,-4)),e)}/** @license * * jsPDF - PDF Document creation from JavaScript * Version 2.5.0 Built on 2021-12-21T09:44:51.866Z * CommitID 00000000 * * Copyright (c) 2010-2021 James Hall , https://github.com/MrRio/jsPDF * 2015-2021 yWorks GmbH, http://www.yworks.com * 2015-2021 Lukas Holländer , https://github.com/HackbrettXXX * 2016-2018 Aras Abbasi * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, https://github.com/willowsystems * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * 2014 Steven Spungin, https://github.com/Flamenco * 2014 Kenneth Glassey, https://github.com/Gavvers * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */var Xe=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function lT(){Xe.console&&typeof Xe.console.log=="function"&&Xe.console.log.apply(Xe.console,arguments)}var Bn={log:lT,warn:function(r){Xe.console&&(typeof Xe.console.warn=="function"?Xe.console.warn.apply(Xe.console,arguments):lT.call(null,arguments))},error:function(r){Xe.console&&(typeof Xe.console.error=="function"?Xe.console.error.apply(Xe.console,arguments):lT(r))}};function uT(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){gf(n.response,e,t)},n.onerror=function(){Bn.error("could not download file")},n.send()}function O5(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function e1(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var uy,gI,gf=Xe.saveAs||((typeof window>"u"?"undefined":mn(window))!=="object"||window!==Xe?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Xe.URL||Xe.webkitURL,i=document.createElement("a");e=e||r.name||"download",i.download=e,i.rel="noopener",typeof r=="string"?(i.href=r,i.origin!==location.origin?O5(i.href)?uT(r,e,t):e1(i,i.target="_blank"):e1(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){e1(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(O5(r))uT(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){e1(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:mn(a)!=="object"&&(Bn.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob([String.fromCharCode(65279),i],{type:i.type}):i}(r,t),e)}:function(r,e,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return uT(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Xe.HTMLElement)||Xe.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":mn(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var u=s.result;u=o?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=u:location=u,n=null},s.readAsDataURL(r)}else{var A=Xe.URL||Xe.webkitURL,l=A.createObjectURL(r);n?n.location=l:location.href=l,n=null,setTimeout(function(){A.revokeObjectURL(l)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function vG(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],n=0;n255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),A=this.g.toString(16),l=this.b.toString(16);return s.length==1&&(s="0"+s),A.length==1&&(A="0"+A),l.length==1&&(l="0"+l),"#"+s+A+l}}/** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */function cT(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=Ua(t,n,i,a,e[0],7,-680876936),a=Ua(a,t,n,i,e[1],12,-389564586),i=Ua(i,a,t,n,e[2],17,606105819),n=Ua(n,i,a,t,e[3],22,-1044525330),t=Ua(t,n,i,a,e[4],7,-176418897),a=Ua(a,t,n,i,e[5],12,1200080426),i=Ua(i,a,t,n,e[6],17,-1473231341),n=Ua(n,i,a,t,e[7],22,-45705983),t=Ua(t,n,i,a,e[8],7,1770035416),a=Ua(a,t,n,i,e[9],12,-1958414417),i=Ua(i,a,t,n,e[10],17,-42063),n=Ua(n,i,a,t,e[11],22,-1990404162),t=Ua(t,n,i,a,e[12],7,1804603682),a=Ua(a,t,n,i,e[13],12,-40341101),i=Ua(i,a,t,n,e[14],17,-1502002290),t=Da(t,n=Ua(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=Da(a,t,n,i,e[6],9,-1069501632),i=Da(i,a,t,n,e[11],14,643717713),n=Da(n,i,a,t,e[0],20,-373897302),t=Da(t,n,i,a,e[5],5,-701558691),a=Da(a,t,n,i,e[10],9,38016083),i=Da(i,a,t,n,e[15],14,-660478335),n=Da(n,i,a,t,e[4],20,-405537848),t=Da(t,n,i,a,e[9],5,568446438),a=Da(a,t,n,i,e[14],9,-1019803690),i=Da(i,a,t,n,e[3],14,-187363961),n=Da(n,i,a,t,e[8],20,1163531501),t=Da(t,n,i,a,e[13],5,-1444681467),a=Da(a,t,n,i,e[2],9,-51403784),i=Da(i,a,t,n,e[7],14,1735328473),t=Qa(t,n=Da(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=Qa(a,t,n,i,e[8],11,-2022574463),i=Qa(i,a,t,n,e[11],16,1839030562),n=Qa(n,i,a,t,e[14],23,-35309556),t=Qa(t,n,i,a,e[1],4,-1530992060),a=Qa(a,t,n,i,e[4],11,1272893353),i=Qa(i,a,t,n,e[7],16,-155497632),n=Qa(n,i,a,t,e[10],23,-1094730640),t=Qa(t,n,i,a,e[13],4,681279174),a=Qa(a,t,n,i,e[0],11,-358537222),i=Qa(i,a,t,n,e[3],16,-722521979),n=Qa(n,i,a,t,e[6],23,76029189),t=Qa(t,n,i,a,e[9],4,-640364487),a=Qa(a,t,n,i,e[12],11,-421815835),i=Qa(i,a,t,n,e[15],16,530742520),t=ka(t,n=Qa(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ka(a,t,n,i,e[7],10,1126891415),i=ka(i,a,t,n,e[14],15,-1416354905),n=ka(n,i,a,t,e[5],21,-57434055),t=ka(t,n,i,a,e[12],6,1700485571),a=ka(a,t,n,i,e[3],10,-1894986606),i=ka(i,a,t,n,e[10],15,-1051523),n=ka(n,i,a,t,e[1],21,-2054922799),t=ka(t,n,i,a,e[8],6,1873313359),a=ka(a,t,n,i,e[15],10,-30611744),i=ka(i,a,t,n,e[6],15,-1560198380),n=ka(n,i,a,t,e[13],21,1309151649),t=ka(t,n,i,a,e[4],6,-145523070),a=ka(a,t,n,i,e[11],10,-1120210379),i=ka(i,a,t,n,e[2],15,718787259),n=ka(n,i,a,t,e[9],21,-343485551),r[0]=Qc(t,r[0]),r[1]=Qc(n,r[1]),r[2]=Qc(i,r[2]),r[3]=Qc(a,r[3])}function rB(r,e,t,n,i,a){return e=Qc(Qc(e,r),Qc(n,a)),Qc(e<>>32-i,t)}function Ua(r,e,t,n,i,a,o){return rB(e&t|~e&n,r,e,i,a,o)}function Da(r,e,t,n,i,a,o){return rB(e&n|t&~n,r,e,i,a,o)}function Qa(r,e,t,n,i,a,o){return rB(e^t^n,r,e,i,a,o)}function ka(r,e,t,n,i,a,o){return rB(t^(e|~n),r,e,i,a,o)}function mG(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)cT(n,But(r.substring(e-64,e)));r=r.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=r.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(cT(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,cT(n,i),n}function But(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}uy=Xe.atob.bind(Xe),gI=Xe.btoa.bind(Xe);var F5="0123456789abcdef".split("");function but(r){for(var e="",t=0;t<4;t++)e+=F5[r>>8*t+4&15]+F5[r>>8*t&15];return e}function Tut(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function vI(r){return mG(r).map(Tut).join("")}var Sut=function(r){for(var e=0;e>16)+(e>>16)+(t>>16)<<16|65535&t}return r+e&4294967295}/** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function mI(r,e){var t,n,i,a;if(r!==t){for(var o=(i=r,a=1+(256/r.length>>0),new Array(a+1).join(i)),s=[],A=0;A<256;A++)s[A]=A;var l=0;for(A=0;A<256;A++){var u=s[A];l=(l+u+o.charCodeAt(A))%256,s[A]=s[l],s[l]=u}t=r,n=s}else s=n;var c=e.length,h=0,f=0,d="";for(A=0;A€/\f©þdSiz";var a=(e+this.padding).substr(0,32),o=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=vI(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=mI(this.encryptionKey,this.padding)}function Gp(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,n=0;n126?e+="#"+("0"+i.toString(16)).slice(-2):e+=r[n]}return e}function M5(r){if(mn(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,i){if(i=i||!1,typeof t!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[n,!!i],a},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in e[t]){var o=e[t][a];try{o[0].apply(r,n)}catch(s){Xe.console&&Bn.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function vE(r){if(!(this instanceof vE))return new vE(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function yG(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function wf(r,e,t,n,i){if(!(this instanceof wf))return new wf(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,yG.call(this,n,i)}function eg(r,e,t,n,i){if(!(this instanceof eg))return new eg(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,yG.call(this,n,i)}function We(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],o=[],s=1,A=16,l="S",u=null;mn(r=r||{})==="object"&&(t=r.orientation,n=r.unit||n,i=r.format||i,a=r.compress||r.compressPdf||a,(u=r.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),s=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(A=r.floatPrecision),l=r.defaultPathOperation||"S"),o=r.filters||(a===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var c=r.putOnlyUsedFonts||!1,h={},f={internal:{},__private__:{}};f.__private__.PubSub=M5;var d="1.3",g=f.__private__.getPdfVersion=function(){return d};f.__private__.setPdfVersion=function(E){d=E};var m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return m};var v=f.__private__.getPageFormat=function(E){return m[E]};i=i||"a4";var y={COMPAT:"compat",ADVANCED:"advanced"},w=y.COMPAT;function C(){this.saveGraphicsState(),V(new Ue(qt,0,0,-qt,0,Zs()*qt).toString()+" cm"),this.setFontSize(this.getFontSize()/qt),l="n",w=y.ADVANCED}function O(){this.restoreGraphicsState(),l="S",w=y.COMPAT}var F=f.__private__.combineFontStyleAndFontWeight=function(E,k){if(E=="bold"&&k=="normal"||E=="bold"&&k==400||E=="normal"&&k=="italic"||E=="bold"&&k=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return k&&(E=k==400||k==="normal"?E==="italic"?"italic":"normal":k!=700&&k!=="bold"||E!=="normal"?(k==700?"bold":k)+""+E:"bold"),E};f.advancedAPI=function(E){var k=w===y.COMPAT;return k&&C.call(this),typeof E!="function"||(E(this),k&&O.call(this)),this},f.compatAPI=function(E){var k=w===y.ADVANCED;return k&&O.call(this),typeof E!="function"||(E(this),k&&C.call(this)),this},f.isAdvancedAPI=function(){return w===y.ADVANCED};var I,T=function(E){if(w!==y.ADVANCED)throw new Error(E+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},L=f.roundToPrecision=f.__private__.roundToPrecision=function(E,k){var st=e||k;if(isNaN(E)||isNaN(st))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return E.toFixed(st).replace(/0+$/,"")};I=f.hpf=f.__private__.hpf=typeof A=="number"?function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,A)}:A==="smart"?function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,E>-1&&E<1?16:5)}:function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,16)};var N=f.f2=f.__private__.f2=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.f2");return L(E,2)},x=f.__private__.f3=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.f3");return L(E,3)},S=f.scale=f.__private__.scale=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.scale");return w===y.COMPAT?E*qt:w===y.ADVANCED?E:void 0},P=function(E){return w===y.COMPAT?Zs()-E:w===y.ADVANCED?E:void 0},U=function(E){return S(P(E))};f.__private__.setPrecision=f.setPrecision=function(E){typeof parseInt(E,10)=="number"&&(e=parseInt(E,10))};var tt,q="00000000000000000000000000000000",rt=f.__private__.getFileId=function(){return q},nt=f.__private__.setFileId=function(E){return q=E!==void 0&&/^[a-fA-F0-9]{32}$/.test(E)?E.toUpperCase():q.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(ta=new Hp(u.userPermissions,u.userPassword,u.ownerPassword,q)),q};f.setFileId=function(E){return nt(E),this},f.getFileId=function(){return rt()};var At=f.__private__.convertDateToPDFDate=function(E){var k=E.getTimezoneOffset(),st=k<0?"+":"-",gt=Math.floor(Math.abs(k/60)),xt=Math.abs(k%60),Ut=[st,Y(gt),"'",Y(xt),"'"].join("");return["D:",E.getFullYear(),Y(E.getMonth()+1),Y(E.getDate()),Y(E.getHours()),Y(E.getMinutes()),Y(E.getSeconds()),Ut].join("")},ct=f.__private__.convertPDFDateToDate=function(E){var k=parseInt(E.substr(2,4),10),st=parseInt(E.substr(6,2),10)-1,gt=parseInt(E.substr(8,2),10),xt=parseInt(E.substr(10,2),10),Ut=parseInt(E.substr(12,2),10),Yt=parseInt(E.substr(14,2),10);return new Date(k,st,gt,xt,Ut,Yt,0)},Tt=f.__private__.setCreationDate=function(E){var k;if(E===void 0&&(E=new Date),E instanceof Date)k=At(E);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(E))throw new Error("Invalid argument passed to jsPDF.setCreationDate");k=E}return tt=k},M=f.__private__.getCreationDate=function(E){var k=tt;return E==="jsDate"&&(k=ct(tt)),k};f.setCreationDate=function(E){return Tt(E),this},f.getCreationDate=function(E){return M(E)};var W,Y=f.__private__.padd2=function(E){return("0"+parseInt(E)).slice(-2)},H=f.__private__.padd2Hex=function(E){return("00"+(E=E.toString())).substr(E.length)},J=0,ot=[],ut=[],X=0,It=[],at=[],j=!1,Z=ut,ft=function(){J=0,X=0,ut=[],ot=[],It=[],de=Br(),_t=Br()};f.__private__.setCustomOutputDestination=function(E){j=!0,Z=E};var it=function(E){j||(Z=E)};f.__private__.resetCustomOutputDestination=function(){j=!1,Z=ut};var V=f.__private__.out=function(E){return E=E.toString(),X+=E.length+1,Z.push(E),Z},Ft=f.__private__.write=function(E){return V(arguments.length===1?E.toString():Array.prototype.join.call(arguments," "))},Mt=f.__private__.getArrayBuffer=function(E){for(var k=E.length,st=new ArrayBuffer(k),gt=new Uint8Array(st);k--;)gt[k]=E.charCodeAt(k);return st},Et=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return Et};var Bt=r.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(E){return Bt=w===y.ADVANCED?E/qt:E,this};var Ct,Rt=f.__private__.getFontSize=f.getFontSize=function(){return w===y.COMPAT?Bt:Bt*qt},Nt=r.R2L||!1;f.__private__.setR2L=f.setR2L=function(E){return Nt=E,this},f.__private__.getR2L=f.getR2L=function(){return Nt};var Dt,Wt=f.__private__.setZoomMode=function(E){var k=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(E))Ct=E;else if(isNaN(E)){if(k.indexOf(E)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+E+'" is not recognized.');Ct=E}else Ct=parseInt(E,10)};f.__private__.getZoomMode=function(){return Ct};var te,Ae=f.__private__.setPageMode=function(E){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(E)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+E+'" is not recognized.');Dt=E};f.__private__.getPageMode=function(){return Dt};var oe=f.__private__.setLayoutMode=function(E){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(E)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+E+'" is not recognized.');te=E};f.__private__.getLayoutMode=function(){return te},f.__private__.setDisplayMode=f.setDisplayMode=function(E,k,st){return Wt(E),oe(k),Ae(st),this};var Jt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(E){if(Object.keys(Jt).indexOf(E)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Jt[E]},f.__private__.getDocumentProperties=function(){return Jt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(E){for(var k in Jt)Jt.hasOwnProperty(k)&&E[k]&&(Jt[k]=E[k]);return this},f.__private__.setDocumentProperty=function(E,k){if(Object.keys(Jt).indexOf(E)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Jt[E]=k};var fe,qt,nr,ke,wr,Ne={},Pe={},Gr=[],se={},fi={},gr={},ei={},Wr=null,zr=0,He=[],Ir=new M5(f),$n=r.hotfixes||[],yn={},di={},pi=[],Ue=function E(k,st,gt,xt,Ut,Yt){if(!(this instanceof E))return new E(k,st,gt,xt,Ut,Yt);isNaN(k)&&(k=1),isNaN(st)&&(st=0),isNaN(gt)&&(gt=0),isNaN(xt)&&(xt=1),isNaN(Ut)&&(Ut=0),isNaN(Yt)&&(Yt=0),this._matrix=[k,st,gt,xt,Ut,Yt]};Object.defineProperty(Ue.prototype,"sx",{get:function(){return this._matrix[0]},set:function(E){this._matrix[0]=E}}),Object.defineProperty(Ue.prototype,"shy",{get:function(){return this._matrix[1]},set:function(E){this._matrix[1]=E}}),Object.defineProperty(Ue.prototype,"shx",{get:function(){return this._matrix[2]},set:function(E){this._matrix[2]=E}}),Object.defineProperty(Ue.prototype,"sy",{get:function(){return this._matrix[3]},set:function(E){this._matrix[3]=E}}),Object.defineProperty(Ue.prototype,"tx",{get:function(){return this._matrix[4]},set:function(E){this._matrix[4]=E}}),Object.defineProperty(Ue.prototype,"ty",{get:function(){return this._matrix[5]},set:function(E){this._matrix[5]=E}}),Object.defineProperty(Ue.prototype,"a",{get:function(){return this._matrix[0]},set:function(E){this._matrix[0]=E}}),Object.defineProperty(Ue.prototype,"b",{get:function(){return this._matrix[1]},set:function(E){this._matrix[1]=E}}),Object.defineProperty(Ue.prototype,"c",{get:function(){return this._matrix[2]},set:function(E){this._matrix[2]=E}}),Object.defineProperty(Ue.prototype,"d",{get:function(){return this._matrix[3]},set:function(E){this._matrix[3]=E}}),Object.defineProperty(Ue.prototype,"e",{get:function(){return this._matrix[4]},set:function(E){this._matrix[4]=E}}),Object.defineProperty(Ue.prototype,"f",{get:function(){return this._matrix[5]},set:function(E){this._matrix[5]=E}}),Object.defineProperty(Ue.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ue.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ue.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ue.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ue.prototype.join=function(E){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(I).join(E)},Ue.prototype.multiply=function(E){var k=E.sx*this.sx+E.shy*this.shx,st=E.sx*this.shy+E.shy*this.sy,gt=E.shx*this.sx+E.sy*this.shx,xt=E.shx*this.shy+E.sy*this.sy,Ut=E.tx*this.sx+E.ty*this.shx+this.tx,Yt=E.tx*this.shy+E.ty*this.sy+this.ty;return new Ue(k,st,gt,xt,Ut,Yt)},Ue.prototype.decompose=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty,Yt=Math.sqrt(E*E+k*k),ce=(E/=Yt)*st+(k/=Yt)*gt;st-=E*ce,gt-=k*ce;var De=Math.sqrt(st*st+gt*gt);return ce/=De,E*(gt/=De)>16&255,gt=De>>8&255,xt=255&De}if(gt===void 0||Ut===void 0&&st===gt&>===xt)if(typeof st=="string")k=st+" "+Yt[0];else switch(E.precision){case 2:k=N(st/255)+" "+Yt[0];break;case 3:default:k=x(st/255)+" "+Yt[0]}else if(Ut===void 0||mn(Ut)==="object"){if(Ut&&!isNaN(Ut.a)&&Ut.a===0)return k=["1.","1.","1.",Yt[1]].join(" ");if(typeof st=="string")k=[st,gt,xt,Yt[1]].join(" ");else switch(E.precision){case 2:k=[N(st/255),N(gt/255),N(xt/255),Yt[1]].join(" ");break;default:case 3:k=[x(st/255),x(gt/255),x(xt/255),Yt[1]].join(" ")}}else if(typeof st=="string")k=[st,gt,xt,Ut,Yt[2]].join(" ");else switch(E.precision){case 2:k=[N(st),N(gt),N(xt),N(Ut),Yt[2]].join(" ");break;case 3:default:k=[x(st),x(gt),x(xt),x(Ut),Yt[2]].join(" ")}return k},Je=f.__private__.getFilters=function(){return o},Lr=f.__private__.putStream=function(E){var k=(E=E||{}).data||"",st=E.filters||Je(),gt=E.alreadyAppliedFilters||[],xt=E.addLength1||!1,Ut=k.length,Yt=E.objectId,ce=function(ea){return ea};if(u!==null&&Yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(ce=ta.encryptor(Yt,0));var De={};st===!0&&(st=["FlateEncode"]);var vr=E.additionalKeyValues||[],ir=(De=We.API.processDataByFilters!==void 0?We.API.processDataByFilters(k,st):{data:k,reverseChain:[]}).reverseChain+(Array.isArray(gt)?gt.join(" "):gt.toString());if(De.data.length!==0&&(vr.push({key:"Length",value:De.data.length}),xt===!0&&vr.push({key:"Length1",value:Ut})),ir.length!=0)if(ir.split("/").length-1==1)vr.push({key:"Filter",value:ir});else{vr.push({key:"Filter",value:"["+ir+"]"});for(var br=0;br>"),De.data.length!==0&&(V("stream"),V(ce(De.data)),V("endstream"))},hn=f.__private__.putPage=function(E){var k=E.number,st=E.data,gt=E.objId,xt=E.contentsObjId;_n(gt,!0),V("<>"),V("endobj");var Ut=st.join(` `);return w===y.ADVANCED&&(Ut+=` Q`),_n(xt,!0),Lr({data:Ut,filters:Je(),objectId:xt}),V("endobj"),gt},fn=f.__private__.putPages=function(){var E,k,st=[];for(E=1;E<=zr;E++)He[E].objId=Br(),He[E].contentsObjId=Br();for(E=1;E<=zr;E++)st.push(hn({number:E,data:at[E],objId:He[E].objId,contentsObjId:He[E].contentsObjId,mediaBox:He[E].mediaBox,cropBox:He[E].cropBox,bleedBox:He[E].bleedBox,trimBox:He[E].trimBox,artBox:He[E].artBox,userUnit:He[E].userUnit,rootDictionaryObjId:de,resourceDictionaryObjId:_t}));_n(de,!0),V("<>"),V("endobj"),Ir.publish("postPutPages")},Xo=function(E){Ir.publish("putFont",{font:E,out:V,newObject:cn,putStream:Lr}),E.isAlreadyPutted!==!0&&(E.objectNumber=cn(),V("<<"),V("/Type /Font"),V("/BaseFont /"+Gp(E.postScriptName)),V("/Subtype /Type1"),typeof E.encoding=="string"&&V("/Encoding /"+E.encoding),V("/FirstChar 32"),V("/LastChar 255"),V(">>"),V("endobj"))},vi=function(){for(var E in Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&Xo(Ne[E])},Ws=function(E){E.objectNumber=cn();var k=[];k.push({key:"Type",value:"/XObject"}),k.push({key:"Subtype",value:"/Form"}),k.push({key:"BBox",value:"["+[I(E.x),I(E.y),I(E.x+E.width),I(E.y+E.height)].join(" ")+"]"}),k.push({key:"Matrix",value:"["+E.matrix.toString()+"]"});var st=E.pages[1].join(` `);Lr({data:st,additionalKeyValues:k,objectId:E.objectNumber}),V("endobj")},OA=function(){for(var E in yn)yn.hasOwnProperty(E)&&Ws(yn[E])},Fh=function(E,k){var st,gt=[],xt=1/(k-1);for(st=0;st<1;st+=xt)gt.push(st);if(gt.push(1),E[0].offset!=0){var Ut={offset:0,color:E[0].color};E.unshift(Ut)}if(E[E.length-1].offset!=1){var Yt={offset:1,color:E[E.length-1].color};E.push(Yt)}for(var ce="",De=0,vr=0;vrE[De+1].offset;)De++;var ir=E[De].offset,br=(st-ir)/(E[De+1].offset-ir),$i=E[De].color,jn=E[De+1].color;ce+=H(Math.round((1-br)*$i[0]+br*jn[0]).toString(16))+H(Math.round((1-br)*$i[1]+br*jn[1]).toString(16))+H(Math.round((1-br)*$i[2]+br*jn[2]).toString(16))}return ce.trim()},xv=function(E,k){k||(k=21);var st=cn(),gt=Fh(E.colors,k),xt=[];xt.push({key:"FunctionType",value:"0"}),xt.push({key:"Domain",value:"[0.0 1.0]"}),xt.push({key:"Size",value:"["+k+"]"}),xt.push({key:"BitsPerSample",value:"8"}),xt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Lr({data:gt,additionalKeyValues:xt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:st}),V("endobj"),E.objectNumber=cn(),V("<< /ShadingType "+E.type),V("/ColorSpace /DeviceRGB");var Ut="/Coords ["+I(parseFloat(E.coords[0]))+" "+I(parseFloat(E.coords[1]))+" ";E.type===2?Ut+=I(parseFloat(E.coords[2]))+" "+I(parseFloat(E.coords[3])):Ut+=I(parseFloat(E.coords[2]))+" "+I(parseFloat(E.coords[3]))+" "+I(parseFloat(E.coords[4]))+" "+I(parseFloat(E.coords[5])),V(Ut+="]"),E.matrix&&V("/Matrix ["+E.matrix.toString()+"]"),V("/Function "+st+" 0 R"),V("/Extend [true true]"),V(">>"),V("endobj")},Pd=function(E,k){var st=Br(),gt=cn();k.push({resourcesOid:st,objectOid:gt}),E.objectNumber=gt;var xt=[];xt.push({key:"Type",value:"/Pattern"}),xt.push({key:"PatternType",value:"1"}),xt.push({key:"PaintType",value:"1"}),xt.push({key:"TilingType",value:"1"}),xt.push({key:"BBox",value:"["+E.boundingBox.map(I).join(" ")+"]"}),xt.push({key:"XStep",value:I(E.xStep)}),xt.push({key:"YStep",value:I(E.yStep)}),xt.push({key:"Resources",value:st+" 0 R"}),E.matrix&&xt.push({key:"Matrix",value:"["+E.matrix.toString()+"]"}),Lr({data:E.stream,additionalKeyValues:xt,objectId:E.objectNumber}),V("endobj")},zs=function(E){var k;for(k in se)se.hasOwnProperty(k)&&(se[k]instanceof wf?xv(se[k]):se[k]instanceof eg&&Pd(se[k],E))},Ud=function(E){for(var k in E.objectNumber=cn(),V("<<"),E)switch(k){case"opacity":V("/ca "+N(E[k]));break;case"stroke-opacity":V("/CA "+N(E[k]))}V(">>"),V("endobj")},Iv=function(){var E;for(E in gr)gr.hasOwnProperty(E)&&Ud(gr[E])},Rh=function(){for(var E in V("/XObject <<"),yn)yn.hasOwnProperty(E)&&yn[E].objectNumber>=0&&V("/"+E+" "+yn[E].objectNumber+" 0 R");Ir.publish("putXobjectDict"),V(">>")},Lv=function(){ta.oid=cn(),V("<<"),V("/Filter /Standard"),V("/V "+ta.v),V("/R "+ta.r),V("/U <"+ta.toHexString(ta.U)+">"),V("/O <"+ta.toHexString(ta.O)+">"),V("/P "+ta.P),V(">>"),V("endobj")},Dd=function(){for(var E in V("/Font <<"),Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&V("/"+E+" "+Ne[E].objectNumber+" 0 R");V(">>")},Qd=function(){if(Object.keys(se).length>0){for(var E in V("/Shading <<"),se)se.hasOwnProperty(E)&&se[E]instanceof wf&&se[E].objectNumber>=0&&V("/"+E+" "+se[E].objectNumber+" 0 R");Ir.publish("putShadingPatternDict"),V(">>")}},Fl=function(E){if(Object.keys(se).length>0){for(var k in V("/Pattern <<"),se)se.hasOwnProperty(k)&&se[k]instanceof f.TilingPattern&&se[k].objectNumber>=0&&se[k].objectNumber>")}},Ov=function(){if(Object.keys(gr).length>0){var E;for(E in V("/ExtGState <<"),gr)gr.hasOwnProperty(E)&&gr[E].objectNumber>=0&&V("/"+E+" "+gr[E].objectNumber+" 0 R");Ir.publish("putGStateDict"),V(">>")}},Vn=function(E){_n(E.resourcesOid,!0),V("<<"),V("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Dd(),Qd(),Fl(E.objectOid),Ov(),Rh(),V(">>"),V("endobj")},kd=function(){var E=[];vi(),Iv(),OA(),zs(E),Ir.publish("putResources"),E.forEach(Vn),Vn({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),Ir.publish("postPutResources")},Hd=function(){Ir.publish("putAdditionalObjects");for(var E=0;E>8&&(De=!0);E=ce.join("")}for(st=E.length;De===void 0&&st!==0;)E.charCodeAt(st-1)>>8&&(De=!0),st--;if(!De)return E;for(ce=k.noBOM?[]:[254,255],st=0,gt=E.length;st>8)>>8)throw new Error("Character at position "+st+" of string '"+E+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ce.push(ir),ce.push(vr-(ir<<8))}return String.fromCharCode.apply(void 0,ce)},Sa=f.__private__.pdfEscape=f.pdfEscape=function(E,k){return Zo(E,k).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},$d=f.__private__.beginPage=function(E){at[++zr]=[],He[zr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(E[0]),topRightY:Number(E[1])}},Vd(zr),it(at[W])},FA=function(E,k){var st,gt,xt;switch(t=k||t,typeof E=="string"&&(st=v(E.toLowerCase()),Array.isArray(st)&&(gt=st[0],xt=st[1])),Array.isArray(E)&&(gt=E[0]*qt,xt=E[1]*qt),isNaN(gt)&&(gt=i[0],xt=i[1]),(gt>14400||xt>14400)&&(Bn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),gt=Math.min(14400,gt),xt=Math.min(14400,xt)),i=[gt,xt],t.substr(0,1)){case"l":xt>gt&&(i=[xt,gt]);break;case"p":gt>xt&&(i=[xt,gt])}$d(i),Yd(Vu),V(ts),Qh!==0&&V(Qh+" J"),kh!==0&&V(kh+" j"),Ir.publish("addPage",{pageNumber:zr})},Rv=function(E){E>0&&E<=zr&&(at.splice(E,1),He.splice(E,1),zr--,W>zr&&(W=zr),this.setPage(W))},Vd=function(E){E>0&&E<=zr&&(W=E)},Mv=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return at.length-1},jd=function(E,k,st){var gt,xt=void 0;return st=st||{},E=E!==void 0?E:Ne[fe].fontName,k=k!==void 0?k:Ne[fe].fontStyle,gt=E.toLowerCase(),Pe[gt]!==void 0&&Pe[gt][k]!==void 0?xt=Pe[gt][k]:Pe[E]!==void 0&&Pe[E][k]!==void 0?xt=Pe[E][k]:st.disableWarning===!1&&Bn.warn("Unable to look up font label for font '"+E+"', '"+k+"'. Refer to getFontList() for available fonts."),xt||st.noFallback||(xt=Pe.times[k])==null&&(xt=Pe.times.normal),xt},Nv=f.__private__.putInfo=function(){var E=cn(),k=function(gt){return gt};for(var st in u!==null&&(k=ta.encryptor(E,0)),V("<<"),V("/Producer ("+Sa(k("jsPDF "+We.version))+")"),Jt)Jt.hasOwnProperty(st)&&Jt[st]&&V("/"+st.substr(0,1).toUpperCase()+st.substr(1)+" ("+Sa(k(Jt[st]))+")");V("/CreationDate ("+Sa(k(tt))+")"),V(">>"),V("endobj")},Nh=f.__private__.putCatalog=function(E){var k=(E=E||{}).rootDictionaryObjId||de;switch(cn(),V("<<"),V("/Type /Catalog"),V("/Pages "+k+" 0 R"),Ct||(Ct="fullwidth"),Ct){case"fullwidth":V("/OpenAction [3 0 R /FitH null]");break;case"fullheight":V("/OpenAction [3 0 R /FitV null]");break;case"fullpage":V("/OpenAction [3 0 R /Fit]");break;case"original":V("/OpenAction [3 0 R /XYZ null null 1]");break;default:var st=""+Ct;st.substr(st.length-1)==="%"&&(Ct=parseInt(Ct)/100),typeof Ct=="number"&&V("/OpenAction [3 0 R /XYZ null null "+N(Ct)+"]")}switch(te||(te="continuous"),te){case"continuous":V("/PageLayout /OneColumn");break;case"single":V("/PageLayout /SinglePage");break;case"two":case"twoleft":V("/PageLayout /TwoColumnLeft");break;case"tworight":V("/PageLayout /TwoColumnRight")}Dt&&V("/PageMode /"+Dt),Ir.publish("putCatalog"),V(">>"),V("endobj")},Ph=f.__private__.putTrailer=function(){V("trailer"),V("<<"),V("/Size "+(J+1)),V("/Root "+J+" 0 R"),V("/Info "+(J-1)+" 0 R"),u!==null&&V("/Encrypt "+ta.oid+" 0 R"),V("/ID [ <"+q+"> <"+q+"> ]"),V(">>")},RA=f.__private__.putHeader=function(){V("%PDF-"+d),V("%ºß¬à")},ku=f.__private__.putXRef=function(){var E="0000000000";V("xref"),V("0 "+(J+1)),V("0000000000 65535 f ");for(var k=1;k<=J;k++)typeof ot[k]=="function"?V((E+ot[k]()).slice(-10)+" 00000 n "):ot[k]!==void 0?V((E+ot[k]).slice(-10)+" 00000 n "):V("0000000000 00000 n ")},Ys=f.__private__.buildDocument=function(){ft(),it(ut),Ir.publish("buildDocument"),RA(),fn(),Hd(),kd(),u!==null&&Lv(),Nv(),Nh();var E=X;return ku(),Ph(),V("startxref"),V(""+E),V("%%EOF"),it(at[W]),ut.join(` `)},Hu=f.__private__.getBlob=function(E){return new Blob([Mt(E)],{type:"application/pdf"})},Gu=f.output=f.__private__.output=qo(function(E,k){switch(typeof(k=k||{})=="string"?k={filename:k}:k.filename=k.filename||"generated.pdf",E){case void 0:return Ys();case"save":f.save(k.filename);break;case"arraybuffer":return Mt(Ys());case"blob":return Hu(Ys());case"bloburi":case"bloburl":if(Xe.URL!==void 0&&typeof Xe.URL.createObjectURL=="function")return Xe.URL&&Xe.URL.createObjectURL(Hu(Ys()))||void 0;Bn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var st="",gt=Ys();try{st=gI(gt)}catch{st=gI(unescape(encodeURIComponent(gt)))}return"data:application/pdf;filename="+k.filename+";base64,"+st;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Xe)==="[object Window]"){var xt='