(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 eC(r,e){const t=Object.create(null),n=r.split(",");for(let i=0;i!!t[i.toLowerCase()]:i=>!!t[i]}const BK="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",bK=eC(BK);function l0(r){if(Oe(r)){const e={};for(let t=0;t{if(t){const n=t.split(SK);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function u0(r){let e="";if(Zn(r))e=r;else if(Oe(r))for(let t=0;teh(t,e))}const MK=r=>Zn(r)?r:r==null?"":Oe(r)||Tn(r)&&(r.toString===W6||!ar(r.toString))?JSON.stringify(r,K6,2):String(r),K6=(r,e)=>e&&e.__v_isRef?K6(r,e.value):og(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i])=>(t[`${n} =>`]=i,t),{})}:vd(e)?{[`Set(${e.size})`]:[...e.values()]}:Tn(e)&&!Oe(e)&&!z6(e)?String(e):e,wn={},ag=[],dA=()=>{},NK=()=>!1,PK=/^on[^a-z]/,c0=r=>PK.test(r),IO=r=>r.startsWith("onUpdate:"),ui=Object.assign,LO=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},UK=Object.prototype.hasOwnProperty,$r=(r,e)=>UK.call(r,e),Oe=Array.isArray,og=r=>h0(r)==="[object Map]",vd=r=>h0(r)==="[object Set]",CN=r=>h0(r)==="[object Date]",ar=r=>typeof r=="function",Zn=r=>typeof r=="string",By=r=>typeof r=="symbol",Tn=r=>r!==null&&typeof r=="object",OO=r=>Tn(r)&&ar(r.then)&&ar(r.catch),W6=Object.prototype.toString,h0=r=>W6.call(r),DK=r=>h0(r).slice(8,-1),z6=r=>h0(r)==="[object Object]",FO=r=>Zn(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,Ym=eC(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nC=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},QK=/-(\w)/g,Uo=nC(r=>r.replace(QK,(e,t)=>t?t.toUpperCase():"")),kK=/\B([A-Z])/g,Ps=nC(r=>r.replace(kK,"-$1").toLowerCase()),f0=nC(r=>r.charAt(0).toUpperCase()+r.slice(1)),Xm=nC(r=>r?`on${f0(r)}`:""),bg=(r,e)=>!Object.is(r,e),sg=(r,e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},_u=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let BN;const HK=()=>BN||(BN=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let us;class RO{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=us,!e&&us&&(this.index=(us.scopes||(us.scopes=[])).push(this)-1)}run(e){if(this.active){const t=us;try{return us=this,e()}finally{us=t}}}on(){us=this}off(){us=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},X6=r=>(r.w&rh)>0,q6=r=>(r.n&rh)>0,jK=({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)?FO(t)&&s.push(o.get("length")):(s.push(o.get(Ff)),og(r)&&s.push(o.get(KS)));break;case"delete":Oe(r)||(s.push(o.get(Ff)),og(r)&&s.push(o.get(KS)));break;case"set":og(r)&&s.push(o.get(Ff));break}if(s.length===1)s[0]&&WS(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);WS(MO(A))}}function WS(r,e){const t=Oe(r)?r:[...r];for(const n of t)n.computed&&TN(n);for(const n of t)n.computed||TN(n)}function TN(r,e){(r!==cA||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const YK=eC("__proto__,__v_isRef,__isVue"),t4=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(By)),XK=iC(),qK=iC(!1,!0),ZK=iC(!0),JK=iC(!0,!0),SN=tW();function tW(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Kr(this);for(let a=0,o=this.length;a{r[e]=function(...t){Zg();const n=Kr(this)[e].apply(this,t);return Jg(),n}}),r}function iC(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?s4:o4:e?a4:i4).get(n))return n;const o=Oe(n);if(!r&&o&&$r(SN,i))return Reflect.get(SN,i,a);const s=Reflect.get(n,i,a);return(By(i)?t4.has(i):YK(i))||(r||vs(n,"get",i),e)?s:Aa(s)?o&&FO(i)?s:s.value:Tn(s)?r?PO(s):md(s):s}}const eW=e4(),rW=e4(!0);function e4(r=!1){return function(t,n,i,a){let o=t[n];if(Xf(o)&&Aa(o)&&!Aa(i))return!1;if(!r&&(!by(i)&&!Xf(i)&&(o=Kr(o),i=Kr(i)),!Oe(t)&&Aa(o)&&!Aa(i)))return o.value=i,!0;const s=Oe(t)&&FO(n)?Number(n)r,aC=r=>Reflect.getPrototypeOf(r);function I_(r,e,t=!1,n=!1){r=r.__v_raw;const i=Kr(r),a=Kr(e);t||(e!==a&&vs(i,"get",e),vs(i,"get",a));const{has:o}=aC(i),s=n?NO:t?QO:Ty;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 L_(r,e=!1){const t=this.__v_raw,n=Kr(t),i=Kr(r);return e||(r!==i&&vs(n,"has",r),vs(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function O_(r,e=!1){return r=r.__v_raw,!e&&vs(Kr(r),"iterate",Ff),Reflect.get(r,"size",r)}function xN(r){r=Kr(r);const e=Kr(this);return aC(e).has.call(e,r)||(e.add(r),wu(e,"add",r,r)),this}function IN(r,e){e=Kr(e);const t=Kr(this),{has:n,get:i}=aC(t);let a=n.call(t,r);a||(r=Kr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?bg(e,o)&&wu(t,"set",r,e):wu(t,"add",r,e),this}function LN(r){const e=Kr(this),{has:t,get:n}=aC(e);let i=t.call(e,r);i||(r=Kr(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 ON(){const r=Kr(this),e=r.size!==0,t=r.clear();return e&&wu(r,"clear",void 0,void 0),t}function F_(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Kr(o),A=e?NO:r?QO:Ty;return!r&&vs(s,"iterate",Ff),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function R_(r,e,t){return function(...n){const i=this.__v_raw,a=Kr(i),o=og(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?NO:e?QO:Ty;return!e&&vs(a,"iterate",A?KS:Ff),{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 lc(r){return function(...e){return r==="delete"?!1:this}}function AW(){const r={get(a){return I_(this,a)},get size(){return O_(this)},has:L_,add:xN,set:IN,delete:LN,clear:ON,forEach:F_(!1,!1)},e={get(a){return I_(this,a,!1,!0)},get size(){return O_(this)},has:L_,add:xN,set:IN,delete:LN,clear:ON,forEach:F_(!1,!0)},t={get(a){return I_(this,a,!0)},get size(){return O_(this,!0)},has(a){return L_.call(this,a,!0)},add:lc("add"),set:lc("set"),delete:lc("delete"),clear:lc("clear"),forEach:F_(!0,!1)},n={get(a){return I_(this,a,!0,!0)},get size(){return O_(this,!0)},has(a){return L_.call(this,a,!0)},add:lc("add"),set:lc("set"),delete:lc("delete"),clear:lc("clear"),forEach:F_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=R_(a,!1,!1),t[a]=R_(a,!0,!1),e[a]=R_(a,!1,!0),n[a]=R_(a,!0,!0)}),[r,t,e,n]}const[lW,uW,cW,hW]=AW();function oC(r,e){const t=e?r?hW:cW:r?uW:lW;return(n,i,a)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get($r(t,i)&&i in n?t:n,i,a)}const fW={get:oC(!1,!1)},dW={get:oC(!1,!0)},pW={get:oC(!0,!1)},gW={get:oC(!0,!0)},i4=new WeakMap,a4=new WeakMap,o4=new WeakMap,s4=new WeakMap;function vW(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mW(r){return r.__v_skip||!Object.isExtensible(r)?0:vW(DK(r))}function md(r){return Xf(r)?r:sC(r,!1,r4,fW,i4)}function A4(r){return sC(r,!1,oW,dW,a4)}function PO(r){return sC(r,!0,n4,pW,o4)}function yW(r){return sC(r,!0,sW,gW,s4)}function sC(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=mW(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Rf(r){return Xf(r)?Rf(r.__v_raw):!!(r&&r.__v_isReactive)}function Xf(r){return!!(r&&r.__v_isReadonly)}function by(r){return!!(r&&r.__v_isShallow)}function UO(r){return Rf(r)||Xf(r)}function Kr(r){const e=r&&r.__v_raw;return e?Kr(e):r}function DO(r){return Ow(r,"__v_skip",!0),r}const Ty=r=>Tn(r)?md(r):r,QO=r=>Tn(r)?PO(r):r;function kO(r){jc&&cA&&(r=Kr(r),J6(r.dep||(r.dep=MO())))}function AC(r,e){r=Kr(r),r.dep&&WS(r.dep)}function Aa(r){return!!(r&&r.__v_isRef===!0)}function Fo(r){return u4(r,!1)}function l4(r){return u4(r,!0)}function u4(r,e){return Aa(r)?r:new _W(r,e)}class _W{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Kr(e),this._value=t?e:Ty(e)}get value(){return kO(this),this._value}set value(e){const t=this.__v_isShallow||by(e)||Xf(e);e=t?e:Kr(e),bg(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ty(e),AC(this))}}function wW(r){AC(r)}function Mf(r){return Aa(r)?r.value:r}const EW={get:(r,e,t)=>Mf(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 HO(r){return Rf(r)?r:new Proxy(r,EW)}class CW{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e(()=>kO(this),()=>AC(this));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function BW(r){return new CW(r)}function nh(r){const e=Oe(r)?new Array(r.length):{};for(const t in r)e[t]=c4(r,t);return e}class bW{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}}function c4(r,e,t){const n=r[e];return Aa(n)?n:new bW(r,e,t)}var h4;class TW{constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[h4]=!1,this._dirty=!0,this.effect=new d0(e,()=>{this._dirty||(this._dirty=!0,AC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Kr(this);return kO(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}h4="__v_isReadonly";function SW(r,e,t=!1){let n,i;const a=ar(r);return a?(n=r,i=dA):(n=r.get,i=r.set),new TW(n,i,a||!i,t)}function xW(r,...e){}function hu(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){yd(a,e,t)}return i}function gs(r,e,t,n){if(ar(r)){const a=hu(r,e,t,n);return a&&OO(a)&&a.catch(o=>{yd(o,e,t)}),a}const i=[];for(let a=0;a>>1;xy(ja[n])qA&&ja.splice(e,1)}function $O(r){Oe(r)?Ag.push(...r):(!ru||!ru.includes(r,r.allowRecurse?_f+1:_f))&&Ag.push(r),d4()}function FN(r,e=Sy?qA+1:0){for(;exy(t)-xy(n)),_f=0;_fr.id==null?1/0:r.id,FW=(r,e)=>{const t=xy(r)-xy(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function p4(r){zS=!1,Sy=!0,ja.sort(FW);const e=dA;try{for(qA=0;qAMp.emit(i,...a)),M_=[]):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=>{g4(a,e)}),setTimeout(()=>{Mp||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,M_=[])},3e3)):M_=[]}function RW(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=>Zn(f)?f.trim():f)),c&&(i=t.map(_u))}let s,A=n[s=Xm(e)]||n[s=Xm(Uo(e))];!A&&a&&(A=n[s=Xm(Ps(e))]),A&&gs(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,gs(l,r,6,i)}}function v4(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=v4(l,e,!0);u&&(s=!0,ui(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):ui(o,a),Tn(r)&&n.set(r,o),o)}function cC(r,e){return!r||!c0(e)?!1:(e=e.slice(2).replace(/Once$/,""),$r(r,e[0].toLowerCase()+e.slice(1))||$r(r,Ps(e))||$r(r,e))}let _a=null,hC=null;function Iy(r){const e=_a;return _a=r,hC=r&&r.type.__scopeId||null,e}function MW(r){hC=r}function NW(){hC=null}const PW=r=>VO;function VO(r,e=_a,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&ex(-1);const a=Iy(e);let o;try{o=r(...i)}finally{Iy(a),n._d&&ex(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Z1(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=Iy(r);try{if(t.shapeFlag&4){const C=i||n;m=cs(u.call(C,C,c,a,f,h,d)),v=A}else{const C=e;m=cs(C.length>1?C(a,{attrs:A,slots:s,emit:l}):C(a,null)),v=e.props?A:DW(A)}}catch(C){Jm.length=0,yd(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(IO)&&(v=QW(v,o)),w=pl(w,v))}return t.dirs&&(w=pl(w),w.dirs=w.dirs?w.dirs.concat(t.dirs):t.dirs),t.transition&&(w.transition=t.transition),m=w,Iy(y),m}function UW(r){let e;for(let t=0;t{let e;for(const t in r)(t==="class"||t==="style"||c0(t))&&((e||(e={}))[t]=r[t]);return e},QW=(r,e)=>{const t={};for(const n in r)(!IO(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function kW(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?RN(n,o,l):!!o;if(A&8){const u=e.dynamicProps;for(let c=0;cr.__isSuspense,HW={name:"Suspense",__isSuspense:!0,process(r,e,t,n,i,a,o,s,A,l){r==null?$W(e,t,n,i,a,o,s,A,l):VW(r,e,t,n,i,o,s,A,l)},hydrate:jW,create:KO,normalize:KW},GW=HW;function Ly(r,e){const t=r.props&&r.props[e];ar(t)&&t()}function $W(r,e,t,n,i,a,o,s,A){const{p:l,o:{createElement:u}}=A,c=u("div"),h=r.suspense=KO(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?(Ly(r,"onPending"),Ly(r,"onFallback"),l(null,r.ssFallback,e,t,n,null,a,o),lg(h,r.ssFallback)):h.resolve()}function VW(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,ZA(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),lg(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),lg(c,f))):d&&ZA(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&&ZA(h,d))A(d,h,t,n,i,c,a,o,s),lg(c,h);else if(Ly(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 KO(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=_u(r.props&&r.props.timeout),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)}lg(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||$O(T),y.effects=[],Ly(C,"onResolve")},fallback(w){if(!y.pendingBranch)return;const{vnode:C,activeBranch:O,parentComponent:F,container:I,isSVG:T}=y;Ly(C,"onFallback");const L=d(O),N=()=>{y.isInFallback&&(c(null,w,I,L,F,null,T,s,A),lg(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=>{yd(I,w,0)}).then(I=>{if(w.isUnmounted||y.isUnmounted||y.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:T}=w;rx(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),jO(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 jW(r,e,t,n,i,a,o,s,A){const l=e.suspense=KO(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 KW(r){const{shapeFlag:e,children:t}=r,n=e&32;r.ssContent=MN(n?t.default:t),r.ssFallback=n?MN(t.fallback):Pn(Wa)}function MN(r){let e;if(ar(r)){const t=Jf&&r._c;t&&(r._d=!1,ti()),r=r(),t&&(r._d=!0,e=Po,W4())}return Oe(r)&&(r=UW(r)),r=cs(r),e&&!r.dynamicChildren&&(r.dynamicChildren=e.filter(t=>t!==r)),r}function y4(r,e){e&&e.pendingBranch?Oe(r)?e.effects.push(...r):e.effects.push(r):$O(r)}function lg(r,e){r.activeBranch=e;const{vnode:t,parentComponent:n}=r,i=t.el=e.el;n&&n.subTree===t&&(n.vnode.el=i,jO(n,i))}function Dr(r,e){if(Ki){let t=Ki.provides;const n=Ki.parent&&Ki.parent.provides;n===t&&(t=Ki.provides=Object.create(n)),t[r]=e}}function Be(r,e,t=!1){const n=Ki||_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 _4(r,e){return p0(r,null,e)}function w4(r,e){return p0(r,null,{flush:"post"})}function WW(r,e){return p0(r,null,{flush:"sync"})}const N_={};function ye(r,e,t){return p0(r,e,t)}function p0(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=wn){const s=Ki;let A,l=!1,u=!1;if(Aa(r)?(A=()=>r.value,l=by(r)):Rf(r)?(A=()=>r,n=!0):Oe(r)?(u=!0,l=r.some(w=>Rf(w)||by(w)),A=()=>r.map(w=>{if(Aa(w))return w.value;if(Rf(w))return bf(w);if(ar(w))return hu(w,s,2)})):ar(r)?e?A=()=>hu(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return c&&c(),gs(r,s,3,[h])}:A=dA,e&&n){const w=A;A=()=>bf(w())}let c,h=w=>{c=v.onStop=()=>{hu(w,s,4)}},f;if(Sg)if(h=dA,e?t&&gs(e,s,3,[A(),u?[]:void 0,h]):A(),i==="sync"){const w=ak();f=w.__watcherHandles||(w.__watcherHandles=[])}else return dA;let d=u?new Array(r.length).fill(N_):N_;const g=()=>{if(v.active)if(e){const w=v.run();(n||l||(u?w.some((C,O)=>bg(C,d[O])):bg(w,d)))&&(c&&c(),gs(e,s,3,[w,d===N_?void 0:u&&d[0]===N_?[]: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=()=>uC(g));const v=new d0(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&&LO(s.scope.effects,v)};return f&&f.push(y),y}function zW(r,e,t){const n=this.proxy,i=Zn(r)?r.includes(".")?E4(n,r):()=>n[r]:r.bind(n,n);let a;ar(e)?a=e:(a=e.handler,t=e);const o=Ki;ah(this);const s=p0(i,a.bind(n),t);return o?ah(o):Kc(),s}function E4(r,e){const t=e.split(".");return()=>{let n=r;for(let i=0;i{bf(t,e)});else if(z6(r))for(const t in r)bf(r[t],e);return r}function WO(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return cr(()=>{r.isMounted=!0}),gC(()=>{r.isUnmounting=!0}),r}const Ls=[Function,Array],YW={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ls,onEnter:Ls,onAfterEnter:Ls,onEnterCancelled:Ls,onBeforeLeave:Ls,onLeave:Ls,onAfterLeave:Ls,onLeaveCancelled:Ls,onBeforeAppear:Ls,onAppear:Ls,onAfterAppear:Ls,onAppearCancelled:Ls},setup(r,{slots:e}){const t=_h(),n=WO();let i;return()=>{const a=e.default&&fC(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=Kr(r),{mode:A}=s;if(n.isLeaving)return Eb(o);const l=NN(o);if(!l)return Eb(o);const u=Tg(l,s,n,t);qf(l,u);const c=t.subTree,h=c&&NN(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&&(!ZA(l,h)||f)){const g=Tg(h,s,n,t);if(qf(h,g),A==="out-in")return n.isLeaving=!0,g.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},Eb(o);A==="in-out"&&l.type!==Wa&&(g.delayLeave=(m,v,y)=>{const w=C4(n,h);w[String(h.key)]=h,m._leaveCb=()=>{v(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=y})}return o}}},zO=YW;function C4(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 Tg(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=C4(t,r),O=(T,L)=>{T&&gs(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&&ZA(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 Tg(T,e,t,n)}};return I}function Eb(r){if(v0(r))return r=pl(r),r.children=null,r}function NN(r){return v0(r)?r.children?r.children[0]:void 0:r}function qf(r,e){r.shapeFlag&6&&r.component?qf(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 fC(r,e=!1,t){let n=[],i=0;for(let a=0;a1)for(let a=0;a!!r.type.__asyncLoader;function XW(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 g0({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return l},setup(){const f=Ki;if(l)return()=>Cb(l,f);const d=y=>{A=null,yd(y,f,13,!n)};if(o&&f.suspense||Sg)return h().then(y=>()=>Cb(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&&v0(f.parent.vnode)&&uC(f.parent.update)}).catch(y=>{d(y),m.value=y}),()=>{if(g.value&&l)return Cb(l,f);if(m.value&&n)return Pn(n,{error:m.value});if(t&&!v.value)return Pn(t)}}})}function Cb(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 v0=r=>r.type.__isKeepAlive,qW={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:e}){const t=_h(),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&&sg(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&&sg(w.da);const C=y.props&&y.props.onVnodeUnmounted;C&&Oo(C,w.parent,y),w.isDeactivated=!0},s)};function f(y){Bb(y),u(y,t,s,!0)}function d(y){i.forEach((w,C)=>{const O=ix(w.type);O&&(!y||!y(O))&&g(C)})}function g(y){const w=i.get(y);!o||w.type!==o.type?f(w):o&&Bb(o),i.delete(y),a.delete(y)}ye(()=>[r.include,r.exclude],([y,w])=>{y&&d(C=>xm(y,C)),w&&d(C=>!xm(w,C))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&i.set(m,bb(t.subTree))};return cr(v),pC(v),gC(()=>{i.forEach(y=>{const{subTree:w,suspense:C}=t,O=bb(w);if(y.type===O.type){Bb(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(!ih(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return o=null,w;let C=bb(w);const O=C.type,F=ix(Nf(C)?C.type.__asyncResolved||{}:O),{include:I,exclude:T,max:L}=r;if(I&&(!F||!xm(I,F))||T&&F&&xm(T,F))return o=C,w;const N=C.key==null?O:C.key,x=i.get(N);return C.el&&(C=pl(C),w.shapeFlag&128&&(w.ssContent=C)),m=N,x?(C.el=x.el,C.component=x.component,C.transition&&qf(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,m4(w.type)?w:C}}},ZW=qW;function xm(r,e){return Oe(r)?r.some(t=>xm(t,e)):Zn(r)?r.split(",").includes(e):r.test?r.test(e):!1}function B4(r,e){T4(r,"a",e)}function b4(r,e){T4(r,"da",e)}function T4(r,e,t=Ki){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(dC(e,n,t),t){let i=t.parent;for(;i&&i.parent;)v0(i.parent.vnode)&&JW(n,e,t,i),i=i.parent}}function JW(r,e,t,n){const i=dC(e,r,n,!0);pr(()=>{LO(n[e],i)},t)}function Bb(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function bb(r){return r.shapeFlag&128?r.ssContent:r}function dC(r,e,t=Ki,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;Zg(),ah(t);const s=gs(e,t,r,o);return Kc(),Jg(),s});return n?i.unshift(a):i.push(a),a}}const Ou=r=>(e,t=Ki)=>(!Sg||r==="sp")&&dC(r,(...n)=>e(...n),t),S4=Ou("bm"),cr=Ou("m"),x4=Ou("bu"),pC=Ou("u"),gC=Ou("bum"),pr=Ou("um"),I4=Ou("sp"),L4=Ou("rtg"),O4=Ou("rtc");function F4(r,e=Ki){dC("ec",r,e)}function tz(r,e){const t=_a;if(t===null)return r;const n=yC(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&&Nf(_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&&N4(a(t)),s=vC(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 N4(r){return r.some(e=>ih(e)?!(e.type===Wa||e.type===ya&&!N4(e.children)):!0)?r:null}function oz(r,e){const t={};for(const n in r)t[e&&/[A-Z]/.test(n)?`on:${n}`:Xm(n)]=r[n];return t}const YS=r=>r?J4(r)?yC(r)||r.proxy:YS(r.parent):null,qm=ui(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=>YS(r.parent),$root:r=>YS(r.root),$emit:r=>r.emit,$options:r=>qO(r),$forceUpdate:r=>r.f||(r.f=()=>uC(r.update)),$nextTick:r=>r.n||(r.n=lC.bind(r.proxy)),$watch:r=>zW.bind(r)}),Tb=(r,e)=>r!==wn&&!r.__isScriptSetup&&$r(r,e),XS={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(Tb(n,e))return o[e]=1,n[e];if(i!==wn&&$r(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&$r(l,e))return o[e]=3,a[e];if(t!==wn&&$r(t,e))return o[e]=4,t[e];qS&&(o[e]=0)}}const u=qm[e];let c,h;if(u)return e==="$attrs"&&vs(r,"get",e),u(r);if((c=s.__cssModules)&&(c=c[e]))return c;if(t!==wn&&$r(t,e))return o[e]=4,t[e];if(h=A.config.globalProperties,$r(h,e))return h[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return Tb(i,e)?(i[e]=t,!0):n!==wn&&$r(n,e)?(n[e]=t,!0):$r(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&&$r(r,o)||Tb(e,o)||(s=a[0])&&$r(s,o)||$r(n,o)||$r(qm,o)||$r(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:$r(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}},sz=ui({},XS,{get(r,e){if(e!==Symbol.unscopables)return XS.get(r,e,r)},has(r,e){return e[0]!=="_"&&!bK(e)}});let qS=!0;function Az(r){const e=qO(r),t=r.proxy,n=r.ctx;qS=!1,e.beforeCreate&&UN(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&&lz(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=md(rt))}if(qS=!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):dA,ct=!ar(nt)&&ar(nt.set)?nt.set.bind(t):dA,Tt=qe({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)P4(s[rt],n,t,rt);if(A){const rt=ar(A)?A.call(t):A;Reflect.ownKeys(rt).forEach(nt=>{Dr(nt,rt[nt])})}u&&UN(u,r,"c");function q(rt,nt){Oe(nt)?nt.forEach(At=>rt(At.bind(t))):nt&&rt(nt.bind(t))}if(q(S4,c),q(cr,h),q(x4,f),q(pC,d),q(B4,g),q(b4,m),q(F4,T),q(O4,F),q(L4,I),q(gC,y),q(pr,C),q(I4,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===dA&&(r.render=O),x!=null&&(r.inheritAttrs=x),S&&(r.components=S),P&&(r.directives=P)}function lz(r,e,t=dA,n=!1){Oe(r)&&(r=ZS(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 UN(r,e,t){gs(Oe(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function P4(r,e,t,n){const i=n.includes(".")?E4(t,n):()=>t[n];if(Zn(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=>P4(a,e,t,n));else{const a=ar(r.handler)?r.handler.bind(t):e[r.handler];ar(a)&&ye(i,a,r)}}function qO(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=>Rw(A,l,o,!0)),Rw(A,e,o)),Tn(e)&&a.set(e,A),A}function Rw(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&Rw(r,a,t,!0),i&&i.forEach(o=>Rw(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=uz[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const uz={data:DN,props:pf,emits:pf,methods:pf,computed:pf,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:pf,directives:pf,watch:hz,provide:DN,inject:cz};function DN(r,e){return e?r?function(){return ui(ar(r)?r.call(this,this):r,ar(e)?e.call(this,this):e)}:e:r}function cz(r,e){return pf(ZS(r),ZS(e))}function ZS(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]=D4(c,e,!0);ui(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,ag),ag;if(Oe(a))for(let u=0;u-1,f[1]=g<0||d-1||$r(f,"default"))&&s.push(c)}}}const l=[o,s];return Tn(r)&&n.set(r,l),l}function QN(r){return r[0]!=="$"}function kN(r){const e=r&&r.toString().match(/^\s*function (\w+)/);return e?e[1]:r===null?"null":""}function HN(r,e){return kN(r)===kN(e)}function GN(r,e){return Oe(e)?e.findIndex(t=>HN(t,r)):ar(e)&&HN(e,r)?0:-1}const Q4=r=>r[0]==="_"||r==="$stable",ZO=r=>Oe(r)?r.map(cs):[cs(r)],pz=(r,e,t)=>{if(e._n)return e;const n=VO((...i)=>ZO(e(...i)),t);return n._c=!1,n},k4=(r,e,t)=>{const n=r._ctx;for(const i in r){if(Q4(i))continue;const a=r[i];if(ar(a))e[i]=pz(i,a,n);else if(a!=null){const o=ZO(a);e[i]=()=>o}}},H4=(r,e)=>{const t=ZO(e);r.slots.default=()=>t},gz=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Kr(e),Ow(e,"_",t)):k4(e,r.slots={})}else r.slots={},e&&H4(r,e);Ow(r.slots,mC,1)},vz=(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:(ui(i,e),!t&&s===1&&delete i._):(a=!e.$stable,k4(e,i)),o=e}else e&&(H4(r,e),o={default:1});if(a)for(const s in i)!Q4(s)&&!(s in o)&&delete i[s]};function G4(){return{app:null,config:{isNativeTag:NK,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 mz=0;function yz(r,e){return function(n,i=null){ar(n)||(n=Object.assign({},n)),i!=null&&!Tn(i)&&(i=null);const a=G4(),o=new Set;let s=!1;const A=a.app={_uid:mz++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:sk,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,yC(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 Mw(r,e,t,n,i=!1){if(Oe(r)){r.forEach((h,f)=>Mw(h,e&&(Oe(e)?e[f]:e),t,n,i));return}if(Nf(n)&&!i)return;const a=n.shapeFlag&4?yC(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&&(Zn(l)?(u[l]=null,$r(c,l)&&(c[l]=null)):Aa(l)&&(l.value=null)),ar(A))hu(A,s,12,[o,u]);else{const h=Zn(A),f=Aa(A);if(h||f){const d=()=>{if(r.f){const g=h?$r(c,A)?c[A]:u[A]:A.value;i?Oe(g)&&LO(g,a):Oe(g)?g.includes(a)||g.push(a):h?(u[A]=[a],$r(c,A)&&(c[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else h?(u[A]=o,$r(c,A)&&(c[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(d.id=-1,ga(d,t)):d()}}}let uc=!1;const P_=r=>/svg/.test(r.namespaceURI)&&r.tagName!=="foreignObject",U_=r=>r.nodeType===8;function _z(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),Fw(),y._vnode=v;return}uc=!1,c(y.firstChild,v,null,null,null),Fw(),y._vnode=v,uc&&console.error("Hydration completed but contains mismatches.")},c=(v,y,w,C,O,F=!1)=>{const I=U_(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 Zf:P!==3?y.children===""?(A(y.el=i(""),o(v),v),U=v):U=T():(v.data!==y.children&&(uc=!0,v.data=y.children),U=a(v));break;case Wa:P!==8||I?U=T():U=a(v);break;case Pf: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&&YA(y,null,w,"created"),T)if(S||!F||L&48)for(const U in T)(S&&U.endsWith("value")||c0(U)&&!Ym(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&&YA(y,null,w,"beforeMount"),((P=T&&T.onVnodeMounted)||x)&&y4(()=>{P&&Oo(P,w,y),x&&YA(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;){uc=!0;const tt=U;U=U.nextSibling,s(tt)}}else N&8&&v.textContent!==y.children&&(uc=!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&&U_(L)&&L.data==="]"?a(y.anchor=L):(uc=!0,A(y.anchor=l("]"),T,L),L)},g=(v,y,w,C,O,F)=>{if(uc=!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,P_(T),O),I},m=v=>{let y=0;for(;v;)if(v=a(v),v&&U_(v)&&(v.data==="["&&y++,v.data==="]")){if(y===0)return a(v);y--}return v};return[u,c]}const ga=y4;function $4(r){return j4(r)}function V4(r){return j4(r,_z)}function j4(r,e){const t=HK();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=dA,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&&!ZA(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 Zf:m(j,Z,ft,it);break;case Wa:v(j,Z,ft,it);break;case Pf: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&&Mw(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&&YA(j,null,it,"created"),Nt){for(const oe in Nt)oe!=="value"&&!Ym(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)}I(Bt,j,j.scopeId,Mt,it),te&&YA(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&&YA(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&&rf(ft,!1),(Wt=Dt.onVnodeBeforeUpdate)&&Oo(Wt,ft,Z,j),Rt&&YA(Z,j,ft,"beforeUpdate"),ft&&rf(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&&YA(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)!Ym(Et)&&!(Et in it)&&a(j,Et,ft[Et],null,Mt,Z.children,V,Ft,J);for(const Et in it){if(Ym(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)&&JO(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=Z4(j,it,V);if(v0(j)&&(Et.ctx.renderer=X),tk(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(kW(j,Z,ft))if(it.asyncDep&&!it.asyncResolved){rt(it,Z,ft);return}else it.next=Z,OW(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;rf(j,!1),Rt?(Rt.el=te.el,rt(j,Rt,Mt)):Rt=te,Nt&&sg(Nt),(oe=Rt.props&&Rt.props.onVnodeBeforeUpdate)&&Oo(oe,Wt,Rt,te),rf(j,!0);const Jt=Z1(j),fe=j.subTree;j.subTree=Jt,g(fe,Jt,c(fe.el),ot(fe),j,V,Ft),Rt.el=Jt.el,Ae===null&&jO(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=Nf(Z);if(rf(j,!1),Wt&&sg(Wt),!oe&&(Rt=Dt&&Dt.onVnodeBeforeMount)&&Oo(Rt,Ae,Z),rf(j,!0),Nt&&at){const Jt=()=>{j.subTree=Z1(j),at(Nt,j.subTree,j,V,null)};oe?Z.type.__asyncLoader().then(()=>!j.isUnmounted&&Jt()):Jt()}else{const Jt=j.subTree=Z1(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&&Nf(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&j.a&&ga(j.a,V),j.isMounted=!0,Z=ft=it=null}},Bt=j.effect=new d0(Et,()=>uC(Ct),j.scope),Ct=j.update=()=>Bt.run();Ct.id=j.uid,rf(j,!0),Ct()},rt=(j,Z,ft)=>{Z.component=j;const it=j.vnode.props;j.vnode=Z,j.next=null,dz(j,Z.props,it,ft),vz(j,Z.children,ft),Zg(),FN(),Jg()},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||ag,Z=Z||ag;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?Tc(Z[Ct]):cs(Z[Ct]);if(ZA(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?Tc(Z[Dt]):cs(Z[Dt]);if(ZA(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?Tc(Z[Ct]):cs(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&&ZA(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?wz(ke):ag;for(oe=wr.length-1,Ct=fe-1;Ct>=0;Ct--){const Ne=te+Ct,Pe=Z[Ne],Hr=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&&Mw(Et,null,ft,j,!0),Rt&256){Z.ctx.deactivate(j);return}const Wt=Rt&1&&Dt,te=!Nf(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&&YA(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&&YA(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===Pf){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&&sg(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),FN(),Fw(),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:yz(ut,It)}}function rf({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function JO(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 Ez=r=>r.__isTeleport,Zm=r=>r&&(r.disabled||r.disabled===""),$N=r=>typeof SVGElement<"u"&&r instanceof SVGElement,tx=(r,e)=>{const t=r&&r.to;return Zn(t)?e?e(t):null:t},Cz={__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=Zm(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=tx(e.props,d),T=e.targetAnchor=g("");I&&(f(T,I),o=o||$N(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=Zm(r.props),L=T?t:F,N=T?O:I;if(o=o||$N(F),C?(h(r.dynamicChildren,C,L,i,a,o,s),JO(r,e,!0)):A||c(r,e,L,N,i,a,o,s,!1),v)T||D_(e,t,O,l,1);else if((e.props&&e.props.to)!==(r.props&&r.props.to)){const x=e.target=tx(e.props,d);x&&D_(e,x,null,l,0)}else T&&D_(e,F,I,l,1)}K4(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||!Zm(h))&&(a(l),s&16))for(let f=0;f0?Po||ag:null,W4(),Jf>0&&Po&&Po.push(r),r}function Yi(r,e,t,n,i,a){return z4(tF(r,e,t,n,i,a,!0))}function vC(r,e,t,n,i){return z4(Pn(r,e,t,n,i,!0))}function ih(r){return r?r.__v_isVNode===!0:!1}function ZA(r,e){return r.type===e.type&&r.key===e.key}function Tz(r){}const mC="__vInternal",Y4=({key:r})=>r??null,J1=({ref:r,ref_key:e,ref_for:t})=>r!=null?Zn(r)||Aa(r)||ar(r)?{i:_a,r,k:e,f:!!t}:r:null;function tF(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&&Y4(e),ref:e&&J1(e),scopeId:hC,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?(rF(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Zn(t)?8:16),Jf>0&&!o&&Po&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&Po.push(A),A}const Pn=Sz;function Sz(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===M4)&&(r=Wa),ih(r)){const s=pl(r,e,!0);return t&&rF(s,t),Jf>0&&!a&&Po&&(s.shapeFlag&6?Po[Po.indexOf(r)]=s:Po.push(s)),s.patchFlag|=-2,s}if(Nz(r)&&(r=r.__vccOpts),e){e=X4(e);let{class:s,style:A}=e;s&&!Zn(s)&&(e.class=u0(s)),Tn(A)&&(UO(A)&&!Oe(A)&&(A=ui({},A)),e.style=l0(A))}const o=Zn(r)?1:m4(r)?128:Ez(r)?64:Tn(r)?4:ar(r)?2:0;return tF(r,e,t,n,i,o,a,!0)}function X4(r){return r?UO(r)||mC in r?ui({},r):r:null}function pl(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?q4(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&Y4(s),ref:e&&e.ref?t&&i?Oe(i)?i.concat(J1(e)):[i,J1(e)]:J1(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&&pl(r.ssContent),ssFallback:r.ssFallback&&pl(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx}}function eF(r=" ",e=0){return Pn(Zf,null,r,e)}function xz(r,e){const t=Pn(Pf,null,r);return t.staticCount=e,t}function Mr(r="",e=!1){return e?(ti(),vC(Wa,null,r)):Pn(Wa,null,r)}function cs(r){return r==null||typeof r=="boolean"?Pn(Wa):Oe(r)?Pn(ya,null,r.slice()):typeof r=="object"?Tc(r):Pn(Zf,null,String(r))}function Tc(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:pl(r)}function rF(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),rF(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(mC 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=[eF(e)]):t=8);r.children=e,r.shapeFlag|=t}function q4(...r){const e={};for(let t=0;tKi||_a,ah=r=>{Ki=r,r.scope.on()},Kc=()=>{Ki&&Ki.scope.off(),Ki=null};function J4(r){return r.vnode.shapeFlag&4}let Sg=!1;function tk(r,e=!1){Sg=e;const{props:t,children:n}=r.vnode,i=J4(r);fz(r,t,i,e),gz(r,n);const a=i?Oz(r,e):void 0;return Sg=!1,a}function Oz(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=DO(new Proxy(r.ctx,XS));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?rk(r):null;ah(r),Zg();const a=hu(n,r,0,[r.props,i]);if(Jg(),Kc(),OO(a)){if(a.then(Kc,Kc),e)return a.then(o=>{rx(r,o,e)}).catch(o=>{yd(o,r,0)});r.asyncDep=a}else rx(r,a,e)}else ek(r,e)}function rx(r,e,t){ar(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Tn(e)&&(r.setupState=HO(e)),ek(r,t)}let Nw,nx;function Fz(r){Nw=r,nx=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,sz))}}const Rz=()=>!Nw;function ek(r,e,t){const n=r.type;if(!r.render){if(!e&&Nw&&!n.render){const i=n.template||qO(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=ui(ui({isCustomElement:a,delimiters:s},o),A);n.render=Nw(i,l)}}r.render=n.render||dA,nx&&nx(r)}ah(r),Zg(),Az(r),Jg(),Kc()}function Mz(r){return new Proxy(r.attrs,{get(e,t){return vs(r,"get","$attrs"),e[t]}})}function rk(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=Mz(r))},slots:r.slots,emit:r.emit,expose:e}}function yC(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(HO(DO(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in qm)return qm[t](r)},has(e,t){return t in e||t in qm}}))}function ix(r,e=!0){return ar(r)?r.displayName||r.name:r.name||e&&r.__name}function Nz(r){return ar(r)&&"__vccOpts"in r}const qe=(r,e)=>SW(r,e,Sg);function Pz(){return null}function Uz(){return null}function Dz(r){}function Qz(r,e){return null}function kz(){return nk().slots}function Hz(){return nk().attrs}function nk(){const r=_h();return r.setupContext||(r.setupContext=rk(r))}function Gz(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 $z(r,e){const t={};for(const n in r)e.includes(n)||Object.defineProperty(t,n,{enumerable:!0,get:()=>r[n]});return t}function Vz(r){const e=_h();let t=r();return Kc(),OO(t)&&(t=t.catch(n=>{throw ah(e),n})),[t,()=>ah(e)]}function _C(r,e,t){const n=arguments.length;return n===2?Tn(e)&&!Oe(e)?ih(e)?Pn(r,null,[e]):Pn(r,e):Pn(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&ih(t)&&(t=[t]),Pn(r,e,t))}const ik=Symbol(""),ak=()=>Be(ik);function jz(){}function Kz(r,e,t,n){const i=t[n];if(i&&ok(i,r))return i;const a=e();return a.memo=r.slice(),t[n]=a}function ok(r,e){const t=r.memo;if(t.length!=e.length)return!1;for(let n=0;n0&&Po&&Po.push(r),!0}const sk="3.2.45",Wz={createComponentInstance:Z4,setupComponent:tk,renderComponentRoot:Z1,setCurrentRenderingInstance:Iy,isVNode:ih,normalizeVNode:cs},zz=Wz,Yz=null,Xz=null,qz="http://www.w3.org/2000/svg",wf=typeof document<"u"?document:null,VN=wf&&wf.createElement("template"),Zz={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?wf.createElementNS(qz,r):wf.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>wf.createTextNode(r),createComment:r=>wf.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>wf.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{VN.innerHTML=n?`${r}`:r;const s=VN.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 Jz(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 tY(r,e,t){const n=r.style,i=Zn(t);if(t&&!i){for(const a in t)ax(n,a,t[a]);if(e&&!Zn(e))for(const a in e)t[a]==null&&ax(n,a,"")}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const jN=/\s*!important$/;function ax(r,e,t){if(Oe(t))t.forEach(n=>ax(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=eY(r,e);jN.test(t)?r.setProperty(Ps(n),t.replace(jN,""),"important"):r[n]=t}}const KN=["Webkit","Moz","ms"],Sb={};function eY(r,e){const t=Sb[e];if(t)return t;let n=Uo(e);if(n!=="filter"&&n in r)return Sb[e]=n;n=f0(n);for(let i=0;ixb||(sY.then(()=>xb=0),xb=Date.now());function lY(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;gs(uY(n,t.value),e,5,[n])};return t.value=r,t.attached=AY(),t}function uY(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 YN=/^on[a-z]/,cY=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?Jz(r,n,i):e==="style"?tY(r,t,n):c0(e)?IO(e)||aY(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):hY(r,e,n,i))?nY(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),rY(r,e,n,i))};function hY(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&YN.test(e)&&ar(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||YN.test(e)&&Zn(t)?!1:e in r}function Ak(r,e){const t=g0(r);class n extends wC{constructor(a){super(t,a,e)}}return n.def=t,n}const fY=r=>Ak(r,Ck),dY=typeof HTMLElement<"u"?HTMLElement:class{};class wC extends dY{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,lC(()=>{this._connected||(Ax(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]=_u(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=_u(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(Ps(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(Ps(e),t+""):t||this.removeAttribute(Ps(e))))}_update(){Ax(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Pn(this._def,ui({},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),Ps(a)!==a&&n(Ps(a),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof wC){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 pY(r="$style"){{const e=_h();if(!e)return wn;const t=e.type.__cssModules;if(!t)return wn;const n=t[r];return n||wn}}function gY(r){const e=_h();if(!e)return;const t=e.ut=(i=r(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>sx(a,i))},n=()=>{const i=r(e.proxy);ox(e.subTree,i),t(i)};w4(n),cr(()=>{const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),pr(()=>i.disconnect())})}function ox(r,e){if(r.shapeFlag&128){const t=r.suspense;r=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{ox(t.activeBranch,e)})}for(;r.component;)r=r.component.subTree;if(r.shapeFlag&1&&r.el)sx(r.el,e);else if(r.type===ya)r.children.forEach(t=>ox(t,e));else if(r.type===Pf){let{el:t,anchor:n}=r;for(;t&&(sx(t,e),t!==n);)t=t.nextSibling}}function sx(r,e){if(r.nodeType===1){const t=r.style;for(const n in e)t.setProperty(`--${n}`,e[n])}}const cc="transition",tm="animation",nF=(r,{slots:e})=>_C(zO,uk(r),e);nF.displayName="Transition";const lk={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},vY=nF.props=ui({},zO.props,lk),nf=(r,e=[])=>{Oe(r)?r.forEach(t=>t(...e)):r&&r(...e)},XN=r=>r?Oe(r)?r.some(e=>e.length>1):r.length>1:!1;function uk(r){const e={};for(const S in r)S in lk||(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=mY(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)=>{Ec(S,P?u:s),Ec(S,P?l:o),U&&U()},N=(S,P)=>{S._isLeaving=!1,Ec(S,c),Ec(S,f),Ec(S,h),P&&P()},x=S=>(P,U)=>{const tt=S?I:y,q=()=>L(P,S,U);nf(tt,[P,q]),qN(()=>{Ec(P,S?A:a),tu(P,S?u:s),XN(tt)||ZN(P,n,g,q)})};return ui(e,{onBeforeEnter(S){nf(v,[S]),tu(S,a),tu(S,o)},onBeforeAppear(S){nf(F,[S]),tu(S,A),tu(S,l)},onEnter:x(!1),onAppear:x(!0),onLeave(S,P){S._isLeaving=!0;const U=()=>N(S,P);tu(S,c),hk(),tu(S,h),qN(()=>{S._isLeaving&&(Ec(S,c),tu(S,f),XN(C)||ZN(S,n,m,U))}),nf(C,[S,U])},onEnterCancelled(S){L(S,!1),nf(w,[S])},onAppearCancelled(S){L(S,!0),nf(T,[S])},onLeaveCancelled(S){N(S),nf(O,[S])}})}function mY(r){if(r==null)return null;if(Tn(r))return[Ib(r.enter),Ib(r.leave)];{const e=Ib(r);return[e,e]}}function Ib(r){return _u(r)}function tu(r,e){e.split(/\s+/).forEach(t=>t&&r.classList.add(t)),(r._vtc||(r._vtc=new Set)).add(e)}function Ec(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 qN(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let yY=0;function ZN(r,e,t,n){const i=r._endId=++yY,a=()=>{i===r._endId&&n()};if(t)return setTimeout(a,t);const{type:o,timeout:s,propCount:A}=ck(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(`${cc}Delay`),a=n(`${cc}Duration`),o=JN(i,a),s=n(`${tm}Delay`),A=n(`${tm}Duration`),l=JN(s,A);let u=null,c=0,h=0;e===cc?o>0&&(u=cc,c=o,h=a.length):e===tm?l>0&&(u=tm,c=l,h=A.length):(c=Math.max(o,l),u=c>0?o>l?cc:tm:null,h=u?u===cc?a.length:A.length:0);const f=u===cc&&/\b(transform|all)(,|$)/.test(n(`${cc}Property`).toString());return{type:u,timeout:c,propCount:h,hasTransform:f}}function JN(r,e){for(;r.lengthtP(t)+tP(r[n])))}function tP(r){return Number(r.slice(0,-1).replace(",","."))*1e3}function hk(){return document.body.offsetHeight}const fk=new WeakMap,dk=new WeakMap,_Y={name:"TransitionGroup",props:ui({},vY,{tag:String,moveClass:String}),setup(r,{slots:e}){const t=_h(),n=WO();let i,a;return pC(()=>{if(!i.length)return;const o=r.moveClass||`${r.name||"v"}-move`;if(!bY(i[0].el,t.vnode.el,o))return;i.forEach(EY),i.forEach(CY);const s=i.filter(BY);hk(),s.forEach(A=>{const l=A.el,u=l.style;tu(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,Ec(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=Kr(r),s=uk(o);let A=o.tag||ya;i=a,a=e.default?fC(e.default()):[];for(let l=0;l{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}=ck(n);return i.removeChild(n),a}const oh=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Oe(e)?t=>sg(e,t):e};function TY(r){r.target.composing=!0}function eP(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Pw={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r._assign=oh(i);const a=n||i.props&&i.props.type==="number";su(r,e?"change":"input",o=>{if(o.target.composing)return;let s=r.value;t&&(s=s.trim()),a&&(s=_u(s)),r._assign(s)}),t&&su(r,"change",()=>{r.value=r.value.trim()}),e||(su(r,"compositionstart",TY),su(r,"compositionend",eP),su(r,"change",eP))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,modifiers:{lazy:t,trim:n,number:i}},a){if(r._assign=oh(a),r.composing||document.activeElement===r&&r.type!=="range"&&(t||n&&r.value.trim()===e||(i||r.type==="number")&&_u(r.value)===e))return;const o=e??"";r.value!==o&&(r.value=o)}},iF={deep:!0,created(r,e,t){r._assign=oh(t),su(r,"change",()=>{const n=r._modelValue,i=xg(r),a=r.checked,o=r._assign;if(Oe(n)){const s=rC(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(vd(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(gk(r,a))})},mounted:rP,beforeUpdate(r,e,t){r._assign=oh(t),rP(r,e,t)}};function rP(r,{value:e,oldValue:t},n){r._modelValue=e,Oe(e)?r.checked=rC(e,n.props.value)>-1:vd(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=eh(e,gk(r,!0)))}const aF={created(r,{value:e},t){r.checked=eh(e,t.props.value),r._assign=oh(t),su(r,"change",()=>{r._assign(xg(r))})},beforeUpdate(r,{value:e,oldValue:t},n){r._assign=oh(n),e!==t&&(r.checked=eh(e,n.props.value))}},pk={deep:!0,created(r,{value:e,modifiers:{number:t}},n){const i=vd(e);su(r,"change",()=>{const a=Array.prototype.filter.call(r.options,o=>o.selected).map(o=>t?_u(xg(o)):xg(o));r._assign(r.multiple?i?new Set(a):a:a[0])}),r._assign=oh(n)},mounted(r,{value:e}){nP(r,e)},beforeUpdate(r,e,t){r._assign=oh(t)},updated(r,{value:e}){nP(r,e)}};function nP(r,e){const t=r.multiple;if(!(t&&!Oe(e)&&!vd(e))){for(let n=0,i=r.options.length;n-1:a.selected=e.has(o);else if(eh(xg(a),e)){r.selectedIndex!==n&&(r.selectedIndex=n);return}}!t&&r.selectedIndex!==-1&&(r.selectedIndex=-1)}}function xg(r){return"_value"in r?r._value:r.value}function gk(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const vk={created(r,e,t){Q_(r,e,t,null,"created")},mounted(r,e,t){Q_(r,e,t,null,"mounted")},beforeUpdate(r,e,t,n){Q_(r,e,t,n,"beforeUpdate")},updated(r,e,t,n){Q_(r,e,t,n,"updated")}};function mk(r,e){switch(r){case"SELECT":return pk;case"TEXTAREA":return Pw;default:switch(e){case"checkbox":return iF;case"radio":return aF;default:return Pw}}}function Q_(r,e,t,n,i){const o=mk(r.tagName,t.props&&t.props.type)[i];o&&o(r,e,t,n)}function SY(){Pw.getSSRProps=({value:r})=>({value:r}),aF.getSSRProps=({value:r},e)=>{if(e.props&&eh(e.props.value,r))return{checked:!0}},iF.getSSRProps=({value:r},e)=>{if(Oe(r)){if(e.props&&rC(r,e.props.value)>-1)return{checked:!0}}else if(vd(r)){if(e.props&&r.has(e.props.value))return{checked:!0}}else if(r)return{checked:!0}},vk.getSSRProps=(r,e)=>{if(typeof e.type!="string")return;const t=mk(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(r,e)}}const xY=["ctrl","shift","alt","meta"],IY={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)=>xY.some(t=>r[`${t}Key`]&&!e.includes(t))},LY=(r,e)=>(t,...n)=>{for(let i=0;it=>{if(!("key"in t))return;const n=Ps(t.key);if(e.some(i=>i===n||OY[i]===n))return r(t)},yk={beforeMount(r,{value:e},{transition:t}){r._vod=r.style.display==="none"?"":r.style.display,t&&e?t.beforeEnter(r):em(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),em(r,!0),n.enter(r)):n.leave(r,()=>{em(r,!1)}):em(r,e))},beforeUnmount(r,{value:e}){em(r,e)}};function em(r,e){r.style.display=e?r._vod:"none"}function RY(){yk.getSSRProps=({value:r})=>{if(!r)return{style:{display:"none"}}}}const _k=ui({patchProp:cY},Zz);let ty,iP=!1;function wk(){return ty||(ty=$4(_k))}function Ek(){return ty=iP?ty:V4(_k),iP=!0,ty}const Ax=(...r)=>{wk().render(...r)},Ck=(...r)=>{Ek().hydrate(...r)},Bk=(...r)=>{const e=wk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=bk(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},MY=(...r)=>{const e=Ek().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=bk(n);if(i)return t(i,!0,i instanceof SVGElement)},e};function bk(r){return Zn(r)?document.querySelector(r):r}let aP=!1;const NY=()=>{aP||(aP=!0,SY(),RY())},PY=()=>{},UY=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:zO,Comment:Wa,EffectScope:RO,Fragment:ya,KeepAlive:ZW,ReactiveEffect:d0,Static:Pf,Suspense:GW,Teleport:bz,Text:Zf,Transition:nF,TransitionGroup:wY,VueElement:wC,callWithAsyncErrorHandling:gs,callWithErrorHandling:hu,camelize:Uo,capitalize:f0,cloneVNode:pl,compatUtils:Xz,compile:PY,computed:qe,createApp:Bk,createBlock:vC,createCommentVNode:Mr,createElementBlock:Yi,createElementVNode:tF,createHydrationRenderer:V4,createPropsRestProxy:$z,createRenderer:$4,createSSRApp:MY,createSlots:az,createStaticVNode:xz,createTextVNode:eF,createVNode:Pn,customRef:BW,defineAsyncComponent:XW,defineComponent:g0,defineCustomElement:Ak,defineEmits:Uz,defineExpose:Dz,defineProps:Pz,defineSSRCustomElement:fY,get devtools(){return Mp},effect:WK,effectScope:GK,getCurrentInstance:_h,getCurrentScope:$K,getTransitionRawChildren:fC,guardReactiveProps:X4,h:_C,handleError:yd,hydrate:Ck,initCustomFormatter:jz,initDirectivesForSSR:NY,inject:Be,isMemoSame:ok,isProxy:UO,isReactive:Rf,isReadonly:Xf,isRef:Aa,isRuntimeOnly:Rz,isShallow:by,isVNode:ih,markRaw:DO,mergeDefaults:Gz,mergeProps:q4,nextTick:lC,normalizeClass:u0,normalizeProps:LK,normalizeStyle:l0,onActivated:B4,onBeforeMount:S4,onBeforeUnmount:gC,onBeforeUpdate:x4,onDeactivated:b4,onErrorCaptured:F4,onMounted:cr,onRenderTracked:O4,onRenderTriggered:L4,onScopeDispose:VK,onServerPrefetch:I4,onUnmounted:pr,onUpdated:pC,openBlock:ti,popScopeId:NW,provide:Dr,proxyRefs:HO,pushScopeId:MW,queuePostFlushCb:$O,reactive:md,readonly:PO,ref:Fo,registerRuntimeCompiler:Fz,render:Ax,renderList:iz,renderSlot:Rr,resolveComponent:R4,resolveDirective:nz,resolveDynamicComponent:rz,resolveFilter:Yz,resolveTransitionHooks:Tg,setBlockTracking:ex,setDevtoolsHook:g4,setTransitionHooks:qf,shallowReactive:A4,shallowReadonly:yW,shallowRef:l4,ssrContextKey:ik,ssrUtils:zz,stop:zK,toDisplayString:MK,toHandlerKey:Xm,toHandlers:oz,toRaw:Kr,toRef:c4,toRefs:nh,transformVNodeArgs:Tz,triggerRef:wW,unref:Mf,useAttrs:Hz,useCssModule:pY,useCssVars:gY,useSSRContext:ak,useSlots:kz,useTransitionState:WO,vModelCheckbox:iF,vModelDynamic:vk,vModelRadio:aF,vModelSelect:pk,vModelText:Pw,vShow:yk,version:sk,warn:xW,watch:ye,watchEffect:_4,watchPostEffect:w4,watchSyncEffect:WW,withAsyncContext:Vz,withCtx:VO,withDefaults:Qz,withDirectives:tz,withKeys:FY,withMemo:Kz,withModifiers:LY,withScopeId:PW},Symbol.toStringTag,{value:"Module"})),DY=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},QY={};function kY(r,e){const t=R4("router-view");return ti(),vC(t)}const HY=DY(QY,[["render",kY]]);var GY=Object.defineProperty,$Y=Object.defineProperties,VY=Object.getOwnPropertyDescriptors,oP=Object.getOwnPropertySymbols,jY=Object.prototype.hasOwnProperty,KY=Object.prototype.propertyIsEnumerable,sP=(r,e,t)=>e in r?GY(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Jn=(r,e)=>{for(var t in e||(e={}))jY.call(e,t)&&sP(r,t,e[t]);if(oP)for(var t of oP(e))KY.call(e,t)&&sP(r,t,e[t]);return r},CA=(r,e)=>$Y(r,VY(e)),WY=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),EC=WY;function zY(r,e,t){for(var n,i,a=t||sh,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 sh(r,e){return r>e?1:r=0}function CC(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 ll(){return!0}function _d(){return!1}function td(){}function qY(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 ZY=0;function Ee(r){return r.ol_uid||(r.ol_uid=String(++ZY))}var Tk="6.14.1",Ah=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",JY=Ah.indexOf("firefox")!==-1,tX=Ah.indexOf("safari")!==-1&&Ah.indexOf("chrom")==-1,eX=tX&&!!(Ah.indexOf("version/15.4")>=0||Ah.match(/cpu (os|iphone os) 15_4 like mac os x/)),rX=Ah.indexOf("webkit")!==-1&&Ah.indexOf("edge")==-1,Sk=Ah.indexOf("macintosh")!==-1,ed=typeof devicePixelRatio<"u"?devicePixelRatio:1,BC=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,nX=typeof Image<"u"&&Image.prototype.decode,xk=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}(),iX=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)}}(),aX=function(r){iX(e,r);function e(t){var n=this,i="v"+Tk.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),Ik=aX;function Le(r,e){if(!r)throw new Ik(e)}var oF=new Array(6);function Si(){return[1,0,0,1,0,0]}function ey(r){return m0(r,1,0,0,1,0,0)}function tv(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 m0(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 oX(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 sX(r,e){var t=Math.cos(e),n=Math.sin(e);return tv(r,m0(oF,t,n,-n,t,0,0))}function ry(r,e,t){return tv(r,m0(oF,e,0,0,t,0,0))}function AX(r,e,t){return m0(r,e,0,0,t,0,0)}function lX(r,e,t){return tv(r,m0(oF,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 y0(r,e){var t=uX(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 uX(r){return r[0]*r[3]-r[1]*r[2]}var AP;function sF(r){var e="matrix("+r.join(", ")+")";if(BC)return e;var t=AP||(AP=document.createElement("div"));return t.style.transform=e,t.style.transform}var Im={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=Ui(),t=0,n=r.length;ti&&(A=A|aa.RIGHT),sa&&(A=A|aa.ABOVE),A===aa.UNKNOWN&&(A=aa.INTERSECTING),A}function Ui(){return[1/0,1/0,-1/0,-1/0]}function ko(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 Eh(r){return ko(1/0,1/0,-1/0,-1/0,r)}function Uf(r,e){var t=r[0],n=r[1];return ko(t,n,t,n,e)}function hX(r,e){var t=Eh(e);return lF(t,r)}function TC(r,e,t,n,i){var a=Eh(i);return uF(a,r,e,t,n)}function fX(r,e){var t=Eh(e);return Lk(t,r)}function gl(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function dX(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 Df(r,e){e[0]r[2]&&(r[2]=e[0]),e[1]r[3]&&(r[3]=e[1])}function lF(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 rv(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 cF(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=jr(t),a=Math.floor((n[0]-t[0])/i),o=a*i;r[0]-=o,r[2]-=o}return r}var yX=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:oa,buffer:_o,clone:AF,closestSquaredDistanceXY:wh,containsCoordinate:gA,containsExtent:fs,containsXY:bC,coordinateRelationship:Uw,createEmpty:Ui,createOrUpdate:ko,createOrUpdateEmpty:Eh,createOrUpdateFromCoordinate:Uf,createOrUpdateFromCoordinates:hX,createOrUpdateFromFlatCoordinates:TC,createOrUpdateFromRings:fX,equals:gl,approximatelyEquals:dX,extend:lh,extendCoordinate:Df,extendCoordinates:lF,extendFlatCoordinates:uF,extendRings:Lk,extendXY:Ok,forEachCorner:SC,getArea:Oy,getBottomLeft:_0,getBottomRight:ev,getCenter:Ya,getCorner:Fk,getEnlargedArea:pX,getForViewAndSize:Qf,getHeight:Ii,getIntersectionArea:gX,getIntersection:Qs,getMargin:vX,getSize:mX,getTopLeft:BA,getTopRight:w0,getWidth:jr,intersects:Xn,isEmpty:rv,returnOrUpdate:Rk,scaleFromCenter:Mk,intersectsSegment:Nk,applyTransform:cF,wrapX:Pk},Symbol.toStringTag,{value:"Module"}));function Un(r,e,t){return Math.min(Math.max(r,e),t)}var _X=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),Uk=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function wX(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 kf(r,e,t,n)}function kf(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function EX(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 lP(r){return r*180/Math.PI}function Wc(r){return r*Math.PI/180}function zc(r,e){var t=r%e;return t*e<0?t+e:t}function au(r,e,t){return r+t*(e-r)}function hF(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function uP(r,e){return Math.round(hF(r,e))}function Wp(r,e){return Math.floor(hF(r,e))}function Nc(r,e){return Math.ceil(hF(r,e))}var Dk=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Qk=/^([a-z]*)$|^hsla?\(.*\)$/i;function fu(r){return typeof r=="string"?r:Gk(r)}function kk(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 Hk=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=CX(n),e[n]=i,++t}return i}}();function uh(r){return Array.isArray(r)?r:Hk(r)}function CX(r){var e,t,n,i,a;if(Qk.exec(r)&&(r=kk(r)),Dk.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),cP(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),cP(a)):Le(!1,14);return a}function cP(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 Gk(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 BX(r){return Qk.test(r)&&(r=kk(r)),Dk.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var bX=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=hP(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=hP(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function hP(r,e,t){var n=t?fu(t):"null";return e+":"+r+":"+n}var Dw=new bX,TX=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 SX(r){r.stopPropagation()}var $o=TX,rd={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]=td,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(EC),Ed=IX,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 Fy(r,e,t,n){return je(r,e,t,n,!0)}function Yr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),wd(r))}var LX=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)}}(),E0=function(r){LX(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 Cd=NX;function rm(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 Vk(r,e){for(var t=(""+r).split("."),n=(""+e).split("."),i=0;io)return 1;if(o>a)return-1}return 0}function jk(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function PX(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 pF(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 lA(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function gF(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 Kk(r,e){return r[0]*=e,r[1]*=e,r}function du(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function dP(r,e){return Math.sqrt(du(r,e))}function UX(r,e){return du(r,pF(r,e))}function vF(r,e){if(e.canWrapX()){var t=jr(e.getExtent()),n=Wk(r,e,t);n&&(r[0]-=n*t)}return r}function Wk(r,e,t){var n=e.getExtent(),i=0;if(e.canWrapX()&&(r[0]n[2])){var a=t||jr(n);i=Math.floor((r[0]-n[0])/a)}return i}var DX=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)}}(),QX=function(r){DX(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]),y0(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=vF(t.slice(),f),g=[[0,0]];if(f.canWrapX()&&a){var m=f.getExtent(),v=jr(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()&&Qw(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,ll,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){Dw.canExpireCache()&&t.postRenderFunctions.push(kX)},e}(EC);function kX(r,e){Dw.expire()}var HX=QX,GX=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)}}(),$X=function(r){GX(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}($o),ny=$X,k_="ol-hidden",VX="ol-selectable",vl="ol-unselectable",pP="ol-unsupported",Bd="ol-control",kw="ol-collapsed",jX=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"),gP=["style","variant","weight","size","lineHeight","family"],zk=function(r){var e=r.match(jX);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=gP.length;n=0;--s)a[s].renderDeclutter(t);zX(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()&&Qw(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}(HX),Jk=rq,si={ADD:"add",REMOVE:"remove"},t8=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)}}(),mP={LENGTH:"length"},H_=function(r){t8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.element=n,a.index=i,a}return e}($o),nq=function(r){t8(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}(Ed),cq=uq,XA={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},_i={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},jw=1/0,hq=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,wd(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!=jw?(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}(fq),gq=pq;function vq(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return jw;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"},nv={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},vA={};vA[nv.RADIANS]=6370997/(2*Math.PI);vA[nv.DEGREES]=2*Math.PI*6370997/360;vA[nv.FEET]=.3048;vA[nv.METERS]=1;vA[nv.USFEET]=1200/3937;var ho=nv,In={ANIMATING:0,INTERACTING:1},ls={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},mq=42,mF=256,yq=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_||vA[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=yq,_q=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,zp=Math.PI*B0,wq=[-zp,-zp,zp,zp],Eq=[-180,-85,180,85],G_=B0*Math.log(Math.tan(Math.PI/2)),dp=function(r){_q(e,r);function e(t){return r.call(this,{code:t,units:ho.METERS,extent:wq,global:!0,worldExtent:Eq,getPointResolution:function(n,i){return n/_X(i[1]/B0)}})||this}return e}(Ru),yP=[new dp("EPSG:3857"),new dp("EPSG:102100"),new dp("EPSG:102113"),new dp("EPSG:900913"),new dp("http://www.opengis.net/def/crs/EPSG/0/3857"),new dp("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Cq(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;oG_?s=G_:s<-G_&&(s=-G_),a[o+1]=s}return a}function Bq(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 Mq(r,e,t,n){var i=Ve(r),a=Ve(e);Og(i,a,EP(t)),Og(a,i,EP(n))}function tl(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=id(r,e);return n===yF&&t}function id(r,e){var t=r.getCode(),n=e.getCode(),i=r8(t,n);return i||(i=xC),i}function Qy(r,e){var t=Ve(r),n=Ve(e);return id(t,n)}function ch(r,e,t){var n=Qy(e,t);return n(r,void 0,r.length)}function zw(r,e,t,n){var i=Qy(e,t);return cF(r,i,void 0,n)}var Nq=null;function ad(){return Nq}function Fg(r,e){return r}function Mn(r,e){return hx&&!lA(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(hx=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function IC(r,e){return r}function ds(r,e){return r}function Pq(r,e){return r}function CP(r,e,t){return function(n){var i=n[0],a=n[1],o,s;if(r.canWrapX()){var A=r.getExtent(),l=jr(A);s=Wk(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*jr(e.getExtent())),o}}function Uq(){fx(yP),fx(wP),Rq(wP,yP,Cq,Bq)}Uq();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 Dq(r){return r}function wF(r,e,t,n){var i=jr(e)/t[0],a=Ii(e)/t[1];return n?Math.min(r,Math.max(i,a)):Math.min(r,Math.min(i,a))}function EF(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 Qq(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?wF(A,t,o,n):A;if(s){var c=e!==void 0?e:!0;return c?EF(i,u,l):Un(i,l,u)}var h=Math.min(u,i),f=Math.floor(CC(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 xF(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 s8(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 RF(r,e,t,n,i,a){if(t.length===0||!Sf(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;oC&&(l=(u+c)/2,RF(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 u8(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:c8(r,e,t,n,function(o,s){return Nk(i,o,s)}):!1}function c3(r,e,t,n,i){for(var a=0,o=t.length;a0}function f8(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?zc(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&&$_(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]],gF(i,t-this.getRotation()),jk(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&&Fg(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(ls.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return 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 IC(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),Qf(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(ls.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(ds(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=jr(t)/i[0],o=Ii(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(ls.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=Fb(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=CC(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(!rv(t),25);var a=ds(t,this.getProjection());i=hh(a)}else if(t.getType()===pt.CIRCLE){var a=ds(t.getExtent(),this.getProjection());i=hh(a),i.rotate(this.getRotation(),Ya(a))}else{var o=ad();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 p8(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 T3=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 g8(r){if(r instanceof Cd){r.setMapInternal(null);return}r instanceof C0&&r.getLayers().forEach(g8)}function v8(r,e){if(r instanceof Cd){r.setMapInternal(e);return}if(r instanceof C0)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_)){Xk(this.ulElement_);for(var a=0,o=n.length;a0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:Hs}):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(k_);!o&&i===0?this.element.classList.add(k_):o&&i!==0&&this.element.classList.remove(k_)}this.label_.style.transform=a}this.rotation_=i}},e}(Nr),_8=N3,P3=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)}}(),U3=function(r){P3(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+" "+vl+" "+Bd,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:Hs})):i.setZoom(o)}}},e}(Nr),w8=U3,D3=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)}}(),FP=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],RP={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},Q3=function(r){D3(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(vl," ").concat(Bd),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(MP(n))if(NP(n))H3(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?k3(i):E8(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=NP(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(Ig(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(RP.ENTERFULLSCREEN)):(Ig(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(RP.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(_i.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(_i.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,n=0,i=t.length;nd*Mb||f>g*Mb?this.resetExtent_():fs(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(Mb/V_)/Math.LN2,l=1/(Math.pow(2,A/2)*V_);Mk(o,l),s.fitInternal(hh(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_=Fy(this.ovmap_,XA.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(kw),this.collapsed_?Ig(this.collapseLabel_,this.label_):Ig(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),X3=Y3,q3=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)}}(),Nb="units",of={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},Z3=[1,2,5],Pb=25.4/.28,J3=function(r){q3(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+" "+vl,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(Nb,n.handleUnitsChanged_),n.setUnits(i.units||of.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(Nb)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Nb,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==of.DEGREES?ho.DEGREES:ho.METERS,s=Ww(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||Pb)/Pb,l=A*s,u="";if(a==of.DEGREES){var c=vA[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=Ww(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,ho.METERS),n=this.dpi_||Pb,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),tZ=J3,eZ=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)}}(),nm={VERTICAL:0,HORIZONTAL:1},rZ=function(r){eZ(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_=nm.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 "+vl;var s=n.element;return s.className=a+" "+vl+" "+Bd,s.appendChild(o),s.addEventListener(JA.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(JA.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(JA.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(xe.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(xe.CLICK,SX,!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_=nm.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=nm.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:Hs})},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,JA.POINTERMOVE,i,this),je(o,JA.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_==nm.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_===nm.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),nZ=rZ,iZ=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)}}(),aZ=function(r){iZ(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+" "+vl+" "+Bd,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(hh(i))},e}(Nr),oZ=aZ;function sZ(r){var e=r||{},t=new xi,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new w8(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new _8(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new y8(e.attributionOptions)),t}var vx={ACTIVE:"active"},AZ=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)}}(),lZ=function(r){AZ(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(vx.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(vx.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(Li);function uZ(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:bF,center:r.getConstrainedCenter(i)})}}function NF(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:Hs})}}var iv=lZ,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)}}(),hZ=function(r){cZ(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();NF(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(iv),fZ=hZ,dZ=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)}}(),pZ=function(r){dZ(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(gZ(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=fF(this.trackedPointers_)}},e}(iv);function PF(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}(ws),TZ=bZ,SZ=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)}}(),xZ=function(r){SZ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:_d})||this,n.condition_=i.condition?i.condition:T8,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(Hf(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==CF){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(!Hf(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!Hf(t))return!1;if(DF(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(ws),IZ=xZ,LZ=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)}}(),OZ=function(r){LZ(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}(EC),FZ=OZ,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)}}(),j_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},Ub=function(r){x8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.coordinate=n,a.mapBrowserEvent=i,a}return e}($o),RZ=function(r){x8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new FZ(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:DF,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 Ub(j_.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 Ub(n?j_.BOXEND:j_.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 Ub(j_.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(ws),MZ=RZ,NZ=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)}}(),PZ=function(r){NZ(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:T0;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:Hs})},e}(MZ),UZ=PZ,sf={LEFT:37,UP:38,RIGHT:39,DOWN:40},DZ=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){DZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return PC(a)&&QF(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==sf.DOWN||a==sf.LEFT||a==sf.RIGHT||a==sf.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==sf.DOWN?u=-A:a==sf.LEFT?l=-A:a==sf.RIGHT?l=A:u=A;var c=[l,u];gF(c,s.getRotation()),uZ(s,c,this.duration_),i.preventDefault(),n=!0}}return!n},e}(iv),kZ=QZ,HZ=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)}}(),GZ=function(r){HZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:QF,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();NF(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(iv),$Z=GZ,VZ=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}(),jZ=VZ,KZ=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)}}(),Db={TRACKPAD:"trackpad",WHEEL:"wheel"},WZ=function(r){KZ(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:MC;return n.condition_=i.onFocusOnly?Xw(UF,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,JY&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=ed),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?Db.TRACKPAD:Db.WHEEL);var A=i.getView();if(this.mode_===Db.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),NF(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}(iv),zZ=WZ,YZ=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)}}(),XZ=function(r){YZ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=_d),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!==CF){var u=A.getViewport().getBoundingClientRect(),c=PF(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}(ws),qZ=XZ,ZZ=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){ZZ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=_d),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=PF(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}(ws),tJ=JZ,hA={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},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)}}(),rJ=function(r){eJ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:T0,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(Hf(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(!Hf(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 Hf(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(ws),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)}}(),I8=function(r){iJ(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:SC(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));F8(r,e,u,c,i)}var h=r[e],f=t,d=n;for(im(r,t,e),i(r[n],h)>0&&im(r,t,n);f0;)d--}i(r[t],h)===0?im(r,t,d):(d++,im(r,d,n)),d<=e&&(t=d+1),e<=d&&(n=d-1)}}function im(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function mJ(r,e){return re?1:0}class R8{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(!W_(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=Up(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,pp(n,this.toBBox),pp(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=Up([e,t]),this.data.height=e.height+1,this.data.leaf=!1,pp(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=Lm(e,0,s,this.toBBox),l=Lm(e,s,n,this.toBBox),u=CJ(A,l),c=Qb(A)+Qb(l);u=t;l--){const u=e.children[l];Om(s,e.leaf?a(u):u),A+=K_(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)Om(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():pp(e[t],this.toBBox)}}function yJ(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n=r.minX&&e.maxY>=r.minY}function Up(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function UP(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;vJ(r,o,e,t,i),a.push(e,o,o,t)}}var rr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},BJ=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}(),M8=BJ;function nl(r){return Array.isArray(r)?Gk(r):r}var bJ=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)}}(),TJ=function(r){bJ(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([ze.CUSTOM,A,u,t,i,Au]),this.hitDetectionInstructions.push([ze.CUSTOM,A,u,t,a||i,Au]));break;case pt.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([ze.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([ze.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[ze.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ze.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=[ze.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[ze.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=[ze.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=AF(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;_o(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(N8),I0=UJ,DJ=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){DJ(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([ze.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([ze.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([ze.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([ze.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}(I0),kJ=QJ,HJ=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)}}(),GJ=function(r){HJ(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=[ze.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([ze.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Ry,My],xf);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(Pc),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([ze.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],xf);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 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)}}(),Zw={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},zJ=function(r){WJ(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===P8.LINE&&(l==pt.LINE_STRING||l==pt.MULTI_LINE_STRING||l==pt.POLYGON||l==pt.MULTI_POLYGON)){if(!Xn(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 ott=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_=Si(),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=$P(c?e[0]:e,A.textAlign||Uy),f=i&&o.lineWidth?o.lineWidth:0,d=c?e:e.split(` `).reduce(att,[]),g=ZX(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=BC?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)&&(hc[0]=I,fc[0]=I,hc[1]=T,$l[1]=T,$l[0]=I+O,Vl[0]=$l[0],Vl[1]=T+F,fc[1]=Vl[1]);var L;return c!==0?(L=yo(Si(),n,i,1,1,c,-n,-i),bn(L,hc),bn(L,$l),bn(L,Vl),bn(L,fc),ko(Math.min(hc[0],$l[0],Vl[0],fc[0]),Math.min(hc[1],$l[1],Vl[1],fc[1]),Math.max(hc[0],$l[0],Vl[0],fc[0]),Math.max(hc[1],$l[1],Vl[1],fc[1]),gp)):ko(Math.min(I,I+O),Math.min(T,T+F),Math.max(I,I+O),Math.max(T,T+F),gp),f&&(v=Math.round(v),y=Math.round(y)),{drawImageX:v,drawImageY:y,drawImageW:w,drawImageH:C,originX:l,originY:u,declutterBox:{minX:gp[0],minY:gp[1],maxX:gp[2],maxY:gp[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,hc,$l,Vl,fc,o,s),JX(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=$P(Array.isArray(e)?e[0]:e,a.textAlign||Uy),u=Zw[a.textBaseline||$w],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=Yc(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),oX(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 ze.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 ze.CLOSE_PATH:e.closePath(),++u;break;case ze.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 ze.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=Tf,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(sh);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=Gb.length-1;v>=0;--v)if(f=Gb[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 Yc(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return nd(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(sh),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||Gb,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?uh(i.color):null,n.iconImage_=mtt(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:$i.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_!=$i.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==$i.TOP_RIGHT||this.anchorOrigin_==$i.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==$i.BOTTOM_LEFT||this.anchorOrigin_==$i.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_!=$i.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==$i.TOP_RIGHT||this.offsetOrigin_==$i.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==$i.BOTTOM_LEFT||this.offsetOrigin_==$i.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}(M8),L0=_tt,wtt="#333",Ett=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:wtt}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:P8.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=Ett,hs=.5;function k8(r,e,t,n,i,a,o){var s=r[0]*hs,A=r[1]*hs,l=wo(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,c=new VF(l,hs,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,hs,h,f,w).slice()),m-=v}this.hitDetectionImageData_=k8(i,c,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(H8(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&&fs(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 Jw(_x(h,f),y,h,f),N;this.getLayer().getDeclutter()&&(N=new Jw(_x(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==hA.JSON||l==hA.TEXT?u=s.responseText:l==hA.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==hA.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 jP(r,e){return function(t,n,i,a,o){var s=this;Ktt(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||td)}}var K8=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)}}(),dc=function(r){K8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.feature=n,a.features=i,a}return e}($o),Wtt=function(r){K8(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_=td,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_=jP(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:j8;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new rE:null,n.loadedExtentsRtree_=new rE,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 xi(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 dc(Vi.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[je(n,xe.CHANGE,this.handleFeatureChange_,this),je(n,rd.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(gl(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 dc(Vi.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(jP(t,this.format_))},e}(DC),Mu=Wtt,W8=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)}}(),Gr={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},Y_={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},X_=function(r){W8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}($o),ztt=function(r){W8(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=_d),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_=Xtt(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===Gr.POLYGON?3:2,n.maxPoints_=n.mode_===Gr.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:ll;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===Gr.CIRCLE)a=function(A,l,u){var c=l||new HF([NaN,NaN]),h=Mn(A[0]),f=du(h,Mn(A[A.length-1]));return c.setCenterAndRadius(h,Math.sqrt(f)),c};else{var s;o===Gr.POINT?s=xr:o===Gr.LINE_STRING?s=en:o===Gr.POLYGON&&(s=Dn),a=function(A,l,u){return l?o===Gr.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 wl({source:new Mu({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Ytt(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:PC,n.freehandCondition_,t.freehand?n.freehandCondition_=MC:n.freehandCondition_=t.freehandCondition?t.freehandCondition:T0,n.addChangeListener(vx.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_!==Gr.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 nu(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_===Gr.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===Gr.POINT)n=!0;else if(o===Gr.CIRCLE)n=this.sketchCoords_.length===2;else if(o===Gr.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===Gr.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===Gr.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===Gr.LINE_STRING||a===Gr.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===Gr.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_===Gr.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===Gr.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===pt.MULTI_POINT?t.setGeometry(new Gs([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 X_(Y_.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 X_(Y_.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===Gr.LINE_STRING||n===Gr.CIRCLE)a=this.sketchCoords_;else if(n===Gr.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(Uf(o),s);var l=a,u=ad();if(u){var c=t.map.getView().getProjection();l=l.clone().transform(u,c),l=d8(l).transform(c,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(oa(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new jb(Vb.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 zP(o,U,s)-zP(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&&Ni(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=ds(Uf(o,WP)),f=n.getView().getResolution()*this.pixelTolerance_,d=IC(_o(h,f,WP));l=this.rBush_.getInExtent(d)}if(l&&l.length>0){var g=l.sort(A)[0],m=g.segment,v=YP(o,g,s),y=n.getPixelFromCoordinate(v),w=dP(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===iy)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);else{var O=n.getPixelFromCoordinate(m[0]),F=n.getPixelFromCoordinate(m[1]),I=du(y,O),T=du(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}(ws);function Ztt(r,e){return r.index-e.index}function zP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE){var i=n;if(e.index===iy){var a=ad();a&&(i=i.clone().transform(a,t));var o=du(i.getCenter(),Mn(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=Mn(r);return cg[0]=Mn(e.segment[0]),cg[1]=Mn(e.segment[1]),UX(A,cg)}function YP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE&&e.index===iy){var i=n,a=ad();return a&&(i=i.clone().transform(a,t)),Fg(i.getClosestPoint(Mn(r)))}var o=Mn(r);return cg[0]=Mn(e.segment[0]),cg[1]=Mn(e.segment[1]),Fg(pF(o,cg))}function Jtt(){var r=GF();return function(e,t){return r[pt.POINT]}}var WF=qtt,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)}}(),tet={SELECT:"select"},eet=function(r){Y8(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}($o),q_={},ret=function(r){Y8(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:NC,n.addCondition_=i.addCondition?i.addCondition:mx,n.removeCondition_=i.removeCondition?i.removeCondition:mx,n.toggleCondition_=i.toggleCondition?i.toggleCondition:T0,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:ll,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:net(),n.features_=i.features||new xi;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return Ni(o,s)}}else a=ll;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 wl&&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 q_||(q_[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(q_[o]),delete q_[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){wd(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)&&!Ni(A.getArray(),g)?(this.addFeatureLayerAssociation_(g,m),u.push(g)):(i||a)&&Ni(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 eet(tet.SELECT,u,l,t)),!0},e}(iv);function net(){var r=GF();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 QC=ret,iet=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 XP(r){if(r.feature)return r.feature;if(r.element)return r.element}var Kb=[],aet=function(r){iet(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=ll),a.stopDown||(a.stopDown=_d),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 rE,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(Ui());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=XP(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=XP(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=fF(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_,Vi.ADDFEATURE,this.handleFeatureAdd_,this),je(this.source_,Vi.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=du(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=md(Jn({},t));return ye(r,()=>{t=nh(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 cet={name:"ol-map",setup(r,{emit:e}){const{properties:t}=Or(r),n=Fo(null);let i=new kC(t);ye(t,()=>{i.setProperties(t)}),cr(()=>{i.setTarget(n.value)}),pr(()=>{i.setTarget(null),i=null}),Dr("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 het(r,e,t,n,i,a){return ti(),Yi("div",{ref:o=>n.mapRef=o},[Rr(r.$slots,"default")],512)}var wx=me(cet,[["render",het]]);function fet(r,e){const t=Be("map"),{properties:n}=Or(r),i=()=>CA(Jn({},n),{projection:typeof n.projection=="string"?n.projection:new Ru(Jn({},n.projection))});let a=new el(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 det={name:"ol-view",setup(r,{emit:e}){const t=fet(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 pet(r,e,t,n,i,a){return Mr("",!0)}var Ex=me(det,[["render",pet]]);const get={name:"ol-feature",setup(r){const e=Be("vectorSource"),t=Be("vectorLayer"),n=Be("animation",null),{properties:i}=Or(r);let a=qe(()=>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)}),Dr("feature",a),Dr("stylable",a),{feature:a}},props:{properties:{type:[LC,Object,Array]}}};function vet(r,e,t,n,i,a){return Rr(r.$slots,"default")}var Cx=me(get,[["render",vet]]);function met(r,e){const t=Be("map"),n=Fo(null),{properties:i}=Or(r);let a=qe(()=>new C8(i));cr(()=>{t.addOverlay(a.value)}),pr(()=>{t.removeOverlay(a.value)}),ye(a,(g,m)=>{t.removeOverlay(m),t.addOverlay(g)}),_4(()=>{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 yet={name:"ol-overlay",setup(r,{emit:e}){const t=new met(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}}},_et={ref:"htmlContent"};function wet(r,e,t,n,i,a){return ti(),Yi("div",_et,[Rr(r.$slots,"default",{position:t.position})],512)}var Bx=me(yet,[["render",wet]]),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)}}(),zn={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},Eet=function(r){X8(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}($o),Cet=function(r){X8(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_=xC,n.watchId_=void 0,n.addChangeListener(zn.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(zn.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_=id(Ve("EPSG:4326"),t),this.position_&&this.set(zn.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(zn.ACCURACY,n.accuracy),this.set(zn.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(zn.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(zn.HEADING,n.heading===null?void 0:Wc(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(zn.POSITION,i),this.set(zn.SPEED,n.speed===null?void 0:n.speed);var a=m3(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(zn.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Eet(t))},e.prototype.getAccuracy=function(){return this.get(zn.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(zn.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(zn.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(zn.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(zn.HEADING)},e.prototype.getPosition=function(){return this.get(zn.POSITION)},e.prototype.getProjection=function(){return this.get(zn.PROJECTION)},e.prototype.getSpeed=function(){return this.get(zn.SPEED)},e.prototype.getTracking=function(){return this.get(zn.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(zn.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(zn.PROJECTION,Ve(t))},e.prototype.setTracking=function(t){this.set(zn.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(zn.TRACKING_OPTIONS,t)},e}(Li),Bet=Cet;const bet={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=Or(r);let n=qe(()=>{let h=new Bet(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 Tet(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 bx=me(bet,[["render",Tet]]);function xet(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 od=1,sd=2,ew=3,Iet=4,Tx=5,qP=6378137,Let=6356752314e-3,ZP=.0066943799901413165,ay=484813681109536e-20,ee=Math.PI/2,Oet=.16666666666666666,Fet=.04722222222222222,Ret=.022156084656084655,he=1e-10,va=.017453292519943295,il=57.29577951308232,An=Math.PI/4,Hy=Math.PI*2,Ei=3.14159265359,Vo={};Vo.greenwich=0;Vo.lisbon=-9.131906111111;Vo.paris=2.337229166667;Vo.bogota=-74.080916666667;Vo.madrid=-3.687938888889;Vo.rome=12.452333333333;Vo.bern=7.439583333333;Vo.jakarta=106.807719444444;Vo.ferro=-17.666666666667;Vo.brussels=4.367975;Vo.stockholm=18.058277777778;Vo.athens=23.7163375;Vo.oslo=10.722916666667;var Met={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},JP=/[\s_\-\/\(\)]/g;function fh(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(JP,""),i=-1,a,o;++i=this.text.length)return;r=this.text[this.place++]}switch(this.state){case Gy:return this.neutral(r);case q8:return this.keyword(r);case nE:return this.quoted(r);case J8:return this.afterquote(r);case Z8:return this.number(r);case zF:return}};Nu.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=nE;return}if(HC.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=Gy;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Gy,this.currentObject=this.stack.pop(),this.currentObject||(this.state=zF);return}};Nu.prototype.number=function(r){if(tH.test(r)){this.word+=r;return}if(HC.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=J8;return}this.word+=r};Nu.prototype.keyword=function(r){if(Uet.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=Gy;return}if(HC.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(Pet.test(r)){this.word=r,this.state=q8;return}if(r==='"'){this.word="",this.state=nE;return}if(tH.test(r)){this.word=r,this.state=Z8;return}if(HC.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 eH(r){var e=Det(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return Xp(e,i),Het(i),i}function Ao(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Ao[r]=Sx(arguments[1]):Ao[r]=eH(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}}xet(Ao);function Get(r){return typeof r=="string"}function $et(r){return r in Ao}var Vet=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function jet(r){return Vet.some(function(e){return r.indexOf(e)>-1})}var Ket=["3857","900913","3785","102113"];function Wet(r){var e=fh(r,"authority");if(e){var t=fh(e,"epsg");return t&&Ket.indexOf(t)>-1}}function zet(r){var e=fh(r,"extension");if(e)return fh(e,"proj4")}function Yet(r){return r[0]==="+"}function Xet(r){if(Get(r)){if($et(r))return Ao[r];if(jet(r)){var e=eH(r);if(Wet(e))return Ao["EPSG:3857"];var t=zet(e);return t?Sx(t):e}if(Yet(r))return Sx(r)}else return r}function e5(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 ml(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function O0(r){return r<0?-1:1}function we(r){return Math.abs(r)<=Ei?r:r-O0(r)*Hy}function pA(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 $y(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 qet(){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=ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Zet(r){var e=r.x,t=r.y;if(t*il>90&&t*il<-90&&e*il>180&&e*il<-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=pA(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 Jet(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=$y(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 trt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],ert={init:qet,forward:Zet,inverse:Jet,names:trt};function rrt(){}function r5(r){return r}var nrt=["longlat","identity"],irt={init:rrt,forward:r5,inverse:r5,names:nrt},art=[ert,irt],rw={},iE=[];function rH(r,e){var t=iE.length;return r.names?(iE[t]=r,r.names.forEach(function(n){rw[n.toLowerCase()]=t}),this):(console.log(e),!0)}function ort(r){if(!r)return!1;var e=r.toLowerCase();if(typeof rw[e]<"u"&&iE[rw[e]])return iE[rw[e]]}function srt(){art.forEach(rH)}var Art={start:srt,add:rH,get:ort},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 lrt=Ar.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ar.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function urt(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(Oet+o*(Fet+o*Ret)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function crt(r,e,t,n,i){if(!r){var a=fh(Ar,n);a||(a=lrt),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=sd,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=ew,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var nH={};function frt(r,e){var t=new DataView(e),n=grt(t),i=vrt(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=mrt(t,i,n),o={header:i,subgrids:a};return nH[r]=o,o}function drt(r){if(r===void 0)return null;var e=r.split(",");return e.map(prt)}function prt(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:nH[r]||null,isNull:!1}}function qp(r){return r/3600*Math.PI/180}function grt(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 vrt(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:xx(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 xx(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function mrt(r,e,t){for(var n=176,i=[],a=0;a5e-11?!1: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_type===sd?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 iH(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 i5(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 a5(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 oH(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 Srt(r){o5(r.x),o5(r.y)}function o5(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 xrt(r,e){return(r.datum.datum_type===od||r.datum.datum_type===sd)&&e.datumCode!=="WGS84"||(e.datum.datum_type===od||e.datum.datum_type===sd)&&r.datumCode!=="WGS84"}function aE(r,e,t,n){var i;if(Array.isArray(t)&&(t=oH(t)),Srt(t),r.datum&&e.datum&&xrt(r,e)&&(i=new ul("WGS84"),t=aE(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=a5(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=brt(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*il,y:t.y*il,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"?a5(e,!0,t):t}var s5=ul("WGS84");function Wb(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=aE(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=aE(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 A5(r){return r instanceof ul?r:r.oProj?r.oProj:ul(r)}function Ho(r,e,t){r=A5(r);var n=!1,i;return typeof e>"u"?(e=r,r=s5,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=s5,n=!0),e=A5(e),t?Wb(r,e,t):(i={forward:function(a,o){return Wb(r,e,a,o)},inverse:function(a,o){return Wb(e,r,a,o)}},n&&(i.oProj=e),i)}var l5=6,sH="AJSAJS",AH="AFAFAF",Zp=65,Lo=73,Fs=79,Rm=86,Mm=90,Irt={forward:lH,inverse:Lrt,toPoint:uH};function lH(r,e){return e=e||5,Rrt(Ort({lat:r[1],lon:r[0]}),e)}function Lrt(r){var e=YF(hH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function uH(r){var e=YF(hH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function zb(r){return r*(Math.PI/180)}function u5(r){return 180*(r/Math.PI)}function Ort(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,c,h,f=zb(e),d=zb(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=zb(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:Frt(e)}}function YF(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=u5(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+u5(F);var I;if(r.accuracy){var T=YF({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 Frt(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 Rrt(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+Mrt(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function Mrt(r,e,t){var n=cH(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return Nrt(i,a,n)}function cH(r){var e=r%l5;return e===0&&(e=l5),e}function Nrt(r,e,t){var n=t-1,i=sH.charCodeAt(n),a=AH.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>Mm&&(o=o-Mm+Zp-1,A=!0),(o===Lo||iLo||(o>Lo||iFs||(o>Fs||iMm&&(o=o-Mm+Zp-1),s>Rm?(s=s-Rm+Zp-1,A=!0):A=!1,(s===Lo||aLo||(s>Lo||aFs||(s>Fs||aRm&&(s=s-Rm+Zp-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function hH(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=cH(o),l=Prt(t.charAt(0),A),u=Urt(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 Prt(r,e){for(var t=sH.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Fs&&t++,t>Mm){if(i)throw"Bad character: "+r;t=Zp,i=!0}n+=1e5}return n}function Urt(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=AH.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Fs&&t++,t>Rm){if(i)throw"Bad character: "+r;t=Zp,i=!0}n+=1e5}return n}function Drt(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 Mg(r,e,t){if(!(this instanceof Mg))return new Mg(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")}Mg.fromMGRS=function(r){return new Mg(uH(r))};Mg.prototype.toMGRS=function(r){return lH([this.x,this.y],r)};var Qrt=1,krt=.25,c5=.046875,h5=.01953125,f5=.01068115234375,Hrt=.75,Grt=.46875,$rt=.013020833333333334,Vrt=.007120768229166667,jrt=.3645833333333333,Krt=.005696614583333333,Wrt=.3076171875;function fH(r){var e=[];e[0]=Qrt-r*(krt+r*(c5+r*(h5+r*f5))),e[1]=r*(Hrt-r*(c5+r*(h5+r*f5)));var t=r*r;return e[2]=t*(Grt-r*($rt+r*Vrt)),t*=r,e[3]=t*(jrt-r*Krt),e[4]=t*r*Wrt,e}function GC(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 zrt=20;function dH(r,e,t){for(var n=1/(1-e),i=r,a=zrt;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(GC(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=GC(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 qrt(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=dH(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*O0(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 Zrt=["Fast_Transverse_Mercator","Fast Transverse Mercator"],nw={init:Yrt,forward:Xrt,inverse:qrt,names:Zrt};function pH(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function $C(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 Jrt(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function tnt(r){var e=Math.abs(r);return e=Jrt(e*(1+e/($C(1,e)+1))),r<0?-e:e}function XF(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 ent(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 rnt(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function gH(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=pH(t),o=rnt(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 nnt(){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&&(nw.init.apply(this),this.forward=nw.forward,this.inverse=nw.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=XF(this.cbg,this.lat0);this.Zb=-this.Qn*(n+ent(this.gtu,2*n))}function int(r){var e=we(r.x-this.long0),t=r.y;t=XF(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,$C(n,i*o)),e=tnt(Math.tan(e));var s=gH(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 ant(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=gH(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(pH(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,$C(A,l*s)),e=Math.atan2(A,l*s),n=we(e+this.long0),i=XF(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var ont=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],iw={init:nnt,forward:int,inverse:ant,names:ont};function snt(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 Ant="etmerc";function lnt(){var r=snt(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,iw.init.apply(this),this.forward=iw.forward,this.inverse=iw.inverse}var unt=["Universal Transverse Mercator System","utm"],cnt={init:lnt,names:unt,dependsOn:Ant};function qF(r,e){return Math.pow((1-r)/(1+r),e)}var hnt=20;function fnt(){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)*qF(this.e*r,this.ratexp))}function dnt(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)*qF(this.e*Math.sin(t),this.ratexp))-ee,r.x=this.C*e,r}function pnt(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=hnt;a>0&&(n=2*Math.atan(i*qF(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*ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/pA(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ml(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 Bnt(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=pA(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*$y(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*$y(this.e,Math.tan(.5*(ee+a)));return r.x=e,r.y=t,r}var Tnt=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],Snt={init:Cnt,forward:Bnt,inverse:bnt,names:Tnt,ssfn_:Ent};function xnt(){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 Int(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 Lnt(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 Ont=["somerc"],Fnt={init:xnt,forward:Int,inverse:Lnt,names:Ont},Dp=1e-7;function Rnt(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 Mnt(){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=Rnt(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)<=Dp||(r=Math.abs(g))<=Dp||Math.abs(r-ee)<=Dp||Math.abs(Math.abs(this.lat0)-ee)<=Dp||Math.abs(Math.abs(m)-ee)<=Dp)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(pA(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(pA(this.e,g,Math.sin(g)),this.B),o=Math.pow(pA(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-=Hy:r>Math.pi&&(d+=Hy),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 Nnt(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(pA(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 Pnt(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 knt(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=he&&(t=O0(t)*(ee-2*he));var n=Math.abs(Math.abs(t)-ee),i,a;if(n>he)i=pA(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 Hnt(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=$y(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 Gnt=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],$nt={init:Qnt,forward:knt,inverse:Hnt,names:Gnt};function Vnt(){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 jnt(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 Knt(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 Wnt=["Krovak","krovak"],znt={init:Vnt,forward:jnt,inverse:Knt,names:Wnt};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 F0(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function R0(r){return .375*r*(1+.25*r*(1+.46875*r))}function M0(r){return .05859375*r*r*(1+.75*r)}function N0(r){return r*r*r*(35/3072)}function Ng(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 tit=1,eit=2,rit=3,nit=4;function iit(){var r=Math.abs(this.lat0);if(Math.abs(r-ee)0){var e;switch(this.qp=Xc(this.e,1),this.mmf=.5/(1-this.es),this.apa=fit(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=Xc(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 ait(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 oit(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 vit(){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 mit(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=Xc(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 yit(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 _it(r,e){var t,n,i,a,o,s=dh(.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 bit(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=dh(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 Tit=["gnom"],Sit={init:Cit,forward:Bit,inverse:bit,names:Tit};function xit(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 Iit(){this.sphere||(this.k0=ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Lit(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=Xc(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 Oit(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=xit(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 Fit=["cea"],Rit={init:Iit,forward:Lit,inverse:Oit,names:Fit};function Mit(){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 Nit(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 Pit(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 Uit=["Equirectangular","Equidistant_Cylindrical","eqc"],Dit={init:Mit,forward:Nit,inverse:Pit,names:Uit},d5=20;function Qit(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=F0(this.es),this.e1=R0(this.es),this.e2=M0(this.es),this.e3=N0(this.es),this.ml0=this.a*fo(this.e0,this.e1,this.e2,this.e3,this.lat0)}function kit(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=Ng(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 Hit(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=d5;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=d5;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 Git=["Polyconic","poly"],$it={init:Qit,forward:kit,inverse:Hit,names:Git};function Vit(){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 jit(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 Kit(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 lat=["Mollweide","moll"],uat={init:oat,forward:sat,inverse:Aat,names:lat};function cat(){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=oE(o,this.e0,this.e1,this.e2,this.e3),i=we(this.long0+a/this.ns),r.x=i,r.y=n,r}var dat=["Equidistant_Conic","eqdc"],pat={init:cat,forward:hat,inverse:fat,names:dat};function gat(){this.R=this.a}function vat(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=dh(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 mat(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=dh(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=F0(this.es),l=R0(this.es),u=M0(this.es),c=N0(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=oE(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=oE(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=Ng(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 Bat=["Azimuthal_Equidistant","aeqd"],bat={init:wat,forward:Eat,inverse:Cat,names:Bat};function Tat(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Sat(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 xat(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=dh(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=dh(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 Iat=["ortho"],Lat={init:Tat,forward:Sat,inverse:xat,names:Iat},Yn={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 Oat(){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=Yn.TOP:this.lat0<=-(ee-An/2)?this.face=Yn.BOTTOM:Math.abs(this.long0)<=An?this.face=Yn.FRONT:Math.abs(this.long0)<=ee+An?this.face=this.long0>0?Yn.RIGHT:Yn.LEFT:this.face=Yn.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 Fat(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===Yn.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-Ei:n+Ei):n>-(ee+An)&&n<=-An?(A.value=ln.AREA_2,i=n+ee):(A.value=ln.AREA_3,i=n);else if(this.face===Yn.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+Ei:-n-Ei);else{var l,u,c,h,f,d,g;this.face===Yn.RIGHT?n=hg(n,+ee):this.face===Yn.BACK?n=hg(n,+Ei):this.face===Yn.LEFT&&(n=hg(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===Yn.FRONT?(a=Math.acos(l),i=J_(a,c,u,A)):this.face===Yn.RIGHT?(a=Math.acos(u),i=J_(a,c,-l,A)):this.face===Yn.BACK?(a=Math.acos(-l),i=J_(a,c,-u,A)):this.face===Yn.LEFT?(a=Math.acos(-u),i=J_(a,c,l,A)):(a=i=0,A.value=ln.AREA_0)}return s=Math.atan(12/Ei*(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+=Ei:A.value===ln.AREA_3&&(s+=1.5*Ei),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 Rat(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+Ei:t-Ei):(c.value=ln.AREA_3,t+=ee),u=Ei/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===Yn.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+Ei:s-Ei:c.value===ln.AREA_2?e.lam=s-ee:e.lam=s;else if(this.face===Yn.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-Ei:-s+Ei;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===Yn.RIGHT?(u=h,h=-f,f=u):this.face===Yn.BACK?(h=-h,f=-f):this.face===Yn.LEFT&&(u=h,h=f,f=-u),e.phi=Math.acos(-d)-ee,e.lam=Math.atan2(f,h),this.face===Yn.RIGHT?e.lam=hg(e.lam,-ee):this.face===Yn.BACK?e.lam=hg(e.lam,-Ei):this.face===Yn.LEFT&&(e.lam=hg(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 J_(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-Ei:i+Ei):(n.value=ln.AREA_3,i+=ee)),i}function hg(r,e){var t=r+e;return t<-Ei?t+=Hy:t>+Ei&&(t-=Hy),t}var Mat=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Nat={init:Oat,forward:Fat,inverse:Rat,names:Mat},Ix=[[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]],Nm=[[-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]],vH=.8487,mH=1.3523,yH=il/5,Pat=1/yH,Jp=18,sE=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},Uat=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function Dat(r,e,t,n){for(var i=e;n;--n){var a=r(i);if(i-=a,Math.abs(a)=Jp&&(n=Jp-1),t=il*(t-Pat*n);var i={x:sE(Ix[n],t)*e,y:sE(Nm[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*vH+this.x0,i.y=i.y*this.a*mH+this.y0,i}function Hat(r){var e={x:(r.x-this.x0)/(this.a*vH),y:Math.abs(r.y-this.y0)/(this.a*mH)};if(e.y>=1)e.x/=Ix[Jp][0],e.y=r.y<0?-ee:ee;else{var t=Math.floor(e.y*Jp);for(t<0?t=0:t>=Jp&&(t=Jp-1);;)if(Nm[t][0]>e.y)--t;else if(Nm[t+1][0]<=e.y)++t;else break;var n=Nm[t],i=5*(e.y-n[0])/(Nm[t+1][0]-n[0]);i=Dat(function(a){return(sE(n,a)-e.y)/Uat(n,a)},i,he,100),e.x/=sE(Ix[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 Gat=["Robinson","robin"],$at={init:Qat,forward:kat,inverse:Hat,names:Gat};function Vat(){this.name="geocent"}function jat(r){var e=iH(r,this.es,this.a);return e}function Kat(r){var e=aH(r,this.es,this.a,this.b);return e}var Wat=["Geocentric","geocentric","geocent","Geocent"],zat={init:Vat,forward:jat,inverse:Kat,names:Wat},Ga={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},om={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 Yat(){if(Object.keys(om).forEach(function(t){if(typeof this[t]>"u")this[t]=om[t].def;else{if(om[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);om[t].num&&(this[t]=parseFloat(this[t]))}om[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 Xat(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 qat(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=$C(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}(Ed),JF=Aot,lot=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){lot(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_=cot(),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_=jF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(JF);function cot(){var r=wo(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var lE=uot,wH=.5,hot=10,p5=.25,fot=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=Qy(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()&&jr(i)==jr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?jr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?jr(this.targetProj_.getExtent()):null;var l=BA(n),u=w0(n),c=ev(n),h=_0(n),f=this.transformInv_(l),d=this.transformInv_(u),g=this.transformInv_(c),m=this.transformInv_(h),v=hot+(o?Math.max(0,Math.ceil(Uk(Oy(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=jr(g)/this.targetWorldWidth_;d=m>p5||d}!f&&this.sourceProj_.isGlobal()&&c&&(d=c>p5||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Xn(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=(zc(a[0],h)+zc(s[0],h))/2;C=O-zc(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=Ui();return this.triangles_.forEach(function(t,n,i){var a=t.source;Df(e,a[0]),Df(e,a[1]),Df(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),EH=fot,Pg={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},CH={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},Yb;function g5(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 Xb(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function dot(){if(Yb===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",g5(r,4,5,4,0),g5(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;Yb=Xb(e,0)||Xb(e,4)||Xb(e,8)}return Yb}function Vy(r,e,t,n){var i=ch(t,e,r),a=Ww(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||gA(A,i)){var l=Ww(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function pot(r,e,t,n){var i=Ya(t),a=Vy(r,e,i,n);return(!isFinite(a)||a<=0)&&SC(t,function(o){return a=Vy(r,e,o,n),isFinite(a)&&a>0}),a}function BH(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,Pg),A.length===0)return h.canvas;h.scale(t,t);function f(C){return Math.round(C*t)/t}h.globalCompositeOperation="lighter";var d=Ui();A.forEach(function(C,O,F){lh(d,C.extent)});var g=jr(d),m=Ii(d),v=wo(Math.round(t*g/n),Math.round(t*m/n));c||Ce(v,Pg);var y=t/n;A.forEach(function(C,O,F){var I=C.extent[0]-d[0],T=-(C.extent[3]-d[3]),L=jr(C.extent),N=Ii(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=BA(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=EX(W);if(Y){if(h.save(),h.beginPath(),dot()||!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 vp(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new bH(r,e,t,n)}var eR=bH,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){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=Ui(),n.tmpTileRange_=new eR(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&&!gA(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 lE||g instanceof tR))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&&ds(i.extent);y&&(v=Qs(v,ds(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=sF(this.pixelTransform);this.useContainer(n,W,i.opacity,this.getBackground(t));var Y=this.context,H=Y.canvas;y0(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,Pg),this.preRender(Y,t),this.renderedTiles.length=0;var J=Object.keys(x).map(Number);J.sort(sh);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(BA(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 Cot(r,e,t,n,i,a){return ti(),Yi("div")}var Td=me(Eot,[["render",Cot]]);const Bot={extends:Td,name:"ol-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=qe(()=>new rR(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()}),Dr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function bot(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Ox=me(Bot,[["render",bot]]),Tot=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}(),SH=Tot,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=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}(JF),Iot=xot,jy=34962,VC=34963,Lot=35040,nR=35044,aw=35048,Oot=5121,Fot=5123,Rot=5125,xH=5126,v5=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function IH(r,e){for(var t=Ce({preserveDrawingBuffer:!0,antialias:!eX},e),n=v5.length,i=0;i0))){var t=e.canvas,n=IH(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete uE[r]}}var zot=function(r){Vot(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?_5(i.canvasCacheKey):jot(),n.canvas_=Kot(n.canvasCacheKey_),n.gl_=IH(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(t1.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(t1.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=Si(),n.offsetScaleMatrix_=Si(),n.tmpMat4_=OH(),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 y5({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new y5({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_===_5(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(t1.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(t1.RESTORED,this.boundHandleWebGLContextRestored_),Wot(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 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)}}(),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"},sw={TEXTURE_COORD:"a_textureCoord"},nst=[{name:sw.TEXTURE_COORD,size:2,type:Ms.FLOAT}],ist={};function ast(r){return 2*(1-1/(r+1))-1}function E5(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function Jb(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=Qs(e,ds(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=Qs(e,i))}return e}function tT(r,e){return"".concat(r.getKey(),",").concat(Wy(e))}var ost=function(r){rst(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=Si(),i.tempMat4_=OH(),i.tempTileRange_=new eR(0,0,0,0),i.tempTileCoord_=Ky(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new oy(VC,nR),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new SH(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||rv(Jb(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=Ky(m,w,C,this.tempTileCoord_),F=tT(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 kot({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)}E5(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=Jb(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var c=s.getZForResolution(i.nextResolution,o.zDirection),h=Jb(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(sh),U=i.center[0],tt=i.center[1],q=0,rt=P.length;q=u.getMinZoom();--f){var d=u.getTileCoordForCoordAndZ(o,f),g=tT(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=tT(l,[i,u,c]),f=!1;if(A.containsKey(h)){var d=A.get(h);d.loaded&&(E5(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}(RH),sst=ost,Ast=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}(),lst=Ast,ue={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},dr={};function yl(r){if(typeof r=="number")return ue.NUMBER;if(typeof r=="boolean")return ue.BOOLEAN;if(typeof r=="string")return BX(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 ust(r){return Uk(r)%1===0}function KC(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function NH(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(KC).join(", "),")")}function cst(r){var e=uh(r).slice();return e.length<4&&e.push(1),NH(e.map(function(t,n){return n<3?t/255:t}))}function cE(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function hst(r,e){return KC(cE(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=yl(e);if((i&ue.NUMBER)>0)return KC(e);if((i&ue.BOOLEAN)>0)return e.toString();if((i&ue.STRING)>0&&(t===void 0||t==ue.STRING))return hst(r,e.toString());if((i&ue.COLOR)>0&&(t===void 0||t==ue.COLOR))return cst(e);if((i&ue.NUMBER_ARRAY)>0)return NH(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function PH(r){if(!(yl(r)&ue.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function Oi(r){for(var e=0;ee)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function DH(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function fst(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function aR(r,e){if(!ust(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),UH(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 oR(r){return"u_var_"+r}dr.var={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),UH(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),oR(t)}};var QH="u_paletteTextures";dr.palette={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Fn(e,2),PH(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),Oi(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),Oi(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),Oi(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),Oi(e),"(".concat(ve(r,e[0])," <= ").concat(ve(r,e[1]),")")}};function kH(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){Ch(e,2),WC(e,4),Oi(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){Ch(e,3),WC(e,4),Oi(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 dst=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 C5(r,e){var t=` attribute vec2 `.concat(sw.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(sw.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(sw.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=oR(C);c[O]=function(){var F=r.variables[C];return typeof F=="string"&&(F=cE(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 GH=function(r){dst(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=C5(this.style_,this.getSourceBandCount_());return new sst(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=C5(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}(_H);GH.prototype.dispose;var pst=GH;const gst={extends:Td,name:"ol-webgl-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=qe(()=>new pst(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()}),Dr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function vst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Fx=me(gst,[["render",vst]]),mst=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)}}(),yst=function(r){mst(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(Cd),_st=yst,wst=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)}}(),Est=function(r){wst(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=Qs(l,ds(n.extent,a.projection))),!A[In.ANIMATING]&&!A[In.INTERACTING]&&!rv(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&&!gA(o,a))return null;var s=this.image_.getExtent(),A=this.image_.getImage(),l=jr(s),u=Math.floor(A.width*((a[0]-s[0])/l));if(u<0||u>=A.width)return null;var c=Ii(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),y0(this.inversePixelTransform,this.pixelTransform);var w=sF(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=ds(A.extent,u.projection);I=Xn(T,t.extent),F=I&&!fs(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,Pg),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,CH),w!==O.style.transform&&(O.style.transform=w),this.container},e}($F),Cst=Est,Bst=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)}}(),bst=function(r){Bst(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Cst(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(_st),$H=bst;const Tst={extends:Td,name:"ol-image-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=new $H(t);return ye(t,()=>{n.setProperties(t)}),cr(()=>{e.addLayer(n)}),pr(()=>{e.removeLayer(n)}),Dr("imageLayer",n),{imageLayer:n}}};function Sst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Rx=me(Tst,[["render",Sst]]);const xst={extends:Td,name:"ol-vector-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=qe(()=>new wl(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Dr("vectorLayer",n),Dr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function Ist(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Mx=me(xst,[["render",Ist]]),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(){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=tst(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(Wy(a.tileCoord)),a.release())}.bind(this))}},e}(SH),VH=Ost,rT={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Fst=[0,0,0],pc=5,Rst=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,Le(XY(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=vp(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}(DC),Dst=function(r){zH(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}($o),YH=Ust;function Qst(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 kst(r,e){for(var t=r.length,n=new Array(t),i=0;i>=1;return t.join("")}var Xst='Terms of Use',qst=function(r){zst(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 Wst(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=zC(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=KH({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,c=this.hidpi_;if(this.tileUrlFunction=hE(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){Ky(m[0],m[1],m[2],d);var w=g;return c&&(w+="&dpi=d1&device=mobile"),w.replace("{quadkey}",Yst(d))}else return}})),n.imageryProviders){var h=id(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=cF(x,h);if(Xn(S,f.extent)){O=!0;break}}}O&&d.push(C.attribution)}),d.push(Xst),d}.bind(this))}this.setState(co.READY)},e}(YC),Zst=qst,Jst=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){Jst(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:KH({extent:zC(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}(YC),ZH=tAt,eAt=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)}}(),rAt=function(r){eAt(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=Ui(),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?jk(i,o.getCoordinates()):t.splice(a,1)}Kk(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),JH=rAt,rl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nAt(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 AAt(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 Ni(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&Ni(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 XC={};XC[lo.VERSION1]=oAt;XC[lo.VERSION2]=sAt;XC[lo.VERSION3]=AAt;var lAt=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?Ad.none.none:Ad[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:XC[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&&Ni(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&Ni(i.qualities,t.quality)?t.quality:Ni(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}(),uAt=lAt,cAt=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){cAt(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),c=n.getExtent(),h=c?Qs(i,c):i,f=Ya(h),d=Vy(t,n,f,a),g=wH,m=new EH(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=jr(this.targetExtent_)/this.targetResolution_,i=Ii(this.targetExtent_)/this.targetResolution_;this.canvas_=BH(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}(D8),fAt=hAt,tG=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)}}(),nT={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},dAt=function(r){tG(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}($o),pAt=function(r){tG(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=CC(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||tl(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&tl(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&gl(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new fAt(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=nT.IMAGELOADSTART;break;case rr.LOADED:this.loading=!1,i=nT.IMAGELOADEND;break;case rr.ERROR:this.loading=!1,i=nT.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new dAt(i,n))},e}(DC);function eG(r,e){r.getImage().src=e}var rG=pAt;function Ug(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 gAt=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)}}(),vAt=function(r){gAt(e,r);function e(t){var n=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:eG,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 Q8(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 Xn(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=jr(n),A=Ii(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,Pg);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}(rG),mAt=vAt,Dc="1.3.0",Qc={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},yAt=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)}}(),gc=4,b5=[101,101],_At=function(r){yAt(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:eG,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=Vy(s,o,t,n),t=ch(t,o,s));var A=Qf(t,n,0,b5),l={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(l,this.params_,a);var u=Wp((t[0]-A[0])/n,gc),c=Wp((A[3]-t[1])/n,gc);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(A,b5,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:Dc,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),Ug(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=Nc(jr(t)/o,gc),l=Nc(Ii(t)/o,gc),u=Qf(s,o,0,[A,l]),c=Nc(this.ratio_*jr(t)/o,gc),h=Nc(this.ratio_*Ii(t)/o,gc),f=Qf(s,o,0,[c,h]),d=this.image_;if(d&&this.renderedRevision_==this.getRevision()&&d.getResolution()==n&&d.getPixelRatio()==i&&fs(d.getExtent(),u))return d;var g={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Ce(g,this.params_),this.imageSize_[0]=uP(jr(f)/o,gc),this.imageSize_[1]=uP(Ii(f)/o,gc);var m=this.getRequestUrl_(f,this.imageSize_,i,a,g);return this.image_=new Q8(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 Qc.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case Qc.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case Qc.CARMENTA_SERVER:case Qc.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(","),Ug(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||Dc;this.v13_=Vk(t,"1.3")>=0},e}(rG),wAt=_At,EAt=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='© OpenStreetMap contributors.',BAt=function(r){EAt(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=[CAt];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}(ZH),bAt=BAt,TAt=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)}}(),SAt=function(r){TAt(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_=Ui(),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=LP(f,d,this.tmpSize),h=_o(h,c*d,h)),s&&s!==o&&(c=Vy(s,o,t,c),h=zw(h,o,s),t=ch(t,o,s));var g={SERVICE:"WMS",VERSION:Dc,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:Dc,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),Ug(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 Qc.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case Qc.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case Qc.CARMENTA_SERVER:case Qc.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=zc(MH(t),A.length);f=A[d]}return Ug(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||Dc;this.v13_=Vk(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=LP(A,l,this.tmpSize),s=_o(s,o*l,s)),n!=1&&(A=p8(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Ce(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(YC),xAt=SAt,e1={KVP:"KVP",REST:"REST"},IAt=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){IAt(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}(sR),Nx=LAt,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=function(r){OAt(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:e1.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=XH(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=hE(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(` `);this.setTileUrlFunction(hE(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==e1.KVP&&Ce(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==e1.KVP?Ug(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==e1.KVP?c=Ug(c,u):c=c.replace(/\{(\w+?)\}/g,function(h,f){return u[f]}),c}else return}},e}(YC),nG=FAt;window.ol&&!ol.ext&&(ol.ext={});var Qr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r};window.ol&&(ol.inherits||(ol.inherits=Qr));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 qC(r){const e=r.frameState,t=tv(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new VF(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 Aw=Tk.split(".");Aw=parseInt(Aw[0])*100+parseInt(Aw[1]);var Px=function(r,e){var t=r.frameState.pixelRatio;if(Aw>605&&t!==1&&e.getImage()instanceof L0){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},Sd=function(r){var e=r||{};wl.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||Hs),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};Qr(Sd,wl);Sd.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)}};Sd.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};Sd.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};Sd.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||qC(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,Px(r,S))})}else u.drawFeature(A,Px(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}}};Sd.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const RAt={extends:Td,name:"ol-animated-clusterlayer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=qe(()=>new Sd(CA(Jn({},t),{source:new JH({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=qe(()=>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)}),Dr("vectorLayer",i),Dr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:Hs},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function MAt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Ux=me(RAt,[["render",MAt]]),jA=new Uint8Array(4),NAt=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 jA[0]=0,jA[1]=0,jA[2]=0,jA[3]=0,jA;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return jA[0]=this.data_[n*4],jA[1]=this.data_[n*4+1],jA[2]=this.data_[n*4+2],jA[3]=this.data_[n*4+3],jA},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}(),PAt=NAt;function UAt(){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 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,n){var i=this,a=n.uniforms||{},o=Si();a[Qp.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new oy(jy,aw),i.hitVerticesBuffer_=new oy(jy,aw),i.indicesBuffer_=new oy(VC,aw),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:Ms.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Ms.FLOAT},{name:"a_index",size:1,type:Ms.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Ms.FLOAT},{name:"a_index",size:1,type:Ms.FLOAT},{name:"a_hitColor",size:4,type:Ms.FLOAT},{name:"a_featureUid",size:1,type:Ms.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=Ui(),i.currentTransform_=o,i.renderTransform_=Si(),i.invertRenderTransform_=Si(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=UAt(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===Zb.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,y0(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,Vi.ADDFEATURE,i.handleSourceFeatureAdded_,i),je(A,Vi.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),je(A,Vi.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),je(A,Vi.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 PAt(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=!gl(this.previousExtent_,t.extent),A=this.sourceRevision_new VAt(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Dr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function KAt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Dx=me(jAt,[["render",KAt]]),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)}}(),nA={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},zAt=["#00f","#0ff","#0f0","#ff0","#f00"],YAt=function(r){WAt(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(nA.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:zAt),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(nA.BLUR)},e.prototype.getGradient=function(){return this.get(nA.GRADIENT)},e.prototype.getRadius=function(){return this.get(nA.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=XAt(this.getGradient())},e.prototype.setBlur=function(t){this.set(nA.BLUR,t)},e.prototype.setGradient=function(t){this.set(nA.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(nA.RADIUS,t)},e.prototype.createRenderer=function(){return new iG(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(nA.RADIUS)+this.get(nA.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(nA.RADIUS)/Math.max(1,this.get(nA.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}(UC);function XAt(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)}),Dr("heatmapLayer",n),Dr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function ZAt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Qx=me(qAt,[["render",ZAt]]);function fE(r){fE.installed||(fE.installed=!0,r.component(Ox.name,Ox),r.component(Fx.name,Fx),r.component(Rx.name,Rx),r.component(Mx.name,Mx),r.component(Ux.name,Ux),r.component(Dx.name,Dx),r.component(Qx.name,Qx))}var JAt=Object.freeze(Object.defineProperty({__proto__:null,default:fE,install:fE,TileLayer:Ox,WebGLTileLayer:Fx,ImageLayer:Rx,VectorLayer:Mx,AnimatedClusterLayer:Ux,WebglPointsLayer:Dx,HeatmapLayer:Qx},Symbol.toStringTag,{value:"Module"}));const tlt={name:"ol-source-xyz",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new ZH(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 elt(r,e,t,n,i,a){return Mr("",!0)}var kx=me(tlt,[["render",elt]]);const rlt={name:"ol-source-osm",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new bAt(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 nlt(r,e,t,n,i,a){return Mr("",!0)}var Hx=me(rlt,[["render",nlt]]);const ilt={name:"ol-source-image-static",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new mAt(CA(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 alt(r,e,t,n,i,a){return Mr("",!0)}var Gx=me(ilt,[["render",alt]]);const olt={name:"ol-source-wmts",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r),n=qe(()=>Ve(t.projection).getExtent()),i=qe(()=>BA(n.value)),a=qe(()=>jr(n.value)/256),o=qe(()=>{const A=new Array(t.tileZoomLevel),l=new Array(t.tileZoomLevel);for(var u=0;unew nG(CA(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 slt(r,e,t,n,i,a){return Mr("",!0)}var $x=me(olt,[["render",slt]]);const Alt={name:"ol-source-vector",setup(r){const e=Be("vectorLayer")||Be("heatmapLayer"),{properties:t}=Or(r);let n=qe(()=>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)}),Dr("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 llt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Vx=me(Alt,[["render",llt]]);const ult={name:"ol-source-cluster",setup(r){const e=Be("vectorLayer"),{properties:t}=Or(r);let n=qe(()=>new JH(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)}),Dr("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 clt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var jx=me(ult,[["render",clt]]);const hlt={name:"ol-source-bingmaps",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new Zst(CA(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 flt(r,e,t,n,i,a){return Mr("",!0)}var Kx=me(hlt,[["render",flt]]);class iu extends nG{constructor(e){iu.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},iu.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?iu.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||iu.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:iu.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"?iu.default4326TileGrid():iu.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 Nx({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 Nx({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const dlt={name:"ol-source-tianditu",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new iu(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 plt(r,e,t,n,i,a){return Mr("",!0)}var Wx=me(dlt,[["render",plt]]);const glt={name:"ol-source-image-wms",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new wAt(CA(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 vlt(r,e,t,n,i,a){return Mr("",!0)}var zx=me(glt,[["render",vlt]]);const mlt={name:"ol-source-webglpoints",setup(r){const e=Be("webglPointsLayer"),{properties:t}=Or(r);let n=qe(()=>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)}),Dr("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 ylt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Yx=me(mlt,[["render",ylt]]);function dE(r){dE.installed||(dE.installed=!0,r.component(kx.name,kx),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))}var _lt=Object.freeze(Object.defineProperty({__proto__:null,default:dE,install:dE,SourceXYZ:kx,SourceOSM:Hx,SourceImageStatic:Gx,SourceWMTS:$x,SourceVector:Vx,SourceCluster:jx,SourceTianDiTu:Wx,SourceImageWMS:zx,SourceWebglPoints:Yx,SourceBingMaps:Kx},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=qe(()=>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 wlt={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Xi(G3,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 Elt(r,e,t,n,i,a){return Mr("",!0)}var Xx=me(wlt,[["render",Elt]]);const Clt={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Xi(j3,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 Blt(r,e,t,n,i,a){return Mr("",!0)}var qx=me(Clt,[["render",Blt]]);const blt={name:"ol-attribution-control",setup(r,e){const{control:t}=Xi(y8,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 Tlt(r,e,t,n,i,a){return Mr("",!0)}var Zx=me(blt,[["render",Tlt]]);const Slt={name:"ol-overviewmap-control",setup(r,e){const t=Be("map"),{control:n}=Xi(X3,r,e);return cr(()=>{n.value.setMap(t)}),pr(()=>{n.value.setMap(null)}),Dr("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 xlt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Jx=me(Slt,[["render",xlt]]);const Ilt={name:"ol-scaleline-control",setup(r,e){const{control:t}=Xi(tZ,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 Llt(r,e,t,n,i,a){return Mr("",!0)}var tI=me(Ilt,[["render",Llt]]);const Olt={name:"ol-zoom-control",setup(r,e){const{control:t}=Xi(w8,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 Flt(r,e,t,n,i,a){return Mr("",!0)}var eI=me(Olt,[["render",Flt]]);const Rlt={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Xi(nZ,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function Mlt(r,e,t,n,i,a){return Mr("",!0)}var rI=me(Rlt,[["render",Mlt]]);const Nlt={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Xi(oZ,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 Plt(r,e,t,n,i,a){return Mr("",!0)}var nI=me(Nlt,[["render",Plt]]);const Ult={name:"ol-rotate-control",setup(r,e){const{control:t}=Xi(_8,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 Dlt(r,e,t,n,i,a){return Mr("",!0)}var T5=me(Ult,[["render",Dlt]]),oG={exports:{}},Qlt=nAt(O3);/*! * 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(Qlt)})(rl,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)})})(oG);var klt=oG.exports;const Hlt={name:"ol-context-menu",setup(r,e){const{control:t}=Xi(klt,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 Glt(r,e,t,n,i,a){return Mr("",!0)}var iI=me(Hlt,[["render",Glt]]),jo=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")};Qr(jo,Nr);jo.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{}};jo.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")])};jo.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}}};jo.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};jo.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)}};jo.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()}};jo.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()}};jo.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 $lt={name:"ol-swipe-control",setup(r,e){const{control:t}=Xi(jo,r,e),{layerList:n}=nh(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 Vlt(r,e,t,n,i,a){return Mr("",!0)}var aI=me($lt,[["render",Vlt]]),Es=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)};Qr(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 $s=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)};Qr($s,Pu);$s.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_))};$s.prototype.getSubBar=function(){return this.subbar_};$s.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_))};$s.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};$s.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}))};$s.prototype.getActive=function(){return this.element.classList.contains("ol-active")};$s.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};$s.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}))};$s.prototype.setInteraction=function(r){this.interaction_=r};$s.prototype.getInteraction=function(){return this.interaction_};const Wlt={name:"ol-control-toggle",setup(r,e){const{control:t}=Xi($s,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function zlt(r,e,t,n,i,a){return Mr("",!0)}var sI=me(Wlt,[["render",zlt]]);const Ylt={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 Xlt(r,e,t,n,i,a){return Mr("",!0)}var AI=me(Ylt,[["render",Xlt]]),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)};Qr(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 qlt=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)};Qr(qi,Nr);qi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(ms(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 qlt(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 Zlt(r,e){var t=r.canvas,n=e||{},i=n.pixelRatio||ed,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=ry(Si(),i,i);return new VF(r,i,o,s,0)}var Dg=function(r){r=r||{},Li.call(this,r),r.feature&&this.set("feature",r.feature.clone())};Qr(Dg,Li);Dg.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};Dg.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||{},Li.call(this),this._items=new xi;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=ed;e||(t=0,e=document.createElement("canvas"),e.width=i*o,e.height=a*o);var s=e.getContext("2d");s.save();var A=Zlt(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?lh(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 bA=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))};Qr(bA,qi);bA.prototype.getLegend=function(){return this._legend};bA.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};bA.prototype.onCanvas=function(){return!!this._onCanvas};bA.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=fu(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()}};bA.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{}};bA.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{}};bA.prototype.collapse=function(r){r===!1?this.show():this.hide()};bA.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};bA.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 Bh=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)};Qr(Bh,Nr);Bh.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)}};Bh.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};Bh.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};Bh.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())};Bh.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()};Qr(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=fu(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=fu(this.getTextFill().getColor()),e.strokeStyle=fu(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 lI=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=Kw(ch(i,n,"EPSG:4326"),ch(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},Jlt=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=Kw(ch(o,a,"EPSG:4326"),ch(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)};Qr(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 Bh(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&&ms(N),N=S.on("moveend",function(){this.setScale(lI(S))}.bind(this)),this.setScale(lI(S)),x={},this.getMap().getControls().forEach(function(P){P instanceof bA&&(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&&ms(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")}})};Qr(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){Jlt(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};Qn.prototype.getScale=function(){return lI(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 AR={exports:{}};(function(r,e){(function(t,n){n()})(rl,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 rl=="object"&&rl.global===rl?rl: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})})(AR);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,zy=Uint32Array,ZC=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]),JC=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]),uI=new po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lG=function(r,e){for(var t=new go(31),n=0;n<31;++n)t[n]=e+=1<>>1|(Nn&21845)<<1;vc=(vc&52428)>>>2|(vc&13107)<<2,vc=(vc&61680)>>>4|(vc&3855)<<4,hI[Nn]=((vc&65280)>>>8|(vc&255)<<8)>>>1}var cl=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},ph=new po(288);for(var Nn=0;Nn<144;++Nn)ph[Nn]=8;for(var Nn=144;Nn<256;++Nn)ph[Nn]=9;for(var Nn=256;Nn<280;++Nn)ph[Nn]=7;for(var Nn=280;Nn<288;++Nn)ph[Nn]=8;var Yy=new po(32);for(var Nn=0;Nn<32;++Nn)Yy[Nn]=5;var eut=cl(ph,9,0),rut=cl(ph,9,1),nut=cl(Yy,5,0),iut=cl(Yy,5,1),iT=function(r){for(var e=r[0],t=1;te&&(e=r[t]);return e},iA=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},aT=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},lR=function(r){return(r/8>>0)+(r&7&&1)},fG=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 zy?zy:po)(t-e);return n.set(r.subarray(e,t)),n},aut=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=iA(r,A,1);var g=iA(r,A+1,3);if(A+=3,g)if(g==1)u=rut,c=iut,h=9,f=5;else if(g==2){var w=iA(r,A,31)+257,C=iA(r,A+10,15)+4,O=w+iA(r,A+5,31)+1;A+=14;for(var F=new po(O),I=new po(19),T=0;Td)break;for(var x=cl(I,L,1),T=0;T>>4;if(m<16)F[T++]=m;else{var P=0,U=0;for(m==16?(U=3+iA(r,A,3),A+=2,P=F[T-1]):m==17?(U=3+iA(r,A,7),A+=3):m==18&&(U=11+iA(r,A,127),A+=7);U--;)F[T++]=P}}var tt=F.subarray(0,w),q=F.subarray(w);h=iT(tt),f=iT(q),u=cl(tt,h,1),c=cl(q,f,1)}else throw"invalid block type";else{var m=lR(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=ZC[T];Tt=iA(r,A,(1<>>4;if(!W)throw"invalid distance";A+=W&15;var q=tut[Y];if(Y>3){var M=JC[Y];q+=aT(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},sm=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},oT=function(r,e){for(var t=[],n=0;nh&&(h=a[n].s);var f=new go(h+1),d=fI(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]},fI=function(r,e,t){return r.s==-1?Math.max(fI(r.l,e,t+1),fI(r.r,e,t+1)):e[r.s]=t},x5=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]},Am=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[uI[S-1]];--S);var P=l+5<<3,U=Am(i,ph)+Am(a,Yy)+o,tt=Am(i,h)+Am(a,g)+o+14+3*S+Am(I,N)+(2*I[16]+3*I[17]+7*I[18]);if(P<=U&&P<=tt)return lw(e,u,r.subarray(A,A+l));var q,rt,nt,At;if(Kl(e,u,1+(tt15&&(Kl(e,u,W[T]>>>5&127),u+=W[T]>>>12)}}else q=eut,rt=ph,nt=nut,At=Yy;for(var T=0;T255){var Y=n[T]>>>18&31;sm(e,u,q[Y+257]),u+=rt[Y+257],Y>7&&(Kl(e,u,n[T]>>>23&31),u+=ZC[Y]);var H=n[T]&31;sm(e,u,nt[H]),u+=At[H],H>3&&(sm(e,u,n[T]>>>5&8191),u+=JC[H])}else sm(e,u,q[n[T]]),u+=rt[n[T]];return sm(e,u,q[256]),u+rt[256]},out=new zy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sut=new po(0),Aut=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=I5(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|cI[nt]<<18|S5[At];var at=cI[nt]&31,j=S5[At]&31;L+=ZC[at]+JC[j],++F[257+at],++I[j],x=u+nt,++T}else O[N++]=r[u],++F[r[u]]}}l=I5(r,A,a,O,F,I,L,N,S,u-S,l),a||(l=lw(A,l,sut))}return fG(s,0,n+lR(l)+i)},lut=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}}},uut=function(r,e,t,n,i){return Aut(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)},cut=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},hut=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)},fut=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 dI(r,e){e===void 0&&(e={});var t=lut();t.p(r);var n=uut(r,e,2,4);return hut(n,e),cut(n,n.length-4,t.d()),n}function dut(r,e){return aut((fut(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 Ye=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function sT(){Ye.console&&typeof Ye.console.log=="function"&&Ye.console.log.apply(Ye.console,arguments)}var Bn={log:sT,warn:function(r){Ye.console&&(typeof Ye.console.warn=="function"?Ye.console.warn.apply(Ye.console,arguments):sT.call(null,arguments))},error:function(r){Ye.console&&(typeof Ye.console.error=="function"?Ye.console.error.apply(Ye.console,arguments):sT(r))}};function AT(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){vf(n.response,e,t)},n.onerror=function(){Bn.error("could not download file")},n.send()}function L5(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function r1(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 sy,pI,vf=Ye.saveAs||((typeof window>"u"?"undefined":mn(window))!=="object"||window!==Ye?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Ye.URL||Ye.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?L5(i.href)?AT(r,e,t):r1(i,i.target="_blank"):r1(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){r1(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(L5(r))AT(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){r1(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 AT(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Ye.HTMLElement)||Ye.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=Ye.URL||Ye.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 dG(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 lT(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]=kc(t,r[0]),r[1]=kc(n,r[1]),r[2]=kc(i,r[2]),r[3]=kc(a,r[3])}function tB(r,e,t,n,i,a){return e=kc(kc(e,r),kc(n,a)),kc(e<>>32-i,t)}function Ua(r,e,t,n,i,a,o){return tB(e&t|~e&n,r,e,i,a,o)}function Da(r,e,t,n,i,a,o){return tB(e&n|t&~n,r,e,i,a,o)}function Qa(r,e,t,n,i,a,o){return tB(e^t^n,r,e,i,a,o)}function ka(r,e,t,n,i,a,o){return tB(t^(e|~n),r,e,i,a,o)}function pG(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)lT(n,put(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(lT(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,lT(n,i),n}function put(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}sy=Ye.atob.bind(Ye),pI=Ye.btoa.bind(Ye);var O5="0123456789abcdef".split("");function gut(r){for(var e="",t=0;t<4;t++)e+=O5[r>>8*t+4&15]+O5[r>>8*t&15];return e}function vut(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function gI(r){return pG(r).map(vut).join("")}var mut=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 vI(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=gI(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=vI(this.encryptionKey,this.padding)}function Hp(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 R5(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){Ye.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 pE(r){if(!(this instanceof pE))return new pE(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 gG(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function Ef(r,e,t,n,i){if(!(this instanceof Ef))return new Ef(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,gG.call(this,n,i)}function tg(r,e,t,n,i){if(!(this instanceof tg))return new tg(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,gG.call(this,n,i)}function Ke(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=R5;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,qs()*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?qs()-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 kp(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={},Hr=[],se={},hi={},gr={},ei={},Wr=null,zr=0,He=[],Ir=new R5(f),Gn=r.hotfixes||[],yn={},fi={},di=[],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},Ze=f.__private__.getFilters=function(){return o},Lr=f.__private__.putStream=function(E){var k=(E=E||{}).data||"",st=E.filters||Ze(),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=Ke.API.processDataByFilters!==void 0?Ke.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:Ze(),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")},zo=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 /"+Hp(E.postScriptName)),V("/Subtype /Type1"),typeof E.encoding=="string"&&V("/Encoding /"+E.encoding),V("/FirstChar 32"),V("/LastChar 255"),V(">>"),V("endobj"))},gi=function(){for(var E in Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&zo(Ne[E])},Ks=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")},IA=function(){for(var E in yn)yn.hasOwnProperty(E)&&Ks(yn[E])},Rh=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),Gi=E[De].color,Vn=E[De+1].color;ce+=H(Math.round((1-br)*Gi[0]+br*Vn[0]).toString(16))+H(Math.round((1-br)*Gi[1]+br*Vn[1]).toString(16))+H(Math.round((1-br)*Gi[2]+br*Vn[2]).toString(16))}return ce.trim()},Cv=function(E,k){k||(k=21);var st=cn(),gt=Rh(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")},Ud=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")},Ws=function(E){var k;for(k in se)se.hasOwnProperty(k)&&(se[k]instanceof Ef?Cv(se[k]):se[k]instanceof tg&&Ud(se[k],E))},Dd=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")},Bv=function(){var E;for(E in gr)gr.hasOwnProperty(E)&&Dd(gr[E])},Mh=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(">>")},bv=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")},Qd=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(">>")},kd=function(){if(Object.keys(se).length>0){for(var E in V("/Shading <<"),se)se.hasOwnProperty(E)&&se[E]instanceof Ef&&se[E].objectNumber>=0&&V("/"+E+" "+se[E].objectNumber+" 0 R");Ir.publish("putShadingPatternDict"),V(">>")}},Ol=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>")}},Tv=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(">>")}},$n=function(E){_n(E.resourcesOid,!0),V("<<"),V("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Qd(),kd(),Ol(E.objectOid),Tv(),Mh(),V(">>"),V("endobj")},Hd=function(){var E=[];gi(),Bv(),IA(),Ws(E),Ir.publish("putResources"),E.forEach($n),$n({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),Ir.publish("postPutResources")},Gd=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 Xo(E,k).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Vd=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])}},jd(zr),it(at[W])},LA=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])}Vd(i),Xd(ju),V(Zo),kh!==0&&V(kh+" J"),Hh!==0&&V(Hh+" j"),Ir.publish("addPage",{pageNumber:zr})},xv=function(E){E>0&&E<=zr&&(at.splice(E,1),He.splice(E,1),zr--,W>zr&&(W=zr),this.setPage(W))},jd=function(E){E>0&&E<=zr&&(W=E)},Iv=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return at.length-1},Kd=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},Lv=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 "+Ke.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")},Ph=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")},Uh=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(">>")},OA=f.__private__.putHeader=function(){V("%PDF-"+d),V("%ºß¬à")},Hu=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 ")},zs=f.__private__.buildDocument=function(){ft(),it(ut),Ir.publish("buildDocument"),OA(),fn(),Gd(),Hd(),u!==null&&bv(),Lv(),Ph();var E=X;return Hu(),Uh(),V("startxref"),V(""+E),V("%%EOF"),it(at[W]),ut.join(` `)},Gu=f.__private__.getBlob=function(E){return new Blob([Mt(E)],{type:"application/pdf"})},$u=f.output=f.__private__.output=Yo(function(E,k){switch(typeof(k=k||{})=="string"?k={filename:k}:k.filename=k.filename||"generated.pdf",E){case void 0:return zs();case"save":f.save(k.filename);break;case"arraybuffer":return Mt(zs());case"blob":return Gu(zs());case"bloburi":case"bloburl":if(Ye.URL!==void 0&&typeof Ye.URL.createObjectURL=="function")return Ye.URL&&Ye.URL.createObjectURL(Gu(zs()))||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=zs();try{st=pI(gt)}catch{st=pI(unescape(encodeURIComponent(gt)))}return"data:application/pdf;filename="+k.filename+";base64,"+st;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ye)==="[object Window]"){var xt='